300080d4 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 300080d4: e5903000 ldr r3, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 300080d8: e590100c ldr r1, [r0, #12] switch( node->type ) { 300080dc: e593204c ldr r2, [r3, #76] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 300080e0: e591302c ldr r3, [r1, #44] switch( node->type ) { 300080e4: e2422001 sub r2, r2, #1 ; 0x1 300080e8: e3520005 cmp r2, #5 ; 0x5 300080ec: 979ff102 ldrls pc, [pc, r2, lsl #2] 300080f0: ea000007 b 30008114 <== NOT EXECUTED 300080f4: 3000812c .word 0x3000812c <== NOT EXECUTED 300080f8: 3000813c .word 0x3000813c <== NOT EXECUTED 300080fc: 3000811c .word 0x3000811c <== NOT EXECUTED 30008100: 3000811c .word 0x3000811c <== NOT EXECUTED 30008104: 3000810c .word 0x3000810c <== NOT EXECUTED 30008108: 3000810c .word 0x3000810c <== NOT EXECUTED break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 3000810c: e5933004 ldr r3, [r3, #4] 30008110: e5803004 str r3, [r0, #4] break; } return 0; } 30008114: e3a00000 mov r0, #0 ; 0x0 30008118: e12fff1e bx lr case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 3000811c: e59f3028 ldr r3, [pc, #40] ; 3000814c 30008120: e5803004 str r3, [r0, #4] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 30008124: e3a00000 mov r0, #0 ; 0x0 30008128: e12fff1e bx lr IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 3000812c: e5933008 ldr r3, [r3, #8] 30008130: e5803004 str r3, [r0, #4] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 30008134: e3a00000 mov r0, #0 ; 0x0 30008138: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 3000813c: e59f300c ldr r3, [pc, #12] ; 30008150 30008140: e5803004 str r3, [r0, #4] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 30008144: e3a00000 mov r0, #0 ; 0x0 30008148: e12fff1e bx lr 3000814c: 300152e0 .word 0x300152e0 30008150: 300152a8 .word 0x300152a8 3001ca4c : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3001ca4c: e92d40f0 push {r4, r5, r6, r7, lr} 3001ca50: e1a01801 lsl r1, r1, #16 3001ca54: e1a02802 lsl r2, r2, #16 3001ca58: 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; 3001ca5c: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3001ca60: e1a06821 lsr r6, r1, #16 3001ca64: 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(); 3001ca68: eb000705 bl 3001e684 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3001ca6c: e1d433bc ldrh r3, [r4, #60] 3001ca70: e1530000 cmp r3, r0 3001ca74: 13500000 cmpne r0, #0 ; 0x0 3001ca78: 03a05000 moveq r5, #0 ; 0x0 3001ca7c: 13a05001 movne r5, #1 ; 0x1 3001ca80: 1a000009 bne 3001caac rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 3001ca84: e1c463bc strh r6, [r4, #60] jnode->st_gid = group; 3001ca88: e1c473be strh r7, [r4, #62] IMFS_update_ctime( jnode ); 3001ca8c: e1a0000d mov r0, sp 3001ca90: e1a01005 mov r1, r5 3001ca94: ebff9d54 bl 30003fec 3001ca98: e59d3000 ldr r3, [sp] 3001ca9c: e1a00005 mov r0, r5 3001caa0: e5843048 str r3, [r4, #72] return 0; } 3001caa4: e28dd008 add sp, sp, #8 ; 0x8 3001caa8: e8bd80f0 pop {r4, r5, r6, r7, pc} #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 3001caac: eb0043ce bl 3002d9ec <__errno> <== NOT EXECUTED 3001cab0: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 3001cab4: e5803000 str r3, [r0] <== NOT EXECUTED 3001cab8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001cabc: eafffff8 b 3001caa4 <== NOT EXECUTED 3000b258 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000b258: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} IMFS_jnode_t *node; struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; if ( parent_loc != NULL ) 3000b25c: e250a000 subs sl, r0, #0 ; 0x0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000b260: e24dd008 sub sp, sp, #8 ; 0x8 3000b264: e1a08001 mov r8, r1 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 3000b268: e3a00001 mov r0, #1 ; 0x1 3000b26c: 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 ) 3000b270: 01a0700a moveq r7, sl parent = parent_loc->node_access; 3000b274: 159a7000 ldrne r7, [sl] IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000b278: e1a05002 mov r5, r2 3000b27c: e1a06003 mov r6, r3 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 3000b280: ebfff709 bl 30008eac if ( !node ) 3000b284: e2504000 subs r4, r0, #0 ; 0x0 3000b288: 0a000035 beq 3000b364 /* * Fill in the basic information */ node->st_nlink = 1; 3000b28c: e3a02001 mov r2, #1 ; 0x1 node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 3000b290: e1a01005 mov r1, r5 /* * Fill in the basic information */ node->st_nlink = 1; 3000b294: e1c423b4 strh r2, [r4, #52] node->type = type; 3000b298: e584804c str r8, [r4, #76] strncpy( node->name, name, IMFS_NAME_MAX ); 3000b29c: e3a02020 mov r2, #32 ; 0x20 3000b2a0: e284000c add r0, r4, #12 ; 0xc 3000b2a4: eb00086c bl 3000d45c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 3000b2a8: e59f2124 ldr r2, [pc, #292] ; 3000b3d4 3000b2ac: e5921000 ldr r1, [r2] 3000b2b0: e5913024 ldr r3, [r1, #36] 3000b2b4: e1e03003 mvn r3, r3 3000b2b8: e0063003 and r3, r6, r3 3000b2bc: e5843030 str r3, [r4, #48] #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 3000b2c0: ebfff7a4 bl 30009158 3000b2c4: e1c403bc strh r0, [r4, #60] node->st_gid = getegid(); 3000b2c8: ebfff79d bl 30009144 /* * Now set all the times. */ gettimeofday( &tv, 0 ); 3000b2cc: 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(); 3000b2d0: e1c403be strh r0, [r4, #62] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 3000b2d4: e1a0000d mov r0, sp 3000b2d8: ebfff7a3 bl 3000916c node->stat_atime = (time_t) tv.tv_sec; 3000b2dc: e59d3000 ldr r3, [sp] /* * Set the type specific information */ switch (type) { 3000b2e0: e2482001 sub r2, r8, #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; 3000b2e4: e5843048 str r3, [r4, #72] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 3000b2e8: e5843040 str r3, [r4, #64] node->stat_mtime = (time_t) tv.tv_sec; 3000b2ec: e5843044 str r3, [r4, #68] /* * Set the type specific information */ switch (type) { 3000b2f0: e3520005 cmp r2, #5 ; 0x5 3000b2f4: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000b2f8: ea000020 b 3000b380 <== NOT EXECUTED 3000b2fc: 3000b394 .word 0x3000b394 <== NOT EXECUTED 3000b300: 3000b3b0 .word 0x3000b3b0 <== NOT EXECUTED 3000b304: 3000b3c4 .word 0x3000b3c4 <== NOT EXECUTED 3000b308: 3000b370 .word 0x3000b370 <== NOT EXECUTED 3000b30c: 3000b320 .word 0x3000b320 <== NOT EXECUTED 3000b310: 3000b314 .word 0x3000b314 <== 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; 3000b314: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED node->info.linearfile.direct = 0; 3000b318: 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; 3000b31c: e5843050 str r3, [r4, #80] <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 3000b320: e3a03000 mov r3, #0 ; 0x0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 3000b324: 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; 3000b328: e5843050 str r3, [r4, #80] node->info.file.indirect = 0; 3000b32c: e5843054 str r3, [r4, #84] node->info.file.doubly_indirect = 0; 3000b330: e5843058 str r3, [r4, #88] /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 3000b334: e3570000 cmp r7, #0 ; 0x0 3000b338: 0a000009 beq 3000b364 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 3000b33c: e1a01004 mov r1, r4 3000b340: e2870050 add r0, r7, #80 ; 0x50 3000b344: ebffe7c8 bl 3000526c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; 3000b348: e59a300c ldr r3, [sl, #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; 3000b34c: e5847008 str r7, [r4, #8] fs_info = parent_loc->mt_entry->fs_info; 3000b350: e593102c ldr r1, [r3, #44] node->st_ino = ++fs_info->ino_count; 3000b354: e5912000 ldr r2, [r1] 3000b358: e2822001 add r2, r2, #1 ; 0x1 3000b35c: e5812000 str r2, [r1] 3000b360: e5842038 str r2, [r4, #56] } return node; } 3000b364: e1a00004 mov r0, r4 3000b368: e28dd008 add sp, sp, #8 ; 0x8 3000b36c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 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; 3000b370: e59d2024 ldr r2, [sp, #36] 3000b374: e5923000 ldr r3, [r2] 3000b378: e5843050 str r3, [r4, #80] 3000b37c: eaffffec b 3000b334 node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; default: assert(0); 3000b380: e59f0050 ldr r0, [pc, #80] ; 3000b3d8 <== NOT EXECUTED 3000b384: e3a01074 mov r1, #116 ; 0x74 <== NOT EXECUTED 3000b388: e59f204c ldr r2, [pc, #76] ; 3000b3dc <== NOT EXECUTED 3000b38c: e59f304c ldr r3, [pc, #76] ; 3000b3e0 <== NOT EXECUTED 3000b390: ebfff66b bl 30008d44 <__assert_func> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 3000b394: e2843054 add r3, r4, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 3000b398: e2841050 add r1, r4, #80 ; 0x50 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 3000b39c: e3a02000 mov r2, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 3000b3a0: e5843050 str r3, [r4, #80] the_chain->permanent_null = NULL; 3000b3a4: e5842054 str r2, [r4, #84] the_chain->last = _Chain_Head(the_chain); 3000b3a8: e5841058 str r1, [r4, #88] 3000b3ac: eaffffe0 b 3000b334 node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 3000b3b0: e59d1024 ldr r1, [sp, #36] 3000b3b4: e891000c ldm r1, {r2, r3} 3000b3b8: 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; 3000b3bc: e5842050 str r2, [r4, #80] 3000b3c0: eaffffdb b 3000b334 case IMFS_DIRECTORY: rtems_chain_initialize_empty(&node->info.directory.Entries); break; case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; 3000b3c4: e59d1024 ldr r1, [sp, #36] 3000b3c8: e5913000 ldr r3, [r1] 3000b3cc: e5843050 str r3, [r4, #80] 3000b3d0: eaffffd7 b 3000b334 3000b3d4: 30016660 .word 0x30016660 3000b3d8: 30015e1c .word 0x30015e1c 3000b3dc: 300155e4 .word 0x300155e4 3000b3e0: 30015b08 .word 0x30015b08 30002bfc : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 30002bfc: e3500000 cmp r0, #0 ; 0x0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 30002c00: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30002c04: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 30002c08: 0a000021 beq 30002c94 assert( level >= 0 ); 30002c0c: e3510000 cmp r1, #0 ; 0x0 30002c10: ba000029 blt 30002cbc assert( the_directory->type == IMFS_DIRECTORY ); 30002c14: e590304c ldr r3, [r0, #76] 30002c18: e3530001 cmp r3, #1 ; 0x1 30002c1c: 1a000021 bne 30002ca8 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 30002c20: e5906050 ldr r6, [r0, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30002c24: e2808054 add r8, r0, #84 ; 0x54 !rtems_chain_is_tail( the_chain, the_node ); 30002c28: e1560008 cmp r6, r8 30002c2c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} 30002c30: e59f7098 ldr r7, [pc, #152] ; 30002cd0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 30002c34: e281a001 add sl, r1, #1 ; 0x1 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; 30002c38: e3a04000 mov r4, #0 ; 0x0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 30002c3c: e5972000 ldr r2, [r7] !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++ ) 30002c40: e2844001 add r4, r4, #1 ; 0x1 fprintf(stdout, "...." ); 30002c44: e5923008 ldr r3, [r2, #8] 30002c48: e59f0084 ldr r0, [pc, #132] ; 30002cd4 30002c4c: e3a01001 mov r1, #1 ; 0x1 30002c50: e3a02004 mov r2, #4 ; 0x4 30002c54: eb0038b6 bl 30010f34 !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++ ) 30002c58: e1550004 cmp r5, r4 30002c5c: aafffff6 bge 30002c3c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 30002c60: e1a00006 mov r0, r6 30002c64: ebffff87 bl 30002a88 if ( the_jnode->type == IMFS_DIRECTORY ) 30002c68: e596304c ldr r3, [r6, #76] 30002c6c: e3530001 cmp r3, #1 ; 0x1 30002c70: 0a000003 beq 30002c84 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 ) { 30002c74: e5966000 ldr r6, [r6] 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 ); 30002c78: e1560008 cmp r6, r8 30002c7c: 1affffed bne 30002c38 30002c80: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 30002c84: e1a00006 mov r0, r6 30002c88: e1a0100a mov r1, sl 30002c8c: ebffffda bl 30002bfc 30002c90: eafffff7 b 30002c74 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 30002c94: e59f003c ldr r0, [pc, #60] ; 30002cd8 <== NOT EXECUTED 30002c98: e3a0107f mov r1, #127 ; 0x7f <== NOT EXECUTED 30002c9c: e59f2038 ldr r2, [pc, #56] ; 30002cdc <== NOT EXECUTED 30002ca0: e59f3038 ldr r3, [pc, #56] ; 30002ce0 <== NOT EXECUTED 30002ca4: eb0001bb bl 30003398 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 30002ca8: e59f0028 ldr r0, [pc, #40] ; 30002cd8 <== NOT EXECUTED 30002cac: e3a01083 mov r1, #131 ; 0x83 <== NOT EXECUTED 30002cb0: e59f2024 ldr r2, [pc, #36] ; 30002cdc <== NOT EXECUTED 30002cb4: e59f3028 ldr r3, [pc, #40] ; 30002ce4 <== NOT EXECUTED 30002cb8: eb0001b6 bl 30003398 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 30002cbc: e59f0014 ldr r0, [pc, #20] ; 30002cd8 <== NOT EXECUTED 30002cc0: e3a01081 mov r1, #129 ; 0x81 <== NOT EXECUTED 30002cc4: e59f2010 ldr r2, [pc, #16] ; 30002cdc <== NOT EXECUTED 30002cc8: e59f3018 ldr r3, [pc, #24] ; 30002ce8 <== NOT EXECUTED 30002ccc: eb0001b1 bl 30003398 <__assert_func> <== NOT EXECUTED 30002cd0: 3001e0c0 .word 0x3001e0c0 30002cd4: 3001cbac .word 0x3001cbac 30002cd8: 3001cabc .word 0x3001cabc 30002cdc: 3001b4e0 .word 0x3001b4e0 30002ce0: 3001cb68 .word 0x3001cb68 30002ce4: 3001cb84 .word 0x3001cb84 30002ce8: 3001cb78 .word 0x3001cb78 300082dc : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 300082dc: 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; 300082e0: e5925000 ldr r5, [r2] int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 300082e4: e24dd038 sub sp, sp, #56 ; 0x38 300082e8: e1a06002 mov r6, r2 300082ec: e1a08000 mov r8, r0 300082f0: e1a0b001 mov fp, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 300082f4: e3a07000 mov r7, #0 ; 0x0 300082f8: e28da003 add sl, sp, #3 ; 0x3 300082fc: e28d9034 add r9, sp, #52 ; 0x34 * 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 ); 30008300: e0880007 add r0, r8, r7 30008304: e1a0100a mov r1, sl 30008308: e1a02009 mov r2, r9 3000830c: eb000182 bl 3000891c i += len; if ( !pathloc->node_access ) 30008310: e596e000 ldr lr, [r6] * 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 ); 30008314: e1a04000 mov r4, r0 i += len; if ( !pathloc->node_access ) 30008318: e35e0000 cmp lr, #0 ; 0x0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], token, &len ); i += len; 3000831c: e59d3034 ldr r3, [sp, #52] if ( !pathloc->node_access ) 30008320: 0a00004d beq 3000845c rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 30008324: e3500000 cmp r0, #0 ; 0x0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], token, &len ); i += len; 30008328: e0877003 add r7, r7, r3 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000832c: 1a00000f bne 30008370 * 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 ) { 30008330: e59e304c ldr r3, [lr, #76] 30008334: e3530001 cmp r3, #1 ; 0x1 30008338: 0a000063 beq 300084cc return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 3000833c: e1a00006 mov r0, r6 30008340: ebffff63 bl 300080d4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 30008344: e1a0100b mov r1, fp return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 30008348: e1a04000 mov r4, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 3000834c: e1a00006 mov r0, r6 30008350: ebffff7f bl 30008154 30008354: e3500000 cmp r0, #0 ; 0x0 30008358: 1a000036 bne 30008438 rtems_set_errno_and_return_minus_one( EACCES ); 3000835c: eb000ee1 bl 3000bee8 <__errno> 30008360: e3a0300d mov r3, #13 ; 0xd 30008364: e5803000 str r3, [r0] 30008368: e3e04000 mvn r4, #0 ; 0x0 3000836c: ea000031 b 30008438 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 30008370: e595104c ldr r1, [r5, #76] 30008374: e3510001 cmp r1, #1 ; 0x1 30008378: 0a000031 beq 30008444 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 3000837c: e3540003 cmp r4, #3 ; 0x3 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; 30008380: e1a0500e mov r5, lr switch( type ) { 30008384: 0a000006 beq 300083a4 30008388: e3540004 cmp r4, #4 ; 0x4 3000838c: 0a000025 beq 30008428 30008390: e3540002 cmp r4, #2 ; 0x2 30008394: 0a000013 beq 300083e8 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 30008398: e3540004 cmp r4, #4 ; 0x4 3000839c: 1affffd7 bne 30008300 300083a0: eaffffe2 b 30008330 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 300083a4: e59e304c ldr r3, [lr, #76] 300083a8: e3530003 cmp r3, #3 ; 0x3 300083ac: 0a00002f beq 30008470 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 300083b0: e3530004 cmp r3, #4 ; 0x4 300083b4: 0a00004e beq 300084f4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 300083b8: e3530001 cmp r3, #1 ; 0x1 300083bc: 1a000047 bne 300084e0 /* * 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 ) { 300083c0: e595e05c ldr lr, [r5, #92] 300083c4: e35e0000 cmp lr, #0 ; 0x0 300083c8: 1a000042 bne 300084d8 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 300083cc: e1a00005 mov r0, r5 300083d0: e1a0100a mov r1, sl 300083d4: eb000121 bl 30008860 if ( !node ) 300083d8: e2505000 subs r5, r0, #0 ; 0x0 300083dc: 0a00001e beq 3000845c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 300083e0: e5865000 str r5, [r6] 300083e4: eaffffc5 b 30008300 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 300083e8: e59f212c ldr r2, [pc, #300] ; 3000851c 300083ec: e5923000 ldr r3, [r2] 300083f0: e5932014 ldr r2, [r3, #20] 300083f4: e152000e cmp r2, lr 300083f8: 0affffc0 beq 30008300 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 300083fc: e596200c ldr r2, [r6, #12] 30008400: e5923018 ldr r3, [r2, #24] 30008404: e153000e cmp r3, lr 30008408: 0a000020 beq 30008490 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 3000840c: e59e5008 ldr r5, [lr, #8] 30008410: e3550000 cmp r5, #0 ; 0x0 30008414: 1afffff1 bne 300083e0 rtems_set_errno_and_return_minus_one( ENOENT ); 30008418: eb000eb2 bl 3000bee8 <__errno> 3000841c: e5804000 str r4, [r0] 30008420: e3e04000 mvn r4, #0 ; 0x0 30008424: ea000003 b 30008438 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30008428: eb000eae bl 3000bee8 <__errno> 3000842c: e3a0305b mov r3, #91 ; 0x5b 30008430: e5803000 str r3, [r0] 30008434: e3e04000 mvn r4, #0 ; 0x0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 30008438: e1a00004 mov r0, r4 3000843c: e28dd038 add sp, sp, #56 ; 0x38 30008440: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 30008444: e1a00006 mov r0, r6 30008448: ebffff41 bl 30008154 3000844c: e3500000 cmp r0, #0 ; 0x0 30008450: 0affffc1 beq 3000835c 30008454: e596e000 ldr lr, [r6] 30008458: eaffffc7 b 3000837c * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 3000845c: eb000ea1 bl 3000bee8 <__errno> 30008460: e3a03002 mov r3, #2 ; 0x2 30008464: e5803000 str r3, [r0] 30008468: e3e04000 mvn r4, #0 ; 0x0 3000846c: eafffff1 b 30008438 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 30008470: e1a00006 mov r0, r6 30008474: e3a01000 mov r1, #0 ; 0x0 30008478: ebffff49 bl 300081a4 node = pathloc->node_access; 3000847c: e5965000 ldr r5, [r6] if ( !node ) 30008480: e3550000 cmp r5, #0 ; 0x0 30008484: 0a000015 beq 300084e0 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 30008488: e595304c ldr r3, [r5, #76] 3000848c: eaffffc9 b 300083b8 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 30008490: e282e008 add lr, r2, #8 ; 0x8 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 30008494: e89e000f ldm lr, {r0, r1, r2, r3} *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 30008498: e59de034 ldr lr, [sp, #52] * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 3000849c: e28dc024 add ip, sp, #36 ; 0x24 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 300084a0: e06ee007 rsb lr, lr, r7 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 300084a4: e88c000f stm ip, {r0, r1, r2, r3} *pathloc = newloc; 300084a8: e886000f stm r6, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 300084ac: e5923000 ldr r3, [r2] 300084b0: e088000e add r0, r8, lr 300084b4: e1a0100b mov r1, fp 300084b8: e1a02006 mov r2, r6 300084bc: e1a0e00f mov lr, pc 300084c0: e12fff13 bx r3 300084c4: e1a04000 mov r4, r0 300084c8: eaffffda b 30008438 * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 300084cc: e59ee05c ldr lr, [lr, #92] 300084d0: e35e0000 cmp lr, #0 ; 0x0 300084d4: 0affff98 beq 3000833c newloc = node->info.directory.mt_fs->mt_fs_root; 300084d8: e28ee018 add lr, lr, #24 ; 0x18 300084dc: eaffffec b 30008494 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 300084e0: eb000e80 bl 3000bee8 <__errno> 300084e4: e3a03014 mov r3, #20 ; 0x14 300084e8: e5803000 str r3, [r0] 300084ec: e3e04000 mvn r4, #0 ; 0x0 300084f0: eaffffd0 b 30008438 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 300084f4: e1a00006 mov r0, r6 300084f8: e3a01000 mov r1, #0 ; 0x0 300084fc: ebffff40 bl 30008204 node = pathloc->node_access; if ( result == -1 ) 30008500: 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 ); 30008504: e1a04000 mov r4, r0 node = pathloc->node_access; 30008508: e5960000 ldr r0, [r6] if ( result == -1 ) 3000850c: 0affffc9 beq 30008438 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 30008510: e1a05000 mov r5, r0 30008514: e595304c ldr r3, [r5, #76] 30008518: eaffffa6 b 300083b8 3000851c: 30016660 .word 0x30016660 300085e0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 300085e0: 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; 300085e4: e5915000 ldr r5, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 300085e8: e24dd03c sub sp, sp, #60 ; 0x3c 300085ec: e1a07001 mov r7, r1 300085f0: e1a0a000 mov sl, r0 300085f4: e58d2000 str r2, [sp] /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 300085f8: e3a08000 mov r8, #0 ; 0x0 300085fc: e28d9007 add r9, sp, #7 ; 0x7 30008600: e28db038 add fp, sp, #56 ; 0x38 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 30008604: e08a0008 add r0, sl, r8 30008608: e1a01009 mov r1, r9 3000860c: e1a0200b mov r2, fp 30008610: eb0000c1 bl 3000891c i += len; if ( !pathloc->node_access ) 30008614: e597c000 ldr ip, [r7] * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 30008618: e1a04000 mov r4, r0 i += len; if ( !pathloc->node_access ) 3000861c: e35c0000 cmp ip, #0 ; 0x0 */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); i += len; 30008620: e59d6038 ldr r6, [sp, #56] if ( !pathloc->node_access ) 30008624: 0a00003a beq 30008714 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 30008628: e3500000 cmp r0, #0 ; 0x0 3000862c: 1a000006 bne 3000864c pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 30008630: eb000e2c bl 3000bee8 <__errno> 30008634: e3a03011 mov r3, #17 ; 0x11 30008638: e5803000 str r3, [r0] 3000863c: e3e04000 mvn r4, #0 ; 0x0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 30008640: e1a00004 mov r0, r4 30008644: e28dd03c add sp, sp, #60 ; 0x3c 30008648: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 3000864c: e595104c ldr r1, [r5, #76] 30008650: e3510001 cmp r1, #1 ; 0x1 30008654: 0a000033 beq 30008728 */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); i += len; 30008658: e0888006 add r8, r8, r6 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 3000865c: e1a0500c mov r5, ip switch( type ) { 30008660: e3540004 cmp r4, #4 ; 0x4 30008664: 979ff104 ldrls pc, [pc, r4, lsl #2] 30008668: eaffffe5 b 30008604 <== NOT EXECUTED 3000866c: 30008630 .word 0x30008630 <== NOT EXECUTED 30008670: 30008604 .word 0x30008604 <== NOT EXECUTED 30008674: 300086e4 .word 0x300086e4 <== NOT EXECUTED 30008678: 30008694 .word 0x30008694 <== NOT EXECUTED 3000867c: 30008680 .word 0x30008680 <== NOT EXECUTED case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30008680: eb000e18 bl 3000bee8 <__errno> 30008684: e3a0305b mov r3, #91 ; 0x5b 30008688: e5803000 str r3, [r0] 3000868c: e3e04000 mvn r4, #0 ; 0x0 30008690: eaffffea b 30008640 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 30008694: e59c304c ldr r3, [ip, #76] 30008698: e3530003 cmp r3, #3 ; 0x3 3000869c: 0a000064 beq 30008834 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 300086a0: e3530004 cmp r3, #4 ; 0x4 300086a4: 0a000062 beq 30008834 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 300086a8: e3550000 cmp r5, #0 ; 0x0 300086ac: 0a00004c beq 300087e4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 300086b0: e595304c ldr r3, [r5, #76] 300086b4: e3530001 cmp r3, #1 ; 0x1 300086b8: 1a000049 bne 300087e4 /* * 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 ) { 300086bc: e595e05c ldr lr, [r5, #92] 300086c0: e35e0000 cmp lr, #0 ; 0x0 300086c4: 1a00004b bne 300087f8 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 300086c8: e1a00005 mov r0, r5 300086cc: e1a01009 mov r1, r9 300086d0: eb000062 bl 30008860 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 300086d4: e2505000 subs r5, r0, #0 ; 0x0 300086d8: 0a000018 beq 30008740 done = true; else pathloc->node_access = node; 300086dc: e5875000 str r5, [r7] 300086e0: eaffffc7 b 30008604 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 300086e4: e59f1170 ldr r1, [pc, #368] ; 3000885c 300086e8: e5913000 ldr r3, [r1] 300086ec: e5932014 ldr r2, [r3, #20] 300086f0: e152000c cmp r2, ip 300086f4: 0affffc2 beq 30008604 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 300086f8: e597e00c ldr lr, [r7, #12] 300086fc: e59e3018 ldr r3, [lr, #24] 30008700: e153000c cmp r3, ip 30008704: 0a000052 beq 30008854 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 30008708: e59c5008 ldr r5, [ip, #8] 3000870c: e3550000 cmp r5, #0 ; 0x0 30008710: 1afffff1 bne 300086dc * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 30008714: eb000df3 bl 3000bee8 <__errno> 30008718: e3a03002 mov r3, #2 ; 0x2 3000871c: e5803000 str r3, [r0] 30008720: e3e04000 mvn r4, #0 ; 0x0 30008724: eaffffc5 b 30008640 * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 30008728: e1a00007 mov r0, r7 3000872c: ebfffe88 bl 30008154 30008730: e3500000 cmp r0, #0 ; 0x0 30008734: 0a000025 beq 300087d0 30008738: e597c000 ldr ip, [r7] 3000873c: eaffffc5 b 30008658 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 30008740: e59d3038 ldr r3, [sp, #56] 30008744: e59d1000 ldr r1, [sp] 30008748: e0633008 rsb r3, r3, r8 3000874c: e08a3003 add r3, sl, r3 30008750: e5813000 str r3, [r1] /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 30008754: e7da0008 ldrb r0, [sl, r8] 30008758: e08a2008 add r2, sl, r8 3000875c: e3500000 cmp r0, #0 ; 0x0 30008760: 0a00000e beq 300087a0 if ( !IMFS_is_separator( path[ i ] ) ) 30008764: e350002f cmp r0, #47 ; 0x2f 30008768: 1350005c cmpne r0, #92 ; 0x5c 3000876c: 1affffe8 bne 30008714 /* * 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++) { 30008770: e5d23001 ldrb r3, [r2, #1] if ( !IMFS_is_separator( path[ i ] ) ) 30008774: e2822001 add r2, r2, #1 ; 0x1 /* * 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++) { 30008778: e3530000 cmp r3, #0 ; 0x0 3000877c: 0a000007 beq 300087a0 if ( !IMFS_is_separator( path[ i ] ) ) 30008780: e353002f cmp r3, #47 ; 0x2f 30008784: 1353005c cmpne r3, #92 ; 0x5c 30008788: 0afffff8 beq 30008770 rtems_set_errno_and_return_minus_one( ENOENT ); 3000878c: eb000dd5 bl 3000bee8 <__errno> 30008790: e3a03002 mov r3, #2 ; 0x2 30008794: e5803000 str r3, [r0] 30008798: e3e04000 mvn r4, #0 ; 0x0 3000879c: eaffffa7 b 30008640 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 300087a0: e1a00007 mov r0, r7 300087a4: ebfffe4a bl 300080d4 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 300087a8: e5973000 ldr r3, [r7] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 300087ac: e1a04000 mov r4, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 300087b0: e593204c ldr r2, [r3, #76] 300087b4: e3520001 cmp r2, #1 ; 0x1 300087b8: 1a000009 bne 300087e4 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 300087bc: e1a00007 mov r0, r7 300087c0: e3a01003 mov r1, #3 ; 0x3 300087c4: ebfffe62 bl 30008154 300087c8: e3500000 cmp r0, #0 ; 0x0 300087cc: 1affff9b bne 30008640 rtems_set_errno_and_return_minus_one( EACCES ); 300087d0: eb000dc4 bl 3000bee8 <__errno> 300087d4: e3a0300d mov r3, #13 ; 0xd 300087d8: e5803000 str r3, [r0] 300087dc: e3e04000 mvn r4, #0 ; 0x0 300087e0: eaffff96 b 30008640 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 300087e4: eb000dbf bl 3000bee8 <__errno> 300087e8: e3a03014 mov r3, #20 ; 0x14 300087ec: e5803000 str r3, [r0] 300087f0: e3e04000 mvn r4, #0 ; 0x0 300087f4: eaffff91 b 30008640 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 300087f8: e28ee018 add lr, lr, #24 ; 0x18 300087fc: e89e000f ldm lr, {r0, r1, r2, r3} *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30008800: e59de038 ldr lr, [sp, #56] * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 30008804: e28dc028 add ip, sp, #40 ; 0x28 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30008808: e06ee008 rsb lr, lr, r8 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 3000880c: e88c000f stm ip, {r0, r1, r2, r3} *pathloc = newloc; 30008810: e887000f stm r7, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30008814: e5923004 ldr r3, [r2, #4] 30008818: e08a000e add r0, sl, lr 3000881c: e1a01007 mov r1, r7 30008820: e59d2000 ldr r2, [sp] 30008824: e1a0e00f mov lr, pc 30008828: e12fff13 bx r3 3000882c: e1a04000 mov r4, r0 30008830: eaffff82 b 30008640 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 30008834: e1a00007 mov r0, r7 30008838: e3a01000 mov r1, #0 ; 0x0 3000883c: ebffff37 bl 30008520 if ( result == -1 ) 30008840: e3700001 cmn r0, #1 ; 0x1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 30008844: e1a04000 mov r4, r0 if ( result == -1 ) 30008848: 0affff7c beq 30008640 3000884c: e5975000 ldr r5, [r7] 30008850: eaffff94 b 300086a8 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 30008854: e28ee008 add lr, lr, #8 ; 0x8 30008858: eaffffe7 b 300087fc 3000885c: 30016660 .word 0x30016660 300081a4 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 300081a4: e5902000 ldr r2, [r0] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 300081a8: e92d4030 push {r4, r5, lr} /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 300081ac: e592304c ldr r3, [r2, #76] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 300081b0: e1a04000 mov r4, r0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 300081b4: e3530003 cmp r3, #3 ; 0x3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 300081b8: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 300081bc: 1a00000d bne 300081f8 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 300081c0: e5923050 ldr r3, [r2, #80] 300081c4: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 300081c8: ebffffc1 bl 300080d4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 300081cc: e1a00004 mov r0, r4 300081d0: e1a01005 mov r1, r5 300081d4: ebffffde bl 30008154 300081d8: e3500000 cmp r0, #0 ; 0x0 300081dc: 13a00000 movne r0, #0 ; 0x0 300081e0: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 300081e4: eb000f3f bl 3000bee8 <__errno> <== NOT EXECUTED 300081e8: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 300081ec: e5803000 str r3, [r0] <== NOT EXECUTED 300081f0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED return result; } 300081f4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 300081f8: e59f0000 ldr r0, [pc, #0] ; 30008200 <== NOT EXECUTED 300081fc: ebfff324 bl 30004e94 <== NOT EXECUTED 30008200: abcd0000 .word 0xabcd0000 30008204 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30008204: e92d4070 push {r4, r5, r6, lr} 30008208: e1a04000 mov r4, r0 IMFS_jnode_t *jnode = node->node_access; 3000820c: e5900000 ldr r0, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30008210: e1a06001 mov r6, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 30008214: e590304c ldr r3, [r0, #76] 30008218: e3530004 cmp r3, #4 ; 0x4 3000821c: 1a000027 bne 300082c0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 30008220: e5903008 ldr r3, [r0, #8] 30008224: e3530000 cmp r3, #0 ; 0x0 30008228: 0a000026 beq 300082c8 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 3000822c: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 30008230: e5905050 ldr r5, [r0, #80] 30008234: e5d53000 ldrb r3, [r5] 30008238: e353005c cmp r3, #92 ; 0x5c 3000823c: 1353002f cmpne r3, #47 ; 0x2f 30008240: 13a02000 movne r2, #0 ; 0x0 30008244: 03a02001 moveq r2, #1 ; 0x1 30008248: 1a000013 bne 3000829c 3000824c: e59f307c ldr r3, [pc, #124] ; 300082d0 30008250: e3a0e001 mov lr, #1 ; 0x1 30008254: e593c000 ldr ip, [r3] 30008258: e28cc014 add ip, ip, #20 ; 0x14 3000825c: e89c000f ldm ip, {r0, r1, r2, r3} 30008260: e884000f stm r4, {r0, r1, r2, r3} /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 30008264: e085000e add r0, r5, lr 30008268: e1a02004 mov r2, r4 3000826c: e1a01006 mov r1, r6 30008270: eb000019 bl 300082dc 30008274: e1a05000 mov r5, r0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 30008278: e1a00004 mov r0, r4 3000827c: ebffff94 bl 300080d4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 30008280: e1a00004 mov r0, r4 30008284: e1a01006 mov r1, r6 30008288: ebffffb1 bl 30008154 3000828c: e3500000 cmp r0, #0 ; 0x0 30008290: 0a000005 beq 300082ac rtems_set_errno_and_return_minus_one( EACCES ); return result; } 30008294: e1a00005 mov r0, r5 30008298: e8bd8070 pop {r4, r5, r6, pc} * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 3000829c: e3530000 cmp r3, #0 ; 0x0 300082a0: 11a0e002 movne lr, r2 300082a4: 1affffee bne 30008264 300082a8: eaffffe7 b 3000824c <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 300082ac: eb000f0d bl 3000bee8 <__errno> <== NOT EXECUTED 300082b0: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 300082b4: e5803000 str r3, [r0] <== NOT EXECUTED 300082b8: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 300082bc: eafffff4 b 30008294 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 300082c0: e59f000c ldr r0, [pc, #12] ; 300082d4 <== NOT EXECUTED 300082c4: ebfff2f2 bl 30004e94 <== NOT EXECUTED if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 300082c8: e59f0008 ldr r0, [pc, #8] ; 300082d8 <== NOT EXECUTED 300082cc: ebfff2f0 bl 30004e94 <== NOT EXECUTED 300082d0: 30016660 .word 0x30016660 300082d4: abcd0000 .word 0xabcd0000 300082d8: bad00000 .word 0xbad00000 30008860 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 30008860: e92d4070 push {r4, r5, r6, lr} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 30008864: e2504000 subs r4, r0, #0 ; 0x0 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 30008868: e1a05001 mov r5, r1 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 3000886c: 0a000020 beq 300088f4 if ( !name ) 30008870: e3510000 cmp r1, #0 ; 0x0 30008874: 0a00001b beq 300088e8 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 30008878: e1a00001 mov r0, r1 3000887c: e59f1084 ldr r1, [pc, #132] ; 30008908 30008880: eb001266 bl 3000d220 30008884: e3500000 cmp r0, #0 ; 0x0 30008888: 1a000001 bne 30008894 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 3000888c: e1a00004 mov r0, r4 30008890: e8bd8070 pop {r4, r5, r6, pc} */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) 30008894: e1a00005 mov r0, r5 30008898: e59f106c ldr r1, [pc, #108] ; 3000890c 3000889c: eb00125f bl 3000d220 300088a0: e3500000 cmp r0, #0 ; 0x0 return directory->Parent; 300088a4: 05944008 ldreq r4, [r4, #8] */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) 300088a8: 0afffff7 beq 3000888c return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 300088ac: e5946050 ldr r6, [r4, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 300088b0: e2844054 add r4, r4, #84 ; 0x54 !rtems_chain_is_tail( the_chain, the_node ); 300088b4: e1560004 cmp r6, r4 300088b8: 1a000003 bne 300088cc 300088bc: ea000009 b 300088e8 the_node = the_node->next ) { 300088c0: e5966000 ldr r6, [r6] return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 300088c4: e1560004 cmp r6, r4 300088c8: 0a000006 beq 300088e8 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 300088cc: e1a00005 mov r0, r5 300088d0: e286100c add r1, r6, #12 ; 0xc 300088d4: eb001251 bl 3000d220 300088d8: e3500000 cmp r0, #0 ; 0x0 300088dc: 1afffff7 bne 300088c0 300088e0: e1a04006 mov r4, r6 300088e4: eaffffe8 b 3000888c return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 300088e8: e3a04000 mov r4, #0 ; 0x0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 300088ec: e1a00004 mov r0, r4 300088f0: e8bd8070 pop {r4, r5, r6, pc} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 300088f4: e59f0014 ldr r0, [pc, #20] ; 30008910 <== NOT EXECUTED 300088f8: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED 300088fc: e59f2010 ldr r2, [pc, #16] ; 30008914 <== NOT EXECUTED 30008900: e59f3010 ldr r3, [pc, #16] ; 30008918 <== NOT EXECUTED 30008904: eb00010e bl 30008d44 <__assert_func> <== NOT EXECUTED 30008908: 30015288 .word 0x30015288 3000890c: 3001528c .word 0x3001528c 30008910: 30015c84 .word 0x30015c84 30008914: 30015290 .word 0x30015290 30008918: 30015cd4 .word 0x30015cd4 3001d3e0 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3001d3e0: 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; 3001d3e4: e1a0e000 mov lr, r0 3001d3e8: e5be4018 ldr r4, [lr, #24]! ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3001d3ec: e24dd010 sub sp, sp, #16 ; 0x10 3001d3f0: e1a0c000 mov ip, 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; 3001d3f4: e89e000f ldm lr, {r0, r1, r2, r3} 3001d3f8: 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; 3001d3fc: e3a03000 mov r3, #0 ; 0x0 * 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; 3001d400: e1a0500d mov r5, sp /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3001d404: e58c3018 str r3, [ip, #24] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3001d408: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 3001d40c: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 3001d410: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3001d414: ebfffe0c bl 3001cc4c if ( jnode->type != IMFS_DIRECTORY ) { 3001d418: e594304c ldr r3, [r4, #76] result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 3001d41c: e2842054 add r2, r4, #84 ; 0x54 do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { 3001d420: e3530001 cmp r3, #1 ; 0x1 3001d424: 1a000010 bne 3001d46c result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 3001d428: e5943050 ldr r3, [r4, #80] 3001d42c: e1530002 cmp r3, r2 3001d430: 0a00000d beq 3001d46c result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 3001d434: e3540000 cmp r4, #0 ; 0x0 3001d438: 0a000008 beq 3001d460 if ( jnode->type == IMFS_DIRECTORY ) { 3001d43c: e594304c ldr r3, [r4, #76] 3001d440: e3530001 cmp r3, #1 ; 0x1 3001d444: 1affffef bne 3001d408 if ( jnode_has_children( jnode ) ) 3001d448: e5942050 ldr r2, [r4, #80] 3001d44c: e2843054 add r3, r4, #84 ; 0x54 3001d450: e1520003 cmp r2, r3 3001d454: 0affffeb beq 3001d408 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 3001d458: e2524000 subs r4, r2, #0 ; 0x0 3001d45c: 1affffe9 bne 3001d408 3001d460: e3a00000 mov r0, #0 ; 0x0 return 0; } 3001d464: e28dd010 add sp, sp, #16 ; 0x10 3001d468: e8bd8070 pop {r4, r5, r6, pc} result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( &loc ); 3001d46c: e1a0000d mov r0, sp 3001d470: ebff9925 bl 3000390c if (result != 0) 3001d474: e3500000 cmp r0, #0 ; 0x0 3001d478: 01a04006 moveq r4, r6 3001d47c: 0affffec beq 3001d434 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 3001d480: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001d484: eafffff6 b 3001d464 <== NOT EXECUTED 30008a10 : 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 ) { 30008a10: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 30008a14: e1a06000 mov r6, r0 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30008a18: e59f00e8 ldr r0, [pc, #232] ; 30008b08 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 ) { 30008a1c: e1a09002 mov r9, r2 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30008a20: e590e000 ldr lr, [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 ) { 30008a24: e1a08003 mov r8, r3 * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 30008a28: e35e0010 cmp lr, #16 ; 0x10 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 ) { 30008a2c: e24dd004 sub sp, sp, #4 ; 0x4 30008a30: e1a0a001 mov sl, r1 * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 30008a34: 13a02020 movne r2, #32 ; 0x20 30008a38: 13a03000 movne r3, #0 ; 0x0 30008a3c: 0a000006 beq 30008a5c 30008a40: e15e0002 cmp lr, r2 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 30008a44: e2833001 add r3, r3, #1 ; 0x1 30008a48: e1a02082 lsl r2, r2, #1 if (bit_mask == requested_bytes_per_block) { 30008a4c: 0a000002 beq 30008a5c int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 30008a50: e3530005 cmp r3, #5 ; 0x5 30008a54: 1afffff9 bne 30008a40 30008a58: 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) 30008a5c: e59fc0a8 ldr ip, [pc, #168] ; 30008b0c * 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( 30008a60: e3a07000 mov r7, #0 ; 0x0 bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 30008a64: 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( 30008a68: e3a01001 mov r1, #1 ; 0x1 30008a6c: e59f209c ldr r2, [pc, #156] ; 30008b10 30008a70: e59f309c ldr r3, [pc, #156] ; 30008b14 30008a74: e1a00007 mov r0, r7 30008a78: e58d7000 str r7, [sp] 30008a7c: eb0009f5 bl 3000b258 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; 30008a80: e59f5090 ldr r5, [pc, #144] ; 30008b18 30008a84: e286c030 add ip, r6, #48 ; 0x30 30008a88: e1a04005 mov r4, r5 * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_node( 30008a8c: e5860018 str r0, [r6, #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; 30008a90: e8b4000f ldm r4!, {r0, r1, r2, r3} 30008a94: e8ac000f stmia ip!, {r0, r1, r2, r3} 30008a98: e8b4000f ldm r4!, {r0, r1, r2, r3} 30008a9c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30008aa0: 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; 30008aa4: e586a020 str sl, [r6, #32] temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 30008aa8: e88c000f stm ip, {r0, r1, r2, r3} "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 30008aac: e586801c str r8, [r6, #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 ) ); 30008ab0: e3a00001 mov r0, #1 ; 0x1 30008ab4: e3a0100c mov r1, #12 ; 0xc 30008ab8: eb0000fb bl 30008eac if ( !fs_info ){ 30008abc: e3500000 cmp r0, #0 ; 0x0 30008ac0: 0a000009 beq 30008aec 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; 30008ac4: e5962018 ldr r2, [r6, #24] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 30008ac8: e3a03001 mov r3, #1 ; 0x1 30008acc: e5803000 str r3, [r0] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 30008ad0: e5808008 str r8, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 30008ad4: e5809004 str r9, [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; 30008ad8: e586002c str r0, [r6, #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; 30008adc: e5823038 str r3, [r2, #56] 30008ae0: e1a00007 mov r0, r7 return 0; } 30008ae4: e28dd004 add sp, sp, #4 ; 0x4 30008ae8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ){ free(temp_mt_entry->mt_fs_root.node_access); 30008aec: e5960018 ldr r0, [r6, #24] <== NOT EXECUTED 30008af0: eb00012c bl 30008fa8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30008af4: eb000cfb bl 3000bee8 <__errno> <== NOT EXECUTED 30008af8: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 30008afc: e5803000 str r3, [r0] <== NOT EXECUTED 30008b00: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30008b04: eafffff6 b 30008ae4 <== NOT EXECUTED 30008b08: 3001605c .word 0x3001605c 30008b0c: 30016d58 .word 0x30016d58 30008b10: 30015b2c .word 0x30015b2c 30008b14: 000041ed .word 0x000041ed 30008b18: 300155b4 .word 0x300155b4 30003664 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30003664: e92d4030 push {r4, r5, lr} /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30003668: 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 */ ) { 3000366c: e24dd044 sub sp, sp, #68 ; 0x44 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30003670: e58d3028 str r3, [sp, #40] int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30003674: 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 ) 30003678: e1d313b4 ldrh r1, [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 */ ) { 3000367c: 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 ) 30003680: e3510007 cmp r1, #7 ; 0x7 30003684: 8a000019 bhi 300036f0 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 30003688: e28d4007 add r4, sp, #7 ; 0x7 3000368c: e1a01004 mov r1, r4 30003690: e28d2040 add r2, sp, #64 ; 0x40 30003694: ebffff6b bl 30003448 /* * Create a new link node. */ new_node = IMFS_create_node( 30003698: e28dc028 add ip, sp, #40 ; 0x28 3000369c: e1a00005 mov r0, r5 300036a0: e1a02004 mov r2, r4 300036a4: e3a01003 mov r1, #3 ; 0x3 300036a8: e59f3068 ldr r3, [pc, #104] ; 30003718 300036ac: e58dc000 str ip, [sp] 300036b0: eb006502 bl 3001cac0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 300036b4: e3500000 cmp r0, #0 ; 0x0 300036b8: 0a000011 beq 30003704 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 300036bc: e59d2028 ldr r2, [sp, #40] IMFS_update_ctime( info.hard_link.link_node ); 300036c0: e28d0038 add r0, sp, #56 ; 0x38 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 300036c4: e1d233b4 ldrh r3, [r2, #52] IMFS_update_ctime( info.hard_link.link_node ); 300036c8: e3a01000 mov r1, #0 ; 0x0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 300036cc: e2833001 add r3, r3, #1 ; 0x1 300036d0: e1c233b4 strh r3, [r2, #52] IMFS_update_ctime( info.hard_link.link_node ); 300036d4: eb000244 bl 30003fec 300036d8: e59d2038 ldr r2, [sp, #56] 300036dc: e59d3028 ldr r3, [sp, #40] 300036e0: e3a00000 mov r0, #0 ; 0x0 300036e4: e5832048 str r2, [r3, #72] return 0; } 300036e8: e28dd044 add sp, sp, #68 ; 0x44 300036ec: e8bd8030 pop {r4, r5, pc} * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 300036f0: eb00a8bd bl 3002d9ec <__errno> 300036f4: e3a0301f mov r3, #31 ; 0x1f 300036f8: e5803000 str r3, [r0] 300036fc: e3e00000 mvn r0, #0 ; 0x0 30003700: eafffff8 b 300036e8 ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 30003704: eb00a8b8 bl 3002d9ec <__errno> <== NOT EXECUTED 30003708: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3000370c: e5803000 str r3, [r0] <== NOT EXECUTED 30003710: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30003714: eafffff3 b 300036e8 <== NOT EXECUTED 30003718: 0000a1ff .word 0x0000a1ff 30024ea8 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 30024ea8: e2503000 subs r3, r0, #0 ; 0x0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 30024eac: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 30024eb0: 0a00000f beq 30024ef4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30024eb4: e593304c ldr r3, [r3, #76] 30024eb8: e3530005 cmp r3, #5 ; 0x5 30024ebc: 1a000011 bne 30024f08 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 ); 30024ec0: e3a02001 mov r2, #1 ; 0x1 30024ec4: ebfffe99 bl 30024930 if ( *block_entry_ptr ) 30024ec8: 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 ); 30024ecc: e1a04000 mov r4, r0 if ( *block_entry_ptr ) 30024ed0: e3550000 cmp r5, #0 ; 0x0 30024ed4: 13a00000 movne r0, #0 ; 0x0 30024ed8: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 30024edc: ebfffe86 bl 300248fc if ( !memory ) 30024ee0: e3500000 cmp r0, #0 ; 0x0 return 1; *block_entry_ptr = memory; 30024ee4: 15840000 strne r0, [r4] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 30024ee8: 03a00001 moveq r0, #1 ; 0x1 return 1; *block_entry_ptr = memory; 30024eec: 11a00005 movne r0, r5 return 0; } 30024ef0: e8bd8030 pop {r4, r5, pc} ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 30024ef4: e59f0020 ldr r0, [pc, #32] ; 30024f1c <== NOT EXECUTED 30024ef8: e59f1020 ldr r1, [pc, #32] ; 30024f20 <== NOT EXECUTED 30024efc: e59f2020 ldr r2, [pc, #32] ; 30024f24 <== NOT EXECUTED 30024f00: e59f3020 ldr r3, [pc, #32] ; 30024f28 <== NOT EXECUTED 30024f04: ebffe208 bl 3001d72c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30024f08: e59f000c ldr r0, [pc, #12] ; 30024f1c <== NOT EXECUTED 30024f0c: e59f1018 ldr r1, [pc, #24] ; 30024f2c <== NOT EXECUTED 30024f10: e59f200c ldr r2, [pc, #12] ; 30024f24 <== NOT EXECUTED 30024f14: e59f3014 ldr r3, [pc, #20] ; 30024f30 <== NOT EXECUTED 30024f18: ebffe203 bl 3001d72c <__assert_func> <== NOT EXECUTED 30024f1c: 30043450 .word 0x30043450 30024f20: 00000169 .word 0x00000169 30024f24: 3003fe70 .word 0x3003fe70 30024f28: 3004349c .word 0x3004349c 30024f2c: 0000016d .word 0x0000016d 30024f30: 300434a8 .word 0x300434a8 30024f34 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 30024f34: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30024f38: e2505000 subs r5, r0, #0 ; 0x0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 30024f3c: e1a08001 mov r8, r1 /* * Perform internal consistency checks */ assert( the_jnode ); 30024f40: 0a000037 beq 30025024 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30024f44: e595304c ldr r3, [r5, #76] 30024f48: e3530005 cmp r3, #5 ; 0x5 30024f4c: 1a000039 bne 30025038 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 30024f50: e59f20f4 ldr r2, [pc, #244] ; 3002504c 30024f54: e5924000 ldr r4, [r2] 30024f58: e1a03124 lsr r3, r4, #2 30024f5c: e0213393 mla r1, r3, r3, r3 30024f60: e0223391 mla r2, r1, r3, r3 30024f64: e2422001 sub r2, r2, #1 ; 0x1 30024f68: e0030294 mul r3, r4, r2 30024f6c: e1580003 cmp r8, r3 30024f70: 2a000026 bcs 30025010 rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 30024f74: e5956050 ldr r6, [r5, #80] 30024f78: e1580006 cmp r8, r6 30024f7c: d3a00000 movle r0, #0 ; 0x0 30024f80: 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; 30024f84: e1a01004 mov r1, r4 30024f88: e1a00008 mov r0, r8 30024f8c: eb00635c bl 3003dd04 <__aeabi_idiv> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30024f90: e1a01004 mov r1, r4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 30024f94: e1a07000 mov r7, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30024f98: e1a00006 mov r0, r6 30024f9c: eb006358 bl 3003dd04 <__aeabi_idiv> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 30024fa0: e1570000 cmp r7, r0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30024fa4: e1a06000 mov r6, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 30024fa8: 3a000015 bcc 30025004 30024fac: e1a04000 mov r4, r0 30024fb0: ea000002 b 30024fc0 30024fb4: e2844001 add r4, r4, #1 ; 0x1 30024fb8: e1570004 cmp r7, r4 30024fbc: 3a000010 bcc 30025004 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 30024fc0: e1a00005 mov r0, r5 30024fc4: e1a01004 mov r1, r4 30024fc8: ebffffb6 bl 30024ea8 30024fcc: e3500000 cmp r0, #0 ; 0x0 30024fd0: 0afffff7 beq 30024fb4 30024fd4: ea000003 b 30024fe8 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 30024fd8: e1a01004 mov r1, r4 <== NOT EXECUTED 30024fdc: e1a00005 mov r0, r5 <== 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-- ) { 30024fe0: e2444001 sub r4, r4, #1 ; 0x1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 30024fe4: ebfffeeb bl 30024b98 <== 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-- ) { 30024fe8: e1560004 cmp r6, r4 <== NOT EXECUTED 30024fec: 9afffff9 bls 30024fd8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 30024ff0: eb00227d bl 3002d9ec <__errno> <== NOT EXECUTED 30024ff4: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 30024ff8: e5803000 str r3, [r0] <== NOT EXECUTED 30024ffc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30025000: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 30025004: e5858050 str r8, [r5, #80] 30025008: e3a00000 mov r0, #0 ; 0x0 return 0; } 3002500c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 30025010: eb002275 bl 3002d9ec <__errno> <== NOT EXECUTED 30025014: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30025018: e5803000 str r3, [r0] <== NOT EXECUTED 3002501c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30025020: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 30025024: e59f0024 ldr r0, [pc, #36] ; 30025050 <== NOT EXECUTED 30025028: e59f1024 ldr r1, [pc, #36] ; 30025054 <== NOT EXECUTED 3002502c: e59f2024 ldr r2, [pc, #36] ; 30025058 <== NOT EXECUTED 30025030: e59f3024 ldr r3, [pc, #36] ; 3002505c <== NOT EXECUTED 30025034: ebffe1bc bl 3001d72c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30025038: e59f0010 ldr r0, [pc, #16] ; 30025050 <== NOT EXECUTED 3002503c: e59f101c ldr r1, [pc, #28] ; 30025060 <== NOT EXECUTED 30025040: e59f2010 ldr r2, [pc, #16] ; 30025058 <== NOT EXECUTED 30025044: e59f3018 ldr r3, [pc, #24] ; 30025064 <== NOT EXECUTED 30025048: ebffe1b7 bl 3001d72c <__assert_func> <== NOT EXECUTED 3002504c: 30047460 .word 0x30047460 30025050: 30043450 .word 0x30043450 30025054: 00000131 .word 0x00000131 30025058: 3003fe88 .word 0x3003fe88 3002505c: 3004349c .word 0x3004349c 30025060: 00000135 .word 0x00000135 30025064: 300434a8 .word 0x300434a8 30024930 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 30024930: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30024934: e2506000 subs r6, r0, #0 ; 0x0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 30024938: e1a04001 mov r4, r1 3002493c: e1a07002 mov r7, r2 /* * Perform internal consistency checks */ assert( the_jnode ); 30024940: 0a00002a beq 300249f0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 30024944: e596304c ldr r3, [r6, #76] 30024948: e3530005 cmp r3, #5 ; 0x5 3002494c: 1a00002c bne 30024a04 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 30024950: e59f3224 ldr r3, [pc, #548] ; 30024b7c 30024954: e5932000 ldr r2, [r3] 30024958: e1a05122 lsr r5, r2, #2 3002495c: e2453001 sub r3, r5, #1 ; 0x1 30024960: e1510003 cmp r1, r3 30024964: 9a000019 bls 300249d0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 30024968: e0215595 mla r1, r5, r5, r5 <== NOT EXECUTED 3002496c: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED 30024970: e1540003 cmp r4, r3 <== NOT EXECUTED 30024974: 8a00002b bhi 30024a28 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 30024978: e0654004 rsb r4, r5, r4 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3002497c: e1a00004 mov r0, r4 <== NOT EXECUTED 30024980: e1a01005 mov r1, r5 <== NOT EXECUTED 30024984: eb00652e bl 3003de44 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30024988: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3002498c: e1a08000 mov r8, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30024990: e1a00004 mov r0, r4 <== NOT EXECUTED 30024994: eb006496 bl 3003dbf4 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 30024998: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3002499c: e1a04000 mov r4, r0 <== NOT EXECUTED p = info->doubly_indirect; 300249a0: e5960058 ldr r0, [r6, #88] <== NOT EXECUTED if ( malloc_it ) { 300249a4: 0a000045 beq 30024ac0 <== NOT EXECUTED if ( !p ) { 300249a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300249ac: 0a000050 beq 30024af4 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 300249b0: e7901104 ldr r1, [r0, r4, lsl #2] <== NOT EXECUTED 300249b4: e1a03104 lsl r3, r4, #2 <== NOT EXECUTED if ( !p1 ) { 300249b8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 300249bc: e0804003 add r4, r0, r3 <== NOT EXECUTED if ( !p1 ) { 300249c0: 0a000050 beq 30024b08 <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 300249c4: e1a03108 lsl r3, r8, #2 <== NOT EXECUTED 300249c8: e0810003 add r0, r1, r3 <== NOT EXECUTED 300249cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 300249d0: e3570000 cmp r7, #0 ; 0x0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 300249d4: e5960054 ldr r0, [r6, #84] if ( malloc_it ) { 300249d8: 0a00000e beq 30024a18 if ( !p ) { 300249dc: e3500000 cmp r0, #0 ; 0x0 300249e0: 0a00003e beq 30024ae0 } if ( !p ) return 0; return &info->indirect[ my_block ]; 300249e4: e1a03104 lsl r3, r4, #2 300249e8: e0800003 add r0, r0, r3 300249ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Perform internal consistency checks */ assert( the_jnode ); 300249f0: e59f0188 ldr r0, [pc, #392] ; 30024b80 <== NOT EXECUTED 300249f4: e59f1188 ldr r1, [pc, #392] ; 30024b84 <== NOT EXECUTED 300249f8: e59f2188 ldr r2, [pc, #392] ; 30024b88 <== NOT EXECUTED 300249fc: e59f3188 ldr r3, [pc, #392] ; 30024b8c <== NOT EXECUTED 30024a00: ebffe349 bl 3001d72c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 30024a04: e59f0174 ldr r0, [pc, #372] ; 30024b80 <== NOT EXECUTED 30024a08: e59f1180 ldr r1, [pc, #384] ; 30024b90 <== NOT EXECUTED 30024a0c: e59f2174 ldr r2, [pc, #372] ; 30024b88 <== NOT EXECUTED 30024a10: e59f317c ldr r3, [pc, #380] ; 30024b94 <== NOT EXECUTED 30024a14: ebffe344 bl 3001d72c <__assert_func> <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 30024a18: e3500000 cmp r0, #0 ; 0x0 30024a1c: 1afffff0 bne 300249e4 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 30024a20: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 30024a24: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 30024a28: e0235591 mla r3, r1, r5, r5 <== NOT EXECUTED 30024a2c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30024a30: e1540003 cmp r4, r3 <== NOT EXECUTED 30024a34: 8afffff9 bhi 30024a20 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 30024a38: e0614004 rsb r4, r1, r4 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30024a3c: e1a00004 mov r0, r4 <== NOT EXECUTED 30024a40: e1a01005 mov r1, r5 <== NOT EXECUTED 30024a44: eb0064fe bl 3003de44 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30024a48: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30024a4c: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30024a50: e1a00004 mov r0, r4 <== NOT EXECUTED 30024a54: eb006466 bl 3003dbf4 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 30024a58: 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; 30024a5c: e1a04000 mov r4, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 30024a60: eb006463 bl 3003dbf4 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 30024a64: 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; 30024a68: e1a08000 mov r8, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 30024a6c: e1a00004 mov r0, r4 <== NOT EXECUTED 30024a70: eb0064f3 bl 3003de44 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 30024a74: e3570000 cmp r7, #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; 30024a78: e1a04000 mov r4, r0 <== NOT EXECUTED p = info->triply_indirect; 30024a7c: e596005c ldr r0, [r6, #92] <== NOT EXECUTED if ( malloc_it ) { 30024a80: 0a000025 beq 30024b1c <== NOT EXECUTED if ( !p ) { 30024a84: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30024a88: 0a00002c beq 30024b40 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 30024a8c: e790c108 ldr ip, [r0, r8, lsl #2] <== NOT EXECUTED 30024a90: e1a03108 lsl r3, r8, #2 <== NOT EXECUTED if ( !p1 ) { 30024a94: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 30024a98: e0805003 add r5, r0, r3 <== NOT EXECUTED if ( !p1 ) { 30024a9c: 0a000031 beq 30024b68 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 30024aa0: e79c0104 ldr r0, [ip, r4, lsl #2] <== NOT EXECUTED 30024aa4: e1a03104 lsl r3, r4, #2 <== NOT EXECUTED if ( !p2 ) { 30024aa8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 30024aac: e08c4003 add r4, ip, r3 <== NOT EXECUTED if ( !p2 ) { 30024ab0: 0a000027 beq 30024b54 <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 30024ab4: e1a0310a lsl r3, sl, #2 <== NOT EXECUTED 30024ab8: e0800003 add r0, r0, r3 <== NOT EXECUTED 30024abc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 30024ac0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30024ac4: 0affffd5 beq 30024a20 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 30024ac8: e7900104 ldr r0, [r0, r4, lsl #2] <== NOT EXECUTED if ( !p ) 30024acc: 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 ]; 30024ad0: 11a03108 lslne r3, r8, #2 <== NOT EXECUTED 30024ad4: 10800003 addne r0, r0, r3 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 30024ad8: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 30024adc: eaffffcf b 30024a20 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 30024ae0: ebffff85 bl 300248fc if ( !p ) 30024ae4: e3500000 cmp r0, #0 ; 0x0 return 0; info->indirect = p; 30024ae8: 15860054 strne r0, [r6, #84] if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 30024aec: 1affffbc bne 300249e4 30024af0: eaffffca b 30024a20 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 30024af4: ebffff80 bl 300248fc <== NOT EXECUTED if ( !p ) 30024af8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30024afc: 0affffc7 beq 30024a20 <== NOT EXECUTED return 0; info->doubly_indirect = p; 30024b00: e5860058 str r0, [r6, #88] <== NOT EXECUTED 30024b04: eaffffa9 b 300249b0 <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 30024b08: ebffff7b bl 300248fc <== NOT EXECUTED if ( !p1 ) 30024b0c: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 30024b10: 0affffc2 beq 30024a20 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 30024b14: e5841000 str r1, [r4] <== NOT EXECUTED 30024b18: eaffffa9 b 300249c4 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 30024b1c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30024b20: 0affffbe beq 30024a20 <== 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 ]; 30024b24: e7900108 ldr r0, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p1 ) 30024b28: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 30024b2c: 17902104 ldrne r2, [r0, r4, lsl #2] <== NOT EXECUTED 30024b30: 11a0310a lslne r3, sl, #2 <== NOT EXECUTED 30024b34: 10820003 addne r0, r2, r3 <== 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 ) 30024b38: 0affffb8 beq 30024a20 <== NOT EXECUTED 30024b3c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 30024b40: ebffff6d bl 300248fc <== NOT EXECUTED if ( !p ) 30024b44: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30024b48: 0affffb4 beq 30024a20 <== NOT EXECUTED return 0; info->triply_indirect = p; 30024b4c: e586005c str r0, [r6, #92] <== NOT EXECUTED 30024b50: eaffffcd b 30024a8c <== NOT EXECUTED p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 30024b54: ebffff68 bl 300248fc <== NOT EXECUTED if ( !p2 ) 30024b58: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30024b5c: 0affffaf beq 30024a20 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 30024b60: e5840000 str r0, [r4] <== NOT EXECUTED 30024b64: eaffffd2 b 30024ab4 <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 30024b68: ebffff63 bl 300248fc <== NOT EXECUTED if ( !p1 ) 30024b6c: e250c000 subs ip, r0, #0 ; 0x0 <== NOT EXECUTED 30024b70: 0affffaa beq 30024a20 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 30024b74: e585c000 str ip, [r5] <== NOT EXECUTED 30024b78: eaffffc8 b 30024aa0 <== NOT EXECUTED 30024b7c: 30047460 .word 0x30047460 30024b80: 30043450 .word 0x30043450 30024b84: 00000386 .word 0x00000386 30024b88: 3003fdf4 .word 0x3003fdf4 30024b8c: 3004349c .word 0x3004349c 30024b90: 0000038a .word 0x0000038a 30024b94: 300434a8 .word 0x300434a8 30025420 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 30025420: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30025424: e250a000 subs sl, r0, #0 ; 0x0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 30025428: e24dd008 sub sp, sp, #8 ; 0x8 3002542c: e1a05001 mov r5, r1 30025430: e1a06002 mov r6, r2 30025434: e1a00003 mov r0, r3 /* * Perform internal consistency checks */ assert( the_jnode ); 30025438: 0a00006b beq 300255ec if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 3002543c: e59a104c ldr r1, [sl, #76] 30025440: e2413005 sub r3, r1, #5 ; 0x5 30025444: e3530001 cmp r3, #1 ; 0x1 30025448: 8a000071 bhi 30025614 /* * Error checks on arguments */ assert( dest ); 3002544c: e3520000 cmp r2, #0 ; 0x0 30025450: 0a00006a beq 30025600 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 30025454: e3500000 cmp r0, #0 ; 0x0 30025458: 0a00005e beq 300255d8 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 3002545c: e3510006 cmp r1, #6 ; 0x6 30025460: 0a00004d beq 3002559c /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30025464: e59f91e4 ldr r9, [pc, #484] ; 30025650 * 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 ) 30025468: e59a2050 ldr r2, [sl, #80] 3002546c: e0803005 add r3, r0, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30025470: e5994000 ldr r4, [r9] * 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 ) 30025474: e1530002 cmp r3, r2 30025478: 91a08000 movls r8, r0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3002547c: e1a01004 mov r1, r4 30025480: e1a00005 mov r0, r5 * 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; 30025484: 80658002 rsbhi r8, r5, r2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30025488: eb0062a0 bl 3003df10 <__modsi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3002548c: e1a01004 mov r1, r4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30025490: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30025494: e1a00005 mov r0, r5 30025498: eb006219 bl 3003dd04 <__aeabi_idiv> if ( start_offset ) { 3002549c: e3570000 cmp r7, #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; 300254a0: e1a05000 mov r5, r0 if ( start_offset ) { 300254a4: 1a000029 bne 30025550 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 300254a8: e5994000 ldr r4, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300254ac: e1580004 cmp r8, r4 300254b0: 3a000010 bcc 300254f8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 300254b4: e1a0000a mov r0, sl 300254b8: e1a01005 mov r1, r5 300254bc: e3a02000 mov r2, #0 ; 0x0 300254c0: ebfffd1a bl 30024930 assert( block_ptr ); 300254c4: e3500000 cmp r0, #0 ; 0x0 300254c8: 0a00003d beq 300255c4 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 300254cc: e5901000 ldr r1, [r0] 300254d0: e1a02004 mov r2, r4 300254d4: e1a00006 mov r0, r6 300254d8: eb002abb bl 3002ffcc /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300254dc: e5993000 ldr r3, [r9] if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 300254e0: e0648008 rsb r8, r4, r8 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300254e4: e1530008 cmp r3, r8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 300254e8: e0866004 add r6, r6, r4 block++; 300254ec: e2855001 add r5, r5, #1 ; 0x1 my_length -= to_copy; copied += to_copy; 300254f0: e0877004 add r7, r7, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300254f4: 9affffee bls 300254b4 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 300254f8: e3580000 cmp r8, #0 ; 0x0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300254fc: e1a04007 mov r4, r7 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 30025500: 0a00000a beq 30025530 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30025504: e1a01005 mov r1, r5 30025508: e1a0000a mov r0, sl 3002550c: e3a02000 mov r2, #0 ; 0x0 30025510: ebfffd06 bl 30024930 assert( block_ptr ); 30025514: e2501000 subs r1, r0, #0 ; 0x0 30025518: 0a000047 beq 3002563c if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 3002551c: e1a00006 mov r0, r6 30025520: e5911000 ldr r1, [r1] 30025524: e1a02008 mov r2, r8 30025528: eb002aa7 bl 3002ffcc copied += my_length; 3002552c: e0884007 add r4, r8, r7 } IMFS_update_atime( the_jnode ); 30025530: e1a0000d mov r0, sp 30025534: e3a01000 mov r1, #0 ; 0x0 30025538: ebff7aab bl 30003fec 3002553c: e59d3000 ldr r3, [sp] return copied; 30025540: e1a00004 mov r0, r4 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 30025544: e58a3040 str r3, [sl, #64] return copied; } 30025548: e28dd008 add sp, sp, #8 ; 0x8 3002554c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30025550: e1a0000a mov r0, sl 30025554: e1a01005 mov r1, r5 30025558: e3a02000 mov r2, #0 ; 0x0 3002555c: ebfffcf3 bl 30024930 assert( block_ptr ); 30025560: e3500000 cmp r0, #0 ; 0x0 30025564: 0a00002f beq 30025628 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 30025568: 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; 3002556c: e0674004 rsb r4, r7, r4 30025570: e1580004 cmp r8, r4 30025574: 31a04008 movcc r4, r8 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 ); 30025578: e0811007 add r1, r1, r7 3002557c: e1a00006 mov r0, r6 30025580: e1a02004 mov r2, r4 30025584: eb002a90 bl 3002ffcc dest += to_copy; 30025588: e0866004 add r6, r6, r4 block++; 3002558c: e2855001 add r5, r5, #1 ; 0x1 my_length -= to_copy; 30025590: e0648008 rsb r8, r4, r8 30025594: e1a07004 mov r7, r4 30025598: eaffffc2 b 300254a8 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)) 3002559c: e59a4050 ldr r4, [sl, #80] <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 300255a0: 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)) 300255a4: e0654004 rsb r4, r5, r4 <== NOT EXECUTED 300255a8: e1540000 cmp r4, r0 <== NOT EXECUTED 300255ac: 21a04000 movcs r4, r0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 300255b0: e0811005 add r1, r1, r5 <== NOT EXECUTED 300255b4: e1a00002 mov r0, r2 <== NOT EXECUTED 300255b8: e1a02004 mov r2, r4 <== NOT EXECUTED 300255bc: eb002a82 bl 3002ffcc <== NOT EXECUTED 300255c0: eaffffda b 30025530 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 300255c4: e59f0088 ldr r0, [pc, #136] ; 30025654 <== NOT EXECUTED 300255c8: e59f1088 ldr r1, [pc, #136] ; 30025658 <== NOT EXECUTED 300255cc: e59f2088 ldr r2, [pc, #136] ; 3002565c <== NOT EXECUTED 300255d0: e59f3088 ldr r3, [pc, #136] ; 30025660 <== NOT EXECUTED 300255d4: ebffe054 bl 3001d72c <__assert_func> <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 300255d8: eb002103 bl 3002d9ec <__errno> <== NOT EXECUTED 300255dc: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300255e0: e5803000 str r3, [r0] <== NOT EXECUTED 300255e4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300255e8: eaffffd6 b 30025548 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 300255ec: e59f0060 ldr r0, [pc, #96] ; 30025654 <== NOT EXECUTED 300255f0: e59f106c ldr r1, [pc, #108] ; 30025664 <== NOT EXECUTED 300255f4: e59f2060 ldr r2, [pc, #96] ; 3002565c <== NOT EXECUTED 300255f8: e59f3068 ldr r3, [pc, #104] ; 30025668 <== NOT EXECUTED 300255fc: ebffe04a bl 3001d72c <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 30025600: e59f004c ldr r0, [pc, #76] ; 30025654 <== NOT EXECUTED 30025604: e3a01f96 mov r1, #600 ; 0x258 <== NOT EXECUTED 30025608: e59f204c ldr r2, [pc, #76] ; 3002565c <== NOT EXECUTED 3002560c: e59f3058 ldr r3, [pc, #88] ; 3002566c <== NOT EXECUTED 30025610: ebffe045 bl 3001d72c <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 30025614: e59f0038 ldr r0, [pc, #56] ; 30025654 <== NOT EXECUTED 30025618: e59f1050 ldr r1, [pc, #80] ; 30025670 <== NOT EXECUTED 3002561c: e59f2038 ldr r2, [pc, #56] ; 3002565c <== NOT EXECUTED 30025620: e59f304c ldr r3, [pc, #76] ; 30025674 <== NOT EXECUTED 30025624: ebffe040 bl 3001d72c <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 30025628: e59f0024 ldr r0, [pc, #36] ; 30025654 <== NOT EXECUTED 3002562c: e3a01fa5 mov r1, #660 ; 0x294 <== NOT EXECUTED 30025630: e59f2024 ldr r2, [pc, #36] ; 3002565c <== NOT EXECUTED 30025634: e59f3024 ldr r3, [pc, #36] ; 30025660 <== NOT EXECUTED 30025638: ebffe03b bl 3001d72c <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 3002563c: e59f0010 ldr r0, [pc, #16] ; 30025654 <== NOT EXECUTED 30025640: e59f1030 ldr r1, [pc, #48] ; 30025678 <== NOT EXECUTED 30025644: e59f2010 ldr r2, [pc, #16] ; 3002565c <== NOT EXECUTED 30025648: e59f3010 ldr r3, [pc, #16] ; 30025660 <== NOT EXECUTED 3002564c: ebffe036 bl 3001d72c <__assert_func> <== NOT EXECUTED 30025650: 30047460 .word 0x30047460 30025654: 30043450 .word 0x30043450 30025658: 000002a5 .word 0x000002a5 3002565c: 3003fe28 .word 0x3003fe28 30025660: 300434e0 .word 0x300434e0 30025664: 0000024a .word 0x0000024a 30025668: 3004349c .word 0x3004349c 3002566c: 30043538 .word 0x30043538 30025670: 0000024f .word 0x0000024f 30025674: 300434ec .word 0x300434ec 30025678: 000002b7 .word 0x000002b7 30024c48 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 30024c48: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30024c4c: e250a000 subs sl, r0, #0 ; 0x0 30024c50: 0a00004f beq 30024d94 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30024c54: e59a304c ldr r3, [sl, #76] 30024c58: e3530005 cmp r3, #5 ; 0x5 30024c5c: 1a000051 bne 30024da8 /* * 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; 30024c60: e59f7154 ldr r7, [pc, #340] ; 30024dbc * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 30024c64: e59a3054 ldr r3, [sl, #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; 30024c68: e5972000 ldr r2, [r7] * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 30024c6c: 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; 30024c70: e1a08122 lsr r8, r2, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 30024c74: 128a0054 addne r0, sl, #84 ; 0x54 30024c78: 11a01008 movne r1, r8 30024c7c: 1bffffcf blne 30024bc0 } if ( info->doubly_indirect ) { 30024c80: e59a0058 ldr r0, [sl, #88] 30024c84: e3500000 cmp r0, #0 ; 0x0 30024c88: 0a000014 beq 30024ce0 for ( i=0 ; i <== NOT EXECUTED 30024c98: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 30024c9c: e1a02004 mov r2, r4 <== NOT EXECUTED 30024ca0: ea000000 b 30024ca8 <== NOT EXECUTED 30024ca4: e59a0058 ldr r0, [sl, #88] <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 30024ca8: e7903102 ldr r3, [r0, r2, lsl #2] <== NOT EXECUTED 30024cac: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED 30024cb0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED memfile_free_blocks_in_table( 30024cb4: 10800002 addne r0, r0, r2 <== NOT EXECUTED 30024cb8: 11a01008 movne r1, r8 <== NOT EXECUTED 30024cbc: 1bffffbf blne 30024bc0 <== 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 ); 30024cd4: e28a0058 add r0, sl, #88 ; 0x58 <== NOT EXECUTED 30024cd8: e1a01008 mov r1, r8 <== NOT EXECUTED 30024cdc: ebffffb7 bl 30024bc0 <== NOT EXECUTED } if ( info->triply_indirect ) { 30024ce0: e59a005c ldr r0, [sl, #92] 30024ce4: e3500000 cmp r0, #0 ; 0x0 30024ce8: 0a000027 beq 30024d8c for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 30024cf8: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30024cfc: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30024d00: 13a06000 movne r6, #0 ; 0x0 <== NOT EXECUTED 30024d04: 11a09006 movne r9, r6 <== NOT EXECUTED 30024d08: 0a00001c beq 30024d80 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 30024d18: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 30024d1c: e1a02004 mov r2, r4 <== NOT EXECUTED if ( p[j] ) { 30024d20: e7953102 ldr r3, [r5, r2, lsl #2] <== NOT EXECUTED 30024d24: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED 30024d28: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 30024d2c: 10850002 addne r0, r5, r2 <== NOT EXECUTED 30024d30: 11a01008 movne r1, r8 <== NOT EXECUTED 30024d34: 1bffffa1 blne 30024bc0 <== 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 30024d4c: e59a005c ldr r0, [sl, #92] <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 30024d50: e0800009 add r0, r0, r9 <== NOT EXECUTED 30024d54: e1a01008 mov r1, r8 <== NOT EXECUTED 30024d58: ebffff98 bl 30024bc0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 30024d6c: e59a005c ldr r0, [sl, #92] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30024d70: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 30024d74: e7905106 ldr r5, [r0, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30024d78: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30024d7c: 1affffe2 bne 30024d0c <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 30024d80: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED 30024d84: e1a01008 mov r1, r8 <== NOT EXECUTED 30024d88: ebffff8c bl 30024bc0 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 30024d8c: e3a00000 mov r0, #0 ; 0x0 30024d90: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Perform internal consistency checks */ assert( the_jnode ); 30024d94: e59f0024 ldr r0, [pc, #36] ; 30024dc0 <== NOT EXECUTED 30024d98: e3a01f7b mov r1, #492 ; 0x1ec <== NOT EXECUTED 30024d9c: e59f2020 ldr r2, [pc, #32] ; 30024dc4 <== NOT EXECUTED 30024da0: e59f3020 ldr r3, [pc, #32] ; 30024dc8 <== NOT EXECUTED 30024da4: ebffe260 bl 3001d72c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30024da8: e59f0010 ldr r0, [pc, #16] ; 30024dc0 <== NOT EXECUTED 30024dac: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED 30024db0: e59f200c ldr r2, [pc, #12] ; 30024dc4 <== NOT EXECUTED 30024db4: e59f3010 ldr r3, [pc, #16] ; 30024dcc <== NOT EXECUTED 30024db8: ebffe25b bl 3001d72c <__assert_func> <== NOT EXECUTED 30024dbc: 30047460 .word 0x30047460 30024dc0: 30043450 .word 0x30043450 30024dc4: 3003fe3c .word 0x3003fe3c 30024dc8: 3004349c .word 0x3004349c 30024dcc: 300434a8 .word 0x300434a8 30024b98 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 30024b98: 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 ); 30024b9c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30024ba0: ebffff62 bl 30024930 <== NOT EXECUTED ptr = *block_entry_ptr; 30024ba4: e5902000 ldr r2, [r0] <== NOT EXECUTED *block_entry_ptr = 0; 30024ba8: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30024bac: e5803000 str r3, [r0] <== NOT EXECUTED memfile_free_block( ptr ); 30024bb0: e1a00002 mov r0, r2 <== NOT EXECUTED 30024bb4: ebffff48 bl 300248dc <== NOT EXECUTED return 1; } 30024bb8: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30024bbc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3002511c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3002511c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30025120: e250a000 subs sl, r0, #0 ; 0x0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30025124: e24dd008 sub sp, sp, #8 ; 0x8 30025128: e1a05001 mov r5, r1 3002512c: e1a07002 mov r7, r2 30025130: e1a0b003 mov fp, r3 /* * Perform internal consistency checks */ assert( the_jnode ); 30025134: 0a00006b beq 300252e8 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30025138: e59a304c ldr r3, [sl, #76] 3002513c: e3530005 cmp r3, #5 ; 0x5 30025140: 1a000063 bne 300252d4 /* * Error check arguments */ assert( source ); 30025144: e3520000 cmp r2, #0 ; 0x0 30025148: 0a00006b beq 300252fc /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 3002514c: e35b0000 cmp fp, #0 ; 0x0 30025150: 0a00005a beq 300252c0 * 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 ) { 30025154: e59a3050 ldr r3, [sl, #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; 30025158: e08b1001 add r1, fp, r1 if ( last_byte > the_jnode->info.file.size ) { 3002515c: e1510003 cmp r1, r3 30025160: 8a000049 bhi 3002528c /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30025164: e59f91cc ldr r9, [pc, #460] ; 30025338 30025168: e1a00005 mov r0, r5 3002516c: e5994000 ldr r4, [r9] 30025170: e1a01004 mov r1, r4 30025174: eb006365 bl 3003df10 <__modsi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30025178: e1a01004 mov r1, r4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3002517c: e1a08000 mov r8, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30025180: e1a00005 mov r0, r5 30025184: eb0062de bl 3003dd04 <__aeabi_idiv> if ( start_offset ) { 30025188: e3580000 cmp r8, #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; 3002518c: e1a06000 mov r6, r0 if ( start_offset ) { 30025190: 01a0500b moveq r5, fp 30025194: 1a000029 bne 30025240 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 30025198: e5994000 ldr r4, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 3002519c: e1550004 cmp r5, r4 300251a0: 3a000010 bcc 300251e8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 300251a4: e1a0000a mov r0, sl 300251a8: e1a01006 mov r1, r6 300251ac: e3a02000 mov r2, #0 ; 0x0 300251b0: ebfffdde bl 30024930 assert( block_ptr ); 300251b4: e3500000 cmp r0, #0 ; 0x0 300251b8: 0a00003b beq 300252ac 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 ); 300251bc: e1a01007 mov r1, r7 300251c0: e5900000 ldr r0, [r0] 300251c4: e1a02004 mov r2, r4 300251c8: eb002b7f bl 3002ffcc /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300251cc: e5993000 ldr r3, [r9] fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 300251d0: e0645005 rsb r5, r4, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300251d4: e1530005 cmp r3, r5 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; 300251d8: e0877004 add r7, r7, r4 block++; 300251dc: e2866001 add r6, r6, #1 ; 0x1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 300251e0: e0888004 add r8, r8, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300251e4: 9affffee bls 300251a4 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 300251e8: e3550000 cmp r5, #0 ; 0x0 300251ec: 0a00000a beq 3002521c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 300251f0: e1a01006 mov r1, r6 300251f4: e1a0000a mov r0, sl 300251f8: e3a02000 mov r2, #0 ; 0x0 300251fc: ebfffdcb bl 30024930 assert( block_ptr ); 30025200: e3500000 cmp r0, #0 ; 0x0 30025204: 0a000046 beq 30025324 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 ); 30025208: e5900000 ldr r0, [r0] 3002520c: e1a01007 mov r1, r7 30025210: e1a02005 mov r2, r5 30025214: eb002b6c bl 3002ffcc my_length = 0; copied += to_copy; 30025218: e0888005 add r8, r8, r5 } IMFS_atime_mtime_update( the_jnode ); 3002521c: e1a0000d mov r0, sp 30025220: e3a01000 mov r1, #0 ; 0x0 30025224: ebff7b70 bl 30003fec 30025228: e59d3000 ldr r3, [sp] 3002522c: e58a3040 str r3, [sl, #64] 30025230: e58a3044 str r3, [sl, #68] return copied; } 30025234: e1a00008 mov r0, r8 30025238: e28dd008 add sp, sp, #8 ; 0x8 3002523c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30025240: e1a0000a mov r0, sl 30025244: e1a01006 mov r1, r6 30025248: e3a02000 mov r2, #0 ; 0x0 3002524c: ebfffdb7 bl 30024930 assert( block_ptr ); 30025250: e3500000 cmp r0, #0 ; 0x0 30025254: 0a00002d beq 30025310 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 ); 30025258: 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; 3002525c: e0684004 rsb r4, r8, r4 30025260: e154000b cmp r4, fp 30025264: 21a0400b movcs r4, fp 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 ); 30025268: e0800008 add r0, r0, r8 3002526c: e1a01007 mov r1, r7 30025270: e1a02004 mov r2, r4 30025274: eb002b54 bl 3002ffcc src += to_copy; 30025278: e0877004 add r7, r7, r4 block++; 3002527c: e2866001 add r6, r6, #1 ; 0x1 my_length -= to_copy; 30025280: e064500b rsb r5, r4, fp copied += to_copy; 30025284: e1a08004 mov r8, r4 30025288: eaffffc2 b 30025198 * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 3002528c: ebffff28 bl 30024f34 if ( status ) 30025290: e3500000 cmp r0, #0 ; 0x0 30025294: 0affffb2 beq 30025164 rtems_set_errno_and_return_minus_one( ENOSPC ); 30025298: eb0021d3 bl 3002d9ec <__errno> <== NOT EXECUTED 3002529c: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 300252a0: e5803000 str r3, [r0] <== NOT EXECUTED 300252a4: e3e08000 mvn r8, #0 ; 0x0 <== NOT EXECUTED 300252a8: eaffffe1 b 30025234 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 300252ac: e59f0088 ldr r0, [pc, #136] ; 3002533c <== NOT EXECUTED 300252b0: e59f1088 ldr r1, [pc, #136] ; 30025340 <== NOT EXECUTED 300252b4: e59f2088 ldr r2, [pc, #136] ; 30025344 <== NOT EXECUTED 300252b8: e59f3088 ldr r3, [pc, #136] ; 30025348 <== NOT EXECUTED 300252bc: ebffe11a bl 3001d72c <__assert_func> <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 300252c0: eb0021c9 bl 3002d9ec <__errno> <== NOT EXECUTED 300252c4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300252c8: e5803000 str r3, [r0] <== NOT EXECUTED 300252cc: e3e08000 mvn r8, #0 ; 0x0 <== NOT EXECUTED 300252d0: eaffffd7 b 30025234 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 300252d4: e59f0060 ldr r0, [pc, #96] ; 3002533c <== NOT EXECUTED 300252d8: e59f106c ldr r1, [pc, #108] ; 3002534c <== NOT EXECUTED 300252dc: e59f2060 ldr r2, [pc, #96] ; 30025344 <== NOT EXECUTED 300252e0: e59f3068 ldr r3, [pc, #104] ; 30025350 <== NOT EXECUTED 300252e4: ebffe110 bl 3001d72c <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 300252e8: e59f004c ldr r0, [pc, #76] ; 3002533c <== NOT EXECUTED 300252ec: e59f1060 ldr r1, [pc, #96] ; 30025354 <== NOT EXECUTED 300252f0: e59f204c ldr r2, [pc, #76] ; 30025344 <== NOT EXECUTED 300252f4: e59f305c ldr r3, [pc, #92] ; 30025358 <== NOT EXECUTED 300252f8: ebffe10b bl 3001d72c <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 300252fc: e59f0038 ldr r0, [pc, #56] ; 3002533c <== NOT EXECUTED 30025300: e59f1054 ldr r1, [pc, #84] ; 3002535c <== NOT EXECUTED 30025304: e59f2038 ldr r2, [pc, #56] ; 30025344 <== NOT EXECUTED 30025308: e59f3050 ldr r3, [pc, #80] ; 30025360 <== NOT EXECUTED 3002530c: ebffe106 bl 3001d72c <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 30025310: e59f0024 ldr r0, [pc, #36] ; 3002533c <== NOT EXECUTED 30025314: e59f1048 ldr r1, [pc, #72] ; 30025364 <== NOT EXECUTED 30025318: e59f2024 ldr r2, [pc, #36] ; 30025344 <== NOT EXECUTED 3002531c: e59f3024 ldr r3, [pc, #36] ; 30025348 <== NOT EXECUTED 30025320: ebffe101 bl 3001d72c <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 30025324: e59f0010 ldr r0, [pc, #16] ; 3002533c <== NOT EXECUTED 30025328: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED 3002532c: e59f2010 ldr r2, [pc, #16] ; 30025344 <== NOT EXECUTED 30025330: e59f3010 ldr r3, [pc, #16] ; 30025348 <== NOT EXECUTED 30025334: ebffe0fc bl 3001d72c <__assert_func> <== NOT EXECUTED 30025338: 30047460 .word 0x30047460 3002533c: 30043450 .word 0x30043450 30025340: 0000032e .word 0x0000032e 30025344: 3003fe14 .word 0x3003fe14 30025348: 300434e0 .word 0x300434e0 3002534c: 000002e5 .word 0x000002e5 30025350: 300434a8 .word 0x300434a8 30025354: 000002e1 .word 0x000002e1 30025358: 3004349c .word 0x3004349c 3002535c: 000002ed .word 0x000002ed 30025360: 300434d8 .word 0x300434d8 30025364: 0000031a .word 0x0000031a 30008b1c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 30008b1c: e92d40f0 push {r4, r5, r6, r7, lr} 30008b20: e24dd03c sub sp, sp, #60 ; 0x3c 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 ); 30008b24: e28d7007 add r7, sp, #7 ; 0x7 const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 30008b28: e1a05001 mov r5, r1 30008b2c: e1a06002 mov r6, 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 ); 30008b30: e1a01007 mov r1, r7 30008b34: 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 */ ) { 30008b38: 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 ); 30008b3c: ebffff76 bl 3000891c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 30008b40: e2053a0f and r3, r5, #61440 ; 0xf000 30008b44: e3530901 cmp r3, #16384 ; 0x4000 30008b48: 0a000013 beq 30008b9c type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 30008b4c: e3530902 cmp r3, #32768 ; 0x8000 30008b50: 03a01005 moveq r1, #5 ; 0x5 30008b54: 0a000005 beq 30008b70 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 30008b58: e3530a02 cmp r3, #8192 ; 0x2000 30008b5c: 13530a06 cmpne r3, #24576 ; 0x6000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 30008b60: 058d6028 streq r6, [sp, #40] 30008b64: 058d402c streq r4, [sp, #44] 30008b68: 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) ) { 30008b6c: 1a00000c bne 30008ba4 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 30008b70: e28dc028 add ip, sp, #40 ; 0x28 30008b74: e59d0050 ldr r0, [sp, #80] 30008b78: e1a02007 mov r2, r7 30008b7c: e1a03005 mov r3, r5 30008b80: e58dc000 str ip, [sp] 30008b84: eb0009b3 bl 3000b258 new_name, mode, &info ); if ( !new_node ) 30008b88: e3500000 cmp r0, #0 ; 0x0 30008b8c: 13a00000 movne r0, #0 ; 0x0 30008b90: 0a000008 beq 30008bb8 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 30008b94: e28dd03c add sp, sp, #60 ; 0x3c 30008b98: e8bd80f0 pop {r4, r5, r6, r7, pc} type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 30008b9c: e3a01001 mov r1, #1 ; 0x1 30008ba0: eafffff2 b 30008b70 30008ba4: eb000ccf bl 3000bee8 <__errno> <== NOT EXECUTED 30008ba8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30008bac: e5803000 str r3, [r0] <== NOT EXECUTED 30008bb0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30008bb4: eafffff6 b 30008b94 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 30008bb8: eb000cca bl 3000bee8 <__errno> <== NOT EXECUTED 30008bbc: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 30008bc0: e5803000 str r3, [r0] <== NOT EXECUTED 30008bc4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30008bc8: eafffff1 b 30008b94 <== NOT EXECUTED 300037cc : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 300037cc: e5902008 ldr r2, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 300037d0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 300037d4: e592304c ldr r3, [r2, #76] 300037d8: e3530001 cmp r3, #1 ; 0x1 300037dc: 1a000002 bne 300037ec /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 300037e0: e582005c str r0, [r2, #92] 300037e4: e3a00000 mov r0, #0 ; 0x0 return 0; } 300037e8: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 300037ec: eb00a87e bl 3002d9ec <__errno> <== NOT EXECUTED 300037f0: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 300037f4: e5803000 str r3, [r0] <== NOT EXECUTED 300037f8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300037fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30002a88 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 30002a88: e92d4030 push {r4, r5, lr} assert( the_jnode ); 30002a8c: e2504000 subs r4, r0, #0 ; 0x0 30002a90: 0a000049 beq 30002bbc fprintf(stdout, "%s", the_jnode->name ); 30002a94: e59f5134 ldr r5, [pc, #308] ; 30002bd0 30002a98: e284000c add r0, r4, #12 ; 0xc 30002a9c: e5953000 ldr r3, [r5] 30002aa0: e5931008 ldr r1, [r3, #8] 30002aa4: eb003670 bl 3001046c switch( the_jnode->type ) { 30002aa8: e594204c ldr r2, [r4, #76] 30002aac: e2423001 sub r3, r2, #1 ; 0x1 30002ab0: e3530005 cmp r3, #5 ; 0x5 30002ab4: 979ff103 ldrls pc, [pc, r3, lsl #2] 30002ab8: ea000005 b 30002ad4 <== NOT EXECUTED 30002abc: 30002af8 .word 0x30002af8 <== NOT EXECUTED 30002ac0: 30002b14 .word 0x30002b14 <== NOT EXECUTED 30002ac4: 30002b30 .word 0x30002b30 <== NOT EXECUTED 30002ac8: 30002b5c .word 0x30002b5c <== NOT EXECUTED 30002acc: 30002b88 .word 0x30002b88 <== NOT EXECUTED 30002ad0: 30002ba0 .word 0x30002ba0 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 30002ad4: e5953000 ldr r3, [r5] <== NOT EXECUTED 30002ad8: e59f10f4 ldr r1, [pc, #244] ; 30002bd4 <== NOT EXECUTED 30002adc: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30002ae0: eb003616 bl 30010340 <== NOT EXECUTED assert(0); 30002ae4: e59f00ec ldr r0, [pc, #236] ; 30002bd8 <== NOT EXECUTED 30002ae8: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 30002aec: e59f20e8 ldr r2, [pc, #232] ; 30002bdc <== NOT EXECUTED 30002af0: e59f30e8 ldr r3, [pc, #232] ; 30002be0 <== NOT EXECUTED 30002af4: eb000227 bl 30003398 <__assert_func> <== NOT EXECUTED assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 30002af8: e5953000 ldr r3, [r5] 30002afc: e3a0002f mov r0, #47 ; 0x2f 30002b00: e5931008 ldr r1, [r3, #8] 30002b04: eb003621 bl 30010390 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 30002b08: e59f00d4 ldr r0, [pc, #212] ; 30002be4 } 30002b0c: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 30002b10: ea003d3f b 30012014 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 30002b14: e5952000 ldr r2, [r5] 30002b18: e5943054 ldr r3, [r4, #84] 30002b1c: e5920008 ldr r0, [r2, #8] 30002b20: e59f10c0 ldr r1, [pc, #192] ; 30002be8 30002b24: e5942050 ldr r2, [r4, #80] 30002b28: eb003604 bl 30010340 30002b2c: eafffff5 b 30002b08 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 30002b30: e5952000 ldr r2, [r5] <== NOT EXECUTED 30002b34: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 30002b38: e5923008 ldr r3, [r2, #8] <== NOT EXECUTED 30002b3c: e59f00a8 ldr r0, [pc, #168] ; 30002bec <== NOT EXECUTED 30002b40: e3a02013 mov r2, #19 ; 0x13 <== NOT EXECUTED 30002b44: eb0038fa bl 30010f34 <== NOT EXECUTED assert(0); 30002b48: e59f0088 ldr r0, [pc, #136] ; 30002bd8 <== NOT EXECUTED 30002b4c: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 30002b50: e59f2084 ldr r2, [pc, #132] ; 30002bdc <== NOT EXECUTED 30002b54: e59f3084 ldr r3, [pc, #132] ; 30002be0 <== NOT EXECUTED 30002b58: eb00020e bl 30003398 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 30002b5c: e5952000 ldr r2, [r5] <== NOT EXECUTED 30002b60: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 30002b64: e5923008 ldr r3, [r2, #8] <== NOT EXECUTED 30002b68: e59f007c ldr r0, [pc, #124] ; 30002bec <== NOT EXECUTED 30002b6c: e3a02013 mov r2, #19 ; 0x13 <== NOT EXECUTED 30002b70: eb0038ef bl 30010f34 <== NOT EXECUTED assert(0); 30002b74: e59f005c ldr r0, [pc, #92] ; 30002bd8 <== NOT EXECUTED 30002b78: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 30002b7c: e59f2058 ldr r2, [pc, #88] ; 30002bdc <== NOT EXECUTED 30002b80: e59f3058 ldr r3, [pc, #88] ; 30002be0 <== NOT EXECUTED 30002b84: eb000203 bl 30003398 <__assert_func> <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 30002b88: e5953000 ldr r3, [r5] 30002b8c: e5942050 ldr r2, [r4, #80] 30002b90: e5930008 ldr r0, [r3, #8] 30002b94: e59f1054 ldr r1, [pc, #84] ; 30002bf0 30002b98: eb0035e8 bl 30010340 30002b9c: eaffffd9 b 30002b08 fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 30002ba0: e5952000 ldr r2, [r5] <== NOT EXECUTED 30002ba4: e5943054 ldr r3, [r4, #84] <== NOT EXECUTED 30002ba8: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 30002bac: e59f1040 ldr r1, [pc, #64] ; 30002bf4 <== NOT EXECUTED 30002bb0: e5942050 ldr r2, [r4, #80] <== NOT EXECUTED 30002bb4: eb0035e1 bl 30010340 <== NOT EXECUTED 30002bb8: eaffffd2 b 30002b08 <== NOT EXECUTED void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 30002bbc: e59f0014 ldr r0, [pc, #20] ; 30002bd8 <== NOT EXECUTED 30002bc0: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED 30002bc4: e59f2010 ldr r2, [pc, #16] ; 30002bdc <== NOT EXECUTED 30002bc8: e59f3028 ldr r3, [pc, #40] ; 30002bf8 <== NOT EXECUTED 30002bcc: eb0001f1 bl 30003398 <__assert_func> <== NOT EXECUTED 30002bd0: 3001e0c0 .word 0x3001e0c0 30002bd4: 3001cb58 .word 0x3001cb58 30002bd8: 3001cabc .word 0x3001cabc 30002bdc: 3001b4f4 .word 0x3001b4f4 30002be0: 3001ca94 .word 0x3001ca94 30002be4: 3001cab8 .word 0x3001cab8 30002be8: 3001cb14 .word 0x3001cb14 30002bec: 3001cb44 .word 0x3001cb44 30002bf0: 3001cb38 .word 0x3001cb38 30002bf4: 3001cb28 .word 0x3001cb28 30002bf8: 3001cb08 .word 0x3001cb08 3000380c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 3000380c: e92d4010 push {r4, lr} IMFS_jnode_t *node; int i; node = loc->node_access; 30003810: e5904000 ldr r4, [r0] if ( node->type != IMFS_SYM_LINK ) 30003814: e594304c ldr r3, [r4, #76] 30003818: e3530004 cmp r3, #4 ; 0x4 3000381c: 1a000013 bne 30003870 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30003820: e3520000 cmp r2, #0 ; 0x0 30003824: 0a00000f beq 30003868 30003828: e5943050 ldr r3, [r4, #80] 3000382c: e5d33000 ldrb r3, [r3] 30003830: e3530000 cmp r3, #0 ; 0x0 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 30003834: 13a00000 movne r0, #0 ; 0x0 30003838: 11a0c000 movne ip, r0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 3000383c: 0a000009 beq 30003868 30003840: e2800001 add r0, r0, #1 ; 0x1 30003844: e1520000 cmp r2, r0 buf[i] = node->info.sym_link.name[i]; 30003848: e7c1300c strb r3, [r1, ip] 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++ ) 3000384c: e1a0c000 mov ip, r0 30003850: 98bd8010 popls {r4, pc} 30003854: e5943050 ldr r3, [r4, #80] 30003858: e7d33000 ldrb r3, [r3, r0] 3000385c: e3530000 cmp r3, #0 ; 0x0 30003860: 1afffff6 bne 30003840 30003864: e8bd8010 pop {r4, pc} 30003868: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 3000386c: e8bd8010 pop {r4, pc} <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 30003870: eb00a85d bl 3002d9ec <__errno> <== NOT EXECUTED 30003874: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30003878: e5803000 str r3, [r0] <== NOT EXECUTED 3000387c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30003880: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30008c90 : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 30008c90: e5900000 ldr r0, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 30008c94: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 30008c98: e590304c ldr r3, [r0, #76] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 30008c9c: e1a0c001 mov ip, r1 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 30008ca0: e2433002 sub r3, r3, #2 ; 0x2 30008ca4: e3530004 cmp r3, #4 ; 0x4 30008ca8: 979ff103 ldrls pc, [pc, r3, lsl #2] 30008cac: ea000004 b 30008cc4 <== NOT EXECUTED 30008cb0: 30008d34 .word 0x30008d34 <== NOT EXECUTED 30008cb4: 30008cc4 .word 0x30008cc4 <== NOT EXECUTED 30008cb8: 30008d28 .word 0x30008d28 <== NOT EXECUTED 30008cbc: 30008cd8 .word 0x30008cd8 <== NOT EXECUTED 30008cc0: 30008cd8 .word 0x30008cd8 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 30008cc4: eb000c87 bl 3000bee8 <__errno> <== NOT EXECUTED 30008cc8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30008ccc: e5803000 str r3, [r0] <== NOT EXECUTED 30008cd0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30008cd4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 30008cd8: e5903050 ldr r3, [r0, #80] 30008cdc: e5813020 str r3, [r1, #32] break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 30008ce0: 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; 30008ce4: e1d023b4 ldrh r2, [r0, #52] buf->st_ino = the_jnode->st_ino; 30008ce8: e58c3008 str r3, [ip, #8] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 30008cec: e1cc21b0 strh r2, [ip, #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; 30008cf0: e5902040 ldr r2, [r0, #64] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 30008cf4: e5901030 ldr r1, [r0, #48] 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; buf->st_atime = the_jnode->stat_atime; 30008cf8: e58c2024 str r2, [ip, #36] buf->st_mtime = the_jnode->stat_mtime; 30008cfc: 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; 30008d00: e1d023bc ldrh r2, [r0, #60] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 30008d04: e58c302c str r3, [ip, #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; 30008d08: e1cc21b2 strh r2, [ip, #18] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 30008d0c: e5902048 ldr r2, [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; 30008d10: e1d003be ldrh r0, [r0, #62] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 30008d14: e58c100c str r1, [ip, #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; 30008d18: e1cc01b4 strh r0, [ip, #20] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 30008d1c: e58c2034 str r2, [ip, #52] 30008d20: e3a00000 mov r0, #0 ; 0x0 return 0; } 30008d24: e49df004 pop {pc} ; (ldr pc, [sp], #4) case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; break; case IMFS_SYM_LINK: buf->st_size = 0; 30008d28: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30008d2c: e5813020 str r3, [r1, #32] <== NOT EXECUTED 30008d30: eaffffea b 30008ce0 <== NOT EXECUTED switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); 30008d34: e5903054 ldr r3, [r0, #84] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 30008d38: e5902050 ldr r2, [r0, #80] 30008d3c: e881000c stm r1, {r2, r3} 30008d40: eaffffe6 b 30008ce0 30003884 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 30003884: e92d4070 push {r4, r5, r6, lr} 30003888: e24dd03c sub sp, sp, #60 ; 0x3c /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 3000388c: e28d6007 add r6, sp, #7 ; 0x7 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 30003890: e1a04001 mov r4, r1 30003894: e1a05000 mov r5, r0 /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 30003898: e1a01006 mov r1, r6 3000389c: e1a00002 mov r0, r2 300038a0: e28d2038 add r2, sp, #56 ; 0x38 300038a4: ebfffee7 bl 30003448 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 300038a8: e1a00004 mov r0, r4 300038ac: eb00bd25 bl 30032d48 if (info.sym_link.name == NULL) { 300038b0: e3500000 cmp r0, #0 ; 0x0 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 300038b4: e58d0028 str r0, [sp, #40] if (info.sym_link.name == NULL) { 300038b8: 0a00000d beq 300038f4 /* * Create a new link node. */ new_node = IMFS_create_node( 300038bc: e28dc028 add ip, sp, #40 ; 0x28 300038c0: e1a00005 mov r0, r5 300038c4: e1a02006 mov r2, r6 300038c8: e3a01004 mov r1, #4 ; 0x4 300038cc: e59f3034 ldr r3, [pc, #52] ; 30003908 300038d0: e58dc000 str ip, [sp] 300038d4: eb006479 bl 3001cac0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 300038d8: e3500000 cmp r0, #0 ; 0x0 300038dc: 13a00000 movne r0, #0 ; 0x0 300038e0: 0a000001 beq 300038ec free( info.sym_link.name); rtems_set_errno_and_return_minus_one( ENOMEM); } return 0; } 300038e4: e28dd03c add sp, sp, #60 ; 0x3c 300038e8: e8bd8070 pop {r4, r5, r6, pc} ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free( info.sym_link.name); 300038ec: e59d0028 ldr r0, [sp, #40] <== NOT EXECUTED 300038f0: eb000195 bl 30003f4c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 300038f4: eb00a83c bl 3002d9ec <__errno> <== NOT EXECUTED 300038f8: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 300038fc: e5803000 str r3, [r0] <== NOT EXECUTED 30003900: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30003904: eafffff6 b 300038e4 <== NOT EXECUTED 30003908: 0000a1ff .word 0x0000a1ff 3000390c : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 3000390c: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 30003910: e5905000 ldr r5, [r0] #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 30003914: 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 ) { 30003918: e595304c ldr r3, [r5, #76] #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 3000391c: e1a04000 mov r4, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30003920: e3530003 cmp r3, #3 ; 0x3 30003924: 1a000014 bne 3000397c if ( !node->info.hard_link.link_node ) 30003928: e595c050 ldr ip, [r5, #80] 3000392c: e35c0000 cmp ip, #0 ; 0x0 30003930: 0a000017 beq 30003994 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 30003934: e890000f ldm r0, {r0, r1, r2, r3} 30003938: e88d000f stm sp, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 3000393c: 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; 30003940: e58dc000 str ip, [sp] IMFS_Set_handlers( &the_link ); 30003944: eb0064c0 bl 3001cc4c /* * 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) 30003948: e5952050 ldr r2, [r5, #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; 3000394c: e1a0600d mov r6, 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) 30003950: e1d233b4 ldrh r3, [r2, #52] 30003954: e3530001 cmp r3, #1 ; 0x1 30003958: 0a000012 beq 300039a8 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 3000395c: e2433001 sub r3, r3, #1 ; 0x1 30003960: e1c233b4 strh r3, [r2, #52] IMFS_update_ctime( node->info.hard_link.link_node ); 30003964: e28d0010 add r0, sp, #16 ; 0x10 30003968: e3a01000 mov r1, #0 ; 0x0 3000396c: eb00019e bl 30003fec 30003970: e5952050 ldr r2, [r5, #80] 30003974: e59d3010 ldr r3, [sp, #16] 30003978: e5823048 str r3, [r2, #72] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 3000397c: e1a00004 mov r0, r4 30003980: e5943004 ldr r3, [r4, #4] 30003984: e1a0e00f mov lr, pc 30003988: e593f034 ldr pc, [r3, #52] return result; } 3000398c: e28dd018 add sp, sp, #24 ; 0x18 30003990: e8bd8070 pop {r4, r5, r6, pc} */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 30003994: eb00a814 bl 3002d9ec <__errno> <== NOT EXECUTED 30003998: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3000399c: e5803000 str r3, [r0] <== NOT EXECUTED 300039a0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300039a4: eafffff8 b 3000398c <== NOT EXECUTED * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( &the_link ); 300039a8: e1a0000d mov r0, sp 300039ac: e59d3004 ldr r3, [sp, #4] 300039b0: e1a0e00f mov lr, pc 300039b4: e593f034 ldr pc, [r3, #52] if ( result != 0 ) 300039b8: e3500000 cmp r0, #0 ; 0x0 300039bc: 13e00000 mvnne r0, #0 ; 0x0 300039c0: 0affffed beq 3000397c 300039c4: eafffff0 b 3000398c 300039c8 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 300039c8: e5902008 ldr r2, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 300039cc: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 300039d0: e592304c ldr r3, [r2, #76] 300039d4: e3530001 cmp r3, #1 ; 0x1 300039d8: 1a000006 bne 300039f8 /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 300039dc: e592305c ldr r3, [r2, #92] 300039e0: e3530000 cmp r3, #0 ; 0x0 300039e4: 0a000008 beq 30003a0c /* * 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; 300039e8: e3a03000 mov r3, #0 ; 0x0 300039ec: e582305c str r3, [r2, #92] 300039f0: e1a00003 mov r0, r3 return 0; } 300039f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 300039f8: eb00a7fb bl 3002d9ec <__errno> <== NOT EXECUTED 300039fc: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 30003a00: e5803000 str r3, [r0] <== NOT EXECUTED 30003a04: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30003a08: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 30003a0c: eb00a7f6 bl 3002d9ec <__errno> <== NOT EXECUTED 30003a10: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30003a14: e5803000 str r3, [r0] <== NOT EXECUTED 30003a18: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30003a1c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 300015a8 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 300015a8: e59f30a4 ldr r3, [pc, #164] ; 30001654 void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 300015ac: e92d4070 push {r4, r5, r6, lr} #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 300015b0: e5933000 ldr r3, [r3] void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 300015b4: e1a06000 mov r6, r0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 300015b8: e3530000 cmp r3, #0 ; 0x0 void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 300015bc: e1a05001 mov r5, r1 300015c0: e1a04002 mov r4, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->initialize)(); 300015c4: 11a0e00f movne lr, pc 300015c8: 1593f000 ldrne pc, [r3] /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 300015cc: eb001fd1 bl 30009518 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 300015d0: e59f3080 ldr r3, [pc, #128] ; 30001658 300015d4: e5933000 ldr r3, [r3] 300015d8: e3530000 cmp r3, #0 ; 0x0 300015dc: 01a04006 moveq r4, r6 300015e0: 0a000004 beq 300015f8 starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 300015e4: e1a01004 mov r1, r4 <== NOT EXECUTED 300015e8: e1a00006 mov r0, r6 <== NOT EXECUTED 300015ec: e1a0e00f mov lr, pc <== NOT EXECUTED 300015f0: e593f000 ldr pc, [r3] <== NOT EXECUTED 300015f4: 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() ) 300015f8: e59f305c ldr r3, [pc, #92] ; 3000165c 300015fc: e5932000 ldr r2, [r3] 30001600: e5d21028 ldrb r1, [r2, #40] 30001604: e3510000 cmp r1, #0 ; 0x0 30001608: 1a00000b bne 3000163c void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 3000160c: e1a01004 mov r1, r4 30001610: e59f0048 ldr r0, [pc, #72] ; 30001660 30001614: e1a02005 mov r2, r5 30001618: e3a03004 mov r3, #4 ; 0x4 3000161c: eb001063 bl 300057b0 <_Heap_Initialize> &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 30001620: e3500000 cmp r0, #0 ; 0x0 30001624: 0a000009 beq 30001650 rtems_print_buffer( (start + length) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif MSBUMP(space_available, length); 30001628: e59f2034 ldr r2, [pc, #52] ; 30001664 3000162c: e5923000 ldr r3, [r2] 30001630: e0853003 add r3, r5, r3 30001634: e5823000 str r3, [r2] } 30001638: e8bd8070 pop {r4, r5, r6, pc} * 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() ) memset( starting_address, 0, length ); 3000163c: e1a00004 mov r0, r4 <== NOT EXECUTED 30001640: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30001644: e1a02005 mov r2, r5 <== NOT EXECUTED 30001648: eb002c2f bl 3000c70c <== NOT EXECUTED 3000164c: eaffffee b 3000160c <== NOT EXECUTED starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) rtems_fatal_error_occurred( status ); 30001650: eb000e0f bl 30004e94 <== NOT EXECUTED 30001654: 30016bfc .word 0x30016bfc 30001658: 30016c00 .word 0x30016c00 3000165c: 30016fdc .word 0x30016fdc 30001660: 30016dd8 .word 0x30016dd8 30001664: 30016e30 .word 0x30016e30 30002904 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 30002904: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 30002908: 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 ) { 3000290c: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 30002910: 0a000036 beq 300029f0 <== NOT EXECUTED return; if ( !print_handler ) 30002914: e59f312c ldr r3, [pc, #300] ; 30002a48 <== NOT EXECUTED 30002918: e593a000 ldr sl, [r3] <== NOT EXECUTED 3000291c: e35a0000 cmp sl, #0 ; 0x0 <== NOT EXECUTED 30002920: 0a000032 beq 300029f0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 30002924: 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 ); 30002928: 159490f4 ldrne r9, [r4, #244] <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 3000292c: 128470c4 addne r7, r4, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 30002930: 0a000035 beq 30002a0c <== 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); 30002934: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 30002938: e2835010 add r5, r3, #16 ; 0x10 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 3000293c: e2428010 sub r8, r2, #16 ; 0x10 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 30002940: e1a00005 mov r0, r5 <== NOT EXECUTED 30002944: e1a01008 mov r1, r8 <== NOT EXECUTED 30002948: ebffffd9 bl 300028b4 <== NOT EXECUTED if ( high_water_mark ) 3000294c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 30002950: 10853008 addne r3, r5, r8 <== 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 ) 30002954: 01a0b000 moveq fp, r0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 30002958: 1060b003 rsbne fp, r0, r3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 3000295c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 30002960: 0a000031 beq 30002a2c <== NOT EXECUTED (*print_handler)( 30002964: e5945008 ldr r5, [r4, #8] <== NOT EXECUTED 30002968: e59f60dc ldr r6, [pc, #220] ; 30002a4c <== NOT EXECUTED 3000296c: e28d200b add r2, sp, #11 ; 0xb <== NOT EXECUTED 30002970: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED 30002974: e1a00005 mov r0, r5 <== NOT EXECUTED 30002978: e5964000 ldr r4, [r6] <== NOT EXECUTED 3000297c: eb00149d bl 30007bf8 <== NOT EXECUTED 30002980: e1a02005 mov r2, r5 <== NOT EXECUTED 30002984: e1a03000 mov r3, r0 <== NOT EXECUTED 30002988: e59f10c0 ldr r1, [pc, #192] ; 30002a50 <== NOT EXECUTED 3000298c: e1a00004 mov r0, r4 <== NOT EXECUTED 30002990: e1a0e00f mov lr, pc <== NOT EXECUTED 30002994: e12fff1a bx sl <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 30002998: e5973000 ldr r3, [r7] <== NOT EXECUTED 3000299c: e5972004 ldr r2, [r7, #4] <== NOT EXECUTED 300029a0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 300029a4: e0823003 add r3, r2, r3 <== NOT EXECUTED 300029a8: e59fc098 ldr ip, [pc, #152] ; 30002a48 <== NOT EXECUTED 300029ac: e5960000 ldr r0, [r6] <== NOT EXECUTED 300029b0: e58d9000 str r9, [sp] <== NOT EXECUTED 300029b4: e58d8004 str r8, [sp, #4] <== NOT EXECUTED 300029b8: e59f1094 ldr r1, [pc, #148] ; 30002a54 <== NOT EXECUTED 300029bc: e1a0e00f mov lr, pc <== NOT EXECUTED 300029c0: e59cf000 ldr pc, [ip] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 300029c4: e59f308c ldr r3, [pc, #140] ; 30002a58 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 300029c8: e59fc078 ldr ip, [pc, #120] ; 30002a48 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 300029cc: e5932000 ldr r2, [r3] <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 300029d0: e59f0074 ldr r0, [pc, #116] ; 30002a4c <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 300029d4: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 300029d8: 0a000006 beq 300029f8 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 300029dc: e5900000 ldr r0, [r0] <== NOT EXECUTED 300029e0: e1a0200b mov r2, fp <== NOT EXECUTED 300029e4: e59f1070 ldr r1, [pc, #112] ; 30002a5c <== NOT EXECUTED 300029e8: e1a0e00f mov lr, pc <== NOT EXECUTED 300029ec: e59cf000 ldr pc, [ip] <== NOT EXECUTED } } 300029f0: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 300029f4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 300029f8: e59f1060 ldr r1, [pc, #96] ; 30002a60 <== NOT EXECUTED 300029fc: e5900000 ldr r0, [r0] <== NOT EXECUTED 30002a00: e1a0e00f mov lr, pc <== NOT EXECUTED 30002a04: e59cf000 ldr pc, [ip] <== NOT EXECUTED 30002a08: eafffff8 b 300029f0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 30002a0c: e59f2050 ldr r2, [pc, #80] ; 30002a64 <== NOT EXECUTED 30002a10: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 30002a14: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 30002a18: 12844001 addne r4, r4, #1 ; 0x1 <== NOT EXECUTED 30002a1c: 11a07002 movne r7, r2 <== NOT EXECUTED 30002a20: 11a09004 movne r9, r4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 30002a24: 1affffc2 bne 30002934 <== NOT EXECUTED 30002a28: eafffff0 b 300029f0 <== 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 ); 30002a2c: e59f6018 ldr r6, [pc, #24] ; 30002a4c <== NOT EXECUTED 30002a30: e59f1030 ldr r1, [pc, #48] ; 30002a68 <== NOT EXECUTED 30002a34: e5960000 ldr r0, [r6] <== NOT EXECUTED 30002a38: e3e02000 mvn r2, #0 ; 0x0 <== NOT EXECUTED 30002a3c: e1a0e00f mov lr, pc <== NOT EXECUTED 30002a40: e12fff1a bx sl <== NOT EXECUTED 30002a44: eaffffd3 b 30002998 <== NOT EXECUTED 30002a48: 3004745c .word 0x3004745c 30002a4c: 30047458 .word 0x30047458 30002a50: 30040fb4 .word 0x30040fb4 30002a54: 30040fd4 .word 0x30040fd4 30002a58: 30047454 .word 0x30047454 30002a5c: 30041004 .word 0x30041004 30002a60: 30040ff4 .word 0x30040ff4 30002a64: 3005a4a8 .word 0x3005a4a8 30002a68: 30040fc4 .word 0x30040fc4 300028b4 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 300028b4: e1a03000 mov r3, r0 <== 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++) 300028b8: 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; 300028bc: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 300028c0: e0802001 add r2, r0, r1 <== NOT EXECUTED 300028c4: e1500002 cmp r0, r2 <== NOT EXECUTED 300028c8: 2a00000a bcs 300028f8 <== NOT EXECUTED if (*base != U32_PATTERN) 300028cc: e5931010 ldr r1, [r3, #16] <== NOT EXECUTED 300028d0: e59f3028 ldr r3, [pc, #40] ; 30002900 <== NOT EXECUTED 300028d4: e1510003 cmp r1, r3 <== NOT EXECUTED 300028d8: 0a000003 beq 300028ec <== NOT EXECUTED 300028dc: e12fff1e bx lr <== NOT EXECUTED 300028e0: e5903000 ldr r3, [r0] <== NOT EXECUTED 300028e4: e1530001 cmp r3, r1 <== NOT EXECUTED 300028e8: 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++) 300028ec: e2800004 add r0, r0, #4 ; 0x4 <== NOT EXECUTED 300028f0: e1520000 cmp r2, r0 <== NOT EXECUTED 300028f4: 8afffff9 bhi 300028e0 <== NOT EXECUTED 300028f8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 300028fc: e12fff1e bx lr <== NOT EXECUTED 30002900: a5a5a5a5 .word 0xa5a5a5a5 30002ae8 : */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 30002ae8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 30002aec: e1a05000 mov r5, r0 <== NOT EXECUTED 30002af0: e1a04001 mov r4, r1 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 30002af4: e59f0050 ldr r0, [pc, #80] ; 30002b4c <== NOT EXECUTED 30002af8: e1a01005 mov r1, r5 <== NOT EXECUTED 30002afc: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 30002b00: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 30002b04: eb000a95 bl 30005560 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 30002b08: e59530c4 ldr r3, [r5, #196] <== NOT EXECUTED 30002b0c: e59510c8 ldr r1, [r5, #200] <== NOT EXECUTED 30002b10: e2432001 sub r2, r3, #1 ; 0x1 <== NOT EXECUTED */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 30002b14: e20440ff and r4, r4, #255 ; 0xff <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 30002b18: e0812002 add r2, r1, r2 <== NOT EXECUTED 30002b1c: e59f002c ldr r0, [pc, #44] ; 30002b50 <== NOT EXECUTED 30002b20: eb000a8e bl 30005560 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 30002b24: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 30002b28: 0a000001 beq 30002b34 <== 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 ); 30002b2c: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED 30002b30: eb00167d bl 3000852c <== NOT EXECUTED stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { printk( 30002b34: e59510c8 ldr r1, [r5, #200] <== NOT EXECUTED 30002b38: e59f0014 ldr r0, [pc, #20] ; 30002b54 <== NOT EXECUTED 30002b3c: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED 30002b40: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED 30002b44: eb000a85 bl 30005560 <== NOT EXECUTED 30002b48: eafffff7 b 30002b2c <== NOT EXECUTED 30002b4c: 30041070 .word 0x30041070 30002b50: 300410b0 .word 0x300410b0 30002b54: 300410e0 .word 0x300410e0 30007180 <_CORE_RWLock_Release>: CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ISR_Level level; Thread_Control *executing = _Thread_Executing; 30007180: e59f30e4 ldr r3, [pc, #228] ; 3000726c <_CORE_RWLock_Release+0xec> */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 30007184: e92d4010 push {r4, lr} ISR_Level level; Thread_Control *executing = _Thread_Executing; 30007188: e5931000 ldr r1, [r3] */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 3000718c: 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 ); 30007190: e10f2000 mrs r2, CPSR 30007194: e38230c0 orr r3, r2, #192 ; 0xc0 30007198: e129f003 msr CPSR_fc, r3 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 3000719c: e5903044 ldr r3, [r0, #68] 300071a0: e3530000 cmp r3, #0 ; 0x0 300071a4: 0a00002b beq 30007258 <_CORE_RWLock_Release+0xd8> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 300071a8: e3530001 cmp r3, #1 ; 0x1 300071ac: 0a000021 beq 30007238 <_CORE_RWLock_Release+0xb8> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 300071b0: e3a03000 mov r3, #0 ; 0x0 300071b4: 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; 300071b8: e5843044 str r3, [r4, #68] _ISR_Enable( level ); 300071bc: e129f002 msr CPSR_fc, r2 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 300071c0: e1a00004 mov r0, r4 300071c4: eb0005b0 bl 3000888c <_Thread_queue_Dequeue> if ( next ) { 300071c8: e3500000 cmp r0, #0 ; 0x0 300071cc: 0a000017 beq 30007230 <_CORE_RWLock_Release+0xb0> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 300071d0: e5903030 ldr r3, [r0, #48] 300071d4: e3530001 cmp r3, #1 ; 0x1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 300071d8: 02833001 addeq r3, r3, #1 ; 0x1 300071dc: 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 ) { 300071e0: 0a000012 beq 30007230 <_CORE_RWLock_Release+0xb0> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 300071e4: e5943048 ldr r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 300071e8: e3a02001 mov r2, #1 ; 0x1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 300071ec: e2833001 add r3, r3, #1 ; 0x1 300071f0: e5843048 str r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 300071f4: e5842044 str r2, [r4, #68] 300071f8: ea000006 b 30007218 <_CORE_RWLock_Release+0x98> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 300071fc: e5933030 ldr r3, [r3, #48] 30007200: e3530001 cmp r3, #1 ; 0x1 30007204: 0a000009 beq 30007230 <_CORE_RWLock_Release+0xb0> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 30007208: e5943048 ldr r3, [r4, #72] 3000720c: e2833001 add r3, r3, #1 ; 0x1 30007210: e5843048 str r3, [r4, #72] _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 30007214: eb0006af bl 30008cd8 <_Thread_queue_Extract> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 30007218: e1a00004 mov r0, r4 3000721c: eb0006f7 bl 30008e00 <_Thread_queue_First> if ( !next || 30007220: 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 ); 30007224: e1a01003 mov r1, r3 30007228: 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 || 3000722c: 1afffff2 bne 300071fc <_CORE_RWLock_Release+0x7c> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 30007230: e3a00000 mov r0, #0 ; 0x0 30007234: e8bd8010 pop {r4, pc} _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; 30007238: e5903048 ldr r3, [r0, #72] 3000723c: e2433001 sub r3, r3, #1 ; 0x1 if ( the_rwlock->number_of_readers != 0 ) { 30007240: 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; 30007244: e5803048 str r3, [r0, #72] if ( the_rwlock->number_of_readers != 0 ) { 30007248: 0affffd8 beq 300071b0 <_CORE_RWLock_Release+0x30> /* must be unlocked again */ _ISR_Enable( level ); 3000724c: e129f002 msr CPSR_fc, r2 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 30007250: e3a00000 mov r0, #0 ; 0x0 30007254: e8bd8010 pop {r4, pc} * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 30007258: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 3000725c: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30007260: e5813034 str r3, [r1, #52] <== NOT EXECUTED } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 30007264: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30007268: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3000726c: 300196c4 .word 0x300196c4 30013618 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30013618: 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 ) { 3001361c: e92d41f0 push {r4, r5, r6, r7, r8, lr} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30013620: e1530002 cmp r3, r2 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 30013624: e1a07000 mov r7, r0 30013628: e1a06002 mov r6, r2 3001362c: e1a08001 mov r8, r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30013630: 33a00001 movcc r0, #1 ; 0x1 30013634: 38bd81f0 popcc {r4, r5, r6, r7, r8, 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 ) { 30013638: e5973048 ldr r3, [r7, #72] 3001363c: e3530000 cmp 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))) { 30013640: 01a05003 moveq r5, 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 ) { 30013644: 0a000009 beq 30013670 <_CORE_message_queue_Broadcast+0x58> *count = 0; 30013648: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED 3001364c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30013650: e5823000 str r3, [r2] <== NOT EXECUTED 30013654: e1a00003 mov r0, r3 <== NOT EXECUTED 30013658: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 3001365c: e594002c ldr r0, [r4, #44] 30013660: eb0020df bl 3001b9e4 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30013664: 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; 30013668: e2855001 add r5, r5, #1 ; 0x1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 3001366c: 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))) { 30013670: e1a00007 mov r0, r7 30013674: eb000993 bl 30015cc8 <_Thread_queue_Dequeue> 30013678: e2504000 subs r4, r0, #0 ; 0x0 3001367c: e1a01008 mov r1, r8 30013680: e1a02006 mov r2, r6 30013684: 1afffff4 bne 3001365c <_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; 30013688: e59d301c ldr r3, [sp, #28] 3001368c: e1a00004 mov r0, r4 30013690: e5835000 str r5, [r3] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 30013694: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30012674 <_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 ) { 30012674: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 30012678: 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 ) { 3001267c: 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 ) { 30012680: e15c0002 cmp ip, r2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 30012684: e1a07002 mov r7, r2 30012688: e1a0a001 mov sl, r1 3001268c: e1a09003 mov r9, r3 30012690: e5dd8028 ldrb r8, [sp, #40] ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 30012694: 33a00001 movcc r0, #1 ; 0x1 30012698: 38bd87f0 popcc {r4, r5, r6, r7, r8, r9, sl, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 3001269c: e5954048 ldr r4, [r5, #72] 300126a0: e3540000 cmp r4, #0 ; 0x0 300126a4: 0a00001d beq 30012720 <_CORE_message_queue_Submit+0xac> /* * 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 < 300126a8: e5953044 ldr r3, [r5, #68] 300126ac: e1530004 cmp r3, r4 300126b0: 8a00002a bhi 30012760 <_CORE_message_queue_Submit+0xec> * 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 ) { 300126b4: e3580000 cmp r8, #0 ; 0x0 300126b8: 03a00002 moveq r0, #2 ; 0x2 300126bc: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, 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() ) { 300126c0: e59f30dc ldr r3, [pc, #220] ; 300127a4 <_CORE_message_queue_Submit+0x130> 300126c4: e5932000 ldr r2, [r3] 300126c8: e3520000 cmp r2, #0 ; 0x0 300126cc: 1a000021 bne 30012758 <_CORE_message_queue_Submit+0xe4> * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 300126d0: e59f30d0 ldr r3, [pc, #208] ; 300127a8 <_CORE_message_queue_Submit+0x134> 300126d4: e5932000 ldr r2, [r3] _ISR_Disable( level ); 300126d8: e10f1000 mrs r1, CPSR 300126dc: e38130c0 orr r3, r1, #192 ; 0xc0 300126e0: e129f003 msr CPSR_fc, r3 _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; 300126e4: e59d3024 ldr r3, [sp, #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; 300126e8: e5829020 str r9, [r2, #32] executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 300126ec: e5823024 str r3, [r2, #36] 300126f0: e3a03001 mov r3, #1 ; 0x1 300126f4: e5853030 str r3, [r5, #48] _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; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; 300126f8: e5827030 str r7, [r2, #48] _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; executing->Wait.return_argument_second.immutable_object = buffer; 300126fc: e582a02c str sl, [r2, #44] { 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; 30012700: 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 ); 30012704: e129f001 msr CPSR_fc, r1 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 30012708: e59f209c ldr r2, [pc, #156] ; 300127ac <_CORE_message_queue_Submit+0x138> 3001270c: e1a00005 mov r0, r5 30012710: e59d102c ldr r1, [sp, #44] 30012714: ebffe90a bl 3000cb44 <_Thread_queue_Enqueue_with_handler> 30012718: e3a00007 mov r0, #7 ; 0x7 3001271c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 30012720: ebffe8a8 bl 3000c9c8 <_Thread_queue_Dequeue> if ( the_thread ) { 30012724: e2506000 subs r6, r0, #0 ; 0x0 30012728: 05954048 ldreq r4, [r5, #72] 3001272c: 0affffdd beq 300126a8 <_CORE_message_queue_Submit+0x34> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30012730: e1a0100a mov r1, sl 30012734: e596002c ldr r0, [r6, #44] 30012738: e1a02007 mov r2, r7 3001273c: eb00140f bl 30017780 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30012740: e5963028 ldr r3, [r6, #40] the_thread->Wait.count = submit_type; 30012744: e1a00004 mov r0, r4 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30012748: e5837000 str r7, [r3] the_thread->Wait.count = submit_type; 3001274c: e59d3024 ldr r3, [sp, #36] 30012750: e5863024 str r3, [r6, #36] 30012754: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 30012758: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 3001275c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 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 *) 30012760: e2850068 add r0, r5, #104 ; 0x68 30012764: ebffe201 bl 3000af70 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 30012768: e2504000 subs r4, r0, #0 ; 0x0 3001276c: 0afffff9 beq 30012758 <_CORE_message_queue_Submit+0xe4> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30012770: e1a0100a mov r1, sl 30012774: e1a02007 mov r2, r7 30012778: e2840010 add r0, r4, #16 ; 0x10 3001277c: eb0013ff bl 30017780 buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; the_message->priority = submit_type; 30012780: e59d3024 ldr r3, [sp, #36] _CORE_message_queue_Insert_message( 30012784: e1a00005 mov r0, r5 buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; the_message->priority = submit_type; 30012788: e5843008 str r3, [r4, #8] _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 3001278c: e584700c str r7, [r4, #12] the_message->priority = submit_type; _CORE_message_queue_Insert_message( 30012790: e1a01004 mov r1, r4 30012794: e59d2024 ldr r2, [sp, #36] 30012798: eb000c30 bl 30015860 <_CORE_message_queue_Insert_message> 3001279c: e3a00000 mov r0, #0 ; 0x0 300127a0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 300127a4: 300272e0 .word 0x300272e0 300127a8: 30027304 .word 0x30027304 300127ac: 3000cf70 .word 0x3000cf70 3000529c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 3000529c: e92d40f0 push {r4, r5, r6, r7, lr} the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 300052a0: e3520000 cmp r2, #0 ; 0x0 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 300052a4: e1a05000 mov r5, r0 initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; 300052a8: e3a06000 mov r6, #0 ; 0x0 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 300052ac: e1a04002 mov r4, r2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 300052b0: e280c040 add ip, r0, #64 ; 0x40 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 300052b4: e1a07001 mov r7, r1 _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; 300052b8: 1585605c strne r6, [r5, #92] /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 300052bc: e891000f ldm r1, {r0, r1, r2, r3} the_mutex->lock = initial_lock; 300052c0: e5854050 str r4, [r5, #80] /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 300052c4: e88c000f stm ip, {r0, r1, r2, r3} the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; 300052c8: e5856058 str r6, [r5, #88] _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; 300052cc: 15856060 strne r6, [r5, #96] #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 300052d0: 15856054 strne r6, [r5, #84] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 300052d4: 1a00000b bne 30005308 <_CORE_mutex_Initialize+0x6c> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 300052d8: e59f3070 ldr r3, [pc, #112] ; 30005350 <_CORE_mutex_Initialize+0xb4> the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 300052dc: e3a02001 mov r2, #1 ; 0x1 the_mutex->holder = _Thread_Executing; 300052e0: e5931000 ldr r1, [r3] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 300052e4: e5852054 str r2, [r5, #84] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 300052e8: e5952048 ldr r2, [r5, #72] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 300052ec: e5913008 ldr r3, [r1, #8] if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 300052f0: e3520002 cmp r2, #2 ; 0x2 the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 300052f4: e5853060 str r3, [r5, #96] the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 300052f8: e585105c str r1, [r5, #92] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 300052fc: 0a00000a beq 3000532c <_CORE_mutex_Initialize+0x90> 30005300: e3520003 cmp r2, #3 ; 0x3 30005304: 0a000008 beq 3000532c <_CORE_mutex_Initialize+0x90> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 30005308: e5971008 ldr r1, [r7, #8] 3000530c: e1a00005 mov r0, r5 30005310: e2511000 subs r1, r1, #0 ; 0x0 30005314: 13a01001 movne r1, #1 ; 0x1 30005318: e3a02b01 mov r2, #1024 ; 0x400 3000531c: e3a03005 mov r3, #5 ; 0x5 30005320: eb00075b bl 30007094 <_Thread_queue_Initialize> 30005324: e3a00000 mov r0, #0 ; 0x0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 30005328: e8bd80f0 pop {r4, r5, r6, r7, pc} the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 3000532c: e595304c ldr r3, [r5, #76] 30005330: e5912014 ldr r2, [r1, #20] 30005334: e1520003 cmp r2, r3 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 30005338: 2591301c ldrcs r3, [r1, #28] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 3000533c: 33a00006 movcc r0, #6 ; 0x6 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 30005340: 22833001 addcs r3, r3, #1 ; 0x1 30005344: 2581301c strcs r3, [r1, #28] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 30005348: 2affffee bcs 30005308 <_CORE_mutex_Initialize+0x6c> 3000534c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30005350: 30017004 .word 0x30017004 3000a658 <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 3000a658: e59f313c ldr r3, [pc, #316] ; 3000a79c <_CORE_mutex_Seize_interrupt_trylock+0x144> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 3000a65c: e3a02000 mov r2, #0 ; 0x0 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 3000a660: e593c000 ldr ip, [r3] #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 3000a664: e92d4010 push {r4, lr} CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 3000a668: e5914000 ldr r4, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 3000a66c: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 3000a670: e5903050 ldr r3, [r0, #80] 3000a674: e1530002 cmp r3, r2 3000a678: 0a00000d beq 3000a6b4 <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; 3000a67c: e5802050 str r2, [r0, #80] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 3000a680: e5901048 ldr r1, [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; 3000a684: e59c2008 ldr r2, [ip, #8] the_mutex->nest_count = 1; 3000a688: e3a03001 mov r3, #1 ; 0x1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 3000a68c: e3510002 cmp r1, #2 ; 0x2 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; 3000a690: e5802060 str r2, [r0, #96] the_mutex->nest_count = 1; 3000a694: 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; 3000a698: 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 ) || 3000a69c: 0a000009 beq 3000a6c8 <_CORE_mutex_Seize_interrupt_trylock+0x70> 3000a6a0: e3510003 cmp r1, #3 ; 0x3 3000a6a4: 0a000007 beq 3000a6c8 <_CORE_mutex_Seize_interrupt_trylock+0x70> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 3000a6a8: e129f004 msr CPSR_fc, r4 3000a6ac: e3a00000 mov r0, #0 ; 0x0 3000a6b0: e8bd8010 pop {r4, pc} /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 3000a6b4: e590305c ldr r3, [r0, #92] 3000a6b8: e15c0003 cmp ip, r3 3000a6bc: 0a000017 beq 3000a720 <_CORE_mutex_Seize_interrupt_trylock+0xc8> the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( level ); 3000a6c0: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 3000a6c4: e8bd8010 pop {r4, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 3000a6c8: e59c301c ldr r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 3000a6cc: e3510003 cmp r1, #3 ; 0x3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 3000a6d0: e2833001 add r3, r3, #1 ; 0x1 3000a6d4: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 3000a6d8: 1afffff2 bne 3000a6a8 <_CORE_mutex_Seize_interrupt_trylock+0x50> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 3000a6dc: e590204c ldr r2, [r0, #76] current = executing->current_priority; 3000a6e0: e59c3014 ldr r3, [ip, #20] if ( current == ceiling ) { 3000a6e4: e1520003 cmp r2, r3 3000a6e8: 0a00001c beq 3000a760 <_CORE_mutex_Seize_interrupt_trylock+0x108> _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 3000a6ec: 3a00001e bcc 3000a76c <_CORE_mutex_Seize_interrupt_trylock+0x114> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 3000a6f0: e3a03006 mov r3, #6 ; 0x6 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 3000a6f4: e3a02000 mov r2, #0 ; 0x0 _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 3000a6f8: e3a01001 mov r1, #1 ; 0x1 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 3000a6fc: e58c3034 str r3, [ip, #52] the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 3000a700: e5802054 str r2, [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; 3000a704: e5801050 str r1, [r0, #80] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 3000a708: e59c301c ldr r3, [ip, #28] 3000a70c: e2433001 sub r3, r3, #1 ; 0x1 3000a710: e58c301c str r3, [ip, #28] _ISR_Enable( level ); 3000a714: e129f004 msr CPSR_fc, r4 3000a718: e3a00000 mov r0, #0 ; 0x0 3000a71c: e8bd8010 pop {r4, pc} * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 3000a720: e5903040 ldr r3, [r0, #64] 3000a724: e3530000 cmp r3, #0 ; 0x0 3000a728: 0a000006 beq 3000a748 <_CORE_mutex_Seize_interrupt_trylock+0xf0> 3000a72c: e3530001 cmp r3, #1 ; 0x1 3000a730: 1affffe2 bne 3000a6c0 <_CORE_mutex_Seize_interrupt_trylock+0x68> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 3000a734: e3a03002 mov r3, #2 ; 0x2 3000a738: e58c3034 str r3, [ip, #52] _ISR_Enable( level ); 3000a73c: e129f004 msr CPSR_fc, r4 3000a740: e3a00000 mov r0, #0 ; 0x0 3000a744: e8bd8010 pop {r4, pc} * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 3000a748: e5903054 ldr r3, [r0, #84] 3000a74c: e2833001 add r3, r3, #1 ; 0x1 3000a750: e5803054 str r3, [r0, #84] _ISR_Enable( level ); 3000a754: e129f004 msr CPSR_fc, r4 3000a758: e3a00000 mov r0, #0 ; 0x0 3000a75c: e8bd8010 pop {r4, pc} Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 3000a760: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 3000a764: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000a768: e8bd8010 pop {r4, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000a76c: e59f202c ldr r2, [pc, #44] ; 3000a7a0 <_CORE_mutex_Seize_interrupt_trylock+0x148> 3000a770: e5923000 ldr r3, [r2] 3000a774: e2833001 add r3, r3, #1 ; 0x1 3000a778: e5823000 str r3, [r2] return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( level ); 3000a77c: e129f004 msr CPSR_fc, r4 _Thread_Change_priority( 3000a780: e3a02000 mov r2, #0 ; 0x0 3000a784: e590104c ldr r1, [r0, #76] 3000a788: e590005c ldr r0, [r0, #92] 3000a78c: ebffeec0 bl 30006294 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 3000a790: ebfff02f bl 30006854 <_Thread_Enable_dispatch> 3000a794: e3a00000 mov r0, #0 ; 0x0 3000a798: e8bd8010 pop {r4, pc} 3000a79c: 30017004 .word 0x30017004 3000a7a0: 30016f4c .word 0x30016f4c 3000548c <_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 ) { 3000548c: 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 ) { 30005490: 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 ) { 30005494: 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 ) { 30005498: 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; 3000549c: 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 ) { 300054a0: 0a000004 beq 300054b8 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 300054a4: e59f3138 ldr r3, [pc, #312] ; 300055e4 <_CORE_mutex_Surrender+0x158> 300054a8: e5932000 ldr r2, [r3] 300054ac: e1500002 cmp r0, r2 300054b0: 13a00003 movne r0, #3 ; 0x3 300054b4: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 300054b8: e5943054 ldr r3, [r4, #84] 300054bc: e3530000 cmp r3, #0 ; 0x0 300054c0: 0a000020 beq 30005548 <_CORE_mutex_Surrender+0xbc> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 300054c4: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 300054c8: 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--; 300054cc: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 300054d0: 1a00001e bne 30005550 <_CORE_mutex_Surrender+0xc4> 300054d4: e5942048 ldr r2, [r4, #72] /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 300054d8: e3520002 cmp r2, #2 ; 0x2 300054dc: 0a00002c beq 30005594 <_CORE_mutex_Surrender+0x108> 300054e0: e3520003 cmp r2, #3 ; 0x3 300054e4: 0a00002a beq 30005594 <_CORE_mutex_Surrender+0x108> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 300054e8: 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 ) || 300054ec: 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; 300054f0: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 300054f4: 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 ) || 300054f8: 0a00001b beq 3000556c <_CORE_mutex_Surrender+0xe0> 300054fc: e3520003 cmp r2, #3 ; 0x3 30005500: 0a000019 beq 3000556c <_CORE_mutex_Surrender+0xe0> /* * 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 ) ) ) { 30005504: e1a00004 mov r0, r4 30005508: eb0005b7 bl 30006bec <_Thread_queue_Dequeue> 3000550c: e2501000 subs r1, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 30005510: 03a03001 moveq r3, #1 ; 0x1 30005514: 05843050 streq r3, [r4, #80] 30005518: 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 ) ) ) { 3000551c: 08bd8010 popeq {r4, pc} the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 30005520: e594c048 ldr ip, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 30005524: e5912008 ldr r2, [r1, #8] the_mutex->nest_count = 1; 30005528: e3a03001 mov r3, #1 ; 0x1 switch ( the_mutex->Attributes.discipline ) { 3000552c: e35c0002 cmp ip, #2 ; 0x2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 30005530: e5842060 str r2, [r4, #96] the_mutex->nest_count = 1; 30005534: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 30005538: e584105c str r1, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 3000553c: 0a000023 beq 300055d0 <_CORE_mutex_Surrender+0x144> 30005540: e35c0003 cmp ip, #3 ; 0x3 30005544: 0a000016 beq 300055a4 <_CORE_mutex_Surrender+0x118> } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 30005548: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 3000554c: e8bd8010 pop {r4, pc} return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 30005550: e5943040 ldr r3, [r4, #64] 30005554: e3530000 cmp r3, #0 ; 0x0 30005558: 0afffffa beq 30005548 <_CORE_mutex_Surrender+0xbc> 3000555c: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 30005560: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 30005564: 1affffda bne 300054d4 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 30005568: e8bd8010 pop {r4, pc} <== NOT EXECUTED _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 && 3000556c: e590301c ldr r3, [r0, #28] 30005570: e3530000 cmp r3, #0 ; 0x0 30005574: 1affffe2 bne 30005504 <_CORE_mutex_Surrender+0x78> 30005578: e5901018 ldr r1, [r0, #24] 3000557c: e5903014 ldr r3, [r0, #20] 30005580: e1510003 cmp r1, r3 30005584: 0affffde beq 30005504 <_CORE_mutex_Surrender+0x78> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 30005588: e3a02001 mov r2, #1 ; 0x1 3000558c: eb000340 bl 30006294 <_Thread_Change_priority> 30005590: eaffffdb b 30005504 <_CORE_mutex_Surrender+0x78> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 30005594: e590301c ldr r3, [r0, #28] 30005598: e2433001 sub r3, r3, #1 ; 0x1 3000559c: e580301c str r3, [r0, #28] 300055a0: eaffffd0 b 300054e8 <_CORE_mutex_Surrender+0x5c> 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++; 300055a4: e591301c ldr r3, [r1, #28] if (the_mutex->Attributes.priority_ceiling < 300055a8: 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++; 300055ac: e2833001 add r3, r3, #1 ; 0x1 300055b0: e581301c str r3, [r1, #28] if (the_mutex->Attributes.priority_ceiling < 300055b4: e594104c ldr r1, [r4, #76] 300055b8: e1510002 cmp r1, r2 300055bc: 2affffe1 bcs 30005548 <_CORE_mutex_Surrender+0xbc> the_thread->current_priority){ _Thread_Change_priority( 300055c0: e3a02000 mov r2, #0 ; 0x0 300055c4: eb000332 bl 30006294 <_Thread_Change_priority> 300055c8: e3a00000 mov r0, #0 ; 0x0 300055cc: e8bd8010 pop {r4, pc} 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++; 300055d0: e591301c ldr r3, [r1, #28] 300055d4: e3a00000 mov r0, #0 ; 0x0 300055d8: e2833001 add r3, r3, #1 ; 0x1 300055dc: e581301c str r3, [r1, #28] 300055e0: e8bd8010 pop {r4, pc} 300055e4: 30017004 .word 0x30017004 30005ee4 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 30005ee4: e52d4004 push {r4} ; (str r4, [sp, #-4]!) 30005ee8: e1a0c000 mov ip, r0 ISR_Level level; _ISR_Disable( level ); 30005eec: e10f4000 mrs r4, CPSR 30005ef0: e38430c0 orr r3, r4, #192 ; 0xc0 30005ef4: e129f003 msr CPSR_fc, r3 /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 30005ef8: e5903004 ldr r3, [r0, #4] 30005efc: e3530000 cmp r3, #0 ; 0x0 30005f00: 1a000003 bne 30005f14 <_CORE_spinlock_Release+0x30> _ISR_Enable( level ); 30005f04: e129f004 msr CPSR_fc, r4 30005f08: e3a00006 mov r0, #6 ; 0x6 the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 30005f0c: e8bd0010 pop {r4} 30005f10: e12fff1e bx lr } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 30005f14: e59f3040 ldr r3, [pc, #64] ; 30005f5c <_CORE_spinlock_Release+0x78> 30005f18: e590000c ldr r0, [r0, #12] 30005f1c: e5932000 ldr r2, [r3] 30005f20: e5921008 ldr r1, [r2, #8] 30005f24: e1500001 cmp r0, r1 30005f28: 0a000002 beq 30005f38 <_CORE_spinlock_Release+0x54> _ISR_Enable( level ); 30005f2c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 30005f30: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 30005f34: eafffff4 b 30005f0c <_CORE_spinlock_Release+0x28> <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 30005f38: e59c3008 ldr r3, [ip, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 30005f3c: e3a02000 mov r2, #0 ; 0x0 } /* * Let it be unlocked. */ the_spinlock->users -= 1; 30005f40: e2433001 sub r3, r3, #1 ; 0x1 30005f44: e58c3008 str r3, [ip, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 30005f48: e58c2004 str r2, [ip, #4] the_spinlock->holder = 0; 30005f4c: e58c200c str r2, [ip, #12] _ISR_Enable( level ); 30005f50: e129f004 msr CPSR_fc, r4 30005f54: e3a00000 mov r0, #0 ; 0x0 30005f58: eaffffeb b 30005f0c <_CORE_spinlock_Release+0x28> 30005f5c: 30012704 .word 0x30012704 30005f60 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 30005f60: e92d41f0 push {r4, r5, r6, r7, r8, lr} ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 30005f64: e59f8104 ldr r8, [pc, #260] ; 30006070 <_CORE_spinlock_Wait+0x110> CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 30005f68: e1a06002 mov r6, r2 ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 30005f6c: e5983000 ldr r3, [r8] CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 30005f70: e1a04000 mov r4, r0 30005f74: e20150ff and r5, r1, #255 ; 0xff ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 30005f78: e0827003 add r7, r2, r3 _ISR_Disable( level ); 30005f7c: e10fc000 mrs ip, CPSR 30005f80: e38c30c0 orr r3, ip, #192 ; 0xc0 30005f84: e129f003 msr CPSR_fc, r3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 30005f88: e5903004 ldr r3, [r0, #4] 30005f8c: e3530001 cmp r3, #1 ; 0x1 30005f90: 0a000027 beq 30006034 <_CORE_spinlock_Wait+0xd4> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 30005f94: e5943008 ldr r3, [r4, #8] 30005f98: e2833001 add r3, r3, #1 ; 0x1 30005f9c: e5843008 str r3, [r4, #8] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 30005fa0: e5942004 ldr r2, [r4, #4] 30005fa4: e3520000 cmp r2, #0 ; 0x0 30005fa8: 0a000012 beq 30005ff8 <_CORE_spinlock_Wait+0x98> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 30005fac: e3550000 cmp r5, #0 ; 0x0 30005fb0: 159f50bc ldrne r5, [pc, #188] ; 30006074 <_CORE_spinlock_Wait+0x114> 30005fb4: 0a000018 beq 3000601c <_CORE_spinlock_Wait+0xbc> } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 30005fb8: e3560000 cmp r6, #0 ; 0x0 30005fbc: 0a000002 beq 30005fcc <_CORE_spinlock_Wait+0x6c> 30005fc0: e5983000 ldr r3, [r8] <== NOT EXECUTED 30005fc4: e1570003 cmp r7, r3 <== NOT EXECUTED 30005fc8: 9a000022 bls 30006058 <_CORE_spinlock_Wait+0xf8> <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 30005fcc: e129f00c msr CPSR_fc, ip /* An ISR could occur here */ _Thread_Enable_dispatch(); 30005fd0: eb000480 bl 300071d8 <_Thread_Enable_dispatch> 30005fd4: e5953000 ldr r3, [r5] 30005fd8: e2833001 add r3, r3, #1 ; 0x1 30005fdc: e5853000 str r3, [r5] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 30005fe0: e10fc000 mrs ip, CPSR 30005fe4: e38c30c0 orr r3, ip, #192 ; 0xc0 30005fe8: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 30005fec: e5943004 ldr r3, [r4, #4] 30005ff0: e3530000 cmp r3, #0 ; 0x0 30005ff4: 1affffef bne 30005fb8 <_CORE_spinlock_Wait+0x58> the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 30005ff8: e59f3078 ldr r3, [pc, #120] ; 30006078 <_CORE_spinlock_Wait+0x118> return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 30005ffc: e3a02001 mov r2, #1 ; 0x1 the_spinlock->holder = _Thread_Executing->Object.id; 30006000: e5931000 ldr r1, [r3] return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 30006004: e5842004 str r2, [r4, #4] the_spinlock->holder = _Thread_Executing->Object.id; 30006008: e5913008 ldr r3, [r1, #8] 3000600c: e584300c str r3, [r4, #12] _ISR_Enable( level ); 30006010: e129f00c msr CPSR_fc, ip 30006014: e3a00000 mov r0, #0 ; 0x0 30006018: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 3000601c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 30006020: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30006024: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 30006028: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 3000602c: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED 30006030: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 30006034: e59f303c ldr r3, [pc, #60] ; 30006078 <_CORE_spinlock_Wait+0x118> 30006038: e590000c ldr r0, [r0, #12] 3000603c: e5932000 ldr r2, [r3] 30006040: e5921008 ldr r1, [r2, #8] 30006044: e1500001 cmp r0, r1 30006048: 1affffd1 bne 30005f94 <_CORE_spinlock_Wait+0x34> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 3000604c: e129f00c msr CPSR_fc, ip 30006050: e3a00001 mov r0, #1 ; 0x1 30006054: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { the_spinlock->users -= 1; 30006058: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 3000605c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30006060: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 30006064: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 30006068: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3000606c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 30006070: 300127a4 .word 0x300127a4 30006074: 3001264c .word 0x3001264c 30006078: 30012704 .word 0x30012704 30021b80 <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 30021b80: e10f2000 mrs r2, CPSR <== NOT EXECUTED 30021b84: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 30021b88: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 30021b8c: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 30021b90: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 30021b94: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 30021b98: 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; 30021b9c: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 30021ba0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 30021ba4: e12fff1e bx lr <== NOT EXECUTED 3000a538 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 3000a538: e59f3010 ldr r3, [pc, #16] ; 3000a550 <_Debug_Is_enabled+0x18> <== NOT EXECUTED 3000a53c: e5932000 ldr r2, [r3] <== NOT EXECUTED 3000a540: e1100002 tst r0, r2 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 3000a544: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 3000a548: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 3000a54c: e12fff1e bx lr <== NOT EXECUTED 3000a550: 30017008 .word 0x30017008 3000430c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 3000430c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 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 ]; 30004310: e590c104 ldr ip, [r0, #260] */ void _Event_Surrender( Thread_Control *the_thread ) { 30004314: e1a04000 mov r4, r0 rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; 30004318: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 3000431c: e10f6000 mrs r6, CPSR 30004320: e38630c0 orr r3, r6, #192 ; 0xc0 30004324: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 30004328: e59c0000 ldr r0, [ip] event_condition = (rtems_event_set) the_thread->Wait.count; 3000432c: e5941024 ldr r1, [r4, #36] seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 30004330: e0115000 ands r5, r1, r0 30004334: 0a000022 beq 300043c4 <_Event_Surrender+0xb8> /* * 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() && 30004338: e59f3108 ldr r3, [pc, #264] ; 30004448 <_Event_Surrender+0x13c> 3000433c: e5932000 ldr r2, [r3] 30004340: e3520000 cmp r2, #0 ; 0x0 30004344: 0a000003 beq 30004358 <_Event_Surrender+0x4c> 30004348: e59f30fc ldr r3, [pc, #252] ; 3000444c <_Event_Surrender+0x140> 3000434c: e5932000 ldr r2, [r3] 30004350: e1540002 cmp r4, r2 30004354: 0a000025 beq 300043f0 <_Event_Surrender+0xe4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 30004358: e5943010 ldr r3, [r4, #16] 3000435c: e3130c01 tst r3, #256 ; 0x100 30004360: 0a000015 beq 300043bc <_Event_Surrender+0xb0> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 30004364: e1510005 cmp r1, r5 30004368: 0a000001 beq 30004374 <_Event_Surrender+0x68> 3000436c: e3170002 tst r7, #2 ; 0x2 30004370: 0a000011 beq 300043bc <_Event_Surrender+0xb0> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 30004374: e1e03005 mvn r3, r5 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30004378: e5941028 ldr r1, [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 ); 3000437c: e0033000 and r3, r3, r0 the_thread->Wait.count = 0; 30004380: e3a02000 mov r2, #0 ; 0x0 /* * 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 ); 30004384: e58c3000 str r3, [ip] the_thread->Wait.count = 0; 30004388: e5842024 str r2, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3000438c: e5815000 str r5, [r1] _ISR_Flash( level ); 30004390: e10f3000 mrs r3, CPSR 30004394: e129f006 msr CPSR_fc, r6 30004398: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000439c: e5943050 ldr r3, [r4, #80] 300043a0: e3530002 cmp r3, #2 ; 0x2 300043a4: 0a000008 beq 300043cc <_Event_Surrender+0xc0> _ISR_Enable( level ); 300043a8: e129f006 msr CPSR_fc, r6 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 300043ac: e59f109c ldr r1, [pc, #156] ; 30004450 <_Event_Surrender+0x144> 300043b0: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 300043b4: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 300043b8: ea00081f b 3000643c <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 300043bc: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 300043c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 300043c4: e129f006 msr CPSR_fc, r6 300043c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 300043cc: e3a03003 mov r3, #3 ; 0x3 300043d0: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 300043d4: e129f006 msr CPSR_fc, r6 (void) _Watchdog_Remove( &the_thread->Timer ); 300043d8: e2840048 add r0, r4, #72 ; 0x48 300043dc: eb000e0d bl 30007c18 <_Watchdog_Remove> 300043e0: e59f1068 ldr r1, [pc, #104] ; 30004450 <_Event_Surrender+0x144> 300043e4: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 300043e8: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 300043ec: ea000812 b 3000643c <_Thread_Clear_state> /* * 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() && 300043f0: e59f805c ldr r8, [pc, #92] ; 30004454 <_Event_Surrender+0x148> 300043f4: e5983000 ldr r3, [r8] 300043f8: e3530001 cmp r3, #1 ; 0x1 300043fc: 0a000002 beq 3000440c <_Event_Surrender+0x100> 30004400: e5983000 ldr r3, [r8] 30004404: e3530002 cmp r3, #2 ; 0x2 30004408: 1affffd2 bne 30004358 <_Event_Surrender+0x4c> _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) ) { 3000440c: e1510005 cmp r1, r5 30004410: 0a000001 beq 3000441c <_Event_Surrender+0x110> 30004414: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 30004418: 0a000008 beq 30004440 <_Event_Surrender+0x134> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 3000441c: e1e03005 mvn r3, r5 30004420: e0033000 and r3, r3, r0 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30004424: e5941028 ldr r1, [r4, #40] if ( _ISR_Is_in_progress() && _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 ); 30004428: e58c3000 str r3, [ip] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 3000442c: e3a02003 mov r2, #3 ; 0x3 _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; 30004430: e3a03000 mov r3, #0 ; 0x0 30004434: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 30004438: e5882000 str r2, [r8] ((_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; 3000443c: e5815000 str r5, [r1] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 30004440: e129f006 msr CPSR_fc, r6 30004444: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30004448: 30016fe0 .word 0x30016fe0 3000444c: 30017004 .word 0x30017004 30004450: 1003fff8 .word 0x1003fff8 30004454: 300177f0 .word 0x300177f0 30004458 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 30004458: e52de004 push {lr} ; (str lr, [sp, #-4]!) 3000445c: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 30004460: e1a0100d mov r1, sp 30004464: eb000903 bl 30006878 <_Thread_Get> switch ( location ) { 30004468: e59d2000 ldr r2, [sp] 3000446c: e3520000 cmp r2, #0 ; 0x0 30004470: 1a000013 bne 300044c4 <_Event_Timeout+0x6c> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 30004474: e10f1000 mrs r1, CPSR 30004478: e38130c0 orr r3, r1, #192 ; 0xc0 3000447c: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 30004480: e5903024 ldr r3, [r0, #36] 30004484: e3530000 cmp r3, #0 ; 0x0 30004488: 0a00000f beq 300044cc <_Event_Timeout+0x74> _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 3000448c: e59f3068 ldr r3, [pc, #104] ; 300044fc <_Event_Timeout+0xa4> _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 30004490: e5802024 str r2, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 30004494: e5932000 ldr r2, [r3] 30004498: e1500002 cmp r0, r2 3000449c: 0a000010 beq 300044e4 <_Event_Timeout+0x8c> (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 300044a0: e3a03006 mov r3, #6 ; 0x6 300044a4: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 300044a8: e129f001 msr CPSR_fc, r1 300044ac: e59f104c ldr r1, [pc, #76] ; 30004500 <_Event_Timeout+0xa8> 300044b0: eb0007e1 bl 3000643c <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 300044b4: e59f2048 ldr r2, [pc, #72] ; 30004504 <_Event_Timeout+0xac> 300044b8: e5923000 ldr r3, [r2] 300044bc: e2433001 sub r3, r3, #1 ; 0x1 300044c0: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 300044c4: e28dd004 add sp, sp, #4 ; 0x4 300044c8: e8bd8000 pop {pc} 300044cc: e59f2030 ldr r2, [pc, #48] ; 30004504 <_Event_Timeout+0xac> <== NOT EXECUTED 300044d0: e5923000 ldr r3, [r2] <== NOT EXECUTED 300044d4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 300044d8: e5823000 str r3, [r2] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 300044dc: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 300044e0: eafffff7 b 300044c4 <_Event_Timeout+0x6c> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 300044e4: e59f201c ldr r2, [pc, #28] ; 30004508 <_Event_Timeout+0xb0> <== NOT EXECUTED 300044e8: e5923000 ldr r3, [r2] <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 300044ec: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 300044f0: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED 300044f4: 95823000 strls r3, [r2] <== NOT EXECUTED 300044f8: eaffffe8 b 300044a0 <_Event_Timeout+0x48> <== NOT EXECUTED 300044fc: 30017004 .word 0x30017004 30004500: 1003fff8 .word 0x1003fff8 30004504: 30016f4c .word 0x30016f4c 30004508: 300177f0 .word 0x300177f0 300085d8 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 300085d8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 300085dc: e5909010 ldr r9, [r0, #16] void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 300085e0: e1a07000 mov r7, r0 300085e4: e1a03001 mov r3, r1 300085e8: e24dd010 sub sp, sp, #16 ; 0x10 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 300085ec: e1a00001 mov r0, r1 void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 300085f0: e2433004 sub r3, r3, #4 ; 0x4 void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 300085f4: e1a0b002 mov fp, r2 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 300085f8: e1a01009 mov r1, r9 300085fc: e5972014 ldr r2, [r7, #20] void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 30008600: e58d3004 str r3, [sp, #4] uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 30008604: eb000163 bl 30008b98 <_Heap_Calc_block_size> if(the_size == 0) 30008608: e3500000 cmp r0, #0 ; 0x0 3000860c: e58d0008 str r0, [sp, #8] 30008610: 0a000064 beq 300087a8 <_Heap_Allocate_aligned+0x1d0> */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 30008614: e5975008 ldr r5, [r7, #8] return NULL; if(alignment == 0) 30008618: e35b0000 cmp fp, #0 ; 0x0 3000861c: 03a0b004 moveq fp, #4 ; 0x4 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 30008620: e1570005 cmp r7, r5 30008624: 0a00005f beq 300087a8 <_Heap_Allocate_aligned+0x1d0> 30008628: e3a0a000 mov sl, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000862c: e5953004 ldr r3, [r5, #4] uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 30008630: e59d1008 ldr r1, [sp, #8] 30008634: e3c36001 bic r6, r3, #1 ; 0x1 30008638: e1510006 cmp r1, r6 3000863c: 8a000023 bhi 300086d0 <_Heap_Allocate_aligned+0xf8> return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; aligned_user_addr = block_end - end_to_user_offs; 30008640: e59d3004 ldr r3, [sp, #4] /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 30008644: e0852006 add r2, r5, r6 aligned_user_addr = block_end - end_to_user_offs; 30008648: e0634002 rsb r4, r3, r2 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 3000864c: e1a0100b mov r1, fp 30008650: e1a00004 mov r0, r4 /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 30008654: e58d200c str r2, [sp, #12] 30008658: eb003e68 bl 30018000 <__umodsi3> 3000865c: e0608004 rsb r8, r0, r4 if(block_size >= the_size) { /* the_block is large enough. */ _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 30008660: e1a00008 mov r0, r8 30008664: e1a01009 mov r1, r9 30008668: eb003e64 bl 30018000 <__umodsi3> 3000866c: e2854008 add r4, r5, #8 ; 0x8 30008670: e0602008 rsb r2, r0, r8 only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 30008674: e1540002 cmp r4, r2 30008678: 8a000014 bhi 300086d0 <_Heap_Allocate_aligned+0xf8> /* The block seems to be acceptable. Check if the remainder of 'the_block' is less than 'min_block_size' so that 'the_block' won't actually be split at the address we assume. */ if(user_addr - user_area < the_heap->min_block_size) { 3000867c: e597c014 ldr ip, [r7, #20] 30008680: e0643002 rsb r3, r4, r2 30008684: e153000c cmp r3, ip 30008688: 2a00001c bcs 30008700 <_Heap_Allocate_aligned+0x128> 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 3000868c: e0643008 rsb r3, r4, r8 30008690: e1590003 cmp r9, r3 30008694: 81a02004 movhi r2, r4 30008698: 8a000018 bhi 30008700 <_Heap_Allocate_aligned+0x128> uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 3000869c: e1a00004 mov r0, r4 300086a0: e1a0100b mov r1, fp 300086a4: e58dc000 str ip, [sp] 300086a8: eb003e54 bl 30018000 <__umodsi3> *value = r ? v - r + a : v; 300086ac: e3500000 cmp r0, #0 ; 0x0 300086b0: 1084300b addne r3, r4, fp 300086b4: 10600003 rsbne r0, r0, r3 300086b8: 01a03000 moveq r3, r0 300086bc: 10643000 rsbne r3, r4, r0 300086c0: 01a00004 moveq r0, r4 /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 300086c4: e1590003 cmp r9, r3 300086c8: e59dc000 ldr ip, [sp] 300086cc: 8a000009 bhi 300086f8 <_Heap_Allocate_aligned+0x120> /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 300086d0: e5955008 ldr r5, [r5, #8] 300086d4: e28aa001 add sl, sl, #1 ; 0x1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 300086d8: e1570005 cmp r7, r5 300086dc: 1affffd2 bne 3000862c <_Heap_Allocate_aligned+0x54> 300086e0: e3a00000 mov r0, #0 ; 0x0 } } } } if(stats->max_search < search_count) 300086e4: e5973044 ldr r3, [r7, #68] 300086e8: e153000a cmp r3, sl stats->max_search = search_count; 300086ec: 3587a044 strcc sl, [r7, #68] return user_ptr; } 300086f0: e28dd010 add sp, sp, #16 ; 0x10 300086f4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 300086f8: e1a02004 mov r2, r4 300086fc: e1a08000 mov r8, r0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 30008700: e3580000 cmp r8, #0 ; 0x0 30008704: 0afffff1 beq 300086d0 <_Heap_Allocate_aligned+0xf8> /* The block is indeed acceptable: calculate the size of the block to be allocated and perform allocation. */ uint32_t const alloc_size = block_end - user_addr + HEAP_BLOCK_USER_OFFSET; 30008708: e59d100c ldr r1, [sp, #12] 3000870c: e2813008 add r3, r1, #8 ; 0x8 30008710: e0624003 rsb r4, r2, r3 Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 30008714: e0642006 rsb r2, r4, r6 _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 30008718: e152000c cmp r2, ip /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 3000871c: 23823001 orrcs r3, r2, #1 ; 0x1 30008720: 25853004 strcs r3, [r5, #4] the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 30008724: 27a52002 strcs r2, [r5, r2]! the_block->size = alloc_size; 30008728: 25854004 strcs r4, [r5, #4] _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 3000872c: 2a000007 bcs 30008750 <_Heap_Allocate_aligned+0x178> /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; 30008730: e5973038 ldr r3, [r7, #56] Heap_Block *the_block ) { Heap_Block *block = the_block; Heap_Block *next = block->next; 30008734: e5951008 ldr r1, [r5, #8] Heap_Block *prev = block->prev; 30008738: e595200c ldr r2, [r5, #12] 3000873c: e2433001 sub r3, r3, #1 ; 0x1 prev->next = next; next->prev = prev; 30008740: e581200c str r2, [r1, #12] 30008744: e5873038 str r3, [r7, #56] { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 30008748: e5821008 str r1, [r2, #8] 3000874c: e1a04006 mov r4, r6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30008750: e0852004 add r2, r5, r4 } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 30008754: e5923004 ldr r3, [r2, #4] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 30008758: e1a00008 mov r0, r8 _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 3000875c: e3833001 orr r3, r3, #1 ; 0x1 30008760: e5823004 str r3, [r2, #4] /* Update statistics */ stats->free_size -= alloc_size; 30008764: e5971030 ldr r1, [r7, #48] if(stats->min_free_size > stats->free_size) 30008768: e5973034 ldr r3, [r7, #52] stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 3000876c: e0641001 rsb r1, r4, r1 if(stats->min_free_size > stats->free_size) 30008770: e1510003 cmp r1, r3 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 30008774: e597304c ldr r3, [r7, #76] _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 30008778: e5972040 ldr r2, [r7, #64] stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 3000877c: e5871030 str r1, [r7, #48] if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; 30008780: 35871034 strcc r1, [r7, #52] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; stats->allocs += 1; 30008784: e5971048 ldr r1, [r7, #72] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 30008788: e2833001 add r3, r3, #1 ; 0x1 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 3000878c: e2822001 add r2, r2, #1 ; 0x1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 30008790: e083300a add r3, r3, sl stats->allocs += 1; 30008794: e2811001 add r1, r1, #1 ; 0x1 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 30008798: e5872040 str r2, [r7, #64] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 3000879c: e587304c str r3, [r7, #76] stats->allocs += 1; 300087a0: e5871048 str r1, [r7, #72] 300087a4: eaffffce b 300086e4 <_Heap_Allocate_aligned+0x10c> } } } if(stats->max_search < search_count) stats->max_search = search_count; 300087a8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300087ac: eaffffcf b 300086f0 <_Heap_Allocate_aligned+0x118> <== NOT EXECUTED 3002be10 <_Heap_Get_information>: Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3002be10: e92d0070 push {r4, r5, r6} Heap_Block *the_block = the_heap->start; 3002be14: e5902020 ldr r2, [r0, #32] Heap_Block *const end = the_heap->final; 3002be18: e5906024 ldr r6, [r0, #36] _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 3002be1c: e3a03000 mov r3, #0 ; 0x0 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 3002be20: e1520006 cmp r2, r6 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3002be24: 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; 3002be28: e5813010 str r3, [r1, #16] 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; 3002be2c: e5813000 str r3, [r1] the_info->Free.total = 0; 3002be30: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 3002be34: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 3002be38: e581300c str r3, [r1, #12] the_info->Used.total = 0; 3002be3c: e5813014 str r3, [r1, #20] the_info->Used.largest = 0; while ( the_block != end ) { 3002be40: 0a00001f beq 3002bec4 <_Heap_Get_information+0xb4> 3002be44: e5925004 ldr r5, [r2, #4] 3002be48: ea00000b b 3002be7c <_Heap_Get_information+0x6c> 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++; 3002be4c: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 3002be50: e59c2014 ldr r2, [ip, #20] if ( the_info->Used.largest < the_size ) 3002be54: 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++; 3002be58: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 3002be5c: 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; 3002be60: 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++; 3002be64: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 3002be68: e58c2014 str r2, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 3002be6c: 358c0010 strcc r0, [ip, #16] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 3002be70: e1560004 cmp r6, r4 } else { the_info->Free.number++; the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 3002be74: 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 ) { 3002be78: 0a000011 beq 3002bec4 <_Heap_Get_information+0xb4> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3002be7c: e3c50001 bic r0, r5, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 3002be80: e0824000 add r4, r2, r0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 3002be84: e5945004 ldr r5, [r4, #4] 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) ) { 3002be88: e3150001 tst r5, #1 ; 0x1 3002be8c: 1affffee bne 3002be4c <_Heap_Get_information+0x3c> 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++; 3002be90: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 3002be94: 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++; 3002be98: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 3002be9c: 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; 3002bea0: e0822000 add r2, r2, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 3002bea4: 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++; 3002bea8: e58c3000 str r3, [ip] the_info->Free.total += the_size; 3002beac: 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 ) 3002beb0: e5943000 ldr r3, [r4] 3002beb4: e1530000 cmp r3, r0 3002beb8: 0affffec beq 3002be70 <_Heap_Get_information+0x60> 3002bebc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3002bec0: ea000003 b 3002bed4 <_Heap_Get_information+0xc4> <== NOT EXECUTED } /* 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; 3002bec4: e59c3014 ldr r3, [ip, #20] 3002bec8: e3a00000 mov r0, #0 ; 0x0 3002becc: e2833008 add r3, r3, #8 ; 0x8 3002bed0: e58c3014 str r3, [ip, #20] return HEAP_GET_INFORMATION_SUCCESSFUL; } 3002bed4: e8bd0070 pop {r4, r5, r6} 3002bed8: e12fff1e bx lr 30014b38 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30014b38: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30014b3c: e24dd00c sub sp, sp, #12 ; 0xc 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; *avail_mem_size = 0; 30014b40: e59dc030 ldr ip, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30014b44: e1a04001 mov r4, r1 30014b48: e1a09003 mov r9, r3 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; 30014b4c: e5901014 ldr r1, [r0, #20] uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 30014b50: e3a03000 mov r3, #0 ; 0x0 void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30014b54: e1a05000 mov r5, r0 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; 30014b58: e590b010 ldr fp, [r0, #16] *old_mem_size = 0; 30014b5c: e5893000 str r3, [r9] *avail_mem_size = 0; 30014b60: e58c3000 str r3, [ip] 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; 30014b64: e58d1004 str r1, [sp, #4] /* 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); 30014b68: e1a00004 mov r0, r4 30014b6c: e5951010 ldr r1, [r5, #16] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30014b70: e1a08002 mov r8, r2 30014b74: ebfff84a bl 30012ca4 <__umodsi3> 30014b78: e2442008 sub r2, 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 ); 30014b7c: e595c020 ldr ip, [r5, #32] 30014b80: e5951024 ldr r1, [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); 30014b84: e0606002 rsb r6, r0, r2 *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)) 30014b88: e156000c cmp r6, ip 30014b8c: 33a03000 movcc r3, #0 ; 0x0 30014b90: 23a03001 movcs r3, #1 ; 0x1 30014b94: e1560001 cmp r6, r1 30014b98: 83a03000 movhi r3, #0 ; 0x0 30014b9c: e3530000 cmp r3, #0 ; 0x0 30014ba0: 0a00002d beq 30014c5c <_Heap_Resize_block+0x124> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 30014ba4: e5962004 ldr r2, [r6, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30014ba8: e3c2a001 bic sl, r2, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30014bac: e086700a add r7, r6, sl 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) || 30014bb0: e15c0007 cmp ip, r7 30014bb4: 83a03000 movhi r3, #0 ; 0x0 30014bb8: 93a03001 movls r3, #1 ; 0x1 30014bbc: e1510007 cmp r1, r7 30014bc0: 33a03000 movcc r3, #0 ; 0x0 30014bc4: e3530000 cmp r3, #0 ; 0x0 30014bc8: 0a000023 beq 30014c5c <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 30014bcc: e5973004 ldr r3, [r7, #4] 30014bd0: e3130001 tst r3, #1 ; 0x1 30014bd4: 0a000020 beq 30014c5c <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30014bd8: e3c33001 bic r3, 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) || 30014bdc: e1510007 cmp r1, r7 30014be0: e58d3000 str r3, [sp] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30014be4: e0873003 add r3, r7, r3 30014be8: 15933004 ldrne r3, [r3, #4] 30014bec: 03a01001 moveq r1, #1 ; 0x1 30014bf0: 12033001 andne r3, r3, #1 ; 0x1 30014bf4: 158d3008 strne r3, [sp, #8] _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) 30014bf8: e0643007 rsb r3, r4, r7 30014bfc: e2830004 add r0, r3, #4 ; 0x4 !_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) || 30014c00: 058d1008 streq r1, [sp, #8] old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 30014c04: e1500008 cmp r0, r8 /* 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; 30014c08: e5890000 str r0, [r9] _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; 30014c0c: e2029001 and r9, r2, #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) { 30014c10: 2a000014 bcs 30014c68 <_Heap_Resize_block+0x130> /* 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 */ 30014c14: e59d2008 ldr r2, [sp, #8] 30014c18: e3520000 cmp r2, #0 ; 0x0 30014c1c: 1a00000c bne 30014c54 <_Heap_Resize_block+0x11c> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 30014c20: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 30014c24: e1a00004 mov r0, r4 30014c28: e1a0100b mov r1, fp 30014c2c: ebfff81c bl 30012ca4 <__umodsi3> *value = r ? v - r + a : v; 30014c30: e3500000 cmp r0, #0 ; 0x0 30014c34: 1084300b addne r3, r4, fp 30014c38: e59d2004 ldr r2, [sp, #4] 30014c3c: 10604003 rsbne r4, r0, r3 _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) 30014c40: e59d3000 ldr r3, [sp] 30014c44: e1540002 cmp r4, r2 30014c48: 21a02004 movcs r2, r4 30014c4c: e1530002 cmp r3, r2 30014c50: 2a000049 bcs 30014d7c <_Heap_Resize_block+0x244> } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 30014c54: e3a00001 mov r0, #1 ; 0x1 30014c58: ea000000 b 30014c60 <_Heap_Resize_block+0x128> 30014c5c: e3a00002 mov r0, #2 ; 0x2 } 30014c60: e28dd00c add sp, sp, #12 ; 0xc 30014c64: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 30014c68: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 30014c6c: e1a00004 mov r0, r4 30014c70: e1a0100b mov r1, fp 30014c74: ebfff80a bl 30012ca4 <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 30014c78: e0544000 subs r4, r4, r0 30014c7c: 0a000020 beq 30014d04 <_Heap_Resize_block+0x1cc> 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; if (new_block_size < min_block_size) { 30014c80: e59dc004 ldr ip, [sp, #4] /* 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; 30014c84: e064000a rsb r0, r4, sl if (new_block_size < min_block_size) { 30014c88: e15c0000 cmp ip, r0 30014c8c: 9a000021 bls 30014d18 <_Heap_Resize_block+0x1e0> uint32_t delta = min_block_size - new_block_size; 30014c90: e060300c rsb r3, r0, ip _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 30014c94: e0544003 subs r4, r4, r3 ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 30014c98: 10800003 addne r0, r0, r3 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) { 30014c9c: 1a00001d bne 30014d18 <_Heap_Resize_block+0x1e0> ++stats->resizes; 30014ca0: e5953054 ldr r3, [r5, #84] 30014ca4: e1a00004 mov r0, r4 30014ca8: e2833001 add r3, r3, #1 ; 0x1 30014cac: e5853054 str r3, [r5, #84] 30014cb0: eaffffea b 30014c60 <_Heap_Resize_block+0x128> 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; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { 30014cb4: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 30014cb8: e15c0004 cmp ip, r4 <== NOT EXECUTED 30014cbc: 8a000010 bhi 30014d04 <_Heap_Resize_block+0x1cc> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30014cc0: e0861000 add r1, r6, r0 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 30014cc4: 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; 30014cc8: 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; 30014ccc: e5863004 str r3, [r6, #4] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 30014cd0: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 30014cd4: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 30014cd8: 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 */ 30014cdc: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 30014ce0: 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 */ 30014ce4: 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)); 30014ce8: 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 */ 30014cec: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 30014cf0: e1a00005 mov r0, r5 <== NOT EXECUTED 30014cf4: ebffd6f7 bl 3000a8d8 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 30014cf8: e59d1030 ldr r1, [sp, #48] <== NOT EXECUTED 30014cfc: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 30014d00: e5813000 str r3, [r1] <== NOT EXECUTED } } } ++stats->resizes; 30014d04: e5953054 ldr r3, [r5, #84] 30014d08: e3a00000 mov r0, #0 ; 0x0 30014d0c: e2833001 add r3, r3, #1 ; 0x1 30014d10: e5853054 str r3, [r5, #84] 30014d14: eaffffd1 b 30014c60 <_Heap_Resize_block+0x128> _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) { 30014d18: e59d1008 ldr r1, [sp, #8] 30014d1c: e3510000 cmp r1, #0 ; 0x0 30014d20: 1affffe3 bne 30014cb4 <_Heap_Resize_block+0x17c> /* 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; 30014d24: e59d3000 ldr r3, [sp] _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; next_next_block->prev_size = new_next_block_size; 30014d28: e59dc000 ldr ip, [sp] if (!next_is_used) { /* 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; 30014d2c: e0842003 add r2, r4, r3 30014d30: e0861000 add r1, r6, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 30014d34: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 30014d38: e3820001 orr r0, r2, #1 ; 0x1 next_next_block->prev_size = new_next_block_size; 30014d3c: e787200c str r2, [r7, ip] 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; 30014d40: e5863004 str r3, [r6, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 30014d44: 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; 30014d48: e5953030 ldr r3, [r5, #48] Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 30014d4c: e597000c ldr r0, [r7, #12] 30014d50: e0833004 add r3, r3, r4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 30014d54: e597c008 ldr ip, [r7, #8] 30014d58: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 30014d5c: e59d3030 ldr r3, [sp, #48] 30014d60: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 30014d64: e581c008 str ip, [r1, #8] block->prev = prev; 30014d68: e581000c str r0, [r1, #12] 30014d6c: e5832000 str r2, [r3] next->prev = prev->next = block; 30014d70: e5801008 str r1, [r0, #8] 30014d74: e58c100c str r1, [ip, #12] 30014d78: eaffffe1 b 30014d04 <_Heap_Resize_block+0x1cc> _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) return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 30014d7c: e1a01007 mov r1, r7 30014d80: e1a00005 mov r0, r5 30014d84: ebffc2e5 bl 30005920 <_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; 30014d88: e080000a add r0, r0, sl 30014d8c: e1800009 orr r0, r0, r9 30014d90: e5860004 str r0, [r6, #4] --stats->used_blocks; 30014d94: e5953040 ldr r3, [r5, #64] 30014d98: e2433001 sub r3, r3, #1 ; 0x1 30014d9c: e5853040 str r3, [r5, #64] 30014da0: eaffffd7 b 30014d04 <_Heap_Resize_block+0x1cc> 3000e1b0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000e1b0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 3000e1b4: e5903024 ldr r3, [r0, #36] Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 3000e1b8: e5906020 ldr r6, [r0, #32] bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000e1bc: e24dd004 sub sp, sp, #4 ; 0x4 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 3000e1c0: e58d3000 str r3, [sp] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000e1c4: e5963004 ldr r3, [r6, #4] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 3000e1c8: e251b000 subs fp, r1, #0 ; 0x0 source = the_heap->stats.instance; 3000e1cc: b590b028 ldrlt fp, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000e1d0: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000e1d4: e1a05000 mov r5, r0 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000e1d8: 13a08000 movne r8, #0 ; 0x0 3000e1dc: 0a000086 beq 3000e3fc <_Heap_Walk+0x24c> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); error = 1; } if (the_block->prev_size != the_heap->page_size) { 3000e1e0: e5962000 ldr r2, [r6] 3000e1e4: e5953010 ldr r3, [r5, #16] 3000e1e8: e1520003 cmp r2, r3 3000e1ec: 0a000003 beq 3000e200 <_Heap_Walk+0x50> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 3000e1f0: e59f0238 ldr r0, [pc, #568] ; 3000e430 <_Heap_Walk+0x280> <== NOT EXECUTED 3000e1f4: e1a0100b mov r1, fp <== NOT EXECUTED 3000e1f8: ebffda18 bl 30004a60 <== NOT EXECUTED 3000e1fc: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 3000e200: e59d3000 ldr r3, [sp] 3000e204: e1560003 cmp r6, r3 3000e208: 0a000080 beq 3000e410 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000e20c: e5960004 ldr r0, [r6, #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)) { 3000e210: e5951020 ldr r1, [r5, #32] 3000e214: e3c07001 bic r7, r0, #1 ; 0x1 3000e218: e5952024 ldr r2, [r5, #36] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 3000e21c: e0864007 add r4, r6, r7 3000e220: e1540001 cmp r4, r1 3000e224: 33a03000 movcc r3, #0 ; 0x0 3000e228: 23a03001 movcs r3, #1 ; 0x1 3000e22c: e1540002 cmp r4, r2 3000e230: 83a03000 movhi r3, #0 ; 0x0 3000e234: e3530000 cmp r3, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 3000e238: 1200a001 andne sl, r0, #1 ; 0x1 3000e23c: 11a09004 movne r9, r4 3000e240: 0a000075 beq 3000e41c <_Heap_Walk+0x26c> printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 3000e244: e5943004 ldr r3, [r4, #4] 3000e248: e3130001 tst r3, #1 ; 0x1 3000e24c: 1a00003f bne 3000e350 <_Heap_Walk+0x1a0> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 3000e250: e5943000 ldr r3, [r4] 3000e254: e1530007 cmp r3, r7 3000e258: 0a000003 beq 3000e26c <_Heap_Walk+0xbc> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 3000e25c: e59f01d0 ldr r0, [pc, #464] ; 3000e434 <_Heap_Walk+0x284> <== NOT EXECUTED 3000e260: e1a0100b mov r1, fp <== NOT EXECUTED 3000e264: ebffd9fd bl 30004a60 <== NOT EXECUTED 3000e268: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { 3000e26c: e35a0000 cmp sl, #0 ; 0x0 3000e270: 1a000005 bne 3000e28c <_Heap_Walk+0xdc> if (do_dump || error) printk("\n"); 3000e274: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 3000e278: 1a00005c bne 3000e3f0 <_Heap_Walk+0x240> <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 3000e27c: e59f01b4 ldr r0, [pc, #436] ; 3000e438 <_Heap_Walk+0x288> <== NOT EXECUTED 3000e280: e1a0100b mov r1, fp <== NOT EXECUTED 3000e284: ebffd9f5 bl 30004a60 <== NOT EXECUTED 3000e288: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 3000e28c: e5953008 ldr r3, [r5, #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) 3000e290: e1530006 cmp r3, r6 3000e294: 11550003 cmpne r5, r3 3000e298: 0a000003 beq 3000e2ac <_Heap_Walk+0xfc> block = block->next; 3000e29c: 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) 3000e2a0: e1530006 cmp r3, r6 3000e2a4: 11550003 cmpne r5, r3 3000e2a8: 1afffffb bne 3000e29c <_Heap_Walk+0xec> block = block->next; if(block != the_block) { 3000e2ac: e1530006 cmp r3, r6 3000e2b0: 0a000026 beq 3000e350 <_Heap_Walk+0x1a0> if (do_dump || error) printk("\n"); 3000e2b4: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 3000e2b8: 1a000049 bne 3000e3e4 <_Heap_Walk+0x234> <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 3000e2bc: e59f0178 ldr r0, [pc, #376] ; 3000e43c <_Heap_Walk+0x28c> <== NOT EXECUTED 3000e2c0: e1a0100b mov r1, fp <== NOT EXECUTED 3000e2c4: ebffd9e5 bl 30004a60 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 3000e2c8: e59f0170 ldr r0, [pc, #368] ; 3000e440 <_Heap_Walk+0x290> <== NOT EXECUTED 3000e2cc: ebffd9e3 bl 30004a60 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 3000e2d0: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 3000e2d4: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 3000e2d8: e1530007 cmp r3, r7 <== NOT EXECUTED 3000e2dc: 8a000020 bhi 3000e364 <_Heap_Walk+0x1b4> <== NOT EXECUTED printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 3000e2e0: e1a00007 mov r0, r7 3000e2e4: e5951010 ldr r1, [r5, #16] 3000e2e8: eb002744 bl 30018000 <__umodsi3> 3000e2ec: e3500000 cmp r0, #0 ; 0x0 3000e2f0: 1a000031 bne 3000e3bc <_Heap_Walk+0x20c> printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 3000e2f4: e3580000 cmp r8, #0 ; 0x0 3000e2f8: 1a000032 bne 3000e3c8 <_Heap_Walk+0x218> 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 ) { 3000e2fc: e59d3000 ldr r3, [sp] 3000e300: e1530004 cmp r3, r4 3000e304: 0a000041 beq 3000e410 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000e308: e5940004 ldr r0, [r4, #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)) { 3000e30c: e5951020 ldr r1, [r5, #32] 3000e310: e3c07001 bic r7, r0, #1 ; 0x1 3000e314: e5952024 ldr r2, [r5, #36] 3000e318: e0844007 add r4, r4, r7 3000e31c: e1540001 cmp r4, r1 3000e320: 33a03000 movcc r3, #0 ; 0x0 3000e324: 23a03001 movcs r3, #1 ; 0x1 3000e328: e1540002 cmp r4, r2 3000e32c: 83a03000 movhi r3, #0 ; 0x0 3000e330: e3530000 cmp r3, #0 ; 0x0 3000e334: 0a000037 beq 3000e418 <_Heap_Walk+0x268> printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 3000e338: e5943004 ldr r3, [r4, #4] */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 3000e33c: e1a06009 mov r6, r9 3000e340: e3130001 tst r3, #1 ; 0x1 3000e344: e200a001 and sl, r0, #1 ; 0x1 3000e348: e1a09004 mov r9, r4 3000e34c: 0affffbf beq 3000e250 <_Heap_Walk+0xa0> error = 1; } } } if (do_dump || error) printk("\n"); 3000e350: e3580000 cmp r8, #0 ; 0x0 3000e354: 1affffdb bne 3000e2c8 <_Heap_Walk+0x118> if (the_size < the_heap->min_block_size) { 3000e358: e5953014 ldr r3, [r5, #20] 3000e35c: e1530007 cmp r3, r7 3000e360: 9affffde bls 3000e2e0 <_Heap_Walk+0x130> printk("PASS: %d !block size is too small\n", source); 3000e364: e59f00d8 ldr r0, [pc, #216] ; 3000e444 <_Heap_Walk+0x294> <== NOT EXECUTED 3000e368: e1a0100b mov r1, fp <== NOT EXECUTED 3000e36c: ebffd9bb bl 30004a60 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 3000e370: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000e374: e59f00cc ldr r0, [pc, #204] ; 3000e448 <_Heap_Walk+0x298> <== NOT EXECUTED 3000e378: e1a0100b mov r1, fp <== NOT EXECUTED 3000e37c: e1a02006 mov r2, r6 <== NOT EXECUTED 3000e380: ebffd9b6 bl 30004a60 <== NOT EXECUTED 3000e384: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000e388: e5963004 ldr r3, [r6, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 3000e38c: e5950010 ldr r0, [r5, #16] 3000e390: e3c32001 bic r2, r3, #1 ; 0x1 3000e394: e1500002 cmp r0, r2 3000e398: 01a00008 moveq r0, r8 3000e39c: 0a000004 beq 3000e3b4 <_Heap_Walk+0x204> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 3000e3a0: e1a03000 mov r3, r0 <== NOT EXECUTED 3000e3a4: e1a0100b mov r1, fp <== NOT EXECUTED 3000e3a8: e59f009c ldr r0, [pc, #156] ; 3000e44c <_Heap_Walk+0x29c> <== NOT EXECUTED 3000e3ac: ebffd9ab bl 30004a60 <== NOT EXECUTED 3000e3b0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 3000e3b4: e28dd004 add sp, sp, #4 ; 0x4 3000e3b8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); 3000e3bc: e59f008c ldr r0, [pc, #140] ; 3000e450 <_Heap_Walk+0x2a0> <== NOT EXECUTED 3000e3c0: e1a0100b mov r1, fp <== NOT EXECUTED 3000e3c4: ebffd9a5 bl 30004a60 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 3000e3c8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000e3cc: e59f0074 ldr r0, [pc, #116] ; 3000e448 <_Heap_Walk+0x298> <== NOT EXECUTED 3000e3d0: e1a0100b mov r1, fp <== NOT EXECUTED 3000e3d4: e1a02006 mov r2, r6 <== NOT EXECUTED 3000e3d8: ebffd9a0 bl 30004a60 <== NOT EXECUTED 3000e3dc: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED 3000e3e0: eaffffe8 b 3000e388 <_Heap_Walk+0x1d8> <== NOT EXECUTED { /* 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; if(block != the_block) { if (do_dump || error) printk("\n"); 3000e3e4: e59f0054 ldr r0, [pc, #84] ; 3000e440 <_Heap_Walk+0x290> <== NOT EXECUTED 3000e3e8: ebffd99c bl 30004a60 <== NOT EXECUTED 3000e3ec: eaffffb2 b 3000e2bc <_Heap_Walk+0x10c> <== NOT EXECUTED if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); 3000e3f0: e59f0048 ldr r0, [pc, #72] ; 3000e440 <_Heap_Walk+0x290> <== NOT EXECUTED 3000e3f4: ebffd999 bl 30004a60 <== NOT EXECUTED 3000e3f8: eaffff9f b 3000e27c <_Heap_Walk+0xcc> <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 3000e3fc: e59f0050 ldr r0, [pc, #80] ; 3000e454 <_Heap_Walk+0x2a4> <== NOT EXECUTED 3000e400: e1a0100b mov r1, fp <== NOT EXECUTED 3000e404: ebffd995 bl 30004a60 <== NOT EXECUTED 3000e408: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED 3000e40c: eaffff73 b 3000e1e0 <_Heap_Walk+0x30> <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 3000e410: e59d6000 ldr r6, [sp] 3000e414: eaffffdb b 3000e388 <_Heap_Walk+0x1d8> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 3000e418: e1a06009 mov r6, r9 <== NOT EXECUTED printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 3000e41c: e1a02004 mov r2, r4 <== NOT EXECUTED 3000e420: e59f0030 ldr r0, [pc, #48] ; 3000e458 <_Heap_Walk+0x2a8> <== NOT EXECUTED 3000e424: e1a0100b mov r1, fp <== NOT EXECUTED 3000e428: ebffd98c bl 30004a60 <== NOT EXECUTED 3000e42c: eaffffe5 b 3000e3c8 <_Heap_Walk+0x218> <== NOT EXECUTED 3000e430: 3001b350 .word 0x3001b350 3000e434: 3001b3a8 .word 0x3001b3a8 3000e438: 3001b3d4 .word 0x3001b3d4 3000e43c: 3001b400 .word 0x3001b400 3000e440: 3001a930 .word 0x3001a930 3000e444: 3001b42c .word 0x3001b42c 3000e448: 3001b474 .word 0x3001b474 3000e44c: 3001b4b0 .word 0x3001b4b0 3000e450: 3001b450 .word 0x3001b450 3000e454: 3001b318 .word 0x3001b318 3000e458: 3001b384 .word 0x3001b384 3000aac8 <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 3000aac8: e2400001 sub r0, r0, #1 ; 0x1 3000aacc: e3500003 cmp r0, #3 ; 0x3 3000aad0: 979ff100 ldrls pc, [pc, r0, lsl #2] 3000aad4: ea000003 b 3000aae8 <_Objects_API_maximum_class+0x20> 3000aad8: 3000ab08 .word 0x3000ab08 <== NOT EXECUTED 3000aadc: 3000ab00 .word 0x3000ab00 <== NOT EXECUTED 3000aae0: 3000aaf8 .word 0x3000aaf8 <== NOT EXECUTED 3000aae4: 3000aaf0 .word 0x3000aaf0 <== NOT EXECUTED case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; 3000aae8: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } 3000aaec: 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; 3000aaf0: e3a00008 mov r0, #8 ; 0x8 3000aaf4: e12fff1e bx lr int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 3000aaf8: e3a0000c mov r0, #12 ; 0xc 3000aafc: e12fff1e bx lr 3000ab00: e3a0000a mov r0, #10 ; 0xa 3000ab04: e12fff1e bx lr 3000ab08: e3a00002 mov r0, #2 ; 0x2 3000ab0c: e12fff1e bx lr 30005af0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 30005af0: 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; 30005af4: e1d0a0b8 ldrh sl, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005af8: e1d091b0 ldrh r9, [r0, #16] */ void _Objects_Extend_information( Objects_Information *information ) { 30005afc: 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 ) 30005b00: e159000a cmp r9, sl */ void _Objects_Extend_information( Objects_Information *information ) { 30005b04: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005b08: 2a000071 bcs 30005cd4 <_Objects_Extend_information+0x1e4> 30005b0c: e3a04000 mov r4, #0 ; 0x0 30005b10: e5907014 ldr r7, [r0, #20] 30005b14: e1a0800a mov r8, sl 30005b18: e1a06004 mov r6, r4 30005b1c: e3a0b001 mov fp, #1 ; 0x1 30005b20: e3a00003 mov r0, #3 ; 0x3 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 30005b24: e5d53012 ldrb r3, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 30005b28: e0879009 add r9, r7, r9 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 30005b2c: e3530000 cmp r3, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 30005b30: e58d9004 str r9, [sp, #4] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 30005b34: 1a000080 bne 30005d3c <_Objects_Extend_information+0x24c> if ( !object_blocks ) return; } else { object_blocks = (void**) 30005b38: e59d3004 ldr r3, [sp, #4] 30005b3c: e080000a add r0, r0, sl 30005b40: e0800003 add r0, r0, r3 30005b44: e1a00100 lsl r0, r0, #2 30005b48: eb00088c bl 30007d80 <_Workspace_Allocate_or_fatal_error> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005b4c: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005b50: e1a0210b lsl r2, fp, #2 if ( !object_blocks ) return; } else { object_blocks = (void**) 30005b54: e1a0c000 mov ip, r0 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005b58: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005b5c: e153000a cmp r3, sl 30005b60: e0897002 add r7, r9, r2 30005b64: 8a000080 bhi 30005d6c <_Objects_Extend_information+0x27c> else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30005b68: e35a0000 cmp sl, #0 ; 0x0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 30005b6c: 13a03000 movne r3, #0 ; 0x0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 30005b70: 11a02003 movne r2, r3 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30005b74: 0a000003 beq 30005b88 <_Objects_Extend_information+0x98> local_table[ index ] = NULL; 30005b78: e7872103 str r2, [r7, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30005b7c: e2833001 add r3, r3, #1 ; 0x1 30005b80: e153000a cmp r3, sl 30005b84: 3afffffb bcc 30005b78 <_Objects_Extend_information+0x88> 30005b88: e1a04104 lsl r4, r4, #2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30005b8c: e3a00000 mov r0, #0 ; 0x0 inactive_per_block[block_count] = 0; 30005b90: e7890004 str r0, [r9, r4] for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005b94: e5953014 ldr r3, [r5, #20] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30005b98: e78c0004 str r0, [ip, r4] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005b9c: e0881003 add r1, r8, r3 30005ba0: e1580001 cmp r8, r1 30005ba4: 2a000006 bcs 30005bc4 <_Objects_Extend_information+0xd4> 30005ba8: e1a03108 lsl r3, r8, #2 30005bac: e0872003 add r2, r7, r3 30005bb0: e1a03008 mov r3, r8 index++ ) { 30005bb4: e2833001 add r3, r3, #1 ; 0x1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005bb8: e1530001 cmp r3, r1 index++ ) { local_table[ index ] = NULL; 30005bbc: e4820004 str r0, [r2], #4 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005bc0: 3afffffb bcc 30005bb4 <_Objects_Extend_information+0xc4> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 30005bc4: e10f0000 mrs r0, CPSR 30005bc8: e38030c0 orr r3, r0, #192 ; 0xc0 30005bcc: 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( 30005bd0: 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; 30005bd4: e59de004 ldr lr, [sp, #4] information->maximum_id = _Objects_Build_id( 30005bd8: e1d510b4 ldrh r1, [r5, #4] 30005bdc: 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; 30005be0: e1a0280e lsl r2, lr, #16 information->maximum_id = _Objects_Build_id( 30005be4: 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; 30005be8: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 30005bec: e1833d81 orr r3, r3, r1, lsl #27 30005bf0: e1833002 orr r3, r3, r2 30005bf4: 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; 30005bf8: e5859030 str r9, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 30005bfc: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 30005c00: e585701c str r7, [r5, #28] information->maximum = maximum; 30005c04: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 30005c08: e585c034 str ip, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 30005c0c: e129f000 msr CPSR_fc, r0 if ( old_tables ) 30005c10: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 30005c14: 11a00003 movne r0, r3 30005c18: 1b000850 blne 30007d60 <_Workspace_Free> 30005c1c: e5957014 ldr r7, [r5, #20] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 30005c20: e5d53012 ldrb r3, [r5, #18] 30005c24: e3530000 cmp r3, #0 ; 0x0 30005c28: 0a000061 beq 30005db4 <_Objects_Extend_information+0x2c4> information->object_blocks[ block ] = 30005c2c: e5953018 ldr r3, [r5, #24] 30005c30: e5954034 ldr r4, [r5, #52] 30005c34: e0000793 mul r0, r3, r7 30005c38: eb00084c bl 30007d70 <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 30005c3c: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 30005c40: e7840106 str r0, [r4, r6, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 30005c44: e7931106 ldr r1, [r3, r6, lsl #2] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 30005c48: e1a0a106 lsl sl, r6, #2 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 30005c4c: e3510000 cmp r1, #0 ; 0x0 30005c50: 0a00001d beq 30005ccc <_Objects_Extend_information+0x1dc> /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30005c54: e28d7008 add r7, sp, #8 ; 0x8 30005c58: e1a00007 mov r0, r7 30005c5c: e5952014 ldr r2, [r5, #20] 30005c60: e5953018 ldr r3, [r5, #24] 30005c64: eb001264 bl 3000a5fc <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005c68: e1a04008 mov r4, r8 30005c6c: e2856020 add r6, r5, #32 ; 0x20 30005c70: ea000008 b 30005c98 <_Objects_Extend_information+0x1a8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 30005c74: e5953000 ldr r3, [r5] 30005c78: e1d520b4 ldrh r2, [r5, #4] 30005c7c: e1a03c03 lsl r3, r3, #24 30005c80: e3833801 orr r3, r3, #65536 ; 0x10000 30005c84: e1833d82 orr r3, r3, r2, lsl #27 30005c88: e1833004 orr r3, r3, r4 30005c8c: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005c90: ebfffd75 bl 3000526c <_Chain_Append> index++; 30005c94: e2844001 add r4, r4, #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 ) { 30005c98: e1a00007 mov r0, r7 30005c9c: eb001249 bl 3000a5c8 <_Chain_Get> 30005ca0: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005ca4: e1a0100c mov r1, ip 30005ca8: e1a00006 mov r0, r6 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 30005cac: 1afffff0 bne 30005c74 <_Objects_Extend_information+0x184> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005cb0: e5951030 ldr r1, [r5, #48] 30005cb4: e5952014 ldr r2, [r5, #20] information->inactive += information->allocation_size; 30005cb8: e1d502bc ldrh r0, [r5, #44] _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005cbc: e781200a str r2, [r1, sl] information->inactive += information->allocation_size; 30005cc0: e5953014 ldr r3, [r5, #20] 30005cc4: e0833000 add r3, r3, r0 30005cc8: e1c532bc strh r3, [r5, #44] } 30005ccc: e28dd014 add sp, sp, #20 ; 0x14 30005cd0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 30005cd4: e5907014 ldr r7, [r0, #20] 30005cd8: e1a00009 mov r0, r9 30005cdc: e1a01007 mov r1, r7 30005ce0: eb0033ab bl 30012b94 <__aeabi_uidiv> for ( ; block < block_count; block++ ) { 30005ce4: e2504000 subs r4, r0, #0 ; 0x0 30005ce8: 0a00003a beq 30005dd8 <_Objects_Extend_information+0x2e8> if ( information->object_blocks[ block ] == NULL ) 30005cec: e5952034 ldr r2, [r5, #52] 30005cf0: e5923000 ldr r3, [r2] 30005cf4: e3530000 cmp r3, #0 ; 0x0 30005cf8: 11a0800a movne r8, sl 30005cfc: 13a06000 movne r6, #0 ; 0x0 30005d00: 1a000003 bne 30005d14 <_Objects_Extend_information+0x224> 30005d04: ea000033 b 30005dd8 <_Objects_Extend_information+0x2e8> <== NOT EXECUTED 30005d08: e7923106 ldr r3, [r2, r6, lsl #2] 30005d0c: e3530000 cmp r3, #0 ; 0x0 30005d10: 0a000003 beq 30005d24 <_Objects_Extend_information+0x234> if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30005d14: e2866001 add r6, r6, #1 ; 0x1 30005d18: e1540006 cmp r4, r6 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 30005d1c: e0888007 add r8, r8, r7 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30005d20: 8afffff8 bhi 30005d08 <_Objects_Extend_information+0x218> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 30005d24: e1580009 cmp r8, r9 30005d28: 3affffbc bcc 30005c20 <_Objects_Extend_information+0x130> 30005d2c: e284b001 add fp, r4, #1 ; 0x1 30005d30: e1a0308b lsl r3, fp, #1 30005d34: e083000b add r0, r3, fp 30005d38: eaffff79 b 30005b24 <_Objects_Extend_information+0x34> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 30005d3c: e080000a add r0, r0, sl 30005d40: e0800009 add r0, r0, r9 30005d44: e1a00100 lsl r0, r0, #2 30005d48: eb000808 bl 30007d70 <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 30005d4c: e250c000 subs ip, r0, #0 ; 0x0 30005d50: 0affffdd beq 30005ccc <_Objects_Extend_information+0x1dc> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005d54: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005d58: e1a0210b lsl r2, fp, #2 30005d5c: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005d60: e153000a cmp r3, sl 30005d64: e0897002 add r7, r9, r2 30005d68: 9affff7e bls 30005b68 <_Objects_Extend_information+0x78> /* * 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, 30005d6c: e1a04104 lsl r4, r4, #2 30005d70: e1a0000c mov r0, ip 30005d74: e5951034 ldr r1, [r5, #52] 30005d78: e1a02004 mov r2, r4 30005d7c: e58dc000 str ip, [sp] 30005d80: eb001a22 bl 3000c610 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 30005d84: e5951030 ldr r1, [r5, #48] 30005d88: e1a02004 mov r2, r4 30005d8c: e1a00009 mov r0, r9 30005d90: eb001a1e bl 3000c610 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 30005d94: e1d521b0 ldrh r2, [r5, #16] 30005d98: e1a00007 mov r0, r7 30005d9c: e08a2002 add r2, sl, r2 30005da0: e1a02102 lsl r2, r2, #2 30005da4: e595101c ldr r1, [r5, #28] 30005da8: eb001a18 bl 3000c610 30005dac: e59dc000 ldr ip, [sp] 30005db0: eaffff75 b 30005b8c <_Objects_Extend_information+0x9c> if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 30005db4: e5953018 ldr r3, [r5, #24] 30005db8: e5954034 ldr r4, [r5, #52] 30005dbc: e0000793 mul r0, r3, r7 30005dc0: eb0007ee bl 30007d80 <_Workspace_Allocate_or_fatal_error> 30005dc4: e5953034 ldr r3, [r5, #52] 30005dc8: e7840106 str r0, [r4, r6, lsl #2] 30005dcc: e7931106 ldr r1, [r3, r6, lsl #2] 30005dd0: e1a0a106 lsl sl, r6, #2 30005dd4: eaffff9e b 30005c54 <_Objects_Extend_information+0x164> if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30005dd8: e1a0800a mov r8, sl <== NOT EXECUTED 30005ddc: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 30005de0: eaffffcf b 30005d24 <_Objects_Extend_information+0x234> <== NOT EXECUTED 30015cb8 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 30015cb8: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 30015cbc: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 30015cc0: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 30015cc4: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 30015cc8: 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; 30015ccc: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 30015cd0: e1a05000 mov r5, r0 <== NOT EXECUTED 30015cd4: e1a06002 mov r6, r2 <== NOT EXECUTED 30015cd8: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 30015cdc: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 30015ce0: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 30015ce4: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 30015ce8: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 30015cec: e15c0003 cmp ip, r3 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 30015cf0: e1a01004 mov r1, r4 <== NOT EXECUTED 30015cf4: e1a00005 mov r0, r5 <== NOT EXECUTED 30015cf8: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 30015cfc: 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) 30015d00: 3a000005 bcc 30015d1c <_Objects_Get_next+0x64> <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 30015d04: ebffd7d3 bl 3000bc58 <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 30015d08: e5963000 ldr r3, [r6] <== NOT EXECUTED 30015d0c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30015d10: 1afffff2 bne 30015ce0 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 30015d14: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 30015d18: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 30015d1c: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 30015d20: e3e02000 mvn r2, #0 ; 0x0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 30015d24: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 30015d28: e5872000 str r2, [r7] <== NOT EXECUTED 30015d2c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30015d30: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 300050ec <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 300050ec: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 300050f0: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 300050f4: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 300050f8: 0a00000b beq 3000512c <_POSIX_Condition_variables_Get+0x40> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 300050fc: e5951000 ldr r1, [r5] 30005100: e3710001 cmn r1, #1 ; 0x1 30005104: 0a000003 beq 30005118 <_POSIX_Condition_variables_Get+0x2c> /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 30005108: e59f002c ldr r0, [pc, #44] ; 3000513c <_POSIX_Condition_variables_Get+0x50> 3000510c: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 30005110: e8bd4030 pop {r4, r5, lr} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 30005114: ea000b81 b 30007f20 <_Objects_Get> if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 30005118: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 3000511c: eb000007 bl 30005140 <== NOT EXECUTED if ( status ) { 30005120: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30005124: 05951000 ldreq r1, [r5] <== NOT EXECUTED 30005128: 0afffff6 beq 30005108 <_POSIX_Condition_variables_Get+0x1c> <== NOT EXECUTED *location = OBJECTS_ERROR; 3000512c: e3a03001 mov r3, #1 ; 0x1 30005130: e5843000 str r3, [r4] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 30005134: e3a00000 mov r0, #0 ; 0x0 30005138: e8bd8030 pop {r4, r5, pc} 3000513c: 30016044 .word 0x30016044 300052d4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 300052d4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 300052d8: e1a06001 mov r6, r1 300052dc: e24dd004 sub sp, sp, #4 ; 0x4 300052e0: 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 ) ) { 300052e4: e1a0100d mov r1, sp 300052e8: e1a00006 mov r0, r6 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 300052ec: e1a0a002 mov sl, r2 300052f0: 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 ) ) { 300052f4: eb000071 bl 300054c0 <_POSIX_Mutex_Get> 300052f8: e3500000 cmp r0, #0 ; 0x0 300052fc: 0a00001d beq 30005378 <_POSIX_Condition_variables_Wait_support+0xa4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30005300: e59f30d8 ldr r3, [pc, #216] ; 300053e0 <_POSIX_Condition_variables_Wait_support+0x10c> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30005304: e1a0100d mov r1, sp 30005308: e5932000 ldr r2, [r3] 3000530c: e1a00007 mov r0, r7 30005310: e2422001 sub r2, r2, #1 ; 0x1 30005314: e5832000 str r2, [r3] 30005318: ebffff73 bl 300050ec <_POSIX_Condition_variables_Get> switch ( location ) { 3000531c: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30005320: e1a05000 mov r5, r0 switch ( location ) { 30005324: e3530000 cmp r3, #0 ; 0x0 30005328: 1a000012 bne 30005378 <_POSIX_Condition_variables_Wait_support+0xa4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 3000532c: e5902014 ldr r2, [r0, #20] 30005330: e3520000 cmp r2, #0 ; 0x0 30005334: 0a000005 beq 30005350 <_POSIX_Condition_variables_Wait_support+0x7c> 30005338: e5963000 ldr r3, [r6] 3000533c: e1520003 cmp r2, r3 30005340: 0a000002 beq 30005350 <_POSIX_Condition_variables_Wait_support+0x7c> _Thread_Enable_dispatch(); 30005344: eb000d13 bl 30008798 <_Thread_Enable_dispatch> <== NOT EXECUTED 30005348: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED 3000534c: ea00000a b 3000537c <_POSIX_Condition_variables_Wait_support+0xa8> <== NOT EXECUTED return EINVAL; } (void) pthread_mutex_unlock( mutex ); 30005350: e1a00006 mov r0, r6 30005354: eb0000e9 bl 30005700 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 30005358: e3580000 cmp r8, #0 ; 0x0 3000535c: 0a000009 beq 30005388 <_POSIX_Condition_variables_Wait_support+0xb4> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 30005360: eb000d0c bl 30008798 <_Thread_Enable_dispatch> 30005364: e3a04074 mov r4, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 30005368: e1a00006 mov r0, r6 3000536c: eb0000c2 bl 3000567c if ( mutex_status ) 30005370: e3500000 cmp r0, #0 ; 0x0 30005374: 0a000000 beq 3000537c <_POSIX_Condition_variables_Wait_support+0xa8> 30005378: e3a04016 mov r4, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 3000537c: e1a00004 mov r0, r4 30005380: e28dd004 add sp, sp, #4 ; 0x4 30005384: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 30005388: e5963000 ldr r3, [r6] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 3000538c: e59f4050 ldr r4, [pc, #80] ; 300053e4 <_POSIX_Condition_variables_Wait_support+0x110> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 30005390: e5853014 str r3, [r5, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 30005394: e5942000 ldr r2, [r4] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 30005398: e5971000 ldr r1, [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; 3000539c: e285c018 add ip, r5, #24 ; 0x18 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; 300053a0: e3a03001 mov r3, #1 ; 0x1 _Thread_Executing->Wait.id = *cond; 300053a4: e5821020 str r1, [r2, #32] 300053a8: 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; 300053ac: 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; 300053b0: 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 ); 300053b4: e1a0000c mov r0, ip 300053b8: e1a0100a mov r1, sl 300053bc: e59f2024 ldr r2, [pc, #36] ; 300053e8 <_POSIX_Condition_variables_Wait_support+0x114> 300053c0: eb000e39 bl 30008cac <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 300053c4: eb000cf3 bl 30008798 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 300053c8: e5943000 ldr r3, [r4] 300053cc: e5934034 ldr r4, [r3, #52] if ( status && status != ETIMEDOUT ) 300053d0: e3540000 cmp r4, #0 ; 0x0 300053d4: 13540074 cmpne r4, #116 ; 0x74 300053d8: 0affffe2 beq 30005368 <_POSIX_Condition_variables_Wait_support+0x94> 300053dc: eaffffe6 b 3000537c <_POSIX_Condition_variables_Wait_support+0xa8> <== NOT EXECUTED 300053e0: 30015c2c .word 0x30015c2c 300053e4: 30015ce4 .word 0x30015ce4 300053e8: 30009148 .word 0x30009148 30010afc <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 30010afc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30010b00: e1a08001 mov r8, r1 30010b04: 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 ); 30010b08: e3a010ff mov r1, #255 ; 0xff const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 30010b0c: e1a04002 mov r4, r2 30010b10: e1a0b003 mov fp, r3 30010b14: 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 ); 30010b18: eb001259 bl 30015484 if ( n > NAME_MAX ) 30010b1c: 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 ); 30010b20: e1a05000 mov r5, r0 if ( n > NAME_MAX ) 30010b24: 83a0005b movhi r0, #91 ; 0x5b 30010b28: 8a000031 bhi 30010bf4 <_POSIX_Message_queue_Create_support+0xf8> 30010b2c: e59f2148 ldr r2, [pc, #328] ; 30010c7c <_POSIX_Message_queue_Create_support+0x180> 30010b30: e5923000 ldr r3, [r2] 30010b34: e2833001 add r3, r3, #1 ; 0x1 30010b38: 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 ) { 30010b3c: e3540000 cmp r4, #0 ; 0x0 30010b40: 03a0a010 moveq sl, #16 ; 0x10 30010b44: 03a0700a moveq r7, #10 ; 0xa 30010b48: 0a000009 beq 30010b74 <_POSIX_Message_queue_Create_support+0x78> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 30010b4c: e5943004 ldr r3, [r4, #4] 30010b50: e3530000 cmp r3, #0 ; 0x0 30010b54: da000033 ble 30010c28 <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 30010b58: e5943008 ldr r3, [r4, #8] 30010b5c: e3530000 cmp r3, #0 ; 0x0 30010b60: da000030 ble 30010c28 <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 30010b64: e894000f ldm r4, {r0, r1, r2, r3} 30010b68: e88d000f stm sp, {r0, r1, r2, r3} 30010b6c: e1a0a002 mov sl, r2 30010b70: e1a07001 mov r7, r1 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 30010b74: e59f6104 ldr r6, [pc, #260] ; 30010c80 <_POSIX_Message_queue_Create_support+0x184> 30010b78: e1a00006 mov r0, r6 30010b7c: ebffef9a bl 3000c9ec <_Objects_Allocate> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 30010b80: e2504000 subs r4, r0, #0 ; 0x0 30010b84: 0a000036 beq 30010c64 <_POSIX_Message_queue_Create_support+0x168> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 30010b88: 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); 30010b8c: e1a00005 mov r0, r5 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 30010b90: e5848010 str r8, [r4, #16] the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 30010b94: 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; 30010b98: e5c43014 strb r3, [r4, #20] the_mq->open_count = 1; 30010b9c: 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); 30010ba0: ebfff8b1 bl 3000ee6c <_Workspace_Allocate> if (!name) { 30010ba4: e2505000 subs r5, r0, #0 ; 0x0 30010ba8: 0a000024 beq 30010c40 <_POSIX_Message_queue_Create_support+0x144> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 30010bac: 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; 30010bb0: e3a08000 mov r8, #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 ); 30010bb4: eb000fb9 bl 30014aa0 * 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; 30010bb8: e584805c str r8, [r4, #92] if ( ! _CORE_message_queue_Initialize( 30010bbc: e1a02007 mov r2, r7 30010bc0: e1a0300a mov r3, sl 30010bc4: e284001c add r0, r4, #28 ; 0x1c 30010bc8: e284105c add r1, r4, #92 ; 0x5c 30010bcc: eb00037e bl 300119cc <_CORE_message_queue_Initialize> 30010bd0: e1500008 cmp r0, r8 30010bd4: 0a000008 beq 30010bfc <_POSIX_Message_queue_Create_support+0x100> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30010bd8: e596201c ldr r2, [r6, #28] 30010bdc: e1d430b8 ldrh r3, [r4, #8] 30010be0: 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; 30010be4: e584500c str r5, [r4, #12] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 30010be8: e58b4000 str r4, [fp] _Thread_Enable_dispatch(); 30010bec: ebfff311 bl 3000d838 <_Thread_Enable_dispatch> 30010bf0: e1a00008 mov r0, r8 return 0; } 30010bf4: e28dd010 add sp, sp, #16 ; 0x10 30010bf8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 30010bfc: e1a01004 mov r1, r4 <== NOT EXECUTED 30010c00: e1a00006 mov r0, r6 <== NOT EXECUTED 30010c04: ebfff060 bl 3000cd8c <_Objects_Free> <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 30010c08: e1a00005 mov r0, r5 <== NOT EXECUTED 30010c0c: ebfff892 bl 3000ee5c <_Workspace_Free> <== NOT EXECUTED _Thread_Enable_dispatch(); 30010c10: ebfff308 bl 3000d838 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 30010c14: eb000a69 bl 300135c0 <__errno> <== NOT EXECUTED 30010c18: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 30010c1c: e5803000 str r3, [r0] <== NOT EXECUTED 30010c20: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30010c24: eafffff2 b 30010bf4 <_POSIX_Message_queue_Create_support+0xf8> <== NOT EXECUTED _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 30010c28: ebfff302 bl 3000d838 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 30010c2c: eb000a63 bl 300135c0 <__errno> 30010c30: e3a03016 mov r3, #22 ; 0x16 30010c34: e5803000 str r3, [r0] 30010c38: e3e00000 mvn r0, #0 ; 0x0 30010c3c: eaffffec b 30010bf4 <_POSIX_Message_queue_Create_support+0xf8> 30010c40: e1a00006 mov r0, r6 <== NOT EXECUTED 30010c44: e1a01004 mov r1, r4 <== NOT EXECUTED 30010c48: ebfff04f bl 3000cd8c <_Objects_Free> <== NOT EXECUTED */ name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 30010c4c: ebfff2f9 bl 3000d838 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 30010c50: eb000a5a bl 300135c0 <__errno> <== NOT EXECUTED 30010c54: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 30010c58: e5803000 str r3, [r0] <== NOT EXECUTED 30010c5c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30010c60: eaffffe3 b 30010bf4 <_POSIX_Message_queue_Create_support+0xf8> <== NOT EXECUTED attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 30010c64: ebfff2f3 bl 3000d838 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 30010c68: eb000a54 bl 300135c0 <__errno> <== NOT EXECUTED 30010c6c: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED 30010c70: e5803000 str r3, [r0] <== NOT EXECUTED 30010c74: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30010c78: eaffffdd b 30010bf4 <_POSIX_Message_queue_Create_support+0xf8> <== NOT EXECUTED 30010c7c: 300223ac .word 0x300223ac 30010c80: 300226c0 .word 0x300226c0 30005fd0 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 30005fd0: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005fd4: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 30005fd8: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005fdc: 0a00000b beq 30006010 <_POSIX_Mutex_Get+0x40> 30005fe0: e5951000 ldr r1, [r5] 30005fe4: e3710001 cmn r1, #1 ; 0x1 30005fe8: 0a000003 beq 30005ffc <_POSIX_Mutex_Get+0x2c> return (POSIX_Mutex_Control *) 30005fec: e59f002c ldr r0, [pc, #44] ; 30006020 <_POSIX_Mutex_Get+0x50> 30005ff0: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 30005ff4: e8bd4030 pop {r4, r5, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 30005ff8: ea000b60 b 30008d80 <_Objects_Get> Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005ffc: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 30006000: eb000019 bl 3000606c <== NOT EXECUTED 30006004: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30006008: 05951000 ldreq r1, [r5] <== NOT EXECUTED 3000600c: 0afffff6 beq 30005fec <_POSIX_Mutex_Get+0x1c> <== NOT EXECUTED 30006010: e3a03001 mov r3, #1 ; 0x1 30006014: e5843000 str r3, [r4] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 30006018: e3a00000 mov r0, #0 ; 0x0 3000601c: e8bd8030 pop {r4, r5, pc} 30006020: 30018040 .word 0x30018040 30005f74 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 30005f74: e92d4070 push {r4, r5, r6, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005f78: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 30005f7c: e1a04001 mov r4, r1 30005f80: e1a06002 mov r6, r2 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005f84: 0a00000c beq 30005fbc <_POSIX_Mutex_Get_interrupt_disable+0x48> 30005f88: e5951000 ldr r1, [r5] 30005f8c: e3710001 cmn r1, #1 ; 0x1 30005f90: 0a000004 beq 30005fa8 <_POSIX_Mutex_Get_interrupt_disable+0x34> return (POSIX_Mutex_Control *) 30005f94: e59f0030 ldr r0, [pc, #48] ; 30005fcc <_POSIX_Mutex_Get_interrupt_disable+0x58> 30005f98: e1a02004 mov r2, r4 30005f9c: e1a03006 mov r3, r6 _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 30005fa0: e8bd4070 pop {r4, r5, r6, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 30005fa4: ea000b59 b 30008d10 <_Objects_Get_isr_disable> ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 30005fa8: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 30005fac: eb00002e bl 3000606c <== NOT EXECUTED 30005fb0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30005fb4: 05951000 ldreq r1, [r5] <== NOT EXECUTED 30005fb8: 0afffff5 beq 30005f94 <_POSIX_Mutex_Get_interrupt_disable+0x20> <== NOT EXECUTED 30005fbc: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 30005fc0: e5843000 str r3, [r4] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 30005fc4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30005fc8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30005fcc: 30018040 .word 0x30018040 3000d470 <_POSIX_Semaphore_Create_support>: 3000d470: e59fc0f8 ldr ip, [pc, #248] ; 3000d570 <_POSIX_Semaphore_Create_support+0x100> const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 3000d474: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3000d478: e59ce000 ldr lr, [ip] 3000d47c: e1a07002 mov r7, r2 3000d480: e28ee001 add lr, lr, #1 ; 0x1 3000d484: e58ce000 str lr, [ip] 3000d488: e1a0a003 mov sl, r3 3000d48c: e1a06000 mov r6, r0 char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 3000d490: e3510000 cmp r1, #0 ; 0x0 3000d494: 1a000023 bne 3000d528 <_POSIX_Semaphore_Create_support+0xb8> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 3000d498: e3500000 cmp r0, #0 ; 0x0 3000d49c: 0a000002 beq 3000d4ac <_POSIX_Semaphore_Create_support+0x3c> if( strlen(name) > PATH_MAX ) { 3000d4a0: eb000f87 bl 300112c4 3000d4a4: e35000ff cmp r0, #255 ; 0xff 3000d4a8: 8a000024 bhi 3000d540 <_POSIX_Semaphore_Create_support+0xd0> * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 3000d4ac: e59f80c0 ldr r8, [pc, #192] ; 3000d574 <_POSIX_Semaphore_Create_support+0x104> 3000d4b0: e1a00008 mov r0, r8 3000d4b4: ebffedb8 bl 30008b9c <_Objects_Allocate> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 3000d4b8: e2505000 subs r5, r0, #0 ; 0x0 3000d4bc: 0a000025 beq 3000d558 <_POSIX_Semaphore_Create_support+0xe8> rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; if ( name ) { 3000d4c0: e3560000 cmp r6, #0 ; 0x0 if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 3000d4c4: e3a03000 mov r3, #0 ; 0x0 3000d4c8: e5853010 str r3, [r5, #16] if ( name ) { the_semaphore->named = TRUE; 3000d4cc: 12833001 addne r3, r3, #1 ; 0x1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 3000d4d0: 15c53015 strbne r3, [r5, #21] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 3000d4d4: 15c53014 strbne r3, [r5, #20] the_semaphore->open_count = 1; 3000d4d8: 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; 3000d4dc: e3a04000 mov r4, #0 ; 0x0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 3000d4e0: e3e03000 mvn r3, #0 ; 0x0 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 3000d4e4: 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; 3000d4e8: 05c56014 strbeq r6, [r5, #20] the_semaphore->open_count = 0; 3000d4ec: 05856018 streq r6, [r5, #24] the_semaphore->linked = FALSE; 3000d4f0: 05c56015 strbeq r6, [r5, #21] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 3000d4f4: e585305c str r3, [r5, #92] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 3000d4f8: e1a02007 mov r2, r7 3000d4fc: 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; 3000d500: 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 ); 3000d504: ebffec8e bl 30008744 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000d508: e598201c ldr r2, [r8, #28] 3000d50c: e1d530b8 ldrh r3, [r5, #8] 3000d510: e7825103 str r5, [r2, r3, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 3000d514: e585600c str r6, [r5, #12] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 3000d518: e58a5000 str r5, [sl] _Thread_Enable_dispatch(); 3000d51c: ebfff0fe bl 3000991c <_Thread_Enable_dispatch> 3000d520: e1a00004 mov r0, r4 return 0; } 3000d524: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); 3000d528: ebfff0fb bl 3000991c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); 3000d52c: eb00088d bl 3000f768 <__errno> 3000d530: e3a03058 mov r3, #88 ; 0x58 3000d534: e5803000 str r3, [r0] 3000d538: e3e00000 mvn r0, #0 ; 0x0 3000d53c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); 3000d540: ebfff0f5 bl 3000991c <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000d544: eb000887 bl 3000f768 <__errno> <== NOT EXECUTED 3000d548: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000d54c: e5803000 str r3, [r0] <== NOT EXECUTED 3000d550: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3000d554: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 3000d558: ebfff0ef bl 3000991c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 3000d55c: eb000881 bl 3000f768 <__errno> 3000d560: e3a0301c mov r3, #28 ; 0x1c 3000d564: e5803000 str r3, [r0] 3000d568: e3e00000 mvn r0, #0 ; 0x0 3000d56c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3000d570: 3001d3ac .word 0x3001d3ac 3000d574: 3001d640 .word 0x3001d640 30009ecc <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 30009ecc: 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 || 30009ed0: e590201c ldr r2, [r0, #28] RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 30009ed4: e5931084 ldr r1, [r3, #132] 30009ed8: e3520000 cmp r2, #0 ; 0x0 30009edc: e26110ff rsb r1, r1, #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 */ 30009ee0: e3e03000 mvn r3, #0 ; 0x0 30009ee4: e5803078 str r3, [r0, #120] new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; 30009ee8: e5801018 str r1, [r0, #24] if ( the_thread->resource_count == 0 || 30009eec: 0a000002 beq 30009efc <_POSIX_Threads_Sporadic_budget_callout+0x30> 30009ef0: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 30009ef4: e1530001 cmp r3, r1 <== NOT EXECUTED 30009ef8: 912fff1e bxls lr <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 30009efc: e3a02001 mov r2, #1 ; 0x1 30009f00: eafff0e3 b 30006294 <_Thread_Change_priority> 3000b564 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 3000b564: 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 ]; 3000b568: e5906108 ldr r6, [r0, #264] handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 3000b56c: e3a03001 mov r3, #1 ; 0x1 while ( !_Chain_Is_empty( handler_stack ) ) { 3000b570: e59620d8 ldr r2, [r6, #216] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000b574: e28650dc add r5, r6, #220 ; 0xdc 3000b578: e1520005 cmp r2, r5 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 3000b57c: e58630cc str r3, [r6, #204] while ( !_Chain_Is_empty( handler_stack ) ) { 3000b580: 08bd8070 popeq {r4, r5, r6, pc} _ISR_Disable( level ); 3000b584: e10f1000 mrs r1, CPSR <== NOT EXECUTED 3000b588: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 3000b58c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 3000b590: e5954004 ldr r4, [r5, #4] <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 3000b594: e894000c ldm r4, {r2, r3} <== NOT EXECUTED previous = the_node->previous; next->previous = previous; previous->next = next; 3000b598: e5832000 str r2, [r3] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 3000b59c: e5823004 str r3, [r2, #4] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 3000b5a0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED (*handler->routine)( handler->arg ); 3000b5a4: e594000c ldr r0, [r4, #12] <== NOT EXECUTED 3000b5a8: e1a0e00f mov lr, pc <== NOT EXECUTED 3000b5ac: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED _Workspace_Free( handler ); 3000b5b0: e1a00004 mov r0, r4 <== NOT EXECUTED 3000b5b4: ebfff1e9 bl 30007d60 <_Workspace_Free> <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 3000b5b8: e59630d8 ldr r3, [r6, #216] <== NOT EXECUTED 3000b5bc: e1530005 cmp r3, r5 <== NOT EXECUTED 3000b5c0: 1affffef bne 3000b584 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED 3000b5c4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3000c0bc <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 3000c0bc: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000c0c0: e1a08001 mov r8, r1 3000c0c4: e1a07002 mov r7, r2 3000c0c8: e1a05003 mov r5, r3 3000c0cc: e1a04000 mov r4, r0 ISR_Level level; (void) _Watchdog_Remove( timer ); 3000c0d0: ebfff644 bl 300099e8 <_Watchdog_Remove> _ISR_Disable( level ); 3000c0d4: e10f6000 mrs r6, CPSR 3000c0d8: e38630c0 orr r3, r6, #192 ; 0xc0 3000c0dc: 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 ) { 3000c0e0: e5943008 ldr r3, [r4, #8] 3000c0e4: e3530000 cmp r3, #0 ; 0x0 3000c0e8: 0a000002 beq 3000c0f8 <_POSIX_Timer_Insert_helper+0x3c> _ISR_Enable( level ); 3000c0ec: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 3000c0f0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000c0f4: 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; 3000c0f8: e5843008 str r3, [r4, #8] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 3000c0fc: e59d3018 ldr r3, [sp, #24] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3000c100: e584501c str r5, [r4, #28] the_watchdog->id = id; 3000c104: e5847020 str r7, [r4, #32] the_watchdog->user_data = user_data; 3000c108: e5843024 str r3, [r4, #36] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3000c10c: e584800c str r8, [r4, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3000c110: e1a01004 mov r1, r4 3000c114: e59f000c ldr r0, [pc, #12] ; 3000c128 <_POSIX_Timer_Insert_helper+0x6c> 3000c118: ebfff5c3 bl 3000982c <_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 ); 3000c11c: e129f006 msr CPSR_fc, r6 3000c120: e3a00001 mov r0, #1 ; 0x1 return true; } 3000c124: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3000c128: 3001ba24 .word 0x3001ba24 30005c58 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 30005c58: e92d4010 push {r4, lr} bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 30005c5c: e5913068 ldr r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 30005c60: e5912054 ldr r2, [r1, #84] bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 30005c64: e2833001 add r3, r3, #1 ; 0x1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 30005c68: 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) { 30005c6c: e24dd004 sub sp, sp, #4 ; 0x4 30005c70: e1a04001 mov r4, r1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 30005c74: e5813068 str r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 30005c78: 1a000004 bne 30005c90 <_POSIX_Timer_TSR+0x38> 30005c7c: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED 30005c80: 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; 30005c84: 03a03004 moveq r3, #4 ; 0x4 <== NOT EXECUTED 30005c88: 05c1303c strbeq r3, [r1, #60] <== 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 ) || 30005c8c: 0a00000d beq 30005cc8 <_POSIX_Timer_TSR+0x70> <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 30005c90: e5941064 ldr r1, [r4, #100] 30005c94: e5942008 ldr r2, [r4, #8] 30005c98: e2840010 add r0, r4, #16 ; 0x10 30005c9c: e59f303c ldr r3, [pc, #60] ; 30005ce0 <_POSIX_Timer_TSR+0x88> 30005ca0: e58d4000 str r4, [sp] 30005ca4: eb001904 bl 3000c0bc <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 30005ca8: e3500000 cmp r0, #0 ; 0x0 30005cac: 1a000001 bne 30005cb8 <_POSIX_Timer_TSR+0x60> /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 30005cb0: e28dd004 add sp, sp, #4 ; 0x4 30005cb4: e8bd8010 pop {r4, pc} ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 30005cb8: e284006c add r0, r4, #108 ; 0x6c 30005cbc: eb0005b7 bl 300073a0 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 30005cc0: e3a03003 mov r3, #3 ; 0x3 30005cc4: 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 ) ) { 30005cc8: e5940038 ldr r0, [r4, #56] 30005ccc: e5941044 ldr r1, [r4, #68] 30005cd0: eb00181c bl 3000bd48 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 30005cd4: e3a03000 mov r3, #0 ; 0x0 30005cd8: e5843068 str r3, [r4, #104] 30005cdc: eafffff3 b 30005cb0 <_POSIX_Timer_TSR+0x58> 30005ce0: 30005c58 .word 0x30005c58 30005244 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 30005244: e1a02000 mov r2, r0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 30005248: e3a01001 mov r1, #1 ; 0x1 #include int _POSIX_signals_Get_highest( sigset_t set ) { 3000524c: e3a0001b mov r0, #27 ; 0x1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 30005250: e2403001 sub r3, r0, #1 ; 0x1 30005254: e0123311 ands r3, r2, r1, lsl r3 30005258: 112fff1e bxne lr sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 3000525c: e2800001 add r0, r0, #1 ; 0x1 30005260: e3500020 cmp r0, #32 ; 0x20 30005264: 1afffff9 bne 30005250 <_POSIX_signals_Get_highest+0xc> 30005268: e240001f sub r0, r0, #31 ; 0x1f } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) 3000526c: e1a01000 mov r1, r0 30005270: e2403001 sub r3, r0, #1 ; 0x1 30005274: e0123311 ands r3, r2, r1, lsl r3 30005278: 112fff1e bxne lr return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 3000527c: e2800001 add r0, r0, #1 ; 0x1 30005280: e350001b cmp r0, #27 ; 0x1b 30005284: 1afffff9 bne 30005270 <_POSIX_signals_Get_highest+0x2c> 30005288: e1a00003 mov r0, r3 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 3000528c: e12fff1e bx lr <== NOT EXECUTED 30009b78 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 30009b78: e92d4070 push {r4, r5, r6, lr} POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 30009b7c: e5905108 ldr r5, [r0, #264] if ( !api ) 30009b80: e3550000 cmp r5, #0 ; 0x0 30009b84: 08bd8070 popeq {r4, r5, r6, pc} 30009b88: e59f60b0 ldr r6, [pc, #176] ; 30009c40 <_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 ); 30009b8c: e10f0000 mrs r0, CPSR 30009b90: e38030c0 orr r3, r0, #192 ; 0xc0 30009b94: e129f003 msr CPSR_fc, r3 if ( !(~api->signals_blocked & 30009b98: e5963000 ldr r3, [r6] 30009b9c: e59520c8 ldr r2, [r5, #200] 30009ba0: e59510c4 ldr r1, [r5, #196] 30009ba4: e1833002 orr r3, r3, r2 30009ba8: e1d31001 bics r1, r3, r1 30009bac: 0a000021 beq 30009c38 <_POSIX_signals_Post_switch_extension+0xc0> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 30009bb0: e129f000 msr CPSR_fc, r0 30009bb4: e3a0401b mov r4, #27 ; 0x1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 30009bb8: e1a01004 mov r1, r4 30009bbc: e3a02000 mov r2, #0 ; 0x0 30009bc0: e1a00005 mov r0, r5 30009bc4: eb0006ad bl 3000b680 <_POSIX_signals_Check_signal> 30009bc8: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009bcc: e1a01004 mov r1, r4 30009bd0: e3a02001 mov r2, #1 ; 0x1 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 30009bd4: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009bd8: e1a00005 mov r0, r5 } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 30009bdc: 1affffea bne 30009b8c <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009be0: eb0006a6 bl 3000b680 <_POSIX_signals_Check_signal> 30009be4: e3500000 cmp r0, #0 ; 0x0 30009be8: 1affffe7 bne 30009b8c <_POSIX_signals_Post_switch_extension+0x14> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 30009bec: e3540020 cmp r4, #32 ; 0x20 30009bf0: 1afffff0 bne 30009bb8 <_POSIX_signals_Post_switch_extension+0x40> 30009bf4: e244401f sub r4, r4, #31 ; 0x1f /* 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 ) ) 30009bf8: e1a01004 mov r1, r4 30009bfc: e3a02000 mov r2, #0 ; 0x0 30009c00: e1a00005 mov r0, r5 30009c04: eb00069d bl 3000b680 <_POSIX_signals_Check_signal> 30009c08: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009c0c: e1a01004 mov r1, r4 30009c10: e3a02001 mov r2, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 30009c14: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009c18: 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 ) ) 30009c1c: 1affffda bne 30009b8c <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 30009c20: eb000696 bl 3000b680 <_POSIX_signals_Check_signal> 30009c24: e3500000 cmp r0, #0 ; 0x0 30009c28: 1affffd7 bne 30009b8c <_POSIX_signals_Post_switch_extension+0x14> } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 30009c2c: e354001b cmp r4, #27 ; 0x1b 30009c30: 1afffff0 bne 30009bf8 <_POSIX_signals_Post_switch_extension+0x80> 30009c34: eaffffd4 b 30009b8c <_POSIX_signals_Post_switch_extension+0x14> <== NOT EXECUTED while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 30009c38: e129f000 msr CPSR_fc, r0 30009c3c: e8bd8070 pop {r4, r5, r6, pc} 30009c40: 3001766c .word 0x3001766c 300222e0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 300222e0: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 300222e4: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 300222e8: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 300222ec: 0a00000d beq 30022328 <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 300222f0: e3510000 cmp r1, #0 ; 0x0 300222f4: 0a00000b beq 30022328 <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 300222f8: e59f5030 ldr r5, [pc, #48] ; 30022330 <_Protected_heap_Get_information+0x50> 300222fc: e5950000 ldr r0, [r5] 30022300: ebff9957 bl 30008864 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 30022304: e1a01004 mov r1, r4 30022308: e1a00006 mov r0, r6 3002230c: eb0026bf bl 3002be10 <_Heap_Get_information> 30022310: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 30022314: e5950000 ldr r0, [r5] 30022318: ebff996d bl 300088d4 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 3002231c: e2740001 rsbs r0, r4, #1 ; 0x1 30022320: 33a00000 movcc r0, #0 ; 0x0 30022324: e8bd8070 pop {r4, r5, r6, pc} 30022328: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 3002232c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30022330: 3005a6fc .word 0x3005a6fc 30005e14 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 30005e14: e92d4010 push {r4, lr} 30005e18: e24dd004 sub sp, sp, #4 ; 0x4 30005e1c: e1a01000 mov r1, r0 30005e20: e1a0200d mov r2, sp 30005e24: e59f0090 ldr r0, [pc, #144] ; 30005ebc <_Rate_monotonic_Timeout+0xa8> 30005e28: eb000783 bl 30007c3c <_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 ) { 30005e2c: e59d3000 ldr r3, [sp] 30005e30: e1a04000 mov r4, r0 30005e34: e3530000 cmp r3, #0 ; 0x0 30005e38: 1a00000c bne 30005e70 <_Rate_monotonic_Timeout+0x5c> case OBJECTS_LOCAL: the_thread = the_period->owner; 30005e3c: e5900050 ldr r0, [r0, #80] if ( _States_Is_waiting_for_period( the_thread->current_state ) && 30005e40: e5903010 ldr r3, [r0, #16] 30005e44: e3130901 tst r3, #16384 ; 0x4000 30005e48: 1a00000a bne 30005e78 <_Rate_monotonic_Timeout+0x64> _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 ) { 30005e4c: e5943038 ldr r3, [r4, #56] 30005e50: 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; 30005e54: 13a03004 movne r3, #4 ; 0x4 30005e58: 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 ) { 30005e5c: 0a00000c beq 30005e94 <_Rate_monotonic_Timeout+0x80> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30005e60: e59f2058 ldr r2, [pc, #88] ; 30005ec0 <_Rate_monotonic_Timeout+0xac> 30005e64: e5923000 ldr r3, [r2] 30005e68: e2433001 sub r3, r3, #1 ; 0x1 30005e6c: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 30005e70: e28dd004 add sp, sp, #4 ; 0x4 30005e74: e8bd8010 pop {r4, pc} the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 30005e78: e5902020 ldr r2, [r0, #32] 30005e7c: e5943008 ldr r3, [r4, #8] 30005e80: e1520003 cmp r2, r3 30005e84: 1afffff0 bne 30005e4c <_Rate_monotonic_Timeout+0x38> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 30005e88: e59f1034 ldr r1, [pc, #52] ; 30005ec4 <_Rate_monotonic_Timeout+0xb0> 30005e8c: eb0008a6 bl 3000812c <_Thread_Clear_state> 30005e90: ea000001 b 30005e9c <_Rate_monotonic_Timeout+0x88> _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 ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 30005e94: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30005e98: e5843038 str r3, [r4, #56] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 30005e9c: e1a00004 mov r0, r4 30005ea0: ebfffe37 bl 30005784 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005ea4: e594304c ldr r3, [r4, #76] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005ea8: e2841010 add r1, r4, #16 ; 0x10 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005eac: e584301c str r3, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005eb0: e59f0010 ldr r0, [pc, #16] ; 30005ec8 <_Rate_monotonic_Timeout+0xb4> 30005eb4: eb000ecd bl 300099f0 <_Watchdog_Insert> 30005eb8: eaffffe8 b 30005e60 <_Rate_monotonic_Timeout+0x4c> 30005ebc: 3001bc34 .word 0x3001bc34 30005ec0: 3001bd4c .word 0x3001bd4c 30005ec4: 1003fff8 .word 0x1003fff8 30005ec8: 3001be24 .word 0x3001be24 30005668 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 30005668: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 3000566c: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 30005670: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 30005674: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 30005678: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 3000567c: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 30005680: e10f6000 mrs r6, CPSR 30005684: e38630c0 orr r3, r6, #192 ; 0xc0 30005688: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 3000568c: e59f3038 ldr r3, [pc, #56] ; 300056cc <_TOD_Get+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 30005690: e59f2038 ldr r2, [pc, #56] ; 300056d0 <_TOD_Get+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 30005694: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 30005698: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 3000569c: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 300056a0: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 300056a4: 0a000002 beq 300056b4 <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 300056a8: e1a0e00f mov lr, pc <== NOT EXECUTED 300056ac: e12fff11 bx r1 <== NOT EXECUTED 300056b0: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 300056b4: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 300056b8: e1a00005 mov r0, r5 300056bc: e1a0100d mov r1, sp 300056c0: eb000806 bl 300076e0 <_Timespec_Add_to> } 300056c4: e28dd008 add sp, sp, #8 ; 0x8 300056c8: e8bd8070 pop {r4, r5, r6, pc} 300056cc: 300170f8 .word 0x300170f8 300056d0: 30016fd4 .word 0x30016fd4 3000a7a4 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { 3000a7a4: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 3000a7a8: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { 3000a7ac: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 3000a7b0: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { 3000a7b4: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 3000a7b8: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); 3000a7bc: e10f6000 mrs r6, CPSR 3000a7c0: e38630c0 orr r3, r6, #192 ; 0xc0 3000a7c4: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 3000a7c8: e59f3038 ldr r3, [pc, #56] ; 3000a808 <_TOD_Get_uptime+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 3000a7cc: e59f2038 ldr r2, [pc, #56] ; 3000a80c <_TOD_Get_uptime+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 3000a7d0: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 3000a7d4: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 3000a7d8: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 3000a7dc: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 3000a7e0: 0a000002 beq 3000a7f0 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 3000a7e4: e1a0e00f mov lr, pc <== NOT EXECUTED 3000a7e8: e12fff11 bx r1 <== NOT EXECUTED 3000a7ec: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 3000a7f0: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); 3000a7f4: e1a00005 mov r0, r5 3000a7f8: e1a0100d mov r1, sp 3000a7fc: ebfff3b7 bl 300076e0 <_Timespec_Add_to> } 3000a800: e28dd008 add sp, sp, #8 ; 0x8 3000a804: e8bd8070 pop {r4, r5, r6, pc} 3000a808: 300170f8 .word 0x300170f8 3000a80c: 30016fc4 .word 0x30016fc4 3000bc64 <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000bc64: e59f3110 ldr r3, [pc, #272] ; 3000bd7c <_Thread_Handler+0x118> * * Output parameters: NONE */ void _Thread_Handler( void ) { 3000bc68: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000bc6c: 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; 3000bc70: e59520b8 ldr r2, [r5, #184] _ISR_Set_level(level); 3000bc74: e3a03000 mov r3, #0 ; 0x0 3000bc78: e10f3000 mrs r3, CPSR 3000bc7c: e3c330c0 bic r3, r3, #192 ; 0xc0 3000bc80: e1833002 orr r3, r3, r2 3000bc84: e121f003 msr CPSR_c, r3 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000bc88: e59f20f0 ldr r2, [pc, #240] ; 3000bd80 <_Thread_Handler+0x11c> doneConstructors = 1; 3000bc8c: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000bc90: 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 ); 3000bc94: 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; 3000bc98: 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 ); 3000bc9c: ebffeeea bl 3000784c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 3000bca0: ebffeaeb bl 30006854 <_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) */ 3000bca4: e3540000 cmp r4, #0 ; 0x0 3000bca8: 0a000031 beq 3000bd74 <_Thread_Handler+0x110> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 3000bcac: e59530a0 ldr r3, [r5, #160] 3000bcb0: e3530003 cmp r3, #3 ; 0x3 3000bcb4: 979ff103 ldrls pc, [pc, r3, lsl #2] 3000bcb8: ea000008 b 3000bce0 <_Thread_Handler+0x7c> <== NOT EXECUTED 3000bcbc: 3000bd4c .word 0x3000bd4c <== NOT EXECUTED 3000bcc0: 3000bd24 .word 0x3000bd24 <== NOT EXECUTED 3000bcc4: 3000bcf8 .word 0x3000bcf8 <== NOT EXECUTED 3000bcc8: 3000bccc .word 0x3000bccc <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 3000bccc: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED 3000bcd0: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED 3000bcd4: e1a0e00f mov lr, pc <== NOT EXECUTED 3000bcd8: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED 3000bcdc: e5850028 str r0, [r5, #40] <== NOT EXECUTED * 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 ); 3000bce0: e1a00005 mov r0, r5 <== NOT EXECUTED 3000bce4: ebffeee8 bl 3000788c <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 3000bce8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000bcec: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000bcf0: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED 3000bcf4: ebffe738 bl 300059dc <_Internal_error_Occurred> <== NOT EXECUTED (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 3000bcf8: e59510a8 ldr r1, [r5, #168] <== NOT EXECUTED 3000bcfc: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED 3000bd00: e1a0e00f mov lr, pc <== NOT EXECUTED 3000bd04: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED 3000bd08: e5850028 str r0, [r5, #40] <== NOT EXECUTED * 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 ); 3000bd0c: e1a00005 mov r0, r5 <== NOT EXECUTED 3000bd10: ebffeedd bl 3000788c <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 3000bd14: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000bd18: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000bd1c: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED 3000bd20: ebffe72d bl 300059dc <_Internal_error_Occurred> <== NOT EXECUTED (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 3000bd24: e59500a4 ldr r0, [r5, #164] 3000bd28: e1a0e00f mov lr, pc 3000bd2c: e595f09c ldr pc, [r5, #156] 3000bd30: 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 ); 3000bd34: e1a00005 mov r0, r5 3000bd38: ebffeed3 bl 3000788c <_User_extensions_Thread_exitted> _Internal_error_Occurred( 3000bd3c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000bd40: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000bd44: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED 3000bd48: ebffe723 bl 300059dc <_Internal_error_Occurred> <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 3000bd4c: e59500a8 ldr r0, [r5, #168] 3000bd50: e1a0e00f mov lr, pc 3000bd54: e595f09c ldr pc, [r5, #156] 3000bd58: 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 ); 3000bd5c: e1a00005 mov r0, r5 3000bd60: ebffeec9 bl 3000788c <_User_extensions_Thread_exitted> _Internal_error_Occurred( 3000bd64: e3a00000 mov r0, #0 ; 0x0 3000bd68: e3a01001 mov r1, #1 ; 0x1 3000bd6c: e3a02006 mov r2, #6 ; 0x6 3000bd70: ebffe719 bl 300059dc <_Internal_error_Occurred> * 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) */ { _init (); 3000bd74: eb0024a9 bl 30015020 <__start_set_sysctl_set> 3000bd78: eaffffcb b 3000bcac <_Thread_Handler+0x48> 3000bd7c: 30017004 .word 0x30017004 3000bd80: 30016d94 .word 0x30016d94 3000691c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 3000691c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 30006920: 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 ) { 30006924: e1a04003 mov r4, r3 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; 30006928: 13a03000 movne r3, #0 ; 0x0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 3000692c: e5dda02c ldrb sl, [sp, #44] 30006930: e1a09000 mov r9, r0 30006934: e1a05001 mov r5, r1 30006938: e59d8028 ldr r8, [sp, #40] 3000693c: e59db030 ldr fp, [sp, #48] 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; 30006940: 15c130c0 strbne r3, [r1, #192] 30006944: 11a0c004 movne ip, r4 30006948: 11a02006 movne r2, r6 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 3000694c: 0a000034 beq 30006a24 <_Thread_Initialize+0x108> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 30006950: e59f416c ldr r4, [pc, #364] ; 30006ac4 <_Thread_Initialize+0x1a8> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30006954: e3a06000 mov r6, #0 ; 0x0 30006958: e5940000 ldr r0, [r4] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 3000695c: e58520c8 str r2, [r5, #200] 30006960: e1500006 cmp r0, r6 the_stack->size = size; 30006964: e585c0c4 str ip, [r5, #196] 30006968: e5856050 str r6, [r5, #80] the_watchdog->routine = routine; 3000696c: e5856064 str r6, [r5, #100] the_watchdog->id = id; 30006970: e5856068 str r6, [r5, #104] the_watchdog->user_data = user_data; 30006974: e585606c str r6, [r5, #108] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 30006978: e5856100 str r6, [r5, #256] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 3000697c: 05850110 streq r0, [r5, #272] 30006980: 01a07000 moveq r7, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 30006984: 1a000033 bne 30006a58 <_Thread_Initialize+0x13c> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 30006988: e59d3034 ldr r3, [sp, #52] switch ( budget_algorithm ) { 3000698c: e35b0002 cmp fp, #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; 30006990: 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; 30006994: 059f312c ldreq r3, [pc, #300] ; 30006ac8 <_Thread_Initialize+0x1ac> } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 30006998: 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; 3000699c: 05932000 ldreq r2, [r3] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 300069a0: e3a06001 mov r6, #1 ; 0x1 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; 300069a4: 05852078 streq r2, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 300069a8: e59d3038 ldr r3, [sp, #56] 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 ); 300069ac: e1a01008 mov r1, r8 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 300069b0: 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 ); 300069b4: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 300069b8: e5c5a0ac strb sl, [r5, #172] the_thread->Start.budget_algorithm = budget_algorithm; 300069bc: e585b0b0 str fp, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 300069c0: e5856010 str r6, [r5, #16] the_thread->Wait.queue = NULL; 300069c4: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 300069c8: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 300069cc: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 300069d0: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 300069d4: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 300069d8: eb0001fc bl 300071d0 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300069dc: e1d530b8 ldrh r3, [r5, #8] 300069e0: 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; 300069e4: e5854088 str r4, [r5, #136] 300069e8: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 300069ec: e59d303c ldr r3, [sp, #60] * 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 ); 300069f0: e1a00005 mov r0, r5 300069f4: 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; 300069f8: 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 ); 300069fc: eb0003c8 bl 30007924 <_User_extensions_Thread_create> if ( !extension_status ) { 30006a00: e1500004 cmp r0, r4 30006a04: 1a000011 bne 30006a50 <_Thread_Initialize+0x134> if ( extensions_area ) 30006a08: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 30006a0c: 11a00007 movne r0, r7 <== NOT EXECUTED 30006a10: 1b0004d2 blne 30007d60 <_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 ); 30006a14: e1a00005 mov r0, r5 <== NOT EXECUTED 30006a18: eb0002aa bl 300074c8 <_Thread_Stack_Free> <== NOT EXECUTED 30006a1c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 30006a20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 30006a24: e1a00001 mov r0, r1 30006a28: e1a01004 mov r1, r4 30006a2c: eb000285 bl 30007448 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 30006a30: e1540000 cmp r4, r0 30006a34: 93a03000 movls r3, #0 ; 0x0 30006a38: 83a03001 movhi r3, #1 ; 0x1 30006a3c: e3500000 cmp r0, #0 ; 0x0 30006a40: 03833001 orreq r3, r3, #1 ; 0x1 30006a44: e3530000 cmp r3, #0 ; 0x0 30006a48: e1a0c000 mov ip, r0 30006a4c: 0a000014 beq 30006aa4 <_Thread_Initialize+0x188> * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( !extension_status ) { 30006a50: e1a00006 mov r0, r6 30006a54: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 30006a58: e2800001 add r0, r0, #1 ; 0x1 30006a5c: e1a00100 lsl r0, r0, #2 30006a60: eb0004c2 bl 30007d70 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 30006a64: e2507000 subs r7, r0, #0 ; 0x0 30006a68: 0a000011 beq 30006ab4 <_Thread_Initialize+0x198> * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 30006a6c: e5943000 ldr r3, [r4] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 30006a70: e5857110 str r7, [r5, #272] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 30006a74: e3730001 cmn r3, #1 ; 0x1 30006a78: 0affffc2 beq 30006988 <_Thread_Initialize+0x6c> 30006a7c: e1a02006 mov r2, r6 30006a80: e1a01007 mov r1, r7 the_thread->extensions[i] = NULL; 30006a84: e1a00006 mov r0, r6 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 30006a88: e5943000 ldr r3, [r4] the_thread->extensions[i] = NULL; 30006a8c: e7810102 str r0, [r1, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 30006a90: e2833001 add r3, r3, #1 ; 0x1 30006a94: e2822001 add r2, r2, #1 ; 0x1 30006a98: e1530002 cmp r3, r2 30006a9c: 8afffff9 bhi 30006a88 <_Thread_Initialize+0x16c> 30006aa0: eaffffb8 b 30006988 <_Thread_Initialize+0x6c> if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 30006aa4: e3a03001 mov r3, #1 ; 0x1 30006aa8: e5c530c0 strb 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; 30006aac: e59520cc ldr r2, [r5, #204] 30006ab0: eaffffa6 b 30006950 <_Thread_Initialize+0x34> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 30006ab4: e1a00005 mov r0, r5 <== NOT EXECUTED 30006ab8: eb000282 bl 300074c8 <_Thread_Stack_Free> <== NOT EXECUTED 30006abc: e1a00007 mov r0, r7 <== NOT EXECUTED 30006ac0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30006ac4: 30016fe4 .word 0x30016fe4 30006ac8: 30016f04 .word 0x30016f04 3000bd84 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 3000bd84: e92d4030 push {r4, r5, lr} the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 3000bd88: e5d0c0ac ldrb ip, [r0, #172] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 3000bd8c: e590e0b0 ldr lr, [r0, #176] the_thread->budget_callout = the_thread->Start.budget_callout; 3000bd90: e59040b4 ldr r4, [r0, #180] Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 3000bd94: e3a03000 mov r3, #0 ; 0x0 the_thread->suspend_count = 0; 3000bd98: e5803070 str r3, [r0, #112] the_thread->is_preemptible = the_thread->Start.is_preemptible; 3000bd9c: e5c0c076 strb ip, [r0, #118] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 3000bda0: e580e07c str lr, [r0, #124] the_thread->budget_callout = the_thread->Start.budget_callout; 3000bda4: e5804080 str r4, [r0, #128] the_thread->Start.pointer_argument = pointer_argument; 3000bda8: e58010a4 str r1, [r0, #164] the_thread->Start.numeric_argument = numeric_argument; 3000bdac: e58020a8 str r2, [r0, #168] Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 3000bdb0: e580301c str r3, [r0, #28] void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 3000bdb4: e1a05000 mov r5, r0 the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 3000bdb8: ebffefdd bl 30007d34 <_Thread_queue_Extract_with_proxy> 3000bdbc: e3500000 cmp r0, #0 ; 0x0 3000bdc0: 1a000002 bne 3000bdd0 <_Thread_Reset+0x4c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 3000bdc4: e5953050 ldr r3, [r5, #80] 3000bdc8: e3530002 cmp r3, #2 ; 0x2 3000bdcc: 0a000007 beq 3000bdf0 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 3000bdd0: e59510bc ldr r1, [r5, #188] 3000bdd4: e5953014 ldr r3, [r5, #20] 3000bdd8: e1530001 cmp r3, r1 3000bddc: 08bd8030 popeq {r4, r5, pc} the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 3000bde0: e1a00005 mov r0, r5 if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; 3000bde4: e5851018 str r1, [r5, #24] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 3000bde8: e8bd4030 pop {r4, r5, lr} (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 3000bdec: eafff053 b 30007f40 <_Thread_Set_priority> the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 3000bdf0: e2850048 add r0, r5, #72 ; 0x48 <== NOT EXECUTED 3000bdf4: ebfff2f6 bl 300089d4 <_Watchdog_Remove> <== NOT EXECUTED 3000bdf8: eafffff4 b 3000bdd0 <_Thread_Reset+0x4c> <== NOT EXECUTED 30007ecc <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007ecc: e5903010 ldr r3, [r0, #16] bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 30007ed0: e92d4070 push {r4, r5, r6, lr} if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007ed4: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 30007ed8: e1a04000 mov r4, r0 30007edc: e1a06001 mov r6, r1 30007ee0: e1a05002 mov r5, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007ee4: 13a00000 movne r0, #0 ; 0x0 30007ee8: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 30007eec: eb000089 bl 30008118 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 30007ef0: e1a02005 mov r2, r5 30007ef4: e1a01006 mov r1, r6 30007ef8: e1a00004 mov r0, r4 30007efc: eb000fa0 bl 3000bd84 <_Thread_Reset> _Thread_Load_environment( the_thread ); 30007f00: e1a00004 mov r0, r4 30007f04: eb000eb9 bl 3000b9f0 <_Thread_Load_environment> _Thread_Ready( the_thread ); 30007f08: e1a00004 mov r0, r4 30007f0c: eb000f57 bl 3000bc70 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 30007f10: e1a00004 mov r0, r4 30007f14: eb000209 bl 30008740 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 30007f18: e59f301c ldr r3, [pc, #28] ; 30007f3c <_Thread_Restart+0x70> 30007f1c: e5932000 ldr r2, [r3] 30007f20: e1540002 cmp r4, r2 30007f24: 13a00001 movne r0, #1 ; 0x1 30007f28: 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 ); 30007f2c: e28400d0 add r0, r4, #208 ; 0xd0 30007f30: eb00032f bl 30008bf4 <_CPU_Context_restore> 30007f34: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 30007f38: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30007f3c: 3001aa84 .word 0x3001aa84 30008cd4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 30008cd4: e92d0030 push {r4, r5} 30008cd8: e20110ff and r1, r1, #255 ; 0xff 30008cdc: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 30008ce0: e10f5000 mrs r5, CPSR 30008ce4: e38530c0 orr r3, r5, #192 ; 0xc0 30008ce8: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 30008cec: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; 30008cf0: 13a03000 movne r3, #0 ; 0x0 30008cf4: 15803070 strne r3, [r0, #112] ISR_Level level; States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) 30008cf8: 1a000006 bne 30008d18 <_Thread_Resume+0x44> the_thread->suspend_count = 0; else the_thread->suspend_count--; 30008cfc: e5903070 ldr r3, [r0, #112] <== NOT EXECUTED 30008d00: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 30008d04: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 30008d08: e5803070 str r3, [r0, #112] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 30008d0c: 0a000001 beq 30008d18 <_Thread_Resume+0x44> <== NOT EXECUTED _ISR_Enable( level ); 30008d10: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 30008d14: ea000003 b 30008d28 <_Thread_Resume+0x54> <== NOT EXECUTED return; } current_state = the_thread->current_state; 30008d18: e5943010 ldr r3, [r4, #16] if ( current_state & STATES_SUSPENDED ) { 30008d1c: e3130002 tst r3, #2 ; 0x2 30008d20: 1a000002 bne 30008d30 <_Thread_Resume+0x5c> _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 30008d24: e129f005 msr CPSR_fc, r5 } 30008d28: e8bd0030 pop {r4, r5} 30008d2c: e12fff1e bx lr 30008d30: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 30008d34: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 30008d38: e5843010 str r3, [r4, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 30008d3c: 1afffff8 bne 30008d24 <_Thread_Resume+0x50> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 30008d40: e5940090 ldr r0, [r4, #144] 30008d44: e1d429b6 ldrh r2, [r4, #150] 30008d48: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 30008d4c: e594108c ldr r1, [r4, #140] 30008d50: e1833002 orr r3, r3, r2 _Priority_Major_bit_map |= the_priority_map->ready_major; 30008d54: e59fc080 ldr ip, [pc, #128] ; 30008ddc <_Thread_Resume+0x108> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 30008d58: e1c030b0 strh r3, [r0] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 30008d5c: e2812004 add r2, r1, #4 ; 0x4 30008d60: e5842000 str r2, [r4] _Priority_Major_bit_map |= the_priority_map->ready_major; 30008d64: e1dc30b0 ldrh r3, [ip] 30008d68: e1d429b4 ldrh r2, [r4, #148] old_last_node = the_chain->last; 30008d6c: e5910008 ldr r0, [r1, #8] 30008d70: e1833002 orr r3, r3, r2 the_chain->last = the_node; 30008d74: e5814008 str r4, [r1, #8] 30008d78: e1cc30b0 strh r3, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 30008d7c: 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; 30008d80: e5804000 str r4, [r0] _ISR_Flash( level ); 30008d84: e10f3000 mrs r3, CPSR 30008d88: e129f005 msr CPSR_fc, r5 30008d8c: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 30008d90: e59f1048 ldr r1, [pc, #72] ; 30008de0 <_Thread_Resume+0x10c> 30008d94: e5940014 ldr r0, [r4, #20] 30008d98: e5913000 ldr r3, [r1] 30008d9c: e5932014 ldr r2, [r3, #20] 30008da0: e1500002 cmp r0, r2 30008da4: 2affffde bcs 30008d24 <_Thread_Resume+0x50> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 30008da8: e59f3034 ldr r3, [pc, #52] ; 30008de4 <_Thread_Resume+0x110> _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; 30008dac: e5814000 str r4, [r1] if ( _Thread_Executing->is_preemptible || 30008db0: e5932000 ldr r2, [r3] 30008db4: e5d21076 ldrb r1, [r2, #118] 30008db8: e3510000 cmp r1, #0 ; 0x0 30008dbc: 0a000003 beq 30008dd0 <_Thread_Resume+0xfc> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 30008dc0: e59f3020 ldr r3, [pc, #32] ; 30008de8 <_Thread_Resume+0x114> 30008dc4: e3a02001 mov r2, #1 ; 0x1 30008dc8: e5c32000 strb r2, [r3] 30008dcc: eaffffd4 b 30008d24 <_Thread_Resume+0x50> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 30008dd0: e3500000 cmp r0, #0 ; 0x0 30008dd4: 1affffd2 bne 30008d24 <_Thread_Resume+0x50> 30008dd8: eafffff8 b 30008dc0 <_Thread_Resume+0xec> <== NOT EXECUTED 30008ddc: 30023898 .word 0x30023898 30008de0: 30023870 .word 0x30023870 30008de4: 300238a4 .word 0x300238a4 30008de8: 300238b4 .word 0x300238b4 30007448 <_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 ) { 30007448: e59f3070 ldr r3, [pc, #112] ; 300074c0 <_Thread_Stack_Allocate+0x78> size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 3000744c: e59f2070 ldr r2, [pc, #112] ; 300074c4 <_Thread_Stack_Allocate+0x7c> * 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 ) { 30007450: e593c000 ldr ip, [r3] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30007454: e5923000 ldr r3, [r2] * 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 ) { 30007458: e59c2020 ldr r2, [ip, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 3000745c: e92d4030 push {r4, r5, lr} 30007460: e1510003 cmp r1, r3 30007464: 21a04001 movcs r4, r1 30007468: 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 ) { 3000746c: e3520000 cmp r2, #0 ; 0x0 size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30007470: e1a05000 mov r5, r0 * 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 ) { 30007474: 0a000008 beq 3000749c <_Thread_Stack_Allocate+0x54> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 30007478: e1a00004 mov r0, r4 <== NOT EXECUTED 3000747c: e1a0e00f mov lr, pc <== NOT EXECUTED 30007480: e12fff12 bx r2 <== NOT EXECUTED 30007484: e1a03000 mov r3, r0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 30007488: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3000748c: 11a00004 movne r0, r4 <== NOT EXECUTED 30007490: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 30007494: e58530cc str r3, [r5, #204] <== NOT EXECUTED return the_stack_size; } 30007498: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 3000749c: 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 ); 300074a0: e1a00004 mov r0, r4 300074a4: eb000231 bl 30007d70 <_Workspace_Allocate> 300074a8: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 300074ac: e3530000 cmp r3, #0 ; 0x0 300074b0: 11a00004 movne r0, r4 300074b4: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 300074b8: e58530cc str r3, [r5, #204] return the_stack_size; } 300074bc: e8bd8030 pop {r4, r5, pc} 300074c0: 30016fdc .word 0x30016fdc 300074c4: 30016100 .word 0x30016100 300074c8 <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 300074c8: e5d030c0 ldrb r3, [r0, #192] */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 300074cc: 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 ) 300074d0: e3530000 cmp r3, #0 ; 0x0 300074d4: 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 ) 300074d8: e59f3028 ldr r3, [pc, #40] ; 30007508 <_Thread_Stack_Free+0x40> 300074dc: e5932000 ldr r2, [r3] 300074e0: e5923024 ldr r3, [r2, #36] 300074e4: e3530000 cmp r3, #0 ; 0x0 300074e8: 0a000003 beq 300074fc <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 300074ec: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 300074f0: e1a0e00f mov lr, pc <== NOT EXECUTED 300074f4: e12fff13 bx r3 <== NOT EXECUTED 300074f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 300074fc: e59000c8 ldr r0, [r0, #200] } 30007500: 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 ); 30007504: ea000215 b 30007d60 <_Workspace_Free> 30007508: 30016fdc .word 0x30016fdc 30006e14 <_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 ) { 30006e14: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl} */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30006e18: e281303c add r3, r1, #60 ; 0x3c Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 30006e1c: e5914014 ldr r4, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 30006e20: e1a07001 mov r7, r1 30006e24: e1a08000 mov r8, r0 30006e28: e5813038 str r3, [r1, #56] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 30006e2c: e2810038 add r0, r1, #56 ; 0x38 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30006e30: e3a01000 mov r1, #0 ; 0x0 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 ) ) 30006e34: e3140020 tst r4, #32 ; 0x20 30006e38: e587103c str r1, [r7, #60] RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 30006e3c: e1a01324 lsr r1, r4, #6 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 30006e40: e1a0a002 mov sl, r2 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 30006e44: 11a02201 lslne r2, r1, #4 30006e48: 10423101 subne r3, r2, r1, lsl #2 30006e4c: 10882003 addne r2, r8, r3 the_chain->last = _Chain_Head(the_chain); 30006e50: e5870040 str r0, [r7, #64] _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; 30006e54: e5986038 ldr r6, [r8, #56] 30006e58: 159f91d4 ldrne r9, [pc, #468] ; 30007034 <_Thread_queue_Enqueue_priority+0x220> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 30006e5c: 12820008 addne r0, r2, #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 ) ) 30006e60: 1a000028 bne 30006f08 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30006e64: e1a03081 lsl r3, r1, #1 30006e68: e0833001 add r3, r3, r1 30006e6c: e2833001 add r3, r3, #1 ; 0x1 30006e70: e1a02201 lsl r2, r1, #4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 30006e74: e0422101 sub r2, r2, r1, lsl #2 30006e78: e1a03103 lsl r3, r3, #2 30006e7c: e0880003 add r0, r8, r3 30006e80: e0882002 add r2, r8, r2 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 30006e84: e10f5000 mrs r5, CPSR 30006e88: e38530c0 orr r3, r5, #192 ; 0xc0 30006e8c: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 30006e90: e5921000 ldr r1, [r2] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 30006e94: e1510000 cmp r1, r0 30006e98: 1a00000f bne 30006edc <_Thread_queue_Enqueue_priority+0xc8> 30006e9c: ea000061 b 30007028 <_Thread_queue_Enqueue_priority+0x214> search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 30006ea0: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 30006ea4: e1510000 cmp r1, r0 30006ea8: 0a00000e beq 30006ee8 <_Thread_queue_Enqueue_priority+0xd4> break; search_priority = search_thread->current_priority; 30006eac: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 30006eb0: e154000c cmp r4, ip 30006eb4: 9a00000b bls 30006ee8 <_Thread_queue_Enqueue_priority+0xd4> break; #endif _ISR_Flash( level ); 30006eb8: e10f3000 mrs r3, CPSR 30006ebc: e129f005 msr CPSR_fc, r5 30006ec0: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 30006ec4: e5913010 ldr r3, [r1, #16] 30006ec8: e1160003 tst r6, r3 30006ecc: 0a000049 beq 30006ff8 <_Thread_queue_Enqueue_priority+0x1e4> _ISR_Enable( level ); goto restart_forward_search; } search_thread = 30006ed0: 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 ) ) { 30006ed4: e1510000 cmp r1, r0 30006ed8: 0a000002 beq 30006ee8 <_Thread_queue_Enqueue_priority+0xd4> search_priority = search_thread->current_priority; 30006edc: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 30006ee0: e154000c cmp r4, ip 30006ee4: 8affffed bhi 30006ea0 <_Thread_queue_Enqueue_priority+0x8c> 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 ) ) { 30006ee8: e1a06005 mov r6, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 30006eec: e5980030 ldr r0, [r8, #48] 30006ef0: e3500001 cmp r0, #1 ; 0x1 30006ef4: 0a000034 beq 30006fcc <_Thread_queue_Enqueue_priority+0x1b8> * 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; 30006ef8: e58a6000 str r6, [sl] <== NOT EXECUTED return the_thread_queue->sync_state; } 30006efc: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} 30006f00: e12fff1e bx lr if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 30006f04: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 30006f08: e5d93000 ldrb r3, [r9] 30006f0c: e283c001 add ip, r3, #1 ; 0x1 _ISR_Disable( level ); 30006f10: e10f5000 mrs r5, CPSR 30006f14: e38530c0 orr r3, r5, #192 ; 0xc0 30006f18: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 30006f1c: e5901000 ldr r1, [r0] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 30006f20: e1520001 cmp r2, r1 30006f24: 0a000018 beq 30006f8c <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 30006f28: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 30006f2c: e154000c cmp r4, ip 30006f30: 2a000015 bcs 30006f8c <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 30006f34: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 30006f38: e1520001 cmp r2, r1 30006f3c: 1a00000f bne 30006f80 <_Thread_queue_Enqueue_priority+0x16c> 30006f40: ea000011 b 30006f8c <_Thread_queue_Enqueue_priority+0x178> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 30006f44: e10f3000 mrs r3, CPSR 30006f48: e129f005 msr CPSR_fc, r5 30006f4c: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 30006f50: e5913010 ldr r3, [r1, #16] 30006f54: e1160003 tst r6, r3 30006f58: 0affffe9 beq 30006f04 <_Thread_queue_Enqueue_priority+0xf0> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 30006f5c: 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 ) ) { 30006f60: e1510002 cmp r1, r2 30006f64: 0a000008 beq 30006f8c <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 30006f68: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 30006f6c: e154000c cmp r4, ip 30006f70: 2a000005 bcs 30006f8c <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 30006f74: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 30006f78: e1510002 cmp r1, r2 <== NOT EXECUTED 30006f7c: 0a000002 beq 30006f8c <_Thread_queue_Enqueue_priority+0x178> <== NOT EXECUTED break; search_priority = search_thread->current_priority; 30006f80: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 30006f84: e154000c cmp r4, ip 30006f88: 3affffed bcc 30006f44 <_Thread_queue_Enqueue_priority+0x130> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006f8c: e5980030 ldr r0, [r8, #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 ) ) { 30006f90: e1a06005 mov r6, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006f94: e3500001 cmp r0, #1 ; 0x1 30006f98: 1affffd6 bne 30006ef8 <_Thread_queue_Enqueue_priority+0xe4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006f9c: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 30006fa0: e154000c cmp r4, ip if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006fa4: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 30006fa8: 0a000014 beq 30007000 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 30006fac: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 30006fb0: e5871004 str r1, [r7, #4] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 30006fb4: e5873000 str r3, [r7] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006fb8: e5878044 str r8, [r7, #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; 30006fbc: e5817000 str r7, [r1] next_node->previous = the_node; 30006fc0: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 30006fc4: e129f005 msr CPSR_fc, r5 30006fc8: eaffffcb b 30006efc <_Thread_queue_Enqueue_priority+0xe8> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006fcc: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 30006fd0: e154000c cmp r4, ip if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006fd4: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 30006fd8: 0a000008 beq 30007000 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 30006fdc: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30006fe0: e887000a stm r7, {r1, r3} the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006fe4: e5878044 str r8, [r7, #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; 30006fe8: e5837000 str r7, [r3] search_node->previous = the_node; 30006fec: e5817004 str r7, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 30006ff0: e129f005 msr CPSR_fc, r5 30006ff4: eaffffc0 b 30006efc <_Thread_queue_Enqueue_priority+0xe8> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 30006ff8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 30006ffc: eaffffa0 b 30006e84 <_Thread_queue_Enqueue_priority+0x70> <== NOT EXECUTED 30007000: e281303c add r3, r1, #60 ; 0x3c _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 30007004: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30007008: e5873000 str r3, [r7] the_node->previous = previous_node; 3000700c: e5872004 str r2, [r7, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30007010: e5878044 str r8, [r7, #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; 30007014: e5827000 str r7, [r2] search_node->previous = the_node; 30007018: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 3000701c: e129f006 msr CPSR_fc, r6 30007020: e3a00001 mov r0, #1 ; 0x1 30007024: eaffffb4 b 30006efc <_Thread_queue_Enqueue_priority+0xe8> 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 ) ) { 30007028: e1a06005 mov r6, r5 3000702c: e3e0c000 mvn ip, #0 ; 0x0 30007030: eaffffad b 30006eec <_Thread_queue_Enqueue_priority+0xd8> 30007034: 30016104 .word 0x30016104 3000bd84 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 3000bd84: e92d4010 push {r4, lr} 3000bd88: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); 3000bd8c: e10f0000 mrs r0, CPSR 3000bd90: e38030c0 orr r3, r0, #192 ; 0xc0 3000bd94: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000bd98: e59f3064 ldr r3, [pc, #100] ; 3000be04 <_Thread_queue_Extract_fifo+0x80> 3000bd9c: e5912010 ldr r2, [r1, #16] 3000bda0: e0023003 and r3, r2, r3 3000bda4: e3530000 cmp r3, #0 ; 0x0 3000bda8: 0a00000d beq 3000bde4 <_Thread_queue_Extract_fifo+0x60> _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000bdac: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 3000bdb0: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 3000bdb4: e5911000 ldr r1, [r1] 3000bdb8: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 3000bdbc: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; 3000bdc0: e5821000 str r1, [r2] 3000bdc4: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 3000bdc8: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000bdcc: 0a000006 beq 3000bdec <_Thread_queue_Extract_fifo+0x68> _ISR_Enable( level ); 3000bdd0: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000bdd4: e59f102c ldr r1, [pc, #44] ; 3000be08 <_Thread_queue_Extract_fifo+0x84> 3000bdd8: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000bddc: e8bd4010 pop {r4, lr} 3000bde0: eaffe995 b 3000643c <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 3000bde4: 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 } 3000bde8: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3000bdec: e3a03003 mov r3, #3 ; 0x3 3000bdf0: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3000bdf4: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); 3000bdf8: e2840048 add r0, r4, #72 ; 0x48 3000bdfc: ebffef85 bl 30007c18 <_Watchdog_Remove> 3000be00: eafffff3 b 3000bdd4 <_Thread_queue_Extract_fifo+0x50> 3000be04: 0003bee0 .word 0x0003bee0 3000be08: 1003fff8 .word 0x1003fff8 3000ace0 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 3000ace0: e92d4070 push {r4, r5, r6, lr} 3000ace4: e1a04001 mov r4, r1 3000ace8: 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 ); 3000acec: e10fc000 mrs ip, CPSR 3000acf0: e38c30c0 orr r3, ip, #192 ; 0xc0 3000acf4: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000acf8: e59f30b4 ldr r3, [pc, #180] ; 3000adb4 <_Thread_queue_Extract_priority_helper+0xd4> 3000acfc: e5912010 ldr r2, [r1, #16] 3000ad00: e0023003 and r3, r2, r3 3000ad04: e3530000 cmp r3, #0 ; 0x0 3000ad08: 0a000021 beq 3000ad94 <_Thread_queue_Extract_priority_helper+0xb4> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 3000ad0c: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000ad10: e284303c add r3, r4, #60 ; 0x3c 3000ad14: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 3000ad18: 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; 3000ad1c: 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; 3000ad20: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000ad24: 0a00000e beq 3000ad64 <_Thread_queue_Extract_priority_helper+0x84> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 3000ad28: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; 3000ad2c: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; 3000ad30: 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; 3000ad34: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 3000ad38: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 3000ad3c: e5942038 ldr r2, [r4, #56] 3000ad40: e5943040 ldr r3, [r4, #64] 3000ad44: e1520003 cmp r2, r3 3000ad48: 0a000005 beq 3000ad64 <_Thread_queue_Extract_priority_helper+0x84> 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 ); 3000ad4c: 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 = 3000ad50: e2813038 add r3, r1, #56 ; 0x38 3000ad54: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 3000ad58: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; 3000ad5c: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 3000ad60: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 3000ad64: e3560000 cmp r6, #0 ; 0x0 3000ad68: 1a000007 bne 3000ad8c <_Thread_queue_Extract_priority_helper+0xac> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000ad6c: e5943050 ldr r3, [r4, #80] 3000ad70: e3530002 cmp r3, #2 ; 0x2 3000ad74: 0a000008 beq 3000ad9c <_Thread_queue_Extract_priority_helper+0xbc> _ISR_Enable( level ); 3000ad78: e129f00c msr CPSR_fc, ip 3000ad7c: e59f1034 ldr r1, [pc, #52] ; 3000adb8 <_Thread_queue_Extract_priority_helper+0xd8> 3000ad80: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000ad84: e8bd4070 pop {r4, r5, r6, lr} 3000ad88: eaffedab b 3000643c <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 3000ad8c: e129f00c msr CPSR_fc, ip 3000ad90: e8bd8070 pop {r4, r5, r6, pc} Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 3000ad94: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 3000ad98: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3000ad9c: e3a03003 mov r3, #3 ; 0x3 3000ada0: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3000ada4: e129f00c msr CPSR_fc, ip (void) _Watchdog_Remove( &the_thread->Timer ); 3000ada8: e2840048 add r0, r4, #72 ; 0x48 3000adac: ebfff399 bl 30007c18 <_Watchdog_Remove> 3000adb0: eafffff1 b 3000ad7c <_Thread_queue_Extract_priority_helper+0x9c> 3000adb4: 0003bee0 .word 0x0003bee0 3000adb8: 1003fff8 .word 0x1003fff8 30012ae4 <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 30012ae4: e52de004 push {lr} ; (str lr, [sp, #-4]!) Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 30012ae8: e59f005c ldr r0, [pc, #92] ; 30012b4c <_Timer_Server_process_insertions+0x68> 30012aec: eb0002a5 bl 30013588 <_Chain_Get> if ( the_timer == NULL ) 30012af0: e3500000 cmp r0, #0 ; 0x0 30012af4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 30012af8: e5903038 ldr r3, [r0, #56] 30012afc: e3530001 cmp r3, #1 ; 0x1 30012b00: 0a00000c beq 30012b38 <_Timer_Server_process_insertions+0x54> _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 30012b04: e3530003 cmp r3, #3 ; 0x3 30012b08: 0a000005 beq 30012b24 <_Timer_Server_process_insertions+0x40> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 30012b0c: ebfffff4 bl 30012ae4 <_Timer_Server_process_insertions> <== NOT EXECUTED static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 30012b10: e59f0034 ldr r0, [pc, #52] ; 30012b4c <_Timer_Server_process_insertions+0x68> 30012b14: eb00029b bl 30013588 <_Chain_Get> if ( the_timer == NULL ) 30012b18: e3500000 cmp r0, #0 ; 0x0 30012b1c: 1afffff5 bne 30012af8 <_Timer_Server_process_insertions+0x14> 30012b20: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 30012b24: e2801010 add r1, r0, #16 ; 0x10 30012b28: e59f0020 ldr r0, [pc, #32] ; 30012b50 <_Timer_Server_process_insertions+0x6c> 30012b2c: eb001149 bl 30017058 <_Watchdog_Insert> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 30012b30: ebffffeb bl 30012ae4 <_Timer_Server_process_insertions> 30012b34: eafffff5 b 30012b10 <_Timer_Server_process_insertions+0x2c> the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 30012b38: e2801010 add r1, r0, #16 ; 0x10 30012b3c: e59f0010 ldr r0, [pc, #16] ; 30012b54 <_Timer_Server_process_insertions+0x70> 30012b40: eb001144 bl 30017058 <_Watchdog_Insert> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 30012b44: ebffffe6 bl 30012ae4 <_Timer_Server_process_insertions> 30012b48: eafffff0 b 30012b10 <_Timer_Server_process_insertions+0x2c> 30012b4c: 3003270c .word 0x3003270c 30012b50: 30032700 .word 0x30032700 30012b54: 300326ec .word 0x300326ec 3000d680 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 3000d680: e92d4010 push {r4, lr} 3000d684: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); 3000d688: eb00136c bl 30012440 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 3000d68c: e5943024 ldr r3, [r4, #36] 3000d690: e3530000 cmp r3, #0 ; 0x0 3000d694: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); 3000d698: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } 3000d69c: 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 ); 3000d6a0: ea001366 b 30012440 <_Chain_Extract> <== NOT EXECUTED 300098d4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 300098d4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 300098d8: e1a07000 mov r7, r0 300098dc: e1a04002 mov r4, r2 ISR_Level level; _ISR_Disable( level ); 300098e0: e10fc000 mrs ip, CPSR 300098e4: e38c30c0 orr r3, ip, #192 ; 0xc0 300098e8: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 300098ec: e1a06000 mov r6, r0 300098f0: e4960004 ldr r0, [r6], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 300098f4: e1500006 cmp r0, r6 300098f8: 0a000019 beq 30009964 <_Watchdog_Adjust+0x90> switch ( direction ) { 300098fc: e3510000 cmp r1, #0 ; 0x0 30009900: 1a000019 bne 3000996c <_Watchdog_Adjust+0x98> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 30009904: e3520000 cmp r2, #0 ; 0x0 30009908: 0a000015 beq 30009964 <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 3000990c: e5905010 ldr r5, [r0, #16] RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 30009910: e1a01000 mov r1, r0 30009914: e1520005 cmp r2, r5 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 30009918: 23a08001 movcs r8, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 3000991c: 2a000005 bcs 30009938 <_Watchdog_Adjust+0x64> 30009920: ea000017 b 30009984 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 30009924: e0544005 subs r4, r4, r5 30009928: 0a00000d beq 30009964 <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 3000992c: e5915010 ldr r5, [r1, #16] 30009930: e1550004 cmp r5, r4 30009934: 8a000012 bhi 30009984 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 30009938: e5818010 str r8, [r1, #16] _ISR_Enable( level ); 3000993c: e129f00c msr CPSR_fc, ip _Watchdog_Tickle( header ); 30009940: e1a00007 mov r0, r7 30009944: eb0000ab bl 30009bf8 <_Watchdog_Tickle> _ISR_Disable( level ); 30009948: e10fc000 mrs ip, CPSR 3000994c: e38c30c0 orr r3, ip, #192 ; 0xc0 30009950: e129f003 msr CPSR_fc, r3 30009954: e5973000 ldr r3, [r7] if ( _Chain_Is_empty( header ) ) 30009958: e1560003 cmp r6, r3 3000995c: e1a01003 mov r1, r3 30009960: 1affffef bne 30009924 <_Watchdog_Adjust+0x50> } break; } } _ISR_Enable( level ); 30009964: e129f00c msr CPSR_fc, ip } 30009968: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 3000996c: e3510001 cmp r1, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 30009970: 05903010 ldreq r3, [r0, #16] 30009974: 00833002 addeq r3, r3, r2 30009978: 05803010 streq r3, [r0, #16] } break; } } _ISR_Enable( level ); 3000997c: e129f00c msr CPSR_fc, ip } 30009980: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 30009984: e0643005 rsb r3, r4, r5 30009988: e5813010 str r3, [r1, #16] 3000998c: eafffff4 b 30009964 <_Watchdog_Adjust+0x90> 30016fa0 <_Watchdog_Adjust_to_chain>: { Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 30016fa0: e2513000 subs r3, r1, #0 ; 0x0 Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 30016fa4: e92d01f0 push {r4, r5, r6, r7, r8} 30016fa8: e1a01002 mov r1, r2 Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 30016fac: 0a000027 beq 30017050 <_Watchdog_Adjust_to_chain+0xb0> return; } _ISR_Disable( level ); 30016fb0: e10f7000 mrs r7, CPSR 30016fb4: e38720c0 orr r2, r7, #192 ; 0xc0 30016fb8: e129f002 msr CPSR_fc, r2 30016fbc: e1a02000 mov r2, r0 30016fc0: e492c004 ldr ip, [r2], #4 if ( !_Chain_Is_empty( header ) ) { 30016fc4: e15c0002 cmp ip, r2 30016fc8: 0a00001f beq 3001704c <_Watchdog_Adjust_to_chain+0xac> 30016fcc: e59c4010 ldr r4, [ip, #16] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30016fd0: e1a05003 mov r5, r3 30016fd4: e2816004 add r6, r1, #4 ; 0x4 if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 30016fd8: e3a08000 mov r8, #0 ; 0x0 } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 30016fdc: e1540005 cmp r4, r5 30016fe0: 8a000017 bhi 30017044 <_Watchdog_Adjust_to_chain+0xa4> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 30016fe4: e58c8010 str r8, [ip, #16] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 30016fe8: e152000c cmp r2, ip { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 30016fec: 159c3000 ldrne r3, [ip] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 30016ff0: 03a0c000 moveq ip, #0 ; 0x0 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 30016ff4: 15803000 strne r3, [r0] new_first->previous = _Chain_Head(the_chain); 30016ff8: 15830004 strne r0, [r3, #4] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 30016ffc: e58c6000 str r6, [ip] old_last_node = the_chain->last; 30017000: e5913008 ldr r3, [r1, #8] the_chain->last = the_node; 30017004: e581c008 str ip, [r1, #8] old_last_node->next = the_node; the_node->previous = old_last_node; 30017008: e58c3004 str r3, [ip, #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; 3001700c: e583c000 str ip, [r3] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 30017010: e10f3000 mrs r3, CPSR 30017014: e129f007 msr CPSR_fc, r7 30017018: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 3001701c: e590c000 ldr ip, [r0] } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 30017020: e152000c cmp r2, ip 30017024: 0a000008 beq 3001704c <_Watchdog_Adjust_to_chain+0xac> 30017028: e59c3010 ldr r3, [ip, #16] 3001702c: e3530000 cmp r3, #0 ; 0x0 30017030: 0affffec beq 30016fe8 <_Watchdog_Adjust_to_chain+0x48> return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 30017034: e0555004 subs r5, r5, r4 30017038: 0a000003 beq 3001704c <_Watchdog_Adjust_to_chain+0xac> 3001703c: e1a04003 mov r4, r3 <== NOT EXECUTED 30017040: eaffffe5 b 30016fdc <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 30017044: e0653004 rsb r3, r5, r4 30017048: e58c3010 str r3, [ip, #16] break; } } } _ISR_Enable( level ); 3001704c: e129f007 msr CPSR_fc, r7 } 30017050: e8bd01f0 pop {r4, r5, r6, r7, r8} 30017054: e12fff1e bx lr 30007a5c <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 30007a5c: e59f3144 ldr r3, [pc, #324] ; 30007ba8 <_Watchdog_Insert+0x14c> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 30007a60: e92d01f0 push {r4, r5, r6, r7, r8} 30007a64: e1a04001 mov r4, r1 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 30007a68: e5935000 ldr r5, [r3] _ISR_Disable( level ); 30007a6c: e10f6000 mrs r6, CPSR 30007a70: e38630c0 orr r3, r6, #192 ; 0xc0 30007a74: 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 ) { 30007a78: e5913008 ldr r3, [r1, #8] 30007a7c: e3530000 cmp r3, #0 ; 0x0 30007a80: 1a000041 bne 30007b8c <_Watchdog_Insert+0x130> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 30007a84: e59f8120 ldr r8, [pc, #288] ; 30007bac <_Watchdog_Insert+0x150> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 30007a88: e3a03001 mov r3, #1 ; 0x1 _Watchdog_Sync_count++; 30007a8c: e5982000 ldr r2, [r8] 30007a90: e59f7118 ldr r7, [pc, #280] ; 30007bb0 <_Watchdog_Insert+0x154> 30007a94: e2822001 add r2, r2, #1 ; 0x1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 30007a98: e5813008 str r3, [r1, #8] _Watchdog_Sync_count++; 30007a9c: e5882000 str r2, [r8] restart: delta_interval = the_watchdog->initial; 30007aa0: e594c00c ldr ip, [r4, #12] * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 30007aa4: e5902000 ldr r2, [r0] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 30007aa8: e35c0000 cmp ip, #0 ; 0x0 30007aac: 0a000023 beq 30007b40 <_Watchdog_Insert+0xe4> 30007ab0: e5923000 ldr r3, [r2] 30007ab4: e3530000 cmp r3, #0 ; 0x0 30007ab8: 0a000020 beq 30007b40 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 30007abc: e5921010 ldr r1, [r2, #16] 30007ac0: e15c0001 cmp ip, r1 30007ac4: 3a000032 bcc 30007b94 <_Watchdog_Insert+0x138> * 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 ); 30007ac8: e10f3000 mrs r3, CPSR 30007acc: e129f006 msr CPSR_fc, r6 30007ad0: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 30007ad4: e5943008 ldr r3, [r4, #8] 30007ad8: e3530001 cmp r3, #1 ; 0x1 30007adc: 1a000023 bne 30007b70 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 30007ae0: e5973000 ldr r3, [r7] 30007ae4: e1550003 cmp r5, r3 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 30007ae8: 2061c00c rsbcs ip, r1, ip if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 30007aec: 2a000010 bcs 30007b34 <_Watchdog_Insert+0xd8> 30007af0: ea00002a b 30007ba0 <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 30007af4: e5923000 ldr r3, [r2] 30007af8: e3530000 cmp r3, #0 ; 0x0 30007afc: 0a00000f beq 30007b40 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 30007b00: e5921010 ldr r1, [r2, #16] 30007b04: e151000c cmp r1, ip 30007b08: 8a000021 bhi 30007b94 <_Watchdog_Insert+0x138> * 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 ); 30007b0c: e10f3000 mrs r3, CPSR 30007b10: e129f006 msr CPSR_fc, r6 30007b14: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 30007b18: e5943008 ldr r3, [r4, #8] if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 30007b1c: e061c00c rsb ip, r1, ip * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 30007b20: e3530001 cmp r3, #1 ; 0x1 30007b24: 1a000011 bne 30007b70 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 30007b28: e5973000 ldr r3, [r7] 30007b2c: e1550003 cmp r5, r3 30007b30: 3a00001a bcc 30007ba0 <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 30007b34: e35c0000 cmp ip, #0 ; 0x0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 30007b38: e5922000 ldr r2, [r2] 30007b3c: 1affffec bne 30007af4 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 30007b40: e5921004 ldr r1, [r2, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 30007b44: e59f3068 ldr r3, [pc, #104] ; 30007bb4 <_Watchdog_Insert+0x158> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 30007b48: e5910000 ldr r0, [r1] 30007b4c: e5932000 ldr r2, [r3] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 30007b50: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 30007b54: e5814000 str r4, [r1] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 30007b58: e5841004 str r1, [r4, #4] 30007b5c: e5842014 str r2, [r4, #20] 30007b60: e5843008 str r3, [r4, #8] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 30007b64: e584c010 str ip, [r4, #16] before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 30007b68: e5804004 str r4, [r0, #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; 30007b6c: e5840000 str r0, [r4] _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; 30007b70: e5875000 str r5, [r7] _Watchdog_Sync_count--; 30007b74: e5983000 ldr r3, [r8] 30007b78: e2433001 sub r3, r3, #1 ; 0x1 30007b7c: e5883000 str r3, [r8] _ISR_Enable( level ); 30007b80: e129f006 msr CPSR_fc, r6 } 30007b84: e8bd01f0 pop {r4, r5, r6, r7, r8} 30007b88: e12fff1e bx lr * 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 ) { _ISR_Enable( level ); 30007b8c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 30007b90: eafffffb b 30007b84 <_Watchdog_Insert+0x128> <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 30007b94: e06c3001 rsb r3, ip, r1 30007b98: e5823010 str r3, [r2, #16] 30007b9c: eaffffe7 b 30007b40 <_Watchdog_Insert+0xe4> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 30007ba0: e5875000 str r5, [r7] 30007ba4: eaffffbd b 30007aa0 <_Watchdog_Insert+0x44> 30007ba8: 30016fe0 .word 0x30016fe0 30007bac: 300170a0 .word 0x300170a0 30007bb0: 30017000 .word 0x30017000 30007bb4: 300170a4 .word 0x300170a4 30007da8 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 30007da8: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007dac: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 30007db0: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007db4: 0a000010 beq 30007dfc <_Workspace_Handler_initialization+0x54> 30007db8: e214c003 ands ip, r4, #3 ; 0x3 30007dbc: 1a00000e bne 30007dfc <_Workspace_Handler_initialization+0x54> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 30007dc0: e59f3054 ldr r3, [pc, #84] ; 30007e1c <_Workspace_Handler_initialization+0x74> 30007dc4: e5932000 ldr r2, [r3] 30007dc8: e5d21028 ldrb r1, [r2, #40] 30007dcc: e3510000 cmp r1, #0 ; 0x0 30007dd0: 1a00000d bne 30007e0c <_Workspace_Handler_initialization+0x64> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 30007dd4: e1a01004 mov r1, r4 30007dd8: e1a02005 mov r2, r5 30007ddc: e59f003c ldr r0, [pc, #60] ; 30007e20 <_Workspace_Handler_initialization+0x78> 30007de0: e3a03004 mov r3, #4 ; 0x4 30007de4: ebfff671 bl 300057b0 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 30007de8: e3500000 cmp r0, #0 ; 0x0 30007dec: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 30007df0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 30007df4: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 30007df8: ebfff6f7 bl 300059dc <_Internal_error_Occurred> <== NOT EXECUTED ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 30007dfc: e3a00000 mov r0, #0 ; 0x0 30007e00: e3a01001 mov r1, #1 ; 0x1 30007e04: e3a02002 mov r2, #2 ; 0x2 30007e08: ebfff6f3 bl 300059dc <_Internal_error_Occurred> TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 30007e0c: e1a0100c mov r1, ip <== NOT EXECUTED 30007e10: e1a02005 mov r2, r5 <== NOT EXECUTED 30007e14: eb00123c bl 3000c70c <== NOT EXECUTED 30007e18: eaffffed b 30007dd4 <_Workspace_Handler_initialization+0x2c> <== NOT EXECUTED 30007e1c: 30016fdc .word 0x30016fdc 30007e20: 30016f6c .word 0x30016f6c 30008d90 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 30008d90: e1a03002 mov r3, r2 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 30008d94: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30008d98: eaffffe9 b 30008d44 <__assert_func> <== NOT EXECUTED 30008d44 <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 30008d44: e92d4010 push {r4, lr} <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 30008d48: e252c000 subs ip, r2, #0 ; 0x0 <== NOT EXECUTED 30008d4c: 059fc030 ldreq ip, [pc, #48] ; 30008d84 <__assert_func+0x40> <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 30008d50: e1a04001 mov r4, r1 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 30008d54: 159fe02c ldrne lr, [pc, #44] ; 30008d88 <__assert_func+0x44> <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 30008d58: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 30008d5c: e1a01003 mov r1, r3 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 30008d60: 01a0e00c moveq lr, ip <== NOT EXECUTED 30008d64: e1a02000 mov r2, r0 <== NOT EXECUTED 30008d68: e1a03004 mov r3, r4 <== NOT EXECUTED 30008d6c: e59f0018 ldr r0, [pc, #24] ; 30008d8c <__assert_func+0x48> <== NOT EXECUTED 30008d70: e58de000 str lr, [sp] <== NOT EXECUTED 30008d74: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30008d78: ebffe4ef bl 3000213c <== NOT EXECUTED file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 30008d7c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30008d80: ebfff043 bl 30004e94 <== NOT EXECUTED 30008d84: 30015b2c .word 0x30015b2c 30008d88: 30015ce4 .word 0x30015ce4 30008d8c: 30015cf4 .word 0x30015cf4 30014734 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 30014734: e1a04000 mov r4, r0 30014738: eb000241 bl 30015044 <_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(); 3001473c: ebffffe2 bl 300146cc rtems_shutdown_executive(status); 30014740: e1a00004 mov r0, r4 30014744: eb000041 bl 30014850 30014748: eafffffe b 30014748 <_exit+0x14> <== NOT EXECUTED 3002b220 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 3002b220: e1a00001 mov r0, r1 <== NOT EXECUTED 3002b224: e1a01002 mov r1, r2 <== NOT EXECUTED 3002b228: e1a02003 mov r2, r3 <== NOT EXECUTED 3002b22c: eaffff73 b 3002b000 <== NOT EXECUTED 30020c88 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 30020c88: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30020c8c: e12fff1e bx lr <== NOT EXECUTED 300091d4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 300091d4: eaffffe4 b 3000916c <== NOT EXECUTED 3001f3f4 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 3001f3f4: e1a00001 mov r0, r1 <== NOT EXECUTED 3001f3f8: e1a01002 mov r1, r2 <== NOT EXECUTED 3001f3fc: eaffff6a b 3001f1ac <== NOT EXECUTED 3001f5dc <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 3001f5dc: e1a00001 mov r0, r1 <== NOT EXECUTED 3001f5e0: e1a01002 mov r1, r2 <== NOT EXECUTED 3001f5e4: eaffffc6 b 3001f504 <== NOT EXECUTED 30014834 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 30014834: e1a00001 mov r0, r1 <== NOT EXECUTED 30014838: e1a01002 mov r1, r2 <== NOT EXECUTED 3001483c: ea000012 b 3001488c <== NOT EXECUTED 3003ef8c <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3003ef8c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3003ef90: e24dd04c sub sp, sp, #76 ; 0x4c <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3003ef94: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3003ef98: e1a04001 mov r4, r1 <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3003ef9c: e1a0100d mov r1, sp <== NOT EXECUTED int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3003efa0: e1a05002 mov r5, r2 <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3003efa4: ebff19b8 bl 3000568c <== NOT EXECUTED if ( s < 0 ) 3003efa8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3003efac: ba00000a blt 3003efdc <_rename_r+0x50> <== NOT EXECUTED return s; s = link( old, new ); 3003efb0: e1a01005 mov r1, r5 <== NOT EXECUTED 3003efb4: e1a00004 mov r0, r4 <== NOT EXECUTED 3003efb8: ebff807b bl 3001f1ac <== NOT EXECUTED if ( s < 0 ) 3003efbc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3003efc0: ba000005 blt 3003efdc <_rename_r+0x50> <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 3003efc4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 3003efc8: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 3003efcc: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED 3003efd0: 0a000003 beq 3003efe4 <_rename_r+0x58> <== NOT EXECUTED 3003efd4: e1a00004 mov r0, r4 <== NOT EXECUTED 3003efd8: ebff8469 bl 30020184 <== NOT EXECUTED } 3003efdc: e28dd04c add sp, sp, #76 ; 0x4c <== NOT EXECUTED 3003efe0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if ( s < 0 ) return s; s = link( old, new ); if ( s < 0 ) return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 3003efe4: e1a00004 mov r0, r4 <== NOT EXECUTED 3003efe8: ebff835f bl 3001fd6c <== NOT EXECUTED 3003efec: eafffffa b 3003efdc <_rename_r+0x50> <== NOT EXECUTED 30005764 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 30005764: e1a00001 mov r0, r1 <== NOT EXECUTED 30005768: e1a01002 mov r1, r2 <== NOT EXECUTED 3000576c: eaffffc6 b 3000568c <== NOT EXECUTED 300202d0 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 300202d0: e1a00001 mov r0, r1 <== NOT EXECUTED 300202d4: eaffffaa b 30020184 <== NOT EXECUTED 3000443c : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 3000443c: e92d40f0 push {r4, r5, r6, r7, lr} long adjustment; /* * Simple validations */ if ( !delta ) 30004440: e2504000 subs r4, r0, #0 ; 0x0 int adjtime( struct timeval *delta, struct timeval *olddelta ) { 30004444: e24dd008 sub sp, sp, #8 ; 0x8 30004448: e1a05001 mov r5, r1 long adjustment; /* * Simple validations */ if ( !delta ) 3000444c: 0a000058 beq 300045b4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 30004450: e5940004 ldr r0, [r4, #4] 30004454: e59f316c ldr r3, [pc, #364] ; 300045c8 30004458: e1500003 cmp r0, r3 3000445c: 8a000054 bhi 300045b4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 30004460: e3510000 cmp r1, #0 ; 0x0 olddelta->tv_sec = 0; 30004464: 13a03000 movne r3, #0 ; 0x0 30004468: 15813000 strne r3, [r1] olddelta->tv_usec = 0; 3000446c: 15813004 strne r3, [r1, #4] } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 30004470: e5941000 ldr r1, [r4] if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; olddelta->tv_usec = 0; 30004474: 15940004 ldrne r0, [r4, #4] } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 30004478: e1a02401 lsl r2, r1, #8 3000447c: e0422181 sub r2, r2, r1, lsl #3 30004480: e1a03302 lsl r3, r2, #6 30004484: e0623003 rsb r3, r2, r3 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < _TOD_Microseconds_per_tick ) 30004488: e59f213c ldr r2, [pc, #316] ; 300045cc olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 3000448c: e0833001 add r3, r3, r1 30004490: e1a03303 lsl r3, r3, #6 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < _TOD_Microseconds_per_tick ) 30004494: e5921000 ldr r1, [r2] 30004498: e0803003 add r3, r0, r3 3000449c: e1530001 cmp r3, r1 300044a0: 2a000002 bcs 300044b0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 300044a4: e3a00000 mov r0, #0 ; 0x0 return 0; } 300044a8: e28dd008 add sp, sp, #8 ; 0x8 300044ac: e8bd80f0 pop {r4, r5, r6, r7, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 300044b0: e59f2118 ldr r2, [pc, #280] ; 300045d0 300044b4: e5923000 ldr r3, [r2] 300044b8: e2833001 add r3, r3, #1 ; 0x1 300044bc: e5823000 str r3, [r2] * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 300044c0: e1a0000d mov r0, sp 300044c4: eb0006a6 bl 30005f64 <_TOD_Get> ts.tv_sec += delta->tv_sec; 300044c8: e5942000 ldr r2, [r4] 300044cc: e59d3000 ldr r3, [sp] ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 300044d0: e59d1004 ldr r1, [sp, #4] _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 300044d4: e0826003 add r6, r2, r3 300044d8: e58d6000 str r6, [sp] ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 300044dc: e5942004 ldr r2, [r4, #4] * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 300044e0: e1a0700d mov r7, sp ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 300044e4: e1a03382 lsl r3, r2, #7 300044e8: e0433102 sub r3, r3, r2, lsl #2 300044ec: e0833002 add r3, r3, r2 300044f0: e1a03183 lsl r3, r3, #3 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 300044f4: e59f20d8 ldr r2, [pc, #216] ; 300045d4 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 300044f8: e0831001 add r1, r3, r1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 300044fc: e1510002 cmp r1, r2 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 30004500: e58d1004 str r1, [sp, #4] /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 30004504: 9a000015 bls 30004560 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 30004508: e59fc0c8 ldr ip, [pc, #200] ; 300045d8 <== NOT EXECUTED int adjtime( struct timeval *delta, struct timeval *olddelta ) { 3000450c: e59f30c8 ldr r3, [pc, #200] ; 300045dc <== NOT EXECUTED ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 30004510: e081c00c add ip, r1, ip <== NOT EXECUTED int adjtime( struct timeval *delta, struct timeval *olddelta ) { 30004514: e1a024ac lsr r2, ip, #9 <== NOT EXECUTED 30004518: e08e1293 umull r1, lr, r3, r2 <== NOT EXECUTED 3000451c: e1a0e3ae lsr lr, lr, #7 <== NOT EXECUTED 30004520: e1a0240e lsl r2, lr, #8 <== NOT EXECUTED 30004524: e042218e sub r2, r2, lr, lsl #3 <== NOT EXECUTED 30004528: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED 3000452c: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 30004530: e083300e add r3, r3, lr <== NOT EXECUTED 30004534: e1a02103 lsl r2, r3, #2 <== NOT EXECUTED 30004538: e0833002 add r3, r3, r2 <== NOT EXECUTED 3000453c: e1a01103 lsl r1, r3, #2 <== NOT EXECUTED 30004540: e0833001 add r3, r3, r1 <== NOT EXECUTED 30004544: e1a00103 lsl r0, r3, #2 <== NOT EXECUTED 30004548: e0833000 add r3, r3, r0 <== NOT EXECUTED 3000454c: e2862001 add r2, r6, #1 ; 0x1 <== NOT EXECUTED 30004550: e04cc483 sub ip, ip, r3, lsl #9 <== NOT EXECUTED 30004554: e082200e add r2, r2, lr <== NOT EXECUTED 30004558: e88d1004 stm sp, {r2, ip} <== NOT EXECUTED 3000455c: e1a0100c mov r1, ip <== NOT EXECUTED ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 30004560: e59f2070 ldr r2, [pc, #112] ; 300045d8 30004564: e1a0c001 mov ip, r1 30004568: e1510002 cmp r1, r2 3000456c: 8a000007 bhi 30004590 30004570: e59d3000 ldr r3, [sp] ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 30004574: e28cc5ee add ip, ip, #998244352 ; 0x3b800000 30004578: e28cc96b add ip, ip, #1753088 ; 0x1ac000 3000457c: e28ccc0a add ip, ip, #2560 ; 0xa00 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 30004580: e15c0002 cmp ip, r2 int adjtime( struct timeval *delta, struct timeval *olddelta ) { 30004584: e2433001 sub r3, r3, #1 ; 0x1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 30004588: 9afffff9 bls 30004574 3000458c: e88d1008 stm sp, {r3, ip} ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 30004590: e1a0000d mov r0, sp 30004594: eb0006a1 bl 30006020 <_TOD_Set> _Thread_Enable_dispatch(); 30004598: eb000ae9 bl 30007144 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 3000459c: e3550000 cmp r5, #0 ; 0x0 300045a0: 0affffbf beq 300044a4 *olddelta = *delta; 300045a4: e894000c ldm r4, {r2, r3} 300045a8: e885000c stm r5, {r2, r3} 300045ac: e3a00000 mov r0, #0 ; 0x0 300045b0: eaffffbc b 300044a8 */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 300045b4: eb0020ab bl 3000c868 <__errno> 300045b8: e3a03016 mov r3, #22 ; 0x16 300045bc: e5803000 str r3, [r0] 300045c0: e3e00000 mvn r0, #0 ; 0x0 300045c4: eaffffb7 b 300044a8 300045c8: 000f423f .word 0x000f423f 300045cc: 30019130 .word 0x30019130 300045d0: 30018f8c .word 0x30018f8c 300045d4: 3b9ac9ff .word 0x3b9ac9ff 300045d8: c4653600 .word 0xc4653600 300045dc: 00044b83 .word 0x00044b83 30004704 : int alphasort( const void *d1, const void *d2 ) { return(strcmp((*(struct dirent **)d1)->d_name, 30004704: e5900000 ldr r0, [r0] <== NOT EXECUTED 30004708: e5911000 ldr r1, [r1] <== NOT EXECUTED 3000470c: e280000c add r0, r0, #12 ; 0xc <== NOT EXECUTED 30004710: e281100c add r1, r1, #12 ; 0xc <== NOT EXECUTED 30004714: ea00325c b 3001108c <== NOT EXECUTED 3001d984 : #include int chdir( const char *pathname ) { 3001d984: e92d4030 push {r4, r5, lr} /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 3001d988: e3a01001 mov r1, #1 ; 0x1 #include int chdir( const char *pathname ) { 3001d98c: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 3001d990: e1a0200d mov r2, sp 3001d994: e1a03001 mov r3, r1 3001d998: ebff9916 bl 30003df8 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 3001d99c: e3500000 cmp r0, #0 ; 0x0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 3001d9a0: e1a0400d mov r4, sp pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 3001d9a4: 1a000021 bne 3001da30 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 3001d9a8: e59d2008 ldr r2, [sp, #8] 3001d9ac: e5923010 ldr r3, [r2, #16] 3001d9b0: e3530000 cmp r3, #0 ; 0x0 3001d9b4: 0a000015 beq 3001da10 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 3001d9b8: e1a0000d mov r0, sp 3001d9bc: e1a0e00f mov lr, pc 3001d9c0: e12fff13 bx r3 3001d9c4: e3500001 cmp r0, #1 ; 0x1 3001d9c8: 1a00001a bne 3001da38 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 3001d9cc: e59f5098 ldr r5, [pc, #152] ; 3001da6c 3001d9d0: e5950000 ldr r0, [r5] 3001d9d4: e590300c ldr r3, [r0, #12] 3001d9d8: e3530000 cmp r3, #0 ; 0x0 3001d9dc: 0a000004 beq 3001d9f4 3001d9e0: e593301c ldr r3, [r3, #28] 3001d9e4: e3530000 cmp r3, #0 ; 0x0 3001d9e8: 12800004 addne r0, r0, #4 ; 0x4 3001d9ec: 11a0e00f movne lr, pc 3001d9f0: 112fff13 bxne r3 rtems_filesystem_current = loc; 3001d9f4: e595c000 ldr ip, [r5] 3001d9f8: e894000f ldm r4, {r0, r1, r2, r3} 3001d9fc: e28cc004 add ip, ip, #4 ; 0x4 3001da00: e88c000f stm ip, {r0, r1, r2, r3} 3001da04: e3a00000 mov r0, #0 ; 0x0 return 0; } 3001da08: e28dd010 add sp, sp, #16 ; 0x10 3001da0c: e8bd8030 pop {r4, r5, pc} /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 3001da10: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3001da14: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001da18: 11a0000d movne r0, sp <== NOT EXECUTED 3001da1c: 11a0e00f movne lr, pc <== NOT EXECUTED 3001da20: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001da24: eb003ff0 bl 3002d9ec <__errno> <== NOT EXECUTED 3001da28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001da2c: e5803000 str r3, [r0] <== NOT EXECUTED 3001da30: e3e00000 mvn r0, #0 ; 0x0 3001da34: eafffff3 b 3001da08 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 3001da38: e59d3008 ldr r3, [sp, #8] 3001da3c: e3530000 cmp r3, #0 ; 0x0 3001da40: 0a000004 beq 3001da58 3001da44: e593301c ldr r3, [r3, #28] 3001da48: e3530000 cmp r3, #0 ; 0x0 3001da4c: 11a0000d movne r0, sp 3001da50: 11a0e00f movne lr, pc 3001da54: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 3001da58: eb003fe3 bl 3002d9ec <__errno> 3001da5c: e3a03014 mov r3, #20 ; 0x14 3001da60: e5803000 str r3, [r0] 3001da64: e3e00000 mvn r0, #0 ; 0x0 3001da68: eaffffe6 b 3001da08 3001da6c: 30045edc .word 0x30045edc 30003bb4 : int chmod( const char *path, mode_t mode ) { 30003bb4: e92d4030 push {r4, r5, lr} 30003bb8: e24dd010 sub sp, sp, #16 ; 0x10 30003bbc: e1a04001 mov r4, r1 int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 30003bc0: e1a0200d mov r2, sp 30003bc4: e3a01000 mov r1, #0 ; 0x0 30003bc8: e3a03001 mov r3, #1 ; 0x1 30003bcc: eb000089 bl 30003df8 if ( status != 0 ) 30003bd0: e3500000 cmp r0, #0 ; 0x0 { int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 30003bd4: e1a0500d mov r5, sp if ( status != 0 ) 30003bd8: 1a000020 bne 30003c60 return -1; if ( !loc.handlers ){ 30003bdc: e59d3004 ldr r3, [sp, #4] 30003be0: e3530000 cmp r3, #0 ; 0x0 30003be4: 0a000012 beq 30003c34 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 30003be8: e593301c ldr r3, [r3, #28] 30003bec: e3530000 cmp r3, #0 ; 0x0 30003bf0: 0a00001c beq 30003c68 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 30003bf4: e1a01004 mov r1, r4 30003bf8: e1a0000d mov r0, sp 30003bfc: e1a0e00f mov lr, pc 30003c00: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 30003c04: 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 ); 30003c08: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 30003c0c: e3530000 cmp r3, #0 ; 0x0 30003c10: 0a000004 beq 30003c28 30003c14: e593301c ldr r3, [r3, #28] 30003c18: e3530000 cmp r3, #0 ; 0x0 30003c1c: 11a0000d movne r0, sp 30003c20: 11a0e00f movne lr, pc 30003c24: 112fff13 bxne r3 return result; } 30003c28: e1a00004 mov r0, r4 30003c2c: e28dd010 add sp, sp, #16 ; 0x10 30003c30: e8bd8030 pop {r4, r5, pc} status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 30003c34: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30003c38: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003c3c: 0a000004 beq 30003c54 <== NOT EXECUTED 30003c40: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30003c44: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003c48: 11a0000d movne r0, sp <== NOT EXECUTED 30003c4c: 11a0e00f movne lr, pc <== NOT EXECUTED 30003c50: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 30003c54: eb00a764 bl 3002d9ec <__errno> <== NOT EXECUTED 30003c58: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30003c5c: e5803000 str r3, [r0] <== NOT EXECUTED 30003c60: e3e04000 mvn r4, #0 ; 0x0 30003c64: eaffffef b 30003c28 } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 30003c68: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30003c6c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003c70: 0a000004 beq 30003c88 <== NOT EXECUTED 30003c74: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30003c78: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003c7c: 11a0000d movne r0, sp <== NOT EXECUTED 30003c80: 11a0e00f movne lr, pc <== NOT EXECUTED 30003c84: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30003c88: eb00a757 bl 3002d9ec <__errno> <== NOT EXECUTED 30003c8c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30003c90: e5803000 str r3, [r0] <== NOT EXECUTED 30003c94: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 30003c98: eaffffe2 b 30003c28 <== NOT EXECUTED 3001da70 : int chown( const char *path, uid_t owner, gid_t group ) { 3001da70: e92d4070 push {r4, r5, r6, lr} 3001da74: e24dd010 sub sp, sp, #16 ; 0x10 3001da78: e1a0c801 lsl ip, r1, #16 3001da7c: e1a04802 lsl r4, r2, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 3001da80: e3a01000 mov r1, #0 ; 0x0 3001da84: e1a0200d mov r2, sp 3001da88: e3a03001 mov r3, #1 ; 0x1 int chown( const char *path, uid_t owner, gid_t group ) { 3001da8c: e1a0582c lsr r5, ip, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 3001da90: ebff98d8 bl 30003df8 3001da94: e3500000 cmp r0, #0 ; 0x0 3001da98: e1a0600d mov r6, sp int chown( const char *path, uid_t owner, gid_t group ) { 3001da9c: e1a04824 lsr r4, r4, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 3001daa0: 1a00001c bne 3001db18 return -1; if ( !loc.ops->chown_h ) { 3001daa4: e59d2008 ldr r2, [sp, #8] 3001daa8: e5923018 ldr r3, [r2, #24] 3001daac: e3530000 cmp r3, #0 ; 0x0 3001dab0: 0a000010 beq 3001daf8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 3001dab4: e1a02004 mov r2, r4 3001dab8: e1a01005 mov r1, r5 3001dabc: e1a0000d mov r0, sp 3001dac0: e1a0e00f mov lr, pc 3001dac4: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3001dac8: 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 ); 3001dacc: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3001dad0: e3530000 cmp r3, #0 ; 0x0 3001dad4: 0a000004 beq 3001daec 3001dad8: e593301c ldr r3, [r3, #28] 3001dadc: e3530000 cmp r3, #0 ; 0x0 3001dae0: 11a0000d movne r0, sp 3001dae4: 11a0e00f movne lr, pc 3001dae8: 112fff13 bxne r3 return result; } 3001daec: e1a00004 mov r0, r4 3001daf0: e28dd010 add sp, sp, #16 ; 0x10 3001daf4: e8bd8070 pop {r4, r5, r6, pc} if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 3001daf8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3001dafc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001db00: 11a0000d movne r0, sp <== NOT EXECUTED 3001db04: 11a0e00f movne lr, pc <== NOT EXECUTED 3001db08: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001db0c: eb003fb6 bl 3002d9ec <__errno> <== NOT EXECUTED 3001db10: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001db14: e5803000 str r3, [r0] <== NOT EXECUTED 3001db18: e3e04000 mvn r4, #0 ; 0x0 3001db1c: eafffff2 b 3001daec 3001db20 : #include int chroot( const char *pathname ) { 3001db20: 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) { 3001db24: e59f60c4 ldr r6, [pc, #196] ; 3001dbf0 3001db28: e59f30c4 ldr r3, [pc, #196] ; 3001dbf4 3001db2c: e5964000 ldr r4, [r6] #include int chroot( const char *pathname ) { 3001db30: 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) { 3001db34: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 3001db38: 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) { 3001db3c: 0a00001b beq 3001dbb0 rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 3001db40: e1a00005 mov r0, r5 3001db44: ebffff8e bl 3001d984 if (result) { 3001db48: e3500000 cmp r0, #0 ; 0x0 3001db4c: 1a000020 bne 3001dbd4 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 3001db50: e1a01000 mov r1, r0 3001db54: e1a0200d mov r2, sp 3001db58: e59f0098 ldr r0, [pc, #152] ; 3001dbf8 3001db5c: e1a03001 mov r3, r1 3001db60: ebff98a4 bl 30003df8 3001db64: e3500000 cmp r0, #0 ; 0x0 3001db68: e1a0400d mov r4, sp 3001db6c: 1a000018 bne 3001dbd4 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 3001db70: e5960000 ldr r0, [r6] 3001db74: e590301c ldr r3, [r0, #28] 3001db78: e3530000 cmp r3, #0 ; 0x0 3001db7c: 0a000004 beq 3001db94 3001db80: e593301c ldr r3, [r3, #28] 3001db84: e3530000 cmp r3, #0 ; 0x0 3001db88: 12800014 addne r0, r0, #20 ; 0x14 3001db8c: 11a0e00f movne lr, pc 3001db90: 112fff13 bxne r3 rtems_filesystem_root = loc; 3001db94: e596c000 ldr ip, [r6] 3001db98: e894000f ldm r4, {r0, r1, r2, r3} 3001db9c: e28cc014 add ip, ip, #20 ; 0x14 3001dba0: e88c000f stm ip, {r0, r1, r2, r3} 3001dba4: e3a00000 mov r0, #0 ; 0x0 return 0; } 3001dba8: e28dd010 add sp, sp, #16 ; 0x10 3001dbac: e8bd8070 pop {r4, r5, r6, pc} int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 3001dbb0: eb00075e bl 3001f930 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 3001dbb4: e5963000 ldr r3, [r6] 3001dbb8: e1530004 cmp r3, r4 3001dbbc: 1affffdf bne 3001db40 rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001dbc0: eb003f89 bl 3002d9ec <__errno> <== NOT EXECUTED 3001dbc4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001dbc8: e5803000 str r3, [r0] <== NOT EXECUTED 3001dbcc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001dbd0: eafffff4 b 3001dba8 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 3001dbd4: eb003f84 bl 3002d9ec <__errno> <== NOT EXECUTED 3001dbd8: e1a04000 mov r4, r0 <== NOT EXECUTED 3001dbdc: eb003f82 bl 3002d9ec <__errno> <== NOT EXECUTED 3001dbe0: e5903000 ldr r3, [r0] <== NOT EXECUTED 3001dbe4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001dbe8: e5843000 str r3, [r4] <== NOT EXECUTED 3001dbec: eaffffed b 3001dba8 <== NOT EXECUTED 3001dbf0: 30045edc .word 0x30045edc 3001dbf4: 3005ac7c .word 0x3005ac7c 3001dbf8: 30041698 .word 0x30041698 3002ae40 : * close a directory. */ int closedir( DIR *dirp ) { 3002ae40: e92d4030 push {r4, r5, lr} int fd; if ( !dirp ) 3002ae44: e2505000 subs r5, r0, #0 ; 0x0 3002ae48: 0a00000b beq 3002ae7c rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; 3002ae4c: e3a03000 mov r3, #0 ; 0x0 3002ae50: e5853004 str r3, [r5, #4] if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; 3002ae54: e2433001 sub r3, r3, #1 ; 0x1 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 3002ae58: e5954000 ldr r4, [r5] dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 3002ae5c: e595000c ldr r0, [r5, #12] if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; 3002ae60: e5853000 str r3, [r5] dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 3002ae64: ebff6438 bl 30003f4c (void)free((void *)dirp); 3002ae68: e1a00005 mov r0, r5 3002ae6c: ebff6436 bl 30003f4c return(close(fd)); 3002ae70: e1a00004 mov r0, r4 } 3002ae74: 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)); 3002ae78: eaff6387 b 30003c9c DIR *dirp ) { int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 3002ae7c: eb000ada bl 3002d9ec <__errno> <== NOT EXECUTED 3002ae80: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3002ae84: 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)); } 3002ae88: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3002ae8c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 3000b0f0 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 3000b0f0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 3000b0f4: e590302c ldr r3, [r0, #44] <== NOT EXECUTED int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 3000b0f8: 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; 3000b0fc: e88d0007 stm sp, {r0, r1, r2} <== NOT EXECUTED the_jnode = iop->file_info; status = rtems_io_control( 3000b100: e5931054 ldr r1, [r3, #84] <== NOT EXECUTED 3000b104: e5930050 ldr r0, [r3, #80] <== NOT EXECUTED 3000b108: e1a0200d mov r2, sp <== NOT EXECUTED 3000b10c: eb00026a bl 3000babc <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 3000b110: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; 3000b114: 059d000c ldreq r0, [sp, #12] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 3000b118: 1a000001 bne 3000b124 <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; } 3000b11c: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 3000b120: e8bd8000 pop {pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 3000b124: ebffffe6 bl 3000b0c4 <== NOT EXECUTED 3000b128: eafffffb b 3000b11c <== NOT EXECUTED 3000b188 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3000b188: 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; 3000b18c: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3000b190: 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; 3000b194: 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; 3000b198: e590e02c ldr lr, [r0, #44] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 3000b19c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 3000b1a0: 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; 3000b1a4: e58d200c str r2, [sp, #12] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 3000b1a8: e58d1008 str r1, [sp, #8] <== NOT EXECUTED args.count = count; args.flags = iop->flags; 3000b1ac: e58dc010 str ip, [sp, #16] <== NOT EXECUTED args.bytes_moved = 0; 3000b1b0: e58d3014 str r3, [sp, #20] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 3000b1b4: e58d0000 str r0, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 3000b1b8: e59e1054 ldr r1, [lr, #84] <== NOT EXECUTED 3000b1bc: e59e0050 ldr r0, [lr, #80] <== NOT EXECUTED 3000b1c0: e1a0200d mov r2, sp <== NOT EXECUTED 3000b1c4: eb000266 bl 3000bb64 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 3000b1c8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 3000b1cc: 059d0014 ldreq r0, [sp, #20] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 3000b1d0: 1a000001 bne 3000b1dc <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } 3000b1d4: e28dd018 add sp, sp, #24 ; 0x18 <== NOT EXECUTED 3000b1d8: e8bd8000 pop {pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 3000b1dc: ebffffb8 bl 3000b0c4 <== NOT EXECUTED 3000b1e0: eafffffb b 3000b1d4 <== NOT EXECUTED 3000b12c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 3000b12c: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 3000b130: e5903008 ldr r3, [r0, #8] ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 3000b134: e24dd018 sub sp, sp, #24 ; 0x18 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 3000b138: e590c00c ldr ip, [r0, #12] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 3000b13c: e590e02c ldr lr, [r0, #44] args.iop = iop; args.offset = iop->offset; 3000b140: e58d3004 str r3, [sp, #4] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 3000b144: e3a03000 mov r3, #0 ; 0x0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 3000b148: e58d200c str r2, [sp, #12] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 3000b14c: e58d1008 str r1, [sp, #8] args.count = count; args.flags = iop->flags; 3000b150: e58dc010 str ip, [sp, #16] args.bytes_moved = 0; 3000b154: e58d3014 str r3, [sp, #20] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 3000b158: e58d0000 str r0, [sp] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 3000b15c: e59e1054 ldr r1, [lr, #84] 3000b160: e59e0050 ldr r0, [lr, #80] 3000b164: e1a0200d mov r2, sp 3000b168: eb000292 bl 3000bbb8 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 3000b16c: e3500000 cmp r0, #0 ; 0x0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 3000b170: 059d0014 ldreq r0, [sp, #20] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 3000b174: 1a000001 bne 3000b180 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } 3000b178: e28dd018 add sp, sp, #24 ; 0x18 3000b17c: e8bd8000 pop {pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 3000b180: ebffffcf bl 3000b0c4 <== NOT EXECUTED 3000b184: eafffffb b 3000b178 <== NOT EXECUTED 30002f3c : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002f3c: e59030b4 ldr r3, [r0, #180] /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002f40: e92d4030 push {r4, r5, lr} rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002f44: e3530000 cmp r3, #0 ; 0x0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002f48: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002f4c: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 30002f50: e10f1000 mrs r1, CPSR <== NOT EXECUTED 30002f54: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 30002f58: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 30002f5c: e5902084 ldr r2, [r0, #132] <== NOT EXECUTED 30002f60: e5903080 ldr r3, [r0, #128] <== NOT EXECUTED 30002f64: e1520003 cmp r2, r3 <== NOT EXECUTED 30002f68: 0a00000f beq 30002fac <== NOT EXECUTED tty->rawOutBufState = rob_wait; 30002f6c: e3a05002 mov r5, #2 ; 0x2 <== NOT EXECUTED 30002f70: e5845094 str r5, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 30002f74: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 30002f78: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30002f7c: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 30002f80: e1a02001 mov r2, r1 <== NOT EXECUTED 30002f84: eb000604 bl 3000479c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30002f88: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30002f8c: 1a000008 bne 30002fb4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 30002f90: e10f1000 mrs r1, CPSR <== NOT EXECUTED 30002f94: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 30002f98: 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) { 30002f9c: e5942084 ldr r2, [r4, #132] <== NOT EXECUTED 30002fa0: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 30002fa4: e1520003 cmp r2, r3 <== NOT EXECUTED 30002fa8: 1afffff0 bne 30002f70 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 30002fac: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30002fb0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 30002fb4: eb0007b6 bl 30004e94 <== NOT EXECUTED 300020f8 : int dup2( int fildes, int fildes2 ) { 300020f8: e92d4070 push {r4, r5, r6, lr} 300020fc: e24dd04c sub sp, sp, #76 ; 0x4c 30002100: e1a06001 mov r6, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 30002104: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 30002108: e1a05000 mov r5, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 3000210c: eb0001b9 bl 300027f8 if ( status == -1 ) 30002110: e3700001 cmn r0, #1 ; 0x1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 30002114: e1a0400d mov r4, sp if ( status == -1 ) 30002118: 1a000002 bne 30002128 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 3000211c: e3e00000 mvn r0, #0 ; 0x0 } 30002120: e28dd04c add sp, sp, #76 ; 0x4c 30002124: e8bd8070 pop {r4, r5, r6, pc} /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 30002128: e1a0100d mov r1, sp 3000212c: e1a00006 mov r0, r6 30002130: eb0001b0 bl 300027f8 if ( status == -1 ) 30002134: e3700001 cmn r0, #1 ; 0x1 30002138: 0afffff7 beq 3000211c /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 3000213c: e1a00005 mov r0, r5 <== NOT EXECUTED 30002140: e1a02006 mov r2, r6 <== NOT EXECUTED 30002144: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30002148: eb000082 bl 30002358 <== NOT EXECUTED 3000214c: eafffff3 b 30002120 <== NOT EXECUTED 300029e0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 300029e0: e92d4010 push {r4, lr} <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 300029e4: e591303c ldr r3, [r1, #60] <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 300029e8: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 300029ec: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 300029f0: e1a04001 mov r4, r1 <== NOT EXECUTED 300029f4: e200c0ff and ip, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 300029f8: 0a000006 beq 30002a18 <== NOT EXECUTED 300029fc: e59f3060 ldr r3, [pc, #96] ; 30002a64 <== NOT EXECUTED 30002a00: e25c0009 subs r0, ip, #9 ; 0x9 <== NOT EXECUTED 30002a04: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 30002a08: e5932000 ldr r2, [r3] <== NOT EXECUTED 30002a0c: e7d2100c ldrb r1, [r2, ip] <== NOT EXECUTED 30002a10: e01002a1 ands r0, r0, r1, lsr #5 <== NOT EXECUTED 30002a14: 1a000004 bne 30002a2c <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 30002a18: e1a0000c mov r0, ip <== NOT EXECUTED 30002a1c: e1a01004 mov r1, r4 <== NOT EXECUTED 30002a20: ebffff95 bl 3000287c <== NOT EXECUTED } } 30002a24: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 30002a28: e8bd8010 pop {r4, pc} <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 30002a2c: e35c000a cmp ip, #10 ; 0xa <== NOT EXECUTED 30002a30: 0afffff8 beq 30002a18 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 30002a34: e3a0305e mov r3, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; 30002a38: e22cc040 eor ip, ip, #64 ; 0x40 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 30002a3c: e28d0002 add r0, sp, #2 ; 0x2 <== NOT EXECUTED 30002a40: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 30002a44: 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] = '^'; 30002a48: e5cd3002 strb r3, [sp, #2] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 30002a4c: e5cdc003 strb ip, [sp, #3] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 30002a50: ebffff41 bl 3000275c <== NOT EXECUTED tty->column += 2; 30002a54: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 30002a58: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30002a5c: e5843028 str r3, [r4, #40] <== NOT EXECUTED 30002a60: eaffffef b 30002a24 <== NOT EXECUTED 30002a64: 300166f4 .word 0x300166f4 3001e6c4 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 3001e6c4: e59f300c ldr r3, [pc, #12] ; 3001e6d8 <== NOT EXECUTED 3001e6c8: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001e6cc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001e6d0: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 3001e6d4: ea003d15 b 3002db30 <== NOT EXECUTED 3001e6d8: 30059cb0 .word 0x30059cb0 3001e6dc : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 3001e6dc: e59f300c ldr r3, [pc, #12] ; 3001e6f0 <== NOT EXECUTED 3001e6e0: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001e6e4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001e6e8: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 3001e6ec: ea003d0f b 3002db30 <== NOT EXECUTED 3001e6f0: 30059bc8 .word 0x30059bc8 30002a68 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 30002a68: 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) { 30002a6c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED if (tty->ccount == 0) 30002a70: 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) { 30002a74: e1a04000 mov r4, r0 <== NOT EXECUTED 30002a78: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 30002a7c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 30002a80: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 30002a84: 0590103c ldreq r1, [r0, #60] <== NOT EXECUTED 30002a88: 1a000019 bne 30002af4 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 30002a8c: e59f81a8 ldr r8, [pc, #424] ; 30002c3c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 30002a90: e2430001 sub r0, r3, #1 ; 0x1 <== NOT EXECUTED 30002a94: e594c01c ldr ip, [r4, #28] <== NOT EXECUTED 30002a98: e5840020 str r0, [r4, #32] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 30002a9c: e3110008 tst r1, #8 ; 0x8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 30002aa0: e7dc5000 ldrb r5, [ip, r0] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 30002aa4: 0a00000b beq 30002ad8 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 30002aa8: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 30002aac: 1a000001 bne 30002ab8 <== NOT EXECUTED 30002ab0: e3110010 tst r1, #16 ; 0x10 <== NOT EXECUTED 30002ab4: 0a00005c beq 30002c2c <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 30002ab8: e3550009 cmp r5, #9 ; 0x9 <== NOT EXECUTED 30002abc: 0a000037 beq 30002ba0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 30002ac0: e5983000 ldr r3, [r8] <== NOT EXECUTED 30002ac4: e7d32005 ldrb r2, [r3, r5] <== NOT EXECUTED 30002ac8: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED 30002acc: 0a000028 beq 30002b74 <== NOT EXECUTED 30002ad0: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED 30002ad4: 1a000017 bne 30002b38 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 30002ad8: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 30002adc: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 30002ae0: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002ae4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002ae8: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 30002aec: e594103c ldr r1, [r4, #60] <== NOT EXECUTED 30002af0: eaffffe6 b 30002a90 <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 30002af4: e590103c ldr r1, [r0, #60] <== NOT EXECUTED 30002af8: e2112008 ands r2, r1, #8 ; 0x8 <== NOT EXECUTED tty->ccount = 0; 30002afc: 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)) { 30002b00: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 30002b04: e2112010 ands r2, r1, #16 ; 0x10 <== NOT EXECUTED 30002b08: 1affffdf bne 30002a8c <== NOT EXECUTED tty->ccount = 0; 30002b0c: e5802020 str r2, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 30002b10: e1a01004 mov r1, r4 <== NOT EXECUTED 30002b14: e5d00044 ldrb r0, [r0, #68] <== NOT EXECUTED 30002b18: ebffffb0 bl 300029e0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 30002b1c: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 30002b20: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 30002b24: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED echo ('\n', tty); 30002b28: e1a01004 mov r1, r4 <== NOT EXECUTED 30002b2c: e3a0000a mov r0, #10 ; 0xa <== NOT EXECUTED } } if (!lineFlag) break; } } 30002b30: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 30002b34: eaffffa9 b 300029e0 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 30002b38: e1a02004 mov r2, r4 <== NOT EXECUTED 30002b3c: e59f00fc ldr r0, [pc, #252] ; 30002c40 <== NOT EXECUTED 30002b40: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 30002b44: ebffff04 bl 3000275c <== NOT EXECUTED if (tty->column) 30002b48: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 30002b4c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 30002b50: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002b54: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 30002b58: e5983000 ldr r3, [r8] <== NOT EXECUTED 30002b5c: e7d32005 ldrb r2, [r3, r5] <== NOT EXECUTED 30002b60: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED 30002b64: 0a000002 beq 30002b74 <== NOT EXECUTED 30002b68: e594103c ldr r1, [r4, #60] <== NOT EXECUTED 30002b6c: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED 30002b70: 0affffd8 beq 30002ad8 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 30002b74: e59f00c4 ldr r0, [pc, #196] ; 30002c40 <== NOT EXECUTED 30002b78: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 30002b7c: e1a02004 mov r2, r4 <== NOT EXECUTED 30002b80: ebfffef5 bl 3000275c <== NOT EXECUTED if (tty->column) 30002b84: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 30002b88: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 30002b8c: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002b90: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } } } if (!lineFlag) 30002b94: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 30002b98: 1affffd0 bne 30002ae0 <== NOT EXECUTED 30002b9c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 30002ba0: e3500000 cmp r0, #0 ; 0x0 <== 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; 30002ba4: e594502c ldr r5, [r4, #44] <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 30002ba8: 0a000010 beq 30002bf0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 30002bac: e5986000 ldr r6, [r8] <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 30002bb0: e2011c02 and r1, r1, #512 ; 0x200 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 30002bb4: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 30002bb8: e7dc3002 ldrb r3, [ip, r2] <== NOT EXECUTED 30002bbc: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED if (c == '\t') { 30002bc0: e3530009 cmp r3, #9 ; 0x9 <== NOT EXECUTED col = (col | 7) + 1; 30002bc4: 03853007 orreq r3, r5, #7 ; 0x7 <== NOT EXECUTED 30002bc8: 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') { 30002bcc: 0a000005 beq 30002be8 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 30002bd0: e7d63003 ldrb r3, [r6, r3] <== NOT EXECUTED 30002bd4: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 30002bd8: 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)) { 30002bdc: 0a000001 beq 30002be8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 30002be0: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED col += 2; 30002be4: 12855002 addne r5, r5, #2 ; 0x2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 30002be8: e1500002 cmp r0, r2 <== NOT EXECUTED 30002bec: 1afffff1 bne 30002bb8 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 30002bf0: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 30002bf4: e1530005 cmp r3, r5 <== NOT EXECUTED 30002bf8: daffffb6 ble 30002ad8 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 30002bfc: e59f0040 ldr r0, [pc, #64] ; 30002c44 <== NOT EXECUTED 30002c00: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 30002c04: e1a02004 mov r2, r4 <== NOT EXECUTED 30002c08: ebfffed3 bl 3000275c <== NOT EXECUTED tty->column--; 30002c0c: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 30002c10: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 30002c14: e1530005 cmp r3, r5 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 30002c18: e5843028 str r3, [r4, #40] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 30002c1c: cafffff6 bgt 30002bfc <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 30002c20: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 30002c24: 1affffad bne 30002ae0 <== NOT EXECUTED 30002c28: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 30002c2c: e5d40043 ldrb r0, [r4, #67] <== NOT EXECUTED 30002c30: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 30002c34: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 30002c38: eaffff68 b 300029e0 <== NOT EXECUTED 30002c3c: 300166f4 .word 0x300166f4 30002c40: 30015b5c .word 0x30015b5c 30002c44: 30015b58 .word 0x30015b58 3002ae90 : #include int fchdir( int fd ) { 3002ae90: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 3002ae94: e59f3154 ldr r3, [pc, #340] ; 3002aff0 <== NOT EXECUTED #include int fchdir( int fd ) { 3002ae98: e24dd020 sub sp, sp, #32 ; 0x20 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 3002ae9c: e5932000 ldr r2, [r3] <== NOT EXECUTED 3002aea0: e1500002 cmp r0, r2 <== NOT EXECUTED 3002aea4: 2a00003c bcs 3002af9c <== NOT EXECUTED iop = rtems_libio_iop( fd ); 3002aea8: e1a03200 lsl r3, r0, #4 <== NOT EXECUTED 3002aeac: e59f2140 ldr r2, [pc, #320] ; 3002aff4 <== NOT EXECUTED 3002aeb0: e0433100 sub r3, r3, r0, lsl #2 <== NOT EXECUTED 3002aeb4: e0833000 add r3, r3, r0 <== NOT EXECUTED 3002aeb8: e5921000 ldr r1, [r2] <== NOT EXECUTED 3002aebc: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 3002aec0: e0810003 add r0, r1, r3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 3002aec4: e590200c ldr r2, [r0, #12] <== NOT EXECUTED 3002aec8: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 3002aecc: 0a000032 beq 3002af9c <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 3002aed0: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED 3002aed4: 0a00003b beq 3002afc8 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 3002aed8: e5902018 ldr r2, [r0, #24] <== NOT EXECUTED 3002aedc: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3002aee0: 0a00003d beq 3002afdc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 3002aee4: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED 3002aee8: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3002aeec: 0a00003a beq 3002afdc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 3002aef0: e2804010 add r4, r0, #16 ; 0x10 <== NOT EXECUTED 3002aef4: e1a00004 mov r0, r4 <== NOT EXECUTED 3002aef8: e1a0e00f mov lr, pc <== NOT EXECUTED 3002aefc: e12fff12 bx r2 <== NOT EXECUTED 3002af00: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 3002af04: 1a00001f bne 3002af88 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 3002af08: e59f70e8 ldr r7, [pc, #232] ; 3002aff8 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 3002af0c: e28d6010 add r6, sp, #16 ; 0x10 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 3002af10: e597c000 ldr ip, [r7] <== NOT EXECUTED 3002af14: e1a0500d mov r5, sp <== NOT EXECUTED 3002af18: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 3002af1c: e89c000f ldm ip, {r0, r1, r2, r3} <== NOT EXECUTED 3002af20: e88d000f stm sp, {r0, r1, r2, r3} <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 3002af24: e894000f ldm r4, {r0, r1, r2, r3} <== NOT EXECUTED 3002af28: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 3002af2c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3002af30: e59f00c4 ldr r0, [pc, #196] ; 3002affc <== NOT EXECUTED 3002af34: e1a02006 mov r2, r6 <== NOT EXECUTED 3002af38: e1a03001 mov r3, r1 <== NOT EXECUTED 3002af3c: ebff63ad bl 30003df8 <== NOT EXECUTED 3002af40: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3002af44: 1a000019 bne 3002afb0 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 3002af48: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3002af4c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3002af50: 0a000004 beq 3002af68 <== NOT EXECUTED 3002af54: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3002af58: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3002af5c: 11a0000d movne r0, sp <== NOT EXECUTED 3002af60: 11a0e00f movne lr, pc <== NOT EXECUTED 3002af64: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 3002af68: e597c000 ldr ip, [r7] <== NOT EXECUTED 3002af6c: e896000f ldm r6, {r0, r1, r2, r3} <== NOT EXECUTED 3002af70: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 3002af74: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED 3002af78: e3a0e000 mov lr, #0 ; 0x0 <== NOT EXECUTED return 0; } 3002af7c: e1a0000e mov r0, lr <== NOT EXECUTED 3002af80: e28dd020 add sp, sp, #32 ; 0x20 <== NOT EXECUTED 3002af84: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 3002af88: eb000a97 bl 3002d9ec <__errno> <== NOT EXECUTED 3002af8c: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 3002af90: e5803000 str r3, [r0] <== NOT EXECUTED 3002af94: e3e0e000 mvn lr, #0 ; 0x0 <== NOT EXECUTED 3002af98: eafffff7 b 3002af7c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 3002af9c: eb000a92 bl 3002d9ec <__errno> <== NOT EXECUTED 3002afa0: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3002afa4: e5803000 str r3, [r0] <== NOT EXECUTED 3002afa8: e3e0e000 mvn lr, #0 ; 0x0 <== NOT EXECUTED 3002afac: eafffff2 b 3002af7c <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 3002afb0: e597c000 ldr ip, [r7] <== NOT EXECUTED 3002afb4: e89d000f ldm sp, {r0, r1, r2, r3} <== NOT EXECUTED 3002afb8: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 3002afbc: e3e0e000 mvn lr, #0 ; 0x0 <== NOT EXECUTED 3002afc0: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED 3002afc4: eaffffec b 3002af7c <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 3002afc8: eb000a87 bl 3002d9ec <__errno> <== NOT EXECUTED 3002afcc: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3002afd0: e5803000 str r3, [r0] <== NOT EXECUTED 3002afd4: e3e0e000 mvn lr, #0 ; 0x0 <== NOT EXECUTED 3002afd8: eaffffe7 b 3002af7c <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 3002afdc: eb000a82 bl 3002d9ec <__errno> <== NOT EXECUTED 3002afe0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3002afe4: e5803000 str r3, [r0] <== NOT EXECUTED 3002afe8: e3e0e000 mvn lr, #0 ; 0x0 <== NOT EXECUTED 3002afec: eaffffe2 b 3002af7c <== NOT EXECUTED 3002aff0: 30045374 .word 0x30045374 3002aff4: 3005a4b0 .word 0x3005a4b0 3002aff8: 30045edc .word 0x30045edc 3002affc: 30041698 .word 0x30041698 3001de28 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001de28: e59f309c ldr r3, [pc, #156] ; 3001decc <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 3001de2c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001de30: e5932000 ldr r2, [r3] <== NOT EXECUTED 3001de34: e1500002 cmp r0, r2 <== NOT EXECUTED 3001de38: 2a000014 bcs 3001de90 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 3001de3c: e1a03200 lsl r3, r0, #4 <== NOT EXECUTED 3001de40: e59f2088 ldr r2, [pc, #136] ; 3001ded0 <== NOT EXECUTED 3001de44: e0433100 sub r3, r3, r0, lsl #2 <== NOT EXECUTED 3001de48: e0833000 add r3, r3, r0 <== NOT EXECUTED 3001de4c: e5920000 ldr r0, [r2] <== NOT EXECUTED 3001de50: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 3001de54: e080c003 add ip, r0, r3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 3001de58: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED 3001de5c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3001de60: 0a00000a beq 3001de90 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3001de64: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 3001de68: 0a00000d beq 3001dea4 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 3001de6c: e59c3030 ldr r3, [ip, #48] <== NOT EXECUTED 3001de70: e593201c ldr r2, [r3, #28] <== NOT EXECUTED 3001de74: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3001de78: 0a00000e beq 3001deb8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 3001de7c: e28c0010 add r0, ip, #16 ; 0x10 <== NOT EXECUTED 3001de80: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED 3001de84: e1a0e00f mov lr, pc <== NOT EXECUTED 3001de88: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 3001de8c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 3001de90: eb003ed5 bl 3002d9ec <__errno> <== NOT EXECUTED 3001de94: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3001de98: e5803000 str r3, [r0] <== NOT EXECUTED 3001de9c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001dea0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3001dea4: eb003ed0 bl 3002d9ec <__errno> <== NOT EXECUTED 3001dea8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001deac: e5803000 str r3, [r0] <== NOT EXECUTED 3001deb0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001deb4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001deb8: eb003ecb bl 3002d9ec <__errno> <== NOT EXECUTED 3001debc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001dec0: e5803000 str r3, [r0] <== NOT EXECUTED 3001dec4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001dec8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001decc: 30045374 .word 0x30045374 3001ded0: 3005a4b0 .word 0x3005a4b0 3001ded4 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001ded4: e59f30b4 ldr r3, [pc, #180] ; 3001df90 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 3001ded8: e1a0c000 mov ip, r0 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001dedc: e5930000 ldr r0, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 3001dee0: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 3001dee4: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001dee8: e15c0000 cmp ip, r0 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 3001deec: e92d4010 push {r4, lr} <== NOT EXECUTED 3001def0: e1a0e821 lsr lr, r1, #16 <== NOT EXECUTED 3001def4: e1a04822 lsr r4, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001def8: 2a000015 bcs 3001df54 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 3001defc: e1a0320c lsl r3, ip, #4 <== NOT EXECUTED 3001df00: e59f208c ldr r2, [pc, #140] ; 3001df94 <== NOT EXECUTED 3001df04: e043310c sub r3, r3, ip, lsl #2 <== NOT EXECUTED 3001df08: e083300c add r3, r3, ip <== NOT EXECUTED 3001df0c: e5921000 ldr r1, [r2] <== NOT EXECUTED 3001df10: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 3001df14: e0810003 add r0, r1, r3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 3001df18: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 3001df1c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3001df20: 0a00000b beq 3001df54 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3001df24: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 3001df28: 0a00000e beq 3001df68 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 3001df2c: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED 3001df30: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 3001df34: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001df38: 0a00000f beq 3001df7c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 3001df3c: e1a0100e mov r1, lr <== NOT EXECUTED 3001df40: e1a02004 mov r2, r4 <== NOT EXECUTED 3001df44: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED 3001df48: e1a0e00f mov lr, pc <== NOT EXECUTED 3001df4c: e12fff13 bx r3 <== NOT EXECUTED } 3001df50: e8bd8010 pop {r4, pc} <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 3001df54: eb003ea4 bl 3002d9ec <__errno> <== NOT EXECUTED 3001df58: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3001df5c: e5803000 str r3, [r0] <== NOT EXECUTED 3001df60: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001df64: e8bd8010 pop {r4, pc} <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3001df68: eb003e9f bl 3002d9ec <__errno> <== NOT EXECUTED 3001df6c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001df70: e5803000 str r3, [r0] <== NOT EXECUTED 3001df74: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001df78: e8bd8010 pop {r4, pc} <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001df7c: eb003e9a bl 3002d9ec <__errno> <== NOT EXECUTED 3001df80: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001df84: e5803000 str r3, [r0] <== NOT EXECUTED 3001df88: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001df8c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3001df90: 30045374 .word 0x30045374 3001df94: 3005a4b0 .word 0x3005a4b0 3002b000 : int fcntl( int fd, int cmd, ... ) { 3002b000: e92d000e push {r1, r2, r3} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3002b004: e59f3208 ldr r3, [pc, #520] ; 3002b214 int fcntl( int fd, int cmd, ... ) { 3002b008: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3002b00c: e5932000 ldr r2, [r3] int fcntl( int fd, int cmd, ... ) { 3002b010: e59da01c ldr sl, [sp, #28] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3002b014: e1500002 cmp r0, r2 int fcntl( int fd, int cmd, ... ) { 3002b018: e28d1020 add r1, sp, #32 ; 0x20 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3002b01c: 2a000070 bcs 3002b1e4 iop = rtems_libio_iop( fd ); 3002b020: e59f51f0 ldr r5, [pc, #496] ; 3002b218 3002b024: e1a03200 lsl r3, r0, #4 3002b028: e0433100 sub r3, r3, r0, lsl #2 3002b02c: e0833000 add r3, r3, r0 3002b030: e5954000 ldr r4, [r5] 3002b034: e1a03103 lsl r3, r3, #2 3002b038: e0846003 add r6, r4, r3 rtems_libio_check_is_open(iop); 3002b03c: e596700c ldr r7, [r6, #12] 3002b040: e3170c01 tst r7, #256 ; 0x100 3002b044: 0a000066 beq 3002b1e4 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 3002b048: e35a0009 cmp sl, #9 ; 0x9 3002b04c: 979ff10a ldrls pc, [pc, sl, lsl #2] 3002b050: ea000029 b 3002b0fc 3002b054: 3002b110 .word 0x3002b110 <== NOT EXECUTED 3002b058: 3002b1a4 .word 0x3002b1a4 <== NOT EXECUTED 3002b05c: 3002b1b0 .word 0x3002b1b0 <== NOT EXECUTED 3002b060: 3002b1d4 .word 0x3002b1d4 <== NOT EXECUTED 3002b064: 3002b09c .word 0x3002b09c <== NOT EXECUTED 3002b068: 3002b07c .word 0x3002b07c <== NOT EXECUTED 3002b06c: 3002b07c .word 0x3002b07c <== NOT EXECUTED 3002b070: 3002b07c .word 0x3002b07c <== NOT EXECUTED 3002b074: 3002b07c .word 0x3002b07c <== NOT EXECUTED 3002b078: 3002b07c .word 0x3002b07c <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 3002b07c: eb000a5a bl 3002d9ec <__errno> 3002b080: e3a03086 mov r3, #134 ; 0x86 3002b084: e5803000 str r3, [r0] 3002b088: e3e05000 mvn r5, #0 ; 0x0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 3002b08c: e1a00005 mov r0, r5 3002b090: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} 3002b094: e28dd00c add sp, sp, #12 ; 0xc 3002b098: e12fff1e bx lr case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 3002b09c: e5910000 ldr r0, [r1] 3002b0a0: ebff64e3 bl 30004434 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 3002b0a4: e596300c ldr r3, [r6, #12] 3002b0a8: e59f216c ldr r2, [pc, #364] ; 3002b21c 3002b0ac: e3c33c02 bic r3, r3, #512 ; 0x200 3002b0b0: e0002002 and r2, r0, r2 3002b0b4: e3c33001 bic r3, r3, #1 ; 0x1 3002b0b8: e1822003 orr r2, r2, r3 3002b0bc: e586200c str r2, [r6, #12] 3002b0c0: e3a05000 mov r5, #0 ; 0x0 * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 3002b0c4: e5963030 ldr r3, [r6, #48] 3002b0c8: e5933030 ldr r3, [r3, #48] 3002b0cc: e3530000 cmp r3, #0 ; 0x0 3002b0d0: 0affffed beq 3002b08c int err = (*iop->handlers->fcntl_h)( cmd, iop ); 3002b0d4: e1a0000a mov r0, sl 3002b0d8: e1a01006 mov r1, r6 3002b0dc: e1a0e00f mov lr, pc 3002b0e0: e12fff13 bx r3 if (err) { 3002b0e4: e2504000 subs r4, r0, #0 ; 0x0 3002b0e8: 0affffe7 beq 3002b08c errno = err; 3002b0ec: eb000a3e bl 3002d9ec <__errno> <== NOT EXECUTED 3002b0f0: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 3002b0f4: e5804000 str r4, [r0] <== NOT EXECUTED 3002b0f8: eaffffe3 b 3002b08c <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 3002b0fc: eb000a3a bl 3002d9ec <__errno> 3002b100: e3a03016 mov r3, #22 ; 0x16 3002b104: e5803000 str r3, [r0] 3002b108: e3e05000 mvn r5, #0 ; 0x0 3002b10c: eaffffde b 3002b08c * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 3002b110: e5910000 ldr r0, [r1] if ( fd2 ) 3002b114: e3500000 cmp r0, #0 ; 0x0 3002b118: 0a000036 beq 3002b1f8 diop = rtems_libio_iop( fd2 ); 3002b11c: e1520000 cmp r2, r0 <== NOT EXECUTED 3002b120: 81a03200 lslhi r3, r0, #4 <== NOT EXECUTED 3002b124: 80433100 subhi r3, r3, r0, lsl #2 <== NOT EXECUTED 3002b128: 80833000 addhi r3, r3, r0 <== NOT EXECUTED 3002b12c: 81a03103 lslhi r3, r3, #2 <== NOT EXECUTED 3002b130: 93a08000 movls r8, #0 ; 0x0 <== NOT EXECUTED 3002b134: 80848003 addhi r8, r4, r3 <== NOT EXECUTED 3002b138: 91a03008 movls r3, r8 <== NOT EXECUTED 3002b13c: 81a03008 movhi r3, r8 <== NOT EXECUTED diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 3002b140: e5950000 ldr r0, [r5] ret = -1; break; } } diop->handlers = iop->handlers; 3002b144: e5965030 ldr r5, [r6, #48] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 3002b148: e0600003 rsb r0, r0, r3 3002b14c: e1a00140 asr r0, r0, #2 3002b150: e1a03300 lsl r3, r0, #6 3002b154: e0433100 sub r3, r3, r0, lsl #2 3002b158: e1a02303 lsl r2, r3, #6 3002b15c: e0632002 rsb r2, r3, r2 3002b160: e1a01602 lsl r1, r2, #12 3002b164: e0822001 add r2, r2, r1 3002b168: e0822000 add r2, r2, r0 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 3002b16c: e596302c ldr r3, [r6, #44] diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 3002b170: e1a02202 lsl r2, r2, #4 3002b174: e0602002 rsb r2, r0, r2 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 3002b178: e2884010 add r4, r8, #16 ; 0x10 3002b17c: e286c010 add ip, r6, #16 ; 0x10 ret = -1; break; } } diop->handlers = iop->handlers; 3002b180: e5885030 str r5, [r8, #48] diop->file_info = iop->file_info; 3002b184: e588302c str r3, [r8, #44] diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 3002b188: e0405102 sub r5, r0, r2, lsl #2 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 3002b18c: e89c000f ldm ip, {r0, r1, r2, r3} 3002b190: e884000f stm r4, {r0, r1, r2, r3} } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; 3002b194: e588700c str r7, [r8, #12] /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 3002b198: e3550000 cmp r5, #0 ; 0x0 3002b19c: aaffffc8 bge 3002b0c4 3002b1a0: eaffffb9 b 3002b08c <== NOT EXECUTED diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 3002b1a4: e1a035a7 lsr r3, r7, #11 3002b1a8: e2035001 and r5, r3, #1 ; 0x1 3002b1ac: eaffffc4 b 3002b0c4 * 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 ) ) 3002b1b0: e5910000 ldr r0, [r1] 3002b1b4: e3500000 cmp r0, #0 ; 0x0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 3002b1b8: 13873b02 orrne r3, r7, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 3002b1bc: 03c73b02 biceq r3, r7, #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; 3002b1c0: 1586300c strne r3, [r6, #12] 3002b1c4: 13a05000 movne r5, #0 ; 0x0 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 3002b1c8: 0586300c streq r3, [r6, #12] 3002b1cc: 01a05000 moveq r5, r0 3002b1d0: eaffffbb b 3002b0c4 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 3002b1d4: e1a00007 mov r0, r7 3002b1d8: ebff63e1 bl 30004164 3002b1dc: e1a05000 mov r5, r0 3002b1e0: eaffffec b 3002b198 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 3002b1e4: eb000a00 bl 3002d9ec <__errno> <== NOT EXECUTED 3002b1e8: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3002b1ec: e5803000 str r3, [r0] <== NOT EXECUTED 3002b1f0: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 3002b1f4: eaffffa4 b 3002b08c <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 3002b1f8: ebff6449 bl 30004324 if ( diop == 0 ) { 3002b1fc: e2508000 subs r8, r0, #0 ; 0x0 3002b200: 1596700c ldrne r7, [r6, #12] 3002b204: 11a03008 movne r3, r8 3002b208: 1affffcc bne 3002b140 if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 3002b20c: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 3002b210: eaffff9d b 3002b08c <== NOT EXECUTED 3002b214: 30045374 .word 0x30045374 3002b218: 3005a4b0 .word 0x3005a4b0 3002b21c: 00000201 .word 0x00000201 300202f0 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 300202f0: e59f0044 ldr r0, [pc, #68] ; 3002033c <== NOT EXECUTED 300202f4: e4902004 ldr r2, [r0], #4 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 300202f8: e1520000 cmp r2, r0 <== NOT EXECUTED 300202fc: 0a00000a beq 3002032c <== NOT EXECUTED 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 ) { 30020300: e591100c ldr r1, [r1, #12] <== NOT EXECUTED 30020304: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED 30020308: e1530001 cmp r3, r1 <== NOT EXECUTED 3002030c: 1a000003 bne 30020320 <== NOT EXECUTED 30020310: ea000007 b 30020334 <== NOT EXECUTED 30020314: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED 30020318: e1530001 cmp r3, r1 <== NOT EXECUTED 3002031c: 0a000004 beq 30020334 <== 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 ) { 30020320: e5922000 ldr r2, [r2] <== 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 ); 30020324: e1520000 cmp r2, r0 <== NOT EXECUTED 30020328: 1afffff9 bne 30020314 <== NOT EXECUTED 3002032c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; } } return false; } 30020330: e12fff1e bx lr <== NOT EXECUTED * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 30020334: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30020338: e12fff1e bx lr <== NOT EXECUTED 3002033c: 3005a54c .word 0x3005a54c 3000262c : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 3000262c: e59f311c ldr r3, [pc, #284] ; 30002750 long fpathconf( int fd, int name ) { 30002630: 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); 30002634: e5932000 ldr r2, [r3] long fpathconf( int fd, int name ) { 30002638: e1a0c001 mov ip, r1 long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 3000263c: e1500002 cmp r0, r2 30002640: 2a000038 bcs 30002728 iop = rtems_libio_iop(fd); 30002644: e1a03200 lsl r3, r0, #4 30002648: e59f2104 ldr r2, [pc, #260] ; 30002754 3000264c: e0433100 sub r3, r3, r0, lsl #2 30002650: e0833000 add r3, r3, r0 30002654: e5921000 ldr r1, [r2] 30002658: e1a03103 lsl r3, r3, #2 3000265c: e0810003 add r0, r1, r3 rtems_libio_check_is_open(iop); 30002660: e590200c ldr r2, [r0, #12] 30002664: e3120c01 tst r2, #256 ; 0x100 30002668: 0a00002e beq 30002728 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 3000266c: e3120002 tst r2, #2 ; 0x2 30002670: 0a000031 beq 3000273c /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 30002674: e590001c ldr r0, [r0, #28] switch ( name ) { 30002678: e35c000b cmp ip, #11 ; 0xb 3000267c: 979ff10c ldrls pc, [pc, ip, lsl #2] 30002680: ea00000b b 300026b4 30002684: 300026c8 .word 0x300026c8 <== NOT EXECUTED 30002688: 300026d0 .word 0x300026d0 <== NOT EXECUTED 3000268c: 300026d8 .word 0x300026d8 <== NOT EXECUTED 30002690: 300026e0 .word 0x300026e0 <== NOT EXECUTED 30002694: 300026e8 .word 0x300026e8 <== NOT EXECUTED 30002698: 300026f0 .word 0x300026f0 <== NOT EXECUTED 3000269c: 300026f8 .word 0x300026f8 <== NOT EXECUTED 300026a0: 30002700 .word 0x30002700 <== NOT EXECUTED 300026a4: 30002708 .word 0x30002708 <== NOT EXECUTED 300026a8: 30002710 .word 0x30002710 <== NOT EXECUTED 300026ac: 30002718 .word 0x30002718 <== NOT EXECUTED 300026b0: 30002720 .word 0x30002720 <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 300026b4: eb002f9b bl 3000e528 <__errno> 300026b8: e3a03016 mov r3, #22 ; 0x16 300026bc: e5803000 str r3, [r0] 300026c0: e3e00000 mvn r0, #0 ; 0x0 break; } return return_value; } 300026c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 300026c8: e5900030 ldr r0, [r0, #48] 300026cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 300026d0: e5900034 ldr r0, [r0, #52] 300026d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 300026d8: e5900038 ldr r0, [r0, #56] 300026dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_NAME_MAX: return_value = the_limits->name_max; 300026e0: e590003c ldr r0, [r0, #60] 300026e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PATH_MAX: return_value = the_limits->path_max; 300026e8: e5900040 ldr r0, [r0, #64] 300026ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 300026f0: e5900044 ldr r0, [r0, #68] 300026f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 300026f8: e590004c ldr r0, [r0, #76] 300026fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 30002700: e5900050 ldr r0, [r0, #80] 30002704: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 30002708: e590005c ldr r0, [r0, #92] 3000270c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 30002710: e5900048 ldr r0, [r0, #72] 30002714: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 30002718: e5900054 ldr r0, [r0, #84] 3000271c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 30002720: e5900058 ldr r0, [r0, #88] 30002724: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 30002728: eb002f7e bl 3000e528 <__errno> 3000272c: e3a03009 mov r3, #9 ; 0x9 30002730: e5803000 str r3, [r0] 30002734: e3e00000 mvn r0, #0 ; 0x0 30002738: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 3000273c: eb002f79 bl 3000e528 <__errno> <== NOT EXECUTED 30002740: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30002744: e5803000 str r3, [r0] <== NOT EXECUTED 30002748: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3000274c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30002750: 30015aa8 .word 0x30015aa8 30002754: 300167cc .word 0x300167cc 30008fa8 : void free( void *ptr ) { MSBUMP(free_calls, 1); 30008fa8: e59f2084 ldr r2, [pc, #132] ; 30009034 30008fac: e92d4030 push {r4, r5, lr} 30008fb0: e592300c ldr r3, [r2, #12] if ( !ptr ) 30008fb4: e2505000 subs r5, r0, #0 ; 0x0 void free( void *ptr ) { MSBUMP(free_calls, 1); 30008fb8: e2833001 add r3, r3, #1 ; 0x1 30008fbc: e582300c str r3, [r2, #12] if ( !ptr ) 30008fc0: 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()) && 30008fc4: e59f306c ldr r3, [pc, #108] ; 30009038 30008fc8: e5932000 ldr r2, [r3] 30008fcc: e3520003 cmp r2, #3 ; 0x3 30008fd0: 0a000011 beq 3000901c #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 30008fd4: e59f3060 ldr r3, [pc, #96] ; 3000903c 30008fd8: e5933000 ldr r3, [r3] 30008fdc: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 30008fe0: 11a00005 movne r0, r5 30008fe4: 11a0e00f movne lr, pc 30008fe8: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 30008fec: e59f404c ldr r4, [pc, #76] ; 30009040 30008ff0: e1a01005 mov r1, r5 30008ff4: e1a00004 mov r0, r4 30008ff8: eb0006d3 bl 3000ab4c <_Protected_heap_Free> 30008ffc: e3500000 cmp r0, #0 ; 0x0 30009000: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 30009004: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 30009008: e59f0034 ldr r0, [pc, #52] ; 30009044 <== NOT EXECUTED 3000900c: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 30009010: e1a01005 mov r1, r5 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 30009014: 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", 30009018: eaffe447 b 3000213c <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 3000901c: eb000131 bl 300094e8 30009020: e3500000 cmp r0, #0 ; 0x0 30009024: 1affffea bne 30008fd4 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 30009028: e1a00005 mov r0, r5 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 3000902c: 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); 30009030: ea00013f b 30009534 <== NOT EXECUTED 30009034: 30016e30 .word 0x30016e30 30009038: 300170f4 .word 0x300170f4 3000903c: 30016bfc .word 0x30016bfc 30009040: 30016dd8 .word 0x30016dd8 30009044: 30015d30 .word 0x30015d30 3001f81c : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3001f81c: e59f3058 ldr r3, [pc, #88] ; 3001f87c <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 3001f820: e92d4010 push {r4, lr} <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3001f824: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 3001f828: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3001f82c: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 3001f830: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 3001f834: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f838: 0a000004 beq 3001f850 <== NOT EXECUTED 3001f83c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001f840: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f844: 12800004 addne r0, r0, #4 ; 0x4 <== NOT EXECUTED 3001f848: 11a0e00f movne lr, pc <== NOT EXECUTED 3001f84c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 3001f850: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 3001f854: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f858: 0a000004 beq 3001f870 <== NOT EXECUTED 3001f85c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001f860: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f864: 12840014 addne r0, r4, #20 ; 0x14 <== NOT EXECUTED 3001f868: 11a0e00f movne lr, pc <== NOT EXECUTED 3001f86c: 112fff13 bxne r3 <== NOT EXECUTED free(env); 3001f870: e1a00004 mov r0, r4 <== NOT EXECUTED } } 3001f874: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 3001f878: eaff91b3 b 30003f4c <== NOT EXECUTED 3001f87c: 3005ac7c .word 0x3005ac7c 300144b4 : int fstat( int fd, struct stat *sbuf ) { 300144b4: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 300144b8: e2515000 subs r5, r1, #0 ; 0x0 300144bc: 0a000027 beq 30014560 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 300144c0: e59f30ac ldr r3, [pc, #172] ; 30014574 300144c4: e5932000 ldr r2, [r3] 300144c8: e1500002 cmp r0, r2 300144cc: 2a000019 bcs 30014538 300144d0: e59f20a0 ldr r2, [pc, #160] ; 30014578 300144d4: e1a03200 lsl r3, r0, #4 300144d8: e0433100 sub r3, r3, r0, lsl #2 300144dc: e5921000 ldr r1, [r2] 300144e0: e0833000 add r3, r3, r0 300144e4: e1a03103 lsl r3, r3, #2 300144e8: e0814003 add r4, r1, r3 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 300144ec: e594200c ldr r2, [r4, #12] 300144f0: e3120c01 tst r2, #256 ; 0x100 300144f4: 0a00000f beq 30014538 if ( !iop->handlers ) 300144f8: e5943030 ldr r3, [r4, #48] 300144fc: e3530000 cmp r3, #0 ; 0x0 30014500: 0a00000c beq 30014538 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 30014504: e5933018 ldr r3, [r3, #24] 30014508: e3530000 cmp r3, #0 ; 0x0 3001450c: 0a00000e beq 3001454c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 30014510: e3a01000 mov r1, #0 ; 0x0 30014514: e3a0204c mov r2, #76 ; 0x4c 30014518: e1a00005 mov r0, r5 3001451c: ebffe07a bl 3000c70c return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 30014520: e2840010 add r0, r4, #16 ; 0x10 30014524: e1a01005 mov r1, r5 30014528: e5943030 ldr r3, [r4, #48] 3001452c: e1a0e00f mov lr, pc 30014530: e593f018 ldr pc, [r3, #24] } 30014534: e8bd8030 pop {r4, r5, pc} iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 30014538: ebffde6a bl 3000bee8 <__errno> 3001453c: e3a03009 mov r3, #9 ; 0x9 30014540: e5803000 str r3, [r0] 30014544: e3e00000 mvn r0, #0 ; 0x0 30014548: e8bd8030 pop {r4, r5, pc} if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001454c: ebffde65 bl 3000bee8 <__errno> <== NOT EXECUTED 30014550: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30014554: e5803000 str r3, [r0] <== NOT EXECUTED 30014558: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001455c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 30014560: ebffde60 bl 3000bee8 <__errno> 30014564: e3a0300e mov r3, #14 ; 0xe 30014568: e5803000 str r3, [r0] 3001456c: e3e00000 mvn r0, #0 ; 0x0 30014570: e8bd8030 pop {r4, r5, pc} 30014574: 30016058 .word 0x30016058 30014578: 30016dcc .word 0x30016dcc 3001e06c : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001e06c: e59f309c ldr r3, [pc, #156] ; 3001e110 #include int fsync( int fd ) { 3001e070: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001e074: e5932000 ldr r2, [r3] 3001e078: e1500002 cmp r0, r2 3001e07c: 2a000014 bcs 3001e0d4 iop = rtems_libio_iop( fd ); 3001e080: e1a03200 lsl r3, r0, #4 3001e084: e59f2088 ldr r2, [pc, #136] ; 3001e114 3001e088: e0433100 sub r3, r3, r0, lsl #2 3001e08c: e0833000 add r3, r3, r0 3001e090: e5921000 ldr r1, [r2] 3001e094: e1a03103 lsl r3, r3, #2 3001e098: e0810003 add r0, r1, r3 rtems_libio_check_is_open(iop); 3001e09c: e590200c ldr r2, [r0, #12] 3001e0a0: e3120c01 tst r2, #256 ; 0x100 3001e0a4: 0a00000a beq 3001e0d4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3001e0a8: e3120004 tst r2, #4 ; 0x4 3001e0ac: 0a00000d beq 3001e0e8 /* * Now process the fsync(). */ if ( !iop->handlers ) 3001e0b0: e5902030 ldr r2, [r0, #48] 3001e0b4: e3520000 cmp r2, #0 ; 0x0 3001e0b8: 0a000005 beq 3001e0d4 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 3001e0bc: e5922028 ldr r2, [r2, #40] 3001e0c0: e3520000 cmp r2, #0 ; 0x0 3001e0c4: 0a00000c beq 3001e0fc rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 3001e0c8: e1a0e00f mov lr, pc 3001e0cc: e12fff12 bx r2 } 3001e0d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 3001e0d4: eb003e44 bl 3002d9ec <__errno> <== NOT EXECUTED 3001e0d8: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3001e0dc: e5803000 str r3, [r0] <== NOT EXECUTED 3001e0e0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001e0e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3001e0e8: eb003e3f bl 3002d9ec <__errno> 3001e0ec: e3a03016 mov r3, #22 ; 0x16 3001e0f0: e5803000 str r3, [r0] 3001e0f4: e3e00000 mvn r0, #0 ; 0x0 3001e0f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001e0fc: eb003e3a bl 3002d9ec <__errno> 3001e100: e3a03086 mov r3, #134 ; 0x86 3001e104: e5803000 str r3, [r0] 3001e108: e3e00000 mvn r0, #0 ; 0x0 3001e10c: e49df004 pop {pc} ; (ldr pc, [sp], #4) 3001e110: 30045374 .word 0x30045374 3001e114: 3005a4b0 .word 0x3005a4b0 30009048 : int ftruncate( int fd, off_t length ) { 30009048: e92d4030 push {r4, r5, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 3000904c: e59f30e8 ldr r3, [pc, #232] ; 3000913c int ftruncate( int fd, off_t length ) { 30009050: e24dd010 sub sp, sp, #16 ; 0x10 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 30009054: e5932000 ldr r2, [r3] int ftruncate( int fd, off_t length ) { 30009058: e1a05001 mov r5, r1 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 3000905c: e1500002 cmp r0, r2 30009060: 2a000021 bcs 300090ec iop = rtems_libio_iop( fd ); 30009064: e59f20d4 ldr r2, [pc, #212] ; 30009140 30009068: e1a03200 lsl r3, r0, #4 3000906c: e0433100 sub r3, r3, r0, lsl #2 30009070: e5921000 ldr r1, [r2] 30009074: e0833000 add r3, r3, r0 30009078: e1a03103 lsl r3, r3, #2 3000907c: e0814003 add r4, r1, r3 rtems_libio_check_is_open(iop); 30009080: e594200c ldr r2, [r4, #12] 30009084: e3120c01 tst r2, #256 ; 0x100 30009088: 0a000017 beq 300090ec /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 3000908c: e284c010 add ip, r4, #16 ; 0x10 30009090: e89c000f ldm ip, {r0, r1, r2, r3} 30009094: e88d000f stm sp, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 30009098: e5923010 ldr r3, [r2, #16] 3000909c: e3530000 cmp r3, #0 ; 0x0 300090a0: 0a00001b beq 30009114 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 300090a4: e1a0000d mov r0, sp 300090a8: e1a0e00f mov lr, pc 300090ac: e12fff13 bx r3 300090b0: e3500001 cmp r0, #1 ; 0x1 300090b4: 0a00001b beq 30009128 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 300090b8: e594300c ldr r3, [r4, #12] 300090bc: e3130004 tst r3, #4 ; 0x4 300090c0: 0a00000e beq 30009100 if ( !iop->handlers->ftruncate_h ) 300090c4: e5943030 ldr r3, [r4, #48] 300090c8: e5933020 ldr r3, [r3, #32] 300090cc: e3530000 cmp r3, #0 ; 0x0 300090d0: 0a00000f beq 30009114 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 300090d4: e1a00004 mov r0, r4 300090d8: e1a01005 mov r1, r5 300090dc: e1a0e00f mov lr, pc 300090e0: e12fff13 bx r3 } 300090e4: e28dd010 add sp, sp, #16 ; 0x10 300090e8: e8bd8030 pop {r4, r5, pc} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 300090ec: eb000b7d bl 3000bee8 <__errno> <== NOT EXECUTED 300090f0: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 300090f4: e5803000 str r3, [r0] <== NOT EXECUTED 300090f8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300090fc: eafffff8 b 300090e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 30009100: eb000b78 bl 3000bee8 <__errno> <== NOT EXECUTED 30009104: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30009108: e5803000 str r3, [r0] <== NOT EXECUTED 3000910c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30009110: eafffff3 b 300090e4 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 30009114: eb000b73 bl 3000bee8 <__errno> <== NOT EXECUTED 30009118: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000911c: e5803000 str r3, [r0] <== NOT EXECUTED 30009120: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30009124: eaffffee b 300090e4 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 30009128: eb000b6e bl 3000bee8 <__errno> 3000912c: e3a03015 mov r3, #21 ; 0x15 30009130: e5803000 str r3, [r0] 30009134: e3e00000 mvn r0, #0 ; 0x0 30009138: eaffffe9 b 300090e4 3000913c: 30016058 .word 0x30016058 30009140: 30016dcc .word 0x30016dcc 3001e214 : char * getcwd ( char *pt, size_t size) { 3001e214: 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) 3001e218: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED char * getcwd ( char *pt, size_t size) { 3001e21c: e24dd078 sub sp, sp, #120 ; 0x78 <== NOT EXECUTED 3001e220: 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) 3001e224: 0a000104 beq 3001e63c <== NOT EXECUTED { ptsize = 0; if (!size) 3001e228: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED { errno = EINVAL; return (char *) NULL; } ept = pt + size; 3001e22c: 108ab001 addne fp, sl, r1 <== NOT EXECUTED 3001e230: 13a01000 movne r1, #0 ; 0x0 <== NOT EXECUTED 3001e234: 158d101c strne r1, [sp, #28] <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 3001e238: 0a0000fa beq 3001e628 <== NOT EXECUTED return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; *bpt = '\0'; 3001e23c: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 3001e240: e54b4001 strb r4, [fp, #-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))) 3001e244: e3a00fff mov r0, #1020 ; 0x3fc <== NOT EXECUTED 3001e248: ebff98df bl 300045cc <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; 3001e24c: e24b3001 sub r3, fp, #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))) 3001e250: e2506000 subs r6, r0, #0 ; 0x0 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; 3001e254: e58d3014 str r3, [sp, #20] <== 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))) 3001e258: 0a000007 beq 3001e27c <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 3001e25c: e3a0502e mov r5, #46 ; 0x2e <== NOT EXECUTED up[1] = '\0'; 3001e260: e5c64001 strb r4, [r6, #1] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 3001e264: e5c65000 strb r5, [r6] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 3001e268: e59f03fc ldr r0, [pc, #1020] ; 3001e66c <== NOT EXECUTED 3001e26c: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 3001e270: ebff9d05 bl 3000568c <== NOT EXECUTED 3001e274: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 3001e278: 0a00000b beq 3001e2ac <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 3001e27c: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED 3001e280: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3001e284: 1a000005 bne 3001e2a0 <== NOT EXECUTED free (pt); free (up); 3001e288: e1a00006 mov r0, r6 <== NOT EXECUTED 3001e28c: ebff972e bl 30003f4c <== NOT EXECUTED 3001e290: e3a0a000 mov sl, #0 ; 0x0 <== NOT EXECUTED return (char *) NULL; } 3001e294: e1a0000a mov r0, sl <== NOT EXECUTED 3001e298: e28dd078 add sp, sp, #120 ; 0x78 <== NOT EXECUTED 3001e29c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED err: if(dir) (void) _closedir (dir); if (ptsize) free (pt); 3001e2a0: e1a0000a mov r0, sl <== NOT EXECUTED 3001e2a4: ebff9728 bl 30003f4c <== NOT EXECUTED 3001e2a8: eafffff6 b 3001e288 <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; 3001e2ac: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 3001e2b0: e891000e ldm r1, {r1, r2, r3} <== NOT EXECUTED 3001e2b4: e58d1008 str r1, [sp, #8] <== NOT EXECUTED 3001e2b8: e58d2004 str r2, [sp, #4] <== NOT EXECUTED root_ino = s.st_ino; 3001e2bc: e58d3018 str r3, [sp, #24] <== NOT EXECUTED errno = 0; /* XXX readdir has no error return. */ 3001e2c0: eb003dc9 bl 3002d9ec <__errno> <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 3001e2c4: e2861b01 add r1, r6, #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. */ 3001e2c8: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3001e2cc: e3a03fff mov r3, #1020 ; 0x3fc <== NOT EXECUTED 3001e2d0: e5804000 str r4, [r0] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 3001e2d4: e58d1024 str r1, [sp, #36] <== 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. */ 3001e2d8: e1a08006 mov r8, r6 <== NOT EXECUTED 3001e2dc: e58d2010 str r2, [sp, #16] <== NOT EXECUTED 3001e2e0: e58d3020 str r3, [sp, #32] <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 3001e2e4: e1a00006 mov r0, r6 <== NOT EXECUTED 3001e2e8: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 3001e2ec: ebff9ce6 bl 3000568c <== NOT EXECUTED 3001e2f0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001e2f4: 1affffe0 bne 3001e27c <== NOT EXECUTED goto err; /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; 3001e2f8: e59d902c ldr r9, [sp, #44] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 3001e2fc: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED /* Stat the current level. */ if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; 3001e300: e59d2034 ldr r2, [sp, #52] <== NOT EXECUTED dev = s.st_dev; 3001e304: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 3001e308: e1510009 cmp r1, r9 <== NOT EXECUTED /* Stat the current level. */ if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; 3001e30c: e58d200c str r2, [sp, #12] <== NOT EXECUTED dev = s.st_dev; 3001e310: e58d3000 str r3, [sp] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 3001e314: 0a0000bd beq 3001e610 <== NOT EXECUTED 3001e318: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 3001e31c: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED 3001e320: e1520001 cmp r2, r1 <== NOT EXECUTED 3001e324: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED 3001e328: 02003001 andeq r3, r0, #1 ; 0x1 <== NOT EXECUTED 3001e32c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e330: 0a000009 beq 3001e35c <== NOT EXECUTED { *--bpt = '/'; 3001e334: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 3001e338: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED 3001e33c: e2421001 sub r1, r2, #1 ; 0x1 <== NOT EXECUTED 3001e340: e5423001 strb r3, [r2, #-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); 3001e344: e1a0000a mov r0, sl <== NOT EXECUTED 3001e348: e061200b rsb r2, r1, fp <== NOT EXECUTED 3001e34c: eb00475d bl 300300c8 <== NOT EXECUTED free (up); 3001e350: e1a00006 mov r0, r6 <== NOT EXECUTED 3001e354: ebff96fc bl 30003f4c <== NOT EXECUTED 3001e358: eaffffcd b 3001e294 <== 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) 3001e35c: e2883b01 add r3, r8, #1024 ; 0x400 <== NOT EXECUTED 3001e360: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED 3001e364: e2833004 add r3, r3, #4 ; 0x4 <== NOT EXECUTED 3001e368: e1510003 cmp r1, r3 <== NOT EXECUTED 3001e36c: 9a000053 bls 3001e4c0 <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 3001e370: e1a04008 mov r4, r8 <== NOT EXECUTED 3001e374: e3a0102e mov r1, #46 ; 0x2e <== NOT EXECUTED 3001e378: e4c41001 strb r1, [r4], #1 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 3001e37c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 3001e380: e5c81001 strb r1, [r8, #1] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 3001e384: e1a00006 mov r0, r6 <== NOT EXECUTED bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; *bup = '\0'; 3001e388: e5c42001 strb r2, [r4, #1] <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 3001e38c: eb0004fe bl 3001f78c <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 3001e390: e2843001 add r3, r4, #1 ; 0x1 <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 3001e394: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 3001e398: e58d3028 str r3, [sp, #40] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 3001e39c: 0affffb6 beq 3001e27c <== NOT EXECUTED 3001e3a0: e5970000 ldr r0, [r7] <== NOT EXECUTED 3001e3a4: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 3001e3a8: ebfffefa bl 3001df98 <== NOT EXECUTED 3001e3ac: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001e3b0: 1a00002c bne 3001e468 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 3001e3b4: e3a0102f mov r1, #47 ; 0x2f <== NOT EXECUTED 3001e3b8: e5c41001 strb r1, [r4, #1] <== 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) 3001e3bc: e59d302c ldr r3, [sp, #44] <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 3001e3c0: e59d2028 ldr r2, [sp, #40] <== 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) 3001e3c4: e1530009 cmp r3, r9 <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 3001e3c8: e2828001 add r8, r2, #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) 3001e3cc: 0a000048 beq 3001e4f4 <== NOT EXECUTED 3001e3d0: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 3001e3d4: e1a00007 mov r0, r7 <== NOT EXECUTED 3001e3d8: eb00059e bl 3001fa58 <== NOT EXECUTED 3001e3dc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001e3e0: 0a00001c beq 3001e458 <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 3001e3e4: e5d0300c ldrb r3, [r0, #12] <== NOT EXECUTED 3001e3e8: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED 3001e3ec: 1a000004 bne 3001e404 <== NOT EXECUTED 3001e3f0: e5d0300d ldrb r3, [r0, #13] <== NOT EXECUTED 3001e3f4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e3f8: 0afffff5 beq 3001e3d4 <== NOT EXECUTED 3001e3fc: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED 3001e400: 0a00002a beq 3001e4b0 <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 3001e404: e280400c add r4, r0, #12 ; 0xc <== NOT EXECUTED 3001e408: e1a00004 mov r0, r4 <== NOT EXECUTED 3001e40c: eb00540c bl 30033444 <== NOT EXECUTED 3001e410: e1a01004 mov r1, r4 <== NOT EXECUTED 3001e414: e2802001 add r2, r0, #1 ; 0x1 <== NOT EXECUTED 3001e418: e1a00008 mov r0, r8 <== NOT EXECUTED 3001e41c: eb004729 bl 300300c8 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 3001e420: e1a00006 mov r0, r6 <== NOT EXECUTED 3001e424: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 3001e428: ebff9c97 bl 3000568c <== NOT EXECUTED 3001e42c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001e430: 0a00000f beq 3001e474 <== NOT EXECUTED { if (!save_errno) 3001e434: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 3001e438: 0a000019 beq 3001e4a4 <== NOT EXECUTED save_errno = errno; errno = 0; 3001e43c: eb003d6a bl 3002d9ec <__errno> <== NOT EXECUTED 3001e440: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3001e444: e5803000 str r3, [r0] <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 3001e448: e1a00007 mov r0, r7 <== NOT EXECUTED 3001e44c: eb000581 bl 3001fa58 <== NOT EXECUTED 3001e450: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001e454: 1affffe2 bne 3001e3e4 <== 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) 3001e458: eb003d63 bl 3002d9ec <__errno> <== NOT EXECUTED 3001e45c: e5903000 ldr r3, [r0] <== NOT EXECUTED 3001e460: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e464: 0a000064 beq 3001e5fc <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 3001e468: e1a00007 mov r0, r7 <== NOT EXECUTED 3001e46c: eb003273 bl 3002ae40 <== NOT EXECUTED 3001e470: eaffff81 b 3001e27c <== NOT EXECUTED if (!save_errno) save_errno = errno; errno = 0; continue; } if (s.st_dev == dev && s.st_ino == ino) 3001e474: e59d302c ldr r3, [sp, #44] <== NOT EXECUTED 3001e478: e1530009 cmp r3, r9 <== NOT EXECUTED 3001e47c: 1affffd4 bne 3001e3d4 <== NOT EXECUTED 3001e480: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED 3001e484: e59d1000 ldr r1, [sp] <== NOT EXECUTED 3001e488: e1530001 cmp r3, r1 <== NOT EXECUTED 3001e48c: 1affffd0 bne 3001e3d4 <== NOT EXECUTED 3001e490: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 3001e494: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 3001e498: e1530002 cmp r3, r2 <== NOT EXECUTED 3001e49c: 1affffcc bne 3001e3d4 <== NOT EXECUTED 3001e4a0: ea000020 b 3001e528 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) { if (!save_errno) save_errno = errno; 3001e4a4: eb003d50 bl 3002d9ec <__errno> <== NOT EXECUTED 3001e4a8: e5905000 ldr r5, [r0] <== NOT EXECUTED 3001e4ac: eaffffe2 b 3001e43c <== NOT EXECUTED else for (;;) { if (!(dp = _readdir (dir))) goto notfound; if (ISDOT (dp)) 3001e4b0: e5d0300e ldrb r3, [r0, #14] <== NOT EXECUTED 3001e4b4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e4b8: 0affffc5 beq 3001e3d4 <== NOT EXECUTED 3001e4bc: eaffffd0 b 3001e404 <== NOT EXECUTED * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) { if (!(up = (char *) realloc (up, upsize *= 2))) 3001e4c0: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED 3001e4c4: e1a00006 mov r0, r6 <== NOT EXECUTED 3001e4c8: e1a02082 lsl r2, r2, #1 <== NOT EXECUTED 3001e4cc: e1a01002 mov r1, r2 <== NOT EXECUTED 3001e4d0: e58d2020 str r2, [sp, #32] <== NOT EXECUTED 3001e4d4: eb0005d7 bl 3001fc38 <== NOT EXECUTED 3001e4d8: e2506000 subs r6, r0, #0 ; 0x0 <== NOT EXECUTED 3001e4dc: 0affff66 beq 3001e27c <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 3001e4e0: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 3001e4e4: e1a08006 mov r8, r6 <== NOT EXECUTED 3001e4e8: e0863003 add r3, r6, r3 <== NOT EXECUTED 3001e4ec: e58d3024 str r3, [sp, #36] <== NOT EXECUTED 3001e4f0: eaffff9e b 3001e370 <== 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) 3001e4f4: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED 3001e4f8: e59d1000 ldr r1, [sp] <== NOT EXECUTED 3001e4fc: e1530001 cmp r3, r1 <== NOT EXECUTED 3001e500: 1affffb2 bne 3001e3d0 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 3001e504: e1a00007 mov r0, r7 <== NOT EXECUTED 3001e508: eb000552 bl 3001fa58 <== NOT EXECUTED 3001e50c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001e510: 0a000042 beq 3001e620 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 3001e514: e5903000 ldr r3, [r0] <== NOT EXECUTED 3001e518: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 3001e51c: e1530002 cmp r3, r2 <== NOT EXECUTED 3001e520: 1afffff7 bne 3001e504 <== NOT EXECUTED 3001e524: e280400c add r4, r0, #12 ; 0xc <== NOT EXECUTED /* * Check for length of the current name, preceding slash, * leading slash. */ if (bpt - pt <= strlen (dp->d_name) + (first ? 1 : 2)) 3001e528: e1a00004 mov r0, r4 <== NOT EXECUTED 3001e52c: eb0053c4 bl 30033444 <== NOT EXECUTED 3001e530: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 3001e534: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 3001e538: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 3001e53c: 13a03001 movne r3, #1 ; 0x1 <== NOT EXECUTED 3001e540: 03a03002 moveq r3, #2 ; 0x2 <== NOT EXECUTED 3001e544: e0833000 add r3, r3, r0 <== NOT EXECUTED 3001e548: e06a5002 rsb r5, sl, r2 <== NOT EXECUTED 3001e54c: e1550003 cmp r5, r3 <== NOT EXECUTED 3001e550: 8a000012 bhi 3001e5a0 <== NOT EXECUTED { size_t len, off; if (!ptsize) 3001e554: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED 3001e558: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e55c: 0a00003e beq 3001e65c <== NOT EXECUTED errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 3001e560: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED 3001e564: e1a0000a mov r0, sl <== NOT EXECUTED 3001e568: e1a01081 lsl r1, r1, #1 <== NOT EXECUTED 3001e56c: e58d101c str r1, [sp, #28] <== NOT EXECUTED 3001e570: eb0005b0 bl 3001fc38 <== NOT EXECUTED 3001e574: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 3001e578: 0affffba beq 3001e468 <== NOT EXECUTED { errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; 3001e57c: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 3001e580: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED { errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; 3001e584: e063200b rsb r2, r3, fp <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 3001e588: e08ab001 add fp, sl, r1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 3001e58c: e062300b rsb r3, r2, fp <== NOT EXECUTED 3001e590: e08a1005 add r1, sl, r5 <== NOT EXECUTED 3001e594: e1a00003 mov r0, r3 <== NOT EXECUTED 3001e598: e58d3014 str r3, [sp, #20] <== NOT EXECUTED 3001e59c: eb0046c9 bl 300300c8 <== NOT EXECUTED bpt = ept - len; } if (!first) 3001e5a0: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED *--bpt = '/'; bpt -= strlen (dp->d_name); 3001e5a4: e1a00004 mov r0, r4 <== NOT EXECUTED bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); bpt = ept - len; } if (!first) 3001e5a8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED *--bpt = '/'; 3001e5ac: 059d2014 ldreq r2, [sp, #20] <== NOT EXECUTED 3001e5b0: 03a0302f moveq r3, #47 ; 0x2f <== NOT EXECUTED 3001e5b4: 05623001 strbeq r3, [r2, #-1]! <== NOT EXECUTED 3001e5b8: 058d2014 streq r2, [sp, #20] <== NOT EXECUTED bpt -= strlen (dp->d_name); 3001e5bc: eb0053a0 bl 30033444 <== NOT EXECUTED 3001e5c0: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED 3001e5c4: e1a02000 mov r2, r0 <== NOT EXECUTED 3001e5c8: e0601001 rsb r1, r0, r1 <== NOT EXECUTED 3001e5cc: e58d1014 str r1, [sp, #20] <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 3001e5d0: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED 3001e5d4: e1a01004 mov r1, r4 <== NOT EXECUTED 3001e5d8: eb0046ba bl 300300c8 <== NOT EXECUTED (void) _closedir (dir); 3001e5dc: e1a00007 mov r0, r7 <== NOT EXECUTED 3001e5e0: eb003216 bl 3002ae40 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 3001e5e4: e59d2028 ldr r2, [sp, #40] <== NOT EXECUTED 3001e5e8: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3001e5ec: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3001e5f0: e5c23001 strb r3, [r2, #1] <== NOT EXECUTED 3001e5f4: e58d1010 str r1, [sp, #16] <== NOT EXECUTED 3001e5f8: eaffff39 b 3001e2e4 <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 3001e5fc: eb003cfa bl 3002d9ec <__errno> <== NOT EXECUTED 3001e600: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 3001e604: 03a05002 moveq r5, #2 ; 0x2 <== NOT EXECUTED 3001e608: e5805000 str r5, [r0] <== NOT EXECUTED 3001e60c: eaffff95 b 3001e468 <== NOT EXECUTED /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 3001e610: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 3001e614: e1510003 cmp r1, r3 <== NOT EXECUTED 3001e618: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED 3001e61c: eaffff3d b 3001e318 <== NOT EXECUTED (void) _closedir (dir); dir = 0; /* Truncate any file name. */ *bup = '\0'; } 3001e620: e1a05000 mov r5, r0 <== NOT EXECUTED 3001e624: eaffff8b b 3001e458 <== NOT EXECUTED if (pt) { ptsize = 0; if (!size) { errno = EINVAL; 3001e628: eb003cef bl 3002d9ec <__errno> <== NOT EXECUTED 3001e62c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001e630: e5803000 str r3, [r0] <== NOT EXECUTED 3001e634: e1a0a004 mov sl, r4 <== NOT EXECUTED 3001e638: eaffff15 b 3001e294 <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 3001e63c: e3a00fff mov r0, #1020 ; 0x3fc <== NOT EXECUTED 3001e640: ebff97e1 bl 300045cc <== NOT EXECUTED 3001e644: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 3001e648: 0affff11 beq 3001e294 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 3001e64c: e3a02fff mov r2, #1020 ; 0x3fc <== NOT EXECUTED 3001e650: e28abfff add fp, sl, #1020 ; 0x3fc <== NOT EXECUTED 3001e654: e58d201c str r2, [sp, #28] <== NOT EXECUTED 3001e658: eafffef7 b 3001e23c <== NOT EXECUTED { size_t len, off; if (!ptsize) { errno = ERANGE; 3001e65c: eb003ce2 bl 3002d9ec <__errno> <== NOT EXECUTED 3001e660: e3a03022 mov r3, #34 ; 0x22 <== NOT EXECUTED 3001e664: e5803000 str r3, [r0] <== NOT EXECUTED 3001e668: eaffff7e b 3001e468 <== NOT EXECUTED 3001e66c: 300432dc .word 0x300432dc 3002b230 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 3002b230: e59f30b8 ldr r3, [pc, #184] ; 3002b2f0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 3002b234: e1a0c000 mov ip, r0 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 3002b238: e5930000 ldr r0, [r3] int getdents( int dd_fd, char *dd_buf, int dd_len ) { 3002b23c: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 3002b240: e15c0000 cmp ip, r0 3002b244: 31a0320c lslcc r3, ip, #4 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 3002b248: e1a05002 mov r5, r2 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 3002b24c: 359f20a0 ldrcc r2, [pc, #160] ; 3002b2f4 3002b250: 3043310c subcc r3, r3, ip, lsl #2 3002b254: 3083300c addcc r3, r3, ip int getdents( int dd_fd, char *dd_buf, int dd_len ) { 3002b258: e1a06001 mov r6, r1 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 3002b25c: 35921000 ldrcc r1, [r2] 3002b260: 31a03103 lslcc r3, r3, #2 3002b264: 30814003 addcc r4, r1, r3 3002b268: 23a04000 movcs r4, #0 ; 0x0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 3002b26c: e24dd010 sub sp, sp, #16 ; 0x10 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 3002b270: e284c010 add ip, r4, #16 ; 0x10 3002b274: e89c000f ldm ip, {r0, r1, r2, r3} 3002b278: e88d000f stm sp, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 3002b27c: e5923010 ldr r3, [r2, #16] 3002b280: e3530000 cmp r3, #0 ; 0x0 3002b284: 0a000014 beq 3002b2dc rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 3002b288: e1a0000d mov r0, sp 3002b28c: e1a0e00f mov lr, pc 3002b290: e12fff13 bx r3 3002b294: e3500001 cmp r0, #1 ; 0x1 3002b298: 1a00000a bne 3002b2c8 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 3002b29c: e5943030 ldr r3, [r4, #48] 3002b2a0: e5933008 ldr r3, [r3, #8] 3002b2a4: e3530000 cmp r3, #0 ; 0x0 3002b2a8: 0a00000b beq 3002b2dc rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 3002b2ac: e1a00004 mov r0, r4 3002b2b0: e1a01006 mov r1, r6 3002b2b4: e1a02005 mov r2, r5 3002b2b8: e1a0e00f mov lr, pc 3002b2bc: e12fff13 bx r3 } 3002b2c0: e28dd010 add sp, sp, #16 ; 0x10 3002b2c4: e8bd8070 pop {r4, r5, r6, pc} loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 3002b2c8: eb0009c7 bl 3002d9ec <__errno> 3002b2cc: e3a03014 mov r3, #20 ; 0x14 3002b2d0: e5803000 str r3, [r0] 3002b2d4: e3e00000 mvn r0, #0 ; 0x0 3002b2d8: eafffff8 b 3002b2c0 * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 3002b2dc: eb0009c2 bl 3002d9ec <__errno> <== NOT EXECUTED 3002b2e0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3002b2e4: e5803000 str r3, [r0] <== NOT EXECUTED 3002b2e8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3002b2ec: eafffff3 b 3002b2c0 <== NOT EXECUTED 3002b2f0: 30045374 .word 0x30045374 3002b2f4: 3005a4b0 .word 0x3005a4b0 3001e698 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 3001e698: e59f3008 ldr r3, [pc, #8] ; 3001e6a8 <== NOT EXECUTED 3001e69c: e5932000 ldr r2, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 3001e6a0: e1d202bc ldrh r0, [r2, #44] <== NOT EXECUTED 3001e6a4: e12fff1e bx lr <== NOT EXECUTED 3001e6a8: 30045edc .word 0x30045edc 3001ed08 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 3001ed08: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 3001ed0c: e59d801c ldr r8, [sp, #28] <== NOT EXECUTED 3001ed10: e1a06000 mov r6, r0 <== NOT EXECUTED 3001ed14: e1a0a001 mov sl, r1 <== NOT EXECUTED 3001ed18: e1a04002 mov r4, r2 <== NOT EXECUTED 3001ed1c: e1a07003 mov r7, r3 <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 3001ed20: ebffffb2 bl 3001ebf0 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 3001ed24: e59f00b0 ldr r0, [pc, #176] ; 3001eddc <== NOT EXECUTED 3001ed28: e59f10b0 ldr r1, [pc, #176] ; 3001ede0 <== NOT EXECUTED 3001ed2c: eb003d72 bl 3002e2fc <== NOT EXECUTED 3001ed30: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 3001ed34: 1a000006 bne 3001ed54 <== NOT EXECUTED 3001ed38: ea000022 b 3001edc8 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 3001ed3c: e5940000 ldr r0, [r4] <== NOT EXECUTED 3001ed40: eb004f98 bl 30032ba8 <== NOT EXECUTED 3001ed44: e2700001 rsbs r0, r0, #1 ; 0x1 <== NOT EXECUTED 3001ed48: 33a00000 movcc r0, #0 ; 0x0 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); } if (match) { 3001ed4c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ed50: 1a00000f bne 3001ed94 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 3001ed54: e1a01004 mov r1, r4 <== NOT EXECUTED 3001ed58: e1a02007 mov r2, r7 <== NOT EXECUTED 3001ed5c: e1a03008 mov r3, r8 <== NOT EXECUTED 3001ed60: e1a00005 mov r0, r5 <== NOT EXECUTED 3001ed64: ebfffede bl 3001e8e4 <== NOT EXECUTED 3001ed68: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 3001ed6c: e1a01006 mov r1, r6 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 3001ed70: 0a00000d beq 3001edac <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 3001ed74: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 3001ed78: 1affffef bne 3001ed3c <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 3001ed7c: e1d430b8 ldrh r3, [r4, #8] <== NOT EXECUTED 3001ed80: e153000a cmp r3, sl <== NOT EXECUTED 3001ed84: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 3001ed88: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED } if (match) { 3001ed8c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ed90: 0affffef beq 3001ed54 <== NOT EXECUTED fclose(fp); 3001ed94: e1a00005 mov r0, r5 <== NOT EXECUTED 3001ed98: eb003b64 bl 3002db30 <== NOT EXECUTED *result = grp; 3001ed9c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 3001eda0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001eda4: e5834000 str r4, [r3] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 3001eda8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 3001edac: eb003b0e bl 3002d9ec <__errno> <== NOT EXECUTED 3001edb0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001edb4: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 3001edb8: e1a00005 mov r0, r5 <== NOT EXECUTED 3001edbc: eb003b5b bl 3002db30 <== NOT EXECUTED 3001edc0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001edc4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 3001edc8: eb003b07 bl 3002d9ec <__errno> <== NOT EXECUTED 3001edcc: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001edd0: e5803000 str r3, [r0] <== NOT EXECUTED 3001edd4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001edd8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 3001eddc: 300431f8 .word 0x300431f8 3001ede0: 3004419c .word 0x3004419c 3001ea3c : return p; } struct group *getgrent() { if (group_fp == NULL) 3001ea3c: e59f3030 ldr r3, [pc, #48] ; 3001ea74 <== NOT EXECUTED return NULL; return p; } struct group *getgrent() { 3001ea40: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if (group_fp == NULL) 3001ea44: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001ea48: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ea4c: 0a000006 beq 3001ea6c <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 3001ea50: e59f1020 ldr r1, [pc, #32] ; 3001ea78 <== NOT EXECUTED 3001ea54: e59f2020 ldr r2, [pc, #32] ; 3001ea7c <== NOT EXECUTED 3001ea58: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001ea5c: ebffffa0 bl 3001e8e4 <== NOT EXECUTED 3001ea60: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ea64: 159f000c ldrne r0, [pc, #12] ; 3001ea78 <== NOT EXECUTED 3001ea68: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED 3001ea6c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return &grent; } 3001ea70: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001ea74: 30059cb0 .word 0x30059cb0 3001ea78: 30059d7c .word 0x30059d7c 3001ea7c: 30059cb4 .word 0x30059cb4 3001ee20 : struct group *getgrgid( gid_t gid ) { 3001ee20: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001ee24: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED 3001ee28: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 3001ee2c: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 3001ee30: e59f1024 ldr r1, [pc, #36] ; 3001ee5c <== NOT EXECUTED 3001ee34: e59f2024 ldr r2, [pc, #36] ; 3001ee60 <== NOT EXECUTED 3001ee38: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001ee3c: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 3001ee40: e58dc000 str ip, [sp] <== NOT EXECUTED 3001ee44: ebffffe6 bl 3001ede4 <== NOT EXECUTED 3001ee48: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ee4c: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 3001ee50: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 3001ee54: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001ee58: e8bd8000 pop {pc} <== NOT EXECUTED 3001ee5c: 30059d7c .word 0x30059d7c 3001ee60: 30059cb4 .word 0x30059cb4 3001ede4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 3001ede4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001ede8: e1a0c001 mov ip, r1 <== NOT EXECUTED 3001edec: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001edf0: e1a0e002 mov lr, r2 <== NOT EXECUTED 3001edf4: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 3001edf8: e1a0200c mov r2, ip <== NOT EXECUTED 3001edfc: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 3001ee00: e58d3000 str r3, [sp] <== NOT EXECUTED 3001ee04: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 3001ee08: e1a0300e mov r3, lr <== NOT EXECUTED 3001ee0c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001ee10: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3001ee14: ebffffbb bl 3001ed08 <== NOT EXECUTED } 3001ee18: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001ee1c: e8bd8000 pop {pc} <== NOT EXECUTED 3001ee94 : struct group *getgrnam( const char *name ) { 3001ee94: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001ee98: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 3001ee9c: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 3001eea0: e59f1020 ldr r1, [pc, #32] ; 3001eec8 <== NOT EXECUTED 3001eea4: e59f2020 ldr r2, [pc, #32] ; 3001eecc <== NOT EXECUTED 3001eea8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001eeac: e58dc000 str ip, [sp] <== NOT EXECUTED 3001eeb0: ebffffeb bl 3001ee64 <== NOT EXECUTED 3001eeb4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001eeb8: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 3001eebc: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 3001eec0: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001eec4: e8bd8000 pop {pc} <== NOT EXECUTED 3001eec8: 30059d7c .word 0x30059d7c 3001eecc: 30059cb4 .word 0x30059cb4 3001ee64 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 3001ee64: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001ee68: e1a0c002 mov ip, r2 <== NOT EXECUTED 3001ee6c: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 3001ee70: e58d3000 str r3, [sp] <== NOT EXECUTED 3001ee74: e1a0300c mov r3, ip <== NOT EXECUTED 3001ee78: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 3001ee7c: e1a02001 mov r2, r1 <== NOT EXECUTED 3001ee80: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3001ee84: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3001ee88: ebffff9e bl 3001ed08 <== NOT EXECUTED } 3001ee8c: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001ee90: e8bd8000 pop {pc} <== NOT EXECUTED 3001ef08 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 3001ef08: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 3001ef0c: e59d801c ldr r8, [sp, #28] <== NOT EXECUTED 3001ef10: e1a06000 mov r6, r0 <== NOT EXECUTED 3001ef14: e1a0a001 mov sl, r1 <== NOT EXECUTED 3001ef18: e1a04002 mov r4, r2 <== NOT EXECUTED 3001ef1c: e1a07003 mov r7, r3 <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 3001ef20: ebffff32 bl 3001ebf0 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 3001ef24: e59f00b0 ldr r0, [pc, #176] ; 3001efdc <== NOT EXECUTED 3001ef28: e59f10b0 ldr r1, [pc, #176] ; 3001efe0 <== NOT EXECUTED 3001ef2c: eb003cf2 bl 3002e2fc <== NOT EXECUTED 3001ef30: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 3001ef34: 1a000006 bne 3001ef54 <== NOT EXECUTED 3001ef38: ea000022 b 3001efc8 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 3001ef3c: e5940000 ldr r0, [r4] <== NOT EXECUTED 3001ef40: eb004f18 bl 30032ba8 <== NOT EXECUTED 3001ef44: e2700001 rsbs r0, r0, #1 ; 0x1 <== NOT EXECUTED 3001ef48: 33a00000 movcc r0, #0 ; 0x0 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); } if (match) { 3001ef4c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ef50: 1a00000f bne 3001ef94 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 3001ef54: e1a01004 mov r1, r4 <== NOT EXECUTED 3001ef58: e1a02007 mov r2, r7 <== NOT EXECUTED 3001ef5c: e1a03008 mov r3, r8 <== NOT EXECUTED 3001ef60: e1a00005 mov r0, r5 <== NOT EXECUTED 3001ef64: ebfffec5 bl 3001ea80 <== NOT EXECUTED 3001ef68: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 3001ef6c: e1a01006 mov r1, r6 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 3001ef70: 0a00000d beq 3001efac <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 3001ef74: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 3001ef78: 1affffef bne 3001ef3c <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 3001ef7c: e1d430b8 ldrh r3, [r4, #8] <== NOT EXECUTED 3001ef80: e153000a cmp r3, sl <== NOT EXECUTED 3001ef84: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 3001ef88: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED } if (match) { 3001ef8c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ef90: 0affffef beq 3001ef54 <== NOT EXECUTED fclose(fp); 3001ef94: e1a00005 mov r0, r5 <== NOT EXECUTED 3001ef98: eb003ae4 bl 3002db30 <== NOT EXECUTED *result = pwd; 3001ef9c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 3001efa0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001efa4: e5834000 str r4, [r3] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 3001efa8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 3001efac: eb003a8e bl 3002d9ec <__errno> <== NOT EXECUTED 3001efb0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001efb4: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 3001efb8: e1a00005 mov r0, r5 <== NOT EXECUTED 3001efbc: eb003adb bl 3002db30 <== NOT EXECUTED 3001efc0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001efc4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 3001efc8: eb003a87 bl 3002d9ec <__errno> <== NOT EXECUTED 3001efcc: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3001efd0: e5803000 str r3, [r0] <== NOT EXECUTED 3001efd4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3001efd8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 3001efdc: 30043184 .word 0x30043184 3001efe0: 3004419c .word 0x3004419c 3001ebac : return p; } struct passwd *getpwent() { if (passwd_fp == NULL) 3001ebac: e59f3030 ldr r3, [pc, #48] ; 3001ebe4 <== NOT EXECUTED return NULL; return p; } struct passwd *getpwent() { 3001ebb0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if (passwd_fp == NULL) 3001ebb4: e5930000 ldr r0, [r3] <== NOT EXECUTED 3001ebb8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ebbc: 0a000006 beq 3001ebdc <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 3001ebc0: e59f1020 ldr r1, [pc, #32] ; 3001ebe8 <== NOT EXECUTED 3001ebc4: e59f2020 ldr r2, [pc, #32] ; 3001ebec <== NOT EXECUTED 3001ebc8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001ebcc: ebffffab bl 3001ea80 <== NOT EXECUTED 3001ebd0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ebd4: 159f000c ldrne r0, [pc, #12] ; 3001ebe8 <== NOT EXECUTED 3001ebd8: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED 3001ebdc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return &pwent; } 3001ebe0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3001ebe4: 30059bc8 .word 0x30059bc8 3001ebe8: 30059c94 .word 0x30059c94 3001ebec: 30059bcc .word 0x30059bcc 3001f094 : struct passwd *getpwnam( const char *name ) { 3001f094: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001f098: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 3001f09c: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 3001f0a0: e59f1020 ldr r1, [pc, #32] ; 3001f0c8 <== NOT EXECUTED 3001f0a4: e59f2020 ldr r2, [pc, #32] ; 3001f0cc <== NOT EXECUTED 3001f0a8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001f0ac: e58dc000 str ip, [sp] <== NOT EXECUTED 3001f0b0: ebffffeb bl 3001f064 <== NOT EXECUTED 3001f0b4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001f0b8: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 3001f0bc: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 3001f0c0: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001f0c4: e8bd8000 pop {pc} <== NOT EXECUTED 3001f0c8: 30059c94 .word 0x30059c94 3001f0cc: 30059bcc .word 0x30059bcc 3001f064 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 3001f064: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001f068: e1a0c002 mov ip, r2 <== NOT EXECUTED 3001f06c: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 3001f070: e58d3000 str r3, [sp] <== NOT EXECUTED 3001f074: e1a0300c mov r3, ip <== NOT EXECUTED 3001f078: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 3001f07c: e1a02001 mov r2, r1 <== NOT EXECUTED 3001f080: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3001f084: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3001f088: ebffff9e bl 3001ef08 <== NOT EXECUTED } 3001f08c: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001f090: e8bd8000 pop {pc} <== NOT EXECUTED 3001f020 : struct passwd *getpwuid( uid_t uid ) { 3001f020: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001f024: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED 3001f028: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 3001f02c: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 3001f030: e59f1024 ldr r1, [pc, #36] ; 3001f05c <== NOT EXECUTED 3001f034: e59f2024 ldr r2, [pc, #36] ; 3001f060 <== NOT EXECUTED 3001f038: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 3001f03c: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 3001f040: e58dc000 str ip, [sp] <== NOT EXECUTED 3001f044: ebffffe6 bl 3001efe4 <== NOT EXECUTED 3001f048: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001f04c: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 3001f050: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 3001f054: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001f058: e8bd8000 pop {pc} <== NOT EXECUTED 3001f05c: 30059c94 .word 0x30059c94 3001f060: 30059bcc .word 0x30059bcc 3001efe4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 3001efe4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 3001efe8: e1a0c001 mov ip, r1 <== NOT EXECUTED 3001efec: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001eff0: e1a0e002 mov lr, r2 <== NOT EXECUTED 3001eff4: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 3001eff8: e1a0200c mov r2, ip <== NOT EXECUTED 3001effc: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 3001f000: e58d3000 str r3, [sp] <== NOT EXECUTED 3001f004: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 3001f008: e1a0300e mov r3, lr <== NOT EXECUTED 3001f00c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001f010: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3001f014: ebffffbb bl 3001ef08 <== NOT EXECUTED } 3001f018: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001f01c: e8bd8000 pop {pc} <== NOT EXECUTED 3000916c : int gettimeofday( struct timeval *tp, void * __tz ) { 3000916c: e92d4030 push {r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 30009170: e2505000 subs r5, r0, #0 ; 0x0 int gettimeofday( struct timeval *tp, void * __tz ) { 30009174: e24dd008 sub sp, sp, #8 ; 0x8 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 30009178: 0a00000f beq 300091bc ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 3000917c: e10f4000 mrs r4, CPSR 30009180: e38430c0 orr r3, r4, #192 ; 0xc0 30009184: e129f003 msr CPSR_fc, r3 _TOD_Get( &now ); 30009188: e1a0000d mov r0, sp 3000918c: ebfff135 bl 30005668 <_TOD_Get> _ISR_Enable(level); 30009190: e129f004 msr CPSR_fc, r4 time->tv_sec = now.tv_sec; 30009194: e59d3000 ldr r3, [sp] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 30009198: e59f1030 ldr r1, [pc, #48] ; 300091d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 3000919c: e5853000 str r3, [r5] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 300091a0: e59d2004 ldr r2, [sp, #4] 300091a4: e3a00000 mov r0, #0 ; 0x0 300091a8: e083c291 umull ip, r3, r1, r2 300091ac: e1a03323 lsr r3, r3, #6 300091b0: e5853004 str r3, [r5, #4] * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 300091b4: e28dd008 add sp, sp, #8 ; 0x8 300091b8: e8bd8030 pop {r4, r5, pc} void * __tz ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 300091bc: eb000b49 bl 3000bee8 <__errno> <== NOT EXECUTED 300091c0: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 300091c4: e5803000 str r3, [r0] <== NOT EXECUTED 300091c8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300091cc: eafffff8 b 300091b4 <== NOT EXECUTED 300091d0: 10624dd3 .word 0x10624dd3 30004064 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 30004064: e59f3008 ldr r3, [pc, #8] ; 30004074 <== NOT EXECUTED 30004068: e5932000 ldr r2, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 3000406c: e1d202ba ldrh r0, [r2, #42] <== NOT EXECUTED 30004070: e12fff1e bx lr <== NOT EXECUTED 30004074: 30045edc .word 0x30045edc 3002abf4 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3002abf4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 3002abf8: e590302c ldr r3, [r0, #44] ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3002abfc: e24dde11 sub sp, sp, #272 ; 0x110 3002ac00: e58d1000 str r1, [sp] */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 3002ac04: e5936050 ldr r6, [r3, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3002ac08: e283b054 add fp, r3, #84 ; 0x54 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 3002ac0c: e156000b cmp r6, fp ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3002ac10: e1a08000 mov r8, r0 3002ac14: e1a01002 mov r1, r2 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 3002ac18: 0a000032 beq 3002ace8 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 3002ac1c: e59f30cc ldr r3, [pc, #204] ; 3002acf0 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 3002ac20: e5909008 ldr r9, [r0, #8] /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 3002ac24: e0820193 umull r0, r2, r3, r1 3002ac28: e1a021a2 lsr r2, r2, #3 3002ac2c: e1a03102 lsl r3, r2, #2 3002ac30: e1a01302 lsl r1, r2, #6 3002ac34: e0833001 add r3, r3, r1 3002ac38: e0623003 rsb r3, r2, r3 3002ac3c: e1a03103 lsl r3, r3, #2 3002ac40: e083a009 add sl, r3, r9 /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 3002ac44: e35a0000 cmp sl, #0 ; 0x0 3002ac48: c3a07000 movgt r7, #0 ; 0x0 3002ac4c: c1a05007 movgt r5, r7 3002ac50: ca000006 bgt 3002ac70 3002ac54: ea000023 b 3002ace8 <== NOT EXECUTED ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3002ac58: e2855f43 add r5, r5, #268 ; 0x10c last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 3002ac5c: e15a0005 cmp sl, r5 ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 3002ac60: e5966000 ldr r6, [r6] last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 3002ac64: da00001c ble 3002acdc current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 3002ac68: e156000b cmp r6, fp 3002ac6c: 0a00001a beq 3002acdc /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 3002ac70: e1590005 cmp r9, r5 3002ac74: cafffff7 bgt 3002ac58 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 3002ac78: e58d5008 str r5, [sp, #8] tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 3002ac7c: e5963038 ldr r3, [r6, #56] tmp_dirent.d_namlen = strlen( the_jnode->name ); 3002ac80: e286400c add r4, r6, #12 ; 0xc if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 3002ac84: e58d3004 str r3, [sp, #4] } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 3002ac88: e3a03f43 mov r3, #268 ; 0x10c 3002ac8c: e1cd30bc strh r3, [sp, #12] the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 3002ac90: e1a00004 mov r0, r4 3002ac94: eb0021ea bl 30033444 strcpy( tmp_dirent.d_name, the_jnode->name ); 3002ac98: e1a01004 mov r1, r4 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 3002ac9c: e1cd00be strh r0, [sp, #14] strcpy( tmp_dirent.d_name, the_jnode->name ); 3002aca0: e28d0010 add r0, sp, #16 ; 0x10 3002aca4: eb001ff9 bl 30032c90 memcpy( 3002aca8: e59d3000 ldr r3, [sp] 3002acac: e28d1004 add r1, sp, #4 ; 0x4 3002acb0: e0830007 add r0, r3, r7 3002acb4: e3a02f43 mov r2, #268 ; 0x10c 3002acb8: eb0014c3 bl 3002ffcc buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 3002acbc: e5983008 ldr r3, [r8, #8] ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3002acc0: e2855f43 add r5, r5, #268 ; 0x10c memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 3002acc4: e2833f43 add r3, r3, #268 ; 0x10c last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 3002acc8: e15a0005 cmp sl, r5 buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 3002accc: e2877f43 add r7, r7, #268 ; 0x10c memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 3002acd0: e5883008 str r3, [r8, #8] bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 3002acd4: e5966000 ldr r6, [r6] last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 3002acd8: caffffe2 bgt 3002ac68 the_node = the_node->next; } /* Success */ return bytes_transferred; } 3002acdc: e1a00007 mov r0, r7 3002ace0: e28dde11 add sp, sp, #272 ; 0x110 3002ace4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 3002ace8: e3a07000 mov r7, #0 ; 0x0 3002acec: eafffffa b 3002acdc 3002acf0: 07a44c6b .word 0x07a44c6b 3001ebf0 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 3001ebf0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 3001ebf4: e59f20b0 ldr r2, [pc, #176] ; 3001ecac <== NOT EXECUTED 3001ebf8: e5d23000 ldrb r3, [r2] <== NOT EXECUTED 3001ebfc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001ec00: 18bd8030 popne {r4, r5, pc} <== NOT EXECUTED return; etc_passwd_initted = 1; 3001ec04: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED mkdir("/etc", 0777); 3001ec08: e59f10a0 ldr r1, [pc, #160] ; 3001ecb0 <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 3001ec0c: e5c24000 strb r4, [r2] <== NOT EXECUTED mkdir("/etc", 0777); 3001ec10: e59f009c ldr r0, [pc, #156] ; 3001ecb4 <== NOT EXECUTED 3001ec14: ebff96eb bl 300047c8 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 3001ec18: e59f0098 ldr r0, [pc, #152] ; 3001ecb8 <== NOT EXECUTED 3001ec1c: e59f1098 ldr r1, [pc, #152] ; 3001ecbc <== NOT EXECUTED 3001ec20: eb003db5 bl 3002e2fc <== NOT EXECUTED 3001ec24: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ec28: 0a000007 beq 3001ec4c <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 3001ec2c: eb003bbf bl 3002db30 <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 3001ec30: e59f0088 ldr r0, [pc, #136] ; 3001ecc0 <== NOT EXECUTED 3001ec34: e59f1080 ldr r1, [pc, #128] ; 3001ecbc <== NOT EXECUTED 3001ec38: eb003daf bl 3002e2fc <== NOT EXECUTED 3001ec3c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3001ec40: 0a00000d beq 3001ec7c <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 3001ec44: e8bd4030 pop {r4, r5, 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); 3001ec48: ea003bb8 b 3002db30 <== NOT EXECUTED * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 3001ec4c: e59f0064 ldr r0, [pc, #100] ; 3001ecb8 <== NOT EXECUTED 3001ec50: e59f106c ldr r1, [pc, #108] ; 3001ecc4 <== NOT EXECUTED 3001ec54: eb003da8 bl 3002e2fc <== NOT EXECUTED 3001ec58: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 3001ec5c: 0afffff3 beq 3001ec30 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 3001ec60: e1a01004 mov r1, r4 <== NOT EXECUTED 3001ec64: e59f005c ldr r0, [pc, #92] ; 3001ecc8 <== NOT EXECUTED 3001ec68: e3a02066 mov r2, #102 ; 0x66 <== NOT EXECUTED 3001ec6c: e1a03005 mov r3, r5 <== NOT EXECUTED 3001ec70: eb0040a5 bl 3002ef0c <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 3001ec74: e1a00005 mov r0, r5 <== NOT EXECUTED 3001ec78: eaffffeb b 3001ec2c <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 3001ec7c: e59f003c ldr r0, [pc, #60] ; 3001ecc0 <== NOT EXECUTED 3001ec80: e59f103c ldr r1, [pc, #60] ; 3001ecc4 <== NOT EXECUTED 3001ec84: eb003d9c bl 3002e2fc <== NOT EXECUTED 3001ec88: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 3001ec8c: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 3001ec90: e59f0034 ldr r0, [pc, #52] ; 3001eccc <== NOT EXECUTED 3001ec94: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3001ec98: e3a0202a mov r2, #42 ; 0x2a <== NOT EXECUTED 3001ec9c: e1a03004 mov r3, r4 <== NOT EXECUTED 3001eca0: eb004099 bl 3002ef0c <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 3001eca4: e1a00004 mov r0, r4 <== NOT EXECUTED 3001eca8: eaffffe5 b 3001ec44 <== NOT EXECUTED 3001ecac: 30059bc4 .word 0x30059bc4 3001ecb0: 000001ff .word 0x000001ff 3001ecb4: 3004317c .word 0x3004317c 3001ecb8: 30043184 .word 0x30043184 3001ecbc: 3004419c .word 0x3004419c 3001ecc0: 300431f8 .word 0x300431f8 3001ecc4: 300413c8 .word 0x300413c8 3001ecc8: 30043190 .word 0x30043190 3001eccc: 30043204 .word 0x30043204 30015280 : int ioctl( int fd, ioctl_command_t command, ... ) { 30015280: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 30015284: e59f3090 ldr r3, [pc, #144] ; 3001531c int ioctl( int fd, ioctl_command_t command, ... ) { 30015288: 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 ); 3001528c: e5932000 ldr r2, [r3] 30015290: e1500002 cmp r0, r2 30015294: 2a000016 bcs 300152f4 iop = rtems_libio_iop( fd ); 30015298: e1a03200 lsl r3, r0, #4 3001529c: e59f207c ldr r2, [pc, #124] ; 30015320 300152a0: e0433100 sub r3, r3, r0, lsl #2 300152a4: e0833000 add r3, r3, r0 300152a8: e5921000 ldr r1, [r2] 300152ac: e1a03103 lsl r3, r3, #2 300152b0: e0810003 add r0, r1, r3 rtems_libio_check_is_open(iop); 300152b4: e590200c ldr r2, [r0, #12] 300152b8: e3120c01 tst r2, #256 ; 0x100 300152bc: 0a00000c beq 300152f4 /* * Now process the ioctl(). */ if ( !iop->handlers ) 300152c0: e590c030 ldr ip, [r0, #48] iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 300152c4: e59d2008 ldr r2, [sp, #8] /* * Now process the ioctl(). */ if ( !iop->handlers ) 300152c8: e35c0000 cmp ip, #0 ; 0x0 300152cc: 0a000008 beq 300152f4 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 300152d0: e59c3010 ldr r3, [ip, #16] 300152d4: e3530000 cmp r3, #0 ; 0x0 300152d8: 0a00000a beq 30015308 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 300152dc: e59d1004 ldr r1, [sp, #4] 300152e0: e1a0e00f mov lr, pc 300152e4: e12fff13 bx r3 return rc; } 300152e8: e49de004 pop {lr} ; (ldr lr, [sp], #4) 300152ec: e28dd00c add sp, sp, #12 ; 0xc 300152f0: e12fff1e bx lr /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 300152f4: eb000312 bl 30015f44 <__errno> <== NOT EXECUTED 300152f8: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 300152fc: e5803000 str r3, [r0] <== NOT EXECUTED 30015300: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30015304: eafffff7 b 300152e8 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 30015308: eb00030d bl 30015f44 <__errno> <== NOT EXECUTED 3001530c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30015310: e5803000 str r3, [r0] <== NOT EXECUTED 30015314: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30015318: eafffff2 b 300152e8 <== NOT EXECUTED 3001531c: 30025210 .word 0x30025210 30015320: 300270c0 .word 0x300270c0 30002c48 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 30002c48: e591c030 ldr ip, [r1, #48] <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30002c4c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 30002c50: e31c0020 tst ip, #32 ; 0x20 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30002c54: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 30002c58: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 30002c5c: e31c0c02 tst ip, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30002c60: e1a05001 mov r5, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 30002c64: 0a000006 beq 30002c84 <== NOT EXECUTED c = tolower (c); 30002c68: e59f3190 ldr r3, [pc, #400] ; 30002e00 <== NOT EXECUTED 30002c6c: e1a00004 mov r0, r4 <== NOT EXECUTED 30002c70: e5932000 ldr r2, [r3] <== NOT EXECUTED 30002c74: e7d21004 ldrb r1, [r2, r4] <== NOT EXECUTED 30002c78: e3110001 tst r1, #1 ; 0x1 <== NOT EXECUTED 30002c7c: 12840020 addne r0, r4, #32 ; 0x20 <== NOT EXECUTED 30002c80: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 30002c84: e354000d cmp r4, #13 ; 0xd <== NOT EXECUTED 30002c88: 0a000034 beq 30002d60 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 30002c8c: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 30002c90: 0a000010 beq 30002cd8 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 30002c94: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 30002c98: 1a000011 bne 30002ce4 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 30002c9c: e59f2160 ldr r2, [pc, #352] ; 30002e04 <== NOT EXECUTED 30002ca0: e5951020 ldr r1, [r5, #32] <== NOT EXECUTED 30002ca4: e5923000 ldr r3, [r2] <== NOT EXECUTED 30002ca8: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002cac: e1510003 cmp r1, r3 <== NOT EXECUTED 30002cb0: aa00002c bge 30002d68 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 30002cb4: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 30002cb8: e3130008 tst r3, #8 ; 0x8 <== NOT EXECUTED 30002cbc: 1a00002f bne 30002d80 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 30002cc0: e595301c ldr r3, [r5, #28] <== NOT EXECUTED 30002cc4: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED 30002cc8: e7c34001 strb r4, [r3, r1] <== NOT EXECUTED 30002ccc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30002cd0: e5852020 str r2, [r5, #32] <== NOT EXECUTED 30002cd4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30002cd8: e31c0040 tst ip, #64 ; 0x40 <== NOT EXECUTED 30002cdc: 03a0400a moveq r4, #10 ; 0xa <== NOT EXECUTED 30002ce0: 13a0400d movne r4, #13 ; 0xd <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 30002ce4: e595203c ldr r2, [r5, #60] <== NOT EXECUTED 30002ce8: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED 30002cec: 0affffea beq 30002c9c <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 30002cf0: e5d53043 ldrb r3, [r5, #67] <== NOT EXECUTED 30002cf4: e1530004 cmp r3, r4 <== NOT EXECUTED 30002cf8: 0a000036 beq 30002dd8 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 30002cfc: e5d53044 ldrb r3, [r5, #68] <== NOT EXECUTED 30002d00: e1530004 cmp r3, r4 <== NOT EXECUTED 30002d04: 0a000038 beq 30002dec <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 30002d08: e5d53045 ldrb r3, [r5, #69] <== NOT EXECUTED 30002d0c: e1530004 cmp r3, r4 <== NOT EXECUTED 30002d10: 0a00002e beq 30002dd0 <== NOT EXECUTED return 1; } else if (c == '\n') { 30002d14: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 30002d18: 0a000022 beq 30002da8 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 30002d1c: e5d5304c ldrb r3, [r5, #76] <== NOT EXECUTED 30002d20: e1530004 cmp r3, r4 <== NOT EXECUTED 30002d24: 0a000002 beq 30002d34 <== NOT EXECUTED 30002d28: e5d53051 ldrb r3, [r5, #81] <== NOT EXECUTED 30002d2c: e1530004 cmp r3, r4 <== NOT EXECUTED 30002d30: 1affffd9 bne 30002c9c <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 30002d34: e3120008 tst r2, #8 ; 0x8 <== NOT EXECUTED echo (c, tty); 30002d38: 11a00004 movne r0, r4 <== NOT EXECUTED 30002d3c: 11a01005 movne r1, r5 <== NOT EXECUTED 30002d40: 1bffff26 blne 300029e0 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30002d44: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 30002d48: e595201c ldr r2, [r5, #28] <== NOT EXECUTED 30002d4c: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED 30002d50: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED 30002d54: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30002d58: e5851020 str r1, [r5, #32] <== NOT EXECUTED 30002d5c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 30002d60: e31c0080 tst ip, #128 ; 0x80 <== NOT EXECUTED 30002d64: 0a000001 beq 30002d70 <== 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; 30002d68: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } return 0; } 30002d6c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 30002d70: e31c0c01 tst ip, #256 ; 0x100 <== NOT EXECUTED 30002d74: 03a0400d moveq r4, #13 ; 0xd <== NOT EXECUTED 30002d78: 13a0400a movne r4, #10 ; 0xa <== NOT EXECUTED 30002d7c: eaffffd8 b 30002ce4 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 30002d80: e1a00004 mov r0, r4 <== NOT EXECUTED 30002d84: e1a01005 mov r1, r5 <== NOT EXECUTED 30002d88: ebffff14 bl 300029e0 <== NOT EXECUTED 30002d8c: e5951020 ldr r1, [r5, #32] <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30002d90: e595301c ldr r3, [r5, #28] <== NOT EXECUTED 30002d94: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED 30002d98: e7c34001 strb r4, [r3, r1] <== NOT EXECUTED 30002d9c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30002da0: e5852020 str r2, [r5, #32] <== NOT EXECUTED 30002da4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 30002da8: e3120048 tst r2, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 30002dac: 11a00004 movne r0, r4 <== NOT EXECUTED 30002db0: 11a01005 movne r1, r5 <== NOT EXECUTED 30002db4: 1bffff09 blne 300029e0 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30002db8: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED 30002dbc: e595101c ldr r1, [r5, #28] <== NOT EXECUTED 30002dc0: e2820001 add r0, r2, #1 ; 0x1 <== NOT EXECUTED 30002dc4: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED 30002dc8: e7c13002 strb r3, [r1, r2] <== NOT EXECUTED 30002dcc: e5850020 str r0, [r5, #32] <== NOT EXECUTED 30002dd0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30002dd4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 30002dd8: e1a00005 mov r0, r5 <== NOT EXECUTED 30002ddc: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30002de0: ebffff20 bl 30002a68 <== NOT EXECUTED 30002de4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30002de8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 30002dec: e1a00005 mov r0, r5 <== NOT EXECUTED 30002df0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 30002df4: ebffff1b bl 30002a68 <== NOT EXECUTED 30002df8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30002dfc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30002e00: 300166f4 .word 0x300166f4 30002e04: 30016648 .word 0x30016648 30020fc0 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 30020fc0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30020fc4: e24dd00c sub sp, sp, #12 ; 0xc 30020fc8: e1a04000 mov r4, r0 30020fcc: e1a05001 mov r5, r1 30020fd0: e1a06002 mov r6, r2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 30020fd4: ebffff29 bl 30020c80 30020fd8: e1500004 cmp r0, r4 30020fdc: 1a0000a5 bne 30021278 /* * Validate the signal passed. */ if ( !sig ) 30020fe0: e3550000 cmp r5, #0 ; 0x0 30020fe4: 0a0000a8 beq 3002128c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 30020fe8: e2450001 sub r0, r5, #1 ; 0x1 30020fec: e350001f cmp r0, #31 ; 0x1f 30020ff0: 8a0000a5 bhi 3002128c /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 30020ff4: e59f22b8 ldr r2, [pc, #696] ; 300212b4 30020ff8: e1a0b105 lsl fp, r5, #2 30020ffc: e1a09205 lsl r9, r5, #4 30021000: e06b3009 rsb r3, fp, r9 30021004: e0823003 add r3, r2, r3 30021008: e5932008 ldr r2, [r3, #8] 3002100c: e3520001 cmp r2, #1 ; 0x1 30021010: 0a00008b beq 30021244 * 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 ) ) 30021014: e3550004 cmp r5, #4 ; 0x4 30021018: 13550008 cmpne r5, #8 ; 0x8 3002101c: 0a000066 beq 300211bc 30021020: e355000b cmp r5, #11 ; 0xb 30021024: 0a000064 beq 300211bc return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 30021028: e3a03001 mov r3, #1 ; 0x1 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { 3002102c: e3560000 cmp r6, #0 ; 0x0 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 30021030: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 30021034: e58d5000 str r5, [sp] */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 30021038: e1a04013 lsl r4, r3, r0 3002103c: e59f2274 ldr r2, [pc, #628] ; 300212b8 siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 30021040: 15963000 ldrne r3, [r6] siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 30021044: 058d6008 streq r6, [sp, #8] } else { siginfo->si_value = *value; 30021048: 158d3008 strne r3, [sp, #8] 3002104c: e5923000 ldr r3, [r2] 30021050: e2833001 add r3, r3, #1 ; 0x1 30021054: 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; 30021058: e59f325c ldr r3, [pc, #604] ; 300212bc 3002105c: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 30021060: e5902108 ldr r2, [r0, #264] 30021064: e59230c4 ldr r3, [r2, #196] 30021068: e1d43003 bics r3, r4, r3 3002106c: 1a00005a bne 300211dc goto process_it; 30021070: e59fe248 ldr lr, [pc, #584] ; 300212c0 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 30021074: e28e6030 add r6, lr, #48 ; 0x30 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 30021078: e1a0c00e mov ip, lr 3002107c: e49c2004 ldr r2, [ip], #4 !_Chain_Is_tail( the_chain, the_node ) ; 30021080: e152000c cmp r2, ip 30021084: 0a000013 beq 300210d8 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)) { 30021088: 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; 3002108c: e1a00002 mov r0, r2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 30021090: e1140003 tst r4, 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; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 30021094: e5923108 ldr r3, [r2, #264] if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 30021098: 1a00004f bne 300211dc 3002109c: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 300210a0: e1d43003 bics r3, r4, r3 <== NOT EXECUTED 300210a4: 0a000008 beq 300210cc <== NOT EXECUTED 300210a8: ea00004b b 300211dc <== NOT EXECUTED 300210ac: e5923030 ldr r3, [r2, #48] <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 300210b0: e5921108 ldr r1, [r2, #264] <== NOT EXECUTED if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 300210b4: e1140003 tst r4, r3 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 300210b8: e1a00002 mov r0, r2 <== NOT EXECUTED api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 300210bc: 1a000046 bne 300211dc <== NOT EXECUTED 300210c0: e59130c4 ldr r3, [r1, #196] <== NOT EXECUTED 300210c4: e1d43003 bics r3, r4, r3 <== NOT EXECUTED 300210c8: 1a000043 bne 300211dc <== 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 ) { 300210cc: 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 ) ; 300210d0: e152000c cmp r2, ip <== NOT EXECUTED 300210d4: 1afffff4 bne 300210ac <== NOT EXECUTED 300210d8: e28ee00c add lr, lr, #12 ; 0xc */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 300210dc: e15e0006 cmp lr, r6 300210e0: 1affffe4 bne 30021078 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 300210e4: e59f31d8 ldr r3, [pc, #472] ; 300212c4 300210e8: e59f71d8 ldr r7, [pc, #472] ; 300212c8 300210ec: e5d32000 ldrb r2, [r3] 300210f0: e3a0a000 mov sl, #0 ; 0x0 300210f4: e2822001 add r2, r2, #1 ; 0x1 the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 300210f8: e5973008 ldr r3, [r7, #8] 300210fc: e3530000 cmp r3, #0 ; 0x0 30021100: 0a000054 beq 30021258 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 30021104: 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 ) 30021108: e3530000 cmp r3, #0 ; 0x0 3002110c: 0a000051 beq 30021258 continue; maximum = the_info->maximum; 30021110: e1d361b0 ldrh r6, [r3, #16] object_table = the_info->local_table; 30021114: e593001c ldr r0, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { 30021118: e3560000 cmp r6, #0 ; 0x0 3002111c: 0a00004d beq 30021258 30021120: e3a0c001 mov ip, #1 ; 0x1 the_thread = (Thread_Control *) object_table[ index ]; 30021124: e790110c ldr r1, [r0, ip, lsl #2] if ( !the_thread ) 30021128: e3510000 cmp r1, #0 ; 0x0 3002112c: 0a000018 beq 30021194 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 30021130: e591e014 ldr lr, [r1, #20] 30021134: e15e0002 cmp lr, r2 30021138: 8a000015 bhi 30021194 /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 3002113c: e5913108 ldr r3, [r1, #264] if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 30021140: e3530000 cmp r3, #0 ; 0x0 30021144: 0a000012 beq 30021194 30021148: e59330c4 ldr r3, [r3, #196] 3002114c: e1d43003 bics r3, r4, r3 30021150: 0a00000f beq 30021194 * 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 ) { 30021154: e15e0002 cmp lr, r2 30021158: 3a000005 bcc 30021174 * 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 ) ) 3002115c: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED 30021160: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30021164: 0a00000a beq 30021194 <== 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 ) ) { 30021168: e5918010 ldr r8, [r1, #16] <== NOT EXECUTED 3002116c: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 30021170: 1a00003a bne 30021260 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 30021174: e28cc001 add ip, ip, #1 ; 0x1 30021178: e156000c cmp r6, ip * 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 ) { 3002117c: e1a0a001 mov sl, r1 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 30021180: 3a000007 bcc 300211a4 the_thread = (Thread_Control *) object_table[ index ]; 30021184: e790110c ldr r1, [r0, ip, lsl #2] continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 30021188: e1a0200e mov r2, lr the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 3002118c: e3510000 cmp r1, #0 ; 0x0 30021190: 1affffe6 bne 30021130 * 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 ) { 30021194: e1a0e002 mov lr, r2 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 30021198: e28cc001 add ip, ip, #1 ; 0x1 3002119c: e156000c cmp r6, ip 300211a0: 2afffff7 bcs 30021184 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 300211a4: e59f3120 ldr r3, [pc, #288] ; 300212cc continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 300211a8: e2877004 add r7, r7, #4 ; 0x4 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 300211ac: e1570003 cmp r7, r3 300211b0: 0a000006 beq 300211d0 300211b4: e1a0200e mov r2, lr 300211b8: eaffffce b 300210f8 * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 300211bc: eb0000e1 bl 30021548 300211c0: e1a01005 mov r1, r5 300211c4: eb0000a1 bl 30021450 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 300211c8: e28dd00c add sp, sp, #12 ; 0xc 300211cc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 300211d0: e35a0000 cmp sl, #0 ; 0x0 300211d4: 0a000007 beq 300211f8 300211d8: e1a0000a mov r0, sl * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 300211dc: e3a03001 mov r3, #1 ; 0x1 300211e0: 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 ) ) { 300211e4: e1a01005 mov r1, r5 300211e8: e1a0200d mov r2, sp 300211ec: eb00004c bl 30021324 <_POSIX_signals_Unblock_thread> 300211f0: e3500000 cmp r0, #0 ; 0x0 300211f4: 1a000014 bne 3002124c /* * 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 ); 300211f8: e1a00004 mov r0, r4 300211fc: eb000035 bl 300212d8 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 30021200: e59f20ac ldr r2, [pc, #172] ; 300212b4 30021204: e06b5009 rsb r5, fp, r9 30021208: e7923005 ldr r3, [r2, r5] 3002120c: e3530002 cmp r3, #2 ; 0x2 30021210: 1a00000a bne 30021240 psiginfo = (POSIX_signals_Siginfo_node *) 30021214: e59f00b4 ldr r0, [pc, #180] ; 300212d0 30021218: ebffa754 bl 3000af70 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 3002121c: e250e000 subs lr, r0, #0 ; 0x0 30021220: 0a00001e beq 300212a0 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 30021224: e28e3008 add r3, lr, #8 ; 0x8 30021228: e89d0007 ldm sp, {r0, r1, r2} 3002122c: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 30021230: e59f009c ldr r0, [pc, #156] ; 300212d4 30021234: e1a0100e mov r1, lr 30021238: e0800005 add r0, r0, r5 3002123c: ebffa740 bl 3000af44 <_Chain_Append> } _Thread_Enable_dispatch(); 30021240: ebfface4 bl 3000c5d8 <_Thread_Enable_dispatch> 30021244: e3a00000 mov r0, #0 ; 0x0 30021248: eaffffde b 300211c8 * Returns TRUE if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); 3002124c: ebfface1 bl 3000c5d8 <_Thread_Enable_dispatch> 30021250: e3a00000 mov r0, #0 ; 0x0 30021254: eaffffdb b 300211c8 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 30021258: e1a0e002 mov lr, r2 3002125c: eaffffd0 b 300211a4 * 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 ) 30021260: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED 30021264: 1affffca bne 30021194 <== 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 ) { 30021268: e3180201 tst r8, #268435456 ; 0x10000000 <== NOT EXECUTED 3002126c: 1affffc0 bne 30021174 <== NOT EXECUTED 30021270: e1a0e002 mov lr, r2 <== NOT EXECUTED 30021274: eaffffc7 b 30021198 <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 30021278: ebffd331 bl 30015f44 <__errno> 3002127c: e3a03003 mov r3, #3 ; 0x3 30021280: e5803000 str r3, [r0] 30021284: e3e00000 mvn r0, #0 ; 0x0 30021288: eaffffce b 300211c8 if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 3002128c: ebffd32c bl 30015f44 <__errno> 30021290: e3a03016 mov r3, #22 ; 0x16 30021294: e5803000 str r3, [r0] 30021298: e3e00000 mvn r0, #0 ; 0x0 3002129c: eaffffc9 b 300211c8 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); 300212a0: ebffd327 bl 30015f44 <__errno> <== NOT EXECUTED 300212a4: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED 300212a8: e5803000 str r3, [r0] <== NOT EXECUTED 300212ac: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300212b0: eaffffc4 b 300211c8 <== NOT EXECUTED 300212b4: 3002780c .word 0x3002780c 300212b8: 3002724c .word 0x3002724c 300212bc: 30027304 .word 0x30027304 300212c0: 30027998 .word 0x30027998 300212c4: 300252bc .word 0x300252bc 300212c8: 30027208 .word 0x30027208 300212cc: 30027214 .word 0x30027214 300212d0: 3002798c .word 0x3002798c 300212d4: 300279dc .word 0x300279dc 3001f1ac : int link( const char *existing, const char *new ) { 3001f1ac: e92d4070 push {r4, r5, r6, lr} 3001f1b0: e24dd024 sub sp, sp, #36 ; 0x24 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true ); 3001f1b4: e28d6010 add r6, sp, #16 ; 0x10 int link( const char *existing, const char *new ) { 3001f1b8: e1a05001 mov r5, r1 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true ); 3001f1bc: e1a02006 mov r2, r6 3001f1c0: e3a01000 mov r1, #0 ; 0x0 3001f1c4: e3a03001 mov r3, #1 ; 0x1 3001f1c8: ebff930a bl 30003df8 if ( result != 0 ) 3001f1cc: e3500000 cmp r0, #0 ; 0x0 3001f1d0: 1a00004d bne 3001f30c /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 3001f1d4: e5d53000 ldrb r3, [r5] 3001f1d8: e353005c cmp r3, #92 ; 0x5c 3001f1dc: 1353002f cmpne r3, #47 ; 0x2f 3001f1e0: 13a02000 movne r2, #0 ; 0x0 3001f1e4: 03a02001 moveq r2, #1 ; 0x1 3001f1e8: 1a000032 bne 3001f2b8 3001f1ec: e59f31fc ldr r3, [pc, #508] ; 3001f3f0 3001f1f0: e1a0400d mov r4, sp 3001f1f4: e593c000 ldr ip, [r3] 3001f1f8: e3a0e001 mov lr, #1 ; 0x1 3001f1fc: e28cc014 add ip, ip, #20 ; 0x14 3001f200: e89c000f ldm ip, {r0, r1, r2, r3} 3001f204: e88d000f stm sp, {r0, r1, r2, r3} if ( !parent_loc.ops->evalformake_h ) { 3001f208: e59d3008 ldr r3, [sp, #8] 3001f20c: e5933004 ldr r3, [r3, #4] 3001f210: e3530000 cmp r3, #0 ; 0x0 3001f214: 0a000031 beq 3001f2e0 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 ); 3001f218: e085000e add r0, r5, lr 3001f21c: e1a0100d mov r1, sp 3001f220: e28d2020 add r2, sp, #32 ; 0x20 3001f224: e1a0e00f mov lr, pc 3001f228: e12fff13 bx r3 if ( result != 0 ) { 3001f22c: e2505000 subs r5, r0, #0 ; 0x0 3001f230: 1a00004c bne 3001f368 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 3001f234: e59d201c ldr r2, [sp, #28] 3001f238: e59d300c ldr r3, [sp, #12] 3001f23c: e1530002 cmp r3, r2 3001f240: 1a000033 bne 3001f314 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 3001f244: e59d2008 ldr r2, [sp, #8] 3001f248: e5923008 ldr r3, [r2, #8] 3001f24c: e3530000 cmp r3, #0 ; 0x0 3001f250: 0a000050 beq 3001f398 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 ); 3001f254: e1a00006 mov r0, r6 3001f258: e1a0100d mov r1, sp 3001f25c: e59d2020 ldr r2, [sp, #32] 3001f260: e1a0e00f mov lr, pc 3001f264: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 3001f268: 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 ); 3001f26c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 3001f270: e3530000 cmp r3, #0 ; 0x0 3001f274: 0a000004 beq 3001f28c 3001f278: e593301c ldr r3, [r3, #28] 3001f27c: e3530000 cmp r3, #0 ; 0x0 3001f280: 11a00006 movne r0, r6 3001f284: 11a0e00f movne lr, pc 3001f288: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 3001f28c: e59d3008 ldr r3, [sp, #8] 3001f290: e3530000 cmp r3, #0 ; 0x0 3001f294: 0a000004 beq 3001f2ac 3001f298: e593301c ldr r3, [r3, #28] 3001f29c: e3530000 cmp r3, #0 ; 0x0 3001f2a0: 11a0000d movne r0, sp 3001f2a4: 11a0e00f movne lr, pc 3001f2a8: 112fff13 bxne r3 return result; } 3001f2ac: e1a00005 mov r0, r5 3001f2b0: e28dd024 add sp, sp, #36 ; 0x24 3001f2b4: e8bd8070 pop {r4, r5, r6, pc} /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 3001f2b8: e3530000 cmp r3, #0 ; 0x0 3001f2bc: 0affffca beq 3001f1ec 3001f2c0: e59f3128 ldr r3, [pc, #296] ; 3001f3f0 3001f2c4: e1a0e002 mov lr, r2 3001f2c8: e593c000 ldr ip, [r3] 3001f2cc: e1a0400d mov r4, sp 3001f2d0: e28cc004 add ip, ip, #4 ; 0x4 3001f2d4: e89c000f ldm ip, {r0, r1, r2, r3} 3001f2d8: e88d000f stm sp, {r0, r1, r2, r3} 3001f2dc: eaffffc9 b 3001f208 if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 3001f2e0: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED 3001f2e4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f2e8: 0a000004 beq 3001f300 <== NOT EXECUTED 3001f2ec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001f2f0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f2f4: 11a00006 movne r0, r6 <== NOT EXECUTED 3001f2f8: 11a0e00f movne lr, pc <== NOT EXECUTED 3001f2fc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001f300: eb0039b9 bl 3002d9ec <__errno> <== NOT EXECUTED 3001f304: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001f308: e5803000 str r3, [r0] <== NOT EXECUTED 3001f30c: e3e05000 mvn r5, #0 ; 0x0 3001f310: eaffffe5 b 3001f2ac * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 3001f314: e59d3018 ldr r3, [sp, #24] 3001f318: e3530000 cmp r3, #0 ; 0x0 3001f31c: 0a000004 beq 3001f334 3001f320: e593301c ldr r3, [r3, #28] 3001f324: e3530000 cmp r3, #0 ; 0x0 3001f328: 11a00006 movne r0, r6 3001f32c: 11a0e00f movne lr, pc 3001f330: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 3001f334: e59d3008 ldr r3, [sp, #8] 3001f338: e3530000 cmp r3, #0 ; 0x0 3001f33c: 0a000004 beq 3001f354 3001f340: e593301c ldr r3, [r3, #28] 3001f344: e3530000 cmp r3, #0 ; 0x0 3001f348: 11a0000d movne r0, sp 3001f34c: 11a0e00f movne lr, pc 3001f350: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 3001f354: eb0039a4 bl 3002d9ec <__errno> 3001f358: e3a03012 mov r3, #18 ; 0x12 3001f35c: e5803000 str r3, [r0] 3001f360: e3e05000 mvn r5, #0 ; 0x0 3001f364: eaffffd0 b 3001f2ac rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 3001f368: e59d3018 ldr r3, [sp, #24] 3001f36c: e3530000 cmp r3, #0 ; 0x0 3001f370: 0a000004 beq 3001f388 3001f374: e593301c ldr r3, [r3, #28] 3001f378: e3530000 cmp r3, #0 ; 0x0 3001f37c: 11a00006 movne r0, r6 3001f380: 11a0e00f movne lr, pc 3001f384: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 3001f388: eb003997 bl 3002d9ec <__errno> 3001f38c: e5805000 str r5, [r0] 3001f390: e3e05000 mvn r5, #0 ; 0x0 3001f394: eaffffc4 b 3001f2ac rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 3001f398: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED 3001f39c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f3a0: 0a000006 beq 3001f3c0 <== NOT EXECUTED 3001f3a4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001f3a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f3ac: 0a000003 beq 3001f3c0 <== NOT EXECUTED 3001f3b0: e1a00006 mov r0, r6 <== NOT EXECUTED 3001f3b4: e1a0e00f mov lr, pc <== NOT EXECUTED 3001f3b8: e12fff13 bx r3 <== NOT EXECUTED 3001f3bc: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 3001f3c0: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3001f3c4: 0a000004 beq 3001f3dc <== NOT EXECUTED 3001f3c8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3001f3cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f3d0: 11a0000d movne r0, sp <== NOT EXECUTED 3001f3d4: 11a0e00f movne lr, pc <== NOT EXECUTED 3001f3d8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001f3dc: eb003982 bl 3002d9ec <__errno> <== NOT EXECUTED 3001f3e0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001f3e4: e5803000 str r3, [r0] <== NOT EXECUTED 3001f3e8: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 3001f3ec: eaffffae b 3001f2ac <== NOT EXECUTED 3001f3f0: 30045edc .word 0x30045edc 300145c0 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 300145c0: e59f30e4 ldr r3, [pc, #228] ; 300146ac off_t lseek( int fd, off_t offset, int whence ) { 300145c4: e1a0c000 mov ip, r0 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 300145c8: e5930000 ldr r0, [r3] off_t lseek( int fd, off_t offset, int whence ) { 300145cc: e92d4030 push {r4, r5, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 300145d0: e15c0000 cmp ip, r0 off_t lseek( int fd, off_t offset, int whence ) { 300145d4: e1a0e001 mov lr, r1 300145d8: e1a00002 mov r0, r2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 300145dc: 2a000028 bcs 30014684 iop = rtems_libio_iop( fd ); 300145e0: e59f20c8 ldr r2, [pc, #200] ; 300146b0 300145e4: e1a0320c lsl r3, ip, #4 300145e8: e043310c sub r3, r3, ip, lsl #2 300145ec: e5921000 ldr r1, [r2] 300145f0: e083300c add r3, r3, ip 300145f4: e1a03103 lsl r3, r3, #2 300145f8: e0814003 add r4, r1, r3 rtems_libio_check_is_open(iop); 300145fc: e594200c ldr r2, [r4, #12] 30014600: e3120c01 tst r2, #256 ; 0x100 30014604: 0a00001e beq 30014684 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 30014608: e594c030 ldr ip, [r4, #48] 3001460c: e59c3014 ldr r3, [ip, #20] 30014610: e3530000 cmp r3, #0 ; 0x0 30014614: 0a00001f beq 30014698 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 30014618: e3500001 cmp r0, #1 ; 0x1 /* * Now process the lseek(). */ old_offset = iop->offset; 3001461c: e5945008 ldr r5, [r4, #8] switch ( whence ) { 30014620: 0a000014 beq 30014678 30014624: e3500002 cmp r0, #2 ; 0x2 30014628: 0a000007 beq 3001464c 3001462c: e3500000 cmp r0, #0 ; 0x0 case SEEK_SET: iop->offset = offset; 30014630: 0584e008 streq lr, [r4, #8] /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 30014634: 0a000007 beq 30014658 case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 30014638: ebffde2a bl 3000bee8 <__errno> 3001463c: e3a03016 mov r3, #22 ; 0x16 30014640: e5803000 str r3, [r0] 30014644: e3e00000 mvn r0, #0 ; 0x0 30014648: e8bd8030 pop {r4, r5, pc} case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 3001464c: e5943004 ldr r3, [r4, #4] 30014650: e08e3003 add r3, lr, r3 30014654: e5843008 str r3, [r4, #8] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 30014658: e1a02000 mov r2, r0 3001465c: e1a0100e mov r1, lr 30014660: e1a00004 mov r0, r4 30014664: e1a0e00f mov lr, pc 30014668: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 3001466c: e3700001 cmn r0, #1 ; 0x1 iop->offset = old_offset; 30014670: 05845008 streq r5, [r4, #8] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 30014674: e8bd8030 pop {r4, r5, pc} case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 30014678: e08e3005 add r3, lr, r5 3001467c: e5843008 str r3, [r4, #8] 30014680: eafffff4 b 30014658 off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 30014684: ebffde17 bl 3000bee8 <__errno> <== NOT EXECUTED 30014688: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3001468c: e5803000 str r3, [r0] <== NOT EXECUTED 30014690: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30014694: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 30014698: ebffde12 bl 3000bee8 <__errno> <== NOT EXECUTED 3001469c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300146a0: e5803000 str r3, [r0] <== NOT EXECUTED 300146a4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300146a8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 300146ac: 30016058 .word 0x30016058 300146b0: 30016dcc .word 0x30016dcc 3001f504 : int _STAT_NAME( const char *path, struct stat *buf ) { 3001f504: e92d4030 push {r4, r5, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 3001f508: e2514000 subs r4, r1, #0 ; 0x0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 3001f50c: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 3001f510: 0a00002c beq 3001f5c8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 3001f514: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3001f518: e1a0200d mov r2, sp <== NOT EXECUTED 3001f51c: e1a03001 mov r3, r1 <== NOT EXECUTED 3001f520: ebff9234 bl 30003df8 <== NOT EXECUTED if ( status != 0 ) 3001f524: 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 ); 3001f528: e1a0500d mov r5, sp <== NOT EXECUTED if ( status != 0 ) 3001f52c: 1a000023 bne 3001f5c0 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 3001f530: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 3001f534: e5932018 ldr r2, [r3, #24] <== NOT EXECUTED 3001f538: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3001f53c: 0a000014 beq 3001f594 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 3001f540: e1a01000 mov r1, r0 <== NOT EXECUTED 3001f544: e3a0204c mov r2, #76 ; 0x4c <== NOT EXECUTED 3001f548: e1a00004 mov r0, r4 <== NOT EXECUTED 3001f54c: eb00432e bl 3003020c <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 3001f550: e1a01004 mov r1, r4 <== NOT EXECUTED 3001f554: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 3001f558: e1a0000d mov r0, sp <== NOT EXECUTED 3001f55c: e1a0e00f mov lr, pc <== NOT EXECUTED 3001f560: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 3001f564: 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 ); 3001f568: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 3001f56c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f570: 0a000004 beq 3001f588 <== NOT EXECUTED 3001f574: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001f578: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f57c: 11a0000d movne r0, sp <== NOT EXECUTED 3001f580: 11a0e00f movne lr, pc <== NOT EXECUTED 3001f584: 112fff13 bxne r3 <== NOT EXECUTED return status; } 3001f588: e1a00004 mov r0, r4 <== NOT EXECUTED 3001f58c: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 3001f590: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 3001f594: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3001f598: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f59c: 0a000004 beq 3001f5b4 <== NOT EXECUTED 3001f5a0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001f5a4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001f5a8: 11a0000d movne r0, sp <== NOT EXECUTED 3001f5ac: 11a0e00f movne lr, pc <== NOT EXECUTED 3001f5b0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001f5b4: eb00390c bl 3002d9ec <__errno> <== NOT EXECUTED 3001f5b8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001f5bc: e5803000 str r3, [r0] <== NOT EXECUTED 3001f5c0: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 3001f5c4: eaffffef b 3001f588 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 3001f5c8: eb003907 bl 3002d9ec <__errno> <== NOT EXECUTED 3001f5cc: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 3001f5d0: e5803000 str r3, [r0] <== NOT EXECUTED 3001f5d4: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 3001f5d8: eaffffea b 3001f588 <== NOT EXECUTED 30009568 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 30009568: e59f20d0 ldr r2, [pc, #208] ; 30009640 3000956c: e92d4070 push {r4, r5, r6, lr} 30009570: e5923004 ldr r3, [r2, #4] 30009574: e1a06000 mov r6, r0 30009578: e2833001 add r3, r3, #1 ; 0x1 3000957c: e5823004 str r3, [r2, #4] /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 30009580: ebffffef bl 30009544 /* * Validate the parameters */ if ( !size ) 30009584: e3560000 cmp r6, #0 ; 0x0 30009588: 0a00001c beq 30009600 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 3000958c: e59f30b0 ldr r3, [pc, #176] ; 30009644 30009590: e5932000 ldr r2, [r3] 30009594: e3520003 cmp r2, #3 ; 0x3 30009598: 0a000015 beq 300095f4 * 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 ); 3000959c: e59f00a4 ldr r0, [pc, #164] ; 30009648 300095a0: e1a01006 mov r1, r6 300095a4: eb000559 bl 3000ab10 <_Protected_heap_Allocate> if ( !return_this ) { 300095a8: e2504000 subs r4, r0, #0 ; 0x0 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 300095ac: 11a05004 movne r5, r4 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { 300095b0: 0a000015 beq 3000960c } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 300095b4: e59f3090 ldr r3, [pc, #144] ; 3000964c 300095b8: e5933000 ldr r3, [r3] 300095bc: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_dirty_helper)( return_this, size ); 300095c0: 11a01006 movne r1, r6 300095c4: 11a00005 movne r0, r5 300095c8: 11a0e00f movne lr, pc 300095cc: 112fff13 bxne r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 300095d0: e59f3078 ldr r3, [pc, #120] ; 30009650 300095d4: e5933000 ldr r3, [r3] 300095d8: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 300095dc: 11a00005 movne r0, r5 300095e0: 11a0e00f movne lr, pc 300095e4: 1593f004 ldrne pc, [r3, #4] 300095e8: e1a04005 mov r4, r5 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 300095ec: e1a00004 mov r0, r4 300095f0: e8bd8070 pop {r4, r5, r6, pc} return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 300095f4: ebffffbb bl 300094e8 300095f8: e3500000 cmp r0, #0 ; 0x0 300095fc: 1affffe6 bne 3000959c /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 30009600: e3a04000 mov r4, #0 ; 0x0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 30009604: e1a00004 mov r0, r4 30009608: e8bd8070 pop {r4, r5, r6, pc} */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 3000960c: e59f3040 ldr r3, [pc, #64] ; 30009654 30009610: e5933000 ldr r3, [r3] 30009614: e3530000 cmp r3, #0 ; 0x0 30009618: 0a000004 beq 30009630 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 3000961c: e1a00006 mov r0, r6 <== NOT EXECUTED 30009620: e1a0e00f mov lr, pc <== NOT EXECUTED 30009624: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 30009628: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 3000962c: 1affffe0 bne 300095b4 <== NOT EXECUTED errno = ENOMEM; 30009630: eb000a2c bl 3000bee8 <__errno> 30009634: e3a0300c mov r3, #12 ; 0xc 30009638: e5803000 str r3, [r0] 3000963c: eaffffea b 300095ec 30009640: 30016e30 .word 0x30016e30 30009644: 300170f4 .word 0x300170f4 30009648: 30016dd8 .word 0x30016dd8 3000964c: 30016c04 .word 0x30016c04 30009650: 30016bfc .word 0x30016bfc 30009654: 30016c00 .word 0x30016c00 30009534 : } void malloc_deferred_free( void *pointer ) { 30009534: 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 ); 30009538: e59f0000 ldr r0, [pc, #0] ; 30009540 <== NOT EXECUTED 3000953c: eaffef4a b 3000526c <_Chain_Append> <== NOT EXECUTED 30009540: 30017488 .word 0x30017488 30009544 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 30009544: e52de004 push {lr} ; (str lr, [sp, #-4]!) 30009548: ea000000 b 30009550 /* * 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); 3000954c: ebfffe95 bl 30008fa8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 30009550: e59f000c ldr r0, [pc, #12] ; 30009564 30009554: eb00041b bl 3000a5c8 <_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) 30009558: e3500000 cmp r0, #0 ; 0x0 3000955c: 1afffffa bne 3000954c free(to_be_freed); } 30009560: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30009564: 30017488 .word 0x30017488 30024bc0 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 30024bc0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( block_table ); 30024bc4: e250a000 subs sl, r0, #0 ; 0x0 void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 30024bc8: e1a07001 mov r7, r1 /* * Perform internal consistency checks */ assert( block_table ); 30024bcc: 0a000014 beq 30024c24 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 30024bdc: e3a05000 mov r5, #0 ; 0x0 30024be0: e1a04005 mov r4, r5 if ( b[i] ) { memfile_free_block( b[i] ); b[i] = 0; 30024be4: e1a08005 mov r8, r5 */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 30024bf4: ebffff38 bl 300248dc b[i] = 0; 30024bf8: e7868004 str r8, [r6, r4] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 30024c0c: e59a6000 ldr r6, [sl] /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 30024c10: e1a00006 mov r0, r6 30024c14: ebffff30 bl 300248dc *block_table = 0; 30024c18: e3a03000 mov r3, #0 ; 0x0 30024c1c: e58a3000 str r3, [sl] } 30024c20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Perform internal consistency checks */ assert( block_table ); 30024c24: e59f000c ldr r0, [pc, #12] ; 30024c38 <== NOT EXECUTED 30024c28: e59f100c ldr r1, [pc, #12] ; 30024c3c <== NOT EXECUTED 30024c2c: e59f200c ldr r2, [pc, #12] ; 30024c40 <== NOT EXECUTED 30024c30: e59f300c ldr r3, [pc, #12] ; 30024c44 <== NOT EXECUTED 30024c34: ebffe2bc bl 3001d72c <__assert_func> <== NOT EXECUTED 30024c38: 30043450 .word 0x30043450 30024c3c: 000001b1 .word 0x000001b1 30024c40: 3003fe50 .word 0x3003fe50 30024c44: 300434cc .word 0x300434cc 30025068 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 30025068: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 3002506c: e590402c ldr r4, [r0, #44] int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 30025070: 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 ) 30025074: e5943050 ldr r3, [r4, #80] 30025078: e1530001 cmp r3, r1 3002507c: ba000009 blt 300250a8 * 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; 30025080: e5841050 str r1, [r4, #80] iop->size = the_jnode->info.file.size; 30025084: e5801004 str r1, [r0, #4] IMFS_update_atime( the_jnode ); 30025088: e1a0000d mov r0, sp 3002508c: e3a01000 mov r1, #0 ; 0x0 30025090: ebff7bd5 bl 30003fec 30025094: e59d3000 ldr r3, [sp] 30025098: e3a00000 mov r0, #0 ; 0x0 3002509c: e5843040 str r3, [r4, #64] return 0; } 300250a0: e28dd008 add sp, sp, #8 ; 0x8 300250a4: e8bd8010 pop {r4, pc} * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) return IMFS_memfile_extend( the_jnode, length ); 300250a8: e1a00004 mov r0, r4 <== NOT EXECUTED 300250ac: ebffffa0 bl 30024f34 <== NOT EXECUTED 300250b0: eafffffa b 300250a0 <== NOT EXECUTED 300250b4 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 300250b4: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 300250b8: e590402c ldr r4, [r0, #44] off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 300250bc: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 300250c0: e594304c ldr r3, [r4, #76] 300250c4: e3530006 cmp r3, #6 ; 0x6 300250c8: 1a000005 bne 300250e4 if (iop->offset > the_jnode->info.linearfile.size) 300250cc: e5943050 ldr r3, [r4, #80] <== NOT EXECUTED 300250d0: e5900008 ldr r0, [r0, #8] <== NOT EXECUTED 300250d4: e1500003 cmp r0, r3 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 300250d8: c5853008 strgt r3, [r5, #8] <== NOT EXECUTED 300250dc: c1a00003 movgt r0, r3 <== NOT EXECUTED 300250e0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 300250e4: e1a00004 mov r0, r4 300250e8: e5951008 ldr r1, [r5, #8] 300250ec: ebffff90 bl 30024f34 300250f0: e3500000 cmp r0, #0 ; 0x0 300250f4: 1a000003 bne 30025108 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 300250f8: e5943050 ldr r3, [r4, #80] 300250fc: e5950008 ldr r0, [r5, #8] 30025100: e5853004 str r3, [r5, #4] } return iop->offset; } 30025104: e8bd8030 pop {r4, r5, pc} if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 30025108: eb002237 bl 3002d9ec <__errno> <== NOT EXECUTED 3002510c: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 30025110: e5803000 str r3, [r0] <== NOT EXECUTED 30025114: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30025118: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30025394 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 30025394: e590200c ldr r2, [r0, #12] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 30025398: 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)) 3002539c: e3120f81 tst r2, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 300253a0: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 300253a4: e590402c ldr r4, [r0, #44] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 300253a8: 0a000002 beq 300253b8 300253ac: e594304c ldr r3, [r4, #76] 300253b0: e3530006 cmp r3, #6 ; 0x6 300253b4: 0a000006 beq 300253d4 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) 300253b8: e3120c02 tst r2, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 300253bc: 15943050 ldrne r3, [r4, #80] iop->size = the_jnode->info.file.size; 300253c0: e3a00000 mov r0, #0 ; 0x0 if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; 300253c4: 15853008 strne r3, [r5, #8] iop->size = the_jnode->info.file.size; 300253c8: e5943050 ldr r3, [r4, #80] 300253cc: e5853004 str r3, [r5, #4] return 0; } 300253d0: e8bd8030 pop {r4, r5, pc} /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 300253d4: 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; 300253d8: 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; 300253dc: e2433001 sub r3, r3, #1 ; 0x1 <== 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) 300253e0: 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; 300253e4: e5942054 ldr r2, [r4, #84] <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 300253e8: e584304c str r3, [r4, #76] <== NOT EXECUTED the_jnode->info.file.size = 0; 300253ec: e5841050 str r1, [r4, #80] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 300253f0: e5841058 str r1, [r4, #88] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 300253f4: 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; 300253f8: e5841054 str r1, [r4, #84] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 300253fc: 0595200c ldreq r2, [r5, #12] <== NOT EXECUTED 30025400: 0affffec beq 300253b8 <== NOT EXECUTED 30025404: e1a03000 mov r3, r0 <== NOT EXECUTED 30025408: e1a00004 mov r0, r4 <== NOT EXECUTED 3002540c: ebffff42 bl 3002511c <== NOT EXECUTED 30025410: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED 30025414: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED 30025418: e595200c ldr r2, [r5, #12] <== NOT EXECUTED 3002541c: eaffffe5 b 300253b8 <== NOT EXECUTED 30001668 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 30001668: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000166c: e1a05001 mov r5, 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) ) ) 30001670: e2111a0f ands r1, r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 30001674: e24dd018 sub sp, sp, #24 ; 0x18 30001678: e1a06000 mov r6, r0 3000167c: e1a07002 mov r7, r2 30001680: 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) ) ) 30001684: 0a000045 beq 300017a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) 30001688: e3510a01 cmp r1, #4096 ; 0x1000 3000168c: 0a000032 beq 3000175c rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 30001690: e5d03000 ldrb r3, [r0] 30001694: e353005c cmp r3, #92 ; 0x5c 30001698: 1353002f cmpne r3, #47 ; 0x2f 3000169c: 13a02000 movne r2, #0 ; 0x0 300016a0: 03a02001 moveq r2, #1 ; 0x1 300016a4: 1a000033 bne 30001778 300016a8: e59f3104 ldr r3, [pc, #260] ; 300017b4 300016ac: e28d4004 add r4, sp, #4 ; 0x4 300016b0: e593c000 ldr ip, [r3] 300016b4: e3a0e001 mov lr, #1 ; 0x1 300016b8: e28cc014 add ip, ip, #20 ; 0x14 300016bc: e89c000f ldm ip, {r0, r1, r2, r3} 300016c0: e884000f stm r4, {r0, r1, r2, r3} if ( !temp_loc.ops->evalformake_h ) { 300016c4: e59d300c ldr r3, [sp, #12] 300016c8: e5933004 ldr r3, [r3, #4] 300016cc: e3530000 cmp r3, #0 ; 0x0 300016d0: 0a000021 beq 3000175c rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 300016d4: e086000e add r0, r6, lr 300016d8: e1a01004 mov r1, r4 300016dc: e28d2014 add r2, sp, #20 ; 0x14 300016e0: e1a0e00f mov lr, pc 300016e4: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 300016e8: e3500000 cmp r0, #0 ; 0x0 300016ec: 1a00001d bne 30001768 return -1; if ( !temp_loc.ops->mknod_h ) { 300016f0: e59d300c ldr r3, [sp, #12] 300016f4: e593c014 ldr ip, [r3, #20] 300016f8: e35c0000 cmp ip, #0 ; 0x0 300016fc: 0a000011 beq 30001748 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 ); 30001700: e1a01005 mov r1, r5 30001704: e1a03008 mov r3, r8 30001708: e58d4000 str r4, [sp] 3000170c: e59d0014 ldr r0, [sp, #20] 30001710: e1a02007 mov r2, r7 30001714: e1a0e00f mov lr, pc 30001718: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 3000171c: 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 ); 30001720: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 30001724: e3530000 cmp r3, #0 ; 0x0 30001728: 0a00000f beq 3000176c 3000172c: e593301c ldr r3, [r3, #28] 30001730: e3530000 cmp r3, #0 ; 0x0 30001734: 0a00000c beq 3000176c 30001738: e1a00004 mov r0, r4 3000173c: e1a0e00f mov lr, pc 30001740: e12fff13 bx r3 30001744: ea000008 b 3000176c ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 30001748: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000174c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001750: 11a00004 movne r0, r4 <== NOT EXECUTED 30001754: 11a0e00f movne lr, pc <== NOT EXECUTED 30001758: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000175c: eb0029e1 bl 3000bee8 <__errno> 30001760: e3a03086 mov r3, #134 ; 0x86 30001764: e5803000 str r3, [r0] 30001768: e3e05000 mvn r5, #0 ; 0x0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 3000176c: e1a00005 mov r0, r5 30001770: e28dd018 add sp, sp, #24 ; 0x18 30001774: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 30001778: e3530000 cmp r3, #0 ; 0x0 3000177c: 0affffc9 beq 300016a8 30001780: e59f302c ldr r3, [pc, #44] ; 300017b4 30001784: e28d4004 add r4, sp, #4 ; 0x4 30001788: e593c000 ldr ip, [r3] 3000178c: e1a0e002 mov lr, r2 30001790: e28cc004 add ip, ip, #4 ; 0x4 30001794: e89c000f ldm ip, {r0, r1, r2, r3} 30001798: e884000f stm r4, {r0, r1, r2, r3} 3000179c: eaffffc8 b 300016c4 int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 300017a0: eb0029d0 bl 3000bee8 <__errno> <== NOT EXECUTED 300017a4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300017a8: e5803000 str r3, [r0] <== NOT EXECUTED 300017ac: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 300017b0: eaffffed b 3000176c <== NOT EXECUTED 300017b4: 30016660 .word 0x30016660 30009684 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 30009684: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 30009688: e251a000 subs sl, r1, #0 ; 0x0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 3000968c: e24dd010 sub sp, sp, #16 ; 0x10 30009690: e1a09000 mov r9, r0 30009694: e1a07002 mov r7, r2 30009698: e1a05003 mov r5, r3 3000969c: e59d6030 ldr r6, [sp, #48] /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 300096a0: 0a000092 beq 300098f0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 300096a4: e3520001 cmp r2, #1 ; 0x1 300096a8: 8a000090 bhi 300098f0 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 300096ac: e59a4024 ldr r4, [sl, #36] 300096b0: e3540000 cmp r4, #0 ; 0x0 300096b4: 0a000032 beq 30009784 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 300096b8: e3530000 cmp r3, #0 ; 0x0 300096bc: 03a00064 moveq r0, #100 ; 0x64 300096c0: 0a000002 beq 300096d0 size += strlen( device ) + 1; 300096c4: e1a00003 mov r0, r3 <== NOT EXECUTED 300096c8: eb000f3c bl 3000d3c0 <== NOT EXECUTED 300096cc: e2800065 add r0, r0, #101 ; 0x65 <== NOT EXECUTED temp_mt_entry = malloc( size ); 300096d0: ebffffa4 bl 30009568 if ( !temp_mt_entry ) { 300096d4: e3500000 cmp r0, #0 ; 0x0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 300096d8: e1a04000 mov r4, r0 300096dc: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 300096e0: 0a000087 beq 30009904 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 300096e4: 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; 300096e8: e5807028 str r7, [r0, #40] if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 300096ec: 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; 300096f0: 05805060 streq r5, [r0, #96] return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 300096f4: 0a000004 beq 3000970c temp_mt_entry->dev = 300096f8: e2803064 add r3, r0, #100 ; 0x64 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 300096fc: e1a00003 mov r0, r3 <== NOT EXECUTED 30009700: e1a01005 mov r1, r5 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 30009704: e5843060 str r3, [r4, #96] <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 30009708: eb000efe bl 3000d308 <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 3000970c: e3560000 cmp r6, #0 ; 0x0 30009710: 0a000024 beq 300097a8 if ( rtems_filesystem_evaluate_path( 30009714: e1a00006 mov r0, r6 30009718: e3a01007 mov r1, #7 ; 0x7 3000971c: e1a0200d mov r2, sp 30009720: e3a03001 mov r3, #1 ; 0x1 30009724: ebffdf15 bl 30001380 30009728: e3700001 cmn r0, #1 ; 0x1 3000972c: e1a0500d mov r5, sp 30009730: 0a000017 beq 30009794 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 30009734: e59d3008 ldr r3, [sp, #8] 30009738: e5933010 ldr r3, [r3, #16] 3000973c: e3530000 cmp r3, #0 ; 0x0 30009740: 0a00005c beq 300098b8 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 30009744: e1a0000d mov r0, sp 30009748: e1a0e00f mov lr, pc 3000974c: e12fff13 bx r3 30009750: e3500001 cmp r0, #1 ; 0x1 30009754: 0a00002c beq 3000980c errno = ENOTDIR; 30009758: eb0009e2 bl 3000bee8 <__errno> 3000975c: e3a03014 mov r3, #20 ; 0x14 30009760: e5803000 str r3, [r0] return 0; cleanup_and_bail: free( temp_mt_entry ); 30009764: e1a00004 mov r0, r4 30009768: ebfffe0e bl 30008fa8 3000976c: e1a0500d mov r5, sp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 30009770: e5953008 ldr r3, [r5, #8] 30009774: e3530000 cmp r3, #0 ; 0x0 30009778: 1a000052 bne 300098c8 3000977c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30009780: ea000006 b 300097a0 <== NOT EXECUTED return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 30009784: eb0009d7 bl 3000bee8 <__errno> <== NOT EXECUTED 30009788: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000978c: e5803000 str r3, [r0] <== NOT EXECUTED 30009790: e1a08004 mov r8, r4 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 30009794: e1a00008 mov r0, r8 <== NOT EXECUTED 30009798: ebfffe02 bl 30008fa8 <== NOT EXECUTED 3000979c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 300097a0: e28dd010 add sp, sp, #16 ; 0x10 300097a4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * 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; 300097a8: e5846018 str r6, [r4, #24] temp_mt_entry->mt_fs_root.handlers = NULL; 300097ac: e584601c str r6, [r4, #28] temp_mt_entry->mt_fs_root.ops = NULL; 300097b0: e5846020 str r6, [r4, #32] temp_mt_entry->mt_point_node.node_access = NULL; 300097b4: e5846008 str r6, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 300097b8: e584600c str r6, [r4, #12] temp_mt_entry->mt_point_node.ops = NULL; 300097bc: e5846010 str r6, [r4, #16] temp_mt_entry->mt_point_node.mt_entry = NULL; 300097c0: e5846014 str r6, [r4, #20] 300097c4: e1a05006 mov r5, r6 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 300097c8: e1a00004 mov r0, r4 300097cc: e1a0e00f mov lr, pc 300097d0: e59af024 ldr pc, [sl, #36] 300097d4: e2506000 subs r6, r0, #0 ; 0x0 300097d8: 0a00002a beq 30009888 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 300097dc: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 300097e0: e5933028 ldr r3, [r3, #40] <== NOT EXECUTED 300097e4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 300097e8: 11a00004 movne r0, r4 <== NOT EXECUTED 300097ec: 11a0e00f movne lr, pc <== NOT EXECUTED 300097f0: 112fff13 bxne r3 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 300097f4: e1a00004 mov r0, r4 <== NOT EXECUTED 300097f8: ebfffdea bl 30008fa8 <== NOT EXECUTED if ( loc_to_free ) 300097fc: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30009800: 1affffda bne 30009770 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 30009804: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30009808: eaffffe4 b 300097a0 <== NOT EXECUTED /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 3000980c: e59f1104 ldr r1, [pc, #260] ; 30009918 30009810: e4912004 ldr r2, [r1], #4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 30009814: e1520001 cmp r2, r1 30009818: 0a000032 beq 300098e8 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 ) 3000981c: e59d0000 ldr r0, [sp] 30009820: e5923018 ldr r3, [r2, #24] 30009824: e1530000 cmp r3, r0 30009828: 1a000003 bne 3000983c 3000982c: ea00001d b 300098a8 <== NOT EXECUTED 30009830: e5923018 ldr r3, [r2, #24] 30009834: e1530000 cmp r3, r0 30009838: 0a00001a beq 300098a8 * 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 ) { 3000983c: 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 ); 30009840: e1520001 cmp r2, r1 30009844: 1afffff9 bne 30009830 * 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; 30009848: 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 ){ 3000984c: e593c020 ldr ip, [r3, #32] */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 30009850: e59d100c ldr r1, [sp, #12] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 30009854: e35c0000 cmp ip, #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; 30009858: e5840008 str r0, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; 3000985c: 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; 30009860: e5841014 str r1, [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; 30009864: 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 ){ 30009868: 0a000012 beq 300098b8 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 3000986c: e1a00004 mov r0, r4 30009870: e1a0e00f mov lr, pc 30009874: e12fff1c bx ip 30009878: e3500000 cmp r0, #0 ; 0x0 goto cleanup_and_bail; 3000987c: 01a0500d moveq r5, sp if ( !loc.ops->mount_h ){ errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 30009880: 0affffd0 beq 300097c8 30009884: eaffffb6 b 30009764 <== 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 ); 30009888: e59f0088 ldr r0, [pc, #136] ; 30009918 3000988c: e1a01004 mov r1, r4 30009890: ebffee75 bl 3000526c <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 30009894: e3590000 cmp r9, #0 ; 0x0 30009898: 01a00009 moveq r0, r9 *mt_entry = temp_mt_entry; 3000989c: 15894000 strne r4, [r9] 300098a0: 11a00006 movne r0, r6 300098a4: eaffffbd b 300097a0 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 300098a8: eb00098e bl 3000bee8 <__errno> 300098ac: e3a03010 mov r3, #16 ; 0x10 300098b0: e5803000 str r3, [r0] 300098b4: eaffffaa b 30009764 * 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; 300098b8: eb00098a bl 3000bee8 <__errno> <== NOT EXECUTED 300098bc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300098c0: e5803000 str r3, [r0] <== NOT EXECUTED 300098c4: eaffffa6 b 30009764 <== NOT EXECUTED cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 300098c8: e593301c ldr r3, [r3, #28] 300098cc: e3530000 cmp r3, #0 ; 0x0 300098d0: 0affffa9 beq 3000977c 300098d4: e1a00005 mov r0, r5 300098d8: e1a0e00f mov lr, pc 300098dc: e12fff13 bx r3 300098e0: e3e00000 mvn r0, #0 ; 0x0 300098e4: eaffffad b 300097a0 300098e8: e59d0000 ldr r0, [sp] <== NOT EXECUTED 300098ec: eaffffd5 b 30009848 <== NOT EXECUTED * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 300098f0: eb00097c bl 3000bee8 <__errno> 300098f4: e3a03016 mov r3, #22 ; 0x16 300098f8: e5803000 str r3, [r0] 300098fc: e3e00000 mvn r0, #0 ; 0x0 30009900: eaffffa6 b 300097a0 if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 30009904: eb000977 bl 3000bee8 <__errno> <== NOT EXECUTED 30009908: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3000990c: e5803000 str r3, [r0] <== NOT EXECUTED 30009910: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30009914: eaffffa1 b 300097a0 <== NOT EXECUTED 30009918: 30017494 .word 0x30017494 300115e0 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 300115e0: e92d4070 push {r4, r5, r6, lr} 300115e4: e1a05001 mov r5, r1 300115e8: e1a04000 mov r4, r0 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 300115ec: eb00072d bl 300132a8 <_Timespec_Is_valid> 300115f0: e3500000 cmp r0, #0 ; 0x0 300115f4: 0a000038 beq 300116dc * 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 ) 300115f8: e5943000 ldr r3, [r4] 300115fc: e3530000 cmp r3, #0 ; 0x0 30011600: ba000035 blt 300116dc 30011604: e5943004 ldr r3, [r4, #4] 30011608: e3530000 cmp r3, #0 ; 0x0 3001160c: ba000032 blt 300116dc rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 30011610: e1a00004 mov r0, r4 30011614: eb000733 bl 300132e8 <_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 ) { 30011618: e2506000 subs r6, r0, #0 ; 0x0 3001161c: 0a000022 beq 300116ac rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30011620: e59f20dc ldr r2, [pc, #220] ; 30011704 30011624: e5923000 ldr r3, [r2] 30011628: e2833001 add r3, r3, #1 ; 0x1 3001162c: e5823000 str r3, [r2] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 30011630: e59f40d0 ldr r4, [pc, #208] ; 30011708 30011634: e3a01281 mov r1, #268435464 ; 0x10000008 30011638: e5940000 ldr r0, [r4] 3001163c: ebffee7a bl 3000d02c <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 30011640: e5943000 ldr r3, [r4] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 30011644: e59f20c0 ldr r2, [pc, #192] ; 3001170c 30011648: e5931008 ldr r1, [r3, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3001164c: e3a00000 mov r0, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; 30011650: e5831068 str r1, [r3, #104] the_watchdog->user_data = user_data; 30011654: e583006c str r0, [r3, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30011658: e5830050 str r0, [r3, #80] the_watchdog->routine = routine; 3001165c: e5832064 str r2, [r3, #100] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30011660: e2831048 add r1, r3, #72 ; 0x48 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30011664: e5836054 str r6, [r3, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30011668: e59f00a0 ldr r0, [pc, #160] ; 30011710 3001166c: ebfff090 bl 3000d8b4 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 30011670: ebffebd8 bl 3000c5d8 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 30011674: e3550000 cmp r5, #0 ; 0x0 30011678: 0a000009 beq 300116a4 ticks -= 3001167c: e5943000 ldr r3, [r4] _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 30011680: e1a01005 mov r1, r5 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 30011684: e5932060 ldr r2, [r3, #96] 30011688: e593405c ldr r4, [r3, #92] 3001168c: e0624004 rsb r4, r2, r4 30011690: e0844006 add r4, r4, r6 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 30011694: e1a00004 mov r0, r4 30011698: eb0006ee bl 30013258 <_Timespec_From_ticks> /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 3001169c: e3540000 cmp r4, #0 ; 0x0 300116a0: 1a000012 bne 300116f0 rtems_set_errno_and_return_minus_one( EINTR ); 300116a4: e3a00000 mov r0, #0 ; 0x0 } return 0; } 300116a8: e8bd8070 pop {r4, r5, r6, pc} 300116ac: e59f2050 ldr r2, [pc, #80] ; 30011704 300116b0: e5923000 ldr r3, [r2] 300116b4: e2833001 add r3, r3, #1 ; 0x1 300116b8: e5823000 str r3, [r2] * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); 300116bc: ebffef54 bl 3000d414 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 300116c0: ebffebc4 bl 3000c5d8 <_Thread_Enable_dispatch> if ( rmtp ) { 300116c4: e3550000 cmp r5, #0 ; 0x0 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 300116c8: 15856004 strne r6, [r5, #4] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 300116cc: 15856000 strne r6, [r5] rmtp->tv_nsec = 0; 300116d0: 11a00006 movne r0, r6 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { 300116d4: 18bd8070 popne {r4, r5, r6, pc} 300116d8: eafffff1 b 300116a4 <== NOT EXECUTED * * 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 ) rtems_set_errno_and_return_minus_one( EINVAL ); 300116dc: eb001218 bl 30015f44 <__errno> 300116e0: e3a03016 mov r3, #22 ; 0x16 300116e4: e5803000 str r3, [r0] 300116e8: e3e00000 mvn r0, #0 ; 0x0 300116ec: e8bd8070 pop {r4, r5, r6, pc} /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 300116f0: eb001213 bl 30015f44 <__errno> 300116f4: e3a03004 mov r3, #4 ; 0x4 300116f8: e5803000 str r3, [r0] 300116fc: e3e00000 mvn r0, #0 ; 0x0 30011700: e8bd8070 pop {r4, r5, r6, pc} 30011704: 3002724c .word 0x3002724c 30011708: 30027304 .word 0x30027304 3001170c: 3000c444 .word 0x3000c444 30011710: 30027324 .word 0x30027324 30001844 : */ int newlib_free_buffers( FILE *fp ) { 30001844: e92d4010 push {r4, lr} 30001848: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 3000184c: eb002a72 bl 3000c21c 30001850: e3500002 cmp r0, #2 ; 0x2 30001854: 9a000003 bls 30001868 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 30001858: e1a00004 mov r0, r4 <== NOT EXECUTED 3000185c: eb0029f2 bl 3000c02c <== NOT EXECUTED } return 0; } 30001860: e3a00000 mov r0, #0 ; 0x0 30001864: e8bd8010 pop {r4, pc} { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 30001868: e1d430bc ldrh r3, [r4, #12] 3000186c: e3130080 tst r3, #128 ; 0x80 30001870: 0afffffa beq 30001860 free( fp->_bf._base ); 30001874: e5940010 ldr r0, [r4, #16] 30001878: eb001dca bl 30008fa8 fp->_flags &= ~__SMBF; 3000187c: e1d430bc ldrh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 30001880: e3a02000 mov r2, #0 ; 0x0 case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 30001884: e3c33080 bic r3, r3, #128 ; 0x80 fp->_bf._base = fp->_p = (unsigned char *) NULL; 30001888: e5842010 str r2, [r4, #16] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 3000188c: e1c430bc strh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 30001890: e5842000 str r2, [r4] break; default: fclose(fp); } return 0; } 30001894: e3a00000 mov r0, #0 ; 0x0 30001898: e8bd8010 pop {r4, pc} 3000201c : void *pargp ) { rtems_device_driver status; if ( !initialized ) { 3000201c: e59fc040 ldr ip, [pc, #64] ; 30002064 rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 30002020: e92d4010 push {r4, lr} rtems_device_driver status; if ( !initialized ) { 30002024: e5dc2000 ldrb r2, [ip] rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 30002028: e1a04000 mov r4, r0 rtems_device_driver status; if ( !initialized ) { 3000202c: e3520000 cmp r2, #0 ; 0x0 30002030: 0a000001 beq 3000203c NULL_major = major; } return RTEMS_SUCCESSFUL; } 30002034: e3a00000 mov r0, #0 ; 0x0 30002038: e8bd8010 pop {r4, pc} ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 3000203c: e3a03001 mov r3, #1 ; 0x1 status = rtems_io_register_name( 30002040: e59f0020 ldr r0, [pc, #32] ; 30002068 30002044: e1a01004 mov r1, r4 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 30002048: e5cc3000 strb r3, [ip] status = rtems_io_register_name( 3000204c: eb00004b bl 30002180 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 30002050: e3500000 cmp r0, #0 ; 0x0 rtems_fatal_error_occurred(status); NULL_major = major; 30002054: 059f3010 ldreq r3, [pc, #16] ; 3000206c 30002058: 05834000 streq r4, [r3] "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 3000205c: 0afffff4 beq 30002034 rtems_fatal_error_occurred(status); 30002060: eb000fe3 bl 30005ff4 <== NOT EXECUTED 30002064: 3001b034 .word 0x3001b034 30002068: 300193a4 .word 0x300193a4 3000206c: 3001b1d4 .word 0x3001b1d4 30001aac : int open( const char *pathname, int flags, ... ) { 30001aac: e92d000e push {r1, r2, r3} 30001ab0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30001ab4: e24dd010 sub sp, sp, #16 ; 0x10 30001ab8: e59d702c ldr r7, [sp, #44] 30001abc: e1a08000 mov r8, r0 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 30001ac0: e2873001 add r3, r7, #1 ; 0x1 if ( ( status & _FREAD ) == _FREAD ) 30001ac4: e2132001 ands r2, r3, #1 ; 0x1 30001ac8: 01a04002 moveq r4, r2 30001acc: 13a04004 movne r4, #4 ; 0x4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 30001ad0: e3130002 tst r3, #2 ; 0x2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 30001ad4: 13844002 orrne r4, r4, #2 ; 0x2 va_start(ap, flags); mode = va_arg( ap, int ); 30001ad8: 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(); 30001adc: eb001e30 bl 300093a4 if ( iop == 0 ) { 30001ae0: e2505000 subs r5, r0, #0 ; 0x0 30001ae4: 03a08017 moveq r8, #23 ; 0x17 30001ae8: 0a000030 beq 30001bb0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 30001aec: e1a01004 mov r1, r4 30001af0: e1a00008 mov r0, r8 30001af4: e1a0200d mov r2, sp 30001af8: e3a03001 mov r3, #1 ; 0x1 30001afc: ebfffe1f bl 30001380 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 30001b00: e3700001 cmn r0, #1 ; 0x1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 30001b04: e1a0600d mov r6, sp pathname, eval_flags, &loc, true ); if ( status == -1 ) { 30001b08: 0a000040 beq 30001c10 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 30001b0c: e2073c0a and r3, r7, #2560 ; 0xa00 30001b10: e3530c0a cmp r3, #2560 ; 0xa00 30001b14: 01a0400d moveq r4, sp 30001b18: 03a08011 moveq r8, #17 ; 0x11 30001b1c: 0a000055 beq 30001c78 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 30001b20: e89d000c ldm sp, {r2, r3} 30001b24: e5853030 str r3, [r5, #48] iop->file_info = loc.node_access; 30001b28: e585202c str r2, [r5, #44] iop->flags |= rtems_libio_fcntl_flags( flags ); 30001b2c: e1a00007 mov r0, r7 30001b30: e595400c ldr r4, [r5, #12] 30001b34: eb001e5e bl 300094b4 iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 30001b38: e5953030 ldr r3, [r5, #48] * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 30001b3c: e1800004 orr r0, r0, r4 iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 30001b40: e5934000 ldr r4, [r3] */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 30001b44: e285c010 add ip, r5, #16 ; 0x10 if ( !iop->handlers->open_h ) { 30001b48: 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 ); 30001b4c: e585000c str r0, [r5, #12] iop->pathinfo = loc; 30001b50: e896000f ldm r6, {r0, r1, r2, r3} 30001b54: e88c000f stm ip, {r0, r1, r2, r3} if ( !iop->handlers->open_h ) { 30001b58: 0a000044 beq 30001c70 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 30001b5c: e1a01008 mov r1, r8 30001b60: e1a0300a mov r3, sl 30001b64: e1a00005 mov r0, r5 30001b68: e1a02007 mov r2, r7 30001b6c: e1a0e00f mov lr, pc 30001b70: e12fff14 bx r4 if ( rc ) 30001b74: e2508000 subs r8, r0, #0 ; 0x0 30001b78: 11a0400d movne r4, sp 30001b7c: 0a00000f beq 30001bc0 done: va_end(ap); if ( rc ) { if ( iop ) rtems_libio_free( iop ); 30001b80: e1a00005 mov r0, r5 30001b84: eb001df0 bl 3000934c if ( loc_to_free ) 30001b88: e3540000 cmp r4, #0 ; 0x0 30001b8c: 0a000007 beq 30001bb0 rtems_filesystem_freenode( loc_to_free ); 30001b90: e5943008 ldr r3, [r4, #8] 30001b94: e3530000 cmp r3, #0 ; 0x0 30001b98: 0a000004 beq 30001bb0 30001b9c: e593301c ldr r3, [r3, #28] 30001ba0: e3530000 cmp r3, #0 ; 0x0 30001ba4: 11a00004 movne r0, r4 30001ba8: 11a0e00f movne lr, pc 30001bac: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 30001bb0: eb0028cc bl 3000bee8 <__errno> 30001bb4: e5808000 str r8, [r0] 30001bb8: e3e00000 mvn r0, #0 ; 0x0 30001bbc: ea00000f b 30001c00 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 30001bc0: e3170b01 tst r7, #1024 ; 0x400 30001bc4: 1a000034 bne 30001c9c 30001bc8: e59f4170 ldr r4, [pc, #368] ; 30001d40 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 30001bcc: e5941000 ldr r1, [r4] 30001bd0: e0611005 rsb r1, r1, r5 30001bd4: e1a01141 asr r1, r1, #2 30001bd8: e1a02301 lsl r2, r1, #6 30001bdc: e0422101 sub r2, r2, r1, lsl #2 30001be0: e1a03302 lsl r3, r2, #6 30001be4: e0623003 rsb r3, r2, r3 30001be8: e1a00603 lsl r0, r3, #12 30001bec: e0833000 add r3, r3, r0 30001bf0: e0833001 add r3, r3, r1 30001bf4: e1a03203 lsl r3, r3, #4 30001bf8: e0613003 rsb r3, r1, r3 30001bfc: e0410103 sub r0, r1, r3, lsl #2 } 30001c00: e28dd010 add sp, sp, #16 ; 0x10 30001c04: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} 30001c08: e28dd00c add sp, sp, #12 ; 0xc 30001c0c: e12fff1e bx lr status = rtems_filesystem_evaluate_path( pathname, eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 30001c10: eb0028b4 bl 3000bee8 <__errno> 30001c14: e5900000 ldr r0, [r0] 30001c18: e3500002 cmp r0, #2 ; 0x2 30001c1c: 1a000018 bne 30001c84 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 30001c20: e2173c02 ands r3, r7, #512 ; 0x200 30001c24: 01a08000 moveq r8, r0 30001c28: 01a04003 moveq r4, r3 30001c2c: 0a000011 beq 30001c78 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 30001c30: e1a00008 mov r0, r8 30001c34: e38a1902 orr r1, sl, #32768 ; 0x8000 30001c38: e3a02000 mov r2, #0 ; 0x0 30001c3c: e3a03000 mov r3, #0 ; 0x0 30001c40: ebfffe88 bl 30001668 if ( rc ) { 30001c44: e2504000 subs r4, r0, #0 ; 0x0 30001c48: 1a00000d bne 30001c84 rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true ); 30001c4c: e1a00008 mov r0, r8 30001c50: e1a01004 mov r1, r4 30001c54: e1a0200d mov r2, sp 30001c58: e3a03001 mov r3, #1 ; 0x1 30001c5c: ebfffdc7 bl 30001380 if ( status != 0 ) { /* The file did not exist */ 30001c60: e3500000 cmp r0, #0 ; 0x0 30001c64: 13a0800d movne r8, #13 ; 0xd 30001c68: 1a000002 bne 30001c78 30001c6c: eaffffab b 30001b20 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 30001c70: e1a0400d mov r4, sp <== NOT EXECUTED 30001c74: e3a08086 mov r8, #134 ; 0x86 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 30001c78: e3550000 cmp r5, #0 ; 0x0 30001c7c: 0affffc1 beq 30001b88 30001c80: eaffffbe b 30001b80 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 30001c84: eb002897 bl 3000bee8 <__errno> 30001c88: e5908000 ldr r8, [r0] */ done: va_end(ap); if ( rc ) { 30001c8c: e3580000 cmp r8, #0 ; 0x0 30001c90: 0affffcc beq 30001bc8 30001c94: e3a04000 mov r4, #0 ; 0x0 30001c98: eafffff6 b 30001c78 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 30001c9c: e59f409c ldr r4, [pc, #156] ; 30001d40 30001ca0: e1a01008 mov r1, r8 30001ca4: e5942000 ldr r2, [r4] 30001ca8: e0622005 rsb r2, r2, r5 30001cac: e1a02142 asr r2, r2, #2 30001cb0: e1a03302 lsl r3, r2, #6 30001cb4: e0433102 sub r3, r3, r2, lsl #2 30001cb8: e1a00303 lsl r0, r3, #6 30001cbc: e0630000 rsb r0, r3, r0 30001cc0: e1a0c600 lsl ip, r0, #12 30001cc4: e080000c add r0, r0, ip 30001cc8: e0800002 add r0, r0, r2 30001ccc: e1a00200 lsl r0, r0, #4 30001cd0: e0620000 rsb r0, r2, r0 30001cd4: e0420100 sub r0, r2, r0, lsl #2 30001cd8: eb001cda bl 30009048 if ( rc ) { 30001cdc: e2508000 subs r8, r0, #0 ; 0x0 30001ce0: 0affffb9 beq 30001bcc if(errno) rc = errno; 30001ce4: eb00287f bl 3000bee8 <__errno> <== NOT EXECUTED 30001ce8: e5903000 ldr r3, [r0] <== NOT EXECUTED 30001cec: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001cf0: 1a00000f bne 30001d34 <== NOT EXECUTED close( iop - rtems_libio_iops ); 30001cf4: e5942000 ldr r2, [r4] <== NOT EXECUTED 30001cf8: e0622005 rsb r2, r2, r5 <== NOT EXECUTED 30001cfc: e1a02142 asr r2, r2, #2 <== NOT EXECUTED 30001d00: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED 30001d04: e0433102 sub r3, r3, r2, lsl #2 <== NOT EXECUTED 30001d08: e1a00303 lsl r0, r3, #6 <== NOT EXECUTED 30001d0c: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 30001d10: e1a01600 lsl r1, r0, #12 <== NOT EXECUTED 30001d14: e0800001 add r0, r0, r1 <== NOT EXECUTED 30001d18: e0800002 add r0, r0, r2 <== NOT EXECUTED 30001d1c: e1a00200 lsl r0, r0, #4 <== NOT EXECUTED 30001d20: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 30001d24: e0420100 sub r0, r2, r0, lsl #2 <== NOT EXECUTED 30001d28: eb001c71 bl 30008ef4 <== NOT EXECUTED 30001d2c: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 30001d30: eaffffd5 b 30001c8c <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 30001d34: eb00286b bl 3000bee8 <__errno> <== NOT EXECUTED 30001d38: e5908000 ldr r8, [r0] <== NOT EXECUTED 30001d3c: eaffffec b 30001cf4 <== NOT EXECUTED 30001d40: 30016dcc .word 0x30016dcc 30001a44 : int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 30001a44: e3a01000 mov r1, #0 ; 0x0 /* * This is a replaceable stub */ void open_dev_console(void) { 30001a48: 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) { 30001a4c: e59f004c ldr r0, [pc, #76] ; 30001aa0 30001a50: e1a02001 mov r2, r1 30001a54: eb000014 bl 30001aac 30001a58: e3700001 cmn r0, #1 ; 0x1 30001a5c: 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) 30001a60: e59f0038 ldr r0, [pc, #56] ; 30001aa0 30001a64: e3a01001 mov r1, #1 ; 0x1 30001a68: e3a02000 mov r2, #0 ; 0x0 30001a6c: eb00000e bl 30001aac 30001a70: e3700001 cmn r0, #1 ; 0x1 30001a74: 0a000007 beq 30001a98 rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 30001a78: e59f0020 ldr r0, [pc, #32] ; 30001aa0 30001a7c: e3a01001 mov r1, #1 ; 0x1 30001a80: e3a02000 mov r2, #0 ; 0x0 30001a84: eb000008 bl 30001aac 30001a88: e3700001 cmn r0, #1 ; 0x1 30001a8c: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( error_code | '2' ); 30001a90: e59f000c ldr r0, [pc, #12] ; 30001aa4 <== NOT EXECUTED 30001a94: eb000cfe bl 30004e94 <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | '1' ); 30001a98: e59f0008 ldr r0, [pc, #8] ; 30001aa8 <== NOT EXECUTED 30001a9c: eb000cfc bl 30004e94 <== NOT EXECUTED 30001aa0: 30015acc .word 0x30015acc 30001aa4: 53544432 .word 0x53544432 30001aa8: 53544431 .word 0x53544431 3001f78c : * open a directory. */ DIR * opendir( const char *name ) { 3001f78c: e92d4030 push {r4, r5, lr} register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 3001f790: e3a01000 mov r1, #0 ; 0x0 3001f794: ebff95cd bl 30004ed0 3001f798: e3700001 cmn r0, #1 ; 0x1 3001f79c: e1a05000 mov r5, r0 3001f7a0: 0a00001a beq 3001f810 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 3001f7a4: e3a01002 mov r1, #2 ; 0x2 3001f7a8: e3a02001 mov r2, #1 ; 0x1 3001f7ac: eb002e13 bl 3002b000 3001f7b0: e3700001 cmn r0, #1 ; 0x1 3001f7b4: 0a000013 beq 3001f808 3001f7b8: e3a00018 mov r0, #24 ; 0x18 3001f7bc: ebff9382 bl 300045cc 3001f7c0: e2504000 subs r4, r0, #0 ; 0x0 3001f7c4: 0a00000f beq 3001f808 * 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); 3001f7c8: e3a00c02 mov r0, #512 ; 0x200 3001f7cc: ebff937e bl 300045cc dirp->dd_len = 512; 3001f7d0: e3a03c02 mov r3, #512 ; 0x200 if (dirp->dd_buf == NULL) { 3001f7d4: e3500000 cmp r0, #0 ; 0x0 * 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); dirp->dd_len = 512; 3001f7d8: e5843010 str r3, [r4, #16] if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; dirp->dd_loc = 0; 3001f7dc: 13a03000 movne r3, #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); 3001f7e0: e1a02000 mov r2, r0 3001f7e4: e584000c str r0, [r4, #12] if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; 3001f7e8: 15845000 strne r5, [r4] dirp->dd_loc = 0; dirp->dd_seek = 0; 3001f7ec: 15843014 strne r3, [r4, #20] if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; dirp->dd_loc = 0; 3001f7f0: 15843004 strne r3, [r4, #4] * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 3001f7f4: 1a000006 bne 3001f814 close (fd); 3001f7f8: e1a00005 mov r0, r5 <== NOT EXECUTED 3001f7fc: e1a04002 mov r4, r2 <== NOT EXECUTED 3001f800: ebff9125 bl 30003c9c <== NOT EXECUTED 3001f804: ea000002 b 3001f814 <== NOT EXECUTED if ((fd = open(name, 0)) == -1) return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || (dirp = (DIR *)malloc(sizeof(DIR))) == NULL) { close (fd); 3001f808: e1a00005 mov r0, r5 <== NOT EXECUTED 3001f80c: ebff9122 bl 30003c9c <== NOT EXECUTED 3001f810: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED dirp->dd_seek = 0; /* * Set up seek point for rewinddir. */ return dirp; } 3001f814: e1a00004 mov r0, r4 3001f818: e8bd8030 pop {r4, r5, pc} 3000287c : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3000287c: e92d4010 push {r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 30002880: e5912034 ldr r2, [r1, #52] /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 30002884: e24dd004 sub sp, sp, #4 ; 0x4 int i; if (tty->termios.c_oflag & OPOST) { 30002888: e3120001 tst r2, #1 ; 0x1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3000288c: e1a04001 mov r4, r1 30002890: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 30002894: 0a000016 beq 300028f4 switch (c) { 30002898: e5dd1000 ldrb r1, [sp] 3000289c: e2413008 sub r3, r1, #8 ; 0x8 300028a0: e3530005 cmp r3, #5 ; 0x5 300028a4: 979ff103 ldrls pc, [pc, r3, lsl #2] 300028a8: ea000017 b 3000290c 300028ac: 30002954 .word 0x30002954 <== NOT EXECUTED 300028b0: 30002998 .word 0x30002998 <== NOT EXECUTED 300028b4: 30002968 .word 0x30002968 <== NOT EXECUTED 300028b8: 3000290c .word 0x3000290c <== NOT EXECUTED 300028bc: 3000290c .word 0x3000290c <== NOT EXECUTED 300028c0: 300028c4 .word 0x300028c4 <== NOT EXECUTED tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 300028c4: e3120010 tst r2, #16 ; 0x10 <== NOT EXECUTED 300028c8: 0a000002 beq 300028d8 <== NOT EXECUTED 300028cc: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 300028d0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300028d4: 0a00000a beq 30002904 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 300028d8: e2123008 ands r3, r2, #8 ; 0x8 <== NOT EXECUTED 300028dc: 0a00001a beq 3000294c <== NOT EXECUTED c = '\n'; 300028e0: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 300028e4: 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'; 300028e8: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) tty->column = 0; 300028ec: 1243300a subne r3, r3, #10 ; 0xa <== NOT EXECUTED 300028f0: 15843028 strne r3, [r4, #40] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 300028f4: e1a02004 mov r2, r4 300028f8: e1a0000d mov r0, sp 300028fc: e3a01001 mov r1, #1 ; 0x1 30002900: ebffff95 bl 3000275c } 30002904: e28dd004 add sp, sp, #4 ; 0x4 30002908: e8bd8010 pop {r4, pc} if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 3000290c: e3120002 tst r2, #2 ; 0x2 30002910: 059f00bc ldreq r0, [pc, #188] ; 300029d4 30002914: 0a000006 beq 30002934 c = toupper(c); 30002918: e59f00b4 ldr r0, [pc, #180] ; 300029d4 <== NOT EXECUTED 3000291c: e5903000 ldr r3, [r0] <== NOT EXECUTED 30002920: e7d32001 ldrb r2, [r3, r1] <== NOT EXECUTED 30002924: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED 30002928: 12411020 subne r1, r1, #32 ; 0x20 <== NOT EXECUTED 3000292c: e5cd1000 strb r1, [sp] <== NOT EXECUTED 30002930: e5dd1000 ldrb r1, [sp] <== NOT EXECUTED if (!iscntrl(c)) 30002934: e5903000 ldr r3, [r0] 30002938: e7d32001 ldrb r2, [r3, r1] 3000293c: e3120020 tst r2, #32 ; 0x20 30002940: 1affffeb bne 300028f4 tty->column++; 30002944: e5943028 ldr r3, [r4, #40] 30002948: e2833001 add r3, r3, #1 ; 0x1 3000294c: e5843028 str r3, [r4, #40] 30002950: eaffffe7 b 300028f4 } tty->column += i; break; case '\b': if (tty->column > 0) 30002954: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 30002958: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 3000295c: c2433001 subgt r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002960: c5843028 strgt r3, [r4, #40] <== NOT EXECUTED 30002964: eaffffe2 b 300028f4 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 30002968: e3120020 tst r2, #32 ; 0x20 tty->column = 0; 3000296c: 13a03000 movne r3, #0 ; 0x0 30002970: 15843028 strne r3, [r4, #40] if (tty->termios.c_oflag & ONLCR) { 30002974: e3120004 tst r2, #4 ; 0x4 30002978: 0affffdd beq 300028f4 rtems_termios_puts ("\r", 1, tty); 3000297c: e59f0054 ldr r0, [pc, #84] ; 300029d8 30002980: e3a01001 mov r1, #1 ; 0x1 30002984: e1a02004 mov r2, r4 30002988: ebffff73 bl 3000275c tty->column = 0; 3000298c: e3a03000 mov r3, #0 ; 0x0 30002990: e5843028 str r3, [r4, #40] 30002994: eaffffd6 b 300028f4 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 30002998: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3000299c: e2023b06 and r3, r2, #6144 ; 0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 300029a0: e2012007 and r2, r1, #7 ; 0x7 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 300029a4: e3530b06 cmp r3, #6144 ; 0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 300029a8: e2620008 rsb r0, r2, #8 ; 0x8 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 300029ac: 10803001 addne r3, r0, r1 <== NOT EXECUTED 300029b0: 15843028 strne r3, [r4, #40] <== NOT EXECUTED tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 300029b4: 1affffce bne 300028f4 <== NOT EXECUTED tty->column += i; 300029b8: e0803001 add r3, r0, r1 <== NOT EXECUTED 300029bc: e5843028 str r3, [r4, #40] <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 300029c0: e1a01000 mov r1, r0 <== NOT EXECUTED 300029c4: e1a02004 mov r2, r4 <== NOT EXECUTED 300029c8: e59f000c ldr r0, [pc, #12] ; 300029dc <== NOT EXECUTED 300029cc: ebffff62 bl 3000275c <== NOT EXECUTED 300029d0: eaffffcb b 30002904 <== NOT EXECUTED 300029d4: 300166f4 .word 0x300166f4 300029d8: 30015c10 .word 0x30015c10 300029dc: 30015b4c .word 0x30015b4c 30005264 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 30005264: e92d4030 push {r4, r5, lr} 30005268: e24dd004 sub sp, sp, #4 ; 0x4 3000526c: e1a04000 mov r4, r0 30005270: 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) ) { 30005274: e1a00002 mov r0, r2 30005278: e1a0100d mov r1, sp 3000527c: eb000130 bl 30005744 <_POSIX_Absolute_timeout_to_ticks> 30005280: e3500003 cmp r0, #3 ; 0x3 30005284: 979ff100 ldrls pc, [pc, r0, lsl #2] 30005288: ea000004 b 300052a0 <== NOT EXECUTED 3000528c: 300052c0 .word 0x300052c0 <== NOT EXECUTED 30005290: 300052b8 .word 0x300052b8 <== NOT EXECUTED 30005294: 300052b8 .word 0x300052b8 <== NOT EXECUTED 30005298: 3000529c .word 0x3000529c <== NOT EXECUTED 3000529c: e3a03000 mov r3, #0 ; 0x0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: already_timedout = FALSE; break; } return _POSIX_Condition_variables_Wait_support( 300052a0: e1a00004 mov r0, r4 300052a4: e1a01005 mov r1, r5 300052a8: e59d2000 ldr r2, [sp] 300052ac: eb000008 bl 300052d4 <_POSIX_Condition_variables_Wait_support> cond, mutex, ticks, already_timedout ); } 300052b0: e28dd004 add sp, sp, #4 ; 0x4 300052b4: e8bd8030 pop {r4, r5, pc} * 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) ) { 300052b8: e3a03001 mov r3, #1 ; 0x1 300052bc: eafffff7 b 300052a0 300052c0: e3a00016 mov r0, #22 ; 0x16 300052c4: eafffff9 b 300052b0 3000549c : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 3000549c: 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 ) 300054a0: e2529000 subs r9, r2, #0 ; 0x0 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 300054a4: e24dd03c sub sp, sp, #60 ; 0x3c 300054a8: e58d001c str r0, [sp, #28] 300054ac: e1a08003 mov r8, r3 POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 300054b0: 03a0000e moveq r0, #14 ; 0xe 300054b4: 0a000014 beq 3000550c return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 300054b8: e59f32bc ldr r3, [pc, #700] ; 3000577c 300054bc: e3510000 cmp r1, #0 ; 0x0 300054c0: 11a05001 movne r5, r1 300054c4: 01a05003 moveq r5, r3 if ( !the_attr->is_initialized ) 300054c8: e5952000 ldr r2, [r5] 300054cc: e3520000 cmp r2, #0 ; 0x0 300054d0: 0a00000c beq 30005508 * 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) ) 300054d4: e5953004 ldr r3, [r5, #4] 300054d8: e3530000 cmp r3, #0 ; 0x0 300054dc: 0a000004 beq 300054f4 300054e0: e59f2298 ldr r2, [pc, #664] ; 30005780 300054e4: e5953008 ldr r3, [r5, #8] 300054e8: e5921000 ldr r1, [r2] 300054ec: e1530001 cmp r3, r1 300054f0: 3a000004 bcc 30005508 * 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 ) { 300054f4: e5953010 ldr r3, [r5, #16] 300054f8: e3530001 cmp r3, #1 ; 0x1 300054fc: 0a00001b beq 30005570 30005500: e3530002 cmp r3, #2 ; 0x2 30005504: 0a000002 beq 30005514 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 30005508: e3a00016 mov r0, #22 ; 0x16 } 3000550c: e28dd03c add sp, sp, #60 ; 0x3c 30005510: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 30005514: e595a014 ldr sl, [r5, #20] schedparam = the_attr->schedparam; 30005518: e28d6024 add r6, sp, #36 ; 0x24 3000551c: e285c018 add ip, r5, #24 ; 0x18 30005520: e1a04006 mov r4, r6 30005524: e8bc000f ldm ip!, {r0, r1, r2, r3} 30005528: e8a4000f stmia r4!, {r0, r1, r2, r3} 3000552c: e89c0003 ldm ip, {r0, r1} 30005530: 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 ) 30005534: e595300c ldr r3, [r5, #12] 30005538: e3530000 cmp r3, #0 ; 0x0 3000553c: 13a00086 movne r0, #134 ; 0x86 30005540: 1afffff1 bne 3000550c /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 30005544: e59db024 ldr fp, [sp, #36] 30005548: e24b3001 sub r3, fp, #1 ; 0x1 3000554c: e35300fd cmp r3, #253 ; 0xfd 30005550: 8affffec bhi 30005508 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 30005554: e35a0003 cmp sl, #3 ; 0x3 30005558: 979ff10a ldrls pc, [pc, sl, lsl #2] 3000555c: eaffffe9 b 30005508 30005560: 30005678 .word 0x30005678 <== NOT EXECUTED 30005564: 3000566c .word 0x3000566c <== NOT EXECUTED 30005568: 3000565c .word 0x3000565c <== NOT EXECUTED 3000556c: 3000558c .word 0x3000558c <== NOT EXECUTED * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30005570: e59f320c ldr r3, [pc, #524] ; 30005784 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 30005574: e28d6024 add r6, sp, #36 ; 0x24 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30005578: e5932000 ldr r2, [r3] 3000557c: e5921108 ldr r1, [r2, #264] schedpolicy = api->schedpolicy; schedparam = api->schedparam; 30005580: e281c080 add ip, r1, #128 ; 0x80 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 30005584: e591a07c ldr sl, [r1, #124] 30005588: eaffffe4 b 30005520 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 ) < 3000558c: e28d002c add r0, sp, #44 ; 0x2c 30005590: eb0010c5 bl 300098ac <_Timespec_To_ticks> 30005594: e1a04000 mov r4, r0 30005598: e28d0034 add r0, sp, #52 ; 0x34 3000559c: eb0010c2 bl 300098ac <_Timespec_To_ticks> 300055a0: e1540000 cmp r4, r0 300055a4: 3affffd7 bcc 30005508 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 300055a8: e59d3028 ldr r3, [sp, #40] 300055ac: e2433001 sub r3, r3, #1 ; 0x1 300055b0: e35300fd cmp r3, #253 ; 0xfd 300055b4: 8affffd3 bhi 30005508 300055b8: e59fc1c8 ldr ip, [pc, #456] ; 30005788 300055bc: e3a04003 mov r4, #3 ; 0x3 300055c0: e58dc020 str ip, [sp, #32] #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 300055c4: e59f21c0 ldr r2, [pc, #448] ; 3000578c 300055c8: e5920000 ldr r0, [r2] 300055cc: eb0006eb bl 30007180 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 300055d0: e59f01b8 ldr r0, [pc, #440] ; 30005790 300055d4: eb000943 bl 30007ae8 <_Objects_Allocate> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 300055d8: e2507000 subs r7, r0, #0 ; 0x0 300055dc: 0a000052 beq 3000572c /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 300055e0: e59f2198 ldr r2, [pc, #408] ; 30005780 300055e4: e26bc0ff rsb ip, fp, #255 ; 0xff 300055e8: e5923000 ldr r3, [r2] 300055ec: e5951008 ldr r1, [r5, #8] 300055f0: e5952004 ldr r2, [r5, #4] 300055f4: e58dc004 str ip, [sp, #4] 300055f8: e59dc020 ldr ip, [sp, #32] 300055fc: e1a03083 lsl r3, r3, #1 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ 30005600: e3a0b000 mov fp, #0 ; 0x0 status = _Thread_Initialize( 30005604: e1530001 cmp r3, r1 30005608: 31a03001 movcc r3, r1 3000560c: e58dc010 str ip, [sp, #16] 30005610: e59f0178 ldr r0, [pc, #376] ; 30005790 30005614: e3a0c001 mov ip, #1 ; 0x1 30005618: e1a01007 mov r1, r7 3000561c: e58d400c str r4, [sp, #12] 30005620: e58db000 str fp, [sp] 30005624: e58dc008 str ip, [sp, #8] 30005628: e58db014 str fp, [sp, #20] 3000562c: e58db018 str fp, [sp, #24] 30005630: eb000cd4 bl 30008988 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 30005634: e150000b cmp r0, fp 30005638: 1a000012 bne 30005688 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 3000563c: e1a01007 mov r1, r7 30005640: e59f0148 ldr r0, [pc, #328] ; 30005790 30005644: eb000a0f bl 30007e88 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 30005648: e59f213c ldr r2, [pc, #316] ; 3000578c 3000564c: e5920000 ldr r0, [r2] 30005650: eb0006e6 bl 300071f0 <_API_Mutex_Unlock> 30005654: e3a0000b mov r0, #11 ; 0xb 30005658: eaffffab b 3000550c */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 3000565c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30005660: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED 30005664: e58d3020 str r3, [sp, #32] <== NOT EXECUTED 30005668: eaffffd5 b 300055c4 <== NOT EXECUTED 3000566c: e3a04000 mov r4, #0 ; 0x0 30005670: e58d4020 str r4, [sp, #32] 30005674: eaffffd2 b 300055c4 30005678: e3a02000 mov r2, #0 ; 0x0 3000567c: e3a04001 mov r4, #1 ; 0x1 30005680: e58d2020 str r2, [sp, #32] 30005684: eaffffce b 300055c4 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 30005688: e5974108 ldr r4, [r7, #264] api->Attributes = *the_attr; 3000568c: e1a0c005 mov ip, r5 30005690: e1a0e004 mov lr, r4 30005694: e8bc000f ldm ip!, {r0, r1, r2, r3} 30005698: e8ae000f stmia lr!, {r0, r1, r2, r3} 3000569c: e8bc000f ldm ip!, {r0, r1, r2, r3} 300056a0: e8ae000f stmia lr!, {r0, r1, r2, r3} 300056a4: e8bc000f ldm ip!, {r0, r1, r2, r3} 300056a8: e8ae000f stmia lr!, {r0, r1, r2, r3} 300056ac: e89c0003 ldm ip, {r0, r1} 300056b0: e88e0003 stm lr, {r0, r1} api->detachstate = the_attr->detachstate; 300056b4: e5953034 ldr r3, [r5, #52] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 300056b8: e284c080 add ip, r4, #128 ; 0x80 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; 300056bc: e584a07c str sl, [r4, #124] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 300056c0: e5843038 str r3, [r4, #56] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 300056c4: e1a0e006 mov lr, r6 300056c8: e8be000f ldm lr!, {r0, r1, r2, r3} 300056cc: e8ac000f stmia ip!, {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; 300056d0: e3a03001 mov r3, #1 ; 0x1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 300056d4: e89e0003 ldm lr, {r0, r1} * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 300056d8: e5c73075 strb r3, [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; 300056dc: e88c0003 stm ip, {r0, r1} /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 300056e0: e1a02009 mov r2, r9 300056e4: e1a03008 mov r3, r8 300056e8: e3a01001 mov r1, #1 ; 0x1 300056ec: e1a00007 mov r0, r7 300056f0: e58db000 str fp, [sp] 300056f4: eb000fb3 bl 300095c8 <_Thread_Start> start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 300056f8: e35a0003 cmp sl, #3 ; 0x3 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 300056fc: e1a05000 mov r5, r0 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 30005700: 0a000016 beq 30005760 * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 30005704: e3550000 cmp r5, #0 ; 0x0 30005708: 1a00000c bne 30005740 3000570c: e1a01007 mov r1, r7 <== NOT EXECUTED 30005710: e59f0078 ldr r0, [pc, #120] ; 30005790 <== NOT EXECUTED 30005714: eb0009db bl 30007e88 <_Objects_Free> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 30005718: e59fc06c ldr ip, [pc, #108] ; 3000578c <== NOT EXECUTED 3000571c: e59c0000 ldr r0, [ip] <== NOT EXECUTED 30005720: eb0006b2 bl 300071f0 <_API_Mutex_Unlock> <== NOT EXECUTED 30005724: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED 30005728: eaffff77 b 3000550c <== NOT EXECUTED */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 3000572c: e59f3058 ldr r3, [pc, #88] ; 3000578c 30005730: e5930000 ldr r0, [r3] 30005734: eb0006ad bl 300071f0 <_API_Mutex_Unlock> 30005738: e3a0000b mov r0, #11 ; 0xb 3000573c: eaffff72 b 3000550c /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 30005740: e5973008 ldr r3, [r7, #8] _RTEMS_Unlock_allocator(); 30005744: e59f2040 ldr r2, [pc, #64] ; 3000578c /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 30005748: e59dc01c ldr ip, [sp, #28] _RTEMS_Unlock_allocator(); 3000574c: e5920000 ldr r0, [r2] /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 30005750: e58c3000 str r3, [ip] _RTEMS_Unlock_allocator(); 30005754: eb0006a5 bl 300071f0 <_API_Mutex_Unlock> 30005758: e3a00000 mov r0, #0 ; 0x0 3000575c: eaffff6a b 3000550c arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 30005760: e2840088 add r0, r4, #136 ; 0x88 30005764: eb001050 bl 300098ac <_Timespec_To_ticks> 30005768: e284109c add r1, r4, #156 ; 0x9c Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3000576c: e58400a8 str r0, [r4, #168] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005770: e59f001c ldr r0, [pc, #28] ; 30005794 30005774: eb00114f bl 30009cb8 <_Watchdog_Insert> 30005778: eaffffe1 b 30005704 3000577c: 30018b30 .word 0x30018b30 30005780: 3001a570 .word 0x3001a570 30005784: 3001b444 .word 0x3001b444 30005788: 30005b0c .word 0x30005b0c 3000578c: 3001b43c .word 0x3001b43c 30005790: 3001b5a0 .word 0x3001b5a0 30005794: 3001b464 .word 0x3001b464 30004540 : 30004540: e59f2104 ldr r2, [pc, #260] ; 3000464c int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 30004544: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 30004548: e5923000 ldr r3, [r2] 3000454c: e1a09000 mov r9, r0 30004550: e2833001 add r3, r3, #1 ; 0x1 30004554: e1a04001 mov r4, r1 30004558: 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 ); 3000455c: e59fa0ec ldr sl, [pc, #236] ; 30004650 30004560: e1a0000a mov r0, sl 30004564: eb00092e bl 30006a24 <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 30004568: e2507000 subs r7, r0, #0 ; 0x0 3000456c: 0a000024 beq 30004604 30004570: e59f80dc ldr r8, [pc, #220] ; 30004654 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 30004574: e5874014 str r4, [r7, #20] 30004578: e1a06007 mov r6, r7 3000457c: e3a05001 mov r5, #1 ; 0x1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 30004580: e7983105 ldr r3, [r8, r5, lsl #2] 30004584: e3530000 cmp r3, #0 ; 0x0 30004588: 0a00001b beq 300045fc INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 3000458c: e5933004 ldr r3, [r3, #4] 30004590: e1d341b0 ldrh r4, [r3, #16] 30004594: e2844001 add r4, r4, #1 ; 0x1 30004598: e1a04104 lsl r4, r4, #2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 3000459c: e1a00004 mov r0, r4 300045a0: eb00121e bl 30008e20 <_Workspace_Allocate> if ( !table ) { 300045a4: e2503000 subs r3, r0, #0 ; 0x0 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 300045a8: e1a02004 mov r2, r4 300045ac: 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 ) { 300045b0: 0a000016 beq 30004610 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 300045b4: e586301c str r3, [r6, #28] memset( table, '\0', bytes_to_allocate ); 300045b8: eb00241c bl 3000d630 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 300045bc: 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; 300045c0: e3550005 cmp r5, #5 ; 0x5 the_api++ ) { 300045c4: e2866004 add r6, r6, #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; 300045c8: 1affffec bne 30004580 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300045cc: e5970008 ldr r0, [r7, #8] 300045d0: e59a101c ldr r1, [sl, #28] 300045d4: e1a02800 lsl r2, r0, #16 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 300045d8: e3a04000 mov r4, #0 ; 0x0 } } the_key->is_active = TRUE; 300045dc: e3a03001 mov r3, #1 ; 0x1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300045e0: e7817722 str r7, [r1, r2, lsr #14] 300045e4: e5c73010 strb r3, [r7, #16] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 300045e8: e587400c str r4, [r7, #12] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 300045ec: e5890000 str r0, [r9] _Thread_Enable_dispatch(); 300045f0: eb000c6b bl 300077a4 <_Thread_Enable_dispatch> 300045f4: e1a00004 mov r0, r4 return 0; } 300045f8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 300045fc: e586301c str r3, [r6, #28] 30004600: eaffffed b 300045bc _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 30004604: eb000c66 bl 300077a4 <_Thread_Enable_dispatch> 30004608: e3a0000b mov r0, #11 ; 0xb 3000460c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 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; 30004610: e2554001 subs r4, r5, #1 ; 0x1 30004614: 0a000006 beq 30004634 30004618: e2853006 add r3, r5, #6 ; 0x6 <== NOT EXECUTED 3000461c: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 30004620: e0875003 add r5, r7, r3 <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 30004624: e5350004 ldr r0, [r5, #-4]! <== NOT EXECUTED 30004628: eb0011f8 bl 30008e10 <_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; 3000462c: e2544001 subs r4, r4, #1 ; 0x1 <== NOT EXECUTED 30004630: 1afffffb bne 30004624 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 30004634: e59f0014 ldr r0, [pc, #20] ; 30004650 30004638: e1a01007 mov r1, r7 3000463c: eb0009e0 bl 30006dc4 <_Objects_Free> the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 30004640: eb000c57 bl 300077a4 <_Thread_Enable_dispatch> 30004644: e3a0000c mov r0, #12 ; 0xc 30004648: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 3000464c: 3001502c .word 0x3001502c 30004650: 30015404 .word 0x30015404 30004654: 30014fe8 .word 0x30014fe8 3000606c : #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 3000606c: e59f3148 ldr r3, [pc, #328] ; 300061bc 30006070: e3510000 cmp r1, #0 ; 0x0 int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 30006074: e92d41f0 push {r4, r5, r6, r7, r8, lr} #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 30006078: 11a04001 movne r4, r1 3000607c: 01a04003 moveq r4, r3 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 30006080: e2507000 subs r7, r0, #0 ; 0x0 30006084: 0a000011 beq 300060d0 break; } } #endif if ( !the_attr->is_initialized ) 30006088: e5943000 ldr r3, [r4] 3000608c: e3530000 cmp r3, #0 ; 0x0 30006090: 0a00000e beq 300060d0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 30006094: e5943004 ldr r3, [r4, #4] 30006098: e3530000 cmp r3, #0 ; 0x0 3000609c: 1a000041 bne 300061a8 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 300060a0: e594300c ldr r3, [r4, #12] 300060a4: e3530001 cmp r3, #1 ; 0x1 300060a8: 0a00002f beq 3000616c 300060ac: e3530002 cmp r3, #2 ; 0x2 300060b0: 0a000033 beq 30006184 300060b4: e3530000 cmp r3, #0 ; 0x0 300060b8: 01a06003 moveq r6, r3 300060bc: 1a000003 bne 300060d0 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 300060c0: e5943008 ldr r3, [r4, #8] 300060c4: e2433001 sub r3, r3, #1 ; 0x1 300060c8: e35300fd cmp r3, #253 ; 0xfd 300060cc: 9a000001 bls 300060d8 _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; 300060d0: e3a00016 mov r0, #22 ; 0x16 } 300060d4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 300060d8: e59f20e0 ldr r2, [pc, #224] ; 300061c0 300060dc: e5923000 ldr r3, [r2] 300060e0: e2833001 add r3, r3, #1 ; 0x1 300060e4: e5823000 str r3, [r2] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 300060e8: e59f80d4 ldr r8, [pc, #212] ; 300061c4 300060ec: e1a00008 mov r0, r8 300060f0: eb0009e0 bl 30008878 <_Objects_Allocate> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 300060f4: e2505000 subs r5, r0, #0 ; 0x0 300060f8: 0a000027 beq 3000619c _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 300060fc: e5943004 ldr r3, [r4, #4] if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 30006100: e3a01001 mov r1, #1 ; 0x1 if ( !the_mutex ) { _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 30006104: e5853010 str r3, [r5, #16] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 30006108: e5942010 ldr r2, [r4, #16] the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 3000610c: e5c51058 strb r1, [r5, #88] the_mutex->process_shared = the_attr->process_shared; the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 30006110: e3520000 cmp r2, #0 ; 0x0 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 30006114: 13a03000 movne r3, #0 ; 0x0 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 30006118: 03a03001 moveq r3, #1 ; 0x1 the_mutex->process_shared = the_attr->process_shared; the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 3000611c: 15853054 strne r3, [r5, #84] else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 30006120: 05853054 streq r3, [r5, #84] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 30006124: e5943008 ldr r3, [r4, #8] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 30006128: e1a02001 mov r2, r1 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 3000612c: e26330ff rsb r3, r3, #255 ; 0xff 30006130: e5853060 str r3, [r5, #96] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 30006134: e2851054 add r1, r5, #84 ; 0x54 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 30006138: e585605c str r6, [r5, #92] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 3000613c: e2850014 add r0, r5, #20 ; 0x14 30006140: eb0007c1 bl 3000804c <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30006144: e5951008 ldr r1, [r5, #8] 30006148: e598201c ldr r2, [r8, #28] 3000614c: e1a03801 lsl r3, r1, #16 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 30006150: e3a04000 mov r4, #0 ; 0x0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30006154: e7825723 str r5, [r2, r3, lsr #14] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 30006158: e585400c str r4, [r5, #12] CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 3000615c: e5871000 str r1, [r7] _Thread_Enable_dispatch(); 30006160: eb000d24 bl 300095f8 <_Thread_Enable_dispatch> 30006164: e1a00004 mov r0, r4 30006168: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 3000616c: e5943008 ldr r3, [r4, #8] /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 30006170: e3a06002 mov r6, #2 ; 0x2 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 30006174: e2433001 sub r3, r3, #1 ; 0x1 30006178: e35300fd cmp r3, #253 ; 0xfd 3000617c: 8affffd3 bhi 300060d0 30006180: eaffffd4 b 300060d8 30006184: e5943008 ldr r3, [r4, #8] /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 30006188: e3a06003 mov r6, #3 ; 0x3 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 3000618c: e2433001 sub r3, r3, #1 ; 0x1 30006190: e35300fd cmp r3, #253 ; 0xfd 30006194: 8affffcd bhi 300060d0 30006198: eaffffce b 300060d8 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 3000619c: eb000d15 bl 300095f8 <_Thread_Enable_dispatch> 300061a0: e3a0000b mov r0, #11 ; 0xb 300061a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 300061a8: e59f0018 ldr r0, [pc, #24] ; 300061c8 <== NOT EXECUTED 300061ac: e3a01068 mov r1, #104 ; 0x68 <== NOT EXECUTED 300061b0: e59f2014 ldr r2, [pc, #20] ; 300061cc <== NOT EXECUTED 300061b4: e59f3014 ldr r3, [pc, #20] ; 300061d0 <== NOT EXECUTED 300061b8: ebfff39e bl 30003038 <__assert_func> <== NOT EXECUTED 300061bc: 30014da8 .word 0x30014da8 300061c0: 30017cec .word 0x30017cec 300061c4: 30018040 .word 0x30018040 300061c8: 30016918 .word 0x30016918 300061cc: 30014dbc .word 0x30014dbc 300061d0: 30016960 .word 0x30016960 300062cc : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 300062cc: e92d4010 push {r4, lr} 300062d0: e24dd004 sub sp, sp, #4 ; 0x4 300062d4: e1a04000 mov r4, r0 * 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 ); 300062d8: e1a00001 mov r0, r1 300062dc: e1a0100d mov r1, sp 300062e0: eb000026 bl 30006380 <_POSIX_Absolute_timeout_to_ticks> switch ( status ) { 300062e4: e3500002 cmp r0, #2 ; 0x2 300062e8: 9a000001 bls 300062f4 300062ec: e3500003 cmp r0, #3 ; 0x3 300062f0: 0a000005 beq 3000630c case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 300062f4: e1a00004 mov r0, r4 <== NOT EXECUTED 300062f8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 300062fc: e59d2000 ldr r2, [sp] <== NOT EXECUTED 30006300: ebffffb6 bl 300061e0 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED break; } } return lock_status; } 30006304: e28dd004 add sp, sp, #4 ; 0x4 30006308: e8bd8010 pop {r4, pc} case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 3000630c: e1a00004 mov r0, r4 30006310: e3a01001 mov r1, #1 ; 0x1 30006314: e59d2000 ldr r2, [sp] 30006318: ebffffb0 bl 300061e0 <_POSIX_Mutex_Lock_support> 3000631c: eafffff8 b 30006304 30004db0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 30004db0: e92d40f0 push {r4, r5, r6, r7, lr} const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 30004db4: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 30004db8: e24dd00c sub sp, sp, #12 ; 0xc const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 30004dbc: 0a000007 beq 30004de0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 30004dc0: e3510000 cmp r1, #0 ; 0x0 30004dc4: 0a000020 beq 30004e4c } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 30004dc8: e5913000 ldr r3, [r1] 30004dcc: e3530000 cmp r3, #0 ; 0x0 30004dd0: 0a000002 beq 30004de0 return EINVAL; switch ( the_attr->process_shared ) { 30004dd4: e5915004 ldr r5, [r1, #4] 30004dd8: e3550000 cmp r5, #0 ; 0x0 30004ddc: 0a000002 beq 30004dec ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 30004de0: e3a00016 mov r0, #22 ; 0x16 } 30004de4: e28dd00c add sp, sp, #12 ; 0xc 30004de8: e8bd80f0 pop {r4, r5, r6, r7, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30004dec: e59f206c ldr r2, [pc, #108] ; 30004e60 30004df0: e5923000 ldr r3, [r2] 30004df4: e2833001 add r3, r3, #1 ; 0x1 30004df8: 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 *) 30004dfc: e59f7060 ldr r7, [pc, #96] ; 30004e64 30004e00: e1a00007 mov r0, r7 30004e04: eb000a5a bl 30007774 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 30004e08: e2504000 subs r4, r0, #0 ; 0x0 30004e0c: 0a00000b beq 30004e40 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 30004e10: e2840010 add r0, r4, #16 ; 0x10 30004e14: e28d1008 add r1, sp, #8 ; 0x8 30004e18: eb000872 bl 30006fe8 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30004e1c: e5941008 ldr r1, [r4, #8] 30004e20: e597201c ldr r2, [r7, #28] 30004e24: e1a03801 lsl r3, r1, #16 30004e28: e7824723 str r4, [r2, r3, lsr #14] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 30004e2c: e584500c str r5, [r4, #12] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 30004e30: e5861000 str r1, [r6] _Thread_Enable_dispatch(); 30004e34: eb000dae bl 300084f4 <_Thread_Enable_dispatch> 30004e38: e1a00005 mov r0, r5 30004e3c: eaffffe8 b 30004de4 _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 30004e40: eb000dab bl 300084f4 <_Thread_Enable_dispatch> 30004e44: e3a0000b mov r0, #11 ; 0xb 30004e48: eaffffe5 b 30004de4 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 30004e4c: e1a0000d mov r0, sp <== NOT EXECUTED 30004e50: eb00028f bl 30005894 <== NOT EXECUTED 30004e54: e1a0400d mov r4, sp <== NOT EXECUTED 30004e58: e1a0100d mov r1, sp <== NOT EXECUTED 30004e5c: eaffffd9 b 30004dc8 <== NOT EXECUTED 30004e60: 3001960c .word 0x3001960c 30004e64: 300197e0 .word 0x300197e0 30004ed8 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30004ed8: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30004edc: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30004ee0: e24dd00c sub sp, sp, #12 ; 0xc 30004ee4: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30004ee8: 0a00000c beq 30004f20 * 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 ); 30004eec: e28d1004 add r1, sp, #4 ; 0x4 30004ef0: eb001b1d bl 3000bb6c <_POSIX_Absolute_timeout_to_ticks> switch (status) { 30004ef4: 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 ); 30004ef8: e1a05000 mov r5, r0 switch (status) { 30004efc: 93a04000 movls r4, #0 ; 0x0 30004f00: 8a000009 bhi 30004f2c 30004f04: e59f00a8 ldr r0, [pc, #168] ; 30004fb4 30004f08: e5961000 ldr r1, [r6] 30004f0c: e28d2008 add r2, sp, #8 ; 0x8 30004f10: eb000b59 bl 30007c7c <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30004f14: e59dc008 ldr ip, [sp, #8] 30004f18: e35c0000 cmp ip, #0 ; 0x0 30004f1c: 0a00000c beq 30004f54 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30004f20: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 30004f24: e28dd00c add sp, sp, #12 ; 0xc 30004f28: e8bd8070 pop {r4, r5, r6, pc} * 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 ); switch (status) { 30004f2c: e3500003 cmp r0, #3 ; 0x3 30004f30: e5961000 ldr r1, [r6] 30004f34: e59f0078 ldr r0, [pc, #120] ; 30004fb4 30004f38: e28d2008 add r2, sp, #8 ; 0x8 30004f3c: e3a04000 mov r4, #0 ; 0x0 30004f40: 03a04001 moveq r4, #1 ; 0x1 30004f44: eb000b4c bl 30007c7c <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30004f48: e59dc008 ldr ip, [sp, #8] 30004f4c: e35c0000 cmp ip, #0 ; 0x0 30004f50: 1afffff2 bne 30004f20 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 30004f54: e5961000 ldr r1, [r6] 30004f58: e2800010 add r0, r0, #16 ; 0x10 30004f5c: e59d3004 ldr r3, [sp, #4] 30004f60: e1a02004 mov r2, r4 30004f64: e58dc000 str ip, [sp] 30004f68: eb000826 bl 30007008 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 30004f6c: eb000d60 bl 300084f4 <_Thread_Enable_dispatch> if ( !do_wait && 30004f70: e3540000 cmp r4, #0 ; 0x0 30004f74: 159f103c ldrne r1, [pc, #60] ; 30004fb8 30004f78: 1a000009 bne 30004fa4 30004f7c: e59f1034 ldr r1, [pc, #52] ; 30004fb8 <== NOT EXECUTED 30004f80: e5913000 ldr r3, [r1] <== NOT EXECUTED 30004f84: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED 30004f88: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 30004f8c: 1a000004 bne 30004fa4 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 30004f90: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30004f94: 0affffe1 beq 30004f20 <== NOT EXECUTED 30004f98: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 30004f9c: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 30004fa0: 9affffdf bls 30004f24 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30004fa4: e5913000 ldr r3, [r1] 30004fa8: e5930034 ldr r0, [r3, #52] 30004fac: eb00003b bl 300050a0 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30004fb0: eaffffdb b 30004f24 30004fb4: 300197e0 .word 0x300197e0 30004fb8: 300196c4 .word 0x300196c4 30004fbc : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30004fbc: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30004fc0: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 30004fc4: e24dd00c sub sp, sp, #12 ; 0xc 30004fc8: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 30004fcc: 0a00000c beq 30005004 * 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 ); 30004fd0: e28d1004 add r1, sp, #4 ; 0x4 30004fd4: eb001ae4 bl 3000bb6c <_POSIX_Absolute_timeout_to_ticks> switch (status) { 30004fd8: 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 ); 30004fdc: e1a05000 mov r5, r0 switch (status) { 30004fe0: 93a04000 movls r4, #0 ; 0x0 30004fe4: 8a000009 bhi 30005010 30004fe8: e59f00a8 ldr r0, [pc, #168] ; 30005098 30004fec: e5961000 ldr r1, [r6] 30004ff0: e28d2008 add r2, sp, #8 ; 0x8 30004ff4: eb000b20 bl 30007c7c <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 30004ff8: e59dc008 ldr ip, [sp, #8] 30004ffc: e35c0000 cmp ip, #0 ; 0x0 30005000: 0a00000c beq 30005038 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30005004: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 30005008: e28dd00c add sp, sp, #12 ; 0xc 3000500c: e8bd8070 pop {r4, r5, r6, pc} * 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 ); switch (status) { 30005010: e3500003 cmp r0, #3 ; 0x3 30005014: e5961000 ldr r1, [r6] 30005018: e59f0078 ldr r0, [pc, #120] ; 30005098 3000501c: e28d2008 add r2, sp, #8 ; 0x8 30005020: e3a04000 mov r4, #0 ; 0x0 30005024: 03a04001 moveq r4, #1 ; 0x1 30005028: eb000b13 bl 30007c7c <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 3000502c: e59dc008 ldr ip, [sp, #8] 30005030: e35c0000 cmp ip, #0 ; 0x0 30005034: 1afffff2 bne 30005004 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 30005038: e5961000 ldr r1, [r6] 3000503c: e2800010 add r0, r0, #16 ; 0x10 30005040: e59d3004 ldr r3, [sp, #4] 30005044: e1a02004 mov r2, r4 30005048: e58dc000 str ip, [sp] 3000504c: eb000824 bl 300070e4 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 30005050: eb000d27 bl 300084f4 <_Thread_Enable_dispatch> if ( !do_wait && 30005054: e3540000 cmp r4, #0 ; 0x0 30005058: 159f103c ldrne r1, [pc, #60] ; 3000509c 3000505c: 1a000009 bne 30005088 30005060: e59f1034 ldr r1, [pc, #52] ; 3000509c <== NOT EXECUTED 30005064: e5913000 ldr r3, [r1] <== NOT EXECUTED 30005068: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED 3000506c: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 30005070: 1a000004 bne 30005088 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 30005074: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30005078: 0affffe1 beq 30005004 <== NOT EXECUTED 3000507c: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 30005080: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 30005084: 9affffdf bls 30005008 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 30005088: e5913000 ldr r3, [r1] 3000508c: e5930034 ldr r0, [r3, #52] 30005090: eb000002 bl 300050a0 <_POSIX_RWLock_Translate_core_RWLock_return_code> 30005094: eaffffdb b 30005008 30005098: 300197e0 .word 0x300197e0 3000509c: 300196c4 .word 0x300196c4 30004748 : * 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() ) 30004748: e59f309c ldr r3, [pc, #156] ; 300047ec int pthread_setcancelstate( int state, int *oldstate ) { 3000474c: e92d4030 push {r4, r5, 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() ) 30004750: e5932000 ldr r2, [r3] int pthread_setcancelstate( int state, int *oldstate ) { 30004754: e1a04000 mov r4, r0 * 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() ) 30004758: e3520000 cmp r2, #0 ; 0x0 int pthread_setcancelstate( int state, int *oldstate ) { 3000475c: e1a00001 mov r0, 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() ) 30004760: 13a00047 movne r0, #71 ; 0x47 30004764: 18bd8030 popne {r4, r5, pc} return EPROTO; if ( !oldstate ) 30004768: e3500000 cmp r0, #0 ; 0x0 3000476c: 0a000001 beq 30004778 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 30004770: e3540001 cmp r4, #1 ; 0x1 30004774: 9a000001 bls 30004780 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 30004778: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 3000477c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30004780: e59f1068 ldr r1, [pc, #104] ; 300047f0 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30004784: e59f5068 ldr r5, [pc, #104] ; 300047f4 30004788: e5913000 ldr r3, [r1] 3000478c: e5952000 ldr r2, [r5] 30004790: e2833001 add r3, r3, #1 ; 0x1 30004794: e5813000 str r3, [r1] 30004798: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 3000479c: e59230cc ldr r3, [r2, #204] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 300047a0: e3540000 cmp r4, #0 ; 0x0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 300047a4: e5803000 str r3, [r0] thread_support->cancelability_state = state; 300047a8: e58240cc str r4, [r2, #204] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 300047ac: 1a000002 bne 300047bc 300047b0: e59230d0 ldr r3, [r2, #208] 300047b4: e3530001 cmp r3, #1 ; 0x1 300047b8: 0a000002 beq 300047c8 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 300047bc: eb000a8d bl 300071f8 <_Thread_Enable_dispatch> 300047c0: e3a00000 mov r0, #0 ; 0x0 300047c4: e8bd8030 pop {r4, r5, pc} _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 300047c8: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED 300047cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300047d0: 0afffff9 beq 300047bc <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 300047d4: eb000a87 bl 300071f8 <_Thread_Enable_dispatch> <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 300047d8: e5950000 ldr r0, [r5] <== NOT EXECUTED 300047dc: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 300047e0: ebfffed1 bl 3000432c <_POSIX_Thread_Exit> <== NOT EXECUTED 300047e4: e1a00004 mov r0, r4 <== NOT EXECUTED 300047e8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 300047ec: 30014da0 .word 0x30014da0 300047f0: 30014d0c .word 0x30014d0c 300047f4: 30014dc4 .word 0x30014dc4 300047f8 : * 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() ) 300047f8: e59f3098 ldr r3, [pc, #152] ; 30004898 int pthread_setcanceltype( int type, int *oldtype ) { 300047fc: e92d4030 push {r4, r5, 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() ) 30004800: e5932000 ldr r2, [r3] int pthread_setcanceltype( int type, int *oldtype ) { 30004804: 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() ) 30004808: e3520000 cmp r2, #0 ; 0x0 3000480c: 13a00047 movne r0, #71 ; 0x47 30004810: 18bd8030 popne {r4, r5, pc} return EPROTO; if ( !oldtype ) 30004814: e3510000 cmp r1, #0 ; 0x0 30004818: 0a000001 beq 30004824 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 3000481c: e3500001 cmp r0, #1 ; 0x1 30004820: 9a000001 bls 3000482c if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 30004824: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 30004828: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 3000482c: e59f1068 ldr r1, [pc, #104] ; 3000489c return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 30004830: e59f5068 ldr r5, [pc, #104] ; 300048a0 30004834: e5913000 ldr r3, [r1] 30004838: e5952000 ldr r2, [r5] 3000483c: e2833001 add r3, r3, #1 ; 0x1 30004840: e5813000 str r3, [r1] 30004844: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 30004848: e59230d0 ldr r3, [r2, #208] 3000484c: e58c3000 str r3, [ip] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 30004850: e59240cc ldr r4, [r2, #204] thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; 30004854: e58200d0 str r0, [r2, #208] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 30004858: e3540000 cmp r4, #0 ; 0x0 3000485c: 1a000001 bne 30004868 30004860: e3500001 cmp r0, #1 ; 0x1 30004864: 0a000002 beq 30004874 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 30004868: eb000a62 bl 300071f8 <_Thread_Enable_dispatch> 3000486c: e3a00000 mov r0, #0 ; 0x0 30004870: e8bd8030 pop {r4, r5, pc} _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 30004874: e59230d4 ldr r3, [r2, #212] 30004878: e3530000 cmp r3, #0 ; 0x0 3000487c: 0afffff9 beq 30004868 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 30004880: eb000a5c bl 300071f8 <_Thread_Enable_dispatch> <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 30004884: e5950000 ldr r0, [r5] <== NOT EXECUTED 30004888: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 3000488c: ebfffea6 bl 3000432c <_POSIX_Thread_Exit> <== NOT EXECUTED 30004890: e1a00004 mov r0, r4 <== NOT EXECUTED 30004894: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30004898: 30014da0 .word 0x30014da0 3000489c: 30014d0c .word 0x30014d0c 300048a0: 30014dc4 .word 0x30014dc4 30006bb0 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 30006bb0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Check all the parameters */ if ( !param ) 30006bb4: e2525000 subs r5, r2, #0 ; 0x0 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 30006bb8: e24dd004 sub sp, sp, #4 ; 0x4 30006bbc: e1a06000 mov r6, r0 30006bc0: e1a07001 mov r7, r1 /* * Check all the parameters */ if ( !param ) 30006bc4: 0a000015 beq 30006c20 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 30006bc8: e5953000 ldr r3, [r5] 30006bcc: e2433001 sub r3, r3, #1 ; 0x1 30006bd0: e35300fd cmp r3, #253 ; 0xfd 30006bd4: 8a000011 bhi 30006c20 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 30006bd8: e3510003 cmp r1, #3 ; 0x3 30006bdc: 979ff101 ldrls pc, [pc, r1, lsl #2] 30006be0: ea00000e b 30006c20 30006be4: 30006c2c .word 0x30006c2c <== NOT EXECUTED 30006be8: 30006ccc .word 0x30006ccc <== NOT EXECUTED 30006bec: 30006cd8 .word 0x30006cd8 <== NOT EXECUTED 30006bf0: 30006bf4 .word 0x30006bf4 <== NOT EXECUTED 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 ) < 30006bf4: e2850008 add r0, r5, #8 ; 0x8 30006bf8: eb000e72 bl 3000a5c8 <_Timespec_To_ticks> 30006bfc: e1a04000 mov r4, r0 30006c00: e2850010 add r0, r5, #16 ; 0x10 30006c04: eb000e6f bl 3000a5c8 <_Timespec_To_ticks> 30006c08: e1540000 cmp r4, r0 30006c0c: 3a000003 bcc 30006c20 _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 30006c10: e5953004 ldr r3, [r5, #4] 30006c14: e2433001 sub r3, r3, #1 ; 0x1 30006c18: e35300fd cmp r3, #253 ; 0xfd 30006c1c: 9a00003a bls 30006d0c _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 30006c20: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return ESRCH; } 30006c24: e28dd004 add sp, sp, #4 ; 0x4 30006c28: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 30006c2c: e3a08001 mov r8, #1 ; 0x1 30006c30: e3a0a000 mov sl, #0 ; 0x0 30006c34: e1a01006 mov r1, r6 30006c38: e59f00e4 ldr r0, [pc, #228] ; 30006d24 30006c3c: e1a0200d mov r2, sp 30006c40: eb00084e bl 30008d80 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 30006c44: e59d3000 ldr r3, [sp] 30006c48: e1a06000 mov r6, r0 30006c4c: e3530000 cmp r3, #0 ; 0x0 30006c50: 13a00003 movne r0, #3 ; 0x3 30006c54: 1afffff2 bne 30006c24 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 30006c58: e5964108 ldr r4, [r6, #264] if ( api->schedpolicy == SCHED_SPORADIC ) 30006c5c: e594307c ldr r3, [r4, #124] 30006c60: e3530003 cmp r3, #3 ; 0x3 30006c64: 0a00002b beq 30006d18 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 30006c68: e584707c str r7, [r4, #124] api->schedparam = *param; 30006c6c: e284c080 add ip, r4, #128 ; 0x80 30006c70: e1a0e005 mov lr, r5 30006c74: e8be000f ldm lr!, {r0, r1, r2, r3} 30006c78: e8ac000f stmia ip!, {r0, r1, r2, r3} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 30006c7c: e3570000 cmp r7, #0 ; 0x0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 30006c80: e89e0003 ldm lr, {r0, r1} the_thread->budget_algorithm = budget_algorithm; 30006c84: e586807c str r8, [r6, #124] the_thread->budget_callout = budget_callout; 30006c88: e586a080 str sl, [r6, #128] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 30006c8c: e88c0003 stm ip, {r0, r1} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 30006c90: ba00000a blt 30006cc0 30006c94: e3570002 cmp r7, #2 ; 0x2 30006c98: ca000011 bgt 30006ce4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 30006c9c: e59f3084 ldr r3, [pc, #132] ; 30006d28 30006ca0: e5941080 ldr r1, [r4, #128] 30006ca4: e5932000 ldr r2, [r3] 30006ca8: e26110ff rsb r1, r1, #255 ; 0xff 30006cac: e5862078 str r2, [r6, #120] the_thread->real_priority = 30006cb0: e5861018 str r1, [r6, #24] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 30006cb4: e1a00006 mov r0, r6 30006cb8: e3a02001 mov r2, #1 ; 0x1 30006cbc: eb0008dd bl 30009038 <_Thread_Change_priority> _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 30006cc0: eb000a4c bl 300095f8 <_Thread_Enable_dispatch> 30006cc4: e3a00000 mov r0, #0 ; 0x0 30006cc8: eaffffd5 b 30006c24 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 30006ccc: e3a08000 mov r8, #0 ; 0x0 30006cd0: e1a0a008 mov sl, r8 30006cd4: eaffffd6 b 30006c34 30006cd8: e3a08002 mov r8, #2 ; 0x2 30006cdc: e3a0a000 mov sl, #0 ; 0x0 30006ce0: eaffffd3 b 30006c34 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 30006ce4: e3570003 cmp r7, #3 ; 0x3 30006ce8: 1afffff4 bne 30006cc0 TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 30006cec: e5943080 ldr r3, [r4, #128] _Watchdog_Remove( &api->Sporadic_timer ); 30006cf0: e284009c add r0, r4, #156 ; 0x9c TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 30006cf4: e5843098 str r3, [r4, #152] _Watchdog_Remove( &api->Sporadic_timer ); 30006cf8: eb000fa4 bl 3000ab90 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 30006cfc: e1a01006 mov r1, r6 30006d00: e3a00000 mov r0, #0 ; 0x0 30006d04: ebffff86 bl 30006b24 <_POSIX_Threads_Sporadic_budget_TSR> 30006d08: eaffffec b 30006cc0 if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 30006d0c: e59fa018 ldr sl, [pc, #24] ; 30006d2c 30006d10: e3a08003 mov r8, #3 ; 0x3 30006d14: eaffffc6 b 30006c34 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 30006d18: e284009c add r0, r4, #156 ; 0x9c 30006d1c: eb000f9b bl 3000ab90 <_Watchdog_Remove> 30006d20: eaffffd0 b 30006c68 30006d24: 30017f00 .word 0x30017f00 30006d28: 30017ca4 .word 0x30017ca4 30006d2c: 30006aec .word 0x30006aec 3001474c : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001474c: e59f30c8 ldr r3, [pc, #200] ; 3001481c ssize_t read( int fd, void *buffer, size_t count ) { 30014750: e1a0c000 mov ip, r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30014754: e5930000 ldr r0, [r3] ssize_t read( int fd, void *buffer, size_t count ) { 30014758: e92d4070 push {r4, r5, r6, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 3001475c: e15c0000 cmp ip, r0 ssize_t read( int fd, void *buffer, size_t count ) { 30014760: e1a06001 mov r6, r1 30014764: e1a05002 mov r5, r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30014768: 2a00001c bcs 300147e0 iop = rtems_libio_iop( fd ); 3001476c: e1a0320c lsl r3, ip, #4 30014770: e59f00a8 ldr r0, [pc, #168] ; 30014820 30014774: e043310c sub r3, r3, ip, lsl #2 30014778: e083300c add r3, r3, ip 3001477c: e590c000 ldr ip, [r0] 30014780: e1a03103 lsl r3, r3, #2 30014784: e08c4003 add r4, ip, r3 rtems_libio_check_is_open( iop ); 30014788: e594300c ldr r3, [r4, #12] 3001478c: e3130c01 tst r3, #256 ; 0x100 30014790: 0a000012 beq 300147e0 rtems_libio_check_buffer( buffer ); 30014794: e3510000 cmp r1, #0 ; 0x0 30014798: 0a000015 beq 300147f4 rtems_libio_check_count( count ); 3001479c: e3520000 cmp r2, #0 ; 0x0 300147a0: 01a00002 moveq r0, r2 300147a4: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 300147a8: e3130002 tst r3, #2 ; 0x2 300147ac: 0a000010 beq 300147f4 /* * Now process the read(). */ if ( !iop->handlers->read_h ) 300147b0: e5943030 ldr r3, [r4, #48] 300147b4: e5933008 ldr r3, [r3, #8] 300147b8: e3530000 cmp r3, #0 ; 0x0 300147bc: 0a000011 beq 30014808 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 300147c0: e1a00004 mov r0, r4 300147c4: e1a0e00f mov lr, pc 300147c8: e12fff13 bx r3 if ( rc > 0 ) 300147cc: e3500000 cmp r0, #0 ; 0x0 iop->offset += rc; 300147d0: c5943008 ldrgt r3, [r4, #8] 300147d4: c0833000 addgt r3, r3, r0 300147d8: c5843008 strgt r3, [r4, #8] return rc; } 300147dc: e8bd8070 pop {r4, r5, r6, pc} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 300147e0: ebffddc0 bl 3000bee8 <__errno> <== NOT EXECUTED 300147e4: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 300147e8: e5803000 str r3, [r0] <== NOT EXECUTED 300147ec: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300147f0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 300147f4: ebffddbb bl 3000bee8 <__errno> <== NOT EXECUTED 300147f8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 300147fc: e5803000 str r3, [r0] <== NOT EXECUTED 30014800: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30014804: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 30014808: ebffddb6 bl 3000bee8 <__errno> <== NOT EXECUTED 3001480c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30014810: e5803000 str r3, [r0] <== NOT EXECUTED 30014814: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30014818: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3001481c: 30016058 .word 0x30016058 30014820: 30016dcc .word 0x30016dcc 3001faf8 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 3001faf8: e92d4070 push {r4, r5, r6, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 3001fafc: e2514000 subs r4, r1, #0 ; 0x0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 3001fb00: e24dd010 sub sp, sp, #16 ; 0x10 3001fb04: e1a06002 mov r6, r2 rtems_filesystem_location_info_t loc; int result; if (!buf) 3001fb08: 0a00002e beq 3001fbc8 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 3001fb0c: e3a01000 mov r1, #0 ; 0x0 3001fb10: e1a0200d mov r2, sp 3001fb14: e1a03001 mov r3, r1 3001fb18: ebff90b6 bl 30003df8 if ( result != 0 ) 3001fb1c: 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 ); 3001fb20: e1a0500d mov r5, sp if ( result != 0 ) 3001fb24: 1a000025 bne 3001fbc0 return -1; if ( !loc.ops->node_type_h ){ 3001fb28: e59d2008 ldr r2, [sp, #8] 3001fb2c: e5923010 ldr r3, [r2, #16] 3001fb30: e3530000 cmp r3, #0 ; 0x0 3001fb34: 0a000019 beq 3001fba0 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 3001fb38: e1a0000d mov r0, sp 3001fb3c: e1a0e00f mov lr, pc 3001fb40: e12fff13 bx r3 3001fb44: e3500004 cmp r0, #4 ; 0x4 3001fb48: 1a000023 bne 3001fbdc rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 3001fb4c: e59d2008 ldr r2, [sp, #8] 3001fb50: e592303c ldr r3, [r2, #60] 3001fb54: e3530000 cmp r3, #0 ; 0x0 3001fb58: 0a00002c beq 3001fc10 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 3001fb5c: e1a01004 mov r1, r4 3001fb60: e1a02006 mov r2, r6 3001fb64: e1a0000d mov r0, sp 3001fb68: e1a0e00f mov lr, pc 3001fb6c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3001fb70: 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 ); 3001fb74: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3001fb78: e3530000 cmp r3, #0 ; 0x0 3001fb7c: 0a000004 beq 3001fb94 3001fb80: e593301c ldr r3, [r3, #28] 3001fb84: e3530000 cmp r3, #0 ; 0x0 3001fb88: 11a0000d movne r0, sp 3001fb8c: 11a0e00f movne lr, pc 3001fb90: 112fff13 bxne r3 return result; } 3001fb94: e1a00004 mov r0, r4 3001fb98: e28dd010 add sp, sp, #16 ; 0x10 3001fb9c: e8bd8070 pop {r4, r5, r6, pc} result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 3001fba0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3001fba4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001fba8: 11a0000d movne r0, sp <== NOT EXECUTED 3001fbac: 11a0e00f movne lr, pc <== NOT EXECUTED 3001fbb0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001fbb4: eb00378c bl 3002d9ec <__errno> <== NOT EXECUTED 3001fbb8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001fbbc: e5803000 str r3, [r0] <== NOT EXECUTED 3001fbc0: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 3001fbc4: eafffff2 b 3001fb94 <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 3001fbc8: eb003787 bl 3002d9ec <__errno> <== NOT EXECUTED 3001fbcc: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 3001fbd0: e5803000 str r3, [r0] <== NOT EXECUTED 3001fbd4: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 3001fbd8: eaffffed b 3001fb94 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 3001fbdc: e59d3008 ldr r3, [sp, #8] 3001fbe0: e3530000 cmp r3, #0 ; 0x0 3001fbe4: 0a000004 beq 3001fbfc 3001fbe8: e593301c ldr r3, [r3, #28] 3001fbec: e3530000 cmp r3, #0 ; 0x0 3001fbf0: 11a0000d movne r0, sp 3001fbf4: 11a0e00f movne lr, pc 3001fbf8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 3001fbfc: eb00377a bl 3002d9ec <__errno> 3001fc00: e3a03016 mov r3, #22 ; 0x16 3001fc04: e5803000 str r3, [r0] 3001fc08: e3e04000 mvn r4, #0 ; 0x0 3001fc0c: eaffffe0 b 3001fb94 } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 3001fc10: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3001fc14: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001fc18: 11a0000d movne r0, sp <== NOT EXECUTED 3001fc1c: 11a0e00f movne lr, pc <== NOT EXECUTED 3001fc20: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001fc24: eb003770 bl 3002d9ec <__errno> <== NOT EXECUTED 3001fc28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001fc2c: e5803000 str r3, [r0] <== NOT EXECUTED 3001fc30: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 3001fc34: eaffffd6 b 3001fb94 <== NOT EXECUTED 3001488c : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 3001488c: e92d40f0 push {r4, r5, r6, r7, lr} /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30014890: e59f2114 ldr r2, [pc, #276] ; 300149ac { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 30014894: e59f7114 ldr r7, [pc, #276] ; 300149b0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30014898: e592c000 ldr ip, [r2] { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 3001489c: e5973010 ldr r3, [r7, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 300148a0: e35c0003 cmp ip, #3 ; 0x3 { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 300148a4: e2833001 add r3, r3, #1 ; 0x1 300148a8: e24dd004 sub sp, sp, #4 ; 0x4 300148ac: e5873010 str r3, [r7, #16] 300148b0: e1a04000 mov r4, r0 300148b4: e1a06001 mov r6, r1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 300148b8: 0a00001f beq 3001493c } /* * Continue with realloc(). */ if ( !ptr ) 300148bc: e3540000 cmp r4, #0 ; 0x0 300148c0: 0a000010 beq 30014908 return malloc( size ); if ( !size ) { 300148c4: e3560000 cmp r6, #0 ; 0x0 300148c8: 0a000012 beq 30014918 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 300148cc: e59f00e0 ldr r0, [pc, #224] ; 300149b4 300148d0: e1a01004 mov r1, r4 300148d4: e1a0200d mov r2, sp 300148d8: eb00006e bl 30014a98 <_Protected_heap_Get_block_size> 300148dc: e2505000 subs r5, r0, #0 ; 0x0 300148e0: 0a000010 beq 30014928 #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 ) ) { 300148e4: e59f00c8 ldr r0, [pc, #200] ; 300149b4 300148e8: e1a01004 mov r1, r4 300148ec: e1a02006 mov r2, r6 300148f0: eb000079 bl 30014adc <_Protected_heap_Resize_block> 300148f4: e3500000 cmp r0, #0 ; 0x0 300148f8: 0a00001b beq 3001496c memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 300148fc: e1a00004 mov r0, r4 30014900: e28dd004 add sp, sp, #4 ; 0x4 30014904: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 30014908: e1a00006 mov r0, r6 <== NOT EXECUTED 3001490c: ebffd315 bl 30009568 <== NOT EXECUTED 30014910: e1a04000 mov r4, r0 <== NOT EXECUTED 30014914: eafffff8 b 300148fc <== NOT EXECUTED if ( !size ) { free( ptr ); 30014918: e1a00004 mov r0, r4 <== NOT EXECUTED 3001491c: ebffd1a1 bl 30008fa8 <== NOT EXECUTED 30014920: e1a04006 mov r4, r6 <== NOT EXECUTED 30014924: eafffff4 b 300148fc <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 30014928: ebffdd6e bl 3000bee8 <__errno> 3001492c: e3a03016 mov r3, #22 ; 0x16 30014930: e5803000 str r3, [r0] 30014934: e1a04005 mov r4, r5 30014938: eaffffef b 300148fc /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 3001493c: e59f3074 ldr r3, [pc, #116] ; 300149b8 30014940: e5932000 ldr r2, [r3] 30014944: e3520000 cmp r2, #0 ; 0x0 30014948: 0a000001 beq 30014954 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 3001494c: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 30014950: eaffffe9 b 300148fc <== NOT EXECUTED if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 30014954: e59f3060 ldr r3, [pc, #96] ; 300149bc 30014958: e5932000 ldr r2, [r3] 3001495c: e3520000 cmp r2, #0 ; 0x0 30014960: 0affffd5 beq 300148bc } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 30014964: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 30014968: eaffffe3 b 300148fc <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 3001496c: e1a00006 mov r0, r6 30014970: ebffd2fc bl 30009568 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 30014974: e5973004 ldr r3, [r7, #4] if ( !new_area ) { 30014978: e2505000 subs r5, r0, #0 ; 0x0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 3001497c: e2433001 sub r3, r3, #1 ; 0x1 30014980: e5873004 str r3, [r7, #4] if ( !new_area ) { 30014984: 0afffff0 beq 3001494c return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 30014988: e59d2000 ldr r2, [sp] 3001498c: e1a01004 mov r1, r4 30014990: e1560002 cmp r6, r2 30014994: 31a02006 movcc r2, r6 30014998: ebffdf1c bl 3000c610 free( ptr ); 3001499c: e1a00004 mov r0, r4 300149a0: ebffd180 bl 30008fa8 300149a4: e1a04005 mov r4, r5 300149a8: eaffffd3 b 300148fc 300149ac: 300170f4 .word 0x300170f4 300149b0: 30016e30 .word 0x30016e30 300149b4: 30016dd8 .word 0x30016dd8 300149b8: 30016f4c .word 0x30016f4c 300149bc: 30016fe0 .word 0x30016fe0 3001fd6c : #include int rmdir( const char *pathname ) { 3001fd6c: e92d4030 push {r4, r5, lr} /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 3001fd70: e3a01000 mov r1, #0 ; 0x0 #include int rmdir( const char *pathname ) { 3001fd74: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 3001fd78: e1a0200d mov r2, sp 3001fd7c: e1a03001 mov r3, r1 3001fd80: ebff901c bl 30003df8 if ( result != 0 ) 3001fd84: e3500000 cmp r0, #0 ; 0x0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 3001fd88: e1a0500d mov r5, sp if ( result != 0 ) 3001fd8c: 0a000003 beq 3001fda0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); rtems_filesystem_freenode( &loc ); 3001fd90: e3e04000 mvn r4, #0 ; 0x0 return result; } 3001fd94: e1a00004 mov r0, r4 3001fd98: e28dd010 add sp, sp, #16 ; 0x10 3001fd9c: e8bd8030 pop {r4, r5, pc} result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 3001fda0: e2800002 add r0, r0, #2 ; 0x2 3001fda4: e1a0100d mov r1, sp 3001fda8: ebff8fe8 bl 30003d50 if (result != 0) { 3001fdac: e3500000 cmp r0, #0 ; 0x0 3001fdb0: 1a000027 bne 3001fe54 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 3001fdb4: e59d2008 ldr r2, [sp, #8] 3001fdb8: e5923010 ldr r3, [r2, #16] 3001fdbc: e3530000 cmp r3, #0 ; 0x0 3001fdc0: 0a00002e beq 3001fe80 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 3001fdc4: e1a0000d mov r0, sp 3001fdc8: e1a0e00f mov lr, pc 3001fdcc: e12fff13 bx r3 3001fdd0: e3500001 cmp r0, #1 ; 0x1 3001fdd4: 1a000011 bne 3001fe20 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 3001fdd8: e59d3004 ldr r3, [sp, #4] 3001fddc: e5933034 ldr r3, [r3, #52] 3001fde0: e3530000 cmp r3, #0 ; 0x0 3001fde4: 0a000030 beq 3001feac rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); 3001fde8: e1a0000d mov r0, sp 3001fdec: e1a0e00f mov lr, pc 3001fdf0: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3001fdf4: 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 ); 3001fdf8: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3001fdfc: e3530000 cmp r3, #0 ; 0x0 3001fe00: 0affffe3 beq 3001fd94 3001fe04: e593301c ldr r3, [r3, #28] 3001fe08: e3530000 cmp r3, #0 ; 0x0 3001fe0c: 0affffe0 beq 3001fd94 3001fe10: e1a0000d mov r0, sp 3001fe14: e1a0e00f mov lr, pc 3001fe18: e12fff13 bx r3 3001fe1c: eaffffdc b 3001fd94 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 3001fe20: e59d3008 ldr r3, [sp, #8] 3001fe24: e3530000 cmp r3, #0 ; 0x0 3001fe28: 0a000004 beq 3001fe40 3001fe2c: e593301c ldr r3, [r3, #28] 3001fe30: e3530000 cmp r3, #0 ; 0x0 3001fe34: 11a0000d movne r0, sp 3001fe38: 11a0e00f movne lr, pc 3001fe3c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 3001fe40: eb0036e9 bl 3002d9ec <__errno> 3001fe44: e3a03014 mov r3, #20 ; 0x14 3001fe48: e5803000 str r3, [r0] 3001fe4c: e3e04000 mvn r4, #0 ; 0x0 3001fe50: eaffffcf b 3001fd94 if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0) { rtems_filesystem_freenode( &loc ); 3001fe54: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3001fe58: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001fe5c: 0affffcb beq 3001fd90 <== NOT EXECUTED 3001fe60: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001fe64: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001fe68: 0affffc8 beq 3001fd90 <== NOT EXECUTED 3001fe6c: e1a0000d mov r0, sp <== NOT EXECUTED 3001fe70: e1a0e00f mov lr, pc <== NOT EXECUTED 3001fe74: e12fff13 bx r3 <== NOT EXECUTED 3001fe78: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 3001fe7c: eaffffc4 b 3001fd94 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 3001fe80: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3001fe84: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001fe88: 0a000002 beq 3001fe98 <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 3001fe8c: e1a0000d mov r0, sp <== NOT EXECUTED 3001fe90: e1a0e00f mov lr, pc <== NOT EXECUTED 3001fe94: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001fe98: eb0036d3 bl 3002d9ec <__errno> <== NOT EXECUTED 3001fe9c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001fea0: e5803000 str r3, [r0] <== NOT EXECUTED 3001fea4: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 3001fea8: eaffffb9 b 3001fd94 <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 3001feac: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3001feb0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001feb4: 0afffff7 beq 3001fe98 <== NOT EXECUTED 3001feb8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3001febc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001fec0: 1afffff1 bne 3001fe8c <== NOT EXECUTED 3001fec4: eafffff3 b 3001fe98 <== NOT EXECUTED 300151dc : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 300151dc: e59f0000 ldr r0, [pc, #0] ; 300151e4 <== NOT EXECUTED 300151e0: e12fff1e bx lr <== NOT EXECUTED 300151e4: 300262bc .word 0x300262bc 30010908 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 30010908: e92d4010 push {r4, lr} <== NOT EXECUTED 3001090c: e1a04001 mov r4, r1 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 30010910: eb000006 bl 30010930 <== NOT EXECUTED if (nap) 30010914: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30010918: 0a000001 beq 30010924 <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 3001091c: e5900000 ldr r0, [r0] <== NOT EXECUTED 30010920: 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); 30010924: e1a00004 mov r0, r4 <== NOT EXECUTED } 30010928: 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); 3001092c: ea00122a b 300151dc <== NOT EXECUTED 3000be0c : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 3000be0c: e92d4030 push {r4, r5, lr} 3000be10: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 3000be14: e5900000 ldr r0, [r0] const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 3000be18: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 3000be1c: e3500000 cmp r0, #0 ; 0x0 3000be20: 01a04000 moveq r4, r0 3000be24: 0a000013 beq 3000be78 3000be28: e59f105c ldr r1, [pc, #92] ; 3000be8c 3000be2c: eb0004fb bl 3000d220 3000be30: e3500000 cmp r0, #0 ; 0x0 3000be34: 13a01000 movne r1, #0 ; 0x0 3000be38: 1a00000b bne 3000be6c default_ap = ap++; for ( ; ap->name; ap++) 3000be3c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 3000be40: e284200c add r2, r4, #12 ; 0xc <== NOT EXECUTED for ( ; ap->name; ap++) 3000be44: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3000be48: 0a00000a beq 3000be78 <== NOT EXECUTED 3000be4c: e1a01004 mov r1, r4 <== NOT EXECUTED 3000be50: e1a04002 mov r4, r2 <== NOT EXECUTED if (ap->local_value == local_value) 3000be54: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 3000be58: e1530005 cmp r3, r5 <== NOT EXECUTED 3000be5c: 0a000005 beq 3000be78 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 3000be60: e5b4300c ldr r3, [r4, #12]! 3000be64: e3530000 cmp r3, #0 ; 0x0 3000be68: 0a000004 beq 3000be80 if (ap->local_value == local_value) 3000be6c: e5943004 ldr r3, [r4, #4] 3000be70: e1530005 cmp r3, r5 3000be74: 1afffff9 bne 3000be60 return ap; return default_ap; } 3000be78: e1a00004 mov r0, r4 3000be7c: e8bd8030 pop {r4, r5, pc} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 3000be80: e1a04001 mov r4, r1 if (ap->local_value == local_value) return ap; return default_ap; } 3000be84: e1a00004 mov r0, r4 3000be88: e8bd8030 pop {r4, r5, pc} 3000be8c: 30015e68 .word 0x30015e68 3000b4cc : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 3000b4cc: e92d4030 push {r4, r5, lr} 3000b4d0: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 3000b4d4: e5900000 ldr r0, [r0] const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 3000b4d8: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 3000b4dc: e3500000 cmp r0, #0 ; 0x0 3000b4e0: 01a04000 moveq r4, r0 3000b4e4: 0a000013 beq 3000b538 3000b4e8: e59f105c ldr r1, [pc, #92] ; 3000b54c 3000b4ec: eb00074b bl 3000d220 3000b4f0: e3500000 cmp r0, #0 ; 0x0 3000b4f4: 13a01000 movne r1, #0 ; 0x0 3000b4f8: 1a00000b bne 3000b52c default_ap = ap++; for ( ; ap->name; ap++) 3000b4fc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 3000b500: e284200c add r2, r4, #12 ; 0xc <== NOT EXECUTED for ( ; ap->name; ap++) 3000b504: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3000b508: 0a00000a beq 3000b538 <== NOT EXECUTED 3000b50c: e1a01004 mov r1, r4 <== NOT EXECUTED 3000b510: e1a04002 mov r4, r2 <== NOT EXECUTED if (ap->remote_value == remote_value) 3000b514: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 3000b518: e1530005 cmp r3, r5 <== NOT EXECUTED 3000b51c: 0a000005 beq 3000b538 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 3000b520: e5b4300c ldr r3, [r4, #12]! 3000b524: e3530000 cmp r3, #0 ; 0x0 3000b528: 0a000004 beq 3000b540 if (ap->remote_value == remote_value) 3000b52c: e5943008 ldr r3, [r4, #8] 3000b530: e1530005 cmp r3, r5 3000b534: 1afffff9 bne 3000b520 return ap; return default_ap; } 3000b538: e1a00004 mov r0, r4 3000b53c: e8bd8030 pop {r4, r5, pc} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 3000b540: e1a04001 mov r4, r1 if (ap->remote_value == remote_value) return ap; return default_ap; } 3000b544: e1a00004 mov r0, r4 3000b548: e8bd8030 pop {r4, r5, pc} 3000b54c: 30015e68 .word 0x30015e68 3000b550 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 3000b550: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 3000b554: eb00022c bl 3000be0c <== NOT EXECUTED if (nap) 3000b558: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return nap->remote_value; 3000b55c: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } 3000b560: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30003eb4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 30003eb4: e92d4010 push {r4, lr} if ( !time_buffer ) 30003eb8: e2514000 subs r4, r1, #0 ; 0x0 30003ebc: 03a00009 moveq r0, #9 ; 0x9 30003ec0: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 30003ec4: e3500004 cmp r0, #4 ; 0x4 30003ec8: 979ff100 ldrls pc, [pc, r0, lsl #2] 30003ecc: ea000004 b 30003ee4 30003ed0: 30003eec .word 0x30003eec <== NOT EXECUTED 30003ed4: 30003ef8 .word 0x30003ef8 <== NOT EXECUTED 30003ed8: 30003f04 .word 0x30003f04 <== NOT EXECUTED 30003edc: 30003f14 .word 0x30003f14 <== NOT EXECUTED 30003ee0: 30003f24 .word 0x30003f24 <== NOT EXECUTED 30003ee4: e3a0000a mov r0, #10 ; 0xa 30003ee8: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 30003eec: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003ef0: 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 ); 30003ef4: ea000027 b 30003f98 case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 30003ef8: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003efc: 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); 30003f00: ea00000a b 30003f30 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 30003f04: eb00001f bl 30003f88 30003f08: e5840000 str r0, [r4] 30003f0c: e3a00000 mov r0, #0 ; 0x0 30003f10: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 30003f14: eb000013 bl 30003f68 30003f18: e5840000 str r0, [r4] 30003f1c: e3a00000 mov r0, #0 ; 0x0 30003f20: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 30003f24: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003f28: 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 ); 30003f2c: ea00004d b 30004068 3000b0c4 : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 3000b0c4: e92d4010 push {r4, lr} <== NOT EXECUTED 3000b0c8: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) 3000b0cc: e59f0018 ldr r0, [pc, #24] ; 3000b0ec <== NOT EXECUTED 3000b0d0: eb00011e bl 3000b550 <== NOT EXECUTED 3000b0d4: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 3000b0d8: 0a000001 beq 3000b0e4 <== NOT EXECUTED { errno = rc; 3000b0dc: eb000381 bl 3000bee8 <__errno> <== NOT EXECUTED 3000b0e0: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } 3000b0e4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3000b0e8: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3000b0ec: 30015530 .word 0x30015530 3000693c : int rtems_error( int error_flag, const char *printf_format, ... ) { 3000693c: e92d000e push {r1, r2, r3} <== NOT EXECUTED 30006940: 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); 30006944: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 30006948: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 3000694c: ebffff7b bl 30006740 <== NOT EXECUTED va_end(arglist); return chars_written; } 30006950: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 30006954: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 30006958: e12fff1e bx lr <== NOT EXECUTED 300012d8 : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 300012d8: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 300012dc: e3510000 cmp r1, #0 ; 0x0 int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 300012e0: e24dd010 sub sp, sp, #16 ; 0x10 300012e4: e1a0e000 mov lr, r0 rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 300012e8: 0a00001e beq 30001368 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 300012ec: e5913008 ldr r3, [r1, #8] 300012f0: e593c000 ldr ip, [r3] 300012f4: e35c0000 cmp ip, #0 ; 0x0 300012f8: 0a000015 beq 30001354 rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 300012fc: e891000f ldm r1, {r0, r1, r2, r3} 30001300: e88d000f stm sp, {r0, r1, r2, r3} result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 30001304: e1a0100e mov r1, lr 30001308: e59f006c ldr r0, [pc, #108] ; 3000137c 3000130c: e1a0200d mov r2, sp 30001310: e1a0e00f mov lr, pc 30001314: e12fff1c bx ip if (result != 0){ 30001318: e2505000 subs r5, 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; 3000131c: e1a0400d mov r4, sp result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); if (result != 0){ 30001320: 13e05000 mvnne r5, #0 ; 0x0 30001324: 1a000007 bne 30001348 return -1; } rtems_filesystem_freenode( &parent ); 30001328: e59d3008 ldr r3, [sp, #8] 3000132c: e3530000 cmp r3, #0 ; 0x0 30001330: 0a000004 beq 30001348 30001334: e593301c ldr r3, [r3, #28] 30001338: e3530000 cmp r3, #0 ; 0x0 3000133c: 11a0000d movne r0, sp 30001340: 11a0e00f movne lr, pc 30001344: 112fff13 bxne r3 return result; } 30001348: e1a00005 mov r0, r5 3000134c: e28dd010 add sp, sp, #16 ; 0x10 30001350: e8bd8030 pop {r4, r5, pc} if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001354: eb002ae3 bl 3000bee8 <__errno> <== NOT EXECUTED 30001358: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000135c: e5803000 str r3, [r0] <== NOT EXECUTED 30001360: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 30001364: eafffff7 b 30001348 <== NOT EXECUTED { rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 30001368: eb002ade bl 3000bee8 <__errno> <== NOT EXECUTED 3000136c: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 30001370: e5803000 str r3, [r0] <== NOT EXECUTED 30001374: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 30001378: eafffff2 b 30001348 <== NOT EXECUTED 3000137c: 30015b30 .word 0x30015b30 30001380 : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 30001380: e92d40f0 push {r4, r5, r6, r7, lr} /* * Verify Input parameters. */ if ( !pathname ) 30001384: e2505000 subs r5, r0, #0 ; 0x0 const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 30001388: e1a07001 mov r7, r1 3000138c: e1a04002 mov r4, r2 30001390: e1a06003 mov r6, r3 /* * Verify Input parameters. */ if ( !pathname ) 30001394: 0a000043 beq 300014a8 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 30001398: e3520000 cmp r2, #0 ; 0x0 3000139c: 0a000046 beq 300014bc /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 300013a0: e5d53000 ldrb r3, [r5] 300013a4: e353005c cmp r3, #92 ; 0x5c 300013a8: 1353002f cmpne r3, #47 ; 0x2f 300013ac: 13a02000 movne r2, #0 ; 0x0 300013b0: 03a02001 moveq r2, #1 ; 0x1 300013b4: 1a000028 bne 3000145c 300013b8: e59f3110 ldr r3, [pc, #272] ; 300014d0 300013bc: e3a0e001 mov lr, #1 ; 0x1 300013c0: e593c000 ldr ip, [r3] 300013c4: e28cc014 add ip, ip, #20 ; 0x14 300013c8: e89c000f ldm ip, {r0, r1, r2, r3} 300013cc: e884000f stm r4, {r0, r1, r2, r3} if ( !pathloc->ops->evalpath_h ) 300013d0: e5943008 ldr r3, [r4, #8] 300013d4: e5933000 ldr r3, [r3] 300013d8: e3530000 cmp r3, #0 ; 0x0 300013dc: 0a00002c beq 30001494 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 300013e0: e085000e add r0, r5, lr 300013e4: e1a01007 mov r1, r7 300013e8: e1a02004 mov r2, r4 300013ec: e1a0e00f mov lr, pc 300013f0: e12fff13 bx r3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 300013f4: e2703001 rsbs r3, r0, #1 ; 0x1 300013f8: 33a03000 movcc r3, #0 ; 0x0 300013fc: e3560000 cmp r6, #0 ; 0x0 30001400: 03a03000 moveq r3, #0 ; 0x0 30001404: e3530000 cmp r3, #0 ; 0x0 30001408: 08bd80f0 popeq {r4, r5, r6, r7, pc} if ( !pathloc->ops->node_type_h ){ 3000140c: e5942008 ldr r2, [r4, #8] 30001410: e5923010 ldr r3, [r2, #16] 30001414: e3530000 cmp r3, #0 ; 0x0 30001418: 0a000018 beq 30001480 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 3000141c: e1a00004 mov r0, r4 30001420: e1a0e00f mov lr, pc 30001424: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 30001428: e2400003 sub r0, r0, #3 ; 0x3 3000142c: e3500001 cmp r0, #1 ; 0x1 30001430: 83a00000 movhi r0, #0 ; 0x0 30001434: 88bd80f0 pophi {r4, r5, r6, r7, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 30001438: e5942008 ldr r2, [r4, #8] 3000143c: e5923034 ldr r3, [r2, #52] 30001440: e3530000 cmp r3, #0 ; 0x0 30001444: 0a00000d beq 30001480 * 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 ); 30001448: e1a00004 mov r0, r4 3000144c: e1a01007 mov r1, r7 30001450: e1a0e00f mov lr, pc 30001454: e12fff13 bx r3 } } return result; } 30001458: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 3000145c: e3530000 cmp r3, #0 ; 0x0 30001460: 0affffd4 beq 300013b8 30001464: e59f3064 ldr r3, [pc, #100] ; 300014d0 30001468: e1a0e002 mov lr, r2 3000146c: e593c000 ldr ip, [r3] 30001470: e28cc004 add ip, ip, #4 ; 0x4 30001474: e89c000f ldm ip, {r0, r1, r2, r3} 30001478: e884000f stm r4, {r0, r1, r2, r3} 3000147c: eaffffd3 b 300013d0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 30001480: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30001484: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001488: 11a00004 movne r0, r4 <== NOT EXECUTED 3000148c: 11a0e00f movne lr, pc <== NOT EXECUTED 30001490: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001494: eb002a93 bl 3000bee8 <__errno> <== NOT EXECUTED 30001498: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000149c: e5803000 str r3, [r0] <== NOT EXECUTED 300014a0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300014a4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 300014a8: eb002a8e bl 3000bee8 <__errno> 300014ac: e3a0300e mov r3, #14 ; 0xe 300014b0: e5803000 str r3, [r0] 300014b4: e3e00000 mvn r0, #0 ; 0x0 300014b8: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 300014bc: eb002a89 bl 3000bee8 <__errno> <== NOT EXECUTED 300014c0: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 300014c4: e5803000 str r3, [r0] <== NOT EXECUTED 300014c8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300014cc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 300014d0: 30016660 .word 0x30016660 30008d9c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 30008d9c: e92d4070 push {r4, r5, r6, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 30008da0: e59f60e0 ldr r6, [pc, #224] ; 30008e88 30008da4: e3a03012 mov r3, #18 ; 0x12 30008da8: e5962000 ldr r2, [r6] * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 30008dac: e24dd018 sub sp, sp, #24 ; 0x18 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 30008db0: e5823024 str r3, [r2, #36] init_fs_mount_table(); 30008db4: eb00022b bl 30009668 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 30008db8: e59f30cc ldr r3, [pc, #204] ; 30008e8c 30008dbc: e5932000 ldr r2, [r3] 30008dc0: e3520000 cmp r2, #0 ; 0x0 30008dc4: 0a000029 beq 30008e70 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 30008dc8: e59f30c0 ldr r3, [pc, #192] ; 30008e90 status = mount( 30008dcc: e28d0014 add r0, sp, #20 ; 0x14 */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 30008dd0: e593c000 ldr ip, [r3] status = mount( 30008dd4: e89c001e ldm ip, {r1, r2, r3, r4} 30008dd8: e58d4000 str r4, [sp] 30008ddc: eb000228 bl 30009684 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 30008de0: e3700001 cmn r0, #1 ; 0x1 30008de4: 0a000023 beq 30008e78 rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 30008de8: e5965000 ldr r5, [r6] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 30008dec: e59dc014 ldr ip, [sp, #20] 30008df0: e285e014 add lr, r5, #20 ; 0x14 30008df4: e28cc018 add ip, ip, #24 ; 0x18 30008df8: e89c000f ldm ip, {r0, r1, r2, r3} /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 30008dfc: 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; 30008e00: e88e000f stm lr, {r0, r1, r2, r3} /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 30008e04: 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; 30008e08: e3a03000 mov r3, #0 ; 0x0 30008e0c: e1c532b8 strh r3, [r5, #40] * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 30008e10: e1a02004 mov r2, r4 30008e14: e1a03001 mov r3, r1 30008e18: e59f0074 ldr r0, [pc, #116] ; 30008e94 30008e1c: ebffe157 bl 30001380 rtems_filesystem_root = loc; 30008e20: e894000f ldm r4, {r0, r1, r2, r3} 30008e24: e596c000 ldr ip, [r6] 30008e28: e28cc014 add ip, ip, #20 ; 0x14 30008e2c: e88c000f stm ip, {r0, r1, r2, r3} /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 30008e30: e3a01000 mov r1, #0 ; 0x0 30008e34: e1a02004 mov r2, r4 30008e38: e1a03001 mov r3, r1 30008e3c: e59f0050 ldr r0, [pc, #80] ; 30008e94 30008e40: ebffe14e bl 30001380 rtems_filesystem_current = loc; 30008e44: e894000f ldm r4, {r0, r1, r2, r3} 30008e48: e596c000 ldr ip, [r6] 30008e4c: e28cc004 add ip, ip, #4 ; 0x4 30008e50: 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); 30008e54: e59f003c ldr r0, [pc, #60] ; 30008e98 30008e58: e59f103c ldr r1, [pc, #60] ; 30008e9c 30008e5c: eb0001fd bl 30009658 if ( status != 0 ) 30008e60: e3500000 cmp r0, #0 ; 0x0 30008e64: 1a000005 bne 30008e80 * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ #endif } 30008e68: e28dd018 add sp, sp, #24 ; 0x18 30008e6c: e8bd8070 pop {r4, r5, r6, pc} /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 30008e70: e59f0028 ldr r0, [pc, #40] ; 30008ea0 <== NOT EXECUTED 30008e74: ebfff006 bl 30004e94 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 30008e78: e59f0024 ldr r0, [pc, #36] ; 30008ea4 <== NOT EXECUTED 30008e7c: ebfff004 bl 30004e94 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 30008e80: e59f0020 ldr r0, [pc, #32] ; 30008ea8 <== NOT EXECUTED 30008e84: ebfff002 bl 30004e94 <== NOT EXECUTED 30008e88: 30016660 .word 0x30016660 30008e8c: 30015070 .word 0x30015070 30008e90: 30016060 .word 0x30016060 30008e94: 30015d24 .word 0x30015d24 30008e98: 30015d28 .word 0x30015d28 30008e9c: 000001ff .word 0x000001ff 30008ea0: abcd0001 .word 0xabcd0001 30008ea4: abcd0002 .word 0xabcd0002 30008ea8: abcd0003 .word 0xabcd0003 300202d8 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 300202d8: e5903000 ldr r3, [r0] <== NOT EXECUTED 300202dc: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 300202e0: e1530000 cmp r3, r0 <== NOT EXECUTED 300202e4: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 300202e8: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED 300202ec: e12fff1e bx lr <== NOT EXECUTED 300011a0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 300011a0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 300011a4: 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 ); 300011a8: e1a0200d mov r2, sp <== NOT EXECUTED 300011ac: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 300011b0: 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 ); 300011b4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 300011b8: 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 ); 300011bc: eb00006f bl 30001380 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 300011c0: 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 ); 300011c4: e1a0700d mov r7, sp <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 300011c8: 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 ); 300011cc: e1a04000 mov r4, r0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 300011d0: 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; 300011d4: e59d8000 ldr r8, [sp] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 300011d8: 0a000013 beq 3000122c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 300011dc: e1a0000d mov r0, sp <== NOT EXECUTED 300011e0: e1a0e00f mov lr, pc <== NOT EXECUTED 300011e4: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 300011e8: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 300011ec: 03540000 cmpeq r4, #0 ; 0x0 <== NOT EXECUTED 300011f0: 03a04000 moveq r4, #0 ; 0x0 <== NOT EXECUTED 300011f4: 13a04001 movne r4, #1 ; 0x1 <== NOT EXECUTED 300011f8: 0a000015 beq 30001254 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 300011fc: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30001200: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001204: 0a000025 beq 300012a0 <== NOT EXECUTED 30001208: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000120c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001210: 0a000022 beq 300012a0 <== NOT EXECUTED 30001214: e1a0000d mov r0, sp <== NOT EXECUTED 30001218: e1a0e00f mov lr, pc <== NOT EXECUTED 3000121c: e12fff13 bx r3 <== NOT EXECUTED 30001220: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED rtems_filesystem_freenode( &loc ); #endif return RTEMS_SUCCESSFUL; } 30001224: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 30001228: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 3000122c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30001230: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001234: 11a0000d movne r0, sp <== NOT EXECUTED 30001238: 11a0e00f movne lr, pc <== NOT EXECUTED 3000123c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001240: eb002b28 bl 3000bee8 <__errno> <== NOT EXECUTED 30001244: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30001248: e5803000 str r3, [r0] <== NOT EXECUTED 3000124c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30001250: eafffff3 b 30001224 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 30001254: e5856000 str r6, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 30001258: e1a00006 mov r0, r6 <== NOT EXECUTED 3000125c: eb003057 bl 3000d3c0 <== NOT EXECUTED 30001260: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 30001264: e5983050 ldr r3, [r8, #80] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 30001268: e59d1008 ldr r1, [sp, #8] <== 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; 3000126c: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 30001270: e5982054 ldr r2, [r8, #84] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 30001274: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 30001278: e585200c str r2, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 3000127c: 0a000009 beq 300012a8 <== NOT EXECUTED 30001280: e591301c ldr r3, [r1, #28] <== NOT EXECUTED 30001284: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30001288: 0a000006 beq 300012a8 <== NOT EXECUTED 3000128c: e1a0000d mov r0, sp <== NOT EXECUTED 30001290: e1a0e00f mov lr, pc <== NOT EXECUTED 30001294: e12fff13 bx r3 <== NOT EXECUTED 30001298: e1a00004 mov r0, r4 <== NOT EXECUTED 3000129c: eaffffe0 b 30001224 <== NOT EXECUTED 300012a0: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED 300012a4: eaffffde b 30001224 <== NOT EXECUTED 300012a8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300012ac: eaffffdc b 30001224 <== NOT EXECUTED 30006284 : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 30006284: e251c000 subs ip, r1, #0 ; 0x0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 30006288: e92d00f0 push {r4, r5, r6, r7} 3000628c: e1a06000 mov r6, r0 30006290: e1a07002 mov r7, r2 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 30006294: 0a00003e beq 30006394 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 30006298: e3520000 cmp r2, #0 ; 0x0 3000629c: 0a00003c beq 30006394 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 300062a0: e59c3000 ldr r3, [ip] 300062a4: e3530000 cmp r3, #0 ; 0x0 300062a8: 0a000036 beq 30006388 return RTEMS_INVALID_ADDRESS; *registered_major = 0; 300062ac: e3a03000 mov r3, #0 ; 0x0 /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 300062b0: e59f20e4 ldr r2, [pc, #228] ; 3000639c return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 300062b4: e5873000 str r3, [r7] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 300062b8: e5922000 ldr r2, [r2] 300062bc: e1520006 cmp r2, r6 300062c0: 93a0000a movls r0, #10 ; 0xa 300062c4: 9a00002b bls 30006378 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 300062c8: e3560000 cmp r6, #0 ; 0x0 300062cc: 1a00001d bne 30006348 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 300062d0: e2526001 subs r6, r2, #1 ; 0x1 300062d4: 0a000029 beq 30006380 300062d8: e1a03282 lsl r3, r2, #5 300062dc: e0433182 sub r3, r3, r2, lsl #3 300062e0: e59f20b8 ldr r2, [pc, #184] ; 300063a0 300062e4: e2433018 sub r3, r3, #24 ; 0x18 300062e8: e5921000 ldr r1, [r2] 300062ec: e0811003 add r1, r1, r3 300062f0: ea000002 b 30006300 300062f4: e2566001 subs r6, r6, #1 ; 0x1 300062f8: e2411018 sub r1, r1, #24 ; 0x18 300062fc: 0a00001f beq 30006380 if ( !_IO_Driver_address_table[major].initialization_entry && 30006300: e5913000 ldr r3, [r1] * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 30006304: e1a05001 mov r5, r1 if ( !_IO_Driver_address_table[major].initialization_entry && 30006308: e3530000 cmp r3, #0 ; 0x0 3000630c: 1afffff8 bne 300062f4 30006310: e5913004 ldr r3, [r1, #4] 30006314: e3530000 cmp r3, #0 ; 0x0 30006318: 1afffff5 bne 300062f4 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 3000631c: e1a04005 mov r4, r5 30006320: e8bc000f ldm ip!, {r0, r1, r2, r3} 30006324: e8a4000f stmia r4!, {r0, r1, r2, r3} 30006328: e89c0003 ldm ip, {r0, r1} 3000632c: e8840003 stm r4, {r0, r1} *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 30006330: e3a01000 mov r1, #0 ; 0x0 30006334: e1a00006 mov r0, r6 30006338: e1a02001 mov r2, r1 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 3000633c: e5876000 str r6, [r7] return rtems_io_initialize( major, 0, NULL ); } 30006340: e8bd00f0 pop {r4, r5, r6, r7} _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 30006344: eaffff58 b 300060ac if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 30006348: e59f2050 ldr r2, [pc, #80] ; 300063a0 3000634c: e1a03286 lsl r3, r6, #5 30006350: e5921000 ldr r1, [r2] 30006354: e0433186 sub r3, r3, r6, lsl #3 30006358: e7912003 ldr r2, [r1, r3] 3000635c: e0815003 add r5, r1, r3 30006360: e3520000 cmp r2, #0 ; 0x0 30006364: 1a000002 bne 30006374 30006368: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 3000636c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30006370: 0affffe9 beq 3000631c <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 30006374: e3a0000c mov r0, #12 ; 0xc } 30006378: e8bd00f0 pop {r4, r5, r6, r7} 3000637c: e12fff1e bx lr _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 30006380: e3a00005 mov r0, #5 ; 0x5 30006384: eafffffb b 30006378 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 30006388: e59c3004 ldr r3, [ip, #4] 3000638c: e3530000 cmp r3, #0 ; 0x0 30006390: 1affffc5 bne 300062ac _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 30006394: e3a00009 mov r0, #9 ; 0x9 30006398: eafffff6 b 30006378 3000639c: 3001b520 .word 0x3001b520 300063a0: 3001b524 .word 0x3001b524 300014d4 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 300014d4: e92d4010 push {r4, lr} rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 300014d8: e59f40b4 ldr r4, [pc, #180] ; 30001594 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 300014dc: e24dd004 sub sp, sp, #4 ; 0x4 rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 300014e0: e5940000 ldr r0, [r4] 300014e4: e3500000 cmp r0, #0 ; 0x0 300014e8: 0a00001a beq 30001558 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 300014ec: e3a01034 mov r1, #52 ; 0x34 300014f0: eb001e6d bl 30008eac 300014f4: e59f309c ldr r3, [pc, #156] ; 30001598 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 300014f8: 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, 300014fc: e5830000 str r0, [r3] 30001500: e1a02000 mov r2, r0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 30001504: 0a00001f beq 30001588 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++) 30001508: e5941000 ldr r1, [r4] rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 3000150c: e59f3088 ldr r3, [pc, #136] ; 3000159c for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 30001510: e3510001 cmp r1, #1 ; 0x1 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; 30001514: e5830000 str r0, [r3] for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 30001518: 0a00000c beq 30001550 3000151c: e2803034 add r3, r0, #52 ; 0x34 30001520: e3a02001 mov r2, #1 ; 0x1 iop->data1 = iop + 1; 30001524: e2822001 add r2, r2, #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++) 30001528: e1520001 cmp r2, r1 iop->data1 = iop + 1; 3000152c: e503300c str r3, [r3, #-12] 30001530: 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++) 30001534: 1afffffa bne 30001524 30001538: e1a03202 lsl r3, r2, #4 3000153c: e0433102 sub r3, r3, r2, lsl #2 30001540: e0833002 add r3, r3, r2 30001544: e1a03103 lsl r3, r3, #2 30001548: e2433034 sub r3, r3, #52 ; 0x34 3000154c: e0802003 add r2, r0, r3 iop->data1 = iop + 1; iop->data1 = NULL; 30001550: e3a03000 mov r3, #0 ; 0x0 30001554: e5823028 str r3, [r2, #40] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 30001558: e59fc040 ldr ip, [pc, #64] ; 300015a0 3000155c: e59f0040 ldr r0, [pc, #64] ; 300015a4 30001560: e3a01001 mov r1, #1 ; 0x1 30001564: e3a02054 mov r2, #84 ; 0x54 30001568: e3a03000 mov r3, #0 ; 0x0 3000156c: e58dc000 str ip, [sp] 30001570: eb000be5 bl 3000450c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 30001574: e3500000 cmp r0, #0 ; 0x0 30001578: 1a000004 bne 30001590 /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); } 3000157c: e28dd004 add sp, sp, #4 ; 0x4 30001580: e8bd4010 pop {r4, lr} /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 30001584: ea001e04 b 30008d9c if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 30001588: e280001a add r0, r0, #26 ; 0x1a <== NOT EXECUTED 3000158c: eb000e40 bl 30004e94 <== NOT EXECUTED RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 30001590: eb000e3f bl 30004e94 <== NOT EXECUTED 30001594: 30016058 .word 0x30016058 30001598: 30016dcc .word 0x30016dcc 3000159c: 30016dd0 .word 0x30016dd0 300015a0: 30016dd4 .word 0x30016dd4 300015a4: 4c42494f .word 0x4c42494f 3001f930 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 3001f930: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 3001f934: e3a00000 mov r0, #0 ; 0x0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 3001f938: 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); 3001f93c: e1a01000 mov r1, r0 3001f940: e28d2010 add r2, sp, #16 ; 0x10 3001f944: eb0006b8 bl 3002142c if (sc != RTEMS_SUCCESSFUL) return sc; 3001f948: e2506000 subs r6, r0, #0 ; 0x0 3001f94c: 1a000029 bne 3001f9f8 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 3001f950: e59f70ec ldr r7, [pc, #236] ; 3001fa44 3001f954: e59f50ec ldr r5, [pc, #236] ; 3001fa48 3001f958: e5973000 ldr r3, [r7] 3001f95c: e1530005 cmp r3, r5 3001f960: 0a000027 beq 3001fa04 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 3001f964: e5974000 ldr r4, [r7] 3001f968: e1a0c005 mov ip, r5 3001f96c: e1a0e004 mov lr, r4 3001f970: e8bc000f ldm ip!, {r0, r1, r2, r3} 3001f974: e8ae000f stmia lr!, {r0, r1, r2, r3} 3001f978: e8bc000f ldm ip!, {r0, r1, r2, r3} 3001f97c: e8ae000f stmia lr!, {r0, r1, r2, r3} 3001f980: e8bc000f ldm ip!, {r0, r1, r2, r3} 3001f984: e8ae000f stmia lr!, {r0, r1, r2, r3} 3001f988: e89c000f ldm ip, {r0, r1, r2, r3} 3001f98c: e88e000f stm lr, {r0, r1, r2, r3} rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 3001f990: e59f20b4 ldr r2, [pc, #180] ; 3001fa4c } 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*/ 3001f994: 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); 3001f998: 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*/ 3001f99c: e4843014 str r3, [r4], #20 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 3001f9a0: e592c000 ldr ip, [r2] 3001f9a4: e28cc018 add ip, ip, #24 ; 0x18 3001f9a8: e89c000f ldm ip, {r0, r1, r2, r3} 3001f9ac: 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); 3001f9b0: e3a01000 mov r1, #0 ; 0x0 3001f9b4: e1a0200d mov r2, sp 3001f9b8: e1a03001 mov r3, r1 3001f9bc: e59f008c ldr r0, [pc, #140] ; 3001fa50 3001f9c0: ebff910c bl 30003df8 rtems_filesystem_root = loc; 3001f9c4: e89d000f ldm sp, {r0, r1, r2, r3} 3001f9c8: e597c000 ldr ip, [r7] 3001f9cc: e28cc014 add ip, ip, #20 ; 0x14 3001f9d0: e88c000f stm ip, {r0, r1, r2, r3} rtems_filesystem_evaluate_path("/", 0, &loc, 0); 3001f9d4: e3a01000 mov r1, #0 ; 0x0 3001f9d8: e1a0200d mov r2, sp 3001f9dc: e1a03001 mov r3, r1 3001f9e0: e59f0068 ldr r0, [pc, #104] ; 3001fa50 3001f9e4: ebff9103 bl 30003df8 rtems_filesystem_current = loc; 3001f9e8: e89d000f ldm sp, {r0, r1, r2, r3} 3001f9ec: e597c000 ldr ip, [r7] 3001f9f0: e28cc004 add ip, ip, #4 ; 0x4 3001f9f4: e88c000f stm ip, {r0, r1, r2, r3} return RTEMS_SUCCESSFUL; } 3001f9f8: e1a00006 mov r0, r6 3001f9fc: e28dd014 add sp, sp, #20 ; 0x14 3001fa00: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 3001fa04: e2800040 add r0, r0, #64 ; 0x40 3001fa08: ebff92ef bl 300045cc if (!tmp) 3001fa0c: e2508000 subs r8, r0, #0 ; 0x0 3001fa10: 03a0601a moveq r6, #26 ; 0x1a 3001fa14: 0afffff7 beq 3001f9f8 #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); 3001fa18: e1a00006 mov r0, r6 3001fa1c: e1a01007 mov r1, r7 3001fa20: e59f202c ldr r2, [pc, #44] ; 3001fa54 3001fa24: eb00078a bl 30021854 if (sc != RTEMS_SUCCESSFUL) { 3001fa28: e2504000 subs r4, r0, #0 ; 0x0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 3001fa2c: 05878000 streq r8, [r7] #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { 3001fa30: 0affffcb beq 3001f964 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 3001fa34: e1a00008 mov r0, r8 <== NOT EXECUTED 3001fa38: ebff9143 bl 30003f4c <== NOT EXECUTED 3001fa3c: e1a06004 mov r6, r4 <== NOT EXECUTED 3001fa40: eaffffec b 3001f9f8 <== NOT EXECUTED 3001fa44: 30045edc .word 0x30045edc 3001fa48: 3005ac7c .word 0x3005ac7c 3001fa4c: 3005a54c .word 0x3005a54c 3001fa50: 300432dc .word 0x300432dc 3001fa54: 3001f81c .word 0x3001f81c 3001f880 : * 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) { 3001f880: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 3001f884: e1a05000 mov r5, r0 <== NOT EXECUTED 3001f888: 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); 3001f88c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001f890: e1a0200d mov r2, sp <== NOT EXECUTED 3001f894: e1a01000 mov r1, r0 <== NOT EXECUTED 3001f898: eb0006e3 bl 3002142c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 3001f89c: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED 3001f8a0: 1a00000d bne 3001f8dc <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 3001f8a4: e59f6078 ldr r6, [pc, #120] ; 3001f924 <== NOT EXECUTED 3001f8a8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3001f8ac: e5964000 ldr r4, [r6] <== NOT EXECUTED 3001f8b0: e5942000 ldr r2, [r4] <== NOT EXECUTED 3001f8b4: e1520003 cmp r2, r3 <== NOT EXECUTED 3001f8b8: 0a00000a beq 3001f8e8 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 3001f8bc: e28d2004 add r2, sp, #4 ; 0x4 <== NOT EXECUTED 3001f8c0: e1a00005 mov r0, r5 <== NOT EXECUTED 3001f8c4: e59f1058 ldr r1, [pc, #88] ; 3001f924 <== NOT EXECUTED 3001f8c8: eb000833 bl 3002199c <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 3001f8cc: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED 3001f8d0: 0a00000b beq 3001f904 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 3001f8d4: e59f304c ldr r3, [pc, #76] ; 3001f928 <== NOT EXECUTED 3001f8d8: e5863000 str r3, [r6] <== NOT EXECUTED return sc; } 3001f8dc: e1a00002 mov r0, r2 <== NOT EXECUTED 3001f8e0: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 3001f8e4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 3001f8e8: e1a01006 mov r1, r6 <== NOT EXECUTED 3001f8ec: eb000805 bl 30021908 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 3001f8f0: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED 3001f8f4: 1afffff8 bne 3001f8dc <== NOT EXECUTED free_user_env(tmp); 3001f8f8: e1a00004 mov r0, r4 <== NOT EXECUTED 3001f8fc: ebffffc6 bl 3001f81c <== NOT EXECUTED 3001f900: eaffffed b 3001f8bc <== NOT EXECUTED sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 3001f904: e59f2020 ldr r2, [pc, #32] ; 3001f92c <== NOT EXECUTED 3001f908: e59f1014 ldr r1, [pc, #20] ; 3001f924 <== NOT EXECUTED 3001f90c: eb0007d0 bl 30021854 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 3001f910: e2502000 subs r2, 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; 3001f914: 059d3004 ldreq r3, [sp, #4] <== NOT EXECUTED 3001f918: 05863000 streq r3, [r6] <== 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) 3001f91c: 1affffec bne 3001f8d4 <== NOT EXECUTED 3001f920: eaffffed b 3001f8dc <== NOT EXECUTED 3001f924: 30045edc .word 0x30045edc 3001f928: 3005ac7c .word 0x3005ac7c 3001f92c: 3001f81c .word 0x3001f81c 300046bc : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 300046bc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 300046c0: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 300046c4: e1a01000 mov r1, r0 <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 300046c8: e1a0200d mov r2, sp <== NOT EXECUTED 300046cc: e59f0034 ldr r0, [pc, #52] ; 30004708 <== NOT EXECUTED 300046d0: eb0014ef bl 30009a94 <_Protected_heap_Get_block_size> <== NOT EXECUTED 300046d4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300046d8: 0a000008 beq 30004700 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 300046dc: e59d1000 ldr r1, [sp] <== NOT EXECUTED 300046e0: e59f3024 ldr r3, [pc, #36] ; 3000470c <== NOT EXECUTED 300046e4: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 300046e8: e2834024 add r4, r3, #36 ; 0x24 <== NOT EXECUTED 300046ec: e8940030 ldm r4, {r4, r5} <== NOT EXECUTED 300046f0: e0911004 adds r1, r1, r4 <== NOT EXECUTED 300046f4: e0a22005 adc r2, r2, r5 <== NOT EXECUTED 300046f8: e5831024 str r1, [r3, #36] <== NOT EXECUTED 300046fc: e5832028 str r2, [r3, #40] <== NOT EXECUTED } } 30004700: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 30004704: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30004708: 3005a4c8 .word 0x3005a4c8 3000470c: 3005a520 .word 0x3005a520 30004710 : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 30004710: 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 ) 30004714: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED } void rtems_malloc_statistics_at_malloc( void *pointer ) { 30004718: 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 ) 3000471c: 0a000014 beq 30004774 <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 30004720: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30004724: e28d2004 add r2, sp, #4 ; 0x4 <== NOT EXECUTED 30004728: 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); 3000472c: e1a01000 mov r1, r0 <== NOT EXECUTED 30004730: e1a0200d mov r2, sp <== NOT EXECUTED 30004734: e59f0040 ldr r0, [pc, #64] ; 3000477c <== NOT EXECUTED 30004738: eb0014d5 bl 30009a94 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 3000473c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30004740: e59fe038 ldr lr, [pc, #56] ; 30004780 <== NOT EXECUTED 30004744: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 30004748: e28e101c add r1, lr, #28 ; 0x1c <== NOT EXECUTED 3000474c: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 30004750: e59ec024 ldr ip, [lr, #36] <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 30004754: e0933001 adds r3, r3, r1 <== NOT EXECUTED 30004758: e0a44002 adc r4, r4, r2 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; if (current_depth > s->max_depth) 3000475c: e59e0018 ldr r0, [lr, #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; 30004760: e06c2003 rsb r2, ip, r3 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 30004764: e58e301c str r3, [lr, #28] <== NOT EXECUTED 30004768: e58e4020 str r4, [lr, #32] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; if (current_depth > s->max_depth) 3000476c: e1520000 cmp r2, r0 <== NOT EXECUTED s->max_depth = current_depth; 30004770: 858e2018 strhi r2, [lr, #24] <== NOT EXECUTED } 30004774: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 30004778: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3000477c: 3005a4c8 .word 0x3005a4c8 30004780: 3005a520 .word 0x3005a520 30004784 : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 30004784: e59f1038 ldr r1, [pc, #56] ; 300047c4 <== NOT EXECUTED 30004788: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3000478c: e1a03001 mov r3, r1 <== NOT EXECUTED 30004790: e4832004 str r2, [r3], #4 <== NOT EXECUTED 30004794: e2833004 add r3, r3, #4 ; 0x4 <== NOT EXECUTED 30004798: e4832004 str r2, [r3], #4 <== NOT EXECUTED 3000479c: e4832004 str r2, [r3], #4 <== NOT EXECUTED 300047a0: e4832004 str r2, [r3], #4 <== NOT EXECUTED 300047a4: e4832004 str r2, [r3], #4 <== NOT EXECUTED 300047a8: e4832004 str r2, [r3], #4 <== NOT EXECUTED 300047ac: e4832004 str r2, [r3], #4 <== NOT EXECUTED 300047b0: e4832004 str r2, [r3], #4 <== NOT EXECUTED 300047b4: e4832004 str r2, [r3], #4 <== NOT EXECUTED 300047b8: e5832000 str r2, [r3] <== NOT EXECUTED 300047bc: e5812004 str r2, [r1, #4] <== NOT EXECUTED } 300047c0: e12fff1e bx lr <== NOT EXECUTED 300047c4: 3005a520 .word 0x3005a520 30006918 : void rtems_panic( const char *printf_format, ... ) { 30006918: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 3000691c: 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); 30006920: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 30006924: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 30006928: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED 3000692c: ebffff83 bl 30006740 <== NOT EXECUTED va_end(arglist); } 30006930: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 30006934: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 30006938: e12fff1e bx lr <== NOT EXECUTED 30005964 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 30005964: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30005968: e1a06000 mov r6, r0 3000596c: e24dd004 sub sp, sp, #4 ; 0x4 30005970: e1a07001 mov r7, r1 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 30005974: e59f0180 ldr r0, [pc, #384] ; 30005afc 30005978: e1a01006 mov r1, r6 3000597c: e1a0200d mov r2, sp 30005980: eb0008ad bl 30007c3c <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 30005984: e59d3000 ldr r3, [sp] 30005988: e1a05000 mov r5, r0 3000598c: e3530000 cmp r3, #0 ; 0x0 30005990: 0a000003 beq 300059a4 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 30005994: e3a04004 mov r4, #4 ; 0x4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30005998: e1a00004 mov r0, r4 3000599c: e28dd004 add sp, sp, #4 ; 0x4 300059a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 300059a4: e59f4154 ldr r4, [pc, #340] ; 30005b00 300059a8: e5902050 ldr r2, [r0, #80] 300059ac: e5943000 ldr r3, [r4] 300059b0: e1520003 cmp r2, r3 300059b4: 0a000002 beq 300059c4 _Thread_Enable_dispatch(); 300059b8: eb000ae1 bl 30008544 <_Thread_Enable_dispatch> 300059bc: e3a04017 mov r4, #23 ; 0x17 300059c0: eafffff4 b 30005998 return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 300059c4: e3570000 cmp r7, #0 ; 0x0 300059c8: 0a000031 beq 30005a94 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 300059cc: e10f8000 mrs r8, CPSR 300059d0: e38830c0 orr r3, r8, #192 ; 0xc0 300059d4: e129f003 msr CPSR_fc, r3 switch ( the_period->state ) { 300059d8: e5903038 ldr r3, [r0, #56] 300059dc: e3530002 cmp r3, #2 ; 0x2 300059e0: 0a000014 beq 30005a38 300059e4: e3530004 cmp r3, #4 ; 0x4 300059e8: 0a000033 beq 30005abc 300059ec: e3530000 cmp r3, #0 ; 0x0 300059f0: 1affffe7 bne 30005994 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 300059f4: e129f008 msr CPSR_fc, r8 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 300059f8: ebffff61 bl 30005784 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 300059fc: e59f2100 ldr r2, [pc, #256] ; 30005b04 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30005a00: e3a04000 mov r4, #0 ; 0x0 the_period->state = RATE_MONOTONIC_ACTIVE; 30005a04: e3a03002 mov r3, #2 ; 0x2 30005a08: e5853038 str r3, [r5, #56] the_watchdog->routine = routine; 30005a0c: e585202c str r2, [r5, #44] the_watchdog->id = id; 30005a10: e5856030 str r6, [r5, #48] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005a14: e585701c str r7, [r5, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005a18: e2851010 add r1, r5, #16 ; 0x10 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30005a1c: e5854018 str r4, [r5, #24] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 30005a20: e5854034 str r4, [r5, #52] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 30005a24: e585704c str r7, [r5, #76] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005a28: e59f00d8 ldr r0, [pc, #216] ; 30005b08 30005a2c: eb000fef bl 300099f0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 30005a30: eb000ac3 bl 30008544 <_Thread_Enable_dispatch> 30005a34: eaffffd7 b 30005998 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 30005a38: ebffff71 bl 30005804 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 30005a3c: e3a03001 mov r3, #1 ; 0x1 30005a40: e5853038 str r3, [r5, #56] the_period->next_length = length; 30005a44: e585704c str r7, [r5, #76] _ISR_Enable( level ); 30005a48: e129f008 msr CPSR_fc, r8 _Thread_Executing->Wait.id = the_period->Object.id; 30005a4c: e5943000 ldr r3, [r4] 30005a50: e5952008 ldr r2, [r5, #8] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 30005a54: e1a00003 mov r0, r3 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 30005a58: e5832020 str r2, [r3, #32] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 30005a5c: e3a01901 mov r1, #16384 ; 0x4000 30005a60: eb000d4c bl 30008f98 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 30005a64: e10f1000 mrs r1, CPSR 30005a68: e38130c0 orr r3, r1, #192 ; 0xc0 30005a6c: e129f003 msr CPSR_fc, r3 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 30005a70: e3a03002 mov r3, #2 ; 0x2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 30005a74: e5952038 ldr r2, [r5, #56] the_period->state = RATE_MONOTONIC_ACTIVE; 30005a78: e5853038 str r3, [r5, #56] _ISR_Enable( level ); 30005a7c: e129f001 msr CPSR_fc, r1 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 30005a80: e3520003 cmp r2, #3 ; 0x3 30005a84: 0a000018 beq 30005aec _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 30005a88: eb000aad bl 30008544 <_Thread_Enable_dispatch> 30005a8c: e3a04000 mov r4, #0 ; 0x0 30005a90: eaffffc0 b 30005998 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 30005a94: e5900038 ldr r0, [r0, #56] 30005a98: e3500000 cmp r0, #0 ; 0x0 30005a9c: 03a0400b moveq r4, #11 ; 0xb 30005aa0: 0affffe2 beq 30005a30 30005aa4: e2403003 sub r3, r0, #3 ; 0x3 30005aa8: e3530001 cmp r3, #1 ; 0x1 30005aac: 93a04006 movls r4, #6 ; 0x6 30005ab0: 83a04000 movhi r4, #0 ; 0x0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 30005ab4: eb000aa2 bl 30008544 <_Thread_Enable_dispatch> 30005ab8: eaffffb6 b 30005998 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 30005abc: ebffff50 bl 30005804 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 30005ac0: e129f008 msr CPSR_fc, r8 the_period->state = RATE_MONOTONIC_ACTIVE; 30005ac4: e3a03002 mov r3, #2 ; 0x2 30005ac8: e5853038 str r3, [r5, #56] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005acc: e585701c str r7, [r5, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005ad0: e2851010 add r1, r5, #16 ; 0x10 the_period->next_length = length; 30005ad4: e585704c str r7, [r5, #76] 30005ad8: e59f0028 ldr r0, [pc, #40] ; 30005b08 30005adc: eb000fc3 bl 300099f0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 30005ae0: e3a04006 mov r4, #6 ; 0x6 30005ae4: eb000a96 bl 30008544 <_Thread_Enable_dispatch> 30005ae8: eaffffaa b 30005998 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 30005aec: e5940000 ldr r0, [r4] <== NOT EXECUTED 30005af0: e3a01901 mov r1, #16384 ; 0x4000 <== NOT EXECUTED 30005af4: eb00098c bl 3000812c <_Thread_Clear_state> <== NOT EXECUTED 30005af8: eaffffe2 b 30005a88 <== NOT EXECUTED 30005afc: 3001bc34 .word 0x3001bc34 30005b00: 3001be04 .word 0x3001be04 30005b04: 30005e14 .word 0x30005e14 30005b08: 3001be24 .word 0x3001be24 30011000 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 30011000: e92d41f0 push {r4, r5, r6, r7, r8, lr} Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 30011004: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 30011008: e1a04000 mov r4, r0 3001100c: e24dd008 sub sp, sp, #8 ; 0x8 30011010: 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 ) 30011014: 03a04009 moveq r4, #9 ; 0x9 30011018: 0a000020 beq 300110a0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 3001101c: e59f80a0 ldr r8, [pc, #160] ; 300110c4 30011020: e5980000 ldr r0, [r8] 30011024: eb000924 bl 300134bc <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 30011028: e1a01004 mov r1, r4 3001102c: e59f0094 ldr r0, [pc, #148] ; 300110c8 30011030: e1a0200d mov r2, sp 30011034: eb000fea bl 30014fe4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 30011038: e59d4000 ldr r4, [sp] 3001103c: e1a05000 mov r5, r0 30011040: e3540000 cmp r4, #0 ; 0x0 30011044: 1a000018 bne 300110ac case OBJECTS_LOCAL: heap_status = _Heap_Extend( 30011048: e1a01007 mov r1, r7 3001104c: e1a02006 mov r2, r6 30011050: e2800068 add r0, r0, #104 ; 0x68 30011054: e28d3004 add r3, sp, #4 ; 0x4 30011058: eb000c35 bl 30014134 <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 3001105c: e3500001 cmp r0, #1 ; 0x1 30011060: 03a04009 moveq r4, #9 ; 0x9 30011064: 0a00000b beq 30011098 30011068: 2a000007 bcs 3001108c case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3001106c: e59d1004 ldr r1, [sp, #4] 30011070: e5952054 ldr r2, [r5, #84] the_region->maximum_segment_size += amount_extended; 30011074: e595305c ldr r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 30011078: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; 3001107c: e0833001 add r3, r3, r1 30011080: e585305c str r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 30011084: e5852054 str r2, [r5, #84] 30011088: ea000002 b 30011098 starting_address, length, &amount_extended ); switch ( heap_status ) { 3001108c: e3500002 cmp r0, #2 ; 0x2 30011090: 0a000009 beq 300110bc case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 30011094: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 30011098: e5980000 ldr r0, [r8] 3001109c: eb000922 bl 3001352c <_API_Mutex_Unlock> return return_status; } 300110a0: e1a00004 mov r0, r4 300110a4: e28dd008 add sp, sp, #8 ; 0x8 300110a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 300110ac: e3540001 cmp r4, #1 ; 0x1 300110b0: 03a04004 moveq r4, #4 ; 0x4 300110b4: 1afffff6 bne 30011094 300110b8: eafffff6 b 30011098 switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 300110bc: e3a04018 mov r4, #24 ; 0x18 300110c0: eafffff4 b 30011098 300110c4: 3003283c .word 0x3003283c 300110c8: 3003262c .word 0x3003262c 300113e8 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 300113e8: 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 ) 300113ec: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { 300113f0: e24dd010 sub sp, sp, #16 ; 0x10 300113f4: e1a04000 mov r4, r0 300113f8: e1a05001 mov r5, r1 300113fc: e1a06002 mov r6, r2 uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 30011400: 0a000028 beq 300114a8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 30011404: e59f70b4 ldr r7, [pc, #180] ; 300114c0 30011408: e5970000 ldr r0, [r7] 3001140c: eb00082a bl 300134bc <_API_Mutex_Lock> 30011410: e1a01004 mov r1, r4 30011414: e59f00a8 ldr r0, [pc, #168] ; 300114c4 30011418: e28d2008 add r2, sp, #8 ; 0x8 3001141c: eb000ef0 bl 30014fe4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 30011420: e59d3008 ldr r3, [sp, #8] 30011424: e1a08000 mov r8, r0 30011428: e3530000 cmp r3, #0 ; 0x0 3001142c: 0a000007 beq 30011450 30011430: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 30011434: e5970000 ldr r0, [r7] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 30011438: 03a04004 moveq r4, #4 ; 0x4 3001143c: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 30011440: eb000839 bl 3001352c <_API_Mutex_Unlock> return return_status; } 30011444: e1a00004 mov r0, r4 30011448: e28dd010 add sp, sp, #16 ; 0x10 3001144c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 30011450: e1a01005 mov r1, r5 30011454: e28d3004 add r3, sp, #4 ; 0x4 30011458: e28dc00c add ip, sp, #12 ; 0xc 3001145c: e1a02006 mov r2, r6 30011460: e2800068 add r0, r0, #104 ; 0x68 30011464: e58dc000 str ip, [sp] 30011468: eb000cbb bl 3001475c <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 3001146c: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 30011470: e2505000 subs r5, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 30011474: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 30011478: 1a000005 bne 30011494 3001147c: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED 30011480: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 30011484: 1a000009 bne 300114b0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 30011488: e5970000 ldr r0, [r7] <== NOT EXECUTED 3001148c: eb000826 bl 3001352c <_API_Mutex_Unlock> <== NOT EXECUTED 30011490: eaffffeb b 30011444 <== NOT EXECUTED 30011494: e5970000 ldr r0, [r7] 30011498: eb000823 bl 3001352c <_API_Mutex_Unlock> return 3001149c: e3550001 cmp r5, #1 ; 0x1 300114a0: 03a0400d moveq r4, #13 ; 0xd 300114a4: 0affffe6 beq 30011444 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 300114a8: e3a04009 mov r4, #9 ; 0x9 300114ac: eaffffe4 b 30011444 *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ 300114b0: e1a00008 mov r0, r8 <== NOT EXECUTED 300114b4: eb0020ee bl 30019874 <_Region_Process_queue> <== NOT EXECUTED 300114b8: e1a04005 mov r4, r5 <== NOT EXECUTED 300114bc: eaffffe0 b 30011444 <== NOT EXECUTED 300114c0: 3003283c .word 0x3003283c 300114c4: 3003262c .word 0x3003262c 3000450c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 3000450c: 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 ) ) 30004510: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 30004514: e24dd018 sub sp, sp, #24 ; 0x18 30004518: e1a06001 mov r6, r1 3000451c: e1a04002 mov r4, r2 30004520: e1a08003 mov r8, r3 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 30004524: 02800003 addeq r0, r0, #3 ; 0x3 30004528: 0a000037 beq 3000460c return RTEMS_INVALID_NAME; if ( !id ) 3000452c: e59d3038 ldr r3, [sp, #56] 30004530: e3530000 cmp r3, #0 ; 0x0 30004534: 03a00009 moveq r0, #9 ; 0x9 30004538: 0a000033 beq 3000460c return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 3000453c: e21230c0 ands r3, r2, #192 ; 0xc0 30004540: 02025030 andeq r5, r2, #48 ; 0x30 30004544: 1a000032 bne 30004614 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 30004548: e3550000 cmp r5, #0 ; 0x0 3000454c: 0a000002 beq 3000455c 30004550: e3560001 cmp r6, #1 ; 0x1 30004554: 83a0000a movhi r0, #10 ; 0xa 30004558: 8a00002b bhi 3000460c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000455c: e59f218c ldr r2, [pc, #396] ; 300046f0 30004560: e5923000 ldr r3, [r2] 30004564: e2833001 add r3, r3, #1 ; 0x1 30004568: 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 ); 3000456c: e59f9180 ldr r9, [pc, #384] ; 300046f4 30004570: e1a00009 mov r0, r9 30004574: eb000532 bl 30005a44 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 30004578: e2507000 subs r7, r0, #0 ; 0x0 3000457c: 0a000048 beq 300046a4 * 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 ) ) { 30004580: e3550000 cmp r5, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 30004584: e5874010 str r4, [r7, #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 ) ) { 30004588: 0a00002e beq 30004648 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 3000458c: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 30004590: 13a03002 movne r3, #2 ; 0x2 30004594: 158d3008 strne r3, [sp, #8] */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 30004598: 1a000007 bne 300045bc the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 3000459c: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 300045a0: 13a03003 movne r3, #3 ; 0x3 300045a4: 158d3008 strne r3, [sp, #8] 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 ) ) 300045a8: 1a000003 bne 300045bc the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 300045ac: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 300045b0: 13a03001 movne r3, #1 ; 0x1 300045b4: 158d3008 strne r3, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 300045b8: 058d3008 streq r3, [sp, #8] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 300045bc: e3550010 cmp r5, #16 ; 0x10 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; 300045c0: 13a03002 movne r3, #2 ; 0x2 the_mutex_attributes.only_owner_release = FALSE; 300045c4: 13a02000 movne r2, #0 ; 0x0 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; 300045c8: 158d3000 strne r3, [sp] the_mutex_attributes.only_owner_release = FALSE; 300045cc: 15cd2004 strbne r2, [sp, #4] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 300045d0: 0a000036 beq 300046b0 the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 300045d4: e3560001 cmp r6, #1 ; 0x1 300045d8: 13a02000 movne r2, #0 ; 0x0 300045dc: 03a02001 moveq r2, #1 ; 0x1 300045e0: e2870014 add r0, r7, #20 ; 0x14 300045e4: 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; 300045e8: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 300045ec: eb00032a bl 3000529c <_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 ) { 300045f0: e3500006 cmp r0, #6 ; 0x6 300045f4: 1a000020 bne 3000467c */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 300045f8: e59f00f4 ldr r0, [pc, #244] ; 300046f4 <== NOT EXECUTED 300045fc: e1a01007 mov r1, r7 <== NOT EXECUTED 30004600: eb0005f7 bl 30005de4 <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 30004604: eb000892 bl 30006854 <_Thread_Enable_dispatch> <== NOT EXECUTED 30004608: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 3000460c: e28dd018 add sp, sp, #24 ; 0x18 30004610: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 30004614: e2025030 and r5, r2, #48 ; 0x30 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 30004618: e3550010 cmp r5, #16 ; 0x10 3000461c: 0a000003 beq 30004630 30004620: e3550020 cmp r5, #32 ; 0x20 30004624: 0a000001 beq 30004630 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 30004628: e3a0000b mov r0, #11 ; 0xb 3000462c: eafffff6 b 3000460c #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 30004630: e3140004 tst r4, #4 ; 0x4 30004634: 0afffffb beq 30004628 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 30004638: e35300c0 cmp r3, #192 ; 0xc0 3000463c: 1affffc1 bne 30004548 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 30004640: e3a0000b mov r0, #11 ; 0xb 30004644: eafffff0 b 3000460c _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 30004648: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 3000464c: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 30004650: 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; 30004654: 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( 30004658: e1a02006 mov r2, r6 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 3000465c: 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( 30004660: e2870014 add r0, r7, #20 ; 0x14 30004664: 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; 30004668: 058d5014 streq r5, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 3000466c: 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; 30004670: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 30004674: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 30004678: eb0003db bl 300055ec <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000467c: e5971008 ldr r1, [r7, #8] 30004680: e599201c ldr r2, [r9, #28] 30004684: e1a03801 lsl r3, r1, #16 30004688: e7827723 str r7, [r2, r3, lsr #14] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 3000468c: e59d3038 ldr r3, [sp, #56] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 30004690: e587a00c str sl, [r7, #12] 30004694: e5831000 str r1, [r3] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 30004698: eb00086d bl 30006854 <_Thread_Enable_dispatch> 3000469c: e3a00000 mov r0, #0 ; 0x0 300046a0: eaffffd9 b 3000460c _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 300046a4: eb00086a bl 30006854 <_Thread_Enable_dispatch> 300046a8: e3a00005 mov r0, #5 ; 0x5 300046ac: eaffffd6 b 3000460c if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 300046b0: 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; 300046b4: e3a03000 mov r3, #0 ; 0x0 300046b8: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 300046bc: e3520003 cmp r2, #3 ; 0x3 300046c0: 979ff102 ldrls pc, [pc, r2, lsl #2] 300046c4: eaffffc2 b 300045d4 <== NOT EXECUTED 300046c8: 300046e4 .word 0x300046e4 <== NOT EXECUTED 300046cc: 300046e4 .word 0x300046e4 <== NOT EXECUTED 300046d0: 300046d8 .word 0x300046d8 <== NOT EXECUTED 300046d4: 300046d8 .word 0x300046d8 <== 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; 300046d8: e3a03001 mov r3, #1 ; 0x1 300046dc: e5cd3004 strb r3, [sp, #4] 300046e0: eaffffbb b 300045d4 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 300046e4: e3a03000 mov r3, #0 ; 0x0 300046e8: e5cd3004 strb r3, [sp, #4] 300046ec: eaffffb8 b 300045d4 300046f0: 30016f4c .word 0x30016f4c 300046f4: 30016e68 .word 0x30016e68 30021380 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 30021380: e52de004 push {lr} ; (str lr, [sp, #-4]!) 30021384: e24dd004 sub sp, sp, #4 ; 0x4 30021388: e1a01000 mov r1, r0 3002138c: e1a0200d mov r2, sp 30021390: e59f004c ldr r0, [pc, #76] ; 300213e4 30021394: ebffa105 bl 300097b0 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 30021398: e59d1000 ldr r1, [sp] 3002139c: e3510000 cmp r1, #0 ; 0x0 300213a0: 13a00004 movne r0, #4 ; 0x4 300213a4: 1a000008 bne 300213cc case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 300213a8: e5903010 ldr r3, [r0, #16] 300213ac: e2133030 ands r3, r3, #48 ; 0x30 300213b0: 1a000007 bne 300213d4 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 300213b4: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 300213b8: e1a01003 mov r1, r3 <== NOT EXECUTED 300213bc: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 300213c0: ebff9e3b bl 30008cb4 <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 300213c4: ebffa354 bl 3000a11c <_Thread_Enable_dispatch> 300213c8: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 300213cc: e28dd004 add sp, sp, #4 ; 0x4 300213d0: e8bd8000 pop {pc} the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 300213d4: e2800014 add r0, r0, #20 ; 0x14 300213d8: e3a02001 mov r2, #1 ; 0x1 300213dc: ebff9d60 bl 30008964 <_CORE_mutex_Flush> 300213e0: eafffff7 b 300213c4 300213e4: 3005a564 .word 0x3005a564 30014850 : */ void rtems_shutdown_executive( uint32_t result ) { 30014850: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 30014854: e59f2028 ldr r2, [pc, #40] ; 30014884 */ void rtems_shutdown_executive( uint32_t result ) { 30014858: e24dd030 sub sp, sp, #48 ; 0x30 if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 3001485c: e5923000 ldr r3, [r2] 30014860: e3530004 cmp r3, #4 ; 0x4 30014864: 0a000004 beq 3001487c 30014868: e3a03004 mov 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 ); 3001486c: e1a0000d mov r0, sp 30014870: e59f1010 ldr r1, [pc, #16] ; 30014888 30014874: e5823000 str r3, [r2] 30014878: ebffcd69 bl 30007e24 <_CPU_Context_switch> _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 3001487c: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 30014880: e8bd8000 pop {pc} <== NOT EXECUTED 30014884: 300170f4 .word 0x300170f4 30014888: 30016f1c .word 0x30016f1c 30002b58 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30002b58: e1a0c00d mov ip, sp <== NOT EXECUTED 30002b5c: e92dd830 push {r4, r5, fp, ip, lr, pc} <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 30002b60: e59f407c ldr r4, [pc, #124] ; 30002be4 <== NOT EXECUTED /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30002b64: e24cb004 sub fp, ip, #4 ; 0x4 <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 30002b68: e5943000 ldr r3, [r4] <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 30002b6c: e59300c8 ldr r0, [r3, #200] <== NOT EXECUTED 30002b70: e15b0000 cmp fp, r0 <== NOT EXECUTED 30002b74: 33a05000 movcc r5, #0 ; 0x0 <== NOT EXECUTED 30002b78: 3a000004 bcc 30002b90 <== NOT EXECUTED 30002b7c: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 30002b80: e0803003 add r3, r0, r3 <== NOT EXECUTED 30002b84: e15b0003 cmp fp, r3 <== NOT EXECUTED 30002b88: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED 30002b8c: 93a05001 movls r5, #1 ; 0x1 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 30002b90: e59f3050 ldr r3, [pc, #80] ; 30002be8 <== NOT EXECUTED 30002b94: e5932000 ldr r2, [r3] <== NOT EXECUTED 30002b98: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 30002b9c: 03a01001 moveq r1, #1 ; 0x1 <== NOT EXECUTED 30002ba0: 1a000008 bne 30002bc8 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 30002ba4: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 30002ba8: 0a000002 beq 30002bb8 <== NOT EXECUTED 30002bac: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 30002bb0: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 30002bb4: 189da830 ldmne sp, {r4, r5, fp, sp, pc} <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 30002bb8: e5940000 ldr r0, [r4] <== NOT EXECUTED 30002bbc: ebffffc9 bl 30002ae8 <== NOT EXECUTED 30002bc0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return true; } 30002bc4: e89da830 ldm sp, {r4, r5, fp, sp, pc} <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 30002bc8: e59f101c ldr r1, [pc, #28] ; 30002bec <== NOT EXECUTED 30002bcc: e2800008 add r0, r0, #8 ; 0x8 <== NOT EXECUTED 30002bd0: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED 30002bd4: eb00b4d1 bl 3002ff20 <== NOT EXECUTED 30002bd8: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED 30002bdc: 33a01000 movcc r1, #0 ; 0x0 <== NOT EXECUTED 30002be0: eaffffef b 30002ba4 <== NOT EXECUTED 30002be4: 3005a704 .word 0x3005a704 30002be8: 30047454 .word 0x30047454 30002bec: 3005a498 .word 0x3005a498 30002ad8 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 30002ad8: e59f1004 ldr r1, [pc, #4] ; 30002ae4 <== NOT EXECUTED 30002adc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30002ae0: eaffffe1 b 30002a6c <== NOT EXECUTED 30002ae4: 30005580 .word 0x30005580 30002a6c : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 30002a6c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED print_context = context; 30002a70: e59f704c ldr r7, [pc, #76] ; 30002ac4 <== NOT EXECUTED print_handler = print; 30002a74: e59f604c ldr r6, [pc, #76] ; 30002ac8 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 30002a78: e1a04001 mov r4, r1 <== NOT EXECUTED 30002a7c: e1a05000 mov r5, r0 <== NOT EXECUTED print_context = context; print_handler = print; 30002a80: e5861000 str r1, [r6] <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 30002a84: e5870000 str r0, [r7] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 30002a88: e59f103c ldr r1, [pc, #60] ; 30002acc <== NOT EXECUTED 30002a8c: e1a0e00f mov lr, pc <== NOT EXECUTED 30002a90: e12fff14 bx r4 <== NOT EXECUTED (*print)( context, 30002a94: e59f1034 ldr r1, [pc, #52] ; 30002ad0 <== NOT EXECUTED 30002a98: e1a00005 mov r0, r5 <== NOT EXECUTED 30002a9c: e1a0e00f mov lr, pc <== NOT EXECUTED 30002aa0: 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 ); 30002aa4: e59f0028 ldr r0, [pc, #40] ; 30002ad4 <== NOT EXECUTED 30002aa8: eb001998 bl 30009110 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 30002aac: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30002ab0: ebffff93 bl 30002904 <== NOT EXECUTED print_context = NULL; 30002ab4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED print_handler = NULL; 30002ab8: 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; 30002abc: e5873000 str r3, [r7] <== NOT EXECUTED print_handler = NULL; } 30002ac0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30002ac4: 30047458 .word 0x30047458 30002ac8: 3004745c .word 0x3004745c 30002acc: 3004100c .word 0x3004100c 30002ad0: 30041024 .word 0x30041024 30002ad4: 30002904 .word 0x30002904 30002bf0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 30002bf0: e1a0c00d mov ip, sp 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; 30002bf4: e59020c8 ldr r2, [r0, #200] */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 30002bf8: e92dd810 push {r4, fp, ip, lr, pc} 30002bfc: e24cb004 sub fp, ip, #4 ; 0x4 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 30002c00: e15b0002 cmp fp, r2 */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 30002c04: 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; 30002c08: e2820008 add r0, r2, #8 ; 0x8 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 30002c0c: 3a000003 bcc 30002c20 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 30002c10: e59430c4 ldr r3, [r4, #196] 30002c14: e0823003 add r3, r2, r3 30002c18: e15b0003 cmp fp, r3 30002c1c: 9a000007 bls 30002c40 /* * 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, 30002c20: e59f1034 ldr r1, [pc, #52] ; 30002c5c <== NOT EXECUTED 30002c24: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED 30002c28: eb00b4bc bl 3002ff20 <== NOT EXECUTED 30002c2c: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED 30002c30: 33a01000 movcc r1, #0 ; 0x0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 30002c34: e1a00004 mov r0, r4 <== NOT EXECUTED } } 30002c38: e89d6810 ldm sp, {r4, 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 ); 30002c3c: eaffffa9 b 30002ae8 <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 30002c40: e59f1014 ldr r1, [pc, #20] ; 30002c5c 30002c44: e3a02010 mov r2, #16 ; 0x10 30002c48: eb00b4b4 bl 3002ff20 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 30002c4c: e3500000 cmp r0, #0 ; 0x0 30002c50: 13a01000 movne r1, #0 ; 0x0 30002c54: 1afffff6 bne 30002c34 30002c58: e89da810 ldm sp, {r4, fp, sp, pc} 30002c5c: 3005a498 .word 0x3005a498 30006730 : const char * rtems_status_text( rtems_status_code status ) { 30006730: e1a01000 mov r1, r0 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 30006734: e59f0000 ldr r0, [pc, #0] ; 3000673c <== NOT EXECUTED 30006738: ea002872 b 30010908 <== NOT EXECUTED 3000673c: 300216a0 .word 0x300216a0 300021a4 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 300021a4: e59f3018 ldr r3, [pc, #24] ; 300021c4 <== NOT EXECUTED 300021a8: e5830000 str r0, [r3] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 300021ac: e59f0014 ldr r0, [pc, #20] ; 300021c8 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 300021b0: e59f3014 ldr r3, [pc, #20] ; 300021cc <== NOT EXECUTED int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; 300021b4: e5801000 str r1, [r0] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 300021b8: e5832000 str r2, [r3] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 300021bc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300021c0: e12fff1e bx lr <== NOT EXECUTED 300021c4: 30016648 .word 0x30016648 300021c8: 3001664c .word 0x3001664c 300021cc: 30016650 .word 0x30016650 300037a8 : } } rtems_status_code rtems_termios_close (void *arg) { 300037a8: e92d4070 push {r4, r5, r6, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 300037ac: e59f6188 ldr r6, [pc, #392] ; 3000393c rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 300037b0: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 300037b4: e3a01000 mov r1, #0 ; 0x0 } } rtems_status_code rtems_termios_close (void *arg) { 300037b8: 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); 300037bc: e1a02001 mov r2, r1 300037c0: e5960000 ldr r0, [r6] rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 300037c4: e5934028 ldr r4, [r3, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 300037c8: eb0003f3 bl 3000479c if (sc != RTEMS_SUCCESSFUL) 300037cc: e3500000 cmp r0, #0 ; 0x0 300037d0: 1a000046 bne 300038f0 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 300037d4: e5943008 ldr r3, [r4, #8] 300037d8: e2433001 sub r3, r3, #1 ; 0x1 300037dc: e3530000 cmp r3, #0 ; 0x0 300037e0: e5843008 str r3, [r4, #8] 300037e4: 1a000030 bne 300038ac if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 300037e8: e59430cc ldr r3, [r4, #204] 300037ec: e59f214c ldr r2, [pc, #332] ; 30003940 300037f0: e1a03183 lsl r3, r3, #3 300037f4: e2833001 add r3, r3, #1 ; 0x1 300037f8: e7923103 ldr r3, [r2, r3, lsl #2] 300037fc: e3530000 cmp r3, #0 ; 0x0 30003800: 0a00003b beq 300038f4 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 30003804: e1a00004 mov r0, r4 <== NOT EXECUTED 30003808: e1a0e00f mov lr, pc <== NOT EXECUTED 3000380c: e12fff13 bx r3 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 30003810: e59430b4 ldr r3, [r4, #180] 30003814: e3530002 cmp r3, #2 ; 0x2 30003818: 0a00002a beq 300038c8 tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 3000381c: e594309c ldr r3, [r4, #156] 30003820: e3530000 cmp r3, #0 ; 0x0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 30003824: 11a02005 movne r2, r5 30003828: 1594000c ldrne r0, [r4, #12] 3000382c: 15941010 ldrne r1, [r4, #16] 30003830: 11a0e00f movne lr, pc 30003834: 112fff13 bxne r3 if (tty->forw == NULL) { 30003838: e5941000 ldr r1, [r4] 3000383c: e3510000 cmp r1, #0 ; 0x0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 30003840: 15943004 ldrne r3, [r4, #4] 30003844: 15813004 strne r3, [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) { 30003848: 0a00002c beq 30003900 } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3000384c: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 30003850: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 30003854: 15821000 strne r1, [r2] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 30003858: 0a000032 beq 30003928 <== NOT EXECUTED } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 3000385c: e5940014 ldr r0, [r4, #20] 30003860: eb0003a4 bl 300046f8 rtems_semaphore_delete (tty->osem); 30003864: e5940018 ldr r0, [r4, #24] 30003868: eb0003a2 bl 300046f8 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 3000386c: e594008c ldr r0, [r4, #140] 30003870: eb0003a0 bl 300046f8 if ((tty->device.pollRead == NULL) || 30003874: e59430a0 ldr r3, [r4, #160] 30003878: e3530000 cmp r3, #0 ; 0x0 3000387c: 0a00000e beq 300038bc 30003880: e59430b4 ldr r3, [r4, #180] 30003884: e3530002 cmp r3, #2 ; 0x2 30003888: 0a00000b beq 300038bc (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 3000388c: e5940058 ldr r0, [r4, #88] 30003890: eb0015c4 bl 30008fa8 free (tty->rawOutBuf.theBuf); 30003894: e594007c ldr r0, [r4, #124] 30003898: eb0015c2 bl 30008fa8 free (tty->cbuf); 3000389c: e594001c ldr r0, [r4, #28] 300038a0: eb0015c0 bl 30008fa8 free (tty); 300038a4: e1a00004 mov r0, r4 300038a8: eb0015be bl 30008fa8 } rtems_semaphore_release (rtems_termios_ttyMutex); 300038ac: e5960000 ldr r0, [r6] 300038b0: eb000400 bl 300048b8 return RTEMS_SUCCESSFUL; } 300038b4: e3a00000 mov r0, #0 ; 0x0 300038b8: e8bd8070 pop {r4, r5, r6, pc} rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 300038bc: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED 300038c0: eb00038c bl 300046f8 <== NOT EXECUTED 300038c4: eafffff0 b 3000388c <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 300038c8: e59400c4 ldr r0, [r4, #196] <== NOT EXECUTED 300038cc: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 300038d0: eb000277 bl 300042b4 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 300038d4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300038d8: 1a000004 bne 300038f0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 300038dc: e59400c8 ldr r0, [r4, #200] <== NOT EXECUTED 300038e0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 300038e4: eb000272 bl 300042b4 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 300038e8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300038ec: 0affffca beq 3000381c <== NOT EXECUTED rtems_fatal_error_occurred (sc); 300038f0: eb000567 bl 30004e94 <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 300038f4: e1a00004 mov r0, r4 300038f8: ebfffd8f bl 30002f3c 300038fc: eaffffc3 b 30003810 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; 30003900: e5942004 ldr r2, [r4, #4] 30003904: e59f3038 ldr r3, [pc, #56] ; 30003944 if ( rtems_termios_ttyTail != NULL ) { 30003908: 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; 3000390c: e5832000 str r2, [r3] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 30003910: 15821000 strne r1, [r2] 30003914: 15941000 ldrne r1, [r4] } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { 30003918: 1affffcb bne 3000384c } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3000391c: e59f3024 ldr r3, [pc, #36] ; 30003948 30003920: e5832000 str r2, [r3] 30003924: eaffffcc b 3000385c 30003928: e59f3018 ldr r3, [pc, #24] ; 30003948 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { 3000392c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 30003930: e5831000 str r1, [r3] <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 30003934: 15812004 strne r2, [r1, #4] <== NOT EXECUTED 30003938: eaffffc7 b 3000385c <== NOT EXECUTED 3000393c: 30016e5c .word 0x30016e5c 30003940: 30016c50 .word 0x30016c50 30003944: 30016e60 .word 0x30016e60 30003948: 30016e64 .word 0x30016e64 300023ec : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 300023ec: e5903090 ldr r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300023f0: e590c0b4 ldr ip, [r0, #180] <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 300023f4: e0833001 add r3, r3, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300023f8: 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) { 300023fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 30002400: e5803090 str r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30002404: 0a00000b beq 30002438 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 30002408: e59030cc ldr r3, [r0, #204] <== NOT EXECUTED 3000240c: e3530005 cmp r3, #5 ; 0x5 <== NOT EXECUTED 30002410: 1a000006 bne 30002430 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 30002414: e59f3034 ldr r3, [pc, #52] ; 30002450 <== NOT EXECUTED 30002418: e59330b4 ldr r3, [r3, #180] <== NOT EXECUTED 3000241c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 30002420: 11a0e00f movne lr, pc <== NOT EXECUTED 30002424: 112fff13 bxne r3 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 30002428: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000242c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30002430: 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); 30002434: eaffff68 b 300021dc <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 30002438: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 3000243c: e1a0100c mov r1, ip <== NOT EXECUTED 30002440: eb00079b bl 300042b4 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 30002444: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30002448: 0afffff6 beq 30002428 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3000244c: eb000a90 bl 30004e94 <== NOT EXECUTED 30002450: 30016c50 .word 0x30016c50 30002454 : 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) { 30002454: 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) { 30002458: 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) { 3000245c: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED 30002460: e59f62ec ldr r6, [pc, #748] ; 30002754 <== NOT EXECUTED 30002464: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 30002468: e7963203 ldr r3, [r6, r3, lsl #4] <== 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) { 3000246c: 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) { 30002470: e3530000 cmp r3, #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) { 30002474: e1a05000 mov r5, r0 <== NOT EXECUTED 30002478: e1a08001 mov r8, r1 <== NOT EXECUTED 3000247c: e1a07002 mov r7, r2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 30002480: 0a000020 beq 30002508 <== NOT EXECUTED while (len--) { 30002484: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 30002488: 0a00000c beq 300024c0 <== NOT EXECUTED 3000248c: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 30002490: ea000003 b 300024a4 <== NOT EXECUTED 30002494: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 30002498: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED 3000249c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 300024a0: e7963203 ldr r3, [r6, r3, lsl #4] <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 300024a4: e7d80004 ldrb r0, [r8, r4] <== NOT EXECUTED 300024a8: e1a01005 mov r1, r5 <== NOT EXECUTED 300024ac: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED 300024b0: e1a0e00f mov lr, pc <== NOT EXECUTED 300024b4: e12fff13 bx r3 <== 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--) { 300024b8: e1540007 cmp r4, r7 <== NOT EXECUTED 300024bc: 1afffff4 bne 30002494 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 300024c0: e59540e4 ldr r4, [r5, #228] <== NOT EXECUTED 300024c4: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 300024c8: 1a00000a bne 300024f8 <== NOT EXECUTED 300024cc: e59530dc ldr r3, [r5, #220] <== NOT EXECUTED 300024d0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300024d4: 0a000007 beq 300024f8 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 300024d8: e2850030 add r0, r5, #48 ; 0x30 <== NOT EXECUTED 300024dc: e59510e0 ldr r1, [r5, #224] <== NOT EXECUTED 300024e0: e1a0e00f mov lr, pc <== NOT EXECUTED 300024e4: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 300024e8: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 300024ec: e58530e4 str r3, [r5, #228] <== NOT EXECUTED 300024f0: e1a09004 mov r9, r4 <== NOT EXECUTED 300024f4: ea000000 b 300024fc <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 300024f8: e3a09000 mov r9, #0 ; 0x0 <== NOT EXECUTED } 300024fc: e1a00009 mov r0, r9 <== NOT EXECUTED 30002500: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 30002504: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== 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); 30002508: e1a09003 mov r9, r3 <== 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, 3000250c: e280204a add r2, r0, #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); 30002510: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 30002514: e2577001 subs r7, r7, #1 ; 0x1 <== 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, 30002518: e58d2000 str r2, [sp] <== 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); 3000251c: e58d3008 str r3, [sp, #8] <== NOT EXECUTED 30002520: e1a0b009 mov fp, r9 <== NOT EXECUTED 30002524: e1a0a009 mov sl, r9 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 30002528: 3a000047 bcc 3000264c <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 3000252c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 30002530: e7d8600a ldrb r6, [r8, sl] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 30002534: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 30002538: 0a000008 beq 30002560 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 3000253c: e5d5204a ldrb r2, [r5, #74] <== NOT EXECUTED 30002540: e1520006 cmp r2, r6 <== NOT EXECUTED 30002544: 0a000046 beq 30002664 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 30002548: e5d53049 ldrb r3, [r5, #73] <== NOT EXECUTED 3000254c: e1530006 cmp r3, r6 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 30002550: 059530b8 ldreq r3, [r5, #184] <== NOT EXECUTED 30002554: 03c33010 biceq r3, r3, #16 ; 0x10 <== NOT EXECUTED 30002558: 058530b8 streq r3, [r5, #184] <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 3000255c: 0a000048 beq 30002684 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 30002560: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED 30002564: 1a000046 bne 30002684 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 30002568: e5950060 ldr r0, [r5, #96] <== NOT EXECUTED 3000256c: e5951064 ldr r1, [r5, #100] <== NOT EXECUTED 30002570: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 30002574: eb0041ca bl 30012ca4 <__umodsi3> <== NOT EXECUTED 30002578: e1a04000 mov r4, r0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 3000257c: e10f2000 mrs r2, CPSR <== NOT EXECUTED 30002580: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 30002584: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 30002588: e58d2004 str r2, [sp, #4] <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 3000258c: e595305c ldr r3, [r5, #92] <== NOT EXECUTED 30002590: e5950064 ldr r0, [r5, #100] <== NOT EXECUTED 30002594: e5951064 ldr r1, [r5, #100] <== NOT EXECUTED 30002598: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 3000259c: e0800004 add r0, r0, r4 <== NOT EXECUTED 300025a0: eb0041bf bl 30012ca4 <__umodsi3> <== NOT EXECUTED 300025a4: e59530c0 ldr r3, [r5, #192] <== NOT EXECUTED 300025a8: e1500003 cmp r0, r3 <== NOT EXECUTED 300025ac: 9a00000e bls 300025ec <== NOT EXECUTED 300025b0: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 300025b4: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 300025b8: 1a00000b bne 300025ec <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 300025bc: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 300025c0: e59f1190 ldr r1, [pc, #400] ; 30002758 <== 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; 300025c4: e3833001 orr r3, r3, #1 ; 0x1 <== NOT EXECUTED 300025c8: e58530b8 str r3, [r5, #184] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 300025cc: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 300025d0: e0021001 and r1, r2, r1 <== NOT EXECUTED 300025d4: e3510b01 cmp r1, #1024 ; 0x400 <== NOT EXECUTED 300025d8: 0a000044 beq 300026f0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 300025dc: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 300025e0: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 300025e4: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 300025e8: 0a00004f beq 3000272c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 300025ec: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 300025f0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 300025f4: e595305c ldr r3, [r5, #92] <== NOT EXECUTED 300025f8: e1530004 cmp r3, r4 <== NOT EXECUTED dropped++; 300025fc: 02899001 addeq r9, r9, #1 ; 0x1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 30002600: 0a00000e beq 30002640 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 30002604: e5953058 ldr r3, [r5, #88] <== NOT EXECUTED 30002608: e7c36004 strb r6, [r3, r4] <== 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 )) { 3000260c: e59520e4 ldr r2, [r5, #228] <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 30002610: e5854060 str r4, [r5, #96] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 30002614: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 30002618: 1a000008 bne 30002640 <== NOT EXECUTED 3000261c: e59530dc ldr r3, [r5, #220] <== NOT EXECUTED 30002620: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002624: 0a000005 beq 30002640 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 30002628: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 3000262c: e59510e0 ldr r1, [r5, #224] <== NOT EXECUTED 30002630: e1a0e00f mov lr, pc <== NOT EXECUTED 30002634: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 30002638: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3000263c: e58520e4 str r2, [r5, #228] <== NOT EXECUTED 30002640: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 30002644: e2577001 subs r7, r7, #1 ; 0x1 <== NOT EXECUTED 30002648: 2affffb7 bcs 3000252c <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 3000264c: e5953078 ldr r3, [r5, #120] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 30002650: e5950068 ldr r0, [r5, #104] <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 30002654: e0833009 add r3, r3, r9 <== NOT EXECUTED 30002658: e5853078 str r3, [r5, #120] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 3000265c: eb000895 bl 300048b8 <== NOT EXECUTED 30002660: eaffffa5 b 300024fc <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 30002664: e5d53049 ldrb r3, [r5, #73] <== NOT EXECUTED 30002668: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 3000266c: 059530b8 ldreq r3, [r5, #184] <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 30002670: 159530b8 ldrne r3, [r5, #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; 30002674: 02233010 eoreq r3, r3, #16 ; 0x10 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 30002678: 13833010 orrne r3, r3, #16 ; 0x10 <== 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; 3000267c: 058530b8 streq r3, [r5, #184] <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 30002680: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 30002684: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30002688: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 3000268c: e3530020 cmp r3, #32 ; 0x20 <== NOT EXECUTED 30002690: 0a000002 beq 300026a0 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 30002694: e3a0b001 mov fp, #1 ; 0x1 <== 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); tty->tty_rcvwakeup = 1; 30002698: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED 3000269c: eaffffe8 b 30002644 <== 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); 300026a0: e10f4000 mrs r4, CPSR <== NOT EXECUTED 300026a4: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED 300026a8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 300026ac: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 300026b0: e5952094 ldr r2, [r5, #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; 300026b4: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 300026b8: 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; 300026bc: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 300026c0: 1a000002 bne 300026d0 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 300026c4: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 300026c8: e3a0b001 mov fp, #1 ; 0x1 <== NOT EXECUTED 300026cc: eafffff1 b 30002698 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 300026d0: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED 300026d4: e595107c ldr r1, [r5, #124] <== NOT EXECUTED 300026d8: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 300026dc: e0811003 add r1, r1, r3 <== NOT EXECUTED 300026e0: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 300026e4: e1a0e00f mov lr, pc <== NOT EXECUTED 300026e8: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED 300026ec: eafffff4 b 300026c4 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 300026f0: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 300026f4: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 300026f8: 1a000002 bne 30002708 <== NOT EXECUTED 300026fc: e5953094 ldr r3, [r5, #148] <== NOT EXECUTED 30002700: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30002704: 1affffb8 bne 300025ec <== 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; 30002708: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED (*tty->device.write)(tty->minor, 3000270c: e5950010 ldr r0, [r5, #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; 30002710: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 30002714: e58530b8 str r3, [r5, #184] <== NOT EXECUTED (*tty->device.write)(tty->minor, 30002718: e59d1000 ldr r1, [sp] <== NOT EXECUTED 3000271c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 30002720: e1a0e00f mov lr, pc <== NOT EXECUTED 30002724: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED 30002728: eaffffaf b 300025ec <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 3000272c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 30002730: e59520ac ldr r2, [r5, #172] <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 30002734: e3833004 orr r3, r3, #4 ; 0x4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 30002738: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 3000273c: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 30002740: 0affffa9 beq 300025ec <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 30002744: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 30002748: e1a0e00f mov lr, pc <== NOT EXECUTED 3000274c: e12fff12 bx r2 <== NOT EXECUTED 30002750: eaffffa5 b 300025ec <== NOT EXECUTED 30002754: 30016c50 .word 0x30016c50 30002758: 00000402 .word 0x00000402 3000215c : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 3000215c: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 30002160: e59fc034 ldr ip, [pc, #52] ; 3000219c struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 30002164: e24dd004 sub sp, sp, #4 ; 0x4 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 30002168: e59c3000 ldr r3, [ip] 3000216c: e3530000 cmp r3, #0 ; 0x0 30002170: 0a000001 beq 3000217c RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 30002174: e28dd004 add sp, sp, #4 ; 0x4 30002178: e8bd8000 pop {pc} /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 3000217c: e59f001c ldr r0, [pc, #28] ; 300021a0 30002180: e3a01001 mov r1, #1 ; 0x1 30002184: e3a02054 mov r2, #84 ; 0x54 30002188: e58dc000 str ip, [sp] 3000218c: eb0008de bl 3000450c rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 30002190: e3500000 cmp r0, #0 ; 0x0 30002194: 0afffff6 beq 30002174 rtems_fatal_error_occurred (sc); 30002198: eb000b3d bl 30004e94 <== NOT EXECUTED 3000219c: 30016e5c .word 0x30016e5c 300021a0: 54526d69 .word 0x54526d69 300033bc : } } rtems_status_code rtems_termios_ioctl (void *arg) { 300033bc: 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; 300033c0: e5903000 ldr r3, [r0] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 300033c4: 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; 300033c8: e5935028 ldr r5, [r3, #40] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 300033cc: e580100c str r1, [r0, #12] <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 300033d0: e1a06000 mov r6, r0 <== NOT EXECUTED 300033d4: 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); 300033d8: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 300033dc: 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; 300033e0: 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); 300033e4: eb0004ec bl 3000479c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 300033e8: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED 300033ec: 1a00000a bne 3000341c <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 300033f0: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED 300033f4: e3520004 cmp r2, #4 ; 0x4 <== NOT EXECUTED 300033f8: 0a00001f beq 3000347c <== NOT EXECUTED 300033fc: 8a00000a bhi 3000342c <== NOT EXECUTED 30003400: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 30003404: 0a00005e beq 30003584 <== NOT EXECUTED 30003408: 9a000045 bls 30003524 <== NOT EXECUTED if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 3000340c: e1a00005 mov r0, r5 <== NOT EXECUTED 30003410: ebfffec9 bl 30002f3c <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 30003414: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 30003418: eb000526 bl 300048b8 <== NOT EXECUTED args->ioctl_return = sc; 3000341c: e586700c str r7, [r6, #12] <== NOT EXECUTED return sc; } 30003420: e1a00007 mov r0, r7 <== NOT EXECUTED 30003424: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 30003428: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== 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) { 3000342c: e59f3364 ldr r3, [pc, #868] ; 30003798 <== NOT EXECUTED 30003430: e1520003 cmp r2, r3 <== NOT EXECUTED 30003434: 0a000046 beq 30003554 <== NOT EXECUTED 30003438: 8a000017 bhi 3000349c <== NOT EXECUTED 3000343c: e3520005 cmp r2, #5 ; 0x5 <== NOT EXECUTED 30003440: 0a000011 beq 3000348c <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 30003444: e59520cc ldr r2, [r5, #204] <== NOT EXECUTED 30003448: e59f334c ldr r3, [pc, #844] ; 3000379c <== NOT EXECUTED 3000344c: e1a02282 lsl r2, r2, #5 <== NOT EXECUTED 30003450: e0833002 add r3, r3, r2 <== NOT EXECUTED 30003454: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 30003458: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3000345c: 03a0700a moveq r7, #10 ; 0xa <== NOT EXECUTED 30003460: 0affffeb beq 30003414 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 30003464: e1a00005 mov r0, r5 <== NOT EXECUTED 30003468: e1a01006 mov r1, r6 <== NOT EXECUTED 3000346c: e1a0e00f mov lr, pc <== NOT EXECUTED 30003470: e12fff13 bx r3 <== NOT EXECUTED 30003474: e1a07000 mov r7, r0 <== NOT EXECUTED 30003478: eaffffe5 b 30003414 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3000347c: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 30003480: e58530e0 str r3, [r5, #224] <== NOT EXECUTED 30003484: e58520dc str r2, [r5, #220] <== NOT EXECUTED 30003488: eaffffe1 b 30003414 <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 3000348c: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 30003490: e58530d8 str r3, [r5, #216] <== NOT EXECUTED 30003494: e58520d4 str r2, [r5, #212] <== NOT EXECUTED 30003498: eaffffdd b 30003414 <== 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) { 3000349c: e59f32fc ldr r3, [pc, #764] ; 300037a0 <== NOT EXECUTED 300034a0: e1520003 cmp r2, r3 <== NOT EXECUTED 300034a4: 0a00001a beq 30003514 <== NOT EXECUTED 300034a8: e2833105 add r3, r3, #1073741825 ; 0x40000001 <== NOT EXECUTED 300034ac: e1520003 cmp r2, r3 <== NOT EXECUTED 300034b0: 1affffe3 bne 30003444 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 300034b4: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 300034b8: e59f42dc ldr r4, [pc, #732] ; 3000379c <== NOT EXECUTED 300034bc: e1a03183 lsl r3, r3, #3 <== NOT EXECUTED 300034c0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 300034c4: e7943103 ldr r3, [r4, r3, lsl #2] <== NOT EXECUTED 300034c8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300034cc: 0a000003 beq 300034e0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 300034d0: e1a00005 mov r0, r5 <== NOT EXECUTED 300034d4: e1a0e00f mov lr, pc <== NOT EXECUTED 300034d8: e12fff13 bx r3 <== NOT EXECUTED 300034dc: e1a07000 mov r7, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 300034e0: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 300034e4: e3a02000 mov r2, #0 ; 0x0 <== 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); 300034e8: e5931000 ldr r1, [r3] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 300034ec: e58520d0 str r2, [r5, #208] <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 300034f0: e7943281 ldr r3, [r4, r1, lsl #5] <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 300034f4: e58510cc str r1, [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) { 300034f8: e1530002 cmp r3, r2 <== NOT EXECUTED 300034fc: 0affffc4 beq 30003414 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 30003500: e1a00005 mov r0, r5 <== NOT EXECUTED 30003504: e1a0e00f mov lr, pc <== NOT EXECUTED 30003508: e12fff13 bx r3 <== NOT EXECUTED 3000350c: e1a07000 mov r7, r0 <== NOT EXECUTED 30003510: eaffffbf b 30003414 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 30003514: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED 30003518: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 3000351c: e5823000 str r3, [r2] <== NOT EXECUTED 30003520: eaffffbb b 30003414 <== 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) { 30003524: e3520001 cmp r2, #1 ; 0x1 <== NOT EXECUTED 30003528: 1affffc5 bne 30003444 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 3000352c: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED 30003530: e285c030 add ip, r5, #48 ; 0x30 <== NOT EXECUTED 30003534: e1a0e004 mov lr, r4 <== NOT EXECUTED 30003538: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3000353c: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 30003540: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30003544: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 30003548: e59c3000 ldr r3, [ip] <== NOT EXECUTED 3000354c: e58e3000 str r3, [lr] <== NOT EXECUTED 30003550: eaffffaf b 30003414 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 30003554: e5952060 ldr r2, [r5, #96] <== NOT EXECUTED 30003558: 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; 3000355c: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) 30003560: e0520003 subs r0, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 30003564: 45953064 ldrmi r3, [r5, #100] <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 30003568: 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; 3000356c: 40800003 addmi r0, r0, r3 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 30003570: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 30003574: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 30003578: e0833000 add r3, r3, r0 <== NOT EXECUTED 3000357c: e5813000 str r3, [r1] <== NOT EXECUTED 30003580: eaffffa3 b 30003414 <== 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; 30003584: e596c008 ldr ip, [r6, #8] <== NOT EXECUTED 30003588: e2858030 add r8, r5, #48 ; 0x30 <== NOT EXECUTED 3000358c: e1a0e00c mov lr, ip <== NOT EXECUTED 30003590: e1a04008 mov r4, r8 <== NOT EXECUTED 30003594: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 30003598: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3000359c: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 300035a0: e8a4000f stmia r4!, {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) && 300035a4: 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; 300035a8: 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) && 300035ac: 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; 300035b0: e5842000 str r2, [r4] <== 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) && 300035b4: 0a000012 beq 30003604 <== NOT EXECUTED 300035b8: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 300035bc: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 300035c0: 1a00000f bne 30003604 <== NOT EXECUTED !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 300035c4: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 300035c8: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 300035cc: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 300035d0: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 300035d4: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED 300035d8: 0a000009 beq 30003604 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 300035dc: e10f4000 mrs r4, CPSR <== NOT EXECUTED 300035e0: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED 300035e4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 300035e8: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 300035ec: 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; 300035f0: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 300035f4: 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; 300035f8: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 300035fc: 1a00005d bne 30003778 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 30003600: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 30003604: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30003608: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 3000360c: 0a000008 beq 30003634 <== NOT EXECUTED 30003610: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 30003614: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 30003618: 1a000005 bne 30003634 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 3000361c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30003620: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 30003624: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 30003628: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 3000362c: e3c22002 bic r2, r2, #2 ; 0x2 <== NOT EXECUTED 30003630: e58520b8 str r2, [r5, #184] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 30003634: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30003638: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3000363c: 05951038 ldreq r1, [r5, #56] <== NOT EXECUTED 30003640: 0a000012 beq 30003690 <== NOT EXECUTED 30003644: e5951038 ldr r1, [r5, #56] <== NOT EXECUTED 30003648: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 3000364c: ba00003d blt 30003748 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 30003650: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30003654: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 30003658: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 3000365c: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 30003660: e3120004 tst r2, #4 ; 0x4 <== NOT EXECUTED 30003664: 0a000006 beq 30003684 <== NOT EXECUTED 30003668: e59530b0 ldr r3, [r5, #176] <== NOT EXECUTED 3000366c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003670: 0a000003 beq 30003684 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 30003674: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 30003678: e1a0e00f mov lr, pc <== NOT EXECUTED 3000367c: e12fff13 bx r3 <== NOT EXECUTED 30003680: e5951038 ldr r1, [r5, #56] <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 30003684: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 30003688: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED 3000368c: 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) { 30003690: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 30003694: ba00002b blt 30003748 <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 30003698: e5952030 ldr r2, [r5, #48] <== NOT EXECUTED 3000369c: e3120a01 tst r2, #4096 ; 0x1000 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 300036a0: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 300036a4: 13833b01 orrne r3, r3, #1024 ; 0x400 <== NOT EXECUTED 300036a8: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 300036ac: e3120b01 tst r2, #1024 ; 0x400 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 300036b0: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 300036b4: 13833c02 orrne r3, r3, #512 ; 0x200 <== NOT EXECUTED 300036b8: 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) { 300036bc: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 300036c0: e2134002 ands r4, r3, #2 ; 0x2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 300036c4: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 300036c8: 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; 300036cc: 1585306c strne r3, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 300036d0: 15853070 strne r3, [r5, #112] <== 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) { 300036d4: 0a000007 beq 300036f8 <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 300036d8: e59530a8 ldr r3, [r5, #168] <== NOT EXECUTED 300036dc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300036e0: 0affff4b beq 30003414 <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 300036e4: e1a01008 mov r1, r8 <== NOT EXECUTED 300036e8: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 300036ec: e1a0e00f mov lr, pc <== NOT EXECUTED 300036f0: e12fff13 bx r3 <== NOT EXECUTED 300036f4: eaffff46 b 30003414 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); 300036f8: e1a0100d mov r1, sp <== NOT EXECUTED 300036fc: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 30003700: eb0001eb bl 30003eb4 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 30003704: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30003708: e5d50046 ldrb r0, [r5, #70] <== NOT EXECUTED 3000370c: e59f2090 ldr r2, [pc, #144] ; 300037a4 <== NOT EXECUTED 30003710: e0010093 mul r1, r3, r0 <== NOT EXECUTED 30003714: e083c192 umull ip, r3, r2, r1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 30003718: e3500000 cmp r0, #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; 3000371c: e1a021a3 lsr r2, r3, #3 <== NOT EXECUTED 30003720: e5852054 str r2, [r5, #84] <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 30003724: 0a00000b beq 30003758 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 30003728: e5d53047 ldrb r3, [r5, #71] <== 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; 3000372c: e585406c str r4, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003730: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003734: 01a03002 moveq r3, r2 <== NOT EXECUTED 30003738: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED 3000373c: 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; 30003740: e5852070 str r2, [r5, #112] <== NOT EXECUTED 30003744: eaffffe3 b 300036d8 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 30003748: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3000374c: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED 30003750: e58530b8 str r3, [r5, #184] <== NOT EXECUTED 30003754: eaffffcf b 30003698 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 30003758: e5d53047 ldrb r3, [r5, #71] <== NOT EXECUTED 3000375c: 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; 30003760: 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; 30003764: 15850074 strne r0, [r5, #116] <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 30003768: 1585006c strne r0, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3000376c: 15850070 strne r0, [r5, #112] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 30003770: 0585306c streq r3, [r5, #108] <== NOT EXECUTED 30003774: eaffffd7 b 300036d8 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 30003778: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED 3000377c: e595107c ldr r1, [r5, #124] <== NOT EXECUTED 30003780: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 30003784: e0811003 add r1, r1, r3 <== NOT EXECUTED 30003788: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3000378c: e1a0e00f mov lr, pc <== NOT EXECUTED 30003790: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED 30003794: eaffff99 b 30003600 <== NOT EXECUTED 30003798: 4004667f .word 0x4004667f 3000379c: 30016c50 .word 0x30016c50 300037a0: 4004741a .word 0x4004741a 300037a4: cccccccd .word 0xcccccccd 3000394c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3000394c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003950: e59fb40c ldr fp, [pc, #1036] ; 30003d64 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30003954: e24dd00c sub sp, sp, #12 ; 0xc 30003958: e1a07001 mov r7, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3000395c: e3a01000 mov r1, #0 ; 0x0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30003960: e58d2008 str r2, [sp, #8] 30003964: e1a05000 mov r5, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003968: e1a02001 mov r2, r1 3000396c: e59b0000 ldr r0, [fp] rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30003970: e1a08003 mov r8, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003974: eb000388 bl 3000479c RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30003978: e2509000 subs r9, r0, #0 ; 0x0 3000397c: 1a000021 bne 30003a08 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 30003980: e59fa3e0 ldr sl, [pc, #992] ; 30003d68 30003984: e59a4000 ldr r4, [sl] 30003988: e3540000 cmp r4, #0 ; 0x0 3000398c: 1a000003 bne 300039a0 30003990: ea00001f b 30003a14 30003994: e5944000 ldr r4, [r4] <== NOT EXECUTED 30003998: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 3000399c: 0a00001c beq 30003a14 <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 300039a0: e594300c ldr r3, [r4, #12] 300039a4: e1530005 cmp r3, r5 300039a8: 1afffff9 bne 30003994 300039ac: e5943010 ldr r3, [r4, #16] 300039b0: e1530007 cmp r3, r7 300039b4: 1afffff6 bne 30003994 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 300039b8: e59d1008 ldr r1, [sp, #8] if (!tty->refcount++) { 300039bc: e5943008 ldr r3, [r4, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 300039c0: e5912000 ldr r2, [r1] if (!tty->refcount++) { 300039c4: e3530000 cmp r3, #0 ; 0x0 300039c8: e2833001 add r3, r3, #1 ; 0x1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 300039cc: e5824028 str r4, [r2, #40] if (!tty->refcount++) { 300039d0: e5843008 str r3, [r4, #8] 300039d4: 1a000009 bne 30003a00 if (tty->device.firstOpen) 300039d8: e5943098 ldr r3, [r4, #152] 300039dc: e3530000 cmp r3, #0 ; 0x0 (*tty->device.firstOpen)(major, minor, arg); 300039e0: 11a00005 movne r0, r5 300039e4: 11a01007 movne r1, r7 300039e8: 159d2008 ldrne r2, [sp, #8] 300039ec: 11a0e00f movne lr, pc 300039f0: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300039f4: e59430b4 ldr r3, [r4, #180] 300039f8: e3530002 cmp r3, #2 ; 0x2 300039fc: 0a00009a beq 30003c6c (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 30003a00: e59b0000 ldr r0, [fp] 30003a04: eb0003ab bl 300048b8 return RTEMS_SUCCESSFUL; } 30003a08: e1a00009 mov r0, r9 30003a0c: e28dd00c add sp, sp, #12 ; 0xc 30003a10: 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)); 30003a14: e3a00001 mov r0, #1 ; 0x1 30003a18: e3a010e8 mov r1, #232 ; 0xe8 30003a1c: eb001522 bl 30008eac if (tty == NULL) { 30003a20: e3500000 cmp r0, #0 ; 0x0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 30003a24: e1a06000 mov r6, r0 30003a28: e1a04000 mov r4, r0 if (tty == NULL) { 30003a2c: 0a0000a1 beq 30003cb8 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 30003a30: e59f3334 ldr r3, [pc, #820] ; 30003d6c 30003a34: e5932000 ldr r2, [r3] 30003a38: e5862064 str r2, [r6, #100] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 30003a3c: e5960064 ldr r0, [r6, #100] 30003a40: eb0016c8 bl 30009568 if (tty->rawInBuf.theBuf == NULL) { 30003a44: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 30003a48: e5860058 str r0, [r6, #88] if (tty->rawInBuf.theBuf == NULL) { 30003a4c: 0a000097 beq 30003cb0 return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 30003a50: e59f3318 ldr r3, [pc, #792] ; 30003d70 30003a54: e5932000 ldr r2, [r3] 30003a58: e5862088 str r2, [r6, #136] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 30003a5c: e5960088 ldr r0, [r6, #136] 30003a60: eb0016c0 bl 30009568 if (tty->rawOutBuf.theBuf == NULL) { 30003a64: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 30003a68: e586007c str r0, [r6, #124] if (tty->rawOutBuf.theBuf == NULL) { 30003a6c: 0a00008d beq 30003ca8 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 30003a70: e59f32fc ldr r3, [pc, #764] ; 30003d74 30003a74: e5930000 ldr r0, [r3] 30003a78: eb0016ba bl 30009568 if (tty->cbuf == NULL) { 30003a7c: e3500000 cmp r0, #0 ; 0x0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 30003a80: e586001c str r0, [r6, #28] if (tty->cbuf == NULL) { 30003a84: 0a000085 beq 30003ca0 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 30003a88: e59a2000 ldr r2, [sl] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 30003a8c: e3a03000 mov r3, #0 ; 0x0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 30003a90: e1520003 cmp r2, r3 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 30003a94: e886000c stm r6, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 30003a98: 15826004 strne r6, [r2, #4] rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 30003a9c: e59f22d4 ldr r2, [pc, #724] ; 30003d78 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 30003aa0: e58630d4 str r3, [r6, #212] tty->tty_snd.sw_arg = NULL; 30003aa4: e58630d8 str r3, [r6, #216] tty->tty_rcv.sw_pfn = NULL; 30003aa8: e58630dc str r3, [r6, #220] tty->tty_rcv.sw_arg = NULL; 30003aac: e58630e0 str r3, [r6, #224] tty->tty_rcvwakeup = 0; 30003ab0: e58630e4 str r3, [r6, #228] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003ab4: e59f12c0 ldr r1, [pc, #704] ; 30003d7c 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) 30003ab8: e5923000 ldr r3, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003abc: e59f02bc ldr r0, [pc, #700] ; 30003d80 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) 30003ac0: e3530000 cmp r3, #0 ; 0x0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003ac4: e5d13000 ldrb r3, [r1] tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 30003ac8: 05826000 streq r6, [r2] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 30003acc: e58a6000 str r6, [sl] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003ad0: e286c014 add ip, r6, #20 ; 0x14 30003ad4: e1830000 orr r0, r3, r0 30003ad8: e3a01001 mov r1, #1 ; 0x1 30003adc: e3a03000 mov r3, #0 ; 0x0 30003ae0: e3a02054 mov r2, #84 ; 0x54 30003ae4: e58dc000 str ip, [sp] rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 30003ae8: e5867010 str r7, [r6, #16] tty->major = major; 30003aec: e586500c str r5, [r6, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003af0: eb000285 bl 3000450c 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) 30003af4: e2503000 subs r3, r0, #0 ; 0x0 30003af8: 1a000067 bne 30003c9c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 30003afc: e59f1278 ldr r1, [pc, #632] ; 30003d7c 30003b00: e59f027c ldr r0, [pc, #636] ; 30003d84 30003b04: e5d12000 ldrb r2, [r1] 30003b08: e286c018 add ip, r6, #24 ; 0x18 30003b0c: e1820000 orr r0, r2, r0 30003b10: e3a01001 mov r1, #1 ; 0x1 30003b14: e3a02054 mov r2, #84 ; 0x54 30003b18: e58dc000 str ip, [sp] 30003b1c: eb00027a bl 3000450c 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) 30003b20: e2501000 subs r1, r0, #0 ; 0x0 30003b24: 1a00005c bne 30003c9c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 30003b28: e59f224c ldr r2, [pc, #588] ; 30003d7c 30003b2c: e59f0254 ldr r0, [pc, #596] ; 30003d88 30003b30: e5d23000 ldrb r3, [r2] 30003b34: e286c08c add ip, r6, #140 ; 0x8c 30003b38: e1830000 orr r0, r3, r0 30003b3c: e3a02020 mov r2, #32 ; 0x20 30003b40: e1a03001 mov r3, r1 30003b44: e58dc000 str ip, [sp] 30003b48: eb00026f bl 3000450c rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 30003b4c: e250a000 subs sl, r0, #0 ; 0x0 30003b50: 1a000051 bne 30003c9c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 30003b54: e286c098 add ip, r6, #152 ; 0x98 30003b58: e1a0e008 mov lr, r8 30003b5c: e8be000f ldm lr!, {r0, r1, r2, r3} 30003b60: e8ac000f stmia ip!, {r0, r1, r2, r3} 30003b64: e89e000f ldm lr, {r0, r1, r2, r3} 30003b68: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30003b6c: e59630b4 ldr r3, [r6, #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; 30003b70: e586a094 str sl, [r6, #148] tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30003b74: e3530002 cmp r3, #2 ; 0x2 30003b78: 0a00005f beq 30003cfc &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 30003b7c: e59630a0 ldr r3, [r6, #160] 30003b80: e3530000 cmp r3, #0 ; 0x0 30003b84: 0a00004f beq 30003cc8 30003b88: e59630b4 ldr r3, [r6, #180] 30003b8c: e3530002 cmp r3, #2 ; 0x2 30003b90: 0a00004c beq 30003cc8 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'; 30003b94: e3a00000 mov r0, #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; 30003b98: e58600b8 str r0, [r6, #184] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 30003b9c: e596c064 ldr ip, [r6, #100] tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 30003ba0: e59f31d4 ldr r3, [pc, #468] ; 30003d7c 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; 30003ba4: e5961064 ldr r1, [r6, #100] /* * Bump name characer */ if (c++ == 'z') 30003ba8: e5d32000 ldrb r2, [r3] 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; 30003bac: e1a03081 lsl r3, r1, #1 30003bb0: e0833001 add r3, r3, r1 /* * Bump name characer */ if (c++ == 'z') 30003bb4: e59f11c0 ldr r1, [pc, #448] ; 30003d7c 30003bb8: e352007a cmp r2, #122 ; 0x7a tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 30003bbc: e1a03123 lsr r3, r3, #2 /* * Bump name characer */ if (c++ == 'z') 30003bc0: e2822001 add r2, r2, #1 ; 0x1 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; 30003bc4: e58630c0 str r3, [r6, #192] /* * Bump name characer */ if (c++ == 'z') 30003bc8: e5c12000 strb r2, [r1] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 30003bcc: e59f31b8 ldr r3, [pc, #440] ; 30003d8c tty->termios.c_oflag = OPOST | ONLCR | XTABS; 30003bd0: e59f21b8 ldr r2, [pc, #440] ; 30003d90 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 30003bd4: e5863030 str r3, [r6, #48] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 30003bd8: e5862034 str r2, [r6, #52] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 30003bdc: e59f31b0 ldr r3, [pc, #432] ; 30003d94 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 30003be0: e59f21b0 ldr r2, [pc, #432] ; 30003d98 /* * 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; 30003be4: e5863038 str r3, [r6, #56] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 30003be8: e586203c str r2, [r6, #60] tty->termios.c_cc[VINTR] = '\003'; 30003bec: e3a03003 mov r3, #3 ; 0x3 tty->termios.c_cc[VQUIT] = '\034'; 30003bf0: e3a0201c mov r2, #28 ; 0x1c 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'; 30003bf4: e5c63041 strb r3, [r6, #65] tty->termios.c_cc[VQUIT] = '\034'; 30003bf8: e5c62042 strb r2, [r6, #66] tty->termios.c_cc[VERASE] = '\177'; 30003bfc: e283307c add r3, r3, #124 ; 0x7c tty->termios.c_cc[VKILL] = '\025'; 30003c00: e2422007 sub r2, r2, #7 ; 0x7 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'; tty->termios.c_cc[VERASE] = '\177'; 30003c04: e5c63043 strb r3, [r6, #67] tty->termios.c_cc[VKILL] = '\025'; 30003c08: e5c62044 strb r2, [r6, #68] tty->termios.c_cc[VEOF] = '\004'; 30003c0c: e243307b sub r3, r3, #123 ; 0x7b tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 30003c10: e2422004 sub r2, r2, #4 ; 0x4 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'; 30003c14: e5c63045 strb r3, [r6, #69] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 30003c18: e5c62049 strb r2, [r6, #73] tty->termios.c_cc[VSTOP] = '\023'; 30003c1c: e283300f add r3, r3, #15 ; 0xf tty->termios.c_cc[VSUSP] = '\032'; 30003c20: e2822009 add r2, r2, #9 ; 0x9 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 30003c24: e5c6304a strb r3, [r6, #74] tty->termios.c_cc[VSUSP] = '\032'; 30003c28: e5c6204b strb r2, [r6, #75] tty->termios.c_cc[VREPRINT] = '\022'; 30003c2c: e2433001 sub r3, r3, #1 ; 0x1 tty->termios.c_cc[VDISCARD] = '\017'; 30003c30: e242200b sub r2, r2, #11 ; 0xb tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 30003c34: e5c6304d strb r3, [r6, #77] tty->termios.c_cc[VDISCARD] = '\017'; 30003c38: e5c6204e strb r2, [r6, #78] tty->termios.c_cc[VWERASE] = '\027'; 30003c3c: e2833005 add r3, r3, #5 ; 0x5 tty->termios.c_cc[VLNEXT] = '\026'; 30003c40: e2822007 add r2, r2, #7 ; 0x7 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 30003c44: e5c6304f strb r3, [r6, #79] tty->termios.c_cc[VLNEXT] = '\026'; 30003c48: e5c62050 strb r2, [r6, #80] /* 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; 30003c4c: e1a0c0ac lsr ip, ip, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 30003c50: 0282204b addeq r2, r2, #75 ; 0x4b 30003c54: 01a03001 moveq r3, r1 /* 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; 30003c58: e586c0bc str ip, [r6, #188] 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'; 30003c5c: e5c6004c strb r0, [r6, #76] tty->termios.c_cc[VEOL2] = '\000'; 30003c60: e5c60051 strb r0, [r6, #81] tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 30003c64: 05c32000 strbeq r2, [r3] 30003c68: eaffff52 b 300039b8 (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 30003c6c: e59400c4 ldr r0, [r4, #196] <== NOT EXECUTED 30003c70: e59f1124 ldr r1, [pc, #292] ; 30003d9c <== NOT EXECUTED 30003c74: e1a02004 mov r2, r4 <== NOT EXECUTED 30003c78: eb0003e4 bl 30004c10 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 30003c7c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30003c80: 1a000005 bne 30003c9c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 30003c84: e1a02004 mov r2, r4 <== NOT EXECUTED 30003c88: e59400c8 ldr r0, [r4, #200] <== NOT EXECUTED 30003c8c: e59f110c ldr r1, [pc, #268] ; 30003da0 <== NOT EXECUTED 30003c90: eb0003de bl 30004c10 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 30003c94: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30003c98: 0affff58 beq 30003a00 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 30003c9c: eb00047c bl 30004e94 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 30003ca0: e596007c ldr r0, [r6, #124] <== NOT EXECUTED 30003ca4: eb0014bf bl 30008fa8 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 30003ca8: e5960058 ldr r0, [r6, #88] <== NOT EXECUTED 30003cac: eb0014bd bl 30008fa8 <== NOT EXECUTED free(tty); 30003cb0: e1a00006 mov r0, r6 <== NOT EXECUTED 30003cb4: eb0014bb bl 30008fa8 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 30003cb8: e59b0000 ldr r0, [fp] <== NOT EXECUTED 30003cbc: eb0002fd bl 300048b8 <== NOT EXECUTED 30003cc0: e3a0901a mov r9, #26 ; 0x1a <== NOT EXECUTED 30003cc4: eaffff4f b 30003a08 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 30003cc8: e59f10ac ldr r1, [pc, #172] ; 30003d7c <== NOT EXECUTED 30003ccc: e59f00d0 ldr r0, [pc, #208] ; 30003da4 <== NOT EXECUTED 30003cd0: e5d13000 ldrb r3, [r1] <== NOT EXECUTED 30003cd4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30003cd8: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30003cdc: e286c068 add ip, r6, #104 ; 0x68 <== NOT EXECUTED 30003ce0: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 30003ce4: e1a03001 mov r3, r1 <== NOT EXECUTED 30003ce8: e58dc000 str ip, [sp] <== NOT EXECUTED 30003cec: eb000206 bl 3000450c <== 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) 30003cf0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30003cf4: 0affffa6 beq 30003b94 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 30003cf8: eb000465 bl 30004e94 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 30003cfc: e59f1078 ldr r1, [pc, #120] ; 30003d7c <== NOT EXECUTED 30003d00: e59f00a0 ldr r0, [pc, #160] ; 30003da8 <== NOT EXECUTED 30003d04: e5d13000 ldrb r3, [r1] <== NOT EXECUTED 30003d08: e286c0c8 add ip, r6, #200 ; 0xc8 <== NOT EXECUTED 30003d0c: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30003d10: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 30003d14: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 30003d18: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 30003d1c: e88d1400 stm sp, {sl, ip} <== NOT EXECUTED 30003d20: eb00030d bl 3000495c <== 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) 30003d24: e250e000 subs lr, r0, #0 ; 0x0 <== NOT EXECUTED 30003d28: 1affffdb bne 30003c9c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 30003d2c: e59f2048 ldr r2, [pc, #72] ; 30003d7c <== NOT EXECUTED 30003d30: e59f0074 ldr r0, [pc, #116] ; 30003dac <== NOT EXECUTED 30003d34: e5d23000 ldrb r3, [r2] <== NOT EXECUTED 30003d38: e286c0c4 add ip, r6, #196 ; 0xc4 <== NOT EXECUTED 30003d3c: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30003d40: e3a01009 mov r1, #9 ; 0x9 <== NOT EXECUTED 30003d44: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 30003d48: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 30003d4c: e58de000 str lr, [sp] <== NOT EXECUTED 30003d50: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30003d54: eb000300 bl 3000495c <== 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) 30003d58: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30003d5c: 0affff86 beq 30003b7c <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 30003d60: eb00044b bl 30004e94 <== NOT EXECUTED 30003d64: 30016e5c .word 0x30016e5c 30003d68: 30016e64 .word 0x30016e64 30003d6c: 3001664c .word 0x3001664c 30003d70: 30016650 .word 0x30016650 30003d74: 30016648 .word 0x30016648 30003d78: 30016e60 .word 0x30016e60 30003d7c: 30016654 .word 0x30016654 30003d80: 54526900 .word 0x54526900 30003d84: 54526f00 .word 0x54526f00 30003d88: 54527800 .word 0x54527800 30003d8c: 00002502 .word 0x00002502 30003d90: 00001805 .word 0x00001805 30003d94: 000008bd .word 0x000008bd 30003d98: 0000823b .word 0x0000823b 30003d9c: 30003e24 .word 0x30003e24 30003da0: 30003db0 .word 0x30003db0 30003da4: 54527200 .word 0x54527200 30003da8: 54785400 .word 0x54785400 30003dac: 52785400 .word 0x52785400 3000275c : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 3000275c: 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) { 30002760: 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) { 30002764: 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) { 30002768: e1a04002 mov r4, r2 3000276c: e1a0b000 mov fp, r0 30002770: e1a09001 mov r9, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 30002774: 0a00003a beq 30002864 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 30002778: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 3000277c: e5928080 ldr r8, [r2, #128] <== NOT EXECUTED while (len) { 30002780: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30002784: e3a0a000 mov sl, #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; 30002788: e3a07002 mov r7, #2 ; 0x2 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 3000278c: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 30002790: e2880001 add r0, r8, #1 ; 0x1 <== NOT EXECUTED 30002794: eb004142 bl 30012ca4 <__umodsi3> <== NOT EXECUTED 30002798: e1a08000 mov r8, r0 <== NOT EXECUTED rtems_interrupt_disable (level); 3000279c: e10f5000 mrs r5, CPSR <== NOT EXECUTED 300027a0: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 300027a4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 300027a8: e5946084 ldr r6, [r4, #132] <== NOT EXECUTED 300027ac: e1560000 cmp r6, r0 <== NOT EXECUTED 300027b0: 1a00000d bne 300027ec <== NOT EXECUTED tty->rawOutBufState = rob_wait; 300027b4: e5847094 str r7, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 300027b8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 300027bc: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 300027c0: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 300027c4: e1a02001 mov r2, r1 <== NOT EXECUTED 300027c8: eb0007f3 bl 3000479c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 300027cc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300027d0: 1a00001a bne 30002840 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 300027d4: e10f5000 mrs r5, CPSR <== NOT EXECUTED 300027d8: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 300027dc: 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) { 300027e0: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 300027e4: e1530006 cmp r3, r6 <== NOT EXECUTED 300027e8: 0afffff1 beq 300027b4 <== 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++; 300027ec: e5940080 ldr r0, [r4, #128] <== NOT EXECUTED 300027f0: e7db200a ldrb r2, [fp, sl] <== NOT EXECUTED 300027f4: e594307c ldr r3, [r4, #124] <== NOT EXECUTED 300027f8: e7c32000 strb r2, [r3, r0] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 300027fc: e5941094 ldr r1, [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; 30002800: e5848080 str r8, [r4, #128] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 30002804: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 30002808: 1a000007 bne 3000282c <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 3000280c: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30002810: 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; 30002814: 159430b8 ldrne r3, [r4, #184] <== NOT EXECUTED 30002818: 13833020 orrne r3, r3, #32 ; 0x20 <== NOT EXECUTED 3000281c: 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)) { 30002820: 0a000007 beq 30002844 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 30002824: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 30002828: e5843094 str r3, [r4, #148] <== NOT EXECUTED } rtems_interrupt_enable (level); 3000282c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 30002830: e2599001 subs r9, r9, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; 30002834: e28aa001 add sl, sl, #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) { 30002838: 1affffd3 bne 3000278c <== NOT EXECUTED 3000283c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 30002840: eb000993 bl 30004e94 <== NOT EXECUTED tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 30002844: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 30002848: e594107c ldr r1, [r4, #124] <== NOT EXECUTED 3000284c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002850: e0811003 add r1, r1, r3 <== NOT EXECUTED 30002854: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 30002858: e1a0e00f mov lr, pc <== NOT EXECUTED 3000285c: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 30002860: eaffffef b 30002824 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 30002864: e1a01000 mov r1, r0 30002868: e1a02009 mov r2, r9 3000286c: e5940010 ldr r0, [r4, #16] 30002870: e1a0e00f mov lr, pc 30002874: e594f0a4 ldr pc, [r4, #164] 30002878: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30002fb8 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30002fb8: 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; 30002fbc: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30002fc0: e1a08000 mov r8, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002fc4: 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); 30002fc8: 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; 30002fcc: e5983008 ldr r3, [r8, #8] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30002fd0: e24dd010 sub sp, sp, #16 ; 0x10 <== 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); 30002fd4: e1a02001 mov r2, r1 <== NOT EXECUTED 30002fd8: 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; 30002fdc: e598600c ldr r6, [r8, #12] <== NOT EXECUTED char *buffer = args->buffer; 30002fe0: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002fe4: eb0005ec bl 3000479c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 30002fe8: e2509000 subs r9, r0, #0 ; 0x0 <== NOT EXECUTED 30002fec: 1a00000f bne 30003030 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 30002ff0: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 30002ff4: e59f23b4 ldr r2, [pc, #948] ; 300033b0 <== NOT EXECUTED 30002ff8: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 30002ffc: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 30003000: e7923183 ldr r3, [r2, r3, lsl #3] <== NOT EXECUTED 30003004: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003008: 0a00000b beq 3000303c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 3000300c: e1a01008 mov r1, r8 <== NOT EXECUTED 30003010: e1a00004 mov r0, r4 <== NOT EXECUTED 30003014: e1a0e00f mov lr, pc <== NOT EXECUTED 30003018: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 3000301c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 30003020: e1a09000 mov r9, r0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 30003024: e58430e4 str r3, [r4, #228] <== NOT EXECUTED rtems_semaphore_release (tty->isem); 30003028: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3000302c: eb000621 bl 300048b8 <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 30003030: e1a00009 mov r0, r9 <== NOT EXECUTED 30003034: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 30003038: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 3000303c: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 30003040: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30003044: e1520003 cmp r2, r3 <== NOT EXECUTED 30003048: 0a00001b beq 300030bc <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 3000304c: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 30003050: 0a000011 beq 3000309c <== NOT EXECUTED 30003054: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 30003058: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3000305c: e1520003 cmp r2, r3 <== NOT EXECUTED 30003060: aa00000d bge 3000309c <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30003064: e59d3000 ldr r3, [sp] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30003068: e1a01002 mov r1, r2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 3000306c: e0620003 rsb r0, r2, r3 <== NOT EXECUTED 30003070: ea000002 b 30003080 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30003074: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30003078: e1530001 cmp r3, r1 <== NOT EXECUTED 3000307c: da000006 ble 3000309c <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30003080: e594201c ldr r2, [r4, #28] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30003084: e2566001 subs r6, r6, #1 ; 0x1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30003088: e7d23001 ldrb r3, [r2, r1] <== NOT EXECUTED 3000308c: e7c03001 strb r3, [r0, r1] <== NOT EXECUTED 30003090: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 30003094: e5841024 str r1, [r4, #36] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30003098: 1afffff5 bne 30003074 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 3000309c: e598300c ldr r3, [r8, #12] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 300030a0: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 300030a4: e0663003 rsb r3, r6, r3 <== NOT EXECUTED 300030a8: e5883014 str r3, [r8, #20] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 300030ac: e58420e4 str r2, [r4, #228] <== NOT EXECUTED rtems_semaphore_release (tty->isem); 300030b0: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 300030b4: eb0005ff bl 300048b8 <== NOT EXECUTED 300030b8: eaffffdc b 30003030 <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 300030bc: e59420a0 ldr r2, [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; 300030c0: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED if (tty->device.pollRead != NULL 300030c4: e3520000 cmp r2, #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; 300030c8: e584302c str r3, [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; 300030cc: e5849020 str r9, [r4, #32] <== NOT EXECUTED 300030d0: e5849024 str r9, [r4, #36] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 300030d4: e1a01002 mov r1, r2 <== NOT EXECUTED 300030d8: 0a000002 beq 300030e8 <== NOT EXECUTED 300030dc: e59430b4 ldr r3, [r4, #180] <== NOT EXECUTED 300030e0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300030e4: 0a00005d beq 30003260 <== 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, 300030e8: e2843049 add r3, r4, #73 ; 0x49 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 300030ec: e5945074 ldr r5, [r4, #116] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 300030f0: e59fa2bc ldr sl, [pc, #700] ; 300033b4 <== 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)) 300030f4: e59fb2bc ldr fp, [pc, #700] ; 300033b8 <== 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, 300030f8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 300030fc: e3a07001 mov r7, #1 ; 0x1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 30003100: e594205c ldr r2, [r4, #92] <== NOT EXECUTED 30003104: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 30003108: e1520003 cmp r2, r3 <== NOT EXECUTED 3000310c: 0a000035 beq 300031e8 <== NOT EXECUTED 30003110: e59a3000 ldr r3, [sl] <== NOT EXECUTED 30003114: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30003118: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 3000311c: e1520003 cmp r2, r3 <== NOT EXECUTED 30003120: aa000030 bge 300031e8 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 30003124: e594005c ldr r0, [r4, #92] <== NOT EXECUTED 30003128: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 3000312c: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 30003130: eb003edb bl 30012ca4 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 30003134: 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; 30003138: e1a02000 mov r2, r0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 3000313c: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 30003140: e584005c str r0, [r4, #92] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 30003144: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 30003148: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 3000314c: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 30003150: e0800003 add r0, r0, r3 <== NOT EXECUTED 30003154: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 30003158: eb003ed1 bl 30012ca4 <__umodsi3> <== NOT EXECUTED 3000315c: e59430bc ldr r3, [r4, #188] <== NOT EXECUTED 30003160: e1500003 cmp r0, r3 <== NOT EXECUTED 30003164: 2a000012 bcs 300031b4 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 30003168: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 3000316c: e59f1244 ldr r1, [pc, #580] ; 300033b8 <== 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; 30003170: e3c33001 bic r3, r3, #1 ; 0x1 <== NOT EXECUTED 30003174: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 30003178: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED 3000317c: e0021001 and r1, r2, r1 <== NOT EXECUTED 30003180: e151000b cmp r1, fp <== NOT EXECUTED 30003184: 0a000029 beq 30003230 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 30003188: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 3000318c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 30003190: 0a000007 beq 300031b4 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 30003194: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 30003198: 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; 3000319c: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 300031a0: 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; 300031a4: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 300031a8: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 300031ac: 11a0e00f movne lr, pc <== NOT EXECUTED 300031b0: 112fff12 bxne r2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 300031b4: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 300031b8: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 300031bc: 0a000012 beq 3000320c <== NOT EXECUTED if (siproc (c, tty)) 300031c0: e1a00005 mov r0, r5 <== NOT EXECUTED 300031c4: e1a01004 mov r1, r4 <== NOT EXECUTED 300031c8: ebffff0e bl 30002e08 <== NOT EXECUTED 300031cc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300031d0: 1a000014 bne 30003228 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 300031d4: e594205c ldr r2, [r4, #92] <== NOT EXECUTED 300031d8: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 300031dc: e5945070 ldr r5, [r4, #112] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 300031e0: e1520003 cmp r2, r3 <== NOT EXECUTED 300031e4: 1affffc9 bne 30003110 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 300031e8: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 300031ec: 0affff96 beq 3000304c <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 300031f0: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED 300031f4: e594106c ldr r1, [r4, #108] <== NOT EXECUTED 300031f8: e1a02005 mov r2, r5 <== NOT EXECUTED 300031fc: eb000566 bl 3000479c <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 30003200: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30003204: 0affffbd beq 30003100 <== NOT EXECUTED 30003208: eaffff8f b 3000304c <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 3000320c: e1a00005 mov r0, r5 <== NOT EXECUTED 30003210: e1a01004 mov r1, r4 <== NOT EXECUTED 30003214: ebfffefb bl 30002e08 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 30003218: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 3000321c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30003220: e1530002 cmp r3, r2 <== NOT EXECUTED 30003224: baffffea blt 300031d4 <== NOT EXECUTED 30003228: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED 3000322c: eaffffe8 b 300031d4 <== 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)) 30003230: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 30003234: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003238: 0a000002 beq 30003248 <== NOT EXECUTED 3000323c: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 30003240: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 30003244: 0affffcf beq 30003188 <== 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, 30003248: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000324c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 30003250: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 30003254: e1a0e00f mov lr, pc <== NOT EXECUTED 30003258: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 3000325c: eaffffd4 b 300031b4 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 30003260: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 30003264: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 30003268: 1a000032 bne 30003338 <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 3000326c: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 30003270: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003274: 1a000006 bne 30003294 <== NOT EXECUTED 30003278: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 3000327c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003280: 0a000003 beq 30003294 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 30003284: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 30003288: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 3000328c: eb000308 bl 30003eb4 <== NOT EXECUTED 30003290: e59420a0 ldr r2, [r4, #160] <== 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); 30003294: e28d700c add r7, sp, #12 ; 0xc <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 30003298: e28d5008 add r5, sp, #8 ; 0x8 <== 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); 3000329c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300032a0: e1a0e00f mov lr, pc <== NOT EXECUTED 300032a4: e12fff12 bx r2 <== NOT EXECUTED if (n < 0) { 300032a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300032ac: aa000010 bge 300032f4 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 300032b0: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 300032b4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300032b8: 0a00002f beq 3000337c <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 300032bc: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 300032c0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300032c4: 0a000002 beq 300032d4 <== NOT EXECUTED 300032c8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 300032cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300032d0: 1a00002c bne 30003388 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 300032d4: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 300032d8: eb000667 bl 30004c7c <== NOT EXECUTED 300032dc: e59420a0 ldr r2, [r4, #160] <== 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); 300032e0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300032e4: e1a0e00f mov lr, pc <== NOT EXECUTED 300032e8: e12fff12 bx r2 <== NOT EXECUTED if (n < 0) { 300032ec: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300032f0: baffffee blt 300032b0 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 300032f4: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 300032f8: e1a01004 mov r1, r4 <== NOT EXECUTED 300032fc: ebfffec1 bl 30002e08 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 30003300: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 30003304: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30003308: e1530002 cmp r3, r2 <== NOT EXECUTED 3000330c: aaffff4e bge 3000304c <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 30003310: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 30003314: 0a000002 beq 30003324 <== NOT EXECUTED 30003318: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 3000331c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003320: 1a000010 bne 30003368 <== NOT EXECUTED 30003324: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED 30003328: eaffffdb b 3000329c <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 3000332c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30003330: eb000651 bl 30004c7c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 30003334: e59410a0 ldr r1, [r4, #160] <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 30003338: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000333c: e1a0e00f mov lr, pc <== NOT EXECUTED 30003340: e12fff11 bx r1 <== NOT EXECUTED if (n < 0) { 30003344: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 30003348: e1a01004 mov r1, r4 <== NOT EXECUTED 3000334c: 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) { 30003350: bafffff5 blt 3000332c <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 30003354: ebfffeab bl 30002e08 <== NOT EXECUTED 30003358: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3000335c: 1affff3a bne 3000304c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 30003360: e59410a0 ldr r1, [r4, #160] <== NOT EXECUTED 30003364: eafffff3 b 30003338 <== 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); 30003368: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 3000336c: e1a01007 mov r1, r7 <== NOT EXECUTED 30003370: eb0002cf bl 30003eb4 <== NOT EXECUTED 30003374: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED 30003378: eaffffc7 b 3000329c <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 3000337c: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 30003380: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30003384: 0affff30 beq 3000304c <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 30003388: e1a01005 mov r1, r5 <== NOT EXECUTED 3000338c: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 30003390: eb0002c7 bl 30003eb4 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 30003394: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 30003398: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3000339c: e5941054 ldr r1, [r4, #84] <== NOT EXECUTED 300033a0: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 300033a4: e1530001 cmp r3, r1 <== NOT EXECUTED 300033a8: 9affffc9 bls 300032d4 <== NOT EXECUTED 300033ac: eaffff26 b 3000304c <== NOT EXECUTED 300033b0: 30016c50 .word 0x30016c50 300033b4: 30016648 .word 0x30016648 300033b8: 00000202 .word 0x00000202 300021dc : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 300021dc: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 300021e0: e59f21fc ldr r2, [pc, #508] ; 300023e4 <== NOT EXECUTED 300021e4: e59f11fc ldr r1, [pc, #508] ; 300023e8 <== NOT EXECUTED 300021e8: e0032002 and r2, r3, r2 <== NOT EXECUTED 300021ec: e1520001 cmp r2, r1 <== 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) { 300021f0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 300021f4: 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)) 300021f8: 0a000038 beq 300022e0 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 300021fc: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 30002200: e2033003 and r3, r3, #3 ; 0x3 <== NOT EXECUTED 30002204: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 30002208: 0a000051 beq 30002354 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 3000220c: e5902080 ldr r2, [r0, #128] <== NOT EXECUTED 30002210: e5903084 ldr r3, [r0, #132] <== NOT EXECUTED 30002214: e1520003 cmp r2, r3 <== NOT EXECUTED 30002218: 0a00002a beq 300022c8 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 3000221c: e10f2000 mrs r2, CPSR <== NOT EXECUTED 30002220: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 30002224: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; 30002228: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 3000222c: e590c090 ldr ip, [r0, #144] <== NOT EXECUTED tty->t_dqlen = 0; 30002230: e5803090 str r3, [r0, #144] <== NOT EXECUTED rtems_interrupt_enable(level); 30002234: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 30002238: e5900084 ldr r0, [r0, #132] <== NOT EXECUTED 3000223c: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 30002240: e08c0000 add r0, ip, r0 <== NOT EXECUTED 30002244: eb004296 bl 30012ca4 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 30002248: 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; 3000224c: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 30002250: 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; 30002254: e5840084 str r0, [r4, #132] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 30002258: 0a00005a beq 300023c8 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 3000225c: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 30002260: e1530006 cmp r3, r6 <== NOT EXECUTED 30002264: 0a00002f beq 30002328 <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 30002268: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 3000226c: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 30002270: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 30002274: 0a000048 beq 3000239c <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 30002278: 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, 3000227c: e594107c ldr r1, [r4, #124] <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 30002280: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 30002284: 85943088 ldrhi r3, [r4, #136] <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 30002288: 95943080 ldrls r3, [r4, #128] <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 3000228c: 80665003 rsbhi r5, r6, r3 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 30002290: 90665003 rsbls 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)) { 30002294: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 30002298: e0811006 add r1, r1, r6 <== 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)) { 3000229c: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 300022a0: 13a05001 movne r5, #1 ; 0x1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 300022a4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 300022a8: e5843094 str r3, [r4, #148] <== NOT EXECUTED (*tty->device.write)(tty->minor, 300022ac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300022b0: e1a02005 mov r2, r5 <== NOT EXECUTED 300022b4: e1a0e00f mov lr, pc <== NOT EXECUTED 300022b8: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 300022bc: e5846084 str r6, [r4, #132] <== NOT EXECUTED } return nToSend; } 300022c0: e1a00005 mov r0, r5 <== NOT EXECUTED 300022c4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 300022c8: e5903094 ldr r3, [r0, #148] <== NOT EXECUTED 300022cc: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 300022d0: 0a00003f beq 300023d4 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 300022d4: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 300022d8: e1a00005 mov r0, r5 <== NOT EXECUTED 300022dc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 300022e0: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 300022e4: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 300022e8: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 300022ec: e1a0e00f mov lr, pc <== NOT EXECUTED 300022f0: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 300022f4: e10f1000 mrs r1, CPSR <== NOT EXECUTED 300022f8: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 300022fc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 30002300: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 30002304: 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--; 30002308: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 3000230c: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 30002310: 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--; 30002314: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 30002318: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 3000231c: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 30002320: e1a00005 mov r0, r5 <== NOT EXECUTED 30002324: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 30002328: e59420d4 ldr r2, [r4, #212] <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 3000232c: 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) { 30002330: e1520005 cmp r2, r5 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 30002334: 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) { 30002338: 01a05002 moveq r5, r2 <== NOT EXECUTED 3000233c: 0affffde beq 300022bc <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 30002340: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 30002344: e59410d8 ldr r1, [r4, #216] <== NOT EXECUTED 30002348: e1a0e00f mov lr, pc <== NOT EXECUTED 3000234c: e12fff12 bx r2 <== NOT EXECUTED 30002350: eaffffd9 b 300022bc <== 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, 30002354: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 30002358: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3000235c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 30002360: e1a0e00f mov lr, pc <== NOT EXECUTED 30002364: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 30002368: e10f1000 mrs r1, CPSR <== NOT EXECUTED 3000236c: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 30002370: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 30002374: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 30002378: 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--; 3000237c: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 30002380: e3c33002 bic r3, r3, #2 ; 0x2 <== NOT EXECUTED 30002384: 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--; 30002388: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 3000238c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30002390: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 30002394: e1a00005 mov r0, r5 <== NOT EXECUTED 30002398: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 3000239c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 300023a0: e38320c0 orr r2, r3, #192 ; 0xc0 <== NOT EXECUTED 300023a4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 300023a8: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 300023ac: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 300023b0: e3822020 orr r2, r2, #32 ; 0x20 <== NOT EXECUTED 300023b4: e58420b8 str r2, [r4, #184] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 300023b8: e5841094 str r1, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable(level); 300023bc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 300023c0: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 300023c4: eaffffbc b 300022bc <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 300023c8: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 300023cc: eb000939 bl 300048b8 <== NOT EXECUTED 300023d0: eaffffa1 b 3000225c <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 300023d4: e590008c ldr r0, [r0, #140] <== NOT EXECUTED 300023d8: eb000936 bl 300048b8 <== NOT EXECUTED 300023dc: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 300023e0: eaffffbc b 300022d8 <== NOT EXECUTED 300023e4: 00000403 .word 0x00000403 300023e8: 00000401 .word 0x00000401 30003e24 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 30003e24: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 30003e28: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 30003e2c: e1a04000 mov r4, r0 <== NOT EXECUTED 30003e30: e28d6007 add r6, sp, #7 ; 0x7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 30003e34: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED 30003e38: e1a0300d mov r3, sp <== NOT EXECUTED 30003e3c: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 30003e40: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30003e44: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 30003e48: eb0000b7 bl 3000412c <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 30003e4c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30003e50: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 30003e54: 1a000012 bne 30003ea4 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 30003e58: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30003e5c: e1a0e00f mov lr, pc <== NOT EXECUTED 30003e60: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED 30003e64: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 30003e68: e3730001 cmn r3, #1 ; 0x1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 30003e6c: e1a01006 mov r1, r6 <== NOT EXECUTED 30003e70: e1a00004 mov r0, r4 <== NOT EXECUTED 30003e74: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 30003e78: 0affffee beq 30003e38 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 30003e7c: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 30003e80: ebfff973 bl 30002454 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 30003e84: e1a0300d mov r3, sp <== NOT EXECUTED 30003e88: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 30003e8c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30003e90: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 30003e94: eb0000a4 bl 3000412c <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 30003e98: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30003e9c: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 30003ea0: 0affffec beq 30003e58 <== NOT EXECUTED tty->rxTaskId = 0; 30003ea4: e58470c4 str r7, [r4, #196] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 30003ea8: e1a00007 mov r0, r7 <== NOT EXECUTED 30003eac: eb0002f9 bl 30004a98 <== NOT EXECUTED 30003eb0: eaffffe0 b 30003e38 <== NOT EXECUTED 300021d0 : 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); 300021d0: e59000c4 ldr r0, [r0, #196] <== NOT EXECUTED 300021d4: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 300021d8: ea000835 b 300042b4 <== NOT EXECUTED 30003db0 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 30003db0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 30003db4: e59f7064 ldr r7, [pc, #100] ; 30003e20 <== NOT EXECUTED 30003db8: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 30003dbc: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 30003dc0: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 30003dc4: e1a0300d mov r3, sp <== NOT EXECUTED 30003dc8: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 30003dcc: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30003dd0: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 30003dd4: eb0000d4 bl 3000412c <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 30003dd8: 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); 30003ddc: 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) { 30003de0: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 30003de4: 1a000009 bne 30003e10 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 30003de8: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 30003dec: e1a03283 lsl r3, r3, #5 <== NOT EXECUTED 30003df0: e0873003 add r3, r7, r3 <== NOT EXECUTED 30003df4: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 30003df8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 30003dfc: 11a0e00f movne lr, pc <== NOT EXECUTED 30003e00: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 30003e04: e1a00004 mov r0, r4 <== NOT EXECUTED 30003e08: ebfff8f3 bl 300021dc <== NOT EXECUTED 30003e0c: eaffffec b 30003dc4 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; 30003e10: e58460c8 str r6, [r4, #200] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 30003e14: e1a00006 mov r0, r6 <== NOT EXECUTED 30003e18: eb00031e bl 30004a98 <== NOT EXECUTED 30003e1c: eaffffe8 b 30003dc4 <== NOT EXECUTED 30003e20: 30016c50 .word 0x30016c50 30002e68 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002e68: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 30002e6c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002e70: e5935028 ldr r5, [r3, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002e74: e3a01000 mov r1, #0 ; 0x0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 30002e78: e1a06000 mov r6, 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); 30002e7c: e1a02001 mov r2, r1 30002e80: e5950018 ldr r0, [r5, #24] 30002e84: eb000644 bl 3000479c if (sc != RTEMS_SUCCESSFUL) 30002e88: e250a000 subs sl, r0, #0 ; 0x0 30002e8c: 1a00000d bne 30002ec8 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 30002e90: e59520cc ldr r2, [r5, #204] 30002e94: e59f309c ldr r3, [pc, #156] ; 30002f38 30002e98: e1a02282 lsl r2, r2, #5 30002e9c: e0833002 add r3, r3, r2 30002ea0: e593300c ldr r3, [r3, #12] 30002ea4: e3530000 cmp r3, #0 ; 0x0 30002ea8: 0a000008 beq 30002ed0 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 30002eac: e1a01006 mov r1, r6 <== NOT EXECUTED 30002eb0: e1a00005 mov r0, r5 <== NOT EXECUTED 30002eb4: e1a0e00f mov lr, pc <== NOT EXECUTED 30002eb8: e12fff13 bx r3 <== NOT EXECUTED 30002ebc: e1a0a000 mov sl, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 30002ec0: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 30002ec4: eb00067b bl 300048b8 <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 30002ec8: e1a0000a mov r0, sl <== NOT EXECUTED 30002ecc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 30002ed0: e5953034 ldr r3, [r5, #52] 30002ed4: e3130001 tst r3, #1 ; 0x1 30002ed8: 0a000011 beq 30002f24 uint32_t count = args->count; 30002edc: e596800c ldr r8, [r6, #12] char *buffer = args->buffer; 30002ee0: e5967008 ldr r7, [r6, #8] while (count--) 30002ee4: e3580000 cmp r8, #0 ; 0x0 30002ee8: 01a0300a moveq r3, sl 30002eec: 0a000007 beq 30002f10 30002ef0: e1a0400a mov r4, sl oproc (*buffer++, tty); 30002ef4: e7d70004 ldrb r0, [r7, r4] 30002ef8: e1a01005 mov r1, r5 30002efc: e2844001 add r4, r4, #1 ; 0x1 30002f00: ebfffe5d bl 3000287c return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 30002f04: e1580004 cmp r8, r4 30002f08: 1afffff9 bne 30002ef4 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 30002f0c: e596300c ldr r3, [r6, #12] 30002f10: e5863014 str r3, [r6, #20] } rtems_semaphore_release (tty->osem); 30002f14: e5950018 ldr r0, [r5, #24] 30002f18: eb000666 bl 300048b8 return sc; } 30002f1c: e1a0000a mov r0, sl 30002f20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 30002f24: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED 30002f28: e596100c ldr r1, [r6, #12] <== NOT EXECUTED 30002f2c: e1a02005 mov r2, r5 <== NOT EXECUTED 30002f30: ebfffe09 bl 3000275c <== NOT EXECUTED 30002f34: eafffff4 b 30002f0c <== NOT EXECUTED 30002f38: 30016c50 .word 0x30016c50 30005954 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30005954: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 30005958: e2518000 subs r8, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 3000595c: e1a06000 mov r6, r0 30005960: e24dd004 sub sp, sp, #4 ; 0x4 30005964: e1a05002 mov r5, r2 30005968: e1a07003 mov r7, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 3000596c: 03a0000a moveq r0, #10 ; 0xa 30005970: 0a000020 beq 300059f8 return RTEMS_INVALID_NUMBER; if ( !routine ) 30005974: e3520000 cmp r2, #0 ; 0x0 30005978: 03a00009 moveq r0, #9 ; 0x9 3000597c: 0a00001d beq 300059f8 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 30005980: e59f0088 ldr r0, [pc, #136] ; 30005a10 30005984: e1a01006 mov r1, r6 30005988: e1a0200d mov r2, sp 3000598c: eb0004ea bl 30006d3c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30005990: e59d3000 ldr r3, [sp] 30005994: e1a04000 mov r4, r0 30005998: e3530000 cmp r3, #0 ; 0x0 3000599c: 13a00004 movne r0, #4 ; 0x4 300059a0: 1a000014 bne 300059f8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 300059a4: e284a010 add sl, r4, #16 ; 0x10 300059a8: e1a0000a mov r0, sl 300059ac: eb000c20 bl 30008a34 <_Watchdog_Remove> _ISR_Disable( level ); 300059b0: e10f2000 mrs r2, CPSR 300059b4: e38230c0 orr r3, r2, #192 ; 0xc0 300059b8: 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 ) { 300059bc: e5943018 ldr r3, [r4, #24] 300059c0: e3530000 cmp r3, #0 ; 0x0 300059c4: 1a00000d bne 30005a00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 300059c8: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 300059cc: e584502c str r5, [r4, #44] the_watchdog->id = id; 300059d0: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 300059d4: e5847034 str r7, [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; 300059d8: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 300059dc: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 300059e0: e59f002c ldr r0, [pc, #44] ; 30005a14 300059e4: e1a0100a mov r1, sl Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 300059e8: e584801c str r8, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 300059ec: eb000ba1 bl 30008878 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 300059f0: eb0006ef bl 300075b4 <_Thread_Enable_dispatch> 300059f4: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 300059f8: e28dd004 add sp, sp, #4 ; 0x4 300059fc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * 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 ) { _ISR_Enable( level ); 30005a00: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _Thread_Enable_dispatch(); 30005a04: eb0006ea bl 300075b4 <_Thread_Enable_dispatch> <== NOT EXECUTED 30005a08: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30005a0c: eafffff9 b 300059f8 <== NOT EXECUTED 30005a10: 30016144 .word 0x30016144 30005a14: 30015cc4 .word 0x30015cc4 30012900 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 30012900: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30012904: e3500000 cmp r0, #0 ; 0x0 30012908: e24dd010 sub sp, sp, #16 ; 0x10 3001290c: e1a07001 mov r7, r1 30012910: e1a06002 mov r6, r2 30012914: 1a000002 bne 30012924 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 30012918: e3a00013 mov r0, #19 ; 0x13 } return status; } 3001291c: e28dd010 add sp, sp, #16 ; 0x10 30012920: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30012924: e59f3144 ldr r3, [pc, #324] ; 30012a70 30012928: e5d32000 ldrb r2, [r3] 3001292c: e1500002 cmp r0, r2 30012930: 8a00004a bhi 30012a60 30012934: e1a08000 mov r8, r0 <== NOT EXECUTED 30012938: e59f3134 ldr r3, [pc, #308] ; 30012a74 3001293c: e5932000 ldr r2, [r3] 30012940: e2822001 add r2, r2, #1 ; 0x1 30012944: e5832000 str r2, [r3] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 30012948: e59fa128 ldr sl, [pc, #296] ; 30012a78 initialized = true; 3001294c: e3a03001 mov r3, #1 ; 0x1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 30012950: e5da5000 ldrb r5, [sl] initialized = true; 30012954: e5ca3000 strb r3, [sl] _Thread_Enable_dispatch(); 30012958: eb000bf4 bl 30015930 <_Thread_Enable_dispatch> if ( tmpInitialized ) 3001295c: e3550000 cmp r5, #0 ; 0x0 30012960: 13a0000e movne r0, #14 ; 0xe 30012964: 1affffec bne 3001291c */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30012968: e59f410c ldr r4, [pc, #268] ; 30012a7c * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 3001296c: e386e902 orr lr, r6, #32768 ; 0x8000 30012970: e284c004 add ip, r4, #4 ; 0x4 30012974: e584c000 str ip, [r4] 30012978: e28dc00c add ip, sp, #12 ; 0xc the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 3001297c: e5844008 str r4, [r4, #8] 30012980: e1a01008 mov r1, r8 30012984: e58de000 str lr, [sp] 30012988: e58dc004 str ip, [sp, #4] 3001298c: e1a02007 mov r2, r7 30012990: e59f00e8 ldr r0, [pc, #232] ; 30012a80 30012994: e3a03c01 mov r3, #256 ; 0x100 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30012998: e5845004 str r5, [r4, #4] 3001299c: ebfffc60 bl 30011b24 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 300129a0: e3500000 cmp r0, #0 ; 0x0 initialized = false; 300129a4: 15ca5000 strbne r5, [sl] /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 300129a8: 1affffdb bne 3001291c * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 300129ac: e59d200c ldr r2, [sp, #12] RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 300129b0: e59fc0cc ldr ip, [pc, #204] ; 30012a84 300129b4: e1a03802 lsl r3, r2, #16 300129b8: e58d2008 str r2, [sp, #8] 300129bc: e1dc21b0 ldrh r2, [ip, #16] 300129c0: e1a01823 lsr r1, r3, #16 300129c4: e1520001 cmp r2, r1 300129c8: 259c301c ldrcs r3, [ip, #28] 300129cc: 31a09000 movcc r9, r0 300129d0: 27939101 ldrcs r9, [r3, r1, lsl #2] the_watchdog->routine = routine; 300129d4: e59f30ac ldr r3, [pc, #172] ; 30012a88 /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 300129d8: e59fe0ac ldr lr, [pc, #172] ; 30012a8c 300129dc: e5893064 str r3, [r9, #100] 300129e0: e59f30a8 ldr r3, [pc, #168] ; 30012a90 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 300129e4: e59f40a8 ldr r4, [pc, #168] ; 30012a94 the_watchdog->id = id; 300129e8: e59f50a8 ldr r5, [pc, #168] ; 30012a98 300129ec: e59d2008 ldr r2, [sp, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 300129f0: e59f60a4 ldr r6, [pc, #164] ; 30012a9c 300129f4: e583e000 str lr, [r3] * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 300129f8: e59fc0a0 ldr ip, [pc, #160] ; 30012aa0 the_watchdog->routine = routine; 300129fc: e59f3084 ldr r3, [pc, #132] ; 30012a88 the_chain->permanent_null = NULL; 30012a00: e3a0b000 mov fp, #0 ; 0x0 _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 30012a04: e1a00002 mov r0, r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30012a08: e2847004 add r7, r4, #4 ; 0x4 30012a0c: e2858004 add r8, r5, #4 ; 0x4 the_watchdog->id = id; 30012a10: e5892068 str r2, [r9, #104] the_watchdog->user_data = user_data; 30012a14: e589b06c str fp, [r9, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30012a18: e589b050 str fp, [r9, #80] 30012a1c: e59f1080 ldr r1, [pc, #128] ; 30012aa4 30012a20: e1a0200b mov r2, fp * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 30012a24: e58c9000 str r9, [ip] 30012a28: e5847000 str r7, [r4] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 30012a2c: e5844008 str r4, [r4, #8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30012a30: e5858000 str r8, [r5] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 30012a34: e5855008 str r5, [r5, #8] the_watchdog->routine = routine; 30012a38: e586301c str r3, [r6, #28] the_watchdog->id = id; the_watchdog->user_data = user_data; 30012a3c: e586b024 str fp, [r6, #36] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30012a40: e584b004 str fp, [r4, #4] 30012a44: e585b004 str fp, [r5, #4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30012a48: e586b008 str fp, [r6, #8] the_watchdog->routine = routine; the_watchdog->id = id; 30012a4c: e5860020 str r0, [r6, #32] _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 30012a50: ebfffd8e bl 30012090 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 30012a54: e3500000 cmp r0, #0 ; 0x0 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 30012a58: 15cab000 strbne fp, [sl] 30012a5c: eaffffae b 3001291c * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 30012a60: e3700001 cmn r0, #1 ; 0x1 30012a64: 03a08000 moveq r8, #0 ; 0x0 30012a68: 0affffb2 beq 30012938 30012a6c: eaffffa9 b 30012918 30012a70: 3002d5b4 .word 0x3002d5b4 30012a74: 3003278c .word 0x3003278c 30012a78: 3002e244 .word 0x3002e244 30012a7c: 3003270c .word 0x3003270c 30012a80: 54494d45 .word 0x54494d45 30012a84: 300326ac .word 0x300326ac 30012a88: 3001579c .word 0x3001579c 30012a8c: 30012aa8 .word 0x30012aa8 30012a90: 300330bc .word 0x300330bc 30012a94: 300326ec .word 0x300326ec 30012a98: 30032700 .word 0x30032700 30012a9c: 30032718 .word 0x30032718 30012aa0: 300330c0 .word 0x300330c0 30012aa4: 30012b58 .word 0x30012b58 30012648 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 30012648: e92d4030 push {r4, r5, lr} 3001264c: e24dd004 sub sp, sp, #4 ; 0x4 30012650: e1a01000 mov r1, r0 30012654: e1a0200d mov r2, sp 30012658: e59f00a8 ldr r0, [pc, #168] ; 30012708 3001265c: eb000a71 bl 30015028 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30012660: e59d3000 ldr r3, [sp] 30012664: e1a04000 mov r4, r0 30012668: e3530000 cmp r3, #0 ; 0x0 3001266c: 13a00004 movne r0, #4 ; 0x4 30012670: 1a00000a bne 300126a0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 30012674: e5943038 ldr r3, [r4, #56] 30012678: e3530004 cmp r3, #4 ; 0x4 3001267c: 979ff103 ldrls pc, [pc, r3, lsl #2] 30012680: ea000011 b 300126cc <== NOT EXECUTED 30012684: 300126e4 .word 0x300126e4 <== NOT EXECUTED 30012688: 300126a8 .word 0x300126a8 <== NOT EXECUTED 3001268c: 300126d8 .word 0x300126d8 <== NOT EXECUTED 30012690: 300126d8 .word 0x300126d8 <== NOT EXECUTED 30012694: 300126d8 .word 0x300126d8 <== NOT EXECUTED _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { _Thread_Enable_dispatch(); 30012698: eb000ca4 bl 30015930 <_Thread_Enable_dispatch> <== NOT EXECUTED 3001269c: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 300126a0: e28dd004 add sp, sp, #4 ; 0x4 300126a4: e8bd8030 pop {r4, r5, pc} case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 300126a8: e59f505c ldr r5, [pc, #92] ; 3001270c 300126ac: e5953000 ldr r3, [r5] 300126b0: e3530000 cmp r3, #0 ; 0x0 300126b4: 0afffff7 beq 30012698 _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 300126b8: e2840010 add r0, r4, #16 ; 0x10 300126bc: eb0012d4 bl 30017214 <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 300126c0: e1a00004 mov r0, r4 300126c4: e1a0e00f mov lr, pc 300126c8: e595f000 ldr pc, [r5] case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 300126cc: eb000c97 bl 30015930 <_Thread_Enable_dispatch> 300126d0: e3a00000 mov r0, #0 ; 0x0 300126d4: eafffff1 b 300126a0 (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 300126d8: eb000c94 bl 30015930 <_Thread_Enable_dispatch> 300126dc: e3a0000b mov r0, #11 ; 0xb 300126e0: eaffffee b 300126a0 switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 300126e4: e2844010 add r4, r4, #16 ; 0x10 300126e8: e1a00004 mov r0, r4 300126ec: eb0012c8 bl 30017214 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 300126f0: e59f0018 ldr r0, [pc, #24] ; 30012710 300126f4: e1a01004 mov r1, r4 300126f8: eb001256 bl 30017058 <_Watchdog_Insert> case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 300126fc: eb000c8b bl 30015930 <_Thread_Enable_dispatch> 30012700: e3a00000 mov r0, #0 ; 0x0 30012704: eaffffe5 b 300126a0 30012708: 3003307c .word 0x3003307c 3001270c: 300330bc .word 0x300330bc 30012710: 30032864 .word 0x30032864 30012714 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30012714: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30012718: e1a07000 mov r7, r0 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 3001271c: e59f00cc ldr r0, [pc, #204] ; 300127f0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30012720: e24dd004 sub sp, sp, #4 ; 0x4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30012724: e590c000 ldr ip, [r0] Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30012728: e1a06001 mov r6, r1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 3001272c: e35c0000 cmp ip, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30012730: e1a05002 mov r5, r2 30012734: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30012738: 03a0000e moveq r0, #14 ; 0xe 3001273c: 0a000005 beq 30012758 return RTEMS_INCORRECT_STATE; if ( !routine ) 30012740: e3520000 cmp r2, #0 ; 0x0 30012744: 03a00009 moveq r0, #9 ; 0x9 30012748: 0a000002 beq 30012758 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 3001274c: e3510000 cmp r1, #0 ; 0x0 30012750: 03a0000a moveq r0, #10 ; 0xa 30012754: 1a000001 bne 30012760 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30012758: e28dd004 add sp, sp, #4 ; 0x4 3001275c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30012760: e59f008c ldr r0, [pc, #140] ; 300127f4 30012764: e1a01007 mov r1, r7 30012768: e1a0200d mov r2, sp 3001276c: eb000a2d bl 30015028 <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30012770: e59d3000 ldr r3, [sp] 30012774: e1a04000 mov r4, r0 30012778: e3530000 cmp r3, #0 ; 0x0 3001277c: 13a00004 movne r0, #4 ; 0x4 30012780: 1afffff4 bne 30012758 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 30012784: e2840010 add r0, r4, #16 ; 0x10 30012788: eb0012a1 bl 30017214 <_Watchdog_Remove> _ISR_Disable( level ); 3001278c: e10f1000 mrs r1, CPSR 30012790: e38130c0 orr r3, r1, #192 ; 0xc0 30012794: 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 ) { 30012798: e5942018 ldr r2, [r4, #24] 3001279c: e3520000 cmp r2, #0 ; 0x0 300127a0: 1a00000e bne 300127e0 /* * 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; 300127a4: e3a03001 mov r3, #1 ; 0x1 300127a8: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 300127ac: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 300127b0: e584502c str r5, [r4, #44] the_watchdog->id = id; 300127b4: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 300127b8: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 300127bc: e584601c str r6, [r4, #28] _ISR_Enable( level ); 300127c0: 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 ); 300127c4: e59f302c ldr r3, [pc, #44] ; 300127f8 300127c8: e1a00004 mov r0, r4 300127cc: e1a0e00f mov lr, pc 300127d0: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 300127d4: eb000c55 bl 30015930 <_Thread_Enable_dispatch> 300127d8: e3a00000 mov r0, #0 ; 0x0 300127dc: eaffffdd b 30012758 * 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 ) { _ISR_Enable( level ); 300127e0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_Enable_dispatch(); 300127e4: eb000c51 bl 30015930 <_Thread_Enable_dispatch> <== NOT EXECUTED 300127e8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300127ec: eaffffd9 b 30012758 <== NOT EXECUTED 300127f0: 300330c0 .word 0x300330c0 300127f4: 3003307c .word 0x3003307c 300127f8: 300330bc .word 0x300330bc 30006740 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 30006740: 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) 30006744: e2109202 ands r9, r0, #536870912 ; 0x20000000 <== NOT EXECUTED static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 30006748: e1a05000 mov r5, r0 <== NOT EXECUTED 3000674c: e1a06001 mov r6, r1 <== NOT EXECUTED 30006750: e1a0a002 mov sl, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 30006754: 0a00000c beq 3000678c <== NOT EXECUTED { if (rtems_panic_in_progress++) 30006758: e59f1190 ldr r1, [pc, #400] ; 300068f0 <== NOT EXECUTED 3000675c: e5913000 ldr r3, [r1] <== NOT EXECUTED 30006760: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30006764: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 30006768: e5813000 str r3, [r1] <== NOT EXECUTED 3000676c: 0a000003 beq 30006780 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30006770: e59f217c ldr r2, [pc, #380] ; 300068f4 <== NOT EXECUTED 30006774: e5923000 ldr r3, [r2] <== NOT EXECUTED 30006778: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 3000677c: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 30006780: e5913000 ldr r3, [r1] <== NOT EXECUTED 30006784: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 30006788: ca00002f bgt 3000684c <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 3000678c: e59f8164 ldr r8, [pc, #356] ; 300068f8 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 30006790: e3c54207 bic r4, r5, #1879048192 ; 0x70000000 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 30006794: e5983000 ldr r3, [r8] <== NOT EXECUTED 30006798: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3000679c: eb003ea8 bl 30016244 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 300067a0: e2150101 ands r0, r5, #1073741824 ; 0x40000000 <== NOT EXECUTED 300067a4: 01a07000 moveq r7, r0 <== NOT EXECUTED 300067a8: 1a000037 bne 3000688c <== 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); 300067ac: e5983000 ldr r3, [r8] <== NOT EXECUTED 300067b0: e1a01006 mov r1, r6 <== NOT EXECUTED 300067b4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 300067b8: e1a0200a mov r2, sl <== NOT EXECUTED 300067bc: eb0057c3 bl 3001c6d0 <== NOT EXECUTED if (status) 300067c0: e3540000 cmp r4, #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); 300067c4: e1a06000 mov r6, r0 <== NOT EXECUTED if (status) 300067c8: 1a000021 bne 30006854 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 300067cc: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 300067d0: 0a00000b beq 30006804 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 300067d4: da000004 ble 300067ec <== NOT EXECUTED 300067d8: e1a00007 mov r0, r7 <== NOT EXECUTED 300067dc: eb004ba6 bl 3001967c <== NOT EXECUTED 300067e0: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 300067e4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300067e8: 1a000032 bne 300068b8 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 300067ec: e5983000 ldr r3, [r8] <== NOT EXECUTED 300067f0: e59f1104 ldr r1, [pc, #260] ; 300068fc <== NOT EXECUTED 300067f4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 300067f8: e1a02007 mov r2, r7 <== NOT EXECUTED 300067fc: eb003fe3 bl 30016790 <== NOT EXECUTED 30006800: e0866000 add r6, r6, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 30006804: e5983000 ldr r3, [r8] <== NOT EXECUTED 30006808: e59f10f0 ldr r1, [pc, #240] ; 30006900 <== NOT EXECUTED 3000680c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30006810: eb003fde bl 30016790 <== NOT EXECUTED (void) fflush(stderr); 30006814: e5983000 ldr r3, [r8] <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 30006818: e1a04000 mov r4, r0 <== NOT EXECUTED (void) fflush(stderr); 3000681c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30006820: eb003e87 bl 30016244 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 30006824: e3150203 tst r5, #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"); 30006828: 00840006 addeq r0, r4, r6 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 3000682c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 30006830: e3590000 cmp r9, #0 ; 0x0 <== NOT EXECUTED 30006834: 0a000029 beq 300068e0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 30006838: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000683c: e59f10c0 ldr r1, [pc, #192] ; 30006904 <== NOT EXECUTED 30006840: eb00003d bl 3000693c <== NOT EXECUTED _exit(local_errno); 30006844: e1a00007 mov r0, r7 <== NOT EXECUTED 30006848: eb000219 bl 300070b4 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); abort(); 3000684c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } } return chars_written; } 30006850: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 30006854: e59f309c ldr r3, [pc, #156] ; 300068f8 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 30006858: e1a01004 mov r1, r4 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 3000685c: e5932000 ldr r2, [r3] <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 30006860: e59f00a0 ldr r0, [pc, #160] ; 30006908 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 30006864: e592400c ldr r4, [r2, #12] <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 30006868: eb002826 bl 30010908 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 3000686c: e59f1098 ldr r1, [pc, #152] ; 3000690c <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 30006870: 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)); 30006874: e1a00004 mov r0, r4 <== NOT EXECUTED 30006878: eb003fc4 bl 30016790 <== NOT EXECUTED if (local_errno) 3000687c: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 30006880: e0866000 add r6, r6, r0 <== NOT EXECUTED if (local_errno) 30006884: 0affffde beq 30006804 <== NOT EXECUTED 30006888: eaffffd1 b 300067d4 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 3000688c: eb003dac bl 30015f44 <__errno> <== 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); 30006890: e5983000 ldr r3, [r8] <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 30006894: 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); 30006898: e1a01006 mov r1, r6 <== NOT EXECUTED 3000689c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 300068a0: e1a0200a mov r2, sl <== NOT EXECUTED 300068a4: eb005789 bl 3001c6d0 <== NOT EXECUTED if (status) 300068a8: e3540000 cmp r4, #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); 300068ac: e1a06000 mov r6, r0 <== NOT EXECUTED if (status) 300068b0: 0affffc5 beq 300067cc <== NOT EXECUTED 300068b4: eaffffe6 b 30006854 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 300068b8: e5983000 ldr r3, [r8] <== NOT EXECUTED 300068bc: e1a00007 mov r0, r7 <== NOT EXECUTED 300068c0: e593400c ldr r4, [r3, #12] <== NOT EXECUTED 300068c4: eb004b6c bl 3001967c <== NOT EXECUTED 300068c8: e59f1040 ldr r1, [pc, #64] ; 30006910 <== NOT EXECUTED 300068cc: e1a02000 mov r2, r0 <== NOT EXECUTED 300068d0: e1a00004 mov r0, r4 <== NOT EXECUTED 300068d4: eb003fad bl 30016790 <== NOT EXECUTED 300068d8: e0866000 add r6, r6, r0 <== NOT EXECUTED 300068dc: eaffffc8 b 30006804 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 300068e0: e59f102c ldr r1, [pc, #44] ; 30006914 <== NOT EXECUTED 300068e4: e1a00009 mov r0, r9 <== NOT EXECUTED 300068e8: eb000013 bl 3000693c <== NOT EXECUTED abort(); 300068ec: eb003d8b bl 30015f20 <== NOT EXECUTED 300068f0: 300270bc .word 0x300270bc 300068f4: 3002724c .word 0x3002724c 300068f8: 300262e8 .word 0x300262e8 300068fc: 30023058 .word 0x30023058 30006900: 30022954 .word 0x30022954 30006904: 3002306c .word 0x3002306c 30006908: 300216a0 .word 0x300216a0 3000690c: 30023038 .word 0x30023038 30006910: 30023048 .word 0x30023048 30006914: 30023084 .word 0x30023084 30005600 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 30005600: e92d4010 push {r4, lr} void *ptr; /* * check the arguments */ if ( !pointer ) 30005604: e2514000 subs r4, r1, #0 ; 0x0 30005608: 0a000001 beq 30005614 return false; if ( !bytes ) 3000560c: e3500000 cmp r0, #0 ; 0x0 30005610: 1a000001 bne 3000561c ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) return false; *pointer = ptr; return true; 30005614: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 30005618: e8bd8010 pop {r4, pc} <== NOT EXECUTED return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 3000561c: e1a01000 mov r1, r0 30005620: e59f0014 ldr r0, [pc, #20] ; 3000563c 30005624: eb000566 bl 30006bc4 <_Protected_heap_Allocate> if (!ptr) 30005628: e3500000 cmp r0, #0 ; 0x0 return false; *pointer = ptr; 3000562c: 15840000 strne r0, [r4] 30005630: 13a00001 movne r0, #1 ; 0x1 /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 30005634: 18bd8010 popne {r4, pc} 30005638: eafffff5 b 30005614 <== NOT EXECUTED 3000563c: 3001bb6c .word 0x3001bb6c 300055f0 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 300055f0: e1a01000 mov r1, r0 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 300055f4: e59f0000 ldr r0, [pc, #0] ; 300055fc <== NOT EXECUTED 300055f8: ea000580 b 30006c00 <_Protected_heap_Free> <== NOT EXECUTED 300055fc: 3001bb6c .word 0x3001bb6c 3001e6f4 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 3001e6f4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 3001e6f8: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 3001e6fc: e59f90ec ldr r9, [pc, #236] ; 3001e7f0 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 3001e700: e59f80ec ldr r8, [pc, #236] ; 3001e7f4 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 3001e704: e59fa0ec ldr sl, [pc, #236] ; 3001e7f8 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 3001e708: e1a05000 mov r5, r0 <== NOT EXECUTED 3001e70c: e1a0b001 mov fp, r1 <== NOT EXECUTED 3001e710: e3e07102 mvn r7, #-2147483648 ; 0x80000000 <== NOT EXECUTED 3001e714: e1a06004 mov r6, r4 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 3001e718: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 3001e71c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 3001e720: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e724: e5853004 str r3, [r5, #4] <== NOT EXECUTED 3001e728: ba00001d blt 3001e7a4 <== NOT EXECUTED 3001e72c: e5953000 ldr r3, [r5] <== NOT EXECUTED 3001e730: e4d30001 ldrb r0, [r3], #1 <== NOT EXECUTED if (c == ':') 3001e734: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 3001e738: e5853000 str r3, [r5] <== NOT EXECUTED if (c == ':') 3001e73c: 0a00001d beq 3001e7b8 <== NOT EXECUTED break; if (sign == 0) { 3001e740: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 3001e744: 1a000004 bne 3001e75c <== NOT EXECUTED if (c == '-') { 3001e748: e350002d cmp r0, #45 ; 0x2d <== NOT EXECUTED sign = -1; limit++; 3001e74c: 02877001 addeq r7, r7, #1 ; 0x1 <== NOT EXECUTED 3001e750: 02466001 subeq r6, r6, #1 ; 0x1 <== NOT EXECUTED for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 3001e754: 0affffef beq 3001e718 <== NOT EXECUTED sign = -1; limit++; continue; 3001e758: e3a06001 mov r6, #1 ; 0x1 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 3001e75c: e5983000 ldr r3, [r8] <== NOT EXECUTED 3001e760: e7d32000 ldrb r2, [r3, r0] <== NOT EXECUTED 3001e764: e3120004 tst r2, #4 ; 0x4 <== NOT EXECUTED 3001e768: 0a000017 beq 3001e7cc <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 3001e76c: e083279a umull r2, r3, sl, r7 <== NOT EXECUTED 3001e770: e15401a3 cmp r4, r3, lsr #3 <== NOT EXECUTED 3001e774: 8a000014 bhi 3001e7cc <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 3001e778: e2400030 sub r0, r0, #48 ; 0x30 <== NOT EXECUTED 3001e77c: 11a01184 lslne r1, r4, #3 <== NOT EXECUTED 3001e780: 11a02084 lslne r2, r4, #1 <== NOT EXECUTED if ((i > (limit / 10)) 3001e784: 0a000012 beq 3001e7d4 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 3001e788: e0823001 add r3, r2, r1 <== NOT EXECUTED 3001e78c: e0804003 add r4, r0, r3 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 3001e790: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 3001e794: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 3001e798: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e79c: e5853004 str r3, [r5, #4] <== NOT EXECUTED 3001e7a0: aaffffe1 bge 3001e72c <== NOT EXECUTED 3001e7a4: e5990000 ldr r0, [r9] <== NOT EXECUTED 3001e7a8: e1a01005 mov r1, r5 <== NOT EXECUTED 3001e7ac: eb004ef4 bl 30032384 <__srget_r> <== NOT EXECUTED if (c == ':') 3001e7b0: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 3001e7b4: 1affffe1 bne 3001e740 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 3001e7b8: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED return 0; *val = i * sign; 3001e7bc: 10030694 mulne r3, r4, r6 <== NOT EXECUTED 3001e7c0: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 3001e7c4: 158b3000 strne r3, [fp] <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 3001e7c8: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED return 0; *val = i * sign; return 1; 3001e7cc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 3001e7d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 3001e7d4: e1a01184 lsl r1, r4, #3 <== NOT EXECUTED 3001e7d8: e1a02084 lsl r2, r4, #1 <== NOT EXECUTED 3001e7dc: e0823001 add r3, r2, r1 <== NOT EXECUTED 3001e7e0: e0633007 rsb r3, r3, r7 <== NOT EXECUTED 3001e7e4: e1500003 cmp r0, r3 <== NOT EXECUTED 3001e7e8: 9affffe6 bls 3001e788 <== NOT EXECUTED 3001e7ec: eafffff6 b 3001e7cc <== NOT EXECUTED 3001e7f0: 30046e20 .word 0x30046e20 3001e7f4: 30046e14 .word 0x30046e14 3001e7f8: cccccccd .word 0xcccccccd 3001e7fc : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 3001e7fc: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3001e800: e1a05002 mov r5, r2 <== NOT EXECUTED int c; *name = *bufp; 3001e804: e5922000 ldr r2, [r2] <== NOT EXECUTED for (;;) { c = getc(fp); 3001e808: e59f70d0 ldr r7, [pc, #208] ; 3001e8e0 <== NOT EXECUTED static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 3001e80c: 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) { 3001e810: e1a04000 mov r4, r0 <== NOT EXECUTED 3001e814: e1a06003 mov r6, r3 <== NOT EXECUTED 3001e818: ea000013 b 3001e86c <== NOT EXECUTED int c; *name = *bufp; for (;;) { c = getc(fp); 3001e81c: e5943000 ldr r3, [r4] <== NOT EXECUTED 3001e820: e4d30001 ldrb r0, [r3], #1 <== NOT EXECUTED if (c == ':') { 3001e824: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 3001e828: e5843000 str r3, [r4] <== NOT EXECUTED if (c == ':') { 3001e82c: 0a000018 beq 3001e894 <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { 3001e830: e350000a cmp r0, #10 ; 0xa <== NOT EXECUTED 3001e834: 0a000024 beq 3001e8cc <== NOT EXECUTED if (!nlFlag) return 0; break; } if (c == EOF) 3001e838: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED 3001e83c: 0a000025 beq 3001e8d8 <== NOT EXECUTED return 0; if (*nleft < 2) 3001e840: e5963000 ldr r3, [r6] <== NOT EXECUTED 3001e844: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 3001e848: 9a000022 bls 3001e8d8 <== NOT EXECUTED return 0; **bufp = c; 3001e84c: e5953000 ldr r3, [r5] <== NOT EXECUTED 3001e850: e5c30000 strb r0, [r3] <== NOT EXECUTED ++(*bufp); 3001e854: e5952000 ldr r2, [r5] <== NOT EXECUTED --(*nleft); 3001e858: e5963000 ldr r3, [r6] <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 3001e85c: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED --(*nleft); 3001e860: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 3001e864: e5852000 str r2, [r5] <== NOT EXECUTED --(*nleft); 3001e868: e5863000 str r3, [r6] <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 3001e86c: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 3001e870: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 3001e874: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e878: e5843004 str r3, [r4, #4] <== NOT EXECUTED 3001e87c: aaffffe6 bge 3001e81c <== NOT EXECUTED 3001e880: e5970000 ldr r0, [r7] <== NOT EXECUTED 3001e884: e1a01004 mov r1, r4 <== NOT EXECUTED 3001e888: eb004ebd bl 30032384 <__srget_r> <== NOT EXECUTED if (c == ':') { 3001e88c: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 3001e890: 1affffe6 bne 3001e830 <== NOT EXECUTED if (nlFlag) 3001e894: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 3001e898: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e89c: 1a00000d bne 3001e8d8 <== NOT EXECUTED return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 3001e8a0: e5951000 ldr r1, [r5] <== NOT EXECUTED 3001e8a4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3001e8a8: e5c13000 strb r3, [r1] <== NOT EXECUTED ++(*bufp); 3001e8ac: e5952000 ldr r2, [r5] <== NOT EXECUTED --(*nleft); 3001e8b0: e5963000 ldr r3, [r6] <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 3001e8b4: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED --(*nleft); 3001e8b8: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 3001e8bc: e5852000 str r2, [r5] <== NOT EXECUTED --(*nleft); 3001e8c0: e5863000 str r3, [r6] <== NOT EXECUTED 3001e8c4: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3001e8c8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 3001e8cc: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED 3001e8d0: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED 3001e8d4: 1afffff1 bne 3001e8a0 <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 3001e8d8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 3001e8dc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 3001e8e0: 30046e20 .word 0x30046e20 30004718 : scandir( const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)) { 30004718: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000471c: e24dd054 sub sp, sp, #84 ; 0x54 30004720: e58d1004 str r1, [sp, #4] 30004724: e1a09002 mov r9, r2 30004728: e58d3000 str r3, [sp] struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 3000472c: ebfffd9a bl 30003d9c 30004730: e250a000 subs sl, r0, #0 ; 0x0 30004734: 02400001 subeq r0, r0, #1 ; 0x1 30004738: 0a000042 beq 30004848 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 3000473c: e28db008 add fp, sp, #8 ; 0x8 30004740: e59a0000 ldr r0, [sl] 30004744: e1a0100b mov r1, fp 30004748: eb001c67 bl 3000b8ec 3000474c: e3500000 cmp r0, #0 ; 0x0 30004750: ba00004d blt 3000488c /* * 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); 30004754: e59d3028 ldr r3, [sp, #40] 30004758: e59f417c ldr r4, [pc, #380] ; 300048dc 3000475c: e1a01fc3 asr r1, r3, #31 30004760: e0c20394 smull r0, r2, r4, r3 30004764: e0618142 rsb r8, r1, r2, asr #2 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); 30004768: e1a00108 lsl r0, r8, #2 3000476c: ebfffb8c bl 300035a4 if (names == NULL) 30004770: e2507000 subs r7, r0, #0 ; 0x0 goto cleanup_and_bail; 30004774: 13a06000 movne r6, #0 ; 0x0 * 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); names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) 30004778: 0a000043 beq 3000488c goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 3000477c: e1a0000a mov r0, sl 30004780: ebffff55 bl 300044dc 30004784: e2504000 subs r4, r0, #0 ; 0x0 30004788: 0a000020 beq 30004810 if (select != NULL && !(*select)(d)) 3000478c: e3590000 cmp r9, #0 ; 0x0 30004790: 0a000003 beq 300047a4 30004794: e1a0e00f mov lr, pc 30004798: e12fff19 bx r9 3000479c: e3500000 cmp r0, #0 ; 0x0 300047a0: 0afffff5 beq 3000477c continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 300047a4: e1d400ba ldrh r0, [r4, #10] 300047a8: e2800004 add r0, r0, #4 ; 0x4 300047ac: e3c00003 bic r0, r0, #3 ; 0x3 300047b0: e280000c add r0, r0, #12 ; 0xc 300047b4: ebfffb7a bl 300035a4 if (p == NULL) 300047b8: e2505000 subs r5, 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); 300047bc: e284100c add r1, r4, #12 ; 0xc 300047c0: e285000c add r0, r5, #12 ; 0xc continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) 300047c4: 0a000034 beq 3000489c goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; 300047c8: 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; 300047cc: e5943000 ldr r3, [r4] p->d_reclen = d->d_reclen; 300047d0: e1d440b8 ldrh r4, [r4, #8] p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 300047d4: 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; 300047d8: e5853000 str r3, [r5] 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) { 300047dc: 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; 300047e0: e1c540b8 strh r4, [r5, #8] p->d_namlen = d->d_namlen; 300047e4: e1c5c0ba strh ip, [r5, #10] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 300047e8: eb0032ca bl 30011318 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 300047ec: e1560008 cmp r6, r8 300047f0: 2a000016 bcs 30004850 names = (struct dirent **)realloc((char *)names, arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; 300047f4: e1a03106 lsl r3, r6, #2 300047f8: e2433004 sub r3, r3, #4 ; 0x4 300047fc: e7875003 str r5, [r7, 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) { 30004800: e1a0000a mov r0, sl 30004804: ebffff34 bl 300044dc 30004808: e2504000 subs r4, r0, #0 ; 0x0 3000480c: 1affffde bne 3000478c if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 30004810: e1a0000a mov r0, sl 30004814: ebfff849 bl 30002940 if (nitems && dcomp != NULL){ 30004818: e59d0000 ldr r0, [sp] 3000481c: e3560000 cmp r6, #0 ; 0x0 30004820: 13500000 cmpne r0, #0 ; 0x0 30004824: 0a000004 beq 3000483c qsort(names, nitems, sizeof(struct dirent *), 30004828: e1a03000 mov r3, r0 3000482c: e1a01006 mov r1, r6 30004830: e1a00007 mov r0, r7 30004834: e3a02004 mov r2, #4 ; 0x4 30004838: eb002f75 bl 30010614 (int (*)(const void *, const void *)) dcomp); } *namelist = names; 3000483c: e59d1004 ldr r1, [sp, #4] return(nitems); 30004840: e1a00006 mov r0, r6 closedir(dirp); if (nitems && dcomp != NULL){ qsort(names, nitems, sizeof(struct dirent *), (int (*)(const void *, const void *)) dcomp); } *namelist = names; 30004844: e5817000 str r7, [r1] free( names[i] ); free( names ); } return(-1); } 30004848: e28dd054 add sp, sp, #84 ; 0x54 3000484c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { if (fstat(dirp->dd_fd, &stb) < 0) 30004850: e1a0100b mov r1, fp <== NOT EXECUTED 30004854: e59a0000 ldr r0, [sl] <== NOT EXECUTED 30004858: eb001c23 bl 3000b8ec <== NOT EXECUTED 3000485c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; names = (struct dirent **)realloc((char *)names, 30004860: e1a00007 mov r0, r7 <== 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) 30004864: ba00000c blt 3000489c <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 30004868: e59d3028 ldr r3, [sp, #40] <== NOT EXECUTED 3000486c: e59f1068 ldr r1, [pc, #104] ; 300048dc <== NOT EXECUTED 30004870: e0c2c391 smull ip, r2, r1, r3 <== NOT EXECUTED 30004874: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 30004878: e06380c2 rsb r8, r3, r2, asr #1 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 3000487c: e1a01108 lsl r1, r8, #2 <== NOT EXECUTED 30004880: eb001cc9 bl 3000bbac <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 30004884: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED 30004888: 1affffd9 bne 300047f4 <== NOT EXECUTED return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 3000488c: e1a0000a mov r0, sl 30004890: ebfff82a bl 30002940 30004894: e3e00000 mvn r0, #0 ; 0x0 30004898: eaffffea b 30004848 3000489c: e1a0000a mov r0, sl <== NOT EXECUTED 300048a0: ebfff826 bl 30002940 <== NOT EXECUTED if ( names ) { for (i=0; i < nitems; i++ ) 300048a4: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 300048a8: 0a000007 beq 300048cc <== NOT EXECUTED 300048ac: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 300048b0: e1a03004 mov r3, r4 <== NOT EXECUTED free( names[i] ); 300048b4: e7970103 ldr r0, [r7, r3, lsl #2] <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 300048b8: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED free( names[i] ); 300048bc: ebfff96b bl 30002e70 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 300048c0: e1560004 cmp r6, r4 <== NOT EXECUTED 300048c4: e1a03004 mov r3, r4 <== NOT EXECUTED 300048c8: 8afffff9 bhi 300048b4 <== NOT EXECUTED free( names[i] ); free( names ); 300048cc: e1a00007 mov r0, r7 <== NOT EXECUTED 300048d0: ebfff966 bl 30002e70 <== NOT EXECUTED 300048d4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 300048d8: eaffffda b 30004848 <== NOT EXECUTED 300048dc: 2aaaaaab .word 0x2aaaaaab 3001e8e4 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 3001e8e4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 3001e8e8: e24dd014 sub sp, sp, #20 ; 0x14 <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 3001e8ec: e28d5008 add r5, sp, #8 ; 0x8 <== NOT EXECUTED 3001e8f0: e28d6004 add r6, sp, #4 ; 0x4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 3001e8f4: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 3001e8f8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 3001e8fc: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED 3001e900: e1a02005 mov r2, r5 <== NOT EXECUTED 3001e904: e1a03006 mov r3, r6 <== NOT EXECUTED 3001e908: e58d7000 str r7, [sp] <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 3001e90c: e1a04000 mov r4, r0 <== NOT EXECUTED 3001e910: e1a08001 mov r8, r1 <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 3001e914: ebffffb8 bl 3001e7fc <== NOT EXECUTED 3001e918: e1500007 cmp r0, r7 <== NOT EXECUTED 3001e91c: 1a000002 bne 3001e92c <== NOT EXECUTED *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 3001e920: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 3001e924: e28dd014 add sp, sp, #20 ; 0x14 <== NOT EXECUTED 3001e928: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 3001e92c: e1a00004 mov r0, r4 <== NOT EXECUTED 3001e930: e2881004 add r1, r8, #4 ; 0x4 <== NOT EXECUTED 3001e934: e1a02005 mov r2, r5 <== NOT EXECUTED 3001e938: e1a03006 mov r3, r6 <== NOT EXECUTED 3001e93c: e58d7000 str r7, [sp] <== NOT EXECUTED 3001e940: ebffffad bl 3001e7fc <== NOT EXECUTED 3001e944: e1500007 cmp r0, r7 <== NOT EXECUTED 3001e948: 0afffff4 beq 3001e920 <== NOT EXECUTED 3001e94c: e1a00004 mov r0, r4 <== NOT EXECUTED 3001e950: e28d1010 add r1, sp, #16 ; 0x10 <== NOT EXECUTED 3001e954: ebffff66 bl 3001e6f4 <== NOT EXECUTED 3001e958: e1500007 cmp r0, r7 <== NOT EXECUTED 3001e95c: 0affffef beq 3001e920 <== NOT EXECUTED 3001e960: e1a00004 mov r0, r4 <== NOT EXECUTED 3001e964: e1a02005 mov r2, r5 <== NOT EXECUTED 3001e968: e1a03006 mov r3, r6 <== NOT EXECUTED 3001e96c: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 3001e970: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 3001e974: e58d4000 str r4, [sp] <== NOT EXECUTED 3001e978: ebffff9f bl 3001e7fc <== NOT EXECUTED 3001e97c: e1500007 cmp r0, r7 <== NOT EXECUTED 3001e980: 0affffe6 beq 3001e920 <== 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; 3001e984: e1dd31b0 ldrh r3, [sp, #16] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001e988: e59d000c ldr r0, [sp, #12] <== 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; 3001e98c: e1c830b8 strh r3, [r8, #8] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001e990: e5d02000 ldrb r2, [r0] <== NOT EXECUTED 3001e994: e1520007 cmp r2, r7 <== NOT EXECUTED 3001e998: 03a02017 moveq r2, #23 ; 0x17 <== NOT EXECUTED 3001e99c: 0a000008 beq 3001e9c4 <== NOT EXECUTED 3001e9a0: e1a03004 mov r3, r4 <== NOT EXECUTED 3001e9a4: e1a01000 mov r1, r0 <== NOT EXECUTED if(*cp == ',') 3001e9a8: e352002c cmp r2, #44 ; 0x2c <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001e9ac: e5f12001 ldrb r2, [r1, #1]! <== NOT EXECUTED if(*cp == ',') memcount++; 3001e9b0: 02833001 addeq r3, r3, #1 ; 0x1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001e9b4: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3001e9b8: 1afffffa bne 3001e9a8 <== NOT EXECUTED 3001e9bc: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 3001e9c0: e2832013 add r2, r3, #19 ; 0x13 <== NOT EXECUTED } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 3001e9c4: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 3001e9c8: e1530002 cmp r3, r2 <== NOT EXECUTED 3001e9cc: 3affffd3 bcc 3001e920 <== NOT EXECUTED return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 3001e9d0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3001e9d4: e283300f add r3, r3, #15 ; 0xf <== NOT EXECUTED 3001e9d8: e3c3300f bic r3, r3, #15 ; 0xf <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 3001e9dc: e5830000 str r0, [r3] <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001e9e0: e59d200c ldr r2, [sp, #12] <== 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); 3001e9e4: e588300c str r3, [r8, #12] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001e9e8: e5d23000 ldrb r3, [r2] <== NOT EXECUTED 3001e9ec: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001e9f0: 03a01004 moveq r1, #4 ; 0x4 <== NOT EXECUTED 3001e9f4: 0a00000b beq 3001ea28 <== NOT EXECUTED 3001e9f8: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED 3001e9fc: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; 3001ea00: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 3001ea04: e353002c cmp r3, #44 ; 0x2c <== NOT EXECUTED *cp = '\0'; 3001ea08: 05420001 strbeq r0, [r2, #-1] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 3001ea0c: 0598300c ldreq r3, [r8, #12] <== NOT EXECUTED 3001ea10: 07832101 streq r2, [r3, r1, lsl #2] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001ea14: e4d23001 ldrb r3, [r2], #1 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 3001ea18: 02811001 addeq r1, r1, #1 ; 0x1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 3001ea1c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001ea20: 1afffff7 bne 3001ea04 <== NOT EXECUTED 3001ea24: e1a01101 lsl r1, r1, #2 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 3001ea28: e598200c ldr r2, [r8, #12] <== NOT EXECUTED 3001ea2c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3001ea30: e7823001 str r3, [r2, r1] <== NOT EXECUTED 3001ea34: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3001ea38: eaffffb9 b 3001e924 <== NOT EXECUTED 3001ea80 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 3001ea80: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 3001ea84: e24dd014 sub sp, sp, #20 ; 0x14 <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 3001ea88: e28d7008 add r7, sp, #8 ; 0x8 <== NOT EXECUTED 3001ea8c: e28d8004 add r8, sp, #4 ; 0x4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 3001ea90: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 3001ea94: e58d3004 str r3, [sp, #4] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 3001ea98: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 3001ea9c: e1a02007 mov r2, r7 <== NOT EXECUTED 3001eaa0: e1a03008 mov r3, r8 <== NOT EXECUTED 3001eaa4: e58d6000 str r6, [sp] <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 3001eaa8: e1a04000 mov r4, r0 <== NOT EXECUTED 3001eaac: e1a05001 mov r5, r1 <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 3001eab0: ebffff51 bl 3001e7fc <== NOT EXECUTED 3001eab4: e1500006 cmp r0, r6 <== NOT EXECUTED 3001eab8: 1a000002 bne 3001eac8 <== NOT EXECUTED || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 3001eabc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 3001eac0: e28dd014 add sp, sp, #20 ; 0x14 <== NOT EXECUTED 3001eac4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 3001eac8: e1a00004 mov r0, r4 <== NOT EXECUTED 3001eacc: e2851004 add r1, r5, #4 ; 0x4 <== NOT EXECUTED 3001ead0: e1a02007 mov r2, r7 <== NOT EXECUTED 3001ead4: e1a03008 mov r3, r8 <== NOT EXECUTED 3001ead8: e58d6000 str r6, [sp] <== NOT EXECUTED 3001eadc: ebffff46 bl 3001e7fc <== NOT EXECUTED 3001eae0: e1500006 cmp r0, r6 <== NOT EXECUTED 3001eae4: 0afffff4 beq 3001eabc <== NOT EXECUTED 3001eae8: e1a00004 mov r0, r4 <== NOT EXECUTED 3001eaec: e28d1010 add r1, sp, #16 ; 0x10 <== NOT EXECUTED 3001eaf0: ebfffeff bl 3001e6f4 <== NOT EXECUTED 3001eaf4: e1500006 cmp r0, r6 <== NOT EXECUTED 3001eaf8: 0affffef beq 3001eabc <== NOT EXECUTED 3001eafc: e1a00004 mov r0, r4 <== NOT EXECUTED 3001eb00: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 3001eb04: ebfffefa bl 3001e6f4 <== NOT EXECUTED 3001eb08: e1500006 cmp r0, r6 <== NOT EXECUTED 3001eb0c: 0affffea beq 3001eabc <== NOT EXECUTED 3001eb10: e1a00004 mov r0, r4 <== NOT EXECUTED 3001eb14: e285100c add r1, r5, #12 ; 0xc <== NOT EXECUTED 3001eb18: e1a02007 mov r2, r7 <== NOT EXECUTED 3001eb1c: e1a03008 mov r3, r8 <== NOT EXECUTED 3001eb20: e58d6000 str r6, [sp] <== NOT EXECUTED 3001eb24: ebffff34 bl 3001e7fc <== NOT EXECUTED 3001eb28: e1500006 cmp r0, r6 <== NOT EXECUTED 3001eb2c: 0affffe2 beq 3001eabc <== NOT EXECUTED 3001eb30: e1a00004 mov r0, r4 <== NOT EXECUTED 3001eb34: e2851010 add r1, r5, #16 ; 0x10 <== NOT EXECUTED 3001eb38: e1a02007 mov r2, r7 <== NOT EXECUTED 3001eb3c: e1a03008 mov r3, r8 <== NOT EXECUTED 3001eb40: e58d6000 str r6, [sp] <== NOT EXECUTED 3001eb44: ebffff2c bl 3001e7fc <== NOT EXECUTED 3001eb48: e1500006 cmp r0, r6 <== NOT EXECUTED 3001eb4c: 0affffda beq 3001eabc <== NOT EXECUTED 3001eb50: e1a00004 mov r0, r4 <== NOT EXECUTED 3001eb54: e2851014 add r1, r5, #20 ; 0x14 <== NOT EXECUTED 3001eb58: e1a02007 mov r2, r7 <== NOT EXECUTED 3001eb5c: e1a03008 mov r3, r8 <== NOT EXECUTED 3001eb60: e58d6000 str r6, [sp] <== NOT EXECUTED 3001eb64: ebffff24 bl 3001e7fc <== NOT EXECUTED 3001eb68: e1500006 cmp r0, r6 <== NOT EXECUTED 3001eb6c: 0affffd2 beq 3001eabc <== NOT EXECUTED 3001eb70: e1a00004 mov r0, r4 <== NOT EXECUTED 3001eb74: e1a02007 mov r2, r7 <== NOT EXECUTED 3001eb78: e1a03008 mov r3, r8 <== NOT EXECUTED 3001eb7c: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 3001eb80: e2851018 add r1, r5, #24 ; 0x18 <== NOT EXECUTED 3001eb84: e58d4000 str r4, [sp] <== NOT EXECUTED 3001eb88: ebffff1b bl 3001e7fc <== NOT EXECUTED 3001eb8c: e1500006 cmp r0, r6 <== NOT EXECUTED 3001eb90: 0affffc9 beq 3001eabc <== 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; 3001eb94: e1dd30bc ldrh r3, [sp, #12] <== NOT EXECUTED 3001eb98: e1a00004 mov r0, r4 <== NOT EXECUTED 3001eb9c: 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; 3001eba0: e1dd31b0 ldrh r3, [sp, #16] <== NOT EXECUTED 3001eba4: e1c530b8 strh r3, [r5, #8] <== NOT EXECUTED 3001eba8: eaffffc4 b 3001eac0 <== NOT EXECUTED 30006da0 : */ int sem_destroy( sem_t *sem ) { 30006da0: e92d4010 push {r4, lr} 30006da4: e24dd004 sub sp, sp, #4 ; 0x4 30006da8: e5901000 ldr r1, [r0] 30006dac: e1a0200d mov r2, sp 30006db0: e59f0058 ldr r0, [pc, #88] ; 30006e10 30006db4: eb0008ba bl 300090a4 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 30006db8: e59d3000 ldr r3, [sp] 30006dbc: e3530000 cmp r3, #0 ; 0x0 30006dc0: 0a000005 beq 30006ddc #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 30006dc4: eb002267 bl 3000f768 <__errno> 30006dc8: e3a03016 mov r3, #22 ; 0x16 30006dcc: e5803000 str r3, [r0] 30006dd0: e3e00000 mvn r0, #0 ; 0x0 } 30006dd4: e28dd004 add sp, sp, #4 ; 0x4 30006dd8: e8bd8010 pop {r4, pc} case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 30006ddc: e5d04014 ldrb r4, [r0, #20] 30006de0: e3540000 cmp r4, #0 ; 0x0 30006de4: 1a000003 bne 30006df8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 30006de8: eb0019e2 bl 3000d578 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 30006dec: eb000aca bl 3000991c <_Thread_Enable_dispatch> 30006df0: e1a00004 mov r0, r4 30006df4: eafffff6 b 30006dd4 /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); 30006df8: eb000ac7 bl 3000991c <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 30006dfc: eb002259 bl 3000f768 <__errno> <== NOT EXECUTED 30006e00: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30006e04: e5803000 str r3, [r0] <== NOT EXECUTED 30006e08: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30006e0c: eafffff0 b 30006dd4 <== NOT EXECUTED 30006e10: 3001d640 .word 0x3001d640 30006e70 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 30006e70: e92d4010 push {r4, lr} int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 30006e74: e2504000 subs r4, r0, #0 ; 0x0 int sem_init( sem_t *sem, int pshared, unsigned int value ) { 30006e78: e24dd004 sub sp, sp, #4 ; 0x4 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 30006e7c: 0a000008 beq 30006ea4 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 30006e80: e1a0300d mov r3, sp 30006e84: e3a00000 mov r0, #0 ; 0x0 30006e88: eb001978 bl 3000d470 <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 30006e8c: e3700001 cmn r0, #1 ; 0x1 *sem = the_semaphore->Object.id; 30006e90: 159d3000 ldrne r3, [sp] 30006e94: 15932008 ldrne r2, [r3, #8] 30006e98: 15842000 strne r2, [r4] return status; } 30006e9c: e28dd004 add sp, sp, #4 ; 0x4 30006ea0: e8bd8010 pop {r4, pc} { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 30006ea4: eb00222f bl 3000f768 <__errno> <== NOT EXECUTED 30006ea8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30006eac: e5803000 str r3, [r0] <== NOT EXECUTED 30006eb0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30006eb4: eafffff8 b 30006e9c <== NOT EXECUTED 30007014 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 30007014: e92d4010 push {r4, lr} 30007018: e24dd004 sub sp, sp, #4 ; 0x4 3000701c: e1a04000 mov r4, r0 * 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 ); 30007020: e1a00001 mov r0, r1 30007024: e1a0100d mov r1, sp 30007028: eb0016b0 bl 3000caf0 <_POSIX_Absolute_timeout_to_ticks> switch ( status ) { 3000702c: e3500002 cmp r0, #2 ; 0x2 30007030: 9a000005 bls 3000704c case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 30007034: e1a00004 mov r0, r4 30007038: e3a01001 mov r1, #1 ; 0x1 3000703c: e59d2000 ldr r2, [sp] 30007040: eb001981 bl 3000d64c <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 30007044: e28dd004 add sp, sp, #4 ; 0x4 30007048: e8bd8010 pop {r4, pc} case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 3000704c: e1a00004 mov r0, r4 <== NOT EXECUTED 30007050: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30007054: e59d2000 ldr r2, [sp] <== NOT EXECUTED 30007058: eb00197b bl 3000d64c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 3000705c: eafffff8 b 30007044 <== NOT EXECUTED 3001e6ac : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 3001e6ac: e59f300c ldr r3, [pc, #12] ; 3001e6c0 <== NOT EXECUTED 3001e6b0: e5932000 ldr r2, [r3] <== NOT EXECUTED 3001e6b4: e1c202bc strh r0, [r2, #44] <== NOT EXECUTED return 0; } 3001e6b8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3001e6bc: e12fff1e bx lr <== NOT EXECUTED 3001e6c0: 30045edc .word 0x30045edc 3001ecd0 : return NULL; return &grent; } void setgrent(void) { 3001ecd0: e92d4010 push {r4, lr} <== NOT EXECUTED init_etc_passwd_group(); if (group_fp != NULL) 3001ecd4: e59f4020 ldr r4, [pc, #32] ; 3001ecfc <== NOT EXECUTED return &grent; } void setgrent(void) { init_etc_passwd_group(); 3001ecd8: ebffffc4 bl 3001ebf0 <== NOT EXECUTED if (group_fp != NULL) 3001ecdc: e5940000 ldr r0, [r4] <== NOT EXECUTED 3001ece0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED fclose(group_fp); 3001ece4: 1b003b91 blne 3002db30 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 3001ece8: e59f0010 ldr r0, [pc, #16] ; 3001ed00 <== NOT EXECUTED 3001ecec: e59f1010 ldr r1, [pc, #16] ; 3001ed04 <== NOT EXECUTED 3001ecf0: eb003d81 bl 3002e2fc <== NOT EXECUTED 3001ecf4: e5840000 str r0, [r4] <== NOT EXECUTED } 3001ecf8: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3001ecfc: 30059cb0 .word 0x30059cb0 3001ed00: 300431f8 .word 0x300431f8 3001ed04: 3004419c .word 0x3004419c 3001eed0 : return NULL; return &pwent; } void setpwent(void) { 3001eed0: e92d4010 push {r4, lr} <== NOT EXECUTED init_etc_passwd_group(); if (passwd_fp != NULL) 3001eed4: e59f4020 ldr r4, [pc, #32] ; 3001eefc <== NOT EXECUTED return &pwent; } void setpwent(void) { init_etc_passwd_group(); 3001eed8: ebffff44 bl 3001ebf0 <== NOT EXECUTED if (passwd_fp != NULL) 3001eedc: e5940000 ldr r0, [r4] <== NOT EXECUTED 3001eee0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED fclose(passwd_fp); 3001eee4: 1b003b11 blne 3002db30 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 3001eee8: e59f0010 ldr r0, [pc, #16] ; 3001ef00 <== NOT EXECUTED 3001eeec: e59f1010 ldr r1, [pc, #16] ; 3001ef04 <== NOT EXECUTED 3001eef0: eb003d01 bl 3002e2fc <== NOT EXECUTED 3001eef4: e5840000 str r0, [r4] <== NOT EXECUTED } 3001eef8: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3001eefc: 30059bc8 .word 0x30059bc8 3001ef00: 30043184 .word 0x30043184 3001ef04: 3004419c .word 0x3004419c 30004078 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 30004078: e59f300c ldr r3, [pc, #12] ; 3000408c <== NOT EXECUTED 3000407c: e5932000 ldr r2, [r3] <== NOT EXECUTED 30004080: e1c202ba strh r0, [r2, #42] <== NOT EXECUTED return 0; } 30004084: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30004088: e12fff1e bx lr <== NOT EXECUTED 3000408c: 30045edc .word 0x30045edc 30006e68 : int sigwait( const sigset_t *set, int *sig ) { 30006e68: e92d4010 push {r4, lr} 30006e6c: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 30006e70: e3a01000 mov r1, #0 ; 0x0 30006e74: e1a02001 mov r2, r1 30006e78: ebffff8c bl 30006cb0 if ( status != -1 ) { 30006e7c: e3700001 cmn r0, #1 ; 0x1 30006e80: 0a000004 beq 30006e98 if ( sig ) 30006e84: e3540000 cmp r4, #0 ; 0x0 *sig = status; 30006e88: 15840000 strne r0, [r4] int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 30006e8c: 01a00004 moveq r0, r4 *sig = status; 30006e90: 13a00000 movne r0, #0 ; 0x0 30006e94: e8bd8010 pop {r4, pc} return 0; } return errno; 30006e98: eb0020d1 bl 3000f1e4 <__errno> <== NOT EXECUTED 30006e9c: e5900000 ldr r0, [r0] <== NOT EXECUTED } 30006ea0: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30002e08 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 30002e08: e591303c ldr r3, [r1, #60] <== NOT EXECUTED 30002e0c: e59f2050 ldr r2, [pc, #80] ; 30002e64 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30002e10: 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)) { 30002e14: e0032002 and r2, r3, r2 <== NOT EXECUTED 30002e18: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30002e1c: e1a05001 mov r5, r1 <== NOT EXECUTED 30002e20: 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)) { 30002e24: 1a000002 bne 30002e34 <== 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); 30002e28: e1a00004 mov r0, r4 <== NOT EXECUTED } return i; } 30002e2c: 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); 30002e30: eaffff84 b 30002c48 <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002e34: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 30002e38: e1a02001 mov r2, r1 <== NOT EXECUTED 30002e3c: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 30002e40: eb000655 bl 3000479c <== NOT EXECUTED i = iproc (c, tty); 30002e44: e1a01005 mov r1, r5 <== NOT EXECUTED 30002e48: e1a00004 mov r0, r4 <== NOT EXECUTED 30002e4c: ebffff7d bl 30002c48 <== NOT EXECUTED 30002e50: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 30002e54: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 30002e58: eb000696 bl 300048b8 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 30002e5c: e1a00004 mov r0, r4 <== NOT EXECUTED 30002e60: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30002e64: 00000e78 .word 0x00000e78 3000568c : int _STAT_NAME( const char *path, struct stat *buf ) { 3000568c: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 30005690: e2514000 subs r4, r1, #0 ; 0x0 int _STAT_NAME( const char *path, struct stat *buf ) { 30005694: e24dd010 sub sp, sp, #16 ; 0x10 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 30005698: 0a00002c beq 30005750 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 3000569c: e3a01000 mov r1, #0 ; 0x0 300056a0: e1a0200d mov r2, sp 300056a4: e3a03001 mov r3, #1 ; 0x1 300056a8: ebfff9d2 bl 30003df8 if ( status != 0 ) 300056ac: 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 ); 300056b0: e1a0500d mov r5, sp if ( status != 0 ) 300056b4: 1a000023 bne 30005748 return -1; if ( !loc.handlers->fstat_h ){ 300056b8: e59d3004 ldr r3, [sp, #4] 300056bc: e5932018 ldr r2, [r3, #24] 300056c0: e3520000 cmp r2, #0 ; 0x0 300056c4: 0a000014 beq 3000571c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 300056c8: e1a01000 mov r1, r0 300056cc: e3a0204c mov r2, #76 ; 0x4c 300056d0: e1a00004 mov r0, r4 300056d4: eb00aacc bl 3003020c status = (*loc.handlers->fstat_h)( &loc, buf ); 300056d8: e1a01004 mov r1, r4 300056dc: e59d3004 ldr r3, [sp, #4] 300056e0: e1a0000d mov r0, sp 300056e4: e1a0e00f mov lr, pc 300056e8: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 300056ec: 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 ); 300056f0: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 300056f4: e3530000 cmp r3, #0 ; 0x0 300056f8: 0a000004 beq 30005710 300056fc: e593301c ldr r3, [r3, #28] 30005700: e3530000 cmp r3, #0 ; 0x0 30005704: 11a0000d movne r0, sp 30005708: 11a0e00f movne lr, pc 3000570c: 112fff13 bxne r3 return status; } 30005710: e1a00004 mov r0, r4 30005714: e28dd010 add sp, sp, #16 ; 0x10 30005718: e8bd8030 pop {r4, r5, pc} status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 3000571c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30005720: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30005724: 0a000004 beq 3000573c <== NOT EXECUTED 30005728: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000572c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30005730: 11a0000d movne r0, sp <== NOT EXECUTED 30005734: 11a0e00f movne lr, pc <== NOT EXECUTED 30005738: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000573c: eb00a0aa bl 3002d9ec <__errno> <== NOT EXECUTED 30005740: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30005744: e5803000 str r3, [r0] <== NOT EXECUTED 30005748: e3e04000 mvn r4, #0 ; 0x0 3000574c: eaffffef b 30005710 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 30005750: eb00a0a5 bl 3002d9ec <__errno> 30005754: e3a0300e mov r3, #14 ; 0xe 30005758: e5803000 str r3, [r0] 3000575c: e3e04000 mvn r4, #0 ; 0x0 30005760: eaffffea b 30005710 3001fec8 : int symlink( const char *actualpath, const char *sympath ) { 3001fec8: 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 ); 3001fecc: e5d13000 ldrb r3, [r1] int symlink( const char *actualpath, const char *sympath ) { 3001fed0: 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 ); 3001fed4: e353005c cmp r3, #92 ; 0x5c 3001fed8: 1353002f cmpne r3, #47 ; 0x2f int symlink( const char *actualpath, const char *sympath ) { 3001fedc: e1a05001 mov r5, r1 3001fee0: 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 ); 3001fee4: 13a02000 movne r2, #0 ; 0x0 3001fee8: 03a02001 moveq r2, #1 ; 0x1 3001feec: 0a000001 beq 3001fef8 3001fef0: e3530000 cmp r3, #0 ; 0x0 3001fef4: 1a000023 bne 3001ff88 3001fef8: e59f30d0 ldr r3, [pc, #208] ; 3001ffd0 3001fefc: e1a0400d mov r4, sp 3001ff00: e593c000 ldr ip, [r3] 3001ff04: e3a0e001 mov lr, #1 ; 0x1 3001ff08: e28cc014 add ip, ip, #20 ; 0x14 3001ff0c: e89c000f ldm ip, {r0, r1, r2, r3} 3001ff10: e88d000f stm sp, {r0, r1, r2, r3} result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 3001ff14: e085000e add r0, r5, lr 3001ff18: e1a0100d mov r1, sp 3001ff1c: e28d2010 add r2, sp, #16 ; 0x10 3001ff20: e59d3008 ldr r3, [sp, #8] 3001ff24: e1a0e00f mov lr, pc 3001ff28: e593f004 ldr pc, [r3, #4] if ( result != 0 ) 3001ff2c: e3500000 cmp r0, #0 ; 0x0 3001ff30: 1a000024 bne 3001ffc8 return -1; if ( !loc.ops->symlink_h ) { 3001ff34: e59d2008 ldr r2, [sp, #8] 3001ff38: e5923038 ldr r3, [r2, #56] 3001ff3c: e3530000 cmp r3, #0 ; 0x0 3001ff40: 0a000018 beq 3001ffa8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 3001ff44: e1a01006 mov r1, r6 3001ff48: e1a0000d mov r0, sp 3001ff4c: e59d2010 ldr r2, [sp, #16] 3001ff50: e1a0e00f mov lr, pc 3001ff54: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3001ff58: 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); 3001ff5c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 3001ff60: e3530000 cmp r3, #0 ; 0x0 3001ff64: 0a000004 beq 3001ff7c 3001ff68: e593301c ldr r3, [r3, #28] 3001ff6c: e3530000 cmp r3, #0 ; 0x0 3001ff70: 11a0000d movne r0, sp 3001ff74: 11a0e00f movne lr, pc 3001ff78: 112fff13 bxne r3 return result; } 3001ff7c: e1a00005 mov r0, r5 3001ff80: e28dd014 add sp, sp, #20 ; 0x14 3001ff84: e8bd8070 pop {r4, r5, r6, pc} rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 3001ff88: e59f3040 ldr r3, [pc, #64] ; 3001ffd0 3001ff8c: e1a0e002 mov lr, r2 3001ff90: e593c000 ldr ip, [r3] 3001ff94: e1a0400d mov r4, sp 3001ff98: e28cc004 add ip, ip, #4 ; 0x4 3001ff9c: e89c000f ldm ip, {r0, r1, r2, r3} 3001ffa0: e88d000f stm sp, {r0, r1, r2, r3} 3001ffa4: eaffffda b 3001ff14 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 3001ffa8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3001ffac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001ffb0: 11a0000d movne r0, sp <== NOT EXECUTED 3001ffb4: 11a0e00f movne lr, pc <== NOT EXECUTED 3001ffb8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001ffbc: eb00368a bl 3002d9ec <__errno> <== NOT EXECUTED 3001ffc0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3001ffc4: e5803000 str r3, [r0] <== NOT EXECUTED 3001ffc8: e3e05000 mvn r5, #0 ; 0x0 3001ffcc: eaffffea b 3001ff7c 3001ffd0: 30045edc .word 0x30045edc 30011458 : int tcgetattr( int fd, struct termios *tp ) { 30011458: e1a02001 mov r2, r1 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 3001145c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 30011460: ea000f86 b 30015280 <== NOT EXECUTED 30011464 : int fd, int opt, struct termios *tp ) { switch (opt) { 30011464: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED int tcsetattr( int fd, int opt, struct termios *tp ) { 30011468: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3001146c: e1a05002 mov r5, r2 <== NOT EXECUTED 30011470: e1a04000 mov r4, r0 <== NOT EXECUTED switch (opt) { 30011474: 0a00000b beq 300114a8 <== NOT EXECUTED 30011478: e3510001 cmp r1, #1 ; 0x1 <== NOT EXECUTED 3001147c: 0a000004 beq 30011494 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 30011480: eb0012af bl 30015f44 <__errno> <== NOT EXECUTED 30011484: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30011488: e5803000 str r3, [r0] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 3001148c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30011490: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 30011494: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 30011498: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3001149c: eb000f77 bl 30015280 <== NOT EXECUTED 300114a0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300114a4: bafffff8 blt 3001148c <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 300114a8: e1a00004 mov r0, r4 <== NOT EXECUTED 300114ac: e1a02005 mov r2, r5 <== NOT EXECUTED 300114b0: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED } } 300114b4: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 300114b8: ea000f70 b 30015280 <== NOT EXECUTED 300049ec : DIR *dirp ) { rtems_libio_t *iop; if ( !dirp ) 300049ec: e3500000 cmp r0, #0 ; 0x0 #include long telldir( DIR *dirp ) { 300049f0: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; if ( !dirp ) 300049f4: 0a000013 beq 30004a48 /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 300049f8: e59f305c ldr r3, [pc, #92] ; 30004a5c 300049fc: e5900000 ldr r0, [r0] 30004a00: e5932000 ldr r2, [r3] 30004a04: e1500002 cmp r0, r2 30004a08: 2a000009 bcs 30004a34 30004a0c: e1a03200 lsl r3, r0, #4 30004a10: e59f2048 ldr r2, [pc, #72] ; 30004a60 30004a14: e0433100 sub r3, r3, r0, lsl #2 30004a18: e0833000 add r3, r3, r0 30004a1c: e5921000 ldr r1, [r2] 30004a20: e1a03103 lsl r3, r3, #2 if (iop == NULL) 30004a24: e0910003 adds r0, r1, r3 30004a28: 0a000001 beq 30004a34 assert(0); return (long)( iop->offset ); 30004a2c: e5900008 ldr r0, [r0, #8] } 30004a30: e49df004 pop {pc} ; (ldr pc, [sp], #4) */ iop = rtems_libio_iop( dirp->dd_fd ); if (iop == NULL) assert(0); 30004a34: e59f0028 ldr r0, [pc, #40] ; 30004a64 <== NOT EXECUTED 30004a38: e3a0102c mov r1, #44 ; 0x2c <== NOT EXECUTED 30004a3c: e59f2024 ldr r2, [pc, #36] ; 30004a68 <== NOT EXECUTED 30004a40: e59f3024 ldr r3, [pc, #36] ; 30004a6c <== NOT EXECUTED 30004a44: ebfff75a bl 300027b4 <__assert_func> <== NOT EXECUTED ) { rtems_libio_t *iop; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 30004a48: eb002a75 bl 3000f424 <__errno> <== NOT EXECUTED 30004a4c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30004a50: e5803000 str r3, [r0] <== NOT EXECUTED 30004a54: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30004a58: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30004a5c: 30016c4c .word 0x30016c4c 30004a60: 30017a48 .word 0x30017a48 30004a64: 300166f0 .word 0x300166f0 30004a68: 30015198 .word 0x30015198 30004a6c: 300165fc .word 0x300165fc 30005ac0 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 30005ac0: e92d41f0 push {r4, r5, r6, r7, r8, lr} Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 30005ac4: e2524000 subs r4, r2, #0 ; 0x0 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 30005ac8: e24dd018 sub sp, sp, #24 ; 0x18 30005acc: e1a05000 mov r5, r0 30005ad0: e1a06003 mov r6, r3 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 30005ad4: 0a000039 beq 30005bc0 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 ) || 30005ad8: e59f2168 ldr r2, [pc, #360] ; 30005c48 30005adc: e594300c ldr r3, [r4, #12] 30005ae0: e1530002 cmp r3, r2 30005ae4: 8a000035 bhi 30005bc0 30005ae8: e5943004 ldr r3, [r4, #4] 30005aec: e1530002 cmp r3, r2 30005af0: 8a000032 bhi 30005bc0 30005af4: e3530000 cmp r3, #0 ; 0x0 30005af8: ba000030 blt 30005bc0 ( 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 ) { 30005afc: e3510004 cmp r1, #4 ; 0x4 30005b00: 13510000 cmpne r1, #0 ; 0x0 30005b04: 1a00002d bne 30005bc0 } normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 30005b08: e3510004 cmp r1, #4 ; 0x4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 30005b0c: e28d7004 add r7, sp, #4 ; 0x4 30005b10: e894000f ldm r4, {r0, r1, r2, r3} 30005b14: e887000f stm r7, {r0, r1, r2, r3} /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 30005b18: 0a00003c beq 30005c10 30005b1c: e1a01005 mov r1, r5 30005b20: e59f0124 ldr r0, [pc, #292] ; 30005c4c 30005b24: e28d2014 add r2, sp, #20 ; 0x14 30005b28: eb000855 bl 30007c84 <_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 ) { 30005b2c: e59d3014 ldr r3, [sp, #20] 30005b30: e1a05000 mov r5, r0 30005b34: e3530000 cmp r3, #0 ; 0x0 30005b38: 1a000020 bne 30005bc0 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 ) { 30005b3c: e59d300c ldr r3, [sp, #12] 30005b40: e3530000 cmp r3, #0 ; 0x0 30005b44: 1a000002 bne 30005b54 30005b48: e59d3010 ldr r3, [sp, #16] 30005b4c: e3530000 cmp r3, #0 ; 0x0 30005b50: 0a000020 beq 30005bd8 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 30005b54: e1a00004 mov r0, r4 30005b58: eb000e5f bl 300094dc <_Timespec_To_ticks> 30005b5c: e5850064 str r0, [r5, #100] initial_period = _Timespec_To_ticks( &normalize.it_value ); 30005b60: e28d000c add r0, sp, #12 ; 0xc 30005b64: eb000e5c bl 300094dc <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 30005b68: e5952008 ldr r2, [r5, #8] 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 ); 30005b6c: e1a01000 mov r1, r0 activated = _POSIX_Timer_Insert_helper( 30005b70: e59f30d8 ldr r3, [pc, #216] ; 30005c50 30005b74: e2850010 add r0, r5, #16 ; 0x10 30005b78: e58d5000 str r5, [sp] 30005b7c: eb00194e bl 3000c0bc <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 30005b80: e2504000 subs r4, r0, #0 ; 0x0 30005b84: 0a00002c beq 30005c3c /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 30005b88: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 30005b8c: 1285c054 addne ip, r5, #84 ; 0x54 30005b90: 189c000f ldmne ip, {r0, r1, r2, r3} 30005b94: 1886000f stmne r6, {r0, r1, r2, r3} 30005b98: 0285c054 addeq ip, r5, #84 ; 0x54 ptimer->timer_data = normalize; 30005b9c: e897000f ldm r7, {r0, r1, r2, r3} 30005ba0: e88c000f stm ip, {r0, r1, r2, r3} /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 30005ba4: e3a03003 mov r3, #3 ; 0x3 _TOD_Get( &ptimer->time ); 30005ba8: e285006c add r0, r5, #108 ; 0x6c if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 30005bac: e5c5303c strb r3, [r5, #60] _TOD_Get( &ptimer->time ); 30005bb0: eb0005fa bl 300073a0 <_TOD_Get> _Thread_Enable_dispatch(); 30005bb4: eb000a50 bl 300084fc <_Thread_Enable_dispatch> 30005bb8: e3a00000 mov r0, #0 ; 0x0 30005bbc: ea000003 b 30005bd0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 30005bc0: eb0020d7 bl 3000df24 <__errno> 30005bc4: e3a03016 mov r3, #22 ; 0x16 30005bc8: e5803000 str r3, [r0] 30005bcc: e3e00000 mvn r0, #0 ; 0x0 } 30005bd0: e28dd018 add sp, sp, #24 ; 0x18 30005bd4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 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 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 30005bd8: e2800010 add r0, r0, #16 ; 0x10 30005bdc: eb000f81 bl 300099e8 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 30005be0: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 30005be4: 1285c054 addne ip, r5, #84 ; 0x54 30005be8: 189c000f ldmne ip, {r0, r1, r2, r3} 30005bec: 1886000f stmne r6, {r0, r1, r2, r3} 30005bf0: 0285c054 addeq ip, r5, #84 ; 0x54 /* The new data are set */ ptimer->timer_data = normalize; 30005bf4: e897000f ldm r7, {r0, r1, r2, r3} 30005bf8: e88c000f stm ip, {r0, r1, r2, r3} /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 30005bfc: e3a03004 mov r3, #4 ; 0x4 30005c00: e5c5303c strb r3, [r5, #60] /* Returns with success */ _Thread_Enable_dispatch(); 30005c04: eb000a3c bl 300084fc <_Thread_Enable_dispatch> 30005c08: e3a00000 mov r0, #0 ; 0x0 30005c0c: eaffffef b 30005bd0 normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 30005c10: e28d800c add r8, sp, #12 ; 0xc 30005c14: e59f0038 ldr r0, [pc, #56] ; 30005c54 30005c18: e1a01008 mov r1, r8 30005c1c: eb000e08 bl 30009444 <_Timespec_Greater_than> 30005c20: e3500000 cmp r0, #0 ; 0x0 30005c24: 1affffe5 bne 30005bc0 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 30005c28: e1a01008 mov r1, r8 30005c2c: e59f0020 ldr r0, [pc, #32] ; 30005c54 30005c30: e1a02008 mov r2, r8 30005c34: eb000e0f bl 30009478 <_Timespec_Subtract> 30005c38: eaffffb7 b 30005b1c ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 30005c3c: eb000a2e bl 300084fc <_Thread_Enable_dispatch> <== NOT EXECUTED 30005c40: e1a00004 mov r0, r4 <== NOT EXECUTED 30005c44: eaffffe1 b 30005bd0 <== NOT EXECUTED 30005c48: 3b9ac9ff .word 0x3b9ac9ff 30005c4c: 3001bc20 .word 0x3001bc20 30005c50: 30005c58 .word 0x30005c58 30005c54: 3001b9d4 .word 0x3001b9d4 3002013c : */ char *ttyname( int fd ) { 3002013c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 30020140: e59f1018 ldr r1, [pc, #24] ; 30020160 <== NOT EXECUTED 30020144: e59f2018 ldr r2, [pc, #24] ; 30020164 <== NOT EXECUTED 30020148: ebffffbd bl 30020044 <== NOT EXECUTED 3002014c: e59f300c ldr r3, [pc, #12] ; 30020160 <== NOT EXECUTED return ttyname_buf; return NULL; } 30020150: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30020154: 01a00003 moveq r0, r3 <== NOT EXECUTED 30020158: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 3002015c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30020160: 30045ee0 .word 0x30045ee0 30020164: 00000406 .word 0x00000406 30020044 : int ttyname_r( int fd, char *name, size_t namesize ) { 30020044: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 30020048: e24dd0bc sub sp, sp, #188 ; 0xbc <== NOT EXECUTED 3002004c: e1a05001 mov r5, r1 <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 30020050: e28d1098 add r1, sp, #152 ; 0x98 <== NOT EXECUTED int ttyname_r( int fd, char *name, size_t namesize ) { 30020054: e1a04000 mov r4, r0 <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 30020058: ebffffe0 bl 3001ffe0 <== NOT EXECUTED 3002005c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30020060: ba000008 blt 30020088 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 30020064: e1a00004 mov r0, r4 <== NOT EXECUTED 30020068: e28d104c add r1, sp, #76 ; 0x4c <== NOT EXECUTED 3002006c: ebfff7c9 bl 3001df98 <== NOT EXECUTED 30020070: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30020074: 1a000003 bne 30020088 <== NOT EXECUTED 30020078: e59d3058 ldr r3, [sp, #88] <== NOT EXECUTED 3002007c: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 30020080: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED 30020084: 0a000005 beq 300200a0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) rtems_set_errno_and_return_minus_one(EBADF); 30020088: eb003657 bl 3002d9ec <__errno> <== NOT EXECUTED 3002008c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30020090: e5803000 str r3, [r0] <== NOT EXECUTED 30020094: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED rval = name; break; } (void) closedir (dp); return 0; } 30020098: e28dd0bc add sp, sp, #188 ; 0xbc <== NOT EXECUTED 3002009c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== 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) 300200a0: e59f0090 ldr r0, [pc, #144] ; 30020138 <== NOT EXECUTED 300200a4: ebfffdb8 bl 3001f78c <== NOT EXECUTED 300200a8: 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); 300200ac: 12856005 addne r6, r5, #5 ; 0x5 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 300200b0: 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) 300200b4: 0afffff3 beq 30020088 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 300200b8: e1a00004 mov r0, r4 <== NOT EXECUTED 300200bc: ebfffe65 bl 3001fa58 <== NOT EXECUTED 300200c0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300200c4: 0a000017 beq 30020128 <== NOT EXECUTED { if (dirp->d_ino != sb.st_ino) 300200c8: e5902000 ldr r2, [r0] <== NOT EXECUTED 300200cc: e59d3054 ldr r3, [sp, #84] <== NOT EXECUTED 300200d0: e1520003 cmp r2, r3 <== NOT EXECUTED 300200d4: 1afffff7 bne 300200b8 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 300200d8: e280100c add r1, r0, #12 ; 0xc <== NOT EXECUTED 300200dc: e1a00006 mov r0, r6 <== NOT EXECUTED 300200e0: eb004aea bl 30032c90 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 300200e4: e1a00005 mov r0, r5 <== NOT EXECUTED 300200e8: e1a0100d mov r1, sp <== NOT EXECUTED 300200ec: ebff9566 bl 3000568c <== NOT EXECUTED 300200f0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300200f4: 1affffef bne 300200b8 <== NOT EXECUTED 300200f8: e59d2000 ldr r2, [sp] <== NOT EXECUTED 300200fc: e59d304c ldr r3, [sp, #76] <== NOT EXECUTED 30020100: e1530002 cmp r3, r2 <== NOT EXECUTED 30020104: 1affffeb bne 300200b8 <== NOT EXECUTED 30020108: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 3002010c: e59d3050 ldr r3, [sp, #80] <== NOT EXECUTED 30020110: e1530002 cmp r3, r2 <== NOT EXECUTED 30020114: 1affffe7 bne 300200b8 <== NOT EXECUTED 30020118: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 3002011c: e59d3054 ldr r3, [sp, #84] <== NOT EXECUTED 30020120: e1530002 cmp r3, r2 <== NOT EXECUTED 30020124: 1affffe3 bne 300200b8 <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 30020128: e1a00004 mov r0, r4 <== NOT EXECUTED 3002012c: eb002b43 bl 3002ae40 <== NOT EXECUTED 30020130: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30020134: eaffffd7 b 30020098 <== NOT EXECUTED 30020138: 300432d8 .word 0x300432d8 30020184 : #include int unlink( const char *path ) { 30020184: e92d4030 push {r4, r5, lr} /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 30020188: e3a01000 mov r1, #0 ; 0x0 #include int unlink( const char *path ) { 3002018c: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 30020190: e1a0200d mov r2, sp 30020194: e1a03001 mov r3, r1 30020198: ebff8f16 bl 30003df8 if ( result != 0 ) 3002019c: e3500000 cmp r0, #0 ; 0x0 /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 300201a0: e1a0500d mov r5, sp if ( result != 0 ) 300201a4: 0a000003 beq 300201b8 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); rtems_filesystem_freenode( &loc ); 300201a8: e3e04000 mvn r4, #0 ; 0x0 return result; } 300201ac: e1a00004 mov r0, r4 300201b0: e28dd010 add sp, sp, #16 ; 0x10 300201b4: e8bd8030 pop {r4, r5, pc} result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 300201b8: e2800002 add r0, r0, #2 ; 0x2 300201bc: e1a0100d mov r1, sp 300201c0: ebff8ee2 bl 30003d50 if (result != 0 && errno != ENOTSUP) { 300201c4: e3500000 cmp r0, #0 ; 0x0 300201c8: 1a00001a bne 30020238 rtems_filesystem_freenode( &loc ); return -1; } if ( !loc.ops->node_type_h ) { 300201cc: e59d2008 ldr r2, [sp, #8] 300201d0: e5923010 ldr r3, [r2, #16] 300201d4: e3530000 cmp r3, #0 ; 0x0 300201d8: 0a000025 beq 30020274 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 300201dc: e1a0000d mov r0, sp 300201e0: e1a0e00f mov lr, pc 300201e4: e12fff13 bx r3 300201e8: e3500001 cmp r0, #1 ; 0x1 300201ec: 0a00002a beq 3002029c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 300201f0: e59d2008 ldr r2, [sp, #8] 300201f4: e592300c ldr r3, [r2, #12] 300201f8: e3530000 cmp r3, #0 ; 0x0 300201fc: 0a00001c beq 30020274 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); 30020200: e1a0000d mov r0, sp 30020204: e1a0e00f mov lr, pc 30020208: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3002020c: 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 ); 30020210: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 30020214: e3530000 cmp r3, #0 ; 0x0 30020218: 0affffe3 beq 300201ac 3002021c: e593301c ldr r3, [r3, #28] 30020220: e3530000 cmp r3, #0 ; 0x0 30020224: 0affffe0 beq 300201ac 30020228: e1a0000d mov r0, sp 3002022c: e1a0e00f mov lr, pc 30020230: e12fff13 bx r3 30020234: eaffffdc b 300201ac result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0 && errno != ENOTSUP) { 30020238: eb0035eb bl 3002d9ec <__errno> <== NOT EXECUTED 3002023c: e5903000 ldr r3, [r0] <== NOT EXECUTED 30020240: e3530086 cmp r3, #134 ; 0x86 <== NOT EXECUTED 30020244: 0affffe0 beq 300201cc <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 30020248: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3002024c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30020250: 0affffd4 beq 300201a8 <== NOT EXECUTED 30020254: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30020258: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3002025c: 0affffd1 beq 300201a8 <== NOT EXECUTED 30020260: e1a0000d mov r0, sp <== NOT EXECUTED 30020264: e1a0e00f mov lr, pc <== NOT EXECUTED 30020268: e12fff13 bx r3 <== NOT EXECUTED 3002026c: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 30020270: eaffffcd b 300201ac <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 30020274: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30020278: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3002027c: 11a0000d movne r0, sp <== NOT EXECUTED 30020280: 11a0e00f movne lr, pc <== NOT EXECUTED 30020284: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30020288: eb0035d7 bl 3002d9ec <__errno> <== NOT EXECUTED 3002028c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30020290: e5803000 str r3, [r0] <== NOT EXECUTED 30020294: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 30020298: eaffffc3 b 300201ac <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 3002029c: e59d3008 ldr r3, [sp, #8] 300202a0: e3530000 cmp r3, #0 ; 0x0 300202a4: 0a000004 beq 300202bc 300202a8: e593301c ldr r3, [r3, #28] 300202ac: e3530000 cmp r3, #0 ; 0x0 300202b0: 11a0000d movne r0, sp 300202b4: 11a0e00f movne lr, pc 300202b8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EISDIR ); 300202bc: eb0035ca bl 3002d9ec <__errno> 300202c0: e3a03015 mov r3, #21 ; 0x15 300202c4: e5803000 str r3, [r0] 300202c8: e3e04000 mvn r4, #0 ; 0x0 300202cc: eaffffb6 b 300201ac 30020340 : */ int unmount( const char *path ) { 30020340: e92d4030 push {r4, r5, lr} 30020344: 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 ) ) 30020348: e3a01000 mov r1, #0 ; 0x0 3002034c: e1a0200d mov r2, sp 30020350: e3a03001 mov r3, #1 ; 0x1 30020354: ebff8ea7 bl 30003df8 30020358: e3500000 cmp r0, #0 ; 0x0 3002035c: e1a0500d mov r5, sp 30020360: 1a000032 bne 30020430 return -1; mt_entry = loc.mt_entry; 30020364: 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) ){ 30020368: e59d3000 ldr r3, [sp] 3002036c: e5942018 ldr r2, [r4, #24] 30020370: e1520003 cmp r2, r3 30020374: 1a000035 bne 30020450 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 30020378: e59d3008 ldr r3, [sp, #8] 3002037c: e3530000 cmp r3, #0 ; 0x0 30020380: 0a000004 beq 30020398 30020384: e593301c ldr r3, [r3, #28] 30020388: e3530000 cmp r3, #0 ; 0x0 3002038c: 11a0000d movne r0, sp 30020390: 11a0e00f movne lr, pc 30020394: 112fff13 bxne r3 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 30020398: e5943010 ldr r3, [r4, #16] 3002039c: e5932028 ldr r2, [r3, #40] 300203a0: e3520000 cmp r2, #0 ; 0x0 300203a4: 0a000052 beq 300204f4 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 300203a8: e5943020 ldr r3, [r4, #32] 300203ac: e593202c ldr r2, [r3, #44] 300203b0: e3520000 cmp r2, #0 ; 0x0 300203b4: 0a00004e beq 300204f4 * 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 ) 300203b8: e59f3148 ldr r3, [pc, #328] ; 30020508 300203bc: e5932000 ldr r2, [r3] 300203c0: e5921010 ldr r1, [r2, #16] 300203c4: e1510004 cmp r1, r4 300203c8: 0a00001b beq 3002043c /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 300203cc: e59f1138 ldr r1, [pc, #312] ; 3002050c 300203d0: e4912004 ldr r2, [r1], #4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 300203d4: e1510002 cmp r1, r2 300203d8: 0a00000a beq 30020408 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 ) { 300203dc: e5940024 ldr r0, [r4, #36] 300203e0: e5923014 ldr r3, [r2, #20] 300203e4: e1530000 cmp r3, r0 300203e8: 1a000003 bne 300203fc 300203ec: ea000012 b 3002043c <== NOT EXECUTED 300203f0: e5923014 ldr r3, [r2, #20] 300203f4: e1500003 cmp r0, r3 300203f8: 0a00000f beq 3002043c * 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 ) { 300203fc: e5922000 ldr r2, [r2] * 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 ); 30020400: e1510002 cmp r1, r2 30020404: 1afffff9 bne 300203f0 * 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 ) 30020408: e1a00004 mov r0, r4 3002040c: ebff8f89 bl 30004238 30020410: e3500001 cmp r0, #1 ; 0x1 30020414: 0a000008 beq 3002043c * 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 ) 30020418: e5943010 ldr r3, [r4, #16] 3002041c: e1a00004 mov r0, r4 30020420: e1a0e00f mov lr, pc 30020424: e593f028 ldr pc, [r3, #40] 30020428: e2505000 subs r5, r0, #0 ; 0x0 3002042c: 0a000014 beq 30020484 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 30020430: e3e00000 mvn r0, #0 ; 0x0 } 30020434: e28dd010 add sp, sp, #16 ; 0x10 30020438: e8bd8030 pop {r4, r5, pc} * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 3002043c: eb00356a bl 3002d9ec <__errno> 30020440: e3a03010 mov r3, #16 ; 0x10 30020444: e5803000 str r3, [r0] 30020448: e3e00000 mvn r0, #0 ; 0x0 3002044c: eafffff8 b 30020434 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 30020450: e59d3008 ldr r3, [sp, #8] 30020454: e3530000 cmp r3, #0 ; 0x0 30020458: 0a000004 beq 30020470 3002045c: e593301c ldr r3, [r3, #28] 30020460: e3530000 cmp r3, #0 ; 0x0 30020464: 11a0000d movne r0, sp 30020468: 11a0e00f movne lr, pc 3002046c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 30020470: eb00355d bl 3002d9ec <__errno> 30020474: e3a0300d mov r3, #13 ; 0xd 30020478: e5803000 str r3, [r0] 3002047c: e3e00000 mvn r0, #0 ; 0x0 30020480: eaffffeb b 30020434 * 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){ 30020484: e5943020 ldr r3, [r4, #32] 30020488: e1a00004 mov r0, r4 3002048c: e1a0e00f mov lr, pc 30020490: e593f02c ldr pc, [r3, #44] 30020494: e3500000 cmp r0, #0 ; 0x0 30020498: 1a00000d bne 300204d4 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 3002049c: e1a00004 mov r0, r4 300204a0: eb0005ad bl 30021b5c <_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 ); 300204a4: e5943010 ldr r3, [r4, #16] 300204a8: e3530000 cmp r3, #0 ; 0x0 300204ac: 0a000004 beq 300204c4 300204b0: e593301c ldr r3, [r3, #28] 300204b4: e3530000 cmp r3, #0 ; 0x0 300204b8: 12840008 addne r0, r4, #8 ; 0x8 300204bc: 11a0e00f movne lr, pc 300204c0: 112fff13 bxne r3 free( mt_entry ); 300204c4: e1a00004 mov r0, r4 300204c8: ebff8e9f bl 30003f4c 300204cc: e3a00000 mov r0, #0 ; 0x0 300204d0: eaffffd7 b 30020434 * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 300204d4: e1a00004 mov r0, r4 <== NOT EXECUTED 300204d8: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 300204dc: e1a0e00f mov lr, pc <== NOT EXECUTED 300204e0: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 300204e4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 300204e8: 0affffd0 beq 30020430 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 300204ec: e1a00005 mov r0, r5 <== NOT EXECUTED 300204f0: ebffa00d bl 3000852c <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 300204f4: eb00353c bl 3002d9ec <__errno> <== NOT EXECUTED 300204f8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300204fc: e5803000 str r3, [r0] <== NOT EXECUTED 30020500: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30020504: eaffffca b 30020434 <== NOT EXECUTED 30020508: 30045edc .word 0x30045edc 3002050c: 3005a54c .word 0x3005a54c 30020510 : int utime( const char *path, const struct utimbuf *times ) { 30020510: e92d4030 push {r4, r5, lr} 30020514: e24dd010 sub sp, sp, #16 ; 0x10 30020518: e1a04001 mov r4, r1 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) ) 3002051c: e1a0200d mov r2, sp 30020520: e3a01000 mov r1, #0 ; 0x0 30020524: e3a03001 mov r3, #1 ; 0x1 30020528: ebff8e32 bl 30003df8 3002052c: e3500000 cmp r0, #0 ; 0x0 30020530: e1a0500d mov r5, sp 30020534: 1a00001b bne 300205a8 return -1; if ( !temp_loc.ops->utime_h ){ 30020538: e59d2008 ldr r2, [sp, #8] 3002053c: e5923030 ldr r3, [r2, #48] 30020540: e3530000 cmp r3, #0 ; 0x0 30020544: 0a00000f beq 30020588 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 ); 30020548: e8940006 ldm r4, {r1, r2} 3002054c: e1a0000d mov r0, sp 30020550: e1a0e00f mov lr, pc 30020554: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 30020558: 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 ); 3002055c: e1a04000 mov r4, r0 rtems_filesystem_freenode( &temp_loc ); 30020560: e3530000 cmp r3, #0 ; 0x0 30020564: 0a000004 beq 3002057c 30020568: e593301c ldr r3, [r3, #28] 3002056c: e3530000 cmp r3, #0 ; 0x0 30020570: 11a0000d movne r0, sp 30020574: 11a0e00f movne lr, pc 30020578: 112fff13 bxne r3 return result; } 3002057c: e1a00004 mov r0, r4 30020580: e28dd010 add sp, sp, #16 ; 0x10 30020584: e8bd8030 pop {r4, r5, pc} if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 30020588: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3002058c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30020590: 11a0000d movne r0, sp <== NOT EXECUTED 30020594: 11a0e00f movne lr, pc <== NOT EXECUTED 30020598: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3002059c: eb003512 bl 3002d9ec <__errno> <== NOT EXECUTED 300205a0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300205a4: e5803000 str r3, [r0] <== NOT EXECUTED 300205a8: e3e04000 mvn r4, #0 ; 0x0 300205ac: eafffff2 b 3002057c 30001d54 : */ void vprintk( const char *fmt, va_list ap ) { 30001d54: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30001d58: e1a08000 mov r8, r0 char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 30001d5c: e5d00000 ldrb r0, [r0] */ void vprintk( const char *fmt, va_list ap ) { 30001d60: e24dd01c sub sp, sp, #28 ; 0x1c char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 30001d64: e3500000 cmp r0, #0 ; 0x0 */ void vprintk( const char *fmt, va_list ap ) { 30001d68: e1a07001 mov r7, r1 char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 30001d6c: 0a0000a1 beq 30001ff8 30001d70: e59fa3bc ldr sl, [pc, #956] ; 30002134 base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 30001d74: e3500025 cmp r0, #37 ; 0x25 30001d78: 1a000059 bne 30001ee4 fmt++; if (*fmt == '0' ) { 30001d7c: e5d80001 ldrb r0, [r8, #1] sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; 30001d80: e2881001 add r1, r8, #1 ; 0x1 if (*fmt == '0' ) { 30001d84: e3500030 cmp r0, #48 ; 0x30 lead = '0'; fmt++; 30001d88: 05f10001 ldrbeq r0, [r1, #1]! width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; if (*fmt == '0' ) { 30001d8c: 13a09020 movne r9, #32 ; 0x20 lead = '0'; fmt++; 30001d90: 03a09030 moveq r9, #48 ; 0x30 } if (*fmt == '-' ) { 30001d94: e350002d cmp r0, #45 ; 0x2d minus = 1; fmt++; 30001d98: 05f10001 ldrbeq r0, [r1, #1]! 30001d9c: 03a03001 moveq r3, #1 ; 0x1 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 30001da0: 13a02000 movne r2, #0 ; 0x0 minus = 1; fmt++; 30001da4: 058d3000 streq r3, [sp] } while (*fmt >= '0' && *fmt <= '9' ) { 30001da8: e2403030 sub r3, r0, #48 ; 0x30 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 30001dac: 158d2000 strne r2, [sp] minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 30001db0: e3530009 cmp r3, #9 ; 0x9 30001db4: 83a04000 movhi r4, #0 ; 0x0 30001db8: 81a08001 movhi r8, r1 30001dbc: 81a0b004 movhi fp, r4 30001dc0: 8a00000b bhi 30001df4 30001dc4: e3a04000 mov r4, #0 ; 0x0 width *= 10; width += (*fmt - '0'); 30001dc8: e1a03184 lsl r3, r4, #3 30001dcc: e1a02084 lsl r2, r4, #1 30001dd0: e0822003 add r2, r2, r3 30001dd4: e0822000 add r2, r2, r0 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 30001dd8: e5f10001 ldrb r0, [r1, #1]! width *= 10; width += (*fmt - '0'); 30001ddc: e2424030 sub r4, r2, #48 ; 0x30 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 30001de0: e2403030 sub r3, r0, #48 ; 0x30 30001de4: e3530009 cmp r3, #9 ; 0x9 30001de8: 9afffff6 bls 30001dc8 30001dec: e1a0b004 mov fp, r4 30001df0: e1a08001 mov r8, r1 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 30001df4: e350006c cmp r0, #108 ; 0x6c lflag = 1; c = *++fmt; 30001df8: 05d10001 ldrbeq r0, [r1, #1] 30001dfc: 02818001 addeq r8, r1, #1 ; 0x1 } switch (c) { 30001e00: e2403044 sub r3, r0, #68 ; 0x44 30001e04: e3530034 cmp r3, #52 ; 0x34 30001e08: 979ff103 ldrls pc, [pc, r3, lsl #2] 30001e0c: ea000034 b 30001ee4 30001e10: 30002000 .word 0x30002000 <== NOT EXECUTED 30001e14: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e18: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e1c: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e20: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e24: 30002000 .word 0x30002000 <== NOT EXECUTED 30001e28: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e2c: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e30: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e34: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e38: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e3c: 30001f04 .word 0x30001f04 <== NOT EXECUTED 30001e40: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e44: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e48: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e4c: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e50: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e54: 300020f4 .word 0x300020f4 <== NOT EXECUTED 30001e58: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e5c: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e60: 30002128 .word 0x30002128 <== NOT EXECUTED 30001e64: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e68: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e6c: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e70: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e74: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e78: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e7c: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e80: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e84: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e88: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e8c: 300020dc .word 0x300020dc <== NOT EXECUTED 30001e90: 30002000 .word 0x30002000 <== NOT EXECUTED 30001e94: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e98: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001e9c: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001ea0: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001ea4: 30002000 .word 0x30002000 <== NOT EXECUTED 30001ea8: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001eac: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001eb0: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001eb4: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001eb8: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001ebc: 30001f04 .word 0x30001f04 <== NOT EXECUTED 30001ec0: 30002128 .word 0x30002128 <== NOT EXECUTED 30001ec4: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001ec8: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001ecc: 30002038 .word 0x30002038 <== NOT EXECUTED 30001ed0: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001ed4: 300020f4 .word 0x300020f4 <== NOT EXECUTED 30001ed8: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001edc: 30001ee4 .word 0x30001ee4 <== NOT EXECUTED 30001ee0: 30002128 .word 0x30002128 <== NOT EXECUTED if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 30001ee4: e1a0e00f mov lr, pc 30001ee8: e59af000 ldr pc, [sl] 30001eec: e58d7004 str r7, [sp, #4] ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 30001ef0: e5f80001 ldrb r0, [r8, #1]! 30001ef4: e3500000 cmp r0, #0 ; 0x0 30001ef8: 0a00003e beq 30001ff8 30001efc: e59d7004 ldr r7, [sp, #4] 30001f00: eaffff9b b 30001d74 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 30001f04: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30001f08: e3a06008 mov r6, #8 ; 0x8 <== NOT EXECUTED break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 30001f0c: e5975000 ldr r5, [r7] 30001f10: e2877004 add r7, r7, #4 ; 0x4 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 30001f14: e0133fa5 ands r3, r3, r5, lsr #31 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 30001f18: e58d7004 str r7, [sp, #4] { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 30001f1c: 1a00003e bne 3000201c num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 30001f20: e1a00005 mov r0, r5 30001f24: e1a01006 mov r1, r6 30001f28: eb004319 bl 30012b94 <__aeabi_uidiv> 30001f2c: e3500000 cmp r0, #0 ; 0x0 30001f30: 01a04000 moveq r4, r0 30001f34: 03a07001 moveq r7, #1 ; 0x1 30001f38: 0a000010 beq 30001f80 30001f3c: e1a02005 mov r2, r5 30001f40: e3a04000 mov r4, #0 ; 0x0 30001f44: e1a05000 mov r5, r0 30001f48: ea000000 b 30001f50 30001f4c: e1a05000 mov r5, r0 toPrint[count++] = (num - (n*base)); 30001f50: e0030596 mul r3, r6, r5 30001f54: e0633002 rsb r3, r3, r2 30001f58: e28d2008 add r2, sp, #8 ; 0x8 30001f5c: e7c23004 strb r3, [r2, r4] num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 30001f60: e1a00005 mov r0, r5 30001f64: e1a01006 mov r1, r6 30001f68: eb004309 bl 30012b94 <__aeabi_uidiv> 30001f6c: e3500000 cmp r0, #0 ; 0x0 30001f70: e1a02005 mov r2, r5 toPrint[count++] = (num - (n*base)); 30001f74: e2844001 add r4, r4, #1 ; 0x1 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 30001f78: 1afffff3 bne 30001f4c 30001f7c: e2847001 add r7, r4, #1 ; 0x1 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 30001f80: e28d201c add r2, sp, #28 ; 0x1c 30001f84: e0823004 add r3, r2, r4 for (n=maxwidth ; n > count; n-- ) 30001f88: e157000b cmp r7, fp 30001f8c: e1a0600b mov r6, fp count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 30001f90: e5435014 strb r5, [r3, #-20] for (n=maxwidth ; n > count; n-- ) 30001f94: 2a000006 bcs 30001fb4 30001f98: e20940ff and r4, r9, #255 ; 0xff 30001f9c: e2466001 sub r6, r6, #1 ; 0x1 BSP_output_char(lead); 30001fa0: e1a00004 mov r0, r4 30001fa4: e1a0e00f mov lr, pc 30001fa8: e59af000 ldr pc, [sl] toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 30001fac: e1570006 cmp r7, r6 30001fb0: 3afffff9 bcc 30001f9c BSP_output_char(lead); for (n = 0; n < count; n++) { 30001fb4: e3570000 cmp r7, #0 ; 0x0 30001fb8: 0affffcc beq 30001ef0 30001fbc: e28d301c add r3, sp, #28 ; 0x1c 30001fc0: e3a04000 mov r4, #0 ; 0x0 30001fc4: e0835007 add r5, r3, r7 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 30001fc8: e0643005 rsb r3, r4, r5 30001fcc: e5532015 ldrb r2, [r3, #-21] 30001fd0: e59f3160 ldr r3, [pc, #352] ; 30002138 toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 30001fd4: e2844001 add r4, r4, #1 ; 0x1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 30001fd8: e7d30002 ldrb r0, [r3, r2] 30001fdc: e1a0e00f mov lr, pc 30001fe0: e59af000 ldr pc, [sl] toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 30001fe4: e1570004 cmp r7, r4 30001fe8: 8afffff6 bhi 30001fc8 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 30001fec: e5f80001 ldrb r0, [r8, #1]! 30001ff0: e3500000 cmp r0, #0 ; 0x0 30001ff4: 1affffc0 bne 30001efc base, sign, width, lead); } else { BSP_output_char(*fmt); } } } 30001ff8: e28dd01c add sp, sp, #28 ; 0x1c 30001ffc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 30002000: e5975000 ldr r5, [r7] if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 30002004: e3a03001 mov r3, #1 ; 0x1 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 30002008: e2877004 add r7, r7, #4 ; 0x4 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 3000200c: e0133fa5 ands r3, r3, r5, lsr #31 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 30002010: e3a0600a mov r6, #10 ; 0xa BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 30002014: e58d7004 str r7, [sp, #4] { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 30002018: 0affffc0 beq 30001f20 BSP_output_char('-'); 3000201c: e3a0002d mov r0, #45 ; 0x2d <== NOT EXECUTED 30002020: e1a0e00f mov lr, pc <== NOT EXECUTED 30002024: e59af000 ldr pc, [sl] <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 30002028: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 3000202c: e2655000 rsb r5, r5, #0 ; 0x0 <== NOT EXECUTED if (maxwidth) maxwidth--; 30002030: 124bb001 subne fp, fp, #1 ; 0x1 <== NOT EXECUTED 30002034: eaffffb9 b 30001f20 <== NOT EXECUTED case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 30002038: e5979000 ldr r9, [r7] 3000203c: e2877004 add r7, r7, #4 ; 0x4 30002040: e58d7004 str r7, [sp, #4] /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 30002044: e5d93000 ldrb r3, [r9] 30002048: e3530000 cmp r3, #0 ; 0x0 3000204c: 01a06003 moveq r6, r3 30002050: 0a000004 beq 30002068 30002054: e3a06000 mov r6, #0 ; 0x0 30002058: e2866001 add r6, r6, #1 ; 0x1 3000205c: e7d93006 ldrb r3, [r9, r6] 30002060: e3530000 cmp r3, #0 ; 0x0 30002064: 1afffffb bne 30002058 ; /* leading spaces */ if ( !minus ) 30002068: e59d2000 ldr r2, [sp] 3000206c: e3520000 cmp r2, #0 ; 0x0 30002070: 0a000022 beq 30002100 for ( i=len ; i 30002084: e5d90000 ldrb r0, [r9] 30002088: e3500000 cmp r0, #0 ; 0x0 3000208c: 0a000005 beq 300020a8 30002090: e1a04009 mov r4, r9 BSP_output_char(*str); 30002094: e1a0e00f mov lr, pc 30002098: e59af000 ldr pc, [sl] if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 300020a8: e59d3000 ldr r3, [sp] 300020ac: e3530000 cmp r3, #0 ; 0x0 300020b0: 0affff8e beq 30001ef0 for ( i=len ; i 300020bc: e1a04006 mov r4, r6 300020c0: e2844001 add r4, r4, #1 ; 0x1 BSP_output_char(' '); 300020c4: e3a00020 mov r0, #32 ; 0x20 300020c8: e1a0e00f mov lr, pc 300020cc: e59af000 ldr pc, [sl] for ( i=0 ; i 300020d8: eaffff84 b 30001ef0 BSP_output_char(' '); } break; case 'c': BSP_output_char(va_arg(ap, int)); 300020dc: e5d70000 ldrb r0, [r7] <== NOT EXECUTED 300020e0: e2877004 add r7, r7, #4 ; 0x4 <== NOT EXECUTED 300020e4: e58d7004 str r7, [sp, #4] <== NOT EXECUTED 300020e8: e1a0e00f mov lr, pc <== NOT EXECUTED 300020ec: e59af000 ldr pc, [sl] <== NOT EXECUTED 300020f0: eaffff7e b 30001ef0 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 300020f4: e3a03000 mov r3, #0 ; 0x0 300020f8: e3a0600a mov r6, #10 ; 0xa 300020fc: eaffff82 b 30001f0c for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 30002108: e1a05006 mov r5, r6 <== NOT EXECUTED 3000210c: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED BSP_output_char(' '); 30002110: e3a00020 mov r0, #32 ; 0x20 <== NOT EXECUTED 30002114: e1a0e00f mov lr, pc <== NOT EXECUTED 30002118: e59af000 ldr pc, [sl] <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== NOT EXECUTED 30002124: eaffffd4 b 3000207c <== NOT EXECUTED break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 30002128: e3a03000 mov r3, #0 ; 0x0 3000212c: e3a06010 mov r6, #16 ; 0x10 30002130: eaffff75 b 30001f0c 30002134: 30016224 .word 0x30016224 30002138: 30015b38 .word 0x30015b38 300149c0 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 300149c0: e59f30c8 ldr r3, [pc, #200] ; 30014a90 ssize_t write( int fd, const void *buffer, size_t count ) { 300149c4: e1a0c000 mov ip, r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 300149c8: e5930000 ldr r0, [r3] ssize_t write( int fd, const void *buffer, size_t count ) { 300149cc: e92d4070 push {r4, r5, r6, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 300149d0: e15c0000 cmp ip, r0 ssize_t write( int fd, const void *buffer, size_t count ) { 300149d4: e1a06001 mov r6, r1 300149d8: e1a05002 mov r5, r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 300149dc: 2a00001c bcs 30014a54 iop = rtems_libio_iop( fd ); 300149e0: e1a0320c lsl r3, ip, #4 300149e4: e59f00a8 ldr r0, [pc, #168] ; 30014a94 300149e8: e043310c sub r3, r3, ip, lsl #2 300149ec: e083300c add r3, r3, ip 300149f0: e590c000 ldr ip, [r0] 300149f4: e1a03103 lsl r3, r3, #2 300149f8: e08c4003 add r4, ip, r3 rtems_libio_check_is_open( iop ); 300149fc: e594300c ldr r3, [r4, #12] 30014a00: e3130c01 tst r3, #256 ; 0x100 30014a04: 0a000012 beq 30014a54 rtems_libio_check_buffer( buffer ); 30014a08: e3510000 cmp r1, #0 ; 0x0 30014a0c: 0a000015 beq 30014a68 rtems_libio_check_count( count ); 30014a10: e3520000 cmp r2, #0 ; 0x0 30014a14: 01a00002 moveq r0, r2 30014a18: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 30014a1c: e3130004 tst r3, #4 ; 0x4 30014a20: 0a000010 beq 30014a68 /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 30014a24: e5943030 ldr r3, [r4, #48] 30014a28: e593300c ldr r3, [r3, #12] 30014a2c: e3530000 cmp r3, #0 ; 0x0 30014a30: 0a000011 beq 30014a7c rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 30014a34: e1a00004 mov r0, r4 30014a38: e1a0e00f mov lr, pc 30014a3c: e12fff13 bx r3 if ( rc > 0 ) 30014a40: e3500000 cmp r0, #0 ; 0x0 iop->offset += rc; 30014a44: c5943008 ldrgt r3, [r4, #8] 30014a48: c0833000 addgt r3, r3, r0 30014a4c: c5843008 strgt r3, [r4, #8] return rc; } 30014a50: e8bd8070 pop {r4, r5, r6, pc} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 30014a54: ebffdd23 bl 3000bee8 <__errno> <== NOT EXECUTED 30014a58: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 30014a5c: e5803000 str r3, [r0] <== NOT EXECUTED 30014a60: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30014a64: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 30014a68: ebffdd1e bl 3000bee8 <__errno> <== NOT EXECUTED 30014a6c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 30014a70: e5803000 str r3, [r0] <== NOT EXECUTED 30014a74: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30014a78: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 30014a7c: ebffdd19 bl 3000bee8 <__errno> <== NOT EXECUTED 30014a80: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30014a84: e5803000 str r3, [r0] <== NOT EXECUTED 30014a88: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 30014a8c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30014a90: 30016058 .word 0x30016058 30014a94: 30016dcc .word 0x30016dcc