00008150 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 8150: e5903000 ldr r3, [r0] 8154: 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; 8158: e590100c ldr r1, [r0, #12] switch( node->type ) { 815c: e2422001 sub r2, r2, #1 ; 0x1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 8160: e591302c ldr r3, [r1, #44] switch( node->type ) { 8164: e3520005 cmp r2, #5 ; 0x5 8168: 979ff102 ldrls pc, [pc, r2, lsl #2] 816c: ea000007 b 8190 <== NOT EXECUTED 8170: 000081a8 .word 0x000081a8 <== NOT EXECUTED 8174: 000081b8 .word 0x000081b8 <== NOT EXECUTED 8178: 00008198 .word 0x00008198 <== NOT EXECUTED 817c: 8198 .short 0x8198 <== NOT EXECUTED 817e: 0000 .short 0x0000 <== NOT EXECUTED 8180: 00008188 .word 0x00008188 <== NOT EXECUTED 8184: 00008188 .word 0x00008188 <== NOT EXECUTED break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 8188: e5933004 ldr r3, [r3, #4] 818c: e5803004 str r3, [r0, #4] break; } return 0; } 8190: e3a00000 mov r0, #0 ; 0x0 8194: 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; 8198: e59f3028 ldr r3, [pc, #40] ; 81c8 819c: e5803004 str r3, [r0, #4] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 81a0: e3a00000 mov r0, #0 ; 0x0 81a4: 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; 81a8: e5933008 ldr r3, [r3, #8] 81ac: e5803004 str r3, [r0, #4] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 81b0: e3a00000 mov r0, #0 ; 0x0 81b4: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 81b8: e59f300c ldr r3, [pc, #12] ; 81cc 81bc: e5803004 str r3, [r0, #4] loc->handlers = fs_info->memfile_handlers; break; } return 0; } 81c0: e3a00000 mov r0, #0 ; 0x0 81c4: e12fff1e bx lr 81c8: 00015e68 .word 0x00015e68 81cc: 00015e30 .word 0x00015e30 0001cb5c : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 1cb5c: e92d40f0 push {r4, r5, r6, r7, lr} 1cb60: e1a01801 lsl r1, r1, #16 1cb64: e1a02802 lsl r2, r2, #16 1cb68: 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; 1cb6c: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 1cb70: e1a06821 lsr r6, r1, #16 1cb74: 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(); 1cb78: eb000704 bl 1e790 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 1cb7c: e1d433bc ldrh r3, [r4, #60] 1cb80: e1530000 cmp r3, r0 1cb84: 13500000 cmpne r0, #0 ; 0x0 1cb88: 03a05000 moveq r5, #0 ; 0x0 1cb8c: 13a05001 movne r5, #1 ; 0x1 1cb90: 1a000009 bne 1cbbc rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 1cb94: e1c463bc strh r6, [r4, #60] jnode->st_gid = group; 1cb98: e1c473be strh r7, [r4, #62] IMFS_update_ctime( jnode ); 1cb9c: e1a0000d mov r0, sp 1cba0: e1a01005 mov r1, r5 1cba4: ebff9d13 bl 3ff8 1cba8: e59d3000 ldr r3, [sp] 1cbac: e5843048 str r3, [r4, #72] 1cbb0: e1a00005 mov r0, r5 return 0; } 1cbb4: e28dd008 add sp, sp, #8 ; 0x8 1cbb8: 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 ); 1cbbc: eb0043db bl 2db30 <__errno> <== NOT EXECUTED 1cbc0: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 1cbc4: e5803000 str r3, [r0] <== NOT EXECUTED 1cbc8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1cbcc: eafffff8 b 1cbb4 <== NOT EXECUTED 0000b2f8 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b2f8: 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 ) b2fc: e250a000 subs sl, r0, #0 ; 0x0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b300: e24dd008 sub sp, sp, #8 ; 0x8 b304: e1a07001 mov r7, r1 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); b308: e3a00001 mov r0, #1 ; 0x1 b30c: 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 ) b310: 01a0800a moveq r8, sl parent = parent_loc->node_access; b314: 159a8000 ldrne r8, [sl] IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b318: e1a05002 mov r5, r2 b31c: e1a06003 mov r6, r3 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); b320: ebfff700 bl 8f28 if ( !node ) b324: e2504000 subs r4, r0, #0 ; 0x0 b328: 0a000035 beq b404 /* * Fill in the basic information */ node->st_nlink = 1; b32c: e3a02001 mov r2, #1 ; 0x1 node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); b330: e1a01005 mov r1, r5 /* * Fill in the basic information */ node->st_nlink = 1; b334: e1c423b4 strh r2, [r4, #52] node->type = type; b338: e584704c str r7, [r4, #76] strncpy( node->name, name, IMFS_NAME_MAX ); b33c: e3a02020 mov r2, #32 ; 0x20 b340: e284000c add r0, r4, #12 ; 0xc b344: eb00086a bl d4f4 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; b348: e59f2124 ldr r2, [pc, #292] ; b474 b34c: e5921000 ldr r1, [r2] b350: e5913024 ldr r3, [r1, #36] b354: e1e03003 mvn r3, r3 b358: e0063003 and r3, r6, r3 b35c: e5843030 str r3, [r4, #48] #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); b360: ebfff79b bl 91d4 b364: e1c403bc strh r0, [r4, #60] node->st_gid = getegid(); b368: ebfff794 bl 91c0 /* * Now set all the times. */ gettimeofday( &tv, 0 ); b36c: 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(); b370: e1c403be strh r0, [r4, #62] /* * Now set all the times. */ gettimeofday( &tv, 0 ); b374: e1a0000d mov r0, sp b378: ebfff79a bl 91e8 node->stat_atime = (time_t) tv.tv_sec; b37c: e59d3000 ldr r3, [sp] /* * Set the type specific information */ switch (type) { b380: e2472001 sub r2, r7, #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; b384: e5843048 str r3, [r4, #72] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; b388: e5843040 str r3, [r4, #64] node->stat_mtime = (time_t) tv.tv_sec; b38c: e5843044 str r3, [r4, #68] /* * Set the type specific information */ switch (type) { b390: e3520005 cmp r2, #5 ; 0x5 b394: 979ff102 ldrls pc, [pc, r2, lsl #2] b398: ea000020 b b420 <== NOT EXECUTED b39c: 0000b434 .word 0x0000b434 <== NOT EXECUTED b3a0: 0000b450 .word 0x0000b450 <== NOT EXECUTED b3a4: 0000b464 .word 0x0000b464 <== NOT EXECUTED b3a8: 0000b410 .word 0x0000b410 <== NOT EXECUTED b3ac: 0000b3c0 .word 0x0000b3c0 <== NOT EXECUTED b3b0: 0000b3b4 .word 0x0000b3b4 <== 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; b3b4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED node->info.linearfile.direct = 0; b3b8: 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; b3bc: e5843050 str r3, [r4, #80] <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; b3c0: e3a03000 mov r3, #0 ; 0x0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; b3c4: 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; b3c8: e5843050 str r3, [r4, #80] node->info.file.indirect = 0; b3cc: e5843054 str r3, [r4, #84] node->info.file.doubly_indirect = 0; b3d0: e5843058 str r3, [r4, #88] /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { b3d4: e3580000 cmp r8, #0 ; 0x0 b3d8: 0a000009 beq b404 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); b3dc: e1a01004 mov r1, r4 b3e0: e2880050 add r0, r8, #80 ; 0x50 b3e4: ebffe7b2 bl 52b4 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; b3e8: e59a300c ldr r3, [sl, #12] b3ec: e593102c ldr r1, [r3, #44] node->st_ino = ++fs_info->ino_count; b3f0: e5912000 ldr r2, [r1] b3f4: e2822001 add r2, r2, #1 ; 0x1 b3f8: e5812000 str r2, [r1] * 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; b3fc: e5848008 str r8, [r4, #8] fs_info = parent_loc->mt_entry->fs_info; node->st_ino = ++fs_info->ino_count; b400: e5842038 str r2, [r4, #56] } return node; } b404: e1a00004 mov r0, r4 b408: e28dd008 add sp, sp, #8 ; 0x8 b40c: 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; b410: e59d2024 ldr r2, [sp, #36] b414: e5923000 ldr r3, [r2] b418: e5843050 str r3, [r4, #80] b41c: eaffffec b b3d4 node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; default: assert(0); b420: e59f0050 ldr r0, [pc, #80] ; b478 <== NOT EXECUTED b424: e3a01074 mov r1, #116 ; 0x74 <== NOT EXECUTED b428: e59f204c ldr r2, [pc, #76] ; b47c <== NOT EXECUTED b42c: e59f304c ldr r3, [pc, #76] ; b480 <== NOT EXECUTED b430: ebfff65f bl 8db4 <__assert_func> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b434: e2843054 add r3, r4, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); b438: 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; b43c: e3a02000 mov r2, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b440: e5843050 str r3, [r4, #80] the_chain->permanent_null = NULL; b444: e5842054 str r2, [r4, #84] the_chain->last = _Chain_Head(the_chain); b448: e5841058 str r1, [r4, #88] b44c: eaffffe0 b b3d4 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; b450: e59d1024 ldr r1, [sp, #36] b454: e891000c ldm r1, {r2, r3} b458: 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; b45c: e5842050 str r2, [r4, #80] b460: eaffffdb b b3d4 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; b464: e59d1024 ldr r1, [sp, #36] b468: e5913000 ldr r3, [r1] b46c: e5843050 str r3, [r4, #80] b470: eaffffd7 b b3d4 b474: 00015668 .word 0x00015668 b478: 00016970 .word 0x00016970 b47c: 0001616c .word 0x0001616c b480: 00016680 .word 0x00016680 00002b84 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2b84: e3500000 cmp r0, #0 ; 0x0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2b88: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2b8c: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2b90: 0a000021 beq 2c1c assert( level >= 0 ); 2b94: e3510000 cmp r1, #0 ; 0x0 2b98: ba000029 blt 2c44 assert( the_directory->type == IMFS_DIRECTORY ); 2b9c: e590304c ldr r3, [r0, #76] 2ba0: e3530001 cmp r3, #1 ; 0x1 2ba4: 1a000021 bne 2c30 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2ba8: e5906050 ldr r6, [r0, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2bac: e2808054 add r8, r0, #84 ; 0x54 !rtems_chain_is_tail( the_chain, the_node ); 2bb0: e1560008 cmp r6, r8 2bb4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} 2bb8: e59f7098 ldr r7, [pc, #152] ; 2c58 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 ); 2bbc: 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; 2bc0: e3a04000 mov r4, #0 ; 0x0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2bc4: 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++ ) 2bc8: e2844001 add r4, r4, #1 ; 0x1 fprintf(stdout, "...." ); 2bcc: e5923008 ldr r3, [r2, #8] 2bd0: e59f0084 ldr r0, [pc, #132] ; 2c5c 2bd4: e3a01001 mov r1, #1 ; 0x1 2bd8: e3a02004 mov r2, #4 ; 0x4 2bdc: eb0038d8 bl 10f44 !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++ ) 2be0: e1550004 cmp r5, r4 2be4: aafffff6 bge 2bc4 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2be8: e1a00006 mov r0, r6 2bec: ebffff87 bl 2a10 if ( the_jnode->type == IMFS_DIRECTORY ) 2bf0: e596304c ldr r3, [r6, #76] 2bf4: e3530001 cmp r3, #1 ; 0x1 2bf8: 0a000003 beq 2c0c 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 ) { 2bfc: 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 ); 2c00: e1560008 cmp r6, r8 2c04: 1affffed bne 2bc0 2c08: 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 ); 2c0c: e1a00006 mov r0, r6 2c10: e1a0100a mov r1, sl 2c14: ebffffda bl 2b84 2c18: eafffff7 b 2bfc rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2c1c: e59f003c ldr r0, [pc, #60] ; 2c60 <== NOT EXECUTED 2c20: e3a0107f mov r1, #127 ; 0x7f <== NOT EXECUTED 2c24: e59f2038 ldr r2, [pc, #56] ; 2c64 <== NOT EXECUTED 2c28: e59f3038 ldr r3, [pc, #56] ; 2c68 <== NOT EXECUTED 2c2c: eb0001bc bl 3324 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 2c30: e59f0028 ldr r0, [pc, #40] ; 2c60 <== NOT EXECUTED 2c34: e3a01083 mov r1, #131 ; 0x83 <== NOT EXECUTED 2c38: e59f2024 ldr r2, [pc, #36] ; 2c64 <== NOT EXECUTED 2c3c: e59f3028 ldr r3, [pc, #40] ; 2c6c <== NOT EXECUTED 2c40: eb0001b7 bl 3324 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 2c44: e59f0014 ldr r0, [pc, #20] ; 2c60 <== NOT EXECUTED 2c48: e3a01081 mov r1, #129 ; 0x81 <== NOT EXECUTED 2c4c: e59f2010 ldr r2, [pc, #16] ; 2c64 <== NOT EXECUTED 2c50: e59f3018 ldr r3, [pc, #24] ; 2c70 <== NOT EXECUTED 2c54: eb0001b2 bl 3324 <__assert_func> <== NOT EXECUTED 2c58: 0001badc .word 0x0001badc 2c5c: 0001d6ac .word 0x0001d6ac 2c60: 0001d5bc .word 0x0001d5bc 2c64: 0001c014 .word 0x0001c014 2c68: 0001d668 .word 0x0001d668 2c6c: 0001d684 .word 0x0001d684 2c70: 0001d678 .word 0x0001d678 00008358 : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8358: 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; 835c: e5925000 ldr r5, [r2] int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8360: e24dd038 sub sp, sp, #56 ; 0x38 8364: e1a06002 mov r6, r2 8368: e1a08000 mov r8, r0 836c: e1a0b001 mov fp, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8370: e3a07000 mov r7, #0 ; 0x0 8374: e28da003 add sl, sp, #3 ; 0x3 8378: 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 ); 837c: e0880007 add r0, r8, r7 8380: e1a0100a mov r1, sl 8384: e1a02009 mov r2, r9 8388: eb000180 bl 8990 i += len; if ( !pathloc->node_access ) 838c: e596e000 ldr lr, [r6] 8390: e35e0000 cmp lr, #0 ; 0x0 * 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 ); 8394: e1a04000 mov r4, r0 i += len; 8398: e59d3034 ldr r3, [sp, #52] if ( !pathloc->node_access ) 839c: 0a00004d beq 84d8 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 83a0: 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; 83a4: 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 ) 83a8: 1a00000f bne 83ec * 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 ) { 83ac: e59e304c ldr r3, [lr, #76] 83b0: e3530001 cmp r3, #1 ; 0x1 83b4: 0a000063 beq 8548 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 83b8: e1a00006 mov r0, r6 83bc: ebffff63 bl 8150 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 83c0: 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 ); 83c4: e1a04000 mov r4, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 83c8: e1a00006 mov r0, r6 83cc: ebffff7f bl 81d0 83d0: e3500000 cmp r0, #0 ; 0x0 83d4: 1a000036 bne 84b4 rtems_set_errno_and_return_minus_one( EACCES ); 83d8: eb000ee8 bl bf80 <__errno> 83dc: e3a0300d mov r3, #13 ; 0xd 83e0: e5803000 str r3, [r0] 83e4: e3e04000 mvn r4, #0 ; 0x0 83e8: ea000031 b 84b4 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 83ec: e595104c ldr r1, [r5, #76] 83f0: e3510001 cmp r1, #1 ; 0x1 83f4: 0a000031 beq 84c0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 83f8: 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; 83fc: e1a0500e mov r5, lr switch( type ) { 8400: 0a000006 beq 8420 8404: e3540004 cmp r4, #4 ; 0x4 8408: 0a000025 beq 84a4 840c: e3540002 cmp r4, #2 ; 0x2 8410: 0a000013 beq 8464 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8414: e3540004 cmp r4, #4 ; 0x4 8418: 1affffd7 bne 837c 841c: eaffffe2 b 83ac <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 8420: e59e304c ldr r3, [lr, #76] 8424: e3530003 cmp r3, #3 ; 0x3 8428: 0a00002f beq 84ec node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 842c: e3530004 cmp r3, #4 ; 0x4 8430: 0a00004e beq 8570 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8434: e3530001 cmp r3, #1 ; 0x1 8438: 1a000047 bne 855c /* * 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 ) { 843c: e595e05c ldr lr, [r5, #92] 8440: e35e0000 cmp lr, #0 ; 0x0 8444: 1a000042 bne 8554 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8448: e1a00005 mov r0, r5 844c: e1a0100a mov r1, sl 8450: eb00011f bl 88d4 if ( !node ) 8454: e2505000 subs r5, r0, #0 ; 0x0 8458: 0a00001e beq 84d8 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 845c: e5865000 str r5, [r6] 8460: eaffffc5 b 837c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8464: e59f212c ldr r2, [pc, #300] ; 8598 8468: e5923000 ldr r3, [r2] 846c: e5932014 ldr r2, [r3, #20] 8470: e152000e cmp r2, lr 8474: 0affffc0 beq 837c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 8478: e596200c ldr r2, [r6, #12] 847c: e5923018 ldr r3, [r2, #24] 8480: e153000e cmp r3, lr 8484: 0a000020 beq 850c *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 8488: e59e5008 ldr r5, [lr, #8] 848c: e3550000 cmp r5, #0 ; 0x0 8490: 1afffff1 bne 845c rtems_set_errno_and_return_minus_one( ENOENT ); 8494: eb000eb9 bl bf80 <__errno> 8498: e5804000 str r4, [r0] 849c: e3e04000 mvn r4, #0 ; 0x0 84a0: ea000003 b 84b4 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 84a4: eb000eb5 bl bf80 <__errno> 84a8: e3a0305b mov r3, #91 ; 0x5b 84ac: e5803000 str r3, [r0] 84b0: e3e04000 mvn r4, #0 ; 0x0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 84b4: e1a00004 mov r0, r4 84b8: e28dd038 add sp, sp, #56 ; 0x38 84bc: 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 ) ) 84c0: e1a00006 mov r0, r6 84c4: ebffff41 bl 81d0 84c8: e3500000 cmp r0, #0 ; 0x0 84cc: 0affffc1 beq 83d8 84d0: e596e000 ldr lr, [r6] 84d4: eaffffc7 b 83f8 * 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 ); 84d8: eb000ea8 bl bf80 <__errno> 84dc: e3a03002 mov r3, #2 ; 0x2 84e0: e5803000 str r3, [r0] 84e4: e3e04000 mvn r4, #0 ; 0x0 84e8: eafffff1 b 84b4 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 84ec: e1a00006 mov r0, r6 84f0: e3a01000 mov r1, #0 ; 0x0 84f4: ebffff49 bl 8220 node = pathloc->node_access; 84f8: e5965000 ldr r5, [r6] if ( !node ) 84fc: e3550000 cmp r5, #0 ; 0x0 8500: 0a000015 beq 855c } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 8504: e595304c ldr r3, [r5, #76] 8508: eaffffc9 b 8434 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 850c: 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; 8510: e89e000f ldm lr, {r0, r1, r2, r3} *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 8514: 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; 8518: e28dc024 add ip, sp, #36 ; 0x24 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 851c: 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; 8520: e88c000f stm ip, {r0, r1, r2, r3} *pathloc = newloc; 8524: e886000f stm r6, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 8528: e5923000 ldr r3, [r2] 852c: e088000e add r0, r8, lr 8530: e1a0100b mov r1, fp 8534: e1a02006 mov r2, r6 8538: e1a0e00f mov lr, pc 853c: e12fff13 bx r3 8540: e1a04000 mov r4, r0 8544: eaffffda b 84b4 * * 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 ) { 8548: e59ee05c ldr lr, [lr, #92] 854c: e35e0000 cmp lr, #0 ; 0x0 8550: 0affff98 beq 83b8 newloc = node->info.directory.mt_fs->mt_fs_root; 8554: e28ee018 add lr, lr, #24 ; 0x18 8558: eaffffec b 8510 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 855c: eb000e87 bl bf80 <__errno> 8560: e3a03014 mov r3, #20 ; 0x14 8564: e5803000 str r3, [r0] 8568: e3e04000 mvn r4, #0 ; 0x0 856c: eaffffd0 b 84b4 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 8570: e1a00006 mov r0, r6 8574: e3a01000 mov r1, #0 ; 0x0 8578: ebffff40 bl 8280 node = pathloc->node_access; if ( result == -1 ) 857c: 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 ); 8580: e1a04000 mov r4, r0 node = pathloc->node_access; 8584: e5960000 ldr r0, [r6] if ( result == -1 ) 8588: 0affffc9 beq 84b4 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 858c: e1a05000 mov r5, r0 8590: e595304c ldr r3, [r5, #76] 8594: eaffffa6 b 8434 8598: 00015668 .word 0x00015668 0000865c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 865c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8660: e24dd03c sub sp, sp, #60 ; 0x3c /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8664: 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 */ ) { 8668: e58d2000 str r2, [sp] 866c: e1a07001 mov r7, r1 8670: e1a0a000 mov sl, r0 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8674: e3a08000 mov r8, #0 ; 0x0 8678: e28d9007 add r9, sp, #7 ; 0x7 867c: 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 ); 8680: e08a0008 add r0, sl, r8 8684: e1a01009 mov r1, r9 8688: e1a0200b mov r2, fp 868c: eb0000bf bl 8990 i += len; if ( !pathloc->node_access ) 8690: e597c000 ldr ip, [r7] 8694: e35c0000 cmp ip, #0 ; 0x0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 8698: e1a04000 mov r4, r0 i += len; 869c: e59d6038 ldr r6, [sp, #56] if ( !pathloc->node_access ) 86a0: 0a00003a beq 8790 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 86a4: e3500000 cmp r0, #0 ; 0x0 86a8: 1a000006 bne 86c8 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 86ac: eb000e33 bl bf80 <__errno> 86b0: e3a03011 mov r3, #17 ; 0x11 86b4: e5803000 str r3, [r0] 86b8: e3e04000 mvn r4, #0 ; 0x0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 86bc: e1a00004 mov r0, r4 86c0: e28dd03c add sp, sp, #60 ; 0x3c 86c4: 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 ) 86c8: e595104c ldr r1, [r5, #76] 86cc: e3510001 cmp r1, #1 ; 0x1 86d0: 0a000033 beq 87a4 */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); i += len; 86d4: 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; 86d8: e1a0500c mov r5, ip switch( type ) { 86dc: e3540004 cmp r4, #4 ; 0x4 86e0: 979ff104 ldrls pc, [pc, r4, lsl #2] 86e4: eaffffe5 b 8680 <== NOT EXECUTED 86e8: 000086ac .word 0x000086ac <== NOT EXECUTED 86ec: 00008680 .word 0x00008680 <== NOT EXECUTED 86f0: 00008760 .word 0x00008760 <== NOT EXECUTED 86f4: 00008710 .word 0x00008710 <== NOT EXECUTED 86f8: 000086fc .word 0x000086fc <== 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 ); 86fc: eb000e1f bl bf80 <__errno> 8700: e3a0305b mov r3, #91 ; 0x5b 8704: e5803000 str r3, [r0] 8708: e3e04000 mvn r4, #0 ; 0x0 870c: eaffffea b 86bc pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 8710: e59c304c ldr r3, [ip, #76] 8714: e3530003 cmp r3, #3 ; 0x3 8718: 0a000062 beq 88a8 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 871c: e3530004 cmp r3, #4 ; 0x4 8720: 0a000060 beq 88a8 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 8724: e3550000 cmp r5, #0 ; 0x0 8728: 0a00004a beq 8858 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 872c: e595304c ldr r3, [r5, #76] 8730: e3530001 cmp r3, #1 ; 0x1 8734: 1a000047 bne 8858 /* * 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 ) { 8738: e595e05c ldr lr, [r5, #92] 873c: e35e0000 cmp lr, #0 ; 0x0 8740: 1a000049 bne 886c /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8744: e1a00005 mov r0, r5 8748: e1a01009 mov r1, r9 874c: eb000060 bl 88d4 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 8750: e2505000 subs r5, r0, #0 ; 0x0 8754: 0a000018 beq 87bc done = true; else pathloc->node_access = node; 8758: e5875000 str r5, [r7] 875c: eaffffc7 b 8680 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8760: e59f2168 ldr r2, [pc, #360] ; 88d0 8764: e5923000 ldr r3, [r2] 8768: e5932014 ldr r2, [r3, #20] 876c: e152000c cmp r2, ip 8770: 0affffc2 beq 8680 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8774: e597e00c ldr lr, [r7, #12] 8778: e59e3018 ldr r3, [lr, #24] 877c: e153000c cmp r3, ip 8780: 0a000050 beq 88c8 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 8784: e59c5008 ldr r5, [ip, #8] 8788: e3550000 cmp r5, #0 ; 0x0 878c: 1afffff1 bne 8758 * 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 ); 8790: eb000dfa bl bf80 <__errno> 8794: e3a03002 mov r3, #2 ; 0x2 8798: e5803000 str r3, [r0] 879c: e3e04000 mvn r4, #0 ; 0x0 87a0: eaffffc5 b 86bc * 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 ) ) 87a4: e1a00007 mov r0, r7 87a8: ebfffe88 bl 81d0 87ac: e3500000 cmp r0, #0 ; 0x0 87b0: 0a000023 beq 8844 87b4: e597c000 ldr ip, [r7] 87b8: eaffffc5 b 86d4 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 87bc: e59d3038 ldr r3, [sp, #56] 87c0: e59d2000 ldr r2, [sp] 87c4: e0633008 rsb r3, r3, r8 87c8: e08a3003 add r3, sl, r3 87cc: e5823000 str r3, [r2] /* * 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++) { 87d0: e7da2008 ldrb r2, [sl, r8] 87d4: e3520000 cmp r2, #0 ; 0x0 87d8: e08a0008 add r0, sl, r8 87dc: 1a000004 bne 87f4 87e0: ea00000b b 8814 87e4: e5d02001 ldrb r2, [r0, #1] 87e8: e3520000 cmp r2, #0 ; 0x0 if ( !IMFS_is_separator( path[ i ] ) ) 87ec: e2800001 add r0, r0, #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++) { 87f0: 0a000007 beq 8814 if ( !IMFS_is_separator( path[ i ] ) ) 87f4: e352002f cmp r2, #47 ; 0x2f 87f8: 1352005c cmpne r2, #92 ; 0x5c 87fc: 0afffff8 beq 87e4 rtems_set_errno_and_return_minus_one( ENOENT ); 8800: eb000dde bl bf80 <__errno> 8804: e3a03002 mov r3, #2 ; 0x2 8808: e5803000 str r3, [r0] 880c: e3e04000 mvn r4, #0 ; 0x0 8810: eaffffa9 b 86bc /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8814: e1a00007 mov r0, r7 8818: ebfffe4c bl 8150 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 881c: e5973000 ldr r3, [r7] 8820: e593204c ldr r2, [r3, #76] 8824: e3520001 cmp r2, #1 ; 0x1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8828: e1a04000 mov r4, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 882c: 1a000009 bne 8858 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 8830: e1a00007 mov r0, r7 8834: e3a01003 mov r1, #3 ; 0x3 8838: ebfffe64 bl 81d0 883c: e3500000 cmp r0, #0 ; 0x0 8840: 1affff9d bne 86bc rtems_set_errno_and_return_minus_one( EACCES ); 8844: eb000dcd bl bf80 <__errno> 8848: e3a0300d mov r3, #13 ; 0xd 884c: e5803000 str r3, [r0] 8850: e3e04000 mvn r4, #0 ; 0x0 8854: eaffff98 b 86bc /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8858: eb000dc8 bl bf80 <__errno> 885c: e3a03014 mov r3, #20 ; 0x14 8860: e5803000 str r3, [r0] 8864: e3e04000 mvn r4, #0 ; 0x0 8868: eaffff93 b 86bc * 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; 886c: e28ee018 add lr, lr, #24 ; 0x18 8870: e89e000f ldm lr, {r0, r1, r2, r3} *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8874: 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; 8878: e28dc028 add ip, sp, #40 ; 0x28 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 887c: 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; 8880: e88c000f stm ip, {r0, r1, r2, r3} *pathloc = newloc; 8884: e887000f stm r7, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8888: e5923004 ldr r3, [r2, #4] 888c: e08a000e add r0, sl, lr 8890: e1a01007 mov r1, r7 8894: e59d2000 ldr r2, [sp] 8898: e1a0e00f mov lr, pc 889c: e12fff13 bx r3 88a0: e1a04000 mov r4, r0 88a4: eaffff84 b 86bc if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 88a8: e1a00007 mov r0, r7 88ac: e3a01000 mov r1, #0 ; 0x0 88b0: ebffff39 bl 859c if ( result == -1 ) 88b4: e3700001 cmn r0, #1 ; 0x1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 88b8: e1a04000 mov r4, r0 if ( result == -1 ) 88bc: 0affff7e beq 86bc 88c0: e5975000 ldr r5, [r7] 88c4: eaffff96 b 8724 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 88c8: e28ee008 add lr, lr, #8 ; 0x8 88cc: eaffffe7 b 8870 88d0: 00015668 .word 0x00015668 00008220 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 8220: e5902000 ldr r2, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8224: e592304c ldr r3, [r2, #76] 8228: e3530003 cmp r3, #3 ; 0x3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 822c: e92d4030 push {r4, r5, lr} 8230: e1a04000 mov r4, r0 8234: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8238: 1a00000d bne 8274 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 823c: e5923050 ldr r3, [r2, #80] 8240: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 8244: ebffffc1 bl 8150 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8248: e1a00004 mov r0, r4 824c: e1a01005 mov r1, r5 8250: ebffffde bl 81d0 8254: e3500000 cmp r0, #0 ; 0x0 8258: 13a00000 movne r0, #0 ; 0x0 825c: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 8260: eb000f46 bl bf80 <__errno> <== NOT EXECUTED 8264: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 8268: e5803000 str r3, [r0] <== NOT EXECUTED 826c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED return result; } 8270: 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); 8274: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 8278: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 827c: ebfff312 bl 4ecc <== NOT EXECUTED 00008280 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8280: e92d4070 push {r4, r5, r6, lr} 8284: e1a04000 mov r4, r0 IMFS_jnode_t *jnode = node->node_access; 8288: e5900000 ldr r0, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 828c: e590304c ldr r3, [r0, #76] 8290: e3530004 cmp r3, #4 ; 0x4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8294: e1a06001 mov r6, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8298: 1a000027 bne 833c rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 829c: e5903008 ldr r3, [r0, #8] 82a0: e3530000 cmp r3, #0 ; 0x0 82a4: 0a000027 beq 8348 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 82a8: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 82ac: e590e050 ldr lr, [r0, #80] 82b0: e5de3000 ldrb r3, [lr] 82b4: e353005c cmp r3, #92 ; 0x5c 82b8: 1353002f cmpne r3, #47 ; 0x2f 82bc: 13a02000 movne r2, #0 ; 0x0 82c0: 03a02001 moveq r2, #1 ; 0x1 82c4: 1a000013 bne 8318 82c8: e59f3084 ldr r3, [pc, #132] ; 8354 82cc: e593c000 ldr ip, [r3] 82d0: e28cc014 add ip, ip, #20 ; 0x14 82d4: e89c000f ldm ip, {r0, r1, r2, r3} 82d8: e884000f stm r4, {r0, r1, r2, r3} 82dc: e3a03001 mov r3, #1 ; 0x1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 82e0: e08e0003 add r0, lr, r3 82e4: e1a02004 mov r2, r4 82e8: e1a01006 mov r1, r6 82ec: eb000019 bl 8358 82f0: e1a05000 mov r5, r0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 82f4: e1a00004 mov r0, r4 82f8: ebffff94 bl 8150 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 82fc: e1a00004 mov r0, r4 8300: e1a01006 mov r1, r6 8304: ebffffb1 bl 81d0 8308: e3500000 cmp r0, #0 ; 0x0 830c: 0a000005 beq 8328 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8310: e1a00005 mov r0, r5 8314: e8bd8070 pop {r4, r5, r6, pc} * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 8318: e3530000 cmp r3, #0 ; 0x0 831c: 11a03002 movne r3, r2 8320: 1affffee bne 82e0 8324: eaffffe7 b 82c8 <== 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 ); 8328: eb000f14 bl bf80 <__errno> <== NOT EXECUTED 832c: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 8330: e5803000 str r3, [r0] <== NOT EXECUTED 8334: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 8338: eafffff4 b 8310 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 833c: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 8340: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 8344: ebfff2e0 bl 4ecc <== NOT EXECUTED if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 8348: e3a004ba mov r0, #-1174405120 ; 0xba000000 <== NOT EXECUTED 834c: e280060d add r0, r0, #13631488 ; 0xd00000 <== NOT EXECUTED 8350: ebfff2dd bl 4ecc <== NOT EXECUTED 8354: 00015668 .word 0x00015668 000088d4 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 88d4: e92d4070 push {r4, r5, r6, lr} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 88d8: e2504000 subs r4, r0, #0 ; 0x0 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 88dc: e1a05001 mov r5, r1 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 88e0: 0a000020 beq 8968 if ( !name ) 88e4: e3510000 cmp r1, #0 ; 0x0 88e8: 0a00001b beq 895c /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 88ec: e1a00001 mov r0, r1 88f0: e59f1084 ldr r1, [pc, #132] ; 897c 88f4: eb00126f bl d2b8 88f8: e3500000 cmp r0, #0 ; 0x0 88fc: 1a000001 bne 8908 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8900: e1a00004 mov r0, r4 8904: e8bd8070 pop {r4, r5, r6, pc} */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) 8908: e1a00005 mov r0, r5 890c: e59f106c ldr r1, [pc, #108] ; 8980 8910: eb001268 bl d2b8 8914: e3500000 cmp r0, #0 ; 0x0 return directory->Parent; 8918: 05944008 ldreq r4, [r4, #8] */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) 891c: 0afffff7 beq 8900 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8920: e5946050 ldr r6, [r4, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8924: e2844054 add r4, r4, #84 ; 0x54 !rtems_chain_is_tail( the_chain, the_node ); 8928: e1560004 cmp r6, r4 892c: 1a000003 bne 8940 8930: ea000009 b 895c the_node = the_node->next ) { 8934: 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 ); 8938: e1560004 cmp r6, r4 893c: 0a000006 beq 895c the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 8940: e1a00005 mov r0, r5 8944: e286100c add r1, r6, #12 ; 0xc 8948: eb00125a bl d2b8 894c: e3500000 cmp r0, #0 ; 0x0 8950: 1afffff7 bne 8934 8954: e1a04006 mov r4, r6 8958: eaffffe8 b 8900 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 895c: e3a04000 mov r4, #0 ; 0x0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8960: e1a00004 mov r0, r4 8964: e8bd8070 pop {r4, r5, r6, pc} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 8968: e59f0014 ldr r0, [pc, #20] ; 8984 <== NOT EXECUTED 896c: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED 8970: e59f2010 ldr r2, [pc, #16] ; 8988 <== NOT EXECUTED 8974: e59f3010 ldr r3, [pc, #16] ; 898c <== NOT EXECUTED 8978: eb00010d bl 8db4 <__assert_func> <== NOT EXECUTED 897c: 00015e10 .word 0x00015e10 8980: 00015e14 .word 0x00015e14 8984: 000167d8 .word 0x000167d8 8988: 00015e18 .word 0x00015e18 898c: 00016828 .word 0x00016828 0001d4e8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 1d4e8: 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; 1d4ec: e1a0e000 mov lr, r0 1d4f0: 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 ) { 1d4f4: 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; 1d4f8: e89e000f ldm lr, {r0, r1, r2, r3} ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 1d4fc: e24dd010 sub sp, sp, #16 ; 0x10 * 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; 1d500: 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; 1d504: e3a03000 mov r3, #0 ; 0x0 1d508: e58c3018 str r3, [ip, #24] * 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; 1d50c: e1a0500d mov r5, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 1d510: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 1d514: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 1d518: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 1d51c: ebfffe0e bl 1cd5c if ( jnode->type != IMFS_DIRECTORY ) { 1d520: e594304c ldr r3, [r4, #76] 1d524: e3530001 cmp r3, #1 ; 0x1 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 1d528: e2842054 add r2, r4, #84 ; 0x54 do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { 1d52c: 1a000010 bne 1d574 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 1d530: e5943050 ldr r3, [r4, #80] 1d534: e1530002 cmp r3, r2 1d538: 0a00000d beq 1d574 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 1d53c: e3540000 cmp r4, #0 ; 0x0 1d540: 0a000008 beq 1d568 if ( jnode->type == IMFS_DIRECTORY ) { 1d544: e594304c ldr r3, [r4, #76] 1d548: e3530001 cmp r3, #1 ; 0x1 1d54c: 1affffef bne 1d510 if ( jnode_has_children( jnode ) ) 1d550: e5942050 ldr r2, [r4, #80] 1d554: e2843054 add r3, r4, #84 ; 0x54 1d558: e1520003 cmp r2, r3 1d55c: 0affffeb beq 1d510 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 1d560: e2524000 subs r4, r2, #0 ; 0x0 1d564: 1affffe9 bne 1d510 1d568: e3a00000 mov r0, #0 ; 0x0 return 0; } 1d56c: e28dd010 add sp, sp, #16 ; 0x10 1d570: 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 ); 1d574: e1a0000d mov r0, sp 1d578: ebff98e5 bl 3914 if (result != 0) 1d57c: e3500000 cmp r0, #0 ; 0x0 1d580: 01a04006 moveq r4, r6 1d584: 0affffec beq 1d53c if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 1d588: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1d58c: eafffff6 b 1d56c <== NOT EXECUTED 00008a84 : 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 ) { 8a84: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8a88: e59fc0f0 ldr ip, [pc, #240] ; 8b80 8a8c: e59ce000 ldr lr, [ip] * 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) { 8a90: 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 ) { 8a94: e1a09002 mov r9, r2 8a98: e1a08003 mov r8, r3 8a9c: e24dd004 sub sp, sp, #4 ; 0x4 8aa0: e1a06000 mov r6, r0 8aa4: 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) { 8aa8: 13a02020 movne r2, #32 ; 0x20 8aac: 13a03000 movne r3, #0 ; 0x0 8ab0: 0a000006 beq 8ad0 8ab4: e15e0002 cmp lr, r2 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 8ab8: e2833001 add r3, r3, #1 ; 0x1 8abc: e1a02082 lsl r2, r2, #1 if (bit_mask == requested_bytes_per_block) { 8ac0: 0a000002 beq 8ad0 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 8ac4: e3530005 cmp r3, #5 ; 0x5 8ac8: 1afffff9 bne 8ab4 8acc: 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) 8ad0: e59fc0ac ldr ip, [pc, #172] ; 8b84 * 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( 8ad4: e3a07000 mov r7, #0 ; 0x0 8ad8: e3a03c41 mov r3, #16640 ; 0x4100 bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 8adc: 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( 8ae0: e28330ed add r3, r3, #237 ; 0xed 8ae4: e3a01001 mov r1, #1 ; 0x1 8ae8: e59f2098 ldr r2, [pc, #152] ; 8b88 8aec: e1a00007 mov r0, r7 8af0: e58d7000 str r7, [sp] 8af4: eb0009ff bl b2f8 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; 8af8: e59f508c ldr r5, [pc, #140] ; 8b8c 8afc: 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( 8b00: 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; 8b04: e8b4000f ldm r4!, {r0, r1, r2, r3} 8b08: e286c030 add ip, r6, #48 ; 0x30 8b0c: e8ac000f stmia ip!, {r0, r1, r2, r3} 8b10: e8b4000f ldm r4!, {r0, r1, r2, r3} 8b14: e8ac000f stmia ip!, {r0, r1, r2, r3} 8b18: 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; 8b1c: e586a020 str sl, [r6, #32] temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8b20: e88c000f stm ip, {r0, r1, r2, r3} "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 8b24: 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 ) ); 8b28: e3a00001 mov r0, #1 ; 0x1 8b2c: e3a0100c mov r1, #12 ; 0xc 8b30: eb0000fc bl 8f28 if ( !fs_info ){ 8b34: e3500000 cmp r0, #0 ; 0x0 8b38: 0a000009 beq 8b64 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; 8b3c: e5962018 ldr r2, [r6, #24] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 8b40: e3a03001 mov r3, #1 ; 0x1 8b44: e5803000 str r3, [r0] 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; 8b48: e5823038 str r3, [r2, #56] * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 8b4c: e5808008 str r8, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8b50: 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; 8b54: 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; 8b58: e1a00007 mov r0, r7 return 0; } 8b5c: e28dd004 add sp, sp, #4 ; 0x4 8b60: 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); 8b64: e5960018 ldr r0, [r6, #24] <== NOT EXECUTED 8b68: eb00012d bl 9024 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8b6c: eb000d03 bl bf80 <__errno> <== NOT EXECUTED 8b70: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 8b74: e5803000 str r3, [r0] <== NOT EXECUTED 8b78: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8b7c: eafffff6 b 8b5c <== NOT EXECUTED 8b80: 00015098 .word 0x00015098 8b84: 00016d14 .word 0x00016d14 8b88: 00016674 .word 0x00016674 8b8c: 0001613c .word 0x0001613c 0000366c : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 366c: e92d4030 push {r4, r5, lr} /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 3670: e590c000 ldr ip, [r0] int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 3674: e24dd044 sub sp, sp, #68 ; 0x44 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 3678: e58dc028 str ip, [sp, #40] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 367c: e1dc33b4 ldrh r3, [ip, #52] 3680: e3530007 cmp r3, #7 ; 0x7 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 3684: e1a05001 mov r5, r1 3688: 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 ) 368c: 8a00001a bhi 36fc /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 3690: e28d4007 add r4, sp, #7 ; 0x7 3694: e1a01004 mov r1, r4 3698: e28d2040 add r2, sp, #64 ; 0x40 369c: ebffff6b bl 3450 /* * Create a new link node. */ new_node = IMFS_create_node( 36a0: e3a03ca2 mov r3, #41472 ; 0xa200 36a4: e28dc028 add ip, sp, #40 ; 0x28 36a8: e1a00005 mov r0, r5 36ac: e1a02004 mov r2, r4 36b0: e2433001 sub r3, r3, #1 ; 0x1 36b4: e3a01003 mov r1, #3 ; 0x3 36b8: e58dc000 str ip, [sp] 36bc: eb006543 bl 1cbd0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 36c0: e3500000 cmp r0, #0 ; 0x0 36c4: 0a000011 beq 3710 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 36c8: e59d2028 ldr r2, [sp, #40] 36cc: e1d233b4 ldrh r3, [r2, #52] 36d0: e2833001 add r3, r3, #1 ; 0x1 36d4: e1c233b4 strh r3, [r2, #52] IMFS_update_ctime( info.hard_link.link_node ); 36d8: e28d0038 add r0, sp, #56 ; 0x38 36dc: e3a01000 mov r1, #0 ; 0x0 36e0: eb000244 bl 3ff8 36e4: e59d2038 ldr r2, [sp, #56] 36e8: e59d3028 ldr r3, [sp, #40] 36ec: e5832048 str r2, [r3, #72] 36f0: e3a00000 mov r0, #0 ; 0x0 return 0; } 36f4: e28dd044 add sp, sp, #68 ; 0x44 36f8: 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 ); 36fc: eb00a90b bl 2db30 <__errno> 3700: e3a0301f mov r3, #31 ; 0x1f 3704: e5803000 str r3, [r0] 3708: e3e00000 mvn r0, #0 ; 0x0 370c: eafffff8 b 36f4 ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 3710: eb00a906 bl 2db30 <__errno> <== NOT EXECUTED 3714: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3718: e5803000 str r3, [r0] <== NOT EXECUTED 371c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3720: eafffff3 b 36f4 <== NOT EXECUTED 00024ff4 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 24ff4: e2503000 subs r3, r0, #0 ; 0x0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 24ff8: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 24ffc: 0a00000f beq 25040 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 25000: e593304c ldr r3, [r3, #76] 25004: e3530005 cmp r3, #5 ; 0x5 25008: 1a000012 bne 25058 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 ); 2500c: e3a02001 mov r2, #1 ; 0x1 25010: ebfffe99 bl 24a7c if ( *block_entry_ptr ) 25014: e5905000 ldr r5, [r0] 25018: e3550000 cmp r5, #0 ; 0x0 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 ); 2501c: e1a04000 mov r4, r0 if ( *block_entry_ptr ) 25020: 13a00000 movne r0, #0 ; 0x0 25024: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 25028: ebfffe86 bl 24a48 if ( !memory ) 2502c: e3500000 cmp r0, #0 ; 0x0 return 1; *block_entry_ptr = memory; 25030: 15840000 strne r0, [r4] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 25034: 03a00001 moveq r0, #1 ; 0x1 return 1; *block_entry_ptr = memory; 25038: 11a00005 movne r0, r5 return 0; } 2503c: e8bd8030 pop {r4, r5, pc} ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 25040: e3a01f5a mov r1, #360 ; 0x168 <== NOT EXECUTED 25044: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 25048: e59f0020 ldr r0, [pc, #32] ; 25070 <== NOT EXECUTED 2504c: e59f2020 ldr r2, [pc, #32] ; 25074 <== NOT EXECUTED 25050: e59f3020 ldr r3, [pc, #32] ; 25078 <== NOT EXECUTED 25054: ebffe1f5 bl 1d830 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 25058: e3a01f5b mov r1, #364 ; 0x16c <== NOT EXECUTED 2505c: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 25060: e59f0008 ldr r0, [pc, #8] ; 25070 <== NOT EXECUTED 25064: e59f2008 ldr r2, [pc, #8] ; 25074 <== NOT EXECUTED 25068: e59f300c ldr r3, [pc, #12] ; 2507c <== NOT EXECUTED 2506c: ebffe1ef bl 1d830 <__assert_func> <== NOT EXECUTED 25070: 000455ac .word 0x000455ac 25074: 00042004 .word 0x00042004 25078: 000455f8 .word 0x000455f8 2507c: 00045604 .word 0x00045604 00025080 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 25080: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 25084: e2505000 subs r5, r0, #0 ; 0x0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 25088: e1a08001 mov r8, r1 /* * Perform internal consistency checks */ assert( the_jnode ); 2508c: 0a000037 beq 25170 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 25090: e595304c ldr r3, [r5, #76] 25094: e3530005 cmp r3, #5 ; 0x5 25098: 1a00003a bne 25188 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 2509c: e59f20fc ldr r2, [pc, #252] ; 251a0 250a0: e5924000 ldr r4, [r2] 250a4: e1a03124 lsr r3, r4, #2 250a8: e0213393 mla r1, r3, r3, r3 250ac: e0223391 mla r2, r1, r3, r3 250b0: e2422001 sub r2, r2, #1 ; 0x1 250b4: e0030294 mul r3, r4, r2 250b8: e1580003 cmp r8, r3 250bc: 2a000026 bcs 2515c rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 250c0: e5956050 ldr r6, [r5, #80] 250c4: e1580006 cmp r8, r6 250c8: d3a00000 movle r0, #0 ; 0x0 250cc: 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; 250d0: e1a01004 mov r1, r4 250d4: e1a00008 mov r0, r8 250d8: eb00635a bl 3de48 <__aeabi_idiv> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 250dc: e1a01004 mov r1, r4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 250e0: e1a07000 mov r7, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 250e4: e1a00006 mov r0, r6 250e8: eb006356 bl 3de48 <__aeabi_idiv> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 250ec: 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; 250f0: e1a06000 mov r6, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 250f4: 3a000015 bcc 25150 250f8: e1a04000 mov r4, r0 250fc: ea000002 b 2510c 25100: e2844001 add r4, r4, #1 ; 0x1 25104: e1570004 cmp r7, r4 25108: 3a000010 bcc 25150 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 2510c: e1a00005 mov r0, r5 25110: e1a01004 mov r1, r4 25114: ebffffb6 bl 24ff4 25118: e3500000 cmp r0, #0 ; 0x0 2511c: 0afffff7 beq 25100 25120: ea000003 b 25134 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 25124: e1a01004 mov r1, r4 <== NOT EXECUTED 25128: 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-- ) { 2512c: e2444001 sub r4, r4, #1 ; 0x1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 25130: ebfffeeb bl 24ce4 <== 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-- ) { 25134: e1560004 cmp r6, r4 <== NOT EXECUTED 25138: 9afffff9 bls 25124 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 2513c: eb00227b bl 2db30 <__errno> <== NOT EXECUTED 25140: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 25144: e5803000 str r3, [r0] <== NOT EXECUTED 25148: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2514c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 25150: e5858050 str r8, [r5, #80] 25154: e3a00000 mov r0, #0 ; 0x0 return 0; } 25158: 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 ); 2515c: eb002273 bl 2db30 <__errno> <== NOT EXECUTED 25160: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 25164: e5803000 str r3, [r0] <== NOT EXECUTED 25168: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2516c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 25170: e3a01e13 mov r1, #304 ; 0x130 <== NOT EXECUTED 25174: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 25178: e59f0024 ldr r0, [pc, #36] ; 251a4 <== NOT EXECUTED 2517c: e59f2024 ldr r2, [pc, #36] ; 251a8 <== NOT EXECUTED 25180: e59f3024 ldr r3, [pc, #36] ; 251ac <== NOT EXECUTED 25184: ebffe1a9 bl 1d830 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 25188: e3a01f4d mov r1, #308 ; 0x134 <== NOT EXECUTED 2518c: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 25190: e59f000c ldr r0, [pc, #12] ; 251a4 <== NOT EXECUTED 25194: e59f200c ldr r2, [pc, #12] ; 251a8 <== NOT EXECUTED 25198: e59f3010 ldr r3, [pc, #16] ; 251b0 <== NOT EXECUTED 2519c: ebffe1a3 bl 1d830 <__assert_func> <== NOT EXECUTED 251a0: 00047534 .word 0x00047534 251a4: 000455ac .word 0x000455ac 251a8: 0004201c .word 0x0004201c 251ac: 000455f8 .word 0x000455f8 251b0: 00045604 .word 0x00045604 00024a7c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 24a7c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 24a80: e2506000 subs r6, r0, #0 ; 0x0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 24a84: e1a04001 mov r4, r1 24a88: e1a07002 mov r7, r2 /* * Perform internal consistency checks */ assert( the_jnode ); 24a8c: 0a00002a beq 24b3c if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 24a90: e596304c ldr r3, [r6, #76] 24a94: e3530005 cmp r3, #5 ; 0x5 24a98: 1a00002d bne 24b54 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 24a9c: e59f322c ldr r3, [pc, #556] ; 24cd0 24aa0: e5932000 ldr r2, [r3] 24aa4: e1a05122 lsr r5, r2, #2 24aa8: e2453001 sub r3, r5, #1 ; 0x1 24aac: e1510003 cmp r1, r3 24ab0: 9a000019 bls 24b1c /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 24ab4: e0215595 mla r1, r5, r5, r5 <== NOT EXECUTED 24ab8: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED 24abc: e1540003 cmp r4, r3 <== NOT EXECUTED 24ac0: 8a00002d bhi 24b7c <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 24ac4: e0654004 rsb r4, r5, r4 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 24ac8: e1a00004 mov r0, r4 <== NOT EXECUTED 24acc: e1a01005 mov r1, r5 <== NOT EXECUTED 24ad0: eb00652c bl 3df88 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 24ad4: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 24ad8: e1a08000 mov r8, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 24adc: e1a00004 mov r0, r4 <== NOT EXECUTED 24ae0: eb006494 bl 3dd38 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 24ae4: 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; 24ae8: e1a04000 mov r4, r0 <== NOT EXECUTED p = info->doubly_indirect; 24aec: e5960058 ldr r0, [r6, #88] <== NOT EXECUTED if ( malloc_it ) { 24af0: 0a000047 beq 24c14 <== NOT EXECUTED if ( !p ) { 24af4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 24af8: 0a000052 beq 24c48 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 24afc: e7901104 ldr r1, [r0, r4, lsl #2] <== NOT EXECUTED 24b00: e1a03104 lsl r3, r4, #2 <== NOT EXECUTED if ( !p1 ) { 24b04: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 24b08: e0804003 add r4, r0, r3 <== NOT EXECUTED if ( !p1 ) { 24b0c: 0a000052 beq 24c5c <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 24b10: e1a03108 lsl r3, r8, #2 <== NOT EXECUTED 24b14: e0810003 add r0, r1, r3 <== NOT EXECUTED 24b18: 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 ) { 24b1c: e3570000 cmp r7, #0 ; 0x0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 24b20: e5960054 ldr r0, [r6, #84] if ( malloc_it ) { 24b24: 0a000010 beq 24b6c if ( !p ) { 24b28: e3500000 cmp r0, #0 ; 0x0 24b2c: 0a000040 beq 24c34 } if ( !p ) return 0; return &info->indirect[ my_block ]; 24b30: e1a03104 lsl r3, r4, #2 24b34: e0800003 add r0, r0, r3 24b38: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Perform internal consistency checks */ assert( the_jnode ); 24b3c: e3a01fe1 mov r1, #900 ; 0x384 <== NOT EXECUTED 24b40: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED 24b44: e59f0188 ldr r0, [pc, #392] ; 24cd4 <== NOT EXECUTED 24b48: e59f2188 ldr r2, [pc, #392] ; 24cd8 <== NOT EXECUTED 24b4c: e59f3188 ldr r3, [pc, #392] ; 24cdc <== NOT EXECUTED 24b50: ebffe336 bl 1d830 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 24b54: e3a01fe2 mov r1, #904 ; 0x388 <== NOT EXECUTED 24b58: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED 24b5c: e59f0170 ldr r0, [pc, #368] ; 24cd4 <== NOT EXECUTED 24b60: e59f2170 ldr r2, [pc, #368] ; 24cd8 <== NOT EXECUTED 24b64: e59f3174 ldr r3, [pc, #372] ; 24ce0 <== NOT EXECUTED 24b68: ebffe330 bl 1d830 <__assert_func> <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 24b6c: e3500000 cmp r0, #0 ; 0x0 24b70: 1affffee bne 24b30 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 24b74: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 24b78: 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 ) { 24b7c: e0235591 mla r3, r1, r5, r5 <== NOT EXECUTED 24b80: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 24b84: e1540003 cmp r4, r3 <== NOT EXECUTED 24b88: 8afffff9 bhi 24b74 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 24b8c: e0614004 rsb r4, r1, r4 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 24b90: e1a00004 mov r0, r4 <== NOT EXECUTED 24b94: e1a01005 mov r1, r5 <== NOT EXECUTED 24b98: eb0064fa bl 3df88 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 24b9c: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 24ba0: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 24ba4: e1a00004 mov r0, r4 <== NOT EXECUTED 24ba8: eb006462 bl 3dd38 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 24bac: 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; 24bb0: e1a04000 mov r4, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 24bb4: eb00645f bl 3dd38 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 24bb8: 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; 24bbc: e1a08000 mov r8, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 24bc0: e1a00004 mov r0, r4 <== NOT EXECUTED 24bc4: eb0064ef bl 3df88 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 24bc8: 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; 24bcc: e1a04000 mov r4, r0 <== NOT EXECUTED p = info->triply_indirect; 24bd0: e596005c ldr r0, [r6, #92] <== NOT EXECUTED if ( malloc_it ) { 24bd4: 0a000025 beq 24c70 <== NOT EXECUTED if ( !p ) { 24bd8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 24bdc: 0a00002c beq 24c94 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 24be0: e790c108 ldr ip, [r0, r8, lsl #2] <== NOT EXECUTED 24be4: e1a03108 lsl r3, r8, #2 <== NOT EXECUTED if ( !p1 ) { 24be8: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 24bec: e0805003 add r5, r0, r3 <== NOT EXECUTED if ( !p1 ) { 24bf0: 0a000031 beq 24cbc <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 24bf4: e79c0104 ldr r0, [ip, r4, lsl #2] <== NOT EXECUTED 24bf8: e1a03104 lsl r3, r4, #2 <== NOT EXECUTED if ( !p2 ) { 24bfc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 24c00: e08c4003 add r4, ip, r3 <== NOT EXECUTED if ( !p2 ) { 24c04: 0a000027 beq 24ca8 <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 24c08: e1a0310a lsl r3, sl, #2 <== NOT EXECUTED 24c0c: e0800003 add r0, r0, r3 <== NOT EXECUTED 24c10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 24c14: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 24c18: 0affffd5 beq 24b74 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 24c1c: e7900104 ldr r0, [r0, r4, lsl #2] <== NOT EXECUTED if ( !p ) 24c20: 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 ]; 24c24: 11a03108 lslne r3, r8, #2 <== NOT EXECUTED 24c28: 10800003 addne r0, r0, r3 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 24c2c: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 24c30: eaffffcf b 24b74 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 24c34: ebffff83 bl 24a48 if ( !p ) 24c38: e3500000 cmp r0, #0 ; 0x0 return 0; info->indirect = p; 24c3c: 15860054 strne r0, [r6, #84] if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 24c40: 1affffba bne 24b30 24c44: eaffffca b 24b74 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 24c48: ebffff7e bl 24a48 <== NOT EXECUTED if ( !p ) 24c4c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 24c50: 0affffc7 beq 24b74 <== NOT EXECUTED return 0; info->doubly_indirect = p; 24c54: e5860058 str r0, [r6, #88] <== NOT EXECUTED 24c58: eaffffa7 b 24afc <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 24c5c: ebffff79 bl 24a48 <== NOT EXECUTED if ( !p1 ) 24c60: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 24c64: 0affffc2 beq 24b74 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 24c68: e5841000 str r1, [r4] <== NOT EXECUTED 24c6c: eaffffa7 b 24b10 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 24c70: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 24c74: 0affffbe beq 24b74 <== 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 ]; 24c78: e7900108 ldr r0, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p1 ) 24c7c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 24c80: 17902104 ldrne r2, [r0, r4, lsl #2] <== NOT EXECUTED 24c84: 11a0310a lslne r3, sl, #2 <== NOT EXECUTED 24c88: 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 ) 24c8c: 0affffb8 beq 24b74 <== NOT EXECUTED 24c90: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 24c94: ebffff6b bl 24a48 <== NOT EXECUTED if ( !p ) 24c98: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 24c9c: 0affffb4 beq 24b74 <== NOT EXECUTED return 0; info->triply_indirect = p; 24ca0: e586005c str r0, [r6, #92] <== NOT EXECUTED 24ca4: eaffffcd b 24be0 <== NOT EXECUTED p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 24ca8: ebffff66 bl 24a48 <== NOT EXECUTED if ( !p2 ) 24cac: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 24cb0: 0affffaf beq 24b74 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 24cb4: e5840000 str r0, [r4] <== NOT EXECUTED 24cb8: eaffffd2 b 24c08 <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 24cbc: ebffff61 bl 24a48 <== NOT EXECUTED if ( !p1 ) 24cc0: e250c000 subs ip, r0, #0 ; 0x0 <== NOT EXECUTED 24cc4: 0affffaa beq 24b74 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 24cc8: e585c000 str ip, [r5] <== NOT EXECUTED 24ccc: eaffffc8 b 24bf4 <== NOT EXECUTED 24cd0: 00047534 .word 0x00047534 24cd4: 000455ac .word 0x000455ac 24cd8: 00041f88 .word 0x00041f88 24cdc: 000455f8 .word 0x000455f8 24ce0: 00045604 .word 0x00045604 00025558 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 25558: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 2555c: e250a000 subs sl, r0, #0 ; 0x0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 25560: e24dd008 sub sp, sp, #8 ; 0x8 25564: e1a05001 mov r5, r1 25568: e1a06002 mov r6, r2 2556c: e1a00003 mov r0, r3 /* * Perform internal consistency checks */ assert( the_jnode ); 25570: 0a00006c beq 25728 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 25574: e59a104c ldr r1, [sl, #76] 25578: e2413005 sub r3, r1, #5 ; 0x5 2557c: e3530001 cmp r3, #1 ; 0x1 25580: 8a000073 bhi 25754 /* * Error checks on arguments */ assert( dest ); 25584: e3520000 cmp r2, #0 ; 0x0 25588: 0a00006c beq 25740 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 2558c: e3500000 cmp r0, #0 ; 0x0 25590: 0a00005f beq 25714 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 25594: e3510006 cmp r1, #6 ; 0x6 25598: 0a00004d beq 256d4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 2559c: e59f91f4 ldr r9, [pc, #500] ; 25798 * 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 ) 255a0: e59a2050 ldr r2, [sl, #80] 255a4: e0803005 add r3, r0, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 255a8: 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 ) 255ac: e1530002 cmp r3, r2 255b0: 91a08000 movls r8, r0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 255b4: e1a01004 mov r1, r4 255b8: 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; 255bc: 80658002 rsbhi r8, r5, r2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 255c0: eb0062a3 bl 3e054 <__modsi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 255c4: e1a01004 mov r1, r4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 255c8: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 255cc: e1a00005 mov r0, r5 255d0: eb00621c bl 3de48 <__aeabi_idiv> if ( start_offset ) { 255d4: 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; 255d8: e1a05000 mov r5, r0 if ( start_offset ) { 255dc: 1a000029 bne 25688 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 255e0: e5994000 ldr r4, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 255e4: e1580004 cmp r8, r4 255e8: 3a000010 bcc 25630 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 255ec: e1a0000a mov r0, sl 255f0: e1a01005 mov r1, r5 255f4: e3a02000 mov r2, #0 ; 0x0 255f8: ebfffd1f bl 24a7c assert( block_ptr ); 255fc: e3500000 cmp r0, #0 ; 0x0 25600: 0a00003d beq 256fc if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 25604: e5901000 ldr r1, [r0] 25608: e1a02004 mov r2, r4 2560c: e1a00006 mov r0, r6 25610: eb002abe bl 30110 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 25614: e5993000 ldr r3, [r9] if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 25618: 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 ) { 2561c: 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; 25620: e0866004 add r6, r6, r4 block++; 25624: e2855001 add r5, r5, #1 ; 0x1 my_length -= to_copy; copied += to_copy; 25628: 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 ) { 2562c: 9affffee bls 255ec * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 25630: 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 ) { 25634: e1a04007 mov r4, r7 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 25638: 0a00000a beq 25668 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2563c: e1a01005 mov r1, r5 25640: e1a0000a mov r0, sl 25644: e3a02000 mov r2, #0 ; 0x0 25648: ebfffd0b bl 24a7c assert( block_ptr ); 2564c: e2501000 subs r1, r0, #0 ; 0x0 25650: 0a00004a beq 25780 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 25654: e1a00006 mov r0, r6 25658: e5911000 ldr r1, [r1] 2565c: e1a02008 mov r2, r8 25660: eb002aaa bl 30110 copied += my_length; 25664: e0884007 add r4, r8, r7 } IMFS_update_atime( the_jnode ); 25668: e1a0000d mov r0, sp 2566c: e3a01000 mov r1, #0 ; 0x0 25670: ebff7a60 bl 3ff8 25674: e59d3000 ldr r3, [sp] 25678: e58a3040 str r3, [sl, #64] return copied; 2567c: e1a00004 mov r0, r4 } 25680: e28dd008 add sp, sp, #8 ; 0x8 25684: 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 ); 25688: e1a0000a mov r0, sl 2568c: e1a01005 mov r1, r5 25690: e3a02000 mov r2, #0 ; 0x0 25694: ebfffcf8 bl 24a7c assert( block_ptr ); 25698: e3500000 cmp r0, #0 ; 0x0 2569c: 0a000032 beq 2576c if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 256a0: 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; 256a4: e0674004 rsb r4, r7, r4 256a8: e1580004 cmp r8, r4 256ac: 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 ); 256b0: e0811007 add r1, r1, r7 256b4: e1a00006 mov r0, r6 256b8: e1a02004 mov r2, r4 256bc: eb002a93 bl 30110 dest += to_copy; 256c0: e0866004 add r6, r6, r4 block++; 256c4: e2855001 add r5, r5, #1 ; 0x1 my_length -= to_copy; 256c8: e0648008 rsb r8, r4, r8 256cc: e1a07004 mov r7, r4 256d0: eaffffc2 b 255e0 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)) 256d4: e59a4050 ldr r4, [sl, #80] <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 256d8: 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)) 256dc: e0654004 rsb r4, r5, r4 <== NOT EXECUTED 256e0: e1540000 cmp r4, r0 <== NOT EXECUTED 256e4: 21a04000 movcs r4, r0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 256e8: e0811005 add r1, r1, r5 <== NOT EXECUTED 256ec: e1a00002 mov r0, r2 <== NOT EXECUTED 256f0: e1a02004 mov r2, r4 <== NOT EXECUTED 256f4: eb002a85 bl 30110 <== NOT EXECUTED 256f8: eaffffda b 25668 <== 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 ); 256fc: e3a01fa9 mov r1, #676 ; 0x2a4 <== NOT EXECUTED 25700: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 25704: e59f0090 ldr r0, [pc, #144] ; 2579c <== NOT EXECUTED 25708: e59f2090 ldr r2, [pc, #144] ; 257a0 <== NOT EXECUTED 2570c: e59f3090 ldr r3, [pc, #144] ; 257a4 <== NOT EXECUTED 25710: ebffe046 bl 1d830 <__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 ); 25714: eb002105 bl 2db30 <__errno> <== NOT EXECUTED 25718: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 2571c: e5803000 str r3, [r0] <== NOT EXECUTED 25720: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 25724: eaffffd5 b 25680 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 25728: e3a01f92 mov r1, #584 ; 0x248 <== NOT EXECUTED 2572c: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED 25730: e59f0064 ldr r0, [pc, #100] ; 2579c <== NOT EXECUTED 25734: e59f2064 ldr r2, [pc, #100] ; 257a0 <== NOT EXECUTED 25738: e59f3068 ldr r3, [pc, #104] ; 257a8 <== NOT EXECUTED 2573c: ebffe03b bl 1d830 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 25740: e59f0054 ldr r0, [pc, #84] ; 2579c <== NOT EXECUTED 25744: e3a01f96 mov r1, #600 ; 0x258 <== NOT EXECUTED 25748: e59f2050 ldr r2, [pc, #80] ; 257a0 <== NOT EXECUTED 2574c: e59f3058 ldr r3, [pc, #88] ; 257ac <== NOT EXECUTED 25750: ebffe036 bl 1d830 <__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 || 25754: e3a01f93 mov r1, #588 ; 0x24c <== NOT EXECUTED 25758: e2811003 add r1, r1, #3 ; 0x3 <== NOT EXECUTED 2575c: e59f0038 ldr r0, [pc, #56] ; 2579c <== NOT EXECUTED 25760: e59f2038 ldr r2, [pc, #56] ; 257a0 <== NOT EXECUTED 25764: e59f3044 ldr r3, [pc, #68] ; 257b0 <== NOT EXECUTED 25768: ebffe030 bl 1d830 <__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 ); 2576c: e59f0028 ldr r0, [pc, #40] ; 2579c <== NOT EXECUTED 25770: e3a01fa5 mov r1, #660 ; 0x294 <== NOT EXECUTED 25774: e59f2024 ldr r2, [pc, #36] ; 257a0 <== NOT EXECUTED 25778: e59f3024 ldr r3, [pc, #36] ; 257a4 <== NOT EXECUTED 2577c: ebffe02b bl 1d830 <__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 ); 25780: e3a01fad mov r1, #692 ; 0x2b4 <== NOT EXECUTED 25784: e2811003 add r1, r1, #3 ; 0x3 <== NOT EXECUTED 25788: e59f000c ldr r0, [pc, #12] ; 2579c <== NOT EXECUTED 2578c: e59f200c ldr r2, [pc, #12] ; 257a0 <== NOT EXECUTED 25790: e59f300c ldr r3, [pc, #12] ; 257a4 <== NOT EXECUTED 25794: ebffe025 bl 1d830 <__assert_func> <== NOT EXECUTED 25798: 00047534 .word 0x00047534 2579c: 000455ac .word 0x000455ac 257a0: 00041fbc .word 0x00041fbc 257a4: 0004563c .word 0x0004563c 257a8: 000455f8 .word 0x000455f8 257ac: 00045694 .word 0x00045694 257b0: 00045648 .word 0x00045648 00024d94 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 24d94: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 24d98: e250a000 subs sl, r0, #0 ; 0x0 24d9c: 0a00004f beq 24ee0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 24da0: e59a304c ldr r3, [sl, #76] 24da4: e3530005 cmp r3, #5 ; 0x5 24da8: 1a000051 bne 24ef4 /* * 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; 24dac: e59f7154 ldr r7, [pc, #340] ; 24f08 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 24db0: 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; 24db4: e5972000 ldr r2, [r7] * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 24db8: 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; 24dbc: e1a08122 lsr r8, r2, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 24dc0: 128a0054 addne r0, sl, #84 ; 0x54 24dc4: 11a01008 movne r1, r8 24dc8: 1bffffcf blne 24d0c } if ( info->doubly_indirect ) { 24dcc: e59a0058 ldr r0, [sl, #88] 24dd0: e3500000 cmp r0, #0 ; 0x0 24dd4: 0a000014 beq 24e2c for ( i=0 ; i <== NOT EXECUTED 24de4: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 24de8: e1a02004 mov r2, r4 <== NOT EXECUTED 24dec: ea000000 b 24df4 <== NOT EXECUTED 24df0: e59a0058 ldr r0, [sl, #88] <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 24df4: e7903102 ldr r3, [r0, r2, lsl #2] <== NOT EXECUTED 24df8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 24dfc: e1a03102 lsl r3, r2, #2 <== NOT EXECUTED memfile_free_blocks_in_table( 24e00: 10800003 addne r0, r0, r3 <== NOT EXECUTED 24e04: 11a01008 movne r1, r8 <== NOT EXECUTED 24e08: 1bffffbf blne 24d0c <== 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 ); 24e20: e28a0058 add r0, sl, #88 ; 0x58 <== NOT EXECUTED 24e24: e1a01008 mov r1, r8 <== NOT EXECUTED 24e28: ebffffb7 bl 24d0c <== NOT EXECUTED } if ( info->triply_indirect ) { 24e2c: e59a005c ldr r0, [sl, #92] 24e30: e3500000 cmp r0, #0 ; 0x0 24e34: 0a000027 beq 24ed8 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 24e44: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 24e48: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 24e4c: 13a06000 movne r6, #0 ; 0x0 <== NOT EXECUTED 24e50: 11a09006 movne r9, r6 <== NOT EXECUTED 24e54: 0a00001c beq 24ecc <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 24e64: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 24e68: e1a02004 mov r2, r4 <== NOT EXECUTED if ( p[j] ) { 24e6c: e7953102 ldr r3, [r5, r2, lsl #2] <== NOT EXECUTED 24e70: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 24e74: e1a03102 lsl r3, r2, #2 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 24e78: 10850003 addne r0, r5, r3 <== NOT EXECUTED 24e7c: 11a01008 movne r1, r8 <== NOT EXECUTED 24e80: 1bffffa1 blne 24d0c <== 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 24e98: 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( 24e9c: e0800009 add r0, r0, r9 <== NOT EXECUTED 24ea0: e1a01008 mov r1, r8 <== NOT EXECUTED 24ea4: ebffff98 bl 24d0c <== 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]; 24eb8: e59a005c ldr r0, [sl, #92] <== NOT EXECUTED 24ebc: e7905106 ldr r5, [r0, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 24ec0: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 24ec4: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED 24ec8: 1affffe2 bne 24e58 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 24ecc: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED 24ed0: e1a01008 mov r1, r8 <== NOT EXECUTED 24ed4: ebffff8c bl 24d0c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 24ed8: e3a00000 mov r0, #0 ; 0x0 24edc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Perform internal consistency checks */ assert( the_jnode ); 24ee0: e59f0024 ldr r0, [pc, #36] ; 24f0c <== NOT EXECUTED 24ee4: e3a01f7b mov r1, #492 ; 0x1ec <== NOT EXECUTED 24ee8: e59f2020 ldr r2, [pc, #32] ; 24f10 <== NOT EXECUTED 24eec: e59f3020 ldr r3, [pc, #32] ; 24f14 <== NOT EXECUTED 24ef0: ebffe24e bl 1d830 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 24ef4: e59f0010 ldr r0, [pc, #16] ; 24f0c <== NOT EXECUTED 24ef8: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED 24efc: e59f200c ldr r2, [pc, #12] ; 24f10 <== NOT EXECUTED 24f00: e59f3010 ldr r3, [pc, #16] ; 24f18 <== NOT EXECUTED 24f04: ebffe249 bl 1d830 <__assert_func> <== NOT EXECUTED 24f08: 00047534 .word 0x00047534 24f0c: 000455ac .word 0x000455ac 24f10: 00041fd0 .word 0x00041fd0 24f14: 000455f8 .word 0x000455f8 24f18: 00045604 .word 0x00045604 00024ce4 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 24ce4: 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 ); 24ce8: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 24cec: ebffff62 bl 24a7c <== NOT EXECUTED ptr = *block_entry_ptr; 24cf0: e5902000 ldr r2, [r0] <== NOT EXECUTED *block_entry_ptr = 0; 24cf4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 24cf8: e5803000 str r3, [r0] <== NOT EXECUTED memfile_free_block( ptr ); 24cfc: e1a00002 mov r0, r2 <== NOT EXECUTED 24d00: ebffff48 bl 24a28 <== NOT EXECUTED return 1; } 24d04: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 24d08: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00025268 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 25268: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 2526c: e250a000 subs sl, r0, #0 ; 0x0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 25270: e24dd008 sub sp, sp, #8 ; 0x8 25274: e1a05001 mov r5, r1 25278: e1a07002 mov r7, r2 2527c: e1a0b003 mov fp, r3 /* * Perform internal consistency checks */ assert( the_jnode ); 25280: 0a00006e beq 25440 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 25284: e59a304c ldr r3, [sl, #76] 25288: e3530005 cmp r3, #5 ; 0x5 2528c: 1a000065 bne 25428 /* * Error check arguments */ assert( source ); 25290: e3520000 cmp r2, #0 ; 0x0 25294: 0a00006f beq 25458 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 25298: e35b0000 cmp fp, #0 ; 0x0 2529c: 0a00005c beq 25414 * 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 ) { 252a0: 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; 252a4: e08b1001 add r1, fp, r1 if ( last_byte > the_jnode->info.file.size ) { 252a8: e1510003 cmp r1, r3 252ac: 8a00004a bhi 253dc /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 252b0: e59f91cc ldr r9, [pc, #460] ; 25484 252b4: e5994000 ldr r4, [r9] 252b8: e1a00005 mov r0, r5 252bc: e1a01004 mov r1, r4 252c0: eb006363 bl 3e054 <__modsi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 252c4: e1a01004 mov r1, r4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 252c8: e1a08000 mov r8, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 252cc: e1a00005 mov r0, r5 252d0: eb0062dc bl 3de48 <__aeabi_idiv> if ( start_offset ) { 252d4: 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; 252d8: e1a06000 mov r6, r0 if ( start_offset ) { 252dc: 01a0500b moveq r5, fp 252e0: 1a000029 bne 2538c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 252e4: e5994000 ldr r4, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 252e8: e1550004 cmp r5, r4 252ec: 3a000010 bcc 25334 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 252f0: e1a0000a mov r0, sl 252f4: e1a01006 mov r1, r6 252f8: e3a02000 mov r2, #0 ; 0x0 252fc: ebfffdde bl 24a7c assert( block_ptr ); 25300: e3500000 cmp r0, #0 ; 0x0 25304: 0a00003c beq 253fc 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 ); 25308: e1a01007 mov r1, r7 2530c: e5900000 ldr r0, [r0] 25310: e1a02004 mov r2, r4 25314: eb002b7d bl 30110 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 25318: 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; 2531c: 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 ) { 25320: 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; 25324: e0877004 add r7, r7, r4 block++; 25328: e2866001 add r6, r6, #1 ; 0x1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 2532c: 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 ) { 25330: 9affffee bls 252f0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 25334: e3550000 cmp r5, #0 ; 0x0 25338: 0a00000a beq 25368 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2533c: e1a01006 mov r1, r6 25340: e1a0000a mov r0, sl 25344: e3a02000 mov r2, #0 ; 0x0 25348: ebfffdcb bl 24a7c assert( block_ptr ); 2534c: e3500000 cmp r0, #0 ; 0x0 25350: 0a000046 beq 25470 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 ); 25354: e5900000 ldr r0, [r0] 25358: e1a01007 mov r1, r7 2535c: e1a02005 mov r2, r5 25360: eb002b6a bl 30110 my_length = 0; copied += to_copy; 25364: e0888005 add r8, r8, r5 } IMFS_atime_mtime_update( the_jnode ); 25368: e1a0000d mov r0, sp 2536c: e3a01000 mov r1, #0 ; 0x0 25370: ebff7b20 bl 3ff8 25374: e59d3000 ldr r3, [sp] 25378: e58a3040 str r3, [sl, #64] 2537c: e58a3044 str r3, [sl, #68] return copied; } 25380: e1a00008 mov r0, r8 25384: e28dd008 add sp, sp, #8 ; 0x8 25388: 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 ); 2538c: e1a01006 mov r1, r6 25390: e1a0000a mov r0, sl 25394: e3a02000 mov r2, #0 ; 0x0 25398: ebfffdb7 bl 24a7c assert( block_ptr ); 2539c: e3500000 cmp r0, #0 ; 0x0 253a0: 03a01fc6 moveq r1, #792 ; 0x318 253a4: 0a000015 beq 25400 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 ); 253a8: 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; 253ac: e0684004 rsb r4, r8, r4 253b0: e154000b cmp r4, fp 253b4: 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 ); 253b8: e0800008 add r0, r0, r8 253bc: e1a01007 mov r1, r7 253c0: e1a02004 mov r2, r4 253c4: eb002b51 bl 30110 src += to_copy; 253c8: e0877004 add r7, r7, r4 block++; 253cc: e2866001 add r6, r6, #1 ; 0x1 my_length -= to_copy; 253d0: e064500b rsb r5, r4, fp copied += to_copy; 253d4: e1a08004 mov r8, r4 253d8: eaffffc1 b 252e4 * 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 ); 253dc: ebffff27 bl 25080 if ( status ) 253e0: e3500000 cmp r0, #0 ; 0x0 253e4: 0affffb1 beq 252b0 rtems_set_errno_and_return_minus_one( ENOSPC ); 253e8: eb0021d0 bl 2db30 <__errno> <== NOT EXECUTED 253ec: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 253f0: e5803000 str r3, [r0] <== NOT EXECUTED 253f4: e3e08000 mvn r8, #0 ; 0x0 <== NOT EXECUTED 253f8: eaffffe0 b 25380 <== 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 ); 253fc: e3a01fcb mov r1, #812 ; 0x32c <== NOT EXECUTED 25400: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED 25404: e59f007c ldr r0, [pc, #124] ; 25488 <== NOT EXECUTED 25408: e59f207c ldr r2, [pc, #124] ; 2548c <== NOT EXECUTED 2540c: e59f307c ldr r3, [pc, #124] ; 25490 <== NOT EXECUTED 25410: ebffe106 bl 1d830 <__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 ); 25414: eb0021c5 bl 2db30 <__errno> <== NOT EXECUTED 25418: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 2541c: e5803000 str r3, [r0] <== NOT EXECUTED 25420: e3e08000 mvn r8, #0 ; 0x0 <== NOT EXECUTED 25424: eaffffd5 b 25380 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 25428: e3a01fb9 mov r1, #740 ; 0x2e4 <== NOT EXECUTED 2542c: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 25430: e59f0050 ldr r0, [pc, #80] ; 25488 <== NOT EXECUTED 25434: e59f2050 ldr r2, [pc, #80] ; 2548c <== NOT EXECUTED 25438: e59f3054 ldr r3, [pc, #84] ; 25494 <== NOT EXECUTED 2543c: ebffe0fb bl 1d830 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 25440: e3a01e2e mov r1, #736 ; 0x2e0 <== NOT EXECUTED 25444: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 25448: e59f0038 ldr r0, [pc, #56] ; 25488 <== NOT EXECUTED 2544c: e59f2038 ldr r2, [pc, #56] ; 2548c <== NOT EXECUTED 25450: e59f3040 ldr r3, [pc, #64] ; 25498 <== NOT EXECUTED 25454: ebffe0f5 bl 1d830 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 25458: e3a01fbb mov r1, #748 ; 0x2ec <== NOT EXECUTED 2545c: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 25460: e59f0020 ldr r0, [pc, #32] ; 25488 <== NOT EXECUTED 25464: e59f2020 ldr r2, [pc, #32] ; 2548c <== NOT EXECUTED 25468: e59f302c ldr r3, [pc, #44] ; 2549c <== NOT EXECUTED 2546c: ebffe0ef bl 1d830 <__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 ); 25470: e59f0010 ldr r0, [pc, #16] ; 25488 <== NOT EXECUTED 25474: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED 25478: e59f200c ldr r2, [pc, #12] ; 2548c <== NOT EXECUTED 2547c: e59f300c ldr r3, [pc, #12] ; 25490 <== NOT EXECUTED 25480: ebffe0ea bl 1d830 <__assert_func> <== NOT EXECUTED 25484: 00047534 .word 0x00047534 25488: 000455ac .word 0x000455ac 2548c: 00041fa8 .word 0x00041fa8 25490: 0004563c .word 0x0004563c 25494: 00045604 .word 0x00045604 25498: 000455f8 .word 0x000455f8 2549c: 00045634 .word 0x00045634 00008b90 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8b90: e92d40f0 push {r4, r5, r6, r7, lr} 8b94: 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 ); 8b98: 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 */ ) { 8b9c: e1a05001 mov r5, r1 8ba0: 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 ); 8ba4: e1a01007 mov r1, r7 8ba8: 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 */ ) { 8bac: 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 ); 8bb0: ebffff76 bl 8990 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8bb4: e2053a0f and r3, r5, #61440 ; 0xf000 8bb8: e3530901 cmp r3, #16384 ; 0x4000 8bbc: 0a000013 beq 8c10 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8bc0: e3530902 cmp r3, #32768 ; 0x8000 8bc4: 03a01005 moveq r1, #5 ; 0x5 8bc8: 0a000005 beq 8be4 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8bcc: e3530a02 cmp r3, #8192 ; 0x2000 8bd0: 13530a06 cmpne r3, #24576 ; 0x6000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8bd4: 058d6028 streq r6, [sp, #40] 8bd8: 058d402c streq r4, [sp, #44] 8bdc: 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) ) { 8be0: 1a00000c bne 8c18 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 8be4: e28dc028 add ip, sp, #40 ; 0x28 8be8: e59d0050 ldr r0, [sp, #80] 8bec: e1a02007 mov r2, r7 8bf0: e1a03005 mov r3, r5 8bf4: e58dc000 str ip, [sp] 8bf8: eb0009be bl b2f8 new_name, mode, &info ); if ( !new_node ) 8bfc: e3500000 cmp r0, #0 ; 0x0 8c00: 13a00000 movne r0, #0 ; 0x0 8c04: 0a000008 beq 8c2c rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 8c08: e28dd03c add sp, sp, #60 ; 0x3c 8c0c: 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 ); 8c10: e3a01001 mov r1, #1 ; 0x1 8c14: eafffff2 b 8be4 8c18: eb000cd8 bl bf80 <__errno> <== NOT EXECUTED 8c1c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 8c20: e5803000 str r3, [r0] <== NOT EXECUTED 8c24: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8c28: eafffff6 b 8c08 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8c2c: eb000cd3 bl bf80 <__errno> <== NOT EXECUTED 8c30: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 8c34: e5803000 str r3, [r0] <== NOT EXECUTED 8c38: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8c3c: eafffff1 b 8c08 <== NOT EXECUTED 000037d4 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 37d4: e5902008 ldr r2, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 37d8: e592304c ldr r3, [r2, #76] 37dc: e3530001 cmp r3, #1 ; 0x1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 37e0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 37e4: 1a000002 bne 37f4 /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 37e8: e582005c str r0, [r2, #92] 37ec: e3a00000 mov r0, #0 ; 0x0 return 0; } 37f0: 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 ); 37f4: eb00a8cd bl 2db30 <__errno> <== NOT EXECUTED 37f8: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 37fc: e5803000 str r3, [r0] <== NOT EXECUTED 3800: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3804: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00002a10 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2a10: e92d4030 push {r4, r5, lr} assert( the_jnode ); 2a14: e2504000 subs r4, r0, #0 ; 0x0 2a18: 0a000049 beq 2b44 fprintf(stdout, "%s", the_jnode->name ); 2a1c: e59f5134 ldr r5, [pc, #308] ; 2b58 2a20: e5953000 ldr r3, [r5] 2a24: e284000c add r0, r4, #12 ; 0xc 2a28: e5931008 ldr r1, [r3, #8] 2a2c: eb003692 bl 1047c switch( the_jnode->type ) { 2a30: e594204c ldr r2, [r4, #76] 2a34: e2423001 sub r3, r2, #1 ; 0x1 2a38: e3530005 cmp r3, #5 ; 0x5 2a3c: 979ff103 ldrls pc, [pc, r3, lsl #2] 2a40: ea000005 b 2a5c <== NOT EXECUTED 2a44: 00002a80 .word 0x00002a80 <== NOT EXECUTED 2a48: 00002a9c .word 0x00002a9c <== NOT EXECUTED 2a4c: 00002ab8 .word 0x00002ab8 <== NOT EXECUTED 2a50: 00002ae4 .word 0x00002ae4 <== NOT EXECUTED 2a54: 00002b10 .word 0x00002b10 <== NOT EXECUTED 2a58: 00002b28 .word 0x00002b28 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2a5c: e5953000 ldr r3, [r5] <== NOT EXECUTED 2a60: e59f10f4 ldr r1, [pc, #244] ; 2b5c <== NOT EXECUTED 2a64: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 2a68: eb003638 bl 10350 <== NOT EXECUTED assert(0); 2a6c: e59f00ec ldr r0, [pc, #236] ; 2b60 <== NOT EXECUTED 2a70: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 2a74: e59f20e8 ldr r2, [pc, #232] ; 2b64 <== NOT EXECUTED 2a78: e59f30e8 ldr r3, [pc, #232] ; 2b68 <== NOT EXECUTED 2a7c: eb000228 bl 3324 <__assert_func> <== NOT EXECUTED assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2a80: e5953000 ldr r3, [r5] 2a84: e3a0002f mov r0, #47 ; 0x2f 2a88: e5931008 ldr r1, [r3, #8] 2a8c: eb003643 bl 103a0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2a90: e59f00d4 ldr r0, [pc, #212] ; 2b6c } 2a94: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2a98: ea003d61 b 12024 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2a9c: e5952000 ldr r2, [r5] 2aa0: e5943054 ldr r3, [r4, #84] 2aa4: e5920008 ldr r0, [r2, #8] 2aa8: e59f10c0 ldr r1, [pc, #192] ; 2b70 2aac: e5942050 ldr r2, [r4, #80] 2ab0: eb003626 bl 10350 2ab4: eafffff5 b 2a90 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 2ab8: e5952000 ldr r2, [r5] <== NOT EXECUTED 2abc: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 2ac0: e5923008 ldr r3, [r2, #8] <== NOT EXECUTED 2ac4: e59f00a8 ldr r0, [pc, #168] ; 2b74 <== NOT EXECUTED 2ac8: e3a02013 mov r2, #19 ; 0x13 <== NOT EXECUTED 2acc: eb00391c bl 10f44 <== NOT EXECUTED assert(0); 2ad0: e59f0088 ldr r0, [pc, #136] ; 2b60 <== NOT EXECUTED 2ad4: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 2ad8: e59f2084 ldr r2, [pc, #132] ; 2b64 <== NOT EXECUTED 2adc: e59f3084 ldr r3, [pc, #132] ; 2b68 <== NOT EXECUTED 2ae0: eb00020f bl 3324 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2ae4: e5952000 ldr r2, [r5] <== NOT EXECUTED 2ae8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 2aec: e5923008 ldr r3, [r2, #8] <== NOT EXECUTED 2af0: e59f007c ldr r0, [pc, #124] ; 2b74 <== NOT EXECUTED 2af4: e3a02013 mov r2, #19 ; 0x13 <== NOT EXECUTED 2af8: eb003911 bl 10f44 <== NOT EXECUTED assert(0); 2afc: e59f005c ldr r0, [pc, #92] ; 2b60 <== NOT EXECUTED 2b00: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 2b04: e59f2058 ldr r2, [pc, #88] ; 2b64 <== NOT EXECUTED 2b08: e59f3058 ldr r3, [pc, #88] ; 2b68 <== NOT EXECUTED 2b0c: eb000204 bl 3324 <__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 ")", 2b10: e5953000 ldr r3, [r5] 2b14: e5942050 ldr r2, [r4, #80] 2b18: e5930008 ldr r0, [r3, #8] 2b1c: e59f1054 ldr r1, [pc, #84] ; 2b78 2b20: eb00360a bl 10350 2b24: eaffffd9 b 2a90 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)", 2b28: e5952000 ldr r2, [r5] <== NOT EXECUTED 2b2c: e5943054 ldr r3, [r4, #84] <== NOT EXECUTED 2b30: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 2b34: e59f1040 ldr r1, [pc, #64] ; 2b7c <== NOT EXECUTED 2b38: e5942050 ldr r2, [r4, #80] <== NOT EXECUTED 2b3c: eb003603 bl 10350 <== NOT EXECUTED 2b40: eaffffd2 b 2a90 <== NOT EXECUTED void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 2b44: e59f0014 ldr r0, [pc, #20] ; 2b60 <== NOT EXECUTED 2b48: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED 2b4c: e59f2010 ldr r2, [pc, #16] ; 2b64 <== NOT EXECUTED 2b50: e59f3028 ldr r3, [pc, #40] ; 2b80 <== NOT EXECUTED 2b54: eb0001f2 bl 3324 <__assert_func> <== NOT EXECUTED 2b58: 0001badc .word 0x0001badc 2b5c: 0001d658 .word 0x0001d658 2b60: 0001d5bc .word 0x0001d5bc 2b64: 0001c028 .word 0x0001c028 2b68: 0001d5b8 .word 0x0001d5b8 2b6c: 0001d5ac .word 0x0001d5ac 2b70: 0001d614 .word 0x0001d614 2b74: 0001d644 .word 0x0001d644 2b78: 0001d638 .word 0x0001d638 2b7c: 0001d628 .word 0x0001d628 2b80: 0001d608 .word 0x0001d608 00003814 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 3814: e92d4010 push {r4, lr} IMFS_jnode_t *node; int i; node = loc->node_access; 3818: e5904000 ldr r4, [r0] if ( node->type != IMFS_SYM_LINK ) 381c: e594304c ldr r3, [r4, #76] 3820: e3530004 cmp r3, #4 ; 0x4 3824: 1a000013 bne 3878 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 3828: e3520000 cmp r2, #0 ; 0x0 382c: 0a00000f beq 3870 3830: e5943050 ldr r3, [r4, #80] 3834: e5d33000 ldrb r3, [r3] 3838: 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 ); 383c: 13a00000 movne r0, #0 ; 0x0 3840: 11a0c000 movne ip, r0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 3844: 0a000009 beq 3870 3848: e2800001 add r0, r0, #1 ; 0x1 384c: e1520000 cmp r2, r0 buf[i] = node->info.sym_link.name[i]; 3850: 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++ ) 3854: e1a0c000 mov ip, r0 3858: 98bd8010 popls {r4, pc} 385c: e5943050 ldr r3, [r4, #80] 3860: e7d33000 ldrb r3, [r3, r0] 3864: e3530000 cmp r3, #0 ; 0x0 3868: 1afffff6 bne 3848 386c: e8bd8010 pop {r4, pc} 3870: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 3874: 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 ); 3878: eb00a8ac bl 2db30 <__errno> <== NOT EXECUTED 387c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3880: e5803000 str r3, [r0] <== NOT EXECUTED 3884: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3888: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00008d04 : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8d04: e5900000 ldr r0, [r0] switch ( the_jnode->type ) { 8d08: e590304c ldr r3, [r0, #76] 8d0c: e2433002 sub r3, r3, #2 ; 0x2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8d10: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 8d14: e3530004 cmp r3, #4 ; 0x4 8d18: 979ff103 ldrls pc, [pc, r3, lsl #2] 8d1c: ea000004 b 8d34 <== NOT EXECUTED 8d20: 00008da4 .word 0x00008da4 <== NOT EXECUTED 8d24: 00008d34 .word 0x00008d34 <== NOT EXECUTED 8d28: 00008d98 .word 0x00008d98 <== NOT EXECUTED 8d2c: 00008d48 .word 0x00008d48 <== NOT EXECUTED 8d30: 00008d48 .word 0x00008d48 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8d34: eb000c91 bl bf80 <__errno> <== NOT EXECUTED 8d38: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8d3c: e5803000 str r3, [r0] <== NOT EXECUTED 8d40: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8d44: 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; 8d48: e5903050 ldr r3, [r0, #80] 8d4c: 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; 8d50: e5903038 ldr r3, [r0, #56] 8d54: e5813008 str r3, [r1, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 8d58: e5902040 ldr r2, [r0, #64] 8d5c: e5812024 str r2, [r1, #36] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8d60: e1d0c3b4 ldrh ip, [r0, #52] buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 8d64: e5903044 ldr r3, [r0, #68] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8d68: e1c1c1b0 strh ip, [r1, #16] buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 8d6c: e581302c str r3, [r1, #44] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8d70: e5903030 ldr r3, [r0, #48] 8d74: e581300c str r3, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8d78: e1d033bc ldrh r3, [r0, #60] 8d7c: e1c131b2 strh r3, [r1, #18] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8d80: 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; 8d84: e1d003be ldrh r0, [r0, #62] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8d88: e5812034 str r2, [r1, #52] 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; 8d8c: e1c101b4 strh r0, [r1, #20] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8d90: e3a00000 mov r0, #0 ; 0x0 return 0; } 8d94: 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; 8d98: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 8d9c: e5813020 str r3, [r1, #32] <== NOT EXECUTED 8da0: eaffffea b 8d50 <== 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 ); 8da4: e2802050 add r2, r0, #80 ; 0x50 8da8: e892000c ldm r2, {r2, r3} 8dac: e881000c stm r1, {r2, r3} 8db0: eaffffe6 b 8d50 0000388c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 388c: e92d4070 push {r4, r5, r6, lr} 3890: e24dd03c sub sp, sp, #60 ; 0x3c /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 3894: e28d6007 add r6, sp, #7 ; 0x7 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 3898: e1a04001 mov r4, r1 389c: e1a05000 mov r5, r0 /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 38a0: e1a01006 mov r1, r6 38a4: e1a00002 mov r0, r2 38a8: e28d2038 add r2, sp, #56 ; 0x38 38ac: ebfffee7 bl 3450 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 38b0: e1a00004 mov r0, r4 38b4: eb00bd74 bl 32e8c if (info.sym_link.name == NULL) { 38b8: e3500000 cmp r0, #0 ; 0x0 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 38bc: e58d0028 str r0, [sp, #40] if (info.sym_link.name == NULL) { 38c0: 0a00000e beq 3900 /* * Create a new link node. */ new_node = IMFS_create_node( 38c4: e3a03ca2 mov r3, #41472 ; 0xa200 38c8: e28dc028 add ip, sp, #40 ; 0x28 38cc: e1a00005 mov r0, r5 38d0: e1a02006 mov r2, r6 38d4: e2433001 sub r3, r3, #1 ; 0x1 38d8: e3a01004 mov r1, #4 ; 0x4 38dc: e58dc000 str ip, [sp] 38e0: eb0064ba bl 1cbd0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 38e4: e3500000 cmp r0, #0 ; 0x0 38e8: 13a00000 movne r0, #0 ; 0x0 38ec: 0a000001 beq 38f8 free( info.sym_link.name); rtems_set_errno_and_return_minus_one( ENOMEM); } return 0; } 38f0: e28dd03c add sp, sp, #60 ; 0x3c 38f4: e8bd8070 pop {r4, r5, r6, pc} ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free( info.sym_link.name); 38f8: e59d0028 ldr r0, [sp, #40] <== NOT EXECUTED 38fc: eb000195 bl 3f58 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 3900: eb00a88a bl 2db30 <__errno> <== NOT EXECUTED 3904: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3908: e5803000 str r3, [r0] <== NOT EXECUTED 390c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3910: eafffff6 b 38f0 <== NOT EXECUTED 00003914 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 3914: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 3918: e5905000 ldr r5, [r0] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 391c: e595304c ldr r3, [r5, #76] 3920: e3530003 cmp r3, #3 ; 0x3 #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 3924: e24dd018 sub sp, sp, #24 ; 0x18 3928: e1a04000 mov r4, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 392c: 1a000014 bne 3984 if ( !node->info.hard_link.link_node ) 3930: e595c050 ldr ip, [r5, #80] 3934: e35c0000 cmp ip, #0 ; 0x0 3938: 0a000017 beq 399c rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 393c: e890000f ldm r0, {r0, r1, r2, r3} 3940: e88d000f stm sp, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 3944: 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; 3948: e58dc000 str ip, [sp] IMFS_Set_handlers( &the_link ); 394c: eb006502 bl 1cd5c /* * 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) 3950: e5952050 ldr r2, [r5, #80] 3954: e1d233b4 ldrh r3, [r2, #52] 3958: e3530001 cmp r3, #1 ; 0x1 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 395c: 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) 3960: 0a000012 beq 39b0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 3964: e2433001 sub r3, r3, #1 ; 0x1 3968: e1c233b4 strh r3, [r2, #52] IMFS_update_ctime( node->info.hard_link.link_node ); 396c: e28d0010 add r0, sp, #16 ; 0x10 3970: e3a01000 mov r1, #0 ; 0x0 3974: eb00019f bl 3ff8 3978: e5952050 ldr r2, [r5, #80] 397c: e59d3010 ldr r3, [sp, #16] 3980: e5823048 str r3, [r2, #72] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 3984: e1a00004 mov r0, r4 3988: e5943004 ldr r3, [r4, #4] 398c: e1a0e00f mov lr, pc 3990: e593f034 ldr pc, [r3, #52] return result; } 3994: e28dd018 add sp, sp, #24 ; 0x18 3998: 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 ); 399c: eb00a863 bl 2db30 <__errno> <== NOT EXECUTED 39a0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 39a4: e5803000 str r3, [r0] <== NOT EXECUTED 39a8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 39ac: eafffff8 b 3994 <== 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 ); 39b0: e1a0000d mov r0, sp 39b4: e59d3004 ldr r3, [sp, #4] 39b8: e1a0e00f mov lr, pc 39bc: e593f034 ldr pc, [r3, #52] if ( result != 0 ) 39c0: e3500000 cmp r0, #0 ; 0x0 39c4: 13e00000 mvnne r0, #0 ; 0x0 39c8: 0affffed beq 3984 39cc: eafffff0 b 3994 000039d0 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 39d0: e5902008 ldr r2, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 39d4: e592304c ldr r3, [r2, #76] 39d8: e3530001 cmp r3, #1 ; 0x1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 39dc: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 39e0: 1a000006 bne 3a00 /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 39e4: e592305c ldr r3, [r2, #92] 39e8: e3530000 cmp r3, #0 ; 0x0 39ec: 0a000008 beq 3a14 /* * 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; 39f0: e3a03000 mov r3, #0 ; 0x0 39f4: e582305c str r3, [r2, #92] 39f8: e1a00003 mov r0, r3 return 0; } 39fc: 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 ); 3a00: eb00a84a bl 2db30 <__errno> <== NOT EXECUTED 3a04: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 3a08: e5803000 str r3, [r0] <== NOT EXECUTED 3a0c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3a10: 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 */ 3a14: eb00a845 bl 2db30 <__errno> <== NOT EXECUTED 3a18: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3a1c: e5803000 str r3, [r0] <== NOT EXECUTED 3a20: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3a24: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 000015bc : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 15bc: e59f30a4 ldr r3, [pc, #164] ; 1668 15c0: e5933000 ldr r3, [r3] 15c4: e3530000 cmp r3, #0 ; 0x0 void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 15c8: e92d4070 push {r4, r5, r6, lr} 15cc: e1a06000 mov r6, r0 15d0: e1a05001 mov r5, r1 15d4: e1a04002 mov r4, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->initialize)(); 15d8: 11a0e00f movne lr, pc 15dc: 1593f000 ldrne pc, [r3] /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 15e0: eb001feb bl 9594 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 15e4: e59f3080 ldr r3, [pc, #128] ; 166c 15e8: e5933000 ldr r3, [r3] 15ec: e3530000 cmp r3, #0 ; 0x0 15f0: 01a04006 moveq r4, r6 15f4: 0a000004 beq 160c starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 15f8: e1a01004 mov r1, r4 <== NOT EXECUTED 15fc: e1a00006 mov r0, r6 <== NOT EXECUTED 1600: e1a0e00f mov lr, pc <== NOT EXECUTED 1604: e593f000 ldr pc, [r3] <== NOT EXECUTED 1608: 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() ) 160c: e59f305c ldr r3, [pc, #92] ; 1670 1610: e5932000 ldr r2, [r3] 1614: e5d21028 ldrb r1, [r2, #40] 1618: e3510000 cmp r1, #0 ; 0x0 161c: 1a00000b bne 1650 void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 1620: e1a01004 mov r1, r4 1624: e59f0048 ldr r0, [pc, #72] ; 1674 1628: e1a02005 mov r2, r5 162c: e3a03004 mov r3, #4 ; 0x4 1630: eb001071 bl 57fc <_Heap_Initialize> &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 1634: e3500000 cmp r0, #0 ; 0x0 1638: 0a000009 beq 1664 rtems_print_buffer( (start + length) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif MSBUMP(space_available, length); 163c: e59f2034 ldr r2, [pc, #52] ; 1678 1640: e5923000 ldr r3, [r2] 1644: e0853003 add r3, r5, r3 1648: e5823000 str r3, [r2] } 164c: 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 ); 1650: e1a00004 mov r0, r4 <== NOT EXECUTED 1654: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1658: e1a02005 mov r2, r5 <== NOT EXECUTED 165c: eb002c50 bl c7a4 <== NOT EXECUTED 1660: eaffffee b 1620 <== NOT EXECUTED starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) rtems_fatal_error_occurred( status ); 1664: eb000e18 bl 4ecc <== NOT EXECUTED 1668: 00016bc4 .word 0x00016bc4 166c: 00016bc8 .word 0x00016bc8 1670: 00016f9c .word 0x00016f9c 1674: 00016d9c .word 0x00016d9c 1678: 00016df4 .word 0x00016df4 00002910 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2910: 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 ) 2914: 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 ) { 2918: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 291c: 0a000036 beq 29fc <== NOT EXECUTED return; if ( !print_handler ) 2920: e59f312c ldr r3, [pc, #300] ; 2a54 <== NOT EXECUTED 2924: e593a000 ldr sl, [r3] <== NOT EXECUTED 2928: e35a0000 cmp sl, #0 ; 0x0 <== NOT EXECUTED 292c: 0a000032 beq 29fc <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 2930: 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 ); 2934: 159490f4 ldrne r9, [r4, #244] <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 2938: 128470c4 addne r7, r4, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 293c: 0a000035 beq 2a18 <== 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); 2940: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 2944: e2835010 add r5, r3, #16 ; 0x10 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2948: e2428010 sub r8, r2, #16 ; 0x10 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 294c: e1a00005 mov r0, r5 <== NOT EXECUTED 2950: e1a01008 mov r1, r8 <== NOT EXECUTED 2954: ebffffd8 bl 28bc <== NOT EXECUTED if ( high_water_mark ) 2958: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 295c: 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 ) 2960: 01a0b000 moveq fp, r0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 2964: 1060b003 rsbne fp, r0, r3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 2968: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 296c: 0a000031 beq 2a38 <== NOT EXECUTED (*print_handler)( 2970: e5945008 ldr r5, [r4, #8] <== NOT EXECUTED 2974: e59f60dc ldr r6, [pc, #220] ; 2a58 <== NOT EXECUTED 2978: e28d200b add r2, sp, #11 ; 0xb <== NOT EXECUTED 297c: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED 2980: e1a00005 mov r0, r5 <== NOT EXECUTED 2984: e5964000 ldr r4, [r6] <== NOT EXECUTED 2988: eb0014a5 bl 7c24 <== NOT EXECUTED 298c: e1a02005 mov r2, r5 <== NOT EXECUTED 2990: e1a03000 mov r3, r0 <== NOT EXECUTED 2994: e59f10c0 ldr r1, [pc, #192] ; 2a5c <== NOT EXECUTED 2998: e1a00004 mov r0, r4 <== NOT EXECUTED 299c: e1a0e00f mov lr, pc <== NOT EXECUTED 29a0: e12fff1a bx sl <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 29a4: e5973000 ldr r3, [r7] <== NOT EXECUTED 29a8: e5972004 ldr r2, [r7, #4] <== NOT EXECUTED 29ac: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 29b0: e0823003 add r3, r2, r3 <== NOT EXECUTED 29b4: e5960000 ldr r0, [r6] <== NOT EXECUTED 29b8: e58d9000 str r9, [sp] <== NOT EXECUTED 29bc: e58d8004 str r8, [sp, #4] <== NOT EXECUTED 29c0: e59f1098 ldr r1, [pc, #152] ; 2a60 <== NOT EXECUTED 29c4: e59fc088 ldr ip, [pc, #136] ; 2a54 <== NOT EXECUTED 29c8: e1a0e00f mov lr, pc <== NOT EXECUTED 29cc: e59cf000 ldr pc, [ip] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 29d0: e59f308c ldr r3, [pc, #140] ; 2a64 <== NOT EXECUTED 29d4: e5932000 ldr r2, [r3] <== NOT EXECUTED 29d8: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 29dc: e59f3070 ldr r3, [pc, #112] ; 2a54 <== NOT EXECUTED 29e0: e59f0070 ldr r0, [pc, #112] ; 2a58 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 29e4: 0a000006 beq 2a04 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 29e8: e5900000 ldr r0, [r0] <== NOT EXECUTED 29ec: e1a0200b mov r2, fp <== NOT EXECUTED 29f0: e59f1070 ldr r1, [pc, #112] ; 2a68 <== NOT EXECUTED 29f4: e1a0e00f mov lr, pc <== NOT EXECUTED 29f8: e593f000 ldr pc, [r3] <== NOT EXECUTED } } 29fc: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 2a00: 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" ); 2a04: e59f1060 ldr r1, [pc, #96] ; 2a6c <== NOT EXECUTED 2a08: e5900000 ldr r0, [r0] <== NOT EXECUTED 2a0c: e1a0e00f mov lr, pc <== NOT EXECUTED 2a10: e593f000 ldr pc, [r3] <== NOT EXECUTED 2a14: eafffff8 b 29fc <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 2a18: e59f2050 ldr r2, [pc, #80] ; 2a70 <== NOT EXECUTED 2a1c: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 2a20: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 2a24: 12844001 addne r4, r4, #1 ; 0x1 <== NOT EXECUTED 2a28: 11a07002 movne r7, r2 <== NOT EXECUTED 2a2c: 11a09004 movne r9, r4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 2a30: 1affffc2 bne 2940 <== NOT EXECUTED 2a34: eafffff0 b 29fc <== 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 ); 2a38: e59f6018 ldr r6, [pc, #24] ; 2a58 <== NOT EXECUTED 2a3c: e59f1030 ldr r1, [pc, #48] ; 2a74 <== NOT EXECUTED 2a40: e5960000 ldr r0, [r6] <== NOT EXECUTED 2a44: e3e02000 mvn r2, #0 ; 0x0 <== NOT EXECUTED 2a48: e1a0e00f mov lr, pc <== NOT EXECUTED 2a4c: e12fff1a bx sl <== NOT EXECUTED 2a50: eaffffd3 b 29a4 <== NOT EXECUTED 2a54: 00047530 .word 0x00047530 2a58: 0004752c .word 0x0004752c 2a5c: 00043110 .word 0x00043110 2a60: 00043130 .word 0x00043130 2a64: 00047528 .word 0x00047528 2a68: 00043160 .word 0x00043160 2a6c: 00043150 .word 0x00043150 2a70: 0005a584 .word 0x0005a584 2a74: 00043120 .word 0x00043120 000028bc : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 28bc: e1a0c000 mov ip, 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++) 28c0: 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; 28c4: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 28c8: e0802001 add r2, r0, r1 <== NOT EXECUTED 28cc: e1500002 cmp r0, r2 <== NOT EXECUTED 28d0: 2a00000c bcs 2908 <== NOT EXECUTED if (*base != U32_PATTERN) 28d4: e3a03ca6 mov r3, #42496 ; 0xa600 <== NOT EXECUTED 28d8: e243305b sub r3, r3, #91 ; 0x5b <== NOT EXECUTED 28dc: e59c1010 ldr r1, [ip, #16] <== NOT EXECUTED 28e0: e1833803 orr r3, r3, r3, lsl #16 <== NOT EXECUTED 28e4: e1510003 cmp r1, r3 <== NOT EXECUTED 28e8: 0a000003 beq 28fc <== NOT EXECUTED 28ec: e12fff1e bx lr <== NOT EXECUTED 28f0: e5903000 ldr r3, [r0] <== NOT EXECUTED 28f4: e1530001 cmp r3, r1 <== NOT EXECUTED 28f8: 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++) 28fc: e2800004 add r0, r0, #4 ; 0x4 <== NOT EXECUTED 2900: e1520000 cmp r2, r0 <== NOT EXECUTED 2904: 8afffff9 bhi 28f0 <== NOT EXECUTED 2908: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 290c: e12fff1e bx lr <== NOT EXECUTED 0000716c <_CORE_RWLock_Release>: CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ISR_Level level; Thread_Control *executing = _Thread_Executing; 716c: e59f30e4 ldr r3, [pc, #228] ; 7258 <_CORE_RWLock_Release+0xec> */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 7170: e92d4010 push {r4, lr} ISR_Level level; Thread_Control *executing = _Thread_Executing; 7174: e5931000 ldr r1, [r3] */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 7178: 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 ); 717c: e10f2000 mrs r2, CPSR 7180: e38230c0 orr r3, r2, #192 ; 0xc0 7184: e129f003 msr CPSR_fc, r3 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 7188: e5903044 ldr r3, [r0, #68] 718c: e3530000 cmp r3, #0 ; 0x0 7190: 0a00002b beq 7244 <_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 ) { 7194: e3530001 cmp r3, #1 ; 0x1 7198: 0a000021 beq 7224 <_CORE_RWLock_Release+0xb8> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 719c: e3a03000 mov r3, #0 ; 0x0 71a0: 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; 71a4: e5843044 str r3, [r4, #68] _ISR_Enable( level ); 71a8: e129f002 msr CPSR_fc, r2 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 71ac: e1a00004 mov r0, r4 71b0: eb0005b9 bl 889c <_Thread_queue_Dequeue> if ( next ) { 71b4: e3500000 cmp r0, #0 ; 0x0 71b8: 0a000017 beq 721c <_CORE_RWLock_Release+0xb0> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 71bc: e5903030 ldr r3, [r0, #48] 71c0: e3530001 cmp r3, #1 ; 0x1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 71c4: 02833001 addeq r3, r3, #1 ; 0x1 71c8: 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 ) { 71cc: 0a000012 beq 721c <_CORE_RWLock_Release+0xb0> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 71d0: e5943048 ldr r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 71d4: e3a02001 mov r2, #1 ; 0x1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 71d8: e2833001 add r3, r3, #1 ; 0x1 71dc: e5843048 str r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 71e0: e5842044 str r2, [r4, #68] 71e4: ea000006 b 7204 <_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 || 71e8: e5933030 ldr r3, [r3, #48] 71ec: e3530001 cmp r3, #1 ; 0x1 71f0: 0a000009 beq 721c <_CORE_RWLock_Release+0xb0> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 71f4: e5943048 ldr r3, [r4, #72] 71f8: e2833001 add r3, r3, #1 ; 0x1 71fc: e5843048 str r3, [r4, #72] _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 7200: eb0006bb bl 8cf4 <_Thread_queue_Extract> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 7204: e1a00004 mov r0, r4 7208: eb000706 bl 8e28 <_Thread_queue_First> if ( !next || 720c: 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 ); 7210: e1a01003 mov r1, r3 7214: 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 || 7218: 1afffff2 bne 71e8 <_CORE_RWLock_Release+0x7c> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 721c: e3a00000 mov r0, #0 ; 0x0 7220: 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; 7224: e5903048 ldr r3, [r0, #72] 7228: e2433001 sub r3, r3, #1 ; 0x1 if ( the_rwlock->number_of_readers != 0 ) { 722c: 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; 7230: e5803048 str r3, [r0, #72] if ( the_rwlock->number_of_readers != 0 ) { 7234: 0affffd8 beq 719c <_CORE_RWLock_Release+0x30> /* must be unlocked again */ _ISR_Enable( level ); 7238: e129f002 msr CPSR_fc, r2 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 723c: e3a00000 mov r0, #0 ; 0x0 7240: 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 ); 7244: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 7248: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 724c: e5813034 str r3, [r1, #52] <== NOT EXECUTED } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 7250: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 7254: e8bd8010 pop {r4, pc} <== NOT EXECUTED 7258: 00019644 .word 0x00019644 000136cc <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 136cc: e590304c ldr r3, [r0, #76] 136d0: 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 ) { 136d4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 136d8: e1a07000 mov r7, r0 136dc: e1a06002 mov r6, r2 136e0: e1a08001 mov r8, r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 136e4: 33a00001 movcc r0, #1 ; 0x1 136e8: 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 ) { 136ec: e5973048 ldr r3, [r7, #72] 136f0: 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))) { 136f4: 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 ) { 136f8: 0a000009 beq 13724 <_CORE_message_queue_Broadcast+0x58> *count = 0; 136fc: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED 13700: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 13704: e5823000 str r3, [r2] <== NOT EXECUTED 13708: e1a00003 mov r0, r3 <== NOT EXECUTED 1370c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 13710: e594002c ldr r0, [r4, #44] 13714: eb0020f1 bl 1bae0 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 13718: e5943028 ldr r3, [r4, #40] 1371c: e5836000 str r6, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 13720: e2855001 add r5, r5, #1 ; 0x1 * 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))) { 13724: e1a00007 mov r0, r7 13728: eb00099d bl 15da4 <_Thread_queue_Dequeue> 1372c: e2504000 subs r4, r0, #0 ; 0x0 13730: e1a01008 mov r1, r8 13734: e1a02006 mov r2, r6 13738: 1afffff4 bne 13710 <_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; 1373c: e59d301c ldr r3, [sp, #28] 13740: e1a00004 mov r0, r4 13744: e5835000 str r5, [r3] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 13748: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00012740 <_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 ) { 12740: 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 ) { 12744: e590c04c ldr ip, [r0, #76] 12748: 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 ) { 1274c: e1a04000 mov r4, r0 12750: e1a07002 mov r7, r2 12754: e1a0a001 mov sl, r1 12758: e1a09003 mov r9, r3 1275c: 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 ) { 12760: 33a00001 movcc r0, #1 ; 0x1 12764: 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 ) { 12768: e5945048 ldr r5, [r4, #72] 1276c: e3550000 cmp r5, #0 ; 0x0 12770: 0a00001d beq 127ec <_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 < 12774: e5943044 ldr r3, [r4, #68] 12778: e1530005 cmp r3, r5 1277c: 8a00002a bhi 1282c <_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 ) { 12780: e3580000 cmp r8, #0 ; 0x0 12784: 03a00002 moveq r0, #2 ; 0x2 12788: 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() ) { 1278c: e59f30dc ldr r3, [pc, #220] ; 12870 <_CORE_message_queue_Submit+0x130> 12790: e5932000 ldr r2, [r3] 12794: e3520000 cmp r2, #0 ; 0x0 12798: 1a000021 bne 12824 <_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; 1279c: e59f30d0 ldr r3, [pc, #208] ; 12874 <_CORE_message_queue_Submit+0x134> 127a0: e5932000 ldr r2, [r3] _ISR_Disable( level ); 127a4: e10f1000 mrs r1, CPSR 127a8: e38130c0 orr r3, r1, #192 ; 0xc0 127ac: 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; 127b0: e59d3024 ldr r3, [sp, #36] 127b4: e5823024 str r3, [r2, #36] 127b8: e3a03001 mov r3, #1 ; 0x1 127bc: e5843030 str r3, [r4, #48] Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 127c0: e5829020 str r9, [r2, #32] executing->Wait.return_argument_second.immutable_object = buffer; 127c4: e582a02c str sl, [r2, #44] executing->Wait.option = (uint32_t) size; 127c8: e5827030 str r7, [r2, #48] { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 127cc: e5824044 str r4, [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 ); 127d0: e129f001 msr CPSR_fc, r1 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 127d4: e59f209c ldr r2, [pc, #156] ; 12878 <_CORE_message_queue_Submit+0x138> 127d8: e1a00004 mov r0, r4 127dc: e59d102c ldr r1, [sp, #44] 127e0: ebffe906 bl cc00 <_Thread_queue_Enqueue_with_handler> 127e4: e3a00007 mov r0, #7 ; 0x7 127e8: 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 ); 127ec: ebffe8a1 bl ca78 <_Thread_queue_Dequeue> if ( the_thread ) { 127f0: e2506000 subs r6, r0, #0 ; 0x0 127f4: 05945048 ldreq r5, [r4, #72] 127f8: 0affffdd beq 12774 <_CORE_message_queue_Submit+0x34> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 127fc: e1a0100a mov r1, sl 12800: e596002c ldr r0, [r6, #44] 12804: e1a02007 mov r2, r7 12808: eb001412 bl 17858 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1280c: e5963028 ldr r3, [r6, #40] 12810: e5837000 str r7, [r3] the_thread->Wait.count = submit_type; 12814: e59d3024 ldr r3, [sp, #36] 12818: e1a00005 mov r0, r5 1281c: e5863024 str r3, [r6, #36] 12820: 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; 12824: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 12828: 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 *) 1282c: e2840068 add r0, r4, #104 ; 0x68 12830: ebffe1f1 bl affc <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 12834: e2505000 subs r5, r0, #0 ; 0x0 12838: 0afffff9 beq 12824 <_CORE_message_queue_Submit+0xe4> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1283c: e1a0100a mov r1, sl 12840: e1a02007 mov r2, r7 12844: e2850010 add r0, r5, #16 ; 0x10 12848: eb001402 bl 17858 buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; the_message->priority = submit_type; 1284c: e59d3024 ldr r3, [sp, #36] 12850: e5853008 str r3, [r5, #8] _CORE_message_queue_Insert_message( 12854: e1a00004 mov r0, r4 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 12858: e585700c str r7, [r5, #12] the_message->priority = submit_type; _CORE_message_queue_Insert_message( 1285c: e1a01005 mov r1, r5 12860: e59d2024 ldr r2, [sp, #36] 12864: eb000c31 bl 15930 <_CORE_message_queue_Insert_message> 12868: e3a00000 mov r0, #0 ; 0x0 1286c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 12870: 000272e0 .word 0x000272e0 12874: 00027304 .word 0x00027304 12878: 0000d034 .word 0x0000d034 000052e4 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 52e4: e92d40f0 push {r4, r5, r6, r7, lr} 52e8: e1a05000 mov r5, r0 52ec: e1a04002 mov r4, r2 52f0: e1a07001 mov r7, r1 /* 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; 52f4: e891000f ldm r1, {r0, r1, r2, r3} the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; 52f8: e3a06000 mov r6, #0 ; 0x0 if ( initial_lock == CORE_MUTEX_LOCKED ) { 52fc: e3540000 cmp r4, #0 ; 0x0 /* 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; 5300: e285c040 add ip, r5, #64 ; 0x40 5304: e88c000f stm ip, {r0, r1, r2, r3} the_mutex->lock = initial_lock; 5308: e5854050 str r4, [r5, #80] the_mutex->blocked_count = 0; 530c: e5856058 str r6, [r5, #88] _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; 5310: 15856060 strne r6, [r5, #96] #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 5314: 15856054 strne r6, [r5, #84] the_mutex->holder = NULL; 5318: 1585605c strne r6, [r5, #92] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 531c: 1a00000b bne 5350 <_CORE_mutex_Initialize+0x6c> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 5320: e59f2070 ldr r2, [pc, #112] ; 5398 <_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; 5324: e3a03001 mov r3, #1 ; 0x1 the_mutex->holder = _Thread_Executing; 5328: e5921000 ldr r1, [r2] 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; 532c: e5853054 str r3, [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; 5330: e5952048 ldr r2, [r5, #72] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 5334: e5913008 ldr r3, [r1, #8] if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 5338: 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; 533c: 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; 5340: e585105c str r1, [r5, #92] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 5344: 0a00000a beq 5374 <_CORE_mutex_Initialize+0x90> 5348: e3520003 cmp r2, #3 ; 0x3 534c: 0a000008 beq 5374 <_CORE_mutex_Initialize+0x90> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 5350: e5971008 ldr r1, [r7, #8] 5354: e1a00005 mov r0, r5 5358: e2511000 subs r1, r1, #0 ; 0x0 535c: 13a01001 movne r1, #1 ; 0x1 5360: e3a02b01 mov r2, #1024 ; 0x400 5364: e3a03005 mov r3, #5 ; 0x5 5368: eb000768 bl 7110 <_Thread_queue_Initialize> 536c: e3a00000 mov r0, #0 ; 0x0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 5370: 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 < 5374: e595304c ldr r3, [r5, #76] 5378: e5912014 ldr r2, [r1, #20] 537c: 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++; 5380: 2591301c ldrcs r3, [r1, #28] 5384: 22833001 addcs r3, r3, #1 ; 0x1 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 < 5388: 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++; 538c: 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 < 5390: 2affffee bcs 5350 <_CORE_mutex_Initialize+0x6c> 5394: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 5398: 00016fc4 .word 0x00016fc4 0000a6dc <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; a6dc: e59f313c ldr r3, [pc, #316] ; a820 <_CORE_mutex_Seize_interrupt_trylock+0x144> a6e0: e593c000 ldr ip, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a6e4: e3a02000 mov r2, #0 ; 0x0 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { a6e8: e92d4010 push {r4, lr} CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; a6ec: e5914000 ldr r4, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a6f0: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a6f4: e5903050 ldr r3, [r0, #80] a6f8: e1530002 cmp r3, r2 a6fc: 0a00000d beq a738 <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; a700: 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; a704: 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; a708: e59c2008 ldr r2, [ip, #8] the_mutex->nest_count = 1; a70c: e3a03001 mov r3, #1 ; 0x1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a710: 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; a714: e5802060 str r2, [r0, #96] the_mutex->nest_count = 1; a718: 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; a71c: 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 ) || a720: 0a000009 beq a74c <_CORE_mutex_Seize_interrupt_trylock+0x70> a724: e3510003 cmp r1, #3 ; 0x3 a728: 0a000007 beq a74c <_CORE_mutex_Seize_interrupt_trylock+0x70> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); a72c: e129f004 msr CPSR_fc, r4 a730: e3a00000 mov r0, #0 ; 0x0 a734: 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 ) ) { a738: e590305c ldr r3, [r0, #92] a73c: e15c0003 cmp ip, r3 a740: 0a000017 beq a7a4 <_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 ); a744: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } a748: 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++; a74c: e59c301c ldr r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { a750: 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++; a754: e2833001 add r3, r3, #1 ; 0x1 a758: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { a75c: 1afffff2 bne a72c <_CORE_mutex_Seize_interrupt_trylock+0x50> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; a760: e590204c ldr r2, [r0, #76] current = executing->current_priority; a764: e59c3014 ldr r3, [ip, #20] if ( current == ceiling ) { a768: e1520003 cmp r2, r3 a76c: 0a00001c beq a7e4 <_CORE_mutex_Seize_interrupt_trylock+0x108> _ISR_Enable( level ); return 0; } if ( current > ceiling ) { a770: 3a00001e bcc a7f0 <_CORE_mutex_Seize_interrupt_trylock+0x114> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; a774: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ a778: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; a77c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; a780: e58c3034 str r3, [ip, #52] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ a784: e5802054 str r2, [r0, #84] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; a788: e5801050 str r1, [r0, #80] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ a78c: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED a790: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED a794: e58c301c str r3, [ip, #28] <== NOT EXECUTED _ISR_Enable( level ); a798: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED a79c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED a7a0: e8bd8010 pop {r4, pc} <== NOT EXECUTED * 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 ) { a7a4: e5903040 ldr r3, [r0, #64] a7a8: e3530000 cmp r3, #0 ; 0x0 a7ac: 0a000006 beq a7cc <_CORE_mutex_Seize_interrupt_trylock+0xf0> a7b0: e3530001 cmp r3, #1 ; 0x1 a7b4: 1affffe2 bne a744 <_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; a7b8: e3a03002 mov r3, #2 ; 0x2 a7bc: e58c3034 str r3, [ip, #52] _ISR_Enable( level ); a7c0: e129f004 msr CPSR_fc, r4 a7c4: e3a00000 mov r0, #0 ; 0x0 a7c8: 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++; a7cc: e5903054 ldr r3, [r0, #84] a7d0: e2833001 add r3, r3, #1 ; 0x1 a7d4: e5803054 str r3, [r0, #84] _ISR_Enable( level ); a7d8: e129f004 msr CPSR_fc, r4 a7dc: e3a00000 mov r0, #0 ; 0x0 a7e0: e8bd8010 pop {r4, pc} Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); a7e4: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED a7e8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED a7ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a7f0: e59f202c ldr r2, [pc, #44] ; a824 <_CORE_mutex_Seize_interrupt_trylock+0x148> a7f4: e5923000 ldr r3, [r2] a7f8: e2833001 add r3, r3, #1 ; 0x1 a7fc: e5823000 str r3, [r2] return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( level ); a800: e129f004 msr CPSR_fc, r4 _Thread_Change_priority( a804: e3a02000 mov r2, #0 ; 0x0 a808: e590104c ldr r1, [r0, #76] a80c: e590005c ldr r0, [r0, #92] a810: ebffeeb8 bl 62f8 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); a814: ebfff029 bl 68c0 <_Thread_Enable_dispatch> a818: e3a00000 mov r0, #0 ; 0x0 a81c: e8bd8010 pop {r4, pc} a820: 00016fc4 .word 0x00016fc4 a824: 00016f0c .word 0x00016f0c 000054d4 <_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 ) { 54d4: e5d03044 ldrb r3, [r0, #68] 54d8: 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 ) { 54dc: e92d4010 push {r4, lr} 54e0: 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; 54e4: 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 ) { 54e8: 0a000004 beq 5500 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 54ec: e59f3138 ldr r3, [pc, #312] ; 562c <_CORE_mutex_Surrender+0x158> 54f0: e5932000 ldr r2, [r3] 54f4: e1500002 cmp r0, r2 54f8: 13a00003 movne r0, #3 ; 0x3 54fc: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 5500: e5943054 ldr r3, [r4, #84] 5504: e3530000 cmp r3, #0 ; 0x0 5508: 0a000020 beq 5590 <_CORE_mutex_Surrender+0xbc> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 550c: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 5510: 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--; 5514: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 5518: 1a00001e bne 5598 <_CORE_mutex_Surrender+0xc4> 551c: 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 ) || 5520: e3520002 cmp r2, #2 ; 0x2 5524: 0a00002c beq 55dc <_CORE_mutex_Surrender+0x108> 5528: e3520003 cmp r2, #3 ; 0x3 552c: 0a00002a beq 55dc <_CORE_mutex_Surrender+0x108> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 5530: 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 ) || 5534: 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; 5538: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 553c: 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 ) || 5540: 0a00001b beq 55b4 <_CORE_mutex_Surrender+0xe0> 5544: e3520003 cmp r2, #3 ; 0x3 5548: 0a000019 beq 55b4 <_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 ) ) ) { 554c: e1a00004 mov r0, r4 5550: eb0005c0 bl 6c58 <_Thread_queue_Dequeue> 5554: e2501000 subs r1, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5558: 03a03001 moveq r3, #1 ; 0x1 555c: 05843050 streq r3, [r4, #80] 5560: 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 ) ) ) { 5564: 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 ) { 5568: e594c048 ldr ip, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 556c: e5912008 ldr r2, [r1, #8] the_mutex->nest_count = 1; 5570: e3a03001 mov r3, #1 ; 0x1 switch ( the_mutex->Attributes.discipline ) { 5574: e35c0002 cmp ip, #2 ; 0x2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 5578: e5842060 str r2, [r4, #96] the_mutex->nest_count = 1; 557c: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 5580: e584105c str r1, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 5584: 0a000023 beq 5618 <_CORE_mutex_Surrender+0x144> 5588: e35c0003 cmp ip, #3 ; 0x3 558c: 0a000016 beq 55ec <_CORE_mutex_Surrender+0x118> } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5590: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 5594: 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 ) { 5598: e5943040 ldr r3, [r4, #64] 559c: e3530000 cmp r3, #0 ; 0x0 55a0: 0afffffa beq 5590 <_CORE_mutex_Surrender+0xbc> 55a4: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 55a8: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 55ac: 1affffda bne 551c <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 55b0: 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 && 55b4: e590301c ldr r3, [r0, #28] 55b8: e3530000 cmp r3, #0 ; 0x0 55bc: 1affffe2 bne 554c <_CORE_mutex_Surrender+0x78> 55c0: e5901018 ldr r1, [r0, #24] 55c4: e5903014 ldr r3, [r0, #20] 55c8: e1510003 cmp r1, r3 55cc: 0affffde beq 554c <_CORE_mutex_Surrender+0x78> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 55d0: e3a02001 mov r2, #1 ; 0x1 55d4: eb000347 bl 62f8 <_Thread_Change_priority> 55d8: eaffffdb b 554c <_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--; 55dc: e590301c ldr r3, [r0, #28] 55e0: e2433001 sub r3, r3, #1 ; 0x1 55e4: e580301c str r3, [r0, #28] 55e8: eaffffd0 b 5530 <_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++; 55ec: e591301c ldr r3, [r1, #28] <== NOT EXECUTED 55f0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 55f4: e581301c str r3, [r1, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 55f8: e5912014 ldr r2, [r1, #20] <== NOT EXECUTED 55fc: e594104c ldr r1, [r4, #76] <== NOT EXECUTED 5600: e1510002 cmp r1, r2 <== NOT EXECUTED 5604: 2affffe1 bcs 5590 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 5608: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 560c: eb000339 bl 62f8 <_Thread_Change_priority> <== NOT EXECUTED 5610: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5614: e8bd8010 pop {r4, pc} <== NOT EXECUTED 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++; 5618: e591301c ldr r3, [r1, #28] 561c: e2833001 add r3, r3, #1 ; 0x1 5620: e581301c str r3, [r1, #28] 5624: e3a00000 mov r0, #0 ; 0x0 5628: e8bd8010 pop {r4, pc} 562c: 00016fc4 .word 0x00016fc4 00005f2c <_CORE_spinlock_Release>: CORE_spinlock_Control *the_spinlock ) { ISR_Level level; _ISR_Disable( level ); 5f2c: e10fc000 mrs ip, CPSR 5f30: e38c30c0 orr r3, ip, #192 ; 0xc0 5f34: e129f003 msr CPSR_fc, r3 /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 5f38: e5903004 ldr r3, [r0, #4] 5f3c: e3530000 cmp r3, #0 ; 0x0 5f40: 1a000002 bne 5f50 <_CORE_spinlock_Release+0x24> _ISR_Enable( level ); 5f44: e129f00c msr CPSR_fc, ip 5f48: e3a00006 mov r0, #6 ; 0x6 5f4c: e12fff1e bx lr } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 5f50: e59f3040 ldr r3, [pc, #64] ; 5f98 <_CORE_spinlock_Release+0x6c> 5f54: e5932000 ldr r2, [r3] 5f58: e590300c ldr r3, [r0, #12] 5f5c: e5921008 ldr r1, [r2, #8] 5f60: e1530001 cmp r3, r1 5f64: 0a000002 beq 5f74 <_CORE_spinlock_Release+0x48> _ISR_Enable( level ); 5f68: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 5f6c: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 5f70: e12fff1e bx lr <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 5f74: e5903008 ldr r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 5f78: e3a02000 mov r2, #0 ; 0x0 } /* * Let it be unlocked. */ the_spinlock->users -= 1; 5f7c: e2433001 sub r3, r3, #1 ; 0x1 5f80: e5803008 str r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 5f84: e5802004 str r2, [r0, #4] the_spinlock->holder = 0; 5f88: e580200c str r2, [r0, #12] _ISR_Enable( level ); 5f8c: e129f00c msr CPSR_fc, ip 5f90: e3a00000 mov r0, #0 ; 0x0 return CORE_SPINLOCK_SUCCESSFUL; } 5f94: e12fff1e bx lr 5f98: 00011e44 .word 0x00011e44 00005f9c <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 5f9c: e92d41f0 push {r4, r5, r6, r7, r8, lr} ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 5fa0: e59f8104 ldr r8, [pc, #260] ; 60ac <_CORE_spinlock_Wait+0x110> 5fa4: e5983000 ldr r3, [r8] CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 5fa8: e1a06002 mov r6, r2 5fac: e1a04000 mov r4, r0 5fb0: e201c0ff and ip, r1, #255 ; 0xff ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 5fb4: e0827003 add r7, r2, r3 _ISR_Disable( level ); 5fb8: e10f0000 mrs r0, CPSR 5fbc: e38030c0 orr r3, r0, #192 ; 0xc0 5fc0: e129f003 msr CPSR_fc, r3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 5fc4: e5943004 ldr r3, [r4, #4] 5fc8: e3530001 cmp r3, #1 ; 0x1 5fcc: 0a000027 beq 6070 <_CORE_spinlock_Wait+0xd4> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 5fd0: e5943008 ldr r3, [r4, #8] 5fd4: e2833001 add r3, r3, #1 ; 0x1 5fd8: e5843008 str r3, [r4, #8] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 5fdc: e5942004 ldr r2, [r4, #4] 5fe0: e3520000 cmp r2, #0 ; 0x0 5fe4: 0a000012 beq 6034 <_CORE_spinlock_Wait+0x98> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 5fe8: e35c0000 cmp ip, #0 ; 0x0 5fec: 159f50bc ldrne r5, [pc, #188] ; 60b0 <_CORE_spinlock_Wait+0x114> 5ff0: 0a000018 beq 6058 <_CORE_spinlock_Wait+0xbc> } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 5ff4: e3560000 cmp r6, #0 ; 0x0 5ff8: 0a000002 beq 6008 <_CORE_spinlock_Wait+0x6c> 5ffc: e5983000 ldr r3, [r8] <== NOT EXECUTED 6000: e1570003 cmp r7, r3 <== NOT EXECUTED 6004: 9a000022 bls 6094 <_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 ); 6008: e129f000 msr CPSR_fc, r0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 600c: eb000489 bl 7238 <_Thread_Enable_dispatch> 6010: e5953000 ldr r3, [r5] 6014: e2833001 add r3, r3, #1 ; 0x1 6018: 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 ); 601c: e10f0000 mrs r0, CPSR 6020: e38030c0 orr r3, r0, #192 ; 0xc0 6024: 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 ) { 6028: e5943004 ldr r3, [r4, #4] 602c: e3530000 cmp r3, #0 ; 0x0 6030: 1affffef bne 5ff4 <_CORE_spinlock_Wait+0x58> the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 6034: e59f2078 ldr r2, [pc, #120] ; 60b4 <_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; 6038: e3a03001 mov r3, #1 ; 0x1 603c: e5843004 str r3, [r4, #4] the_spinlock->holder = _Thread_Executing->Object.id; 6040: e5923000 ldr r3, [r2] 6044: e5931008 ldr r1, [r3, #8] 6048: e584100c str r1, [r4, #12] _ISR_Enable( level ); 604c: e129f000 msr CPSR_fc, r0 6050: e3a00000 mov r0, #0 ; 0x0 6054: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 6058: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 605c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 6060: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 6064: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 6068: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED 606c: 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) && 6070: e59f303c ldr r3, [pc, #60] ; 60b4 <_CORE_spinlock_Wait+0x118> 6074: e5932000 ldr r2, [r3] 6078: e594300c ldr r3, [r4, #12] 607c: e5921008 ldr r1, [r2, #8] 6080: e1530001 cmp r3, r1 6084: 1affffd1 bne 5fd0 <_CORE_spinlock_Wait+0x34> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 6088: e129f000 msr CPSR_fc, r0 608c: e3a00001 mov r0, #1 ; 0x1 6090: 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; 6094: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 6098: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 609c: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 60a0: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 60a4: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 60a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 60ac: 00011ee4 .word 0x00011ee4 60b0: 00011d8c .word 0x00011d8c 60b4: 00011e44 .word 0x00011e44 00021c8c <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 21c8c: e10f2000 mrs r2, CPSR <== NOT EXECUTED 21c90: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 21c94: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 21c98: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 21c9c: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 21ca0: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 21ca4: 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; 21ca8: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 21cac: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 21cb0: e12fff1e bx lr <== NOT EXECUTED 0000a5bc <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { a5bc: e59f3010 ldr r3, [pc, #16] ; a5d4 <_Debug_Is_enabled+0x18> <== NOT EXECUTED a5c0: e5932000 ldr r2, [r3] <== NOT EXECUTED a5c4: e1100002 tst r0, r2 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } a5c8: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED a5cc: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED a5d0: e12fff1e bx lr <== NOT EXECUTED a5d4: 00016fc8 .word 0x00016fc8 000041bc <_Event_Seize>: rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 41bc: e59fc108 ldr ip, [pc, #264] ; 42cc <_Event_Seize+0x110> rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 41c0: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 41c4: e59c5000 ldr r5, [ip] executing->Wait.return_code = RTEMS_SUCCESSFUL; 41c8: e3a04000 mov r4, #0 ; 0x0 41cc: e5854034 str r4, [r5, #52] rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 41d0: e1a08002 mov r8, r2 41d4: e1a07003 mov r7, r3 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 41d8: e5954104 ldr r4, [r5, #260] _ISR_Disable( level ); 41dc: e10f6000 mrs r6, CPSR 41e0: e38630c0 orr r3, r6, #192 ; 0xc0 41e4: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 41e8: e5942000 ldr r2, [r4] seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 41ec: e010c002 ands ip, r0, r2 41f0: 0a000003 beq 4204 <_Event_Seize+0x48> 41f4: e150000c cmp r0, ip 41f8: 0a00001f beq 427c <_Event_Seize+0xc0> 41fc: e3110002 tst r1, #2 ; 0x2 4200: 1a00001d bne 427c <_Event_Seize+0xc0> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 4204: e3110001 tst r1, #1 ; 0x1 4208: 1a000016 bne 4268 <_Event_Seize+0xac> executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 420c: e59f40bc ldr r4, [pc, #188] ; 42d0 <_Event_Seize+0x114> 4210: e3a03001 mov r3, #1 ; 0x1 4214: e5843000 str r3, [r4] executing->Wait.option = (uint32_t) option_set; 4218: e5851030 str r1, [r5, #48] executing->Wait.count = (uint32_t) event_in; 421c: e5850024 str r0, [r5, #36] executing->Wait.return_argument = event_out; 4220: e5857028 str r7, [r5, #40] _ISR_Enable( level ); 4224: e129f006 msr CPSR_fc, r6 if ( ticks ) { 4228: e3580000 cmp r8, #0 ; 0x0 422c: 1a00001a bne 429c <_Event_Seize+0xe0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 4230: e1a00005 mov r0, r5 4234: e3a01c01 mov r1, #256 ; 0x100 4238: eb000c24 bl 72d0 <_Thread_Set_state> _ISR_Disable( level ); 423c: e10f2000 mrs r2, CPSR 4240: e38230c0 orr r3, r2, #192 ; 0xc0 4244: e129f003 msr CPSR_fc, r3 sync_state = _Event_Sync_state; 4248: e5940000 ldr r0, [r4] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 424c: e3a03000 mov r3, #0 ; 0x0 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4250: e3500001 cmp r0, #1 ; 0x1 _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4254: e5843000 str r3, [r4] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4258: 0a00000d beq 4294 <_Event_Seize+0xd8> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 425c: e1a01005 mov r1, r5 <== NOT EXECUTED } 4260: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 4264: ea00080f b 62a8 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 4268: e129f006 msr CPSR_fc, r6 executing->Wait.return_code = RTEMS_UNSATISFIED; 426c: e3a0300d mov r3, #13 ; 0xd 4270: e5853034 str r3, [r5, #52] *event_out = seized_events; 4274: e587c000 str ip, [r7] 4278: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 427c: e1e0300c mvn r3, ip 4280: e0033002 and r3, r3, r2 4284: e5843000 str r3, [r4] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 4288: e129f006 msr CPSR_fc, r6 *event_out = seized_events; 428c: e587c000 str ip, [r7] 4290: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 4294: e129f002 msr CPSR_fc, r2 4298: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} executing->Wait.return_argument = event_out; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 429c: e5953008 ldr r3, [r5, #8] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 42a0: e59f202c ldr r2, [pc, #44] ; 42d4 <_Event_Seize+0x118> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 42a4: e3a01000 mov r1, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 42a8: e585106c str r1, [r5, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 42ac: e5851050 str r1, [r5, #80] the_watchdog->routine = routine; 42b0: e5852064 str r2, [r5, #100] the_watchdog->id = id; 42b4: e5853068 str r3, [r5, #104] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 42b8: e5858054 str r8, [r5, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 42bc: e59f0014 ldr r0, [pc, #20] ; 42d8 <_Event_Seize+0x11c> 42c0: e2851048 add r1, r5, #72 ; 0x48 42c4: eb000e03 bl 7ad8 <_Watchdog_Insert> 42c8: eaffffd8 b 4230 <_Event_Seize+0x74> 42cc: 00016fc4 .word 0x00016fc4 42d0: 000177b0 .word 0x000177b0 42d4: 0000448c .word 0x0000448c 42d8: 00016fe4 .word 0x00016fe4 00004334 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 4334: 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 ]; 4338: e590c104 ldr ip, [r0, #260] */ void _Event_Surrender( Thread_Control *the_thread ) { 433c: 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; 4340: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 4344: e10f6000 mrs r6, CPSR 4348: e38630c0 orr r3, r6, #192 ; 0xc0 434c: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 4350: e59c0000 ldr r0, [ip] event_condition = (rtems_event_set) the_thread->Wait.count; 4354: 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 ) ) { 4358: e0115000 ands r5, r1, r0 435c: 0a000024 beq 43f4 <_Event_Surrender+0xc0> /* * 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() && 4360: e59f3118 ldr r3, [pc, #280] ; 4480 <_Event_Surrender+0x14c> 4364: e5932000 ldr r2, [r3] 4368: e3520000 cmp r2, #0 ; 0x0 436c: 0a000003 beq 4380 <_Event_Surrender+0x4c> 4370: e59f310c ldr r3, [pc, #268] ; 4484 <_Event_Surrender+0x150> 4374: e5932000 ldr r2, [r3] 4378: e1540002 cmp r4, r2 437c: 0a000029 beq 4428 <_Event_Surrender+0xf4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 4380: e5943010 ldr r3, [r4, #16] 4384: e3130c01 tst r3, #256 ; 0x100 4388: 0a000017 beq 43ec <_Event_Surrender+0xb8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 438c: e1510005 cmp r1, r5 4390: 0a000001 beq 439c <_Event_Surrender+0x68> 4394: e3170002 tst r7, #2 ; 0x2 4398: 0a000013 beq 43ec <_Event_Surrender+0xb8> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 439c: e1e03005 mvn r3, r5 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 43a0: 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 ); 43a4: e0033000 and r3, r3, r0 the_thread->Wait.count = 0; 43a8: 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 ); 43ac: e58c3000 str r3, [ip] the_thread->Wait.count = 0; 43b0: e5842024 str r2, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 43b4: e5815000 str r5, [r1] _ISR_Flash( level ); 43b8: e10f3000 mrs r3, CPSR 43bc: e129f006 msr CPSR_fc, r6 43c0: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 43c4: e5943050 ldr r3, [r4, #80] 43c8: e3530002 cmp r3, #2 ; 0x2 43cc: 0a00000a beq 43fc <_Event_Surrender+0xc8> _ISR_Enable( level ); 43d0: e129f006 msr CPSR_fc, r6 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 43d4: e3a01201 mov r1, #268435456 ; 0x10000000 43d8: e2811bff add r1, r1, #261120 ; 0x3fc00 43dc: e1a00004 mov r0, r4 43e0: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 43e4: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 43e8: ea00082d b 64a4 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 43ec: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 43f0: 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 ); 43f4: e129f006 msr CPSR_fc, r6 43f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 43fc: e3a03003 mov r3, #3 ; 0x3 4400: 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 ); 4404: e129f006 msr CPSR_fc, r6 (void) _Watchdog_Remove( &the_thread->Timer ); 4408: e2840048 add r0, r4, #72 ; 0x48 440c: eb000e20 bl 7c94 <_Watchdog_Remove> 4410: e3a01201 mov r1, #268435456 ; 0x10000000 4414: e2811bff add r1, r1, #261120 ; 0x3fc00 4418: e1a00004 mov r0, r4 441c: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 4420: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 4424: ea00081e b 64a4 <_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() && 4428: e59f8058 ldr r8, [pc, #88] ; 4488 <_Event_Surrender+0x154> <== NOT EXECUTED 442c: e5983000 ldr r3, [r8] <== NOT EXECUTED 4430: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 4434: 0a000002 beq 4444 <_Event_Surrender+0x110> <== NOT EXECUTED 4438: e5983000 ldr r3, [r8] <== NOT EXECUTED 443c: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 4440: 1affffce bne 4380 <_Event_Surrender+0x4c> <== NOT EXECUTED _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) ) { 4444: e1510005 cmp r1, r5 <== NOT EXECUTED 4448: 0a000001 beq 4454 <_Event_Surrender+0x120> <== NOT EXECUTED 444c: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 4450: 0a000008 beq 4478 <_Event_Surrender+0x144> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 4454: e1e03005 mvn r3, r5 <== NOT EXECUTED 4458: e0033000 and r3, r3, r0 <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 445c: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED 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 ); 4460: e58c3000 str r3, [ip] <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4464: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED _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; 4468: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 446c: e5843024 str r3, [r4, #36] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4470: e5882000 str r2, [r8] <== NOT EXECUTED ((_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; 4474: e5815000 str r5, [r1] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 4478: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 447c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 4480: 00016fa0 .word 0x00016fa0 4484: 00016fc4 .word 0x00016fc4 4488: b0 .byte 0xb0 4489: 77 .byte 0x77 448a: 0001 .short 0x0001 0000448c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 448c: e52de004 push {lr} ; (str lr, [sp, #-4]!) 4490: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 4494: e1a0100d mov r1, sp 4498: eb000911 bl 68e4 <_Thread_Get> switch ( location ) { 449c: e59d1000 ldr r1, [sp] 44a0: e3510000 cmp r1, #0 ; 0x0 44a4: 1a000015 bne 4500 <_Event_Timeout+0x74> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 44a8: e10fc000 mrs ip, CPSR 44ac: e38c30c0 orr r3, ip, #192 ; 0xc0 44b0: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 44b4: e5903024 ldr r3, [r0, #36] 44b8: e3530000 cmp r3, #0 ; 0x0 44bc: 0a000011 beq 4508 <_Event_Timeout+0x7c> _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 44c0: e59f3070 ldr r3, [pc, #112] ; 4538 <_Event_Timeout+0xac> 44c4: e5932000 ldr r2, [r3] 44c8: e1500002 cmp r0, r2 _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 44cc: e5801024 str r1, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 44d0: 0a000012 beq 4520 <_Event_Timeout+0x94> (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 44d4: e3a03006 mov r3, #6 ; 0x6 44d8: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 44dc: e129f00c msr CPSR_fc, ip 44e0: e3a01201 mov r1, #268435456 ; 0x10000000 44e4: e2811bff add r1, r1, #261120 ; 0x3fc00 44e8: e2811ffe add r1, r1, #1016 ; 0x3f8 44ec: eb0007ec bl 64a4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 44f0: e59f2044 ldr r2, [pc, #68] ; 453c <_Event_Timeout+0xb0> 44f4: e5923000 ldr r3, [r2] 44f8: e2433001 sub r3, r3, #1 ; 0x1 44fc: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4500: e28dd004 add sp, sp, #4 ; 0x4 4504: e8bd8000 pop {pc} 4508: e59f202c ldr r2, [pc, #44] ; 453c <_Event_Timeout+0xb0> <== NOT EXECUTED 450c: e5923000 ldr r3, [r2] <== NOT EXECUTED 4510: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 4514: e5823000 str r3, [r2] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4518: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 451c: eafffff7 b 4500 <_Event_Timeout+0x74> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 4520: e59f2018 ldr r2, [pc, #24] ; 4540 <_Event_Timeout+0xb4> <== NOT EXECUTED 4524: e5923000 ldr r3, [r2] <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 4528: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 452c: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED 4530: 95823000 strls r3, [r2] <== NOT EXECUTED 4534: eaffffe6 b 44d4 <_Event_Timeout+0x48> <== NOT EXECUTED 4538: 00016fc4 .word 0x00016fc4 453c: 00016f0c .word 0x00016f0c 4540: 000177b0 .word 0x000177b0 00008630 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 8630: 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; 8634: e5909010 ldr r9, [r0, #16] void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 8638: e1a07000 mov r7, r0 863c: e1a03001 mov r3, r1 8640: 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); 8644: 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; 8648: e2433004 sub r3, r3, #4 ; 0x4 void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 864c: 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); 8650: e1a01009 mov r1, r9 8654: 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; 8658: e58d3004 str r3, [sp, #4] uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 865c: eb000163 bl 8bf0 <_Heap_Calc_block_size> if(the_size == 0) 8660: e3500000 cmp r0, #0 ; 0x0 8664: e58d0008 str r0, [sp, #8] 8668: 0a000064 beq 8800 <_Heap_Allocate_aligned+0x1d0> */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 866c: e5975008 ldr r5, [r7, #8] return NULL; if(alignment == 0) 8670: e35b0000 cmp fp, #0 ; 0x0 8674: 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; 8678: e1570005 cmp r7, r5 867c: 0a00005f beq 8800 <_Heap_Allocate_aligned+0x1d0> 8680: e3a0a000 mov sl, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 8684: 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. */ 8688: e59d1008 ldr r1, [sp, #8] 868c: e3c36001 bic r6, r3, #1 ; 0x1 8690: e1510006 cmp r1, r6 8694: 8a000023 bhi 8728 <_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; 8698: 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; 869c: e0852006 add r2, r5, r6 aligned_user_addr = block_end - end_to_user_offs; 86a0: e0634002 rsb r4, r3, r2 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 86a4: e1a0100b mov r1, fp 86a8: 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; 86ac: e58d200c str r2, [sp, #12] 86b0: eb003e7c bl 180a8 <__umodsi3> 86b4: 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)); 86b8: e1a00008 mov r0, r8 86bc: e1a01009 mov r1, r9 86c0: eb003e78 bl 180a8 <__umodsi3> 86c4: e2854008 add r4, r5, #8 ; 0x8 86c8: 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) { 86cc: e1540002 cmp r4, r2 86d0: 8a000014 bhi 8728 <_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) { 86d4: e597c014 ldr ip, [r7, #20] 86d8: e0643002 rsb r3, r4, r2 86dc: e153000c cmp r3, ip 86e0: 2a00001c bcs 8758 <_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) { 86e4: e0643008 rsb r3, r4, r8 86e8: e1590003 cmp r9, r3 86ec: 81a02004 movhi r2, r4 86f0: 8a000018 bhi 8758 <_Heap_Allocate_aligned+0x128> uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 86f4: e1a00004 mov r0, r4 86f8: e1a0100b mov r1, fp 86fc: e58dc000 str ip, [sp] 8700: eb003e68 bl 180a8 <__umodsi3> *value = r ? v - r + a : v; 8704: e3500000 cmp r0, #0 ; 0x0 8708: 1084300b addne r3, r4, fp 870c: 10600003 rsbne r0, r0, r3 8710: 01a03000 moveq r3, r0 8714: 10643000 rsbne r3, r4, r0 8718: 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) { 871c: e1590003 cmp r9, r3 8720: e59dc000 ldr ip, [sp] 8724: 8a000009 bhi 8750 <_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) 8728: e5955008 ldr r5, [r5, #8] 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; 872c: e1570005 cmp r7, r5 the_block = the_block->next, ++search_count) 8730: 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; 8734: 1affffd2 bne 8684 <_Heap_Allocate_aligned+0x54> 8738: e3a00000 mov r0, #0 ; 0x0 } } } } if(stats->max_search < search_count) 873c: e5973044 ldr r3, [r7, #68] 8740: e153000a cmp r3, sl stats->max_search = search_count; 8744: 3587a044 strcc sl, [r7, #68] return user_ptr; } 8748: e28dd010 add sp, sp, #16 ; 0x10 874c: 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) { 8750: e1a02004 mov r2, r4 8754: e1a08000 mov r8, r0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 8758: e3580000 cmp r8, #0 ; 0x0 875c: 0afffff1 beq 8728 <_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; 8760: e59d100c ldr r1, [sp, #12] 8764: e2813008 add r3, r1, #8 ; 0x8 8768: 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; 876c: 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) { 8770: 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; 8774: 23823001 orrcs r3, r2, #1 ; 0x1 8778: 25853004 strcs r3, [r5, #4] the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 877c: 27a52002 strcs r2, [r5, r2]! the_block->size = alloc_size; 8780: 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) { 8784: 2a000007 bcs 87a8 <_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; 8788: e5973038 ldr r3, [r7, #56] Heap_Block *the_block ) { Heap_Block *block = the_block; Heap_Block *next = block->next; 878c: e2851008 add r1, r5, #8 ; 0x8 8790: e8910006 ldm r1, {r1, r2} 8794: e2433001 sub r3, r3, #1 ; 0x1 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 8798: e581200c str r2, [r1, #12] 879c: e5873038 str r3, [r7, #56] { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 87a0: e5821008 str r1, [r2, #8] 87a4: 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 ); 87a8: 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; 87ac: e5923004 ldr r3, [r2, #4] 87b0: e3833001 orr r3, r3, #1 ; 0x1 87b4: e5823004 str r3, [r2, #4] /* Update statistics */ stats->free_size -= alloc_size; 87b8: e2871030 add r1, r7, #48 ; 0x30 87bc: e891000a ldm r1, {r1, r3} 87c0: e0641001 rsb r1, r4, r1 if(stats->min_free_size > stats->free_size) 87c4: 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; 87c8: 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; 87cc: 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; 87d0: e5871030 str r1, [r7, #48] if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; 87d4: 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; 87d8: 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; 87dc: 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; 87e0: 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; 87e4: e083300a add r3, r3, sl stats->allocs += 1; 87e8: 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; 87ec: 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; 87f0: e587304c str r3, [r7, #76] stats->allocs += 1; 87f4: e5871048 str r1, [r7, #72] check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 87f8: e1a00008 mov r0, r8 87fc: eaffffce b 873c <_Heap_Allocate_aligned+0x10c> } } } if(stats->max_search < search_count) stats->max_search = search_count; 8800: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 8804: eaffffcf b 8748 <_Heap_Allocate_aligned+0x118> <== NOT EXECUTED 0002bf4c <_Heap_Get_information>: Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2bf4c: e92d0070 push {r4, r5, r6} Heap_Block *the_block = the_heap->start; 2bf50: e2802020 add r2, r0, #32 ; 0x20 2bf54: e8920044 ldm r2, {r2, r6} 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; 2bf58: 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 ) { 2bf5c: e1520006 cmp r2, r6 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2bf60: 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; 2bf64: 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; 2bf68: e5813000 str r3, [r1] the_info->Free.total = 0; 2bf6c: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 2bf70: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 2bf74: e581300c str r3, [r1, #12] the_info->Used.total = 0; 2bf78: e5813014 str r3, [r1, #20] the_info->Used.largest = 0; while ( the_block != end ) { 2bf7c: 0a000020 beq 2c004 <_Heap_Get_information+0xb8> 2bf80: e5925004 ldr r5, [r2, #4] 2bf84: ea00000b b 2bfb8 <_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++; 2bf88: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 2bf8c: e59c1014 ldr r1, [ip, #20] if ( the_info->Used.largest < the_size ) 2bf90: e59c2010 ldr r2, [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++; 2bf94: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 2bf98: e1520000 cmp r2, 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; 2bf9c: e0811000 add r1, r1, 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++; 2bfa0: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 2bfa4: e58c1014 str r1, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 2bfa8: 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 ) { 2bfac: 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 ) 2bfb0: 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 ) { 2bfb4: 0a000012 beq 2c004 <_Heap_Get_information+0xb8> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2bfb8: 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 ); 2bfbc: e0824000 add r4, r2, r0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2bfc0: 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) ) { 2bfc4: e3150001 tst r5, #1 ; 0x1 2bfc8: 1affffee bne 2bf88 <_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++; 2bfcc: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 2bfd0: e59c1008 ldr r1, [ip, #8] if ( the_info->Free.largest < the_size ) 2bfd4: e59c2004 ldr r2, [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++; 2bfd8: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 2bfdc: e1520000 cmp r2, 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; 2bfe0: e0811000 add r1, r1, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 2bfe4: 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++; 2bfe8: e58c3000 str r3, [ip] the_info->Free.total += the_size; 2bfec: e58c1008 str r1, [ip, #8] if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 2bff0: e5943000 ldr r3, [r4] 2bff4: e1530000 cmp r3, r0 2bff8: 0affffeb beq 2bfac <_Heap_Get_information+0x60> 2bffc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2c000: ea000003 b 2c014 <_Heap_Get_information+0xc8> <== 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; 2c004: e59c3014 ldr r3, [ip, #20] 2c008: e2833008 add r3, r3, #8 ; 0x8 2c00c: e58c3014 str r3, [ip, #20] 2c010: e3a00000 mov r0, #0 ; 0x0 return HEAP_GET_INFORMATION_SUCCESSFUL; } 2c014: e8bd0070 pop {r4, r5, r6} 2c018: e12fff1e bx lr 00014b70 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 14b70: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 14b74: 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; 14b78: e59dc030 ldr ip, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 14b7c: e1a05000 mov r5, r0 14b80: e1a09003 mov r9, r3 uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 14b84: e3a03000 mov r3, #0 ; 0x0 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; 14b88: e5900014 ldr r0, [r0, #20] uint32_t const page_size = the_heap->page_size; 14b8c: e595b010 ldr fp, [r5, #16] *old_mem_size = 0; 14b90: e5893000 str r3, [r9] *avail_mem_size = 0; 14b94: 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; 14b98: e58d0004 str r0, [sp, #4] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 14b9c: e1a04001 mov r4, r1 /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 14ba0: e1a00001 mov r0, r1 14ba4: e5951010 ldr r1, [r5, #16] 14ba8: e1a08002 mov r8, r2 14bac: ebfff862 bl 12d3c <__umodsi3> 14bb0: 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 ); 14bb4: e595c020 ldr ip, [r5, #32] 14bb8: 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); 14bbc: 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)) 14bc0: e156000c cmp r6, ip 14bc4: 33a03000 movcc r3, #0 ; 0x0 14bc8: 23a03001 movcs r3, #1 ; 0x1 14bcc: e1560001 cmp r6, r1 14bd0: 83a03000 movhi r3, #0 ; 0x0 14bd4: e3530000 cmp r3, #0 ; 0x0 14bd8: 0a00002d beq 14c94 <_Heap_Resize_block+0x124> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 14bdc: e5962004 ldr r2, [r6, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 14be0: 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 ); 14be4: 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) || 14be8: e15c0007 cmp ip, r7 14bec: 83a03000 movhi r3, #0 ; 0x0 14bf0: 93a03001 movls r3, #1 ; 0x1 14bf4: e1510007 cmp r1, r7 14bf8: 33a03000 movcc r3, #0 ; 0x0 14bfc: e3530000 cmp r3, #0 ; 0x0 14c00: 0a000023 beq 14c94 <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 14c04: e5973004 ldr r3, [r7, #4] 14c08: e3130001 tst r3, #1 ; 0x1 14c0c: 0a000020 beq 14c94 <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 14c10: 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) || 14c14: e1510007 cmp r1, r7 14c18: 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 ); 14c1c: e0873003 add r3, r7, r3 14c20: 15933004 ldrne r3, [r3, #4] 14c24: 12033001 andne r3, r3, #1 ; 0x1 14c28: 03a00001 moveq r0, #1 ; 0x1 14c2c: 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) 14c30: e0643007 rsb r3, r4, r7 !_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) || 14c34: 058d0008 streq r0, [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) 14c38: e2830004 add r0, r3, #4 ; 0x4 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 14c3c: 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; 14c40: 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; 14c44: 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) { 14c48: 2a000014 bcs 14ca0 <_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 */ 14c4c: e59d1008 ldr r1, [sp, #8] 14c50: e3510000 cmp r1, #0 ; 0x0 14c54: 1a00000c bne 14c8c <_Heap_Resize_block+0x11c> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 14c58: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 14c5c: e1a00004 mov r0, r4 14c60: e1a0100b mov r1, fp 14c64: ebfff834 bl 12d3c <__umodsi3> *value = r ? v - r + a : v; 14c68: e3500000 cmp r0, #0 ; 0x0 14c6c: 1084300b addne r3, r4, fp 14c70: e59d2004 ldr r2, [sp, #4] 14c74: 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) 14c78: e59d3000 ldr r3, [sp] 14c7c: e1540002 cmp r4, r2 14c80: 21a02004 movcs r2, r4 14c84: e1530002 cmp r3, r2 14c88: 2a000049 bcs 14db4 <_Heap_Resize_block+0x244> } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 14c8c: e3a00001 mov r0, #1 ; 0x1 14c90: ea000000 b 14c98 <_Heap_Resize_block+0x128> 14c94: e3a00002 mov r0, #2 ; 0x2 } 14c98: e28dd00c add sp, sp, #12 ; 0xc 14c9c: 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; 14ca0: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 14ca4: e1a00004 mov r0, r4 14ca8: e1a0100b mov r1, fp 14cac: ebfff822 bl 12d3c <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 14cb0: e0544000 subs r4, r4, r0 14cb4: 0a000020 beq 14d3c <_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) { 14cb8: 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; 14cbc: e064000a rsb r0, r4, sl if (new_block_size < min_block_size) { 14cc0: e15c0000 cmp ip, r0 14cc4: 9a000021 bls 14d50 <_Heap_Resize_block+0x1e0> uint32_t delta = min_block_size - new_block_size; 14cc8: e060300c rsb r3, r0, ip _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 14ccc: e0544003 subs r4, r4, r3 ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 14cd0: 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) { 14cd4: 1a00001d bne 14d50 <_Heap_Resize_block+0x1e0> ++stats->resizes; 14cd8: e5953054 ldr r3, [r5, #84] 14cdc: e2833001 add r3, r3, #1 ; 0x1 14ce0: e5853054 str r3, [r5, #84] 14ce4: e1a00004 mov r0, r4 14ce8: eaffffea b 14c98 <_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) { 14cec: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 14cf0: e15c0004 cmp ip, r4 <== NOT EXECUTED 14cf4: 8a000010 bhi 14d3c <_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 ); 14cf8: 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; 14cfc: 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; 14d00: 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; 14d04: 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; 14d08: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 14d0c: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 14d10: 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 */ 14d14: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 14d18: 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 */ 14d1c: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 14d20: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 14d24: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED 14d28: e1a00005 mov r0, r5 <== NOT EXECUTED 14d2c: ebffd70a bl a95c <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 14d30: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED 14d34: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 14d38: e5803000 str r3, [r0] <== NOT EXECUTED } } } ++stats->resizes; 14d3c: e5953054 ldr r3, [r5, #84] 14d40: e2833001 add r3, r3, #1 ; 0x1 14d44: e5853054 str r3, [r5, #84] 14d48: e3a00000 mov r0, #0 ; 0x0 14d4c: eaffffd1 b 14c98 <_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) { 14d50: e59d1008 ldr r1, [sp, #8] 14d54: e3510000 cmp r1, #0 ; 0x0 14d58: 1affffe3 bne 14cec <_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; 14d5c: 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; 14d60: 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; 14d64: e0842003 add r2, r4, r3 14d68: e0861000 add r1, r6, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 14d6c: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 14d70: e3820001 orr r0, r2, #1 ; 0x1 next_next_block->prev_size = new_next_block_size; 14d74: 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; 14d78: e5863004 str r3, [r6, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 14d7c: 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; 14d80: e5953030 ldr r3, [r5, #48] 14d84: e0833004 add r3, r3, r4 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 14d88: e597000c ldr r0, [r7, #12] Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 14d8c: e597c008 ldr ip, [r7, #8] 14d90: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 14d94: e59d3030 ldr r3, [sp, #48] 14d98: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 14d9c: e581c008 str ip, [r1, #8] block->prev = prev; 14da0: e581000c str r0, [r1, #12] 14da4: e5832000 str r2, [r3] next->prev = prev->next = block; 14da8: e5801008 str r1, [r0, #8] 14dac: e58c100c str r1, [ip, #12] 14db0: eaffffe1 b 14d3c <_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 = 14db4: e1a01007 mov r1, r7 14db8: e1a00005 mov r0, r5 14dbc: ebffc2ea bl 596c <_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; 14dc0: e080000a add r0, r0, sl 14dc4: e1800009 orr r0, r0, r9 14dc8: e5860004 str r0, [r6, #4] --stats->used_blocks; 14dcc: e5953040 ldr r3, [r5, #64] 14dd0: e2433001 sub r3, r3, #1 ; 0x1 14dd4: e5853040 str r3, [r5, #64] 14dd8: eaffffd7 b 14d3c <_Heap_Resize_block+0x1cc> 0000e244 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { e244: 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; e248: e5903024 ldr r3, [r0, #36] Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; e24c: e5906020 ldr r6, [r0, #32] bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { e250: e24dd004 sub sp, sp, #4 ; 0x4 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; e254: e58d3000 str r3, [sp] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { e258: e5963004 ldr r3, [r6, #4] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) e25c: e251b000 subs fp, r1, #0 ; 0x0 source = the_heap->stats.instance; e260: b590b028 ldrlt fp, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { e264: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { e268: e1a05000 mov r5, r0 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { e26c: 13a08000 movne r8, #0 ; 0x0 e270: 0a000086 beq e490 <_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) { e274: e5962000 ldr r2, [r6] e278: e5953010 ldr r3, [r5, #16] e27c: e1520003 cmp r2, r3 e280: 0a000003 beq e294 <_Heap_Walk+0x50> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); e284: e59f0238 ldr r0, [pc, #568] ; e4c4 <_Heap_Walk+0x280> <== NOT EXECUTED e288: e1a0100b mov r1, fp <== NOT EXECUTED e28c: ebffd9fb bl 4a80 <== NOT EXECUTED e290: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } while ( the_block != end ) { e294: e59d3000 ldr r3, [sp] e298: e1560003 cmp r6, r3 e29c: 0a000080 beq e4a4 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); e2a0: 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)) { e2a4: e5951020 ldr r1, [r5, #32] e2a8: e3c07001 bic r7, r0, #1 ; 0x1 e2ac: 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 ); e2b0: e0864007 add r4, r6, r7 e2b4: e1540001 cmp r4, r1 e2b8: 33a03000 movcc r3, #0 ; 0x0 e2bc: 23a03001 movcs r3, #1 ; 0x1 e2c0: e1540002 cmp r4, r2 e2c4: 83a03000 movhi r3, #0 ; 0x0 e2c8: e3530000 cmp r3, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); e2cc: 1200a001 andne sl, r0, #1 ; 0x1 e2d0: 11a09004 movne r9, r4 e2d4: 0a000075 beq e4b0 <_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)) { e2d8: e5943004 ldr r3, [r4, #4] e2dc: e3130001 tst r3, #1 ; 0x1 e2e0: 1a00003f bne e3e4 <_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) { e2e4: e5943000 ldr r3, [r4] e2e8: e1530007 cmp r3, r7 e2ec: 0a000003 beq e300 <_Heap_Walk+0xbc> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); e2f0: e59f01d0 ldr r0, [pc, #464] ; e4c8 <_Heap_Walk+0x284> <== NOT EXECUTED e2f4: e1a0100b mov r1, fp <== NOT EXECUTED e2f8: ebffd9e0 bl 4a80 <== NOT EXECUTED e2fc: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { e300: e35a0000 cmp sl, #0 ; 0x0 e304: 1a000005 bne e320 <_Heap_Walk+0xdc> if (do_dump || error) printk("\n"); e308: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED e30c: 1a00005c bne e484 <_Heap_Walk+0x240> <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); e310: e59f01b4 ldr r0, [pc, #436] ; e4cc <_Heap_Walk+0x288> <== NOT EXECUTED e314: e1a0100b mov r1, fp <== NOT EXECUTED e318: ebffd9d8 bl 4a80 <== NOT EXECUTED e31c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; e320: 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) e324: e1530006 cmp r3, r6 e328: 11550003 cmpne r5, r3 e32c: 0a000003 beq e340 <_Heap_Walk+0xfc> block = block->next; e330: 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) e334: e1530006 cmp r3, r6 e338: 11550003 cmpne r5, r3 e33c: 1afffffb bne e330 <_Heap_Walk+0xec> block = block->next; if(block != the_block) { e340: e1530006 cmp r3, r6 e344: 0a000026 beq e3e4 <_Heap_Walk+0x1a0> if (do_dump || error) printk("\n"); e348: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED e34c: 1a000049 bne e478 <_Heap_Walk+0x234> <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); e350: e59f0178 ldr r0, [pc, #376] ; e4d0 <_Heap_Walk+0x28c> <== NOT EXECUTED e354: e1a0100b mov r1, fp <== NOT EXECUTED e358: ebffd9c8 bl 4a80 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); e35c: e59f0170 ldr r0, [pc, #368] ; e4d4 <_Heap_Walk+0x290> <== NOT EXECUTED e360: ebffd9c6 bl 4a80 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { e364: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED e368: e1530007 cmp r3, r7 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); e36c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { e370: 8a000020 bhi e3f8 <_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)) { e374: e1a00007 mov r0, r7 e378: e5951010 ldr r1, [r5, #16] e37c: eb002749 bl 180a8 <__umodsi3> e380: e3500000 cmp r0, #0 ; 0x0 e384: 1a000031 bne e450 <_Heap_Walk+0x20c> printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) e388: e3580000 cmp r8, #0 ; 0x0 e38c: 1a000032 bne e45c <_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 ) { e390: e59d3000 ldr r3, [sp] e394: e1530004 cmp r3, r4 e398: 0a000041 beq e4a4 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); e39c: 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)) { e3a0: e5951020 ldr r1, [r5, #32] e3a4: e3c07001 bic r7, r0, #1 ; 0x1 e3a8: e5952024 ldr r2, [r5, #36] e3ac: e0844007 add r4, r4, r7 e3b0: e1540001 cmp r4, r1 e3b4: 33a03000 movcc r3, #0 ; 0x0 e3b8: 23a03001 movcs r3, #1 ; 0x1 e3bc: e1540002 cmp r4, r2 e3c0: 83a03000 movhi r3, #0 ; 0x0 e3c4: e3530000 cmp r3, #0 ; 0x0 e3c8: 0a000037 beq e4ac <_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)) { e3cc: e5943004 ldr r3, [r4, #4] e3d0: e3130001 tst r3, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); e3d4: e1a06009 mov r6, r9 e3d8: e200a001 and sl, r0, #1 ; 0x1 e3dc: e1a09004 mov r9, r4 e3e0: 0affffbf beq e2e4 <_Heap_Walk+0xa0> error = 1; } } } if (do_dump || error) printk("\n"); e3e4: e3580000 cmp r8, #0 ; 0x0 e3e8: 1affffdb bne e35c <_Heap_Walk+0x118> if (the_size < the_heap->min_block_size) { e3ec: e5953014 ldr r3, [r5, #20] e3f0: e1530007 cmp r3, r7 e3f4: 9affffde bls e374 <_Heap_Walk+0x130> printk("PASS: %d !block size is too small\n", source); e3f8: e59f00d8 ldr r0, [pc, #216] ; e4d8 <_Heap_Walk+0x294> <== NOT EXECUTED e3fc: e1a0100b mov r1, fp <== NOT EXECUTED e400: ebffd99e bl 4a80 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", e404: e59d3000 ldr r3, [sp] <== NOT EXECUTED e408: e59f00cc ldr r0, [pc, #204] ; e4dc <_Heap_Walk+0x298> <== NOT EXECUTED e40c: e1a0100b mov r1, fp <== NOT EXECUTED e410: e1a02006 mov r2, r6 <== NOT EXECUTED e414: ebffd999 bl 4a80 <== NOT EXECUTED e418: 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); e41c: e5963004 ldr r3, [r6, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { e420: e5950010 ldr r0, [r5, #16] e424: e3c32001 bic r2, r3, #1 ; 0x1 e428: e1500002 cmp r0, r2 e42c: 01a00008 moveq r0, r8 e430: 0a000004 beq e448 <_Heap_Walk+0x204> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, e434: e1a03000 mov r3, r0 <== NOT EXECUTED e438: e1a0100b mov r1, fp <== NOT EXECUTED e43c: e59f009c ldr r0, [pc, #156] ; e4e0 <_Heap_Walk+0x29c> <== NOT EXECUTED e440: ebffd98e bl 4a80 <== NOT EXECUTED e444: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } e448: e28dd004 add sp, sp, #4 ; 0x4 e44c: 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); e450: e59f008c ldr r0, [pc, #140] ; e4e4 <_Heap_Walk+0x2a0> <== NOT EXECUTED e454: e1a0100b mov r1, fp <== NOT EXECUTED e458: ebffd988 bl 4a80 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", e45c: e59d3000 ldr r3, [sp] <== NOT EXECUTED e460: e59f0074 ldr r0, [pc, #116] ; e4dc <_Heap_Walk+0x298> <== NOT EXECUTED e464: e1a0100b mov r1, fp <== NOT EXECUTED e468: e1a02006 mov r2, r6 <== NOT EXECUTED e46c: ebffd983 bl 4a80 <== NOT EXECUTED e470: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED e474: eaffffe8 b e41c <_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"); e478: e59f0054 ldr r0, [pc, #84] ; e4d4 <_Heap_Walk+0x290> <== NOT EXECUTED e47c: ebffd97f bl 4a80 <== NOT EXECUTED e480: eaffffb2 b e350 <_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"); e484: e59f0048 ldr r0, [pc, #72] ; e4d4 <_Heap_Walk+0x290> <== NOT EXECUTED e488: ebffd97c bl 4a80 <== NOT EXECUTED e48c: eaffff9f b e310 <_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); e490: e59f0050 ldr r0, [pc, #80] ; e4e8 <_Heap_Walk+0x2a4> <== NOT EXECUTED e494: e1a0100b mov r1, fp <== NOT EXECUTED e498: ebffd978 bl 4a80 <== NOT EXECUTED e49c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED e4a0: eaffff73 b e274 <_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, e4a4: e59d6000 ldr r6, [sp] e4a8: eaffffdb b e41c <_Heap_Walk+0x1d8> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); e4ac: 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); e4b0: e1a02004 mov r2, r4 <== NOT EXECUTED e4b4: e59f0030 ldr r0, [pc, #48] ; e4ec <_Heap_Walk+0x2a8> <== NOT EXECUTED e4b8: e1a0100b mov r1, fp <== NOT EXECUTED e4bc: ebffd96f bl 4a80 <== NOT EXECUTED e4c0: eaffffe5 b e45c <_Heap_Walk+0x218> <== NOT EXECUTED e4c4: 0001befc .word 0x0001befc e4c8: 0001bf54 .word 0x0001bf54 e4cc: 0001bf80 .word 0x0001bf80 e4d0: 0001bfac .word 0x0001bfac e4d4: 0001b510 .word 0x0001b510 e4d8: 0001bfd8 .word 0x0001bfd8 e4dc: 0001c020 .word 0x0001c020 e4e0: 0001c05c .word 0x0001c05c e4e4: 0001bffc .word 0x0001bffc e4e8: 0001bec4 .word 0x0001bec4 e4ec: 0001bf30 .word 0x0001bf30 0000ab4c <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { ab4c: e2400001 sub r0, r0, #1 ; 0x1 ab50: e3500003 cmp r0, #3 ; 0x3 ab54: 979ff100 ldrls pc, [pc, r0, lsl #2] ab58: ea000003 b ab6c <_Objects_API_maximum_class+0x20> ab5c: 0000ab8c .word 0x0000ab8c <== NOT EXECUTED ab60: 0000ab84 .word 0x0000ab84 <== NOT EXECUTED ab64: 0000ab7c .word 0x0000ab7c <== NOT EXECUTED ab68: 0000ab74 .word 0x0000ab74 <== 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; ab6c: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } ab70: 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; ab74: e3a00008 mov r0, #8 ; 0x8 ab78: e12fff1e bx lr int _Objects_API_maximum_class( uint32_t api ) { switch (api) { ab7c: e3a0000c mov r0, #12 ; 0xc ab80: e12fff1e bx lr ab84: e3a0000a mov r0, #10 ; 0xa ab88: e12fff1e bx lr ab8c: e3a00002 mov r0, #2 ; 0x2 ab90: e12fff1e bx lr 00005b50 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 5b50: 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; 5b54: e1d0a0b8 ldrh sl, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5b58: e1d091b0 ldrh r9, [r0, #16] 5b5c: e159000a cmp r9, sl */ void _Objects_Extend_information( Objects_Information *information ) { 5b60: e24dd014 sub sp, sp, #20 ; 0x14 5b64: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5b68: 2a000071 bcs 5d34 <_Objects_Extend_information+0x1e4> 5b6c: e3a07000 mov r7, #0 ; 0x0 5b70: e5904014 ldr r4, [r0, #20] 5b74: e1a0800a mov r8, sl 5b78: e1a06007 mov r6, r7 5b7c: e3a0b001 mov fp, #1 ; 0x1 5b80: e3a00003 mov r0, #3 ; 0x3 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5b84: e5d53012 ldrb r3, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5b88: e0849009 add r9, r4, r9 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5b8c: e3530000 cmp r3, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5b90: e58d9004 str r9, [sp, #4] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5b94: 1a000080 bne 5d9c <_Objects_Extend_information+0x24c> if ( !object_blocks ) return; } else { object_blocks = (void**) 5b98: e59d3004 ldr r3, [sp, #4] 5b9c: e080000a add r0, r0, sl 5ba0: e0800003 add r0, r0, r3 5ba4: e1a00100 lsl r0, r0, #2 5ba8: eb000893 bl 7dfc <_Workspace_Allocate_or_fatal_error> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5bac: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5bb0: e1a0210b lsl r2, fp, #2 if ( !object_blocks ) return; } else { object_blocks = (void**) 5bb4: e1a0c000 mov ip, r0 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5bb8: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5bbc: e153000a cmp r3, sl 5bc0: e0894002 add r4, r9, r2 5bc4: 8a000080 bhi 5dcc <_Objects_Extend_information+0x27c> else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5bc8: 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, 5bcc: 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; 5bd0: 11a02003 movne r2, r3 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5bd4: 0a000003 beq 5be8 <_Objects_Extend_information+0x98> local_table[ index ] = NULL; 5bd8: e7842103 str r2, [r4, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5bdc: e2833001 add r3, r3, #1 ; 0x1 5be0: e153000a cmp r3, sl 5be4: 3afffffb bcc 5bd8 <_Objects_Extend_information+0x88> 5be8: e1a07107 lsl r7, r7, #2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5bec: e3a00000 mov r0, #0 ; 0x0 inactive_per_block[block_count] = 0; 5bf0: e7890007 str r0, [r9, r7] for ( index=index_base ; index < ( information->allocation_size + index_base ); 5bf4: e5953014 ldr r3, [r5, #20] 5bf8: e0881003 add r1, r8, r3 5bfc: e1580001 cmp r8, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5c00: e78c0007 str r0, [ip, r7] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5c04: 2a000006 bcs 5c24 <_Objects_Extend_information+0xd4> 5c08: e1a03108 lsl r3, r8, #2 5c0c: e0842003 add r2, r4, r3 5c10: e1a03008 mov r3, r8 index++ ) { 5c14: 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 ); 5c18: e1530001 cmp r3, r1 index++ ) { local_table[ index ] = NULL; 5c1c: 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 ); 5c20: 3afffffb bcc 5c14 <_Objects_Extend_information+0xc4> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 5c24: e10f0000 mrs r0, CPSR 5c28: e38030c0 orr r3, r0, #192 ; 0xc0 5c2c: 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( 5c30: 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; 5c34: e59de004 ldr lr, [sp, #4] information->maximum_id = _Objects_Build_id( 5c38: e1d510b4 ldrh r1, [r5, #4] 5c3c: 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; 5c40: e1a0280e lsl r2, lr, #16 information->maximum_id = _Objects_Build_id( 5c44: 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; 5c48: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 5c4c: e1833d81 orr r3, r3, r1, lsl #27 5c50: e1833002 orr r3, r3, r2 5c54: 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; 5c58: e5859030 str r9, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 5c5c: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 5c60: e585401c str r4, [r5, #28] information->maximum = maximum; 5c64: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 5c68: e585c034 str ip, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 5c6c: e129f000 msr CPSR_fc, r0 if ( old_tables ) 5c70: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 5c74: 11a00003 movne r0, r3 5c78: 1b000857 blne 7ddc <_Workspace_Free> 5c7c: e5954014 ldr r4, [r5, #20] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 5c80: e5d53012 ldrb r3, [r5, #18] 5c84: e3530000 cmp r3, #0 ; 0x0 5c88: 0a000061 beq 5e14 <_Objects_Extend_information+0x2c4> information->object_blocks[ block ] = 5c8c: e5953018 ldr r3, [r5, #24] 5c90: e0000493 mul r0, r3, r4 5c94: e5954034 ldr r4, [r5, #52] 5c98: eb000853 bl 7dec <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5c9c: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 5ca0: e7840106 str r0, [r4, r6, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5ca4: e7931106 ldr r1, [r3, r6, lsl #2] 5ca8: e3510000 cmp r1, #0 ; 0x0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 5cac: e1a0a106 lsl sl, r6, #2 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5cb0: 0a00001d beq 5d2c <_Objects_Extend_information+0x1dc> /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5cb4: e28d7008 add r7, sp, #8 ; 0x8 5cb8: e1a00007 mov r0, r7 5cbc: e2852014 add r2, r5, #20 ; 0x14 5cc0: e892000c ldm r2, {r2, r3} 5cc4: eb00126d bl a680 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5cc8: e1a04008 mov r4, r8 5ccc: e2856020 add r6, r5, #32 ; 0x20 5cd0: ea000008 b 5cf8 <_Objects_Extend_information+0x1a8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 5cd4: e5953000 ldr r3, [r5] 5cd8: e1d520b4 ldrh r2, [r5, #4] 5cdc: e1a03c03 lsl r3, r3, #24 5ce0: e3833801 orr r3, r3, #65536 ; 0x10000 5ce4: e1833d82 orr r3, r3, r2, lsl #27 5ce8: e1833004 orr r3, r3, r4 5cec: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5cf0: ebfffd6f bl 52b4 <_Chain_Append> index++; 5cf4: 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 ) { 5cf8: e1a00007 mov r0, r7 5cfc: eb001252 bl a64c <_Chain_Get> 5d00: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5d04: e1a0100c mov r1, ip 5d08: 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 ) { 5d0c: 1afffff0 bne 5cd4 <_Objects_Extend_information+0x184> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 5d10: e5953014 ldr r3, [r5, #20] 5d14: e5952030 ldr r2, [r5, #48] 5d18: e782300a str r3, [r2, sl] information->inactive += information->allocation_size; 5d1c: e1d512bc ldrh r1, [r5, #44] 5d20: e5953014 ldr r3, [r5, #20] 5d24: e0833001 add r3, r3, r1 5d28: e1c532bc strh r3, [r5, #44] } 5d2c: e28dd014 add sp, sp, #20 ; 0x14 5d30: 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; 5d34: e5904014 ldr r4, [r0, #20] 5d38: e1a00009 mov r0, r9 5d3c: e1a01004 mov r1, r4 5d40: eb0033b9 bl 12c2c <__aeabi_uidiv> for ( ; block < block_count; block++ ) { 5d44: e2507000 subs r7, r0, #0 ; 0x0 5d48: 0a00003a beq 5e38 <_Objects_Extend_information+0x2e8> if ( information->object_blocks[ block ] == NULL ) 5d4c: e5952034 ldr r2, [r5, #52] 5d50: e5923000 ldr r3, [r2] 5d54: e3530000 cmp r3, #0 ; 0x0 5d58: 11a0800a movne r8, sl 5d5c: 13a06000 movne r6, #0 ; 0x0 5d60: 1a000003 bne 5d74 <_Objects_Extend_information+0x224> 5d64: ea000033 b 5e38 <_Objects_Extend_information+0x2e8> <== NOT EXECUTED 5d68: e7923106 ldr r3, [r2, r6, lsl #2] 5d6c: e3530000 cmp r3, #0 ; 0x0 5d70: 0a000003 beq 5d84 <_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++ ) { 5d74: e2866001 add r6, r6, #1 ; 0x1 5d78: e1570006 cmp r7, r6 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 5d7c: e0888004 add r8, r8, r4 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 5d80: 8afffff8 bhi 5d68 <_Objects_Extend_information+0x218> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 5d84: e1580009 cmp r8, r9 5d88: 3affffbc bcc 5c80 <_Objects_Extend_information+0x130> 5d8c: e287b001 add fp, r7, #1 ; 0x1 5d90: e1a0308b lsl r3, fp, #1 5d94: e083000b add r0, r3, fp 5d98: eaffff79 b 5b84 <_Objects_Extend_information+0x34> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 5d9c: e080000a add r0, r0, sl 5da0: e0800009 add r0, r0, r9 5da4: e1a00100 lsl r0, r0, #2 5da8: eb00080f bl 7dec <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 5dac: e250c000 subs ip, r0, #0 ; 0x0 5db0: 0affffdd beq 5d2c <_Objects_Extend_information+0x1dc> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5db4: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5db8: e1a0210b lsl r2, fp, #2 5dbc: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5dc0: e153000a cmp r3, sl 5dc4: e0894002 add r4, r9, r2 5dc8: 9affff7e bls 5bc8 <_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, 5dcc: e1a07107 lsl r7, r7, #2 5dd0: e1a0000c mov r0, ip 5dd4: e5951034 ldr r1, [r5, #52] 5dd8: e1a02007 mov r2, r7 5ddc: e58dc000 str ip, [sp] 5de0: eb001a30 bl c6a8 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 5de4: e5951030 ldr r1, [r5, #48] 5de8: e1a02007 mov r2, r7 5dec: e1a00009 mov r0, r9 5df0: eb001a2c bl c6a8 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 5df4: e1d521b0 ldrh r2, [r5, #16] 5df8: e08a2002 add r2, sl, r2 5dfc: e1a02102 lsl r2, r2, #2 5e00: e1a00004 mov r0, r4 5e04: e595101c ldr r1, [r5, #28] 5e08: eb001a26 bl c6a8 5e0c: e59dc000 ldr ip, [sp] 5e10: eaffff75 b 5bec <_Objects_Extend_information+0x9c> if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 5e14: e5953018 ldr r3, [r5, #24] 5e18: e0000493 mul r0, r3, r4 5e1c: e5954034 ldr r4, [r5, #52] 5e20: eb0007f5 bl 7dfc <_Workspace_Allocate_or_fatal_error> 5e24: e5953034 ldr r3, [r5, #52] 5e28: e7840106 str r0, [r4, r6, lsl #2] 5e2c: e1a0a106 lsl sl, r6, #2 5e30: e7931106 ldr r1, [r3, r6, lsl #2] 5e34: eaffff9e b 5cb4 <_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++ ) { 5e38: e1a0800a mov r8, sl <== NOT EXECUTED 5e3c: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 5e40: eaffffcf b 5d84 <_Objects_Extend_information+0x234> <== NOT EXECUTED 00015d88 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 15d88: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 15d8c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 15d90: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 15d94: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 15d98: 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; 15d9c: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 15da0: e1a05000 mov r5, r0 <== NOT EXECUTED 15da4: e1a06002 mov r6, r2 <== NOT EXECUTED 15da8: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 15dac: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 15db0: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 15db4: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 15db8: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 15dbc: e15c0003 cmp ip, r3 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 15dc0: e1a01004 mov r1, r4 <== NOT EXECUTED 15dc4: e1a00005 mov r0, r5 <== NOT EXECUTED 15dc8: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 15dcc: 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) 15dd0: 3a000005 bcc 15dec <_Objects_Get_next+0x64> <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 15dd4: ebffd7c8 bl bcfc <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 15dd8: e5963000 ldr r3, [r6] <== NOT EXECUTED 15ddc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 15de0: 1afffff2 bne 15db0 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 15de4: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 15de8: 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; 15dec: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 15df0: 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; 15df4: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 15df8: e5872000 str r2, [r7] <== NOT EXECUTED 15dfc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 15e00: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 0000511c <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 511c: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 5120: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 5124: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 5128: 0a00000b beq 515c <_POSIX_Condition_variables_Get+0x40> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 512c: e5951000 ldr r1, [r5] 5130: e3710001 cmn r1, #1 ; 0x1 5134: 0a000003 beq 5148 <_POSIX_Condition_variables_Get+0x2c> /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 5138: e59f002c ldr r0, [pc, #44] ; 516c <_POSIX_Condition_variables_Get+0x50> 513c: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 5140: e8bd4030 pop {r4, r5, lr} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 5144: ea000b92 b 7f94 <_Objects_Get> if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 5148: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 514c: eb000007 bl 5170 <== NOT EXECUTED if ( status ) { 5150: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 5154: 05951000 ldreq r1, [r5] <== NOT EXECUTED 5158: 0afffff6 beq 5138 <_POSIX_Condition_variables_Get+0x1c> <== NOT EXECUTED *location = OBJECTS_ERROR; 515c: e3a03001 mov r3, #1 ; 0x1 5160: e5843000 str r3, [r4] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 5164: e3a00000 mov r0, #0 ; 0x0 5168: e8bd8030 pop {r4, r5, pc} 516c: 000157c4 .word 0x000157c4 00005304 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 5304: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 5308: e1a06001 mov r6, r1 530c: e24dd004 sub sp, sp, #4 ; 0x4 5310: 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 ) ) { 5314: e1a0100d mov r1, sp 5318: e1a00006 mov r0, r6 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 531c: e1a0a002 mov sl, r2 5320: 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 ) ) { 5324: eb000071 bl 54f0 <_POSIX_Mutex_Get> 5328: e3500000 cmp r0, #0 ; 0x0 532c: 0a00001d beq 53a8 <_POSIX_Condition_variables_Wait_support+0xa4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 5330: e59f30d8 ldr r3, [pc, #216] ; 5410 <_POSIX_Condition_variables_Wait_support+0x10c> 5334: e5932000 ldr r2, [r3] 5338: e2422001 sub r2, r2, #1 ; 0x1 533c: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 5340: e1a0100d mov r1, sp 5344: e1a00007 mov r0, r7 5348: ebffff73 bl 511c <_POSIX_Condition_variables_Get> switch ( location ) { 534c: e59d3000 ldr r3, [sp] 5350: e3530000 cmp r3, #0 ; 0x0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 5354: e1a05000 mov r5, r0 switch ( location ) { 5358: 1a000012 bne 53a8 <_POSIX_Condition_variables_Wait_support+0xa4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 535c: e5902014 ldr r2, [r0, #20] 5360: e3520000 cmp r2, #0 ; 0x0 5364: 0a000005 beq 5380 <_POSIX_Condition_variables_Wait_support+0x7c> 5368: e5963000 ldr r3, [r6] 536c: e1520003 cmp r2, r3 5370: 0a000002 beq 5380 <_POSIX_Condition_variables_Wait_support+0x7c> _Thread_Enable_dispatch(); 5374: eb000d27 bl 8818 <_Thread_Enable_dispatch> <== NOT EXECUTED 5378: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED 537c: ea00000a b 53ac <_POSIX_Condition_variables_Wait_support+0xa8> <== NOT EXECUTED return EINVAL; } (void) pthread_mutex_unlock( mutex ); 5380: e1a00006 mov r0, r6 5384: eb0000e9 bl 5730 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 5388: e3580000 cmp r8, #0 ; 0x0 538c: 0a000009 beq 53b8 <_POSIX_Condition_variables_Wait_support+0xb4> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 5390: eb000d20 bl 8818 <_Thread_Enable_dispatch> 5394: e3a04074 mov r4, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 5398: e1a00006 mov r0, r6 539c: eb0000c2 bl 56ac if ( mutex_status ) 53a0: e3500000 cmp r0, #0 ; 0x0 53a4: 0a000000 beq 53ac <_POSIX_Condition_variables_Wait_support+0xa8> 53a8: e3a04016 mov r4, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 53ac: e1a00004 mov r0, r4 53b0: e28dd004 add sp, sp, #4 ; 0x4 53b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 53b8: e5963000 ldr r3, [r6] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 53bc: e59f4050 ldr r4, [pc, #80] ; 5414 <_POSIX_Condition_variables_Wait_support+0x110> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 53c0: e5853014 str r3, [r5, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 53c4: e5942000 ldr r2, [r4] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 53c8: 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; 53cc: 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; 53d0: e3a03001 mov r3, #1 ; 0x1 _Thread_Executing->Wait.id = *cond; 53d4: e5821020 str r1, [r2, #32] 53d8: 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; 53dc: 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; 53e0: 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 ); 53e4: e1a0000c mov r0, ip 53e8: e1a0100a mov r1, sl 53ec: e59f2024 ldr r2, [pc, #36] ; 5418 <_POSIX_Condition_variables_Wait_support+0x114> 53f0: eb000e50 bl 8d38 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 53f4: eb000d07 bl 8818 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 53f8: e5943000 ldr r3, [r4] 53fc: e5934034 ldr r4, [r3, #52] if ( status && status != ETIMEDOUT ) 5400: e3540000 cmp r4, #0 ; 0x0 5404: 13540074 cmpne r4, #116 ; 0x74 5408: 0affffe2 beq 5398 <_POSIX_Condition_variables_Wait_support+0x94> 540c: eaffffe6 b 53ac <_POSIX_Condition_variables_Wait_support+0xa8> <== NOT EXECUTED 5410: 000153ac .word 0x000153ac 5414: 00015464 .word 0x00015464 5418: 000091dc .word 0x000091dc 00010bcc <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 10bcc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 10bd0: e1a08001 mov r8, r1 10bd4: 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 ); 10bd8: e3a010ff mov r1, #255 ; 0xff const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 10bdc: e1a04002 mov r4, r2 10be0: e1a0b003 mov fp, r3 10be4: 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 ); 10be8: eb001262 bl 15578 if ( n > NAME_MAX ) 10bec: 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 ); 10bf0: e1a05000 mov r5, r0 if ( n > NAME_MAX ) 10bf4: 83a0005b movhi r0, #91 ; 0x5b 10bf8: 8a000031 bhi 10cc4 <_POSIX_Message_queue_Create_support+0xf8> 10bfc: e59f2148 ldr r2, [pc, #328] ; 10d4c <_POSIX_Message_queue_Create_support+0x180> 10c00: e5923000 ldr r3, [r2] 10c04: e2833001 add r3, r3, #1 ; 0x1 10c08: 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 ) { 10c0c: e3540000 cmp r4, #0 ; 0x0 10c10: 03a0a010 moveq sl, #16 ; 0x10 10c14: 03a0700a moveq r7, #10 ; 0xa 10c18: 0a000009 beq 10c44 <_POSIX_Message_queue_Create_support+0x78> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 10c1c: e5943004 ldr r3, [r4, #4] 10c20: e3530000 cmp r3, #0 ; 0x0 10c24: da000033 ble 10cf8 <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 10c28: e5943008 ldr r3, [r4, #8] 10c2c: e3530000 cmp r3, #0 ; 0x0 10c30: da000030 ble 10cf8 <_POSIX_Message_queue_Create_support+0x12c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 10c34: e894000f ldm r4, {r0, r1, r2, r3} 10c38: e88d000f stm sp, {r0, r1, r2, r3} 10c3c: e1a0a002 mov sl, r2 10c40: e1a07001 mov r7, r1 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 10c44: e59f6104 ldr r6, [pc, #260] ; 10d50 <_POSIX_Message_queue_Create_support+0x184> 10c48: e1a00006 mov r0, r6 10c4c: ebffef8c bl ca84 <_Objects_Allocate> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 10c50: e2504000 subs r4, r0, #0 ; 0x0 10c54: 0a000036 beq 10d34 <_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; 10c58: 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); 10c5c: e1a00005 mov r0, r5 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 10c60: e5848010 str r8, [r4, #16] the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 10c64: 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; 10c68: e5c43014 strb r3, [r4, #20] the_mq->open_count = 1; 10c6c: 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); 10c70: ebfff8b0 bl ef38 <_Workspace_Allocate> if (!name) { 10c74: e2505000 subs r5, r0, #0 ; 0x0 10c78: 0a000024 beq 10d10 <_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 ); 10c7c: 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; 10c80: 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 ); 10c84: eb000fc2 bl 14b94 * 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; 10c88: e584805c str r8, [r4, #92] if ( ! _CORE_message_queue_Initialize( 10c8c: e1a02007 mov r2, r7 10c90: e1a0300a mov r3, sl 10c94: e284001c add r0, r4, #28 ; 0x1c 10c98: e284105c add r1, r4, #92 ; 0x5c 10c9c: eb00037a bl 11a8c <_CORE_message_queue_Initialize> 10ca0: e1500008 cmp r0, r8 10ca4: 0a000008 beq 10ccc <_POSIX_Message_queue_Create_support+0x100> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ca8: e596201c ldr r2, [r6, #28] 10cac: e1d430b8 ldrh r3, [r4, #8] 10cb0: 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; 10cb4: e584500c str r5, [r4, #12] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 10cb8: e58b4000 str r4, [fp] _Thread_Enable_dispatch(); 10cbc: ebfff30b bl d8f0 <_Thread_Enable_dispatch> 10cc0: e1a00008 mov r0, r8 return 0; } 10cc4: e28dd010 add sp, sp, #16 ; 0x10 10cc8: 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 ); 10ccc: e1a01004 mov r1, r4 <== NOT EXECUTED 10cd0: e1a00006 mov r0, r6 <== NOT EXECUTED 10cd4: ebfff057 bl ce38 <_Objects_Free> <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 10cd8: e1a00005 mov r0, r5 <== NOT EXECUTED 10cdc: ebfff891 bl ef28 <_Workspace_Free> <== NOT EXECUTED _Thread_Enable_dispatch(); 10ce0: ebfff302 bl d8f0 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 10ce4: eb000a72 bl 136b4 <__errno> <== NOT EXECUTED 10ce8: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 10cec: e5803000 str r3, [r0] <== NOT EXECUTED 10cf0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 10cf4: eafffff2 b 10cc4 <_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(); 10cf8: ebfff2fc bl d8f0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10cfc: eb000a6c bl 136b4 <__errno> 10d00: e3a03016 mov r3, #22 ; 0x16 10d04: e5803000 str r3, [r0] 10d08: e3e00000 mvn r0, #0 ; 0x0 10d0c: eaffffec b 10cc4 <_POSIX_Message_queue_Create_support+0xf8> 10d10: e1a00006 mov r0, r6 <== NOT EXECUTED 10d14: e1a01004 mov r1, r4 <== NOT EXECUTED 10d18: ebfff046 bl ce38 <_Objects_Free> <== NOT EXECUTED */ name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 10d1c: ebfff2f3 bl d8f0 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 10d20: eb000a63 bl 136b4 <__errno> <== NOT EXECUTED 10d24: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 10d28: e5803000 str r3, [r0] <== NOT EXECUTED 10d2c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 10d30: eaffffe3 b 10cc4 <_POSIX_Message_queue_Create_support+0xf8> <== NOT EXECUTED attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 10d34: ebfff2ed bl d8f0 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 10d38: eb000a5d bl 136b4 <__errno> <== NOT EXECUTED 10d3c: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED 10d40: e5803000 str r3, [r0] <== NOT EXECUTED 10d44: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 10d48: eaffffdd b 10cc4 <_POSIX_Message_queue_Create_support+0xf8> <== NOT EXECUTED 10d4c: 000223ec .word 0x000223ec 10d50: 00022700 .word 0x00022700 00005dcc <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 5dcc: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5dd0: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 5dd4: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5dd8: 0a00000b beq 5e0c <_POSIX_Mutex_Get+0x40> 5ddc: e5951000 ldr r1, [r5] 5de0: e3710001 cmn r1, #1 ; 0x1 5de4: 0a000003 beq 5df8 <_POSIX_Mutex_Get+0x2c> return (POSIX_Mutex_Control *) 5de8: e59f002c ldr r0, [pc, #44] ; 5e1c <_POSIX_Mutex_Get+0x50> 5dec: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 5df0: e8bd4030 pop {r4, r5, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5df4: ea000b71 b 8bc0 <_Objects_Get> Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5df8: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 5dfc: eb000019 bl 5e68 <== NOT EXECUTED 5e00: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 5e04: 05951000 ldreq r1, [r5] <== NOT EXECUTED 5e08: 0afffff6 beq 5de8 <_POSIX_Mutex_Get+0x1c> <== NOT EXECUTED 5e0c: e3a03001 mov r3, #1 ; 0x1 5e10: e5843000 str r3, [r4] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 5e14: e3a00000 mov r0, #0 ; 0x0 5e18: e8bd8030 pop {r4, r5, pc} 5e1c: 000175a0 .word 0x000175a0 00005d70 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 5d70: e92d4070 push {r4, r5, r6, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5d74: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 5d78: e1a04001 mov r4, r1 5d7c: e1a06002 mov r6, r2 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5d80: 0a00000c beq 5db8 <_POSIX_Mutex_Get_interrupt_disable+0x48> 5d84: e5951000 ldr r1, [r5] 5d88: e3710001 cmn r1, #1 ; 0x1 5d8c: 0a000004 beq 5da4 <_POSIX_Mutex_Get_interrupt_disable+0x34> return (POSIX_Mutex_Control *) 5d90: e59f0030 ldr r0, [pc, #48] ; 5dc8 <_POSIX_Mutex_Get_interrupt_disable+0x58> 5d94: e1a02004 mov r2, r4 5d98: e1a03006 mov r3, r6 _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 5d9c: e8bd4070 pop {r4, r5, r6, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5da0: ea000b6a b 8b50 <_Objects_Get_isr_disable> ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5da4: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 5da8: eb00002e bl 5e68 <== NOT EXECUTED 5dac: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 5db0: 05951000 ldreq r1, [r5] <== NOT EXECUTED 5db4: 0afffff5 beq 5d90 <_POSIX_Mutex_Get_interrupt_disable+0x20> <== NOT EXECUTED 5db8: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 5dbc: e5843000 str r3, [r4] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 5dc0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5dc4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 5dc8: 000175a0 .word 0x000175a0 0000d50c <_POSIX_Semaphore_Create_support>: d50c: e59fc0f8 ldr ip, [pc, #248] ; d60c <_POSIX_Semaphore_Create_support+0x100> const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { d510: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} d514: e59ce000 ldr lr, [ip] d518: e28ee001 add lr, lr, #1 ; 0x1 d51c: e58ce000 str lr, [ip] d520: e1a07002 mov r7, r2 d524: e1a0a003 mov sl, r3 d528: e1a06000 mov r6, r0 char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { d52c: e3510000 cmp r1, #0 ; 0x0 d530: 1a000023 bne d5c4 <_POSIX_Semaphore_Create_support+0xb8> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { d534: e3500000 cmp r0, #0 ; 0x0 d538: 0a000002 beq d548 <_POSIX_Semaphore_Create_support+0x3c> if( strlen(name) > PATH_MAX ) { d53c: eb000f8e bl 1137c d540: e35000ff cmp r0, #255 ; 0xff d544: 8a000024 bhi d5dc <_POSIX_Semaphore_Create_support+0xd0> * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) d548: e59f80c0 ldr r8, [pc, #192] ; d610 <_POSIX_Semaphore_Create_support+0x104> d54c: e1a00008 mov r0, r8 d550: ebffeda7 bl 8bf4 <_Objects_Allocate> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { d554: e2505000 subs r5, r0, #0 ; 0x0 d558: 0a000025 beq d5f4 <_POSIX_Semaphore_Create_support+0xe8> rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; if ( name ) { d55c: e3560000 cmp r6, #0 ; 0x0 if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; d560: e3a03000 mov r3, #0 ; 0x0 d564: e5853010 str r3, [r5, #16] if ( name ) { the_semaphore->named = TRUE; d568: 12833001 addne r3, r3, #1 ; 0x1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; d56c: 15c53015 strbne r3, [r5, #21] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; d570: 15c53014 strbne r3, [r5, #20] the_semaphore->open_count = 1; d574: 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; d578: e3a04000 mov r4, #0 ; 0x0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; d57c: e3e03000 mvn r3, #0 ; 0x0 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); d580: 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; d584: 05c56014 strbeq r6, [r5, #20] the_semaphore->open_count = 0; d588: 05856018 streq r6, [r5, #24] the_semaphore->linked = FALSE; d58c: 05c56015 strbeq r6, [r5, #21] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; d590: e585305c str r3, [r5, #92] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); d594: e1a02007 mov r2, r7 d598: 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; d59c: 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 ); d5a0: ebffec7c bl 8798 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; d5a4: e598201c ldr r2, [r8, #28] d5a8: e1d530b8 ldrh r3, [r5, #8] d5ac: 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; d5b0: e585600c str r6, [r5, #12] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; d5b4: e58a5000 str r5, [sl] _Thread_Enable_dispatch(); d5b8: ebfff0f5 bl 9994 <_Thread_Enable_dispatch> d5bc: e1a00004 mov r0, r4 return 0; } d5c0: 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(); d5c4: ebfff0f2 bl 9994 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); d5c8: eb000894 bl f820 <__errno> d5cc: e3a03058 mov r3, #88 ; 0x58 d5d0: e5803000 str r3, [r0] d5d4: e3e00000 mvn r0, #0 ; 0x0 d5d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); d5dc: ebfff0ec bl 9994 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); d5e0: eb00088e bl f820 <__errno> <== NOT EXECUTED d5e4: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED d5e8: e5803000 str r3, [r0] <== NOT EXECUTED d5ec: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED d5f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); d5f4: ebfff0e6 bl 9994 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); d5f8: eb000888 bl f820 <__errno> d5fc: e3a0301c mov r3, #28 ; 0x1c d600: e5803000 str r3, [r0] d604: e3e00000 mvn r0, #0 ; 0x0 d608: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} d60c: 0001d38c .word 0x0001d38c d610: 0001d620 .word 0x0001d620 0000b604 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { b604: 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 ]; b608: e5906108 ldr r6, [r0, #264] handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { b60c: e59620d8 ldr r2, [r6, #216] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; b610: e28650dc add r5, r6, #220 ; 0xdc thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; b614: e3a03001 mov r3, #1 ; 0x1 while ( !_Chain_Is_empty( handler_stack ) ) { b618: 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; b61c: e58630cc str r3, [r6, #204] while ( !_Chain_Is_empty( handler_stack ) ) { b620: 08bd8070 popeq {r4, r5, r6, pc} _ISR_Disable( level ); b624: e10f1000 mrs r1, CPSR <== NOT EXECUTED b628: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED b62c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) b630: e5954004 ldr r4, [r5, #4] <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; b634: e894000c ldm r4, {r2, r3} <== NOT EXECUTED previous = the_node->previous; next->previous = previous; previous->next = next; b638: e5832000 str r2, [r3] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; b63c: e5823004 str r3, [r2, #4] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); b640: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED (*handler->routine)( handler->arg ); b644: e594000c ldr r0, [r4, #12] <== NOT EXECUTED b648: e1a0e00f mov lr, pc <== NOT EXECUTED b64c: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED _Workspace_Free( handler ); b650: e1a00004 mov r0, r4 <== NOT EXECUTED b654: ebfff1e0 bl 7ddc <_Workspace_Free> <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { b658: e59630d8 ldr r3, [r6, #216] <== NOT EXECUTED b65c: e1530005 cmp r3, r5 <== NOT EXECUTED b660: 1affffef bne b624 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED b664: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 0000c150 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { c150: e92d41f0 push {r4, r5, r6, r7, r8, lr} c154: e1a08001 mov r8, r1 c158: e1a07002 mov r7, r2 c15c: e1a05003 mov r5, r3 c160: e1a04000 mov r4, r0 ISR_Level level; (void) _Watchdog_Remove( timer ); c164: ebfff643 bl 9a78 <_Watchdog_Remove> _ISR_Disable( level ); c168: e10f6000 mrs r6, CPSR c16c: e38630c0 orr r3, r6, #192 ; 0xc0 c170: 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 ) { c174: e5943008 ldr r3, [r4, #8] c178: e3530000 cmp r3, #0 ; 0x0 c17c: 0a000002 beq c18c <_POSIX_Timer_Insert_helper+0x3c> _ISR_Enable( level ); c180: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED c184: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED c188: 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; c18c: e5843008 str r3, [r4, #8] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; c190: e59d3018 ldr r3, [sp, #24] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; c194: e584501c str r5, [r4, #28] the_watchdog->id = id; c198: e5847020 str r7, [r4, #32] the_watchdog->user_data = user_data; c19c: e5843024 str r3, [r4, #36] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; c1a0: e584800c str r8, [r4, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); c1a4: e1a01004 mov r1, r4 c1a8: e59f000c ldr r0, [pc, #12] ; c1bc <_POSIX_Timer_Insert_helper+0x6c> c1ac: ebfff5c2 bl 98bc <_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 ); c1b0: e129f006 msr CPSR_fc, r6 c1b4: e3a00001 mov r0, #1 ; 0x1 return true; } c1b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} c1bc: 0001ba24 .word 0x0001ba24 00005c9c <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 5c9c: e92d4010 push {r4, lr} bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 5ca0: e5913068 ldr r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 5ca4: e5912054 ldr r2, [r1, #84] bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 5ca8: e2833001 add r3, r3, #1 ; 0x1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 5cac: 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) { 5cb0: e24dd004 sub sp, sp, #4 ; 0x4 5cb4: e1a04001 mov r4, r1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 5cb8: e5813068 str r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 5cbc: 1a000004 bne 5cd4 <_POSIX_Timer_TSR+0x38> 5cc0: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED 5cc4: 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; 5cc8: 03a03004 moveq r3, #4 ; 0x4 <== NOT EXECUTED 5ccc: 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 ) || 5cd0: 0a00000d beq 5d0c <_POSIX_Timer_TSR+0x70> <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 5cd4: e5941064 ldr r1, [r4, #100] 5cd8: e5942008 ldr r2, [r4, #8] 5cdc: e2840010 add r0, r4, #16 ; 0x10 5ce0: e59f303c ldr r3, [pc, #60] ; 5d24 <_POSIX_Timer_TSR+0x88> 5ce4: e58d4000 str r4, [sp] 5ce8: eb001918 bl c150 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 5cec: e3500000 cmp r0, #0 ; 0x0 5cf0: 1a000001 bne 5cfc <_POSIX_Timer_TSR+0x60> /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 5cf4: e28dd004 add sp, sp, #4 ; 0x4 5cf8: e8bd8010 pop {r4, pc} ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 5cfc: e284006c add r0, r4, #108 ; 0x6c 5d00: eb0005bd bl 73fc <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 5d04: e3a03003 mov r3, #3 ; 0x3 5d08: 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 ) ) { 5d0c: e5940038 ldr r0, [r4, #56] 5d10: e5941044 ldr r1, [r4, #68] 5d14: eb001830 bl bddc } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 5d18: e3a03000 mov r3, #0 ; 0x0 5d1c: e5843068 str r3, [r4, #104] 5d20: eafffff3 b 5cf4 <_POSIX_Timer_TSR+0x58> 5d24: 00005c9c .word 0x00005c9c 0000528c <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 528c: e1a02000 mov r2, r0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 5290: e3a01001 mov r1, #1 ; 0x1 #include int _POSIX_signals_Get_highest( sigset_t set ) { 5294: e3a0001b mov r0, #27 ; 0x1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 5298: e2403001 sub r3, r0, #1 ; 0x1 529c: e0123311 ands r3, r2, r1, lsl r3 52a0: 112fff1e bxne lr sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 52a4: e2800001 add r0, r0, #1 ; 0x1 52a8: e3500020 cmp r0, #32 ; 0x20 52ac: 1afffff9 bne 5298 <_POSIX_signals_Get_highest+0xc> 52b0: 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 ) ) 52b4: e1a01000 mov r1, r0 52b8: e2403001 sub r3, r0, #1 ; 0x1 52bc: e0123311 ands r3, r2, r1, lsl r3 52c0: 112fff1e bxne lr return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 52c4: e2800001 add r0, r0, #1 ; 0x1 52c8: e350001b cmp r0, #27 ; 0x1b 52cc: 1afffff9 bne 52b8 <_POSIX_signals_Get_highest+0x2c> 52d0: e1a00003 mov r0, r3 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 52d4: e12fff1e bx lr <== NOT EXECUTED 00009bf8 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 9bf8: e92d4070 push {r4, r5, r6, lr} POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 9bfc: e5905108 ldr r5, [r0, #264] if ( !api ) 9c00: e3550000 cmp r5, #0 ; 0x0 9c04: 08bd8070 popeq {r4, r5, r6, pc} 9c08: e59f60b0 ldr r6, [pc, #176] ; 9cc0 <_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 ); 9c0c: e10f0000 mrs r0, CPSR 9c10: e38030c0 orr r3, r0, #192 ; 0xc0 9c14: e129f003 msr CPSR_fc, r3 if ( !(~api->signals_blocked & 9c18: e5963000 ldr r3, [r6] 9c1c: e28510c4 add r1, r5, #196 ; 0xc4 9c20: e8910006 ldm r1, {r1, r2} 9c24: e1833002 orr r3, r3, r2 9c28: e1d31001 bics r1, r3, r1 9c2c: 0a000021 beq 9cb8 <_POSIX_signals_Post_switch_extension+0xc0> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 9c30: e129f000 msr CPSR_fc, r0 9c34: e3a0401b mov r4, #27 ; 0x1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9c38: e1a01004 mov r1, r4 9c3c: e3a02000 mov r2, #0 ; 0x0 9c40: e1a00005 mov r0, r5 9c44: eb0006b5 bl b720 <_POSIX_signals_Check_signal> 9c48: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c4c: e1a01004 mov r1, r4 9c50: e3a02001 mov r2, #1 ; 0x1 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 9c54: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c58: e1a00005 mov r0, r5 } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9c5c: 1affffea bne 9c0c <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c60: eb0006ae bl b720 <_POSIX_signals_Check_signal> 9c64: e3500000 cmp r0, #0 ; 0x0 9c68: 1affffe7 bne 9c0c <_POSIX_signals_Post_switch_extension+0x14> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 9c6c: e3540020 cmp r4, #32 ; 0x20 9c70: 1afffff0 bne 9c38 <_POSIX_signals_Post_switch_extension+0x40> 9c74: 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 ) ) 9c78: e1a01004 mov r1, r4 9c7c: e3a02000 mov r2, #0 ; 0x0 9c80: e1a00005 mov r0, r5 9c84: eb0006a5 bl b720 <_POSIX_signals_Check_signal> 9c88: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c8c: e1a01004 mov r1, r4 9c90: e3a02001 mov r2, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 9c94: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9c98: 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 ) ) 9c9c: 1affffda bne 9c0c <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9ca0: eb00069e bl b720 <_POSIX_signals_Check_signal> 9ca4: e3500000 cmp r0, #0 ; 0x0 9ca8: 1affffd7 bne 9c0c <_POSIX_signals_Post_switch_extension+0x14> } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 9cac: e354001b cmp r4, #27 ; 0x1b 9cb0: 1afffff0 bne 9c78 <_POSIX_signals_Post_switch_extension+0x80> 9cb4: eaffffd4 b 9c0c <_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 ); 9cb8: e129f000 msr CPSR_fc, r0 9cbc: e8bd8070 pop {r4, r5, r6, pc} 9cc0: 0001762c .word 0x0001762c 000223ec <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 223ec: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 223f0: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 223f4: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 223f8: 0a00000d beq 22434 <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 223fc: e3510000 cmp r1, #0 ; 0x0 22400: 0a00000b beq 22434 <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 22404: e59f5030 ldr r5, [pc, #48] ; 2243c <_Protected_heap_Get_information+0x50> 22408: e5950000 ldr r0, [r5] 2240c: ebff9923 bl 88a0 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 22410: e1a01004 mov r1, r4 22414: e1a00006 mov r0, r6 22418: eb0026cb bl 2bf4c <_Heap_Get_information> 2241c: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 22420: e5950000 ldr r0, [r5] 22424: ebff9939 bl 8910 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 22428: e2740001 rsbs r0, r4, #1 ; 0x1 2242c: 33a00000 movcc r0, #0 ; 0x0 22430: e8bd8070 pop {r4, r5, r6, pc} 22434: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 22438: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 2243c: 0005a7bc .word 0x0005a7bc 000056b0 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 56b0: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 56b4: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 56b8: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 56bc: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 56c0: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 56c4: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 56c8: e10f6000 mrs r6, CPSR 56cc: e38630c0 orr r3, r6, #192 ; 0xc0 56d0: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 56d4: e59f3038 ldr r3, [pc, #56] ; 5714 <_TOD_Get+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 56d8: e59f2038 ldr r2, [pc, #56] ; 5718 <_TOD_Get+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 56dc: 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; 56e0: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 56e4: 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; 56e8: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 56ec: 0a000002 beq 56fc <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 56f0: e1a0e00f mov lr, pc <== NOT EXECUTED 56f4: e12fff11 bx r1 <== NOT EXECUTED 56f8: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 56fc: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 5700: e1a00005 mov r0, r5 5704: e1a0100d mov r1, sp 5708: eb000813 bl 775c <_Timespec_Add_to> } 570c: e28dd008 add sp, sp, #8 ; 0x8 5710: e8bd8070 pop {r4, r5, r6, pc} 5714: 000170b8 .word 0x000170b8 5718: 00016f94 .word 0x00016f94 0000a828 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { a828: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; a82c: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { a830: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; a834: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { a838: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; a83c: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); a840: e10f6000 mrs r6, CPSR a844: e38630c0 orr r3, r6, #192 ; 0xc0 a848: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) a84c: e59f3038 ldr r3, [pc, #56] ; a88c <_TOD_Get_uptime+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a850: e59f2038 ldr r2, [pc, #56] ; a890 <_TOD_Get_uptime+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) a854: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a858: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) a85c: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a860: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) a864: 0a000002 beq a874 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); a868: e1a0e00f mov lr, pc <== NOT EXECUTED a86c: e12fff11 bx r1 <== NOT EXECUTED a870: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); a874: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); a878: e1a00005 mov r0, r5 a87c: e1a0100d mov r1, sp a880: ebfff3b5 bl 775c <_Timespec_Add_to> } a884: e28dd008 add sp, sp, #8 ; 0x8 a888: e8bd8070 pop {r4, r5, r6, pc} a88c: 000170b8 .word 0x000170b8 a890: 00016f84 .word 0x00016f84 0000bcf4 <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; bcf4: e59f3110 ldr r3, [pc, #272] ; be0c <_Thread_Handler+0x118> * * Output parameters: NONE */ void _Thread_Handler( void ) { bcf8: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; bcfc: 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; bd00: e59520b8 ldr r2, [r5, #184] _ISR_Set_level(level); bd04: e3a03000 mov r3, #0 ; 0x0 bd08: e10f3000 mrs r3, CPSR bd0c: e3c330c0 bic r3, r3, #192 ; 0xc0 bd10: e1833002 orr r3, r3, r2 bd14: e121f003 msr CPSR_c, r3 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; bd18: e59f20f0 ldr r2, [pc, #240] ; be10 <_Thread_Handler+0x11c> doneConstructors = 1; bd1c: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; bd20: 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 ); bd24: 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; bd28: 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 ); bd2c: ebffeee5 bl 78c8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); bd30: ebffeae2 bl 68c0 <_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) */ bd34: e3540000 cmp r4, #0 ; 0x0 bd38: 0a000031 beq be04 <_Thread_Handler+0x110> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { bd3c: e59530a0 ldr r3, [r5, #160] bd40: e3530003 cmp r3, #3 ; 0x3 bd44: 979ff103 ldrls pc, [pc, r3, lsl #2] bd48: ea000008 b bd70 <_Thread_Handler+0x7c> <== NOT EXECUTED bd4c: 0000bddc .word 0x0000bddc <== NOT EXECUTED bd50: 0000bdb4 .word 0x0000bdb4 <== NOT EXECUTED bd54: 0000bd88 .word 0x0000bd88 <== NOT EXECUTED bd58: 0000bd5c .word 0x0000bd5c <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = bd5c: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED bd60: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED bd64: e1a0e00f mov lr, pc <== NOT EXECUTED bd68: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED bd6c: 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 ); bd70: e1a00005 mov r0, r5 <== NOT EXECUTED bd74: ebffeee3 bl 7908 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( bd78: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED bd7c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED bd80: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED bd84: ebffe727 bl 5a28 <_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 = bd88: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED bd8c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED bd90: e1a0e00f mov lr, pc <== NOT EXECUTED bd94: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED bd98: 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 ); bd9c: e1a00005 mov r0, r5 <== NOT EXECUTED bda0: ebffeed8 bl 7908 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( bda4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED bda8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED bdac: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED bdb0: ebffe71c bl 5a28 <_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 = bdb4: e59500a4 ldr r0, [r5, #164] bdb8: e1a0e00f mov lr, pc bdbc: e595f09c ldr pc, [r5, #156] bdc0: 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 ); bdc4: e1a00005 mov r0, r5 bdc8: ebffeece bl 7908 <_User_extensions_Thread_exitted> _Internal_error_Occurred( bdcc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED bdd0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED bdd4: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED bdd8: ebffe712 bl 5a28 <_Internal_error_Occurred> <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = bddc: e59500a8 ldr r0, [r5, #168] bde0: e1a0e00f mov lr, pc bde4: e595f09c ldr pc, [r5, #156] bde8: 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 ); bdec: e1a00005 mov r0, r5 bdf0: ebffeec4 bl 7908 <_User_extensions_Thread_exitted> _Internal_error_Occurred( bdf4: e3a00000 mov r0, #0 ; 0x0 bdf8: e3a01001 mov r1, #1 ; 0x1 bdfc: e3a02006 mov r2, #6 ; 0x6 be00: ebffe708 bl 5a28 <_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 (); be04: ebffd0c5 bl 120 <_init> be08: eaffffcb b bd3c <_Thread_Handler+0x48> be0c: 00016fc4 .word 0x00016fc4 be10: 00016d50 .word 0x00016d50 0000698c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 698c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 6990: 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 ) { 6994: 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; 6998: 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 ) { 699c: e5dda02c ldrb sl, [sp, #44] 69a0: e1a09000 mov r9, r0 69a4: e1a05001 mov r5, r1 69a8: e59d8028 ldr r8, [sp, #40] 69ac: 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; 69b0: 15c130c0 strbne r3, [r1, #192] 69b4: 11a0c004 movne ip, r4 69b8: 11a02006 movne r2, r6 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 69bc: 0a000034 beq 6a94 <_Thread_Initialize+0x108> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 69c0: e59f416c ldr r4, [pc, #364] ; 6b34 <_Thread_Initialize+0x1a8> 69c4: e5940000 ldr r0, [r4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 69c8: e3a06000 mov r6, #0 ; 0x0 69cc: e3500000 cmp r0, #0 ; 0x0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 69d0: e58520c8 str r2, [r5, #200] the_stack->size = size; 69d4: e585c0c4 str ip, [r5, #196] 69d8: e5856050 str r6, [r5, #80] the_watchdog->routine = routine; 69dc: e5856064 str r6, [r5, #100] the_watchdog->id = id; 69e0: e5856068 str r6, [r5, #104] the_watchdog->user_data = user_data; 69e4: e585606c str r6, [r5, #108] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 69e8: e5856100 str r6, [r5, #256] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 69ec: 05850110 streq r0, [r5, #272] 69f0: 01a07000 moveq r7, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 69f4: 1a000033 bne 6ac8 <_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; 69f8: e59d3034 ldr r3, [sp, #52] switch ( budget_algorithm ) { 69fc: 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; 6a00: 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; 6a04: 059f312c ldreq r3, [pc, #300] ; 6b38 <_Thread_Initialize+0x1ac> 6a08: 05932000 ldreq r2, [r3] 6a0c: 05852078 streq r2, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 6a10: e59d3038 ldr r3, [sp, #56] the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 6a14: e3a04000 mov r4, #0 ; 0x0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 6a18: e3a06001 mov r6, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 6a1c: 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 ); 6a20: e1a01008 mov r1, r8 6a24: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 6a28: e5c5a0ac strb sl, [r5, #172] the_thread->Start.budget_algorithm = budget_algorithm; 6a2c: e585b0b0 str fp, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 6a30: e5856010 str r6, [r5, #16] the_thread->Wait.queue = NULL; 6a34: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 6a38: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 6a3c: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 6a40: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 6a44: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 6a48: eb000200 bl 7250 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 6a4c: e1d530b8 ldrh r3, [r5, #8] 6a50: 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; 6a54: e5854088 str r4, [r5, #136] 6a58: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 6a5c: 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 ); 6a60: e1a00005 mov r0, r5 6a64: 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; 6a68: 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 ); 6a6c: eb0003cb bl 79a0 <_User_extensions_Thread_create> if ( !extension_status ) { 6a70: e1500004 cmp r0, r4 6a74: 1a000011 bne 6ac0 <_Thread_Initialize+0x134> if ( extensions_area ) 6a78: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 6a7c: 11a00007 movne r0, r7 <== NOT EXECUTED 6a80: 1b0004d5 blne 7ddc <_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 ); 6a84: e1a00005 mov r0, r5 <== NOT EXECUTED 6a88: eb0002ad bl 7544 <_Thread_Stack_Free> <== NOT EXECUTED 6a8c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 6a90: 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 ); 6a94: e1a00001 mov r0, r1 6a98: e1a01004 mov r1, r4 6a9c: eb000288 bl 74c4 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 6aa0: e1540000 cmp r4, r0 6aa4: 93a03000 movls r3, #0 ; 0x0 6aa8: 83a03001 movhi r3, #1 ; 0x1 6aac: e3500000 cmp r0, #0 ; 0x0 6ab0: 03833001 orreq r3, r3, #1 ; 0x1 6ab4: e3530000 cmp r3, #0 ; 0x0 6ab8: e1a0c000 mov ip, r0 6abc: 0a000014 beq 6b14 <_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 ) { 6ac0: e1a00006 mov r0, r6 6ac4: 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( 6ac8: e2800001 add r0, r0, #1 ; 0x1 6acc: e1a00100 lsl r0, r0, #2 6ad0: eb0004c5 bl 7dec <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 6ad4: e2507000 subs r7, r0, #0 ; 0x0 6ad8: 0a000011 beq 6b24 <_Thread_Initialize+0x198> * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6adc: e5943000 ldr r3, [r4] 6ae0: e3730001 cmn r3, #1 ; 0x1 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 6ae4: e5857110 str r7, [r5, #272] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6ae8: 0affffc2 beq 69f8 <_Thread_Initialize+0x6c> 6aec: e1a02006 mov r2, r6 6af0: e1a01007 mov r1, r7 the_thread->extensions[i] = NULL; 6af4: e1a00006 mov r0, r6 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6af8: e5943000 ldr r3, [r4] the_thread->extensions[i] = NULL; 6afc: e7810102 str r0, [r1, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6b00: e2833001 add r3, r3, #1 ; 0x1 6b04: e2822001 add r2, r2, #1 ; 0x1 6b08: e1530002 cmp r3, r2 6b0c: 8afffff9 bhi 6af8 <_Thread_Initialize+0x16c> 6b10: eaffffb8 b 69f8 <_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; 6b14: e3a03001 mov r3, #1 ; 0x1 6b18: 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; 6b1c: e59520cc ldr r2, [r5, #204] 6b20: eaffffa6 b 69c0 <_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 ); 6b24: e1a00005 mov r0, r5 <== NOT EXECUTED 6b28: eb000285 bl 7544 <_Thread_Stack_Free> <== NOT EXECUTED 6b2c: e1a00007 mov r0, r7 <== NOT EXECUTED 6b30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 6b34: 00016fa4 .word 0x00016fa4 6b38: 00016ec4 .word 0x00016ec4 00007f4c <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 7f4c: e5903010 ldr r3, [r0, #16] 7f50: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 7f54: e92d4070 push {r4, r5, r6, lr} 7f58: e1a04000 mov r4, r0 7f5c: e1a05001 mov r5, r1 7f60: e1a06002 mov r6, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 7f64: 13a00000 movne r0, #0 ; 0x0 7f68: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 7f6c: eb000089 bl 8198 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 7f70: e1a02006 mov r2, r6 7f74: e1a01005 mov r1, r5 7f78: e1a00004 mov r0, r4 7f7c: eb000fa6 bl be1c <_Thread_Reset> _Thread_Load_environment( the_thread ); 7f80: e1a00004 mov r0, r4 7f84: eb000eba bl ba74 <_Thread_Load_environment> _Thread_Ready( the_thread ); 7f88: e1a00004 mov r0, r4 7f8c: eb000f5d bl bd08 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 7f90: e1a00004 mov r0, r4 7f94: eb000208 bl 87bc <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 7f98: e59f301c ldr r3, [pc, #28] ; 7fbc <_Thread_Restart+0x70> 7f9c: e5932000 ldr r2, [r3] 7fa0: e1540002 cmp r4, r2 7fa4: 13a00001 movne r0, #1 ; 0x1 7fa8: 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 ); 7fac: e28400d0 add r0, r4, #208 ; 0xd0 7fb0: eb00032e bl 8c70 <_CPU_Context_restore> 7fb4: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 7fb8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 7fbc: 0001aa64 .word 0x0001aa64 00008d50 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 8d50: e92d0030 push {r4, r5} 8d54: e20110ff and r1, r1, #255 ; 0xff 8d58: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 8d5c: e10f5000 mrs r5, CPSR 8d60: e38530c0 orr r3, r5, #192 ; 0xc0 8d64: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 8d68: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; 8d6c: 13a03000 movne r3, #0 ; 0x0 8d70: 15803070 strne r3, [r0, #112] ISR_Level level; States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) 8d74: 1a000006 bne 8d94 <_Thread_Resume+0x44> the_thread->suspend_count = 0; else the_thread->suspend_count--; 8d78: e5903070 ldr r3, [r0, #112] <== NOT EXECUTED 8d7c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 8d80: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 8d84: e5803070 str r3, [r0, #112] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 8d88: 0a000001 beq 8d94 <_Thread_Resume+0x44> <== NOT EXECUTED _ISR_Enable( level ); 8d8c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 8d90: ea000003 b 8da4 <_Thread_Resume+0x54> <== NOT EXECUTED return; } current_state = the_thread->current_state; 8d94: e5943010 ldr r3, [r4, #16] if ( current_state & STATES_SUSPENDED ) { 8d98: e3130002 tst r3, #2 ; 0x2 8d9c: 1a000002 bne 8dac <_Thread_Resume+0x5c> _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 8da0: e129f005 msr CPSR_fc, r5 } 8da4: e8bd0030 pop {r4, r5} 8da8: e12fff1e bx lr 8dac: 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 ) ) { 8db0: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 8db4: e5843010 str r3, [r4, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8db8: 1afffff8 bne 8da0 <_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; 8dbc: e5940090 ldr r0, [r4, #144] 8dc0: e1d429b6 ldrh r2, [r4, #150] 8dc4: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 8dc8: e594108c ldr r1, [r4, #140] 8dcc: e1833002 orr r3, r3, r2 8dd0: e1c030b0 strh r3, [r0] _Priority_Major_bit_map |= the_priority_map->ready_major; 8dd4: e59fc07c ldr ip, [pc, #124] ; 8e58 <_Thread_Resume+0x108> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8dd8: e2813004 add r3, r1, #4 ; 0x4 8ddc: e5843000 str r3, [r4] 8de0: e1dc20b0 ldrh r2, [ip] 8de4: e1d439b4 ldrh r3, [r4, #148] old_last_node = the_chain->last; 8de8: e5910008 ldr r0, [r1, #8] 8dec: e1822003 orr r2, r2, r3 the_chain->last = the_node; 8df0: e5814008 str r4, [r1, #8] 8df4: e1cc20b0 strh r2, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 8df8: 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; 8dfc: e5804000 str r4, [r0] _ISR_Flash( level ); 8e00: e10f3000 mrs r3, CPSR 8e04: e129f005 msr CPSR_fc, r5 8e08: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 8e0c: e59fc048 ldr ip, [pc, #72] ; 8e5c <_Thread_Resume+0x10c> 8e10: e59c3000 ldr r3, [ip] 8e14: e5940014 ldr r0, [r4, #20] 8e18: e5932014 ldr r2, [r3, #20] 8e1c: e1500002 cmp r0, r2 8e20: 2affffde bcs 8da0 <_Thread_Resume+0x50> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 8e24: e59f3034 ldr r3, [pc, #52] ; 8e60 <_Thread_Resume+0x110> 8e28: e5932000 ldr r2, [r3] 8e2c: e5d21076 ldrb r1, [r2, #118] 8e30: e3510000 cmp r1, #0 ; 0x0 _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; 8e34: e58c4000 str r4, [ip] if ( _Thread_Executing->is_preemptible || 8e38: 0a000003 beq 8e4c <_Thread_Resume+0xfc> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 8e3c: e59f3020 ldr r3, [pc, #32] ; 8e64 <_Thread_Resume+0x114> 8e40: e3a02001 mov r2, #1 ; 0x1 8e44: e5c32000 strb r2, [r3] 8e48: eaffffd4 b 8da0 <_Thread_Resume+0x50> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 8e4c: e3500000 cmp r0, #0 ; 0x0 8e50: 1affffd2 bne 8da0 <_Thread_Resume+0x50> 8e54: eafffff8 b 8e3c <_Thread_Resume+0xec> <== NOT EXECUTED 8e58: 00023858 .word 0x00023858 8e5c: 00023830 .word 0x00023830 8e60: 00023864 .word 0x00023864 8e64: 00023874 .word 0x00023874 000074c4 <_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 ) { 74c4: e59f3070 ldr r3, [pc, #112] ; 753c <_Thread_Stack_Allocate+0x78> 74c8: e5932000 ldr r2, [r3] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 74cc: e59f306c ldr r3, [pc, #108] ; 7540 <_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 ) { 74d0: e592c020 ldr ip, [r2, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 74d4: e5932000 ldr r2, [r3] 74d8: e92d4030 push {r4, r5, lr} 74dc: e1510002 cmp r1, r2 74e0: 21a04001 movcs r4, r1 74e4: 31a04002 movcc r4, 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 ) { 74e8: e35c0000 cmp ip, #0 ; 0x0 size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 74ec: 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 ) { 74f0: 0a000008 beq 7518 <_Thread_Stack_Allocate+0x54> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 74f4: e1a00004 mov r0, r4 <== NOT EXECUTED 74f8: e1a0e00f mov lr, pc <== NOT EXECUTED 74fc: e12fff1c bx ip <== NOT EXECUTED 7500: e1a03000 mov r3, r0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 7504: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 7508: 11a00004 movne r0, r4 <== NOT EXECUTED 750c: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 7510: e58530cc str r3, [r5, #204] <== NOT EXECUTED return the_stack_size; } 7514: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 7518: 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 ); 751c: e1a00004 mov r0, r4 7520: eb000231 bl 7dec <_Workspace_Allocate> 7524: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 7528: e3530000 cmp r3, #0 ; 0x0 752c: 11a00004 movne r0, r4 7530: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 7534: e58530cc str r3, [r5, #204] return the_stack_size; } 7538: e8bd8030 pop {r4, r5, pc} 753c: 00016f9c .word 0x00016f9c 7540: 0001513c .word 0x0001513c 00007544 <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 7544: e5d030c0 ldrb r3, [r0, #192] 7548: e3530000 cmp r3, #0 ; 0x0 */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 754c: 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 ) 7550: 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 ) 7554: e59f3028 ldr r3, [pc, #40] ; 7584 <_Thread_Stack_Free+0x40> 7558: e5932000 ldr r2, [r3] 755c: e5923024 ldr r3, [r2, #36] 7560: e3530000 cmp r3, #0 ; 0x0 7564: 0a000003 beq 7578 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 7568: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 756c: e1a0e00f mov lr, pc <== NOT EXECUTED 7570: e12fff13 bx r3 <== NOT EXECUTED 7574: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 7578: e59000c8 ldr r0, [r0, #200] } 757c: 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 ); 7580: ea000215 b 7ddc <_Workspace_Free> 7584: 00016f9c .word 0x00016f9c 000062a8 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 62a8: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 62ac: e92d4010 push {r4, lr} <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 62b0: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 62b4: e1a04001 mov r4, r1 <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 62b8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 62bc: e5841044 str r1, [r4, #68] <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 62c0: 0a000006 beq 62e0 <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 62c4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 62c8: e3a01201 mov r1, #268435456 ; 0x10000000 <== NOT EXECUTED 62cc: e2811bff add r1, r1, #261120 ; 0x3fc00 <== NOT EXECUTED 62d0: e1a00004 mov r0, r4 <== NOT EXECUTED 62d4: e2811ffe add r1, r1, #1016 ; 0x3f8 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 62d8: e8bd4010 pop {r4, lr} <== NOT EXECUTED 62dc: ea000070 b 64a4 <_Thread_Clear_state> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 62e0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 62e4: e5843050 str r3, [r4, #80] <== NOT EXECUTED * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 62e8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 62ec: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 62f0: eb000667 bl 7c94 <_Watchdog_Remove> <== NOT EXECUTED 62f4: eafffff3 b 62c8 <_Thread_blocking_operation_Cancel+0x20> <== NOT EXECUTED 00006e8c <_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 ) { 6e8c: 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); 6e90: 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; 6e94: 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 ) { 6e98: e1a07001 mov r7, r1 6e9c: e1a08000 mov r8, r0 6ea0: e5813038 str r3, [r1, #56] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 6ea4: 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; 6ea8: 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 ) ) 6eac: e3140020 tst r4, #32 ; 0x20 6eb0: 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); 6eb4: 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 ) { 6eb8: 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; 6ebc: 11a02201 lslne r2, r1, #4 6ec0: 10423101 subne r3, r2, r1, lsl #2 6ec4: 10882003 addne r2, r8, r3 the_chain->last = _Chain_Head(the_chain); 6ec8: 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; 6ecc: e5986038 ldr r6, [r8, #56] 6ed0: 159f91d4 ldrne r9, [pc, #468] ; 70ac <_Thread_queue_Enqueue_priority+0x220> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 6ed4: 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 ) ) 6ed8: 1a000028 bne 6f80 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6edc: e1a03081 lsl r3, r1, #1 6ee0: e0833001 add r3, r3, r1 6ee4: e2833001 add r3, r3, #1 ; 0x1 6ee8: 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; 6eec: e0422101 sub r2, r2, r1, lsl #2 6ef0: e1a03103 lsl r3, r3, #2 6ef4: e0880003 add r0, r8, r3 6ef8: 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 ); 6efc: e10f5000 mrs r5, CPSR 6f00: e38530c0 orr r3, r5, #192 ; 0xc0 6f04: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 6f08: e5921000 ldr r1, [r2] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6f0c: e1510000 cmp r1, r0 6f10: 1a00000f bne 6f54 <_Thread_queue_Enqueue_priority+0xc8> 6f14: ea000061 b 70a0 <_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; 6f18: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 6f1c: e1510000 cmp r1, r0 6f20: 0a00000e beq 6f60 <_Thread_queue_Enqueue_priority+0xd4> break; search_priority = search_thread->current_priority; 6f24: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 6f28: e154000c cmp r4, ip 6f2c: 9a00000b bls 6f60 <_Thread_queue_Enqueue_priority+0xd4> break; #endif _ISR_Flash( level ); 6f30: e10f3000 mrs r3, CPSR 6f34: e129f005 msr CPSR_fc, r5 6f38: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 6f3c: e5913010 ldr r3, [r1, #16] 6f40: e1160003 tst r6, r3 6f44: 0a000049 beq 7070 <_Thread_queue_Enqueue_priority+0x1e4> _ISR_Enable( level ); goto restart_forward_search; } search_thread = 6f48: 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 ) ) { 6f4c: e1510000 cmp r1, r0 6f50: 0a000002 beq 6f60 <_Thread_queue_Enqueue_priority+0xd4> search_priority = search_thread->current_priority; 6f54: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 6f58: e154000c cmp r4, ip 6f5c: 8affffed bhi 6f18 <_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 ) ) { 6f60: e1a06005 mov r6, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6f64: e5980030 ldr r0, [r8, #48] 6f68: e3500001 cmp r0, #1 ; 0x1 6f6c: 0a000034 beq 7044 <_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; 6f70: e58a6000 str r6, [sl] <== NOT EXECUTED return the_thread_queue->sync_state; } 6f74: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} 6f78: 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 ); 6f7c: 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; 6f80: e5d93000 ldrb r3, [r9] 6f84: e283c001 add ip, r3, #1 ; 0x1 _ISR_Disable( level ); 6f88: e10f5000 mrs r5, CPSR 6f8c: e38530c0 orr r3, r5, #192 ; 0xc0 6f90: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 6f94: e5901000 ldr r1, [r0] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 6f98: e1520001 cmp r2, r1 6f9c: 0a000018 beq 7004 <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 6fa0: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6fa4: e154000c cmp r4, ip 6fa8: 2a000015 bcs 7004 <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6fac: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 6fb0: e1520001 cmp r2, r1 6fb4: 1a00000f bne 6ff8 <_Thread_queue_Enqueue_priority+0x16c> 6fb8: ea000011 b 7004 <_Thread_queue_Enqueue_priority+0x178> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 6fbc: e10f3000 mrs r3, CPSR 6fc0: e129f005 msr CPSR_fc, r5 6fc4: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 6fc8: e5913010 ldr r3, [r1, #16] 6fcc: e1160003 tst r6, r3 6fd0: 0affffe9 beq 6f7c <_Thread_queue_Enqueue_priority+0xf0> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 6fd4: 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 ) ) { 6fd8: e1510002 cmp r1, r2 6fdc: 0a000008 beq 7004 <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 6fe0: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6fe4: e154000c cmp r4, ip 6fe8: 2a000005 bcs 7004 <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6fec: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 6ff0: e1510002 cmp r1, r2 <== NOT EXECUTED 6ff4: 0a000002 beq 7004 <_Thread_queue_Enqueue_priority+0x178> <== NOT EXECUTED break; search_priority = search_thread->current_priority; 6ff8: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6ffc: e154000c cmp r4, ip 7000: 3affffed bcc 6fbc <_Thread_queue_Enqueue_priority+0x130> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7004: e5980030 ldr r0, [r8, #48] 7008: e3500001 cmp r0, #1 ; 0x1 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 ) ) { 700c: e1a06005 mov r6, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7010: 1affffd6 bne 6f70 <_Thread_queue_Enqueue_priority+0xe4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7014: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 7018: 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; 701c: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 7020: 0a000014 beq 7078 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 7024: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7028: 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; 702c: 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; 7030: 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; 7034: e5817000 str r7, [r1] next_node->previous = the_node; 7038: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 703c: e129f005 msr CPSR_fc, r5 7040: eaffffcb b 6f74 <_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; 7044: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 7048: 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; 704c: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 7050: 0a000008 beq 7078 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 7054: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7058: 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; 705c: 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; 7060: e5837000 str r7, [r3] search_node->previous = the_node; 7064: e5817004 str r7, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 7068: e129f005 msr CPSR_fc, r5 706c: eaffffc0 b 6f74 <_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 ); 7070: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 7074: eaffffa0 b 6efc <_Thread_queue_Enqueue_priority+0x70> <== NOT EXECUTED 7078: 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; 707c: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7080: e5873000 str r3, [r7] the_node->previous = previous_node; 7084: e5872004 str r2, [r7, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7088: 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; 708c: e5827000 str r7, [r2] search_node->previous = the_node; 7090: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 7094: e129f006 msr CPSR_fc, r6 7098: e3a00001 mov r0, #1 ; 0x1 709c: eaffffb4 b 6f74 <_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 ) ) { 70a0: e1a06005 mov r6, r5 70a4: e3e0c000 mvn ip, #0 ; 0x0 70a8: eaffffad b 6f64 <_Thread_queue_Enqueue_priority+0xd8> 70ac: 00015140 .word 0x00015140 0000be14 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { be14: e92d4010 push {r4, lr} be18: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); be1c: e10f0000 mrs r0, CPSR be20: e38030c0 orr r3, r0, #192 ; 0xc0 be24: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { be28: e5913010 ldr r3, [r1, #16] be2c: e3c334ff bic r3, r3, #-16777216 ; 0xff000000 be30: e3c3373f bic r3, r3, #16515072 ; 0xfc0000 be34: e3c33c41 bic r3, r3, #16640 ; 0x4100 be38: e3c3301f bic r3, r3, #31 ; 0x1f be3c: e3530000 cmp r3, #0 ; 0x0 be40: 0a00000f beq be84 <_Thread_queue_Extract_fifo+0x70> _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { be44: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; be48: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; be4c: e5911000 ldr r1, [r1] be50: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; be54: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; be58: e5821000 str r1, [r2] be5c: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; be60: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { be64: 0a000008 beq be8c <_Thread_queue_Extract_fifo+0x78> _ISR_Enable( level ); be68: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); be6c: e3a01201 mov r1, #268435456 ; 0x10000000 be70: e2811bff add r1, r1, #261120 ; 0x3fc00 be74: e1a00004 mov r0, r4 be78: e2811ffe add r1, r1, #1016 ; 0x3f8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } be7c: e8bd4010 pop {r4, lr} be80: eaffe987 b 64a4 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); be84: 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 } be88: e8bd8010 pop {r4, pc} <== NOT EXECUTED be8c: e3a03003 mov r3, #3 ; 0x3 be90: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); be94: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); be98: e2840048 add r0, r4, #72 ; 0x48 be9c: ebffef7c bl 7c94 <_Watchdog_Remove> bea0: eafffff1 b be6c <_Thread_queue_Extract_fifo+0x58> 0000ad70 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { ad70: e92d4070 push {r4, r5, r6, lr} ad74: e1a04001 mov r4, r1 ad78: 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 ); ad7c: e10fc000 mrs ip, CPSR ad80: e38c30c0 orr r3, ip, #192 ; 0xc0 ad84: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ad88: e5913010 ldr r3, [r1, #16] ad8c: e3c334ff bic r3, r3, #-16777216 ; 0xff000000 ad90: e3c3373f bic r3, r3, #16515072 ; 0xfc0000 ad94: e3c33c41 bic r3, r3, #16640 ; 0x4100 ad98: e3c3301f bic r3, r3, #31 ; 0x1f ad9c: e3530000 cmp r3, #0 ; 0x0 ada0: 0a000023 beq ae34 <_Thread_queue_Extract_priority_helper+0xc4> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ada4: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { ada8: e284303c add r3, r4, #60 ; 0x3c adac: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; adb0: 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; adb4: 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; adb8: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { adbc: 0a00000e beq adfc <_Thread_queue_Extract_priority_helper+0x8c> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; adc0: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; adc4: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; adc8: 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; adcc: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; add0: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { add4: e5942038 ldr r2, [r4, #56] add8: e5943040 ldr r3, [r4, #64] addc: e1520003 cmp r2, r3 ade0: 0a000005 beq adfc <_Thread_queue_Extract_priority_helper+0x8c> new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); ade4: 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 = ade8: e2813038 add r3, r1, #56 ; 0x38 adec: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; adf0: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; adf4: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); adf8: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { adfc: e3560000 cmp r6, #0 ; 0x0 ae00: 1a000009 bne ae2c <_Thread_queue_Extract_priority_helper+0xbc> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ae04: e5943050 ldr r3, [r4, #80] ae08: e3530002 cmp r3, #2 ; 0x2 ae0c: 0a00000a beq ae3c <_Thread_queue_Extract_priority_helper+0xcc> _ISR_Enable( level ); ae10: e129f00c msr CPSR_fc, ip ae14: e3a01201 mov r1, #268435456 ; 0x10000000 ae18: e2811bff add r1, r1, #261120 ; 0x3fc00 ae1c: e1a00004 mov r0, r4 ae20: e2811ffe add r1, r1, #1016 ; 0x3f8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } ae24: e8bd4070 pop {r4, r5, r6, lr} ae28: eaffed9d b 64a4 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); ae2c: e129f00c msr CPSR_fc, ip ae30: 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 ); ae34: e129f00c msr CPSR_fc, ip <== NOT EXECUTED ae38: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED ae3c: e3a03003 mov r3, #3 ; 0x3 ae40: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); ae44: e129f00c msr CPSR_fc, ip (void) _Watchdog_Remove( &the_thread->Timer ); ae48: e2840048 add r0, r4, #72 ; 0x48 ae4c: ebfff390 bl 7c94 <_Watchdog_Remove> ae50: eaffffef b ae14 <_Thread_queue_Extract_priority_helper+0xa4> 0000ae54 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { ae54: e1a01000 mov r1, r0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; ae58: e5900044 ldr r0, [r0, #68] * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && ae5c: e590c030 ldr ip, [r0, #48] ae60: e35c0000 cmp ip, #0 ; 0x0 ae64: 0a000003 beq ae78 <_Thread_queue_Process_timeout+0x24> ae68: e59f302c ldr r3, [pc, #44] ; ae9c <_Thread_queue_Process_timeout+0x48> <== NOT EXECUTED ae6c: e5932000 ldr r2, [r3] <== NOT EXECUTED ae70: e1510002 cmp r1, r2 <== NOT EXECUTED ae74: 0a000002 beq ae84 <_Thread_queue_Process_timeout+0x30> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ae78: e590303c ldr r3, [r0, #60] ae7c: e5813034 str r3, [r1, #52] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ae80: eaffffb4 b ad58 <_Thread_queue_Extract> * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { ae84: e35c0003 cmp ip, #3 ; 0x3 <== NOT EXECUTED the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ae88: 1590303c ldrne r3, [r0, #60] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ae8c: 13a02002 movne r2, #2 ; 0x2 <== NOT EXECUTED */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ae90: 15813034 strne r3, [r1, #52] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ae94: 15802030 strne r2, [r0, #48] <== NOT EXECUTED ae98: e12fff1e bx lr <== NOT EXECUTED ae9c: 00016fc4 .word 0x00016fc4 00012bfc <_Timer_Server_body>: * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 12bfc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c00: e59f01cc ldr r0, [pc, #460] ; 12dd4 <_Timer_Server_body+0x1d8> 12c04: e59f81cc ldr r8, [pc, #460] ; 12dd8 <_Timer_Server_body+0x1dc> 12c08: e5902000 ldr r2, [r0] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c0c: e59f01c8 ldr r0, [pc, #456] ; 12ddc <_Timer_Server_body+0x1e0> 12c10: e5983000 ldr r3, [r8] * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 12c14: e24dd00c sub sp, sp, #12 ; 0xc /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c18: e59f91c0 ldr r9, [pc, #448] ; 12de0 <_Timer_Server_body+0x1e4> _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c1c: e59fb1c0 ldr fp, [pc, #448] ; 12de4 <_Timer_Server_body+0x1e8> 12c20: e5901000 ldr r1, [r0] 12c24: e2833001 add r3, r3, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12c28: e28d5004 add r5, sp, #4 ; 0x4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 12c2c: e3a04000 mov r4, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12c30: e1a0600d mov r6, sp /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c34: e5892000 str r2, [r9] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c38: e58b1000 str r1, [fp] 12c3c: e5883000 str r3, [r8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12c40: e58d5000 str r5, [sp] the_chain->permanent_null = NULL; 12c44: e98d2010 stmib sp, {r4, sp} /* * Insert the timers that were inserted before we got to run. * This should be done with dispatching disabled. */ _Thread_Disable_dispatch(); _Timer_Server_process_insertions(); 12c48: ebffffce bl 12b88 <_Timer_Server_process_insertions> _Thread_Enable_dispatch(); 12c4c: eb000b6e bl 15a0c <_Thread_Enable_dispatch> 12c50: e59fa190 ldr sl, [pc, #400] ; 12de8 <_Timer_Server_body+0x1ec> if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 12c54: e1a07004 mov r7, r4 12c58: e5983000 ldr r3, [r8] 12c5c: e2833001 add r3, r3, #1 ; 0x1 12c60: e5883000 str r3, [r8] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 12c64: e3a01008 mov r1, #8 ; 0x8 12c68: e59a0000 ldr r0, [sl] 12c6c: eb000e4d bl 165a8 <_Thread_Set_state> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 12c70: e59f2174 ldr r2, [pc, #372] ; 12dec <_Timer_Server_body+0x1f0> _Timer_Server_reset_ticks_timer(); 12c74: e59f0174 ldr r0, [pc, #372] ; 12df0 <_Timer_Server_body+0x1f4> 12c78: e5923000 ldr r3, [r2] 12c7c: e1530000 cmp r3, r0 12c80: 0a000006 beq 12ca0 <_Timer_Server_body+0xa4> 12c84: e59f215c ldr r2, [pc, #348] ; 12de8 <_Timer_Server_body+0x1ec> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12c88: e5933010 ldr r3, [r3, #16] 12c8c: e5921000 ldr r1, [r2] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12c90: e59f015c ldr r0, [pc, #348] ; 12df4 <_Timer_Server_body+0x1f8> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12c94: e5813054 str r3, [r1, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12c98: e2811048 add r1, r1, #72 ; 0x48 12c9c: eb001125 bl 17138 <_Watchdog_Insert> 12ca0: e59f0150 ldr r0, [pc, #336] ; 12df8 <_Timer_Server_body+0x1fc> _Timer_Server_reset_seconds_timer(); 12ca4: e59f2150 ldr r2, [pc, #336] ; 12dfc <_Timer_Server_body+0x200> 12ca8: e5903000 ldr r3, [r0] 12cac: e1530002 cmp r3, r2 12cb0: 0a000004 beq 12cc8 <_Timer_Server_body+0xcc> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12cb4: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 12cb8: e59f1140 ldr r1, [pc, #320] ; 12e00 <_Timer_Server_body+0x204> <== NOT EXECUTED 12cbc: e59f0140 ldr r0, [pc, #320] ; 12e04 <_Timer_Server_body+0x208> <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12cc0: e581300c str r3, [r1, #12] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 12cc4: eb00111b bl 17138 <_Watchdog_Insert> <== NOT EXECUTED _Thread_Enable_dispatch(); 12cc8: eb000b4f bl 15a0c <_Thread_Enable_dispatch> 12ccc: e5983000 ldr r3, [r8] 12cd0: e2833001 add r3, r3, #1 ; 0x1 12cd4: e5883000 str r3, [r8] /* * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 12cd8: e59a0000 ldr r0, [sl] 12cdc: e2800048 add r0, r0, #72 ; 0x48 12ce0: eb001183 bl 172f4 <_Watchdog_Remove> _Timer_Server_stop_seconds_timer(); 12ce4: e59f0114 ldr r0, [pc, #276] ; 12e00 <_Timer_Server_body+0x204> 12ce8: eb001181 bl 172f4 <_Watchdog_Remove> ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 12cec: e59f30e0 ldr r3, [pc, #224] ; 12dd4 <_Timer_Server_body+0x1d8> if ( snapshot >= _Timer_Server_ticks_last_time ) 12cf0: e5991000 ldr r1, [r9] ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 12cf4: e593c000 ldr ip, [r3] if ( snapshot >= _Timer_Server_ticks_last_time ) 12cf8: e15c0001 cmp ip, r1 ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 12cfc: 31e03001 mvncc r3, r1 Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; 12d00: 2061100c rsbcs r1, r1, ip else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 12d04: 3083100c addcc r1, r3, ip _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 12d08: e59f00dc ldr r0, [pc, #220] ; 12dec <_Timer_Server_body+0x1f0> 12d0c: e1a0200d mov r2, sp if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; 12d10: e589c000 str ip, [r9] _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 12d14: eb0010d9 bl 17080 <_Watchdog_Adjust_to_chain> /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 12d18: e59f00bc ldr r0, [pc, #188] ; 12ddc <_Timer_Server_body+0x1e0> if ( snapshot > _Timer_Server_seconds_last_time ) { 12d1c: e59b2000 ldr r2, [fp] /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 12d20: e5904000 ldr r4, [r0] if ( snapshot > _Timer_Server_seconds_last_time ) { 12d24: e1540002 cmp r4, r2 12d28: 8a00001f bhi 12dac <_Timer_Server_body+0x1b0> * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); } else if ( snapshot < _Timer_Server_seconds_last_time ) { 12d2c: 3a000023 bcc 12dc0 <_Timer_Server_body+0x1c4> * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); } _Timer_Server_seconds_last_time = snapshot; 12d30: e58b4000 str r4, [fp] _Timer_Server_process_seconds_chain( &to_fire ); /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12d34: ebffff93 bl 12b88 <_Timer_Server_process_insertions> /* * Enable dispatching to process the set that are ready "to fire." */ _Thread_Enable_dispatch(); 12d38: eb000b33 bl 15a0c <_Thread_Enable_dispatch> */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 12d3c: e10f1000 mrs r1, CPSR 12d40: e38130c0 orr r3, r1, #192 ; 0xc0 12d44: e129f003 msr CPSR_fc, r3 12d48: e59d2000 ldr r2, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 12d4c: e1550002 cmp r5, r2 12d50: 0a000013 beq 12da4 <_Timer_Server_body+0x1a8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 12d54: e5923000 ldr r3, [r2] the_chain->first = new_first; 12d58: e58d3000 str r3, [sp] new_first->previous = _Chain_Head(the_chain); 12d5c: e5836004 str r6, [r3, #4] 12d60: ea000002 b 12d70 <_Timer_Server_body+0x174> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 12d64: e5933000 ldr r3, [r3] <== NOT EXECUTED the_chain->first = new_first; 12d68: e58d3000 str r3, [sp] <== NOT EXECUTED new_first->previous = _Chain_Head(the_chain); 12d6c: e5836004 str r6, [r3, #4] <== NOT EXECUTED if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 12d70: e5827008 str r7, [r2, #8] _ISR_Enable( level ); 12d74: e129f001 msr CPSR_fc, r1 (*watch->routine)( watch->id, watch->user_data ); 12d78: e2820020 add r0, r2, #32 ; 0x20 12d7c: e8900003 ldm r0, {r0, r1} 12d80: e1a0e00f mov lr, pc 12d84: e592f01c ldr pc, [r2, #28] */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 12d88: e10f1000 mrs r1, CPSR 12d8c: e38130c0 orr r3, r1, #192 ; 0xc0 12d90: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 12d94: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 12d98: e1550003 cmp r5, r3 watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire ); 12d9c: e1a02003 mov r2, r3 12da0: 1affffef bne 12d64 <_Timer_Server_body+0x168> if ( watch == NULL ) { _ISR_Enable( level ); 12da4: e129f001 msr CPSR_fc, r1 12da8: eaffffaa b 12c58 <_Timer_Server_body+0x5c> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); 12dac: e0621004 rsb r1, r2, r4 12db0: e59f0040 ldr r0, [pc, #64] ; 12df8 <_Timer_Server_body+0x1fc> 12db4: e1a0200d mov r2, sp 12db8: eb0010b0 bl 17080 <_Watchdog_Adjust_to_chain> 12dbc: eaffffdb b 12d30 <_Timer_Server_body+0x134> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); 12dc0: e0642002 rsb r2, r4, r2 <== NOT EXECUTED 12dc4: e59f002c ldr r0, [pc, #44] ; 12df8 <_Timer_Server_body+0x1fc> <== NOT EXECUTED 12dc8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 12dcc: eb00107c bl 16fc4 <_Watchdog_Adjust> <== NOT EXECUTED 12dd0: eaffffd6 b 12d30 <_Timer_Server_body+0x134> <== NOT EXECUTED 12dd4: 00032924 .word 0x00032924 12dd8: 000327cc .word 0x000327cc 12ddc: 00032854 .word 0x00032854 12de0: 00032724 .word 0x00032724 12de4: 00032720 .word 0x00032720 12de8: 00033100 .word 0x00033100 12dec: 00032714 .word 0x00032714 12df0: 00032718 .word 0x00032718 12df4: 000328a4 .word 0x000328a4 12df8: 00032728 .word 0x00032728 12dfc: 0003272c .word 0x0003272c 12e00: 00032740 .word 0x00032740 12e04: 00032898 .word 0x00032898 00012b88 <_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) { 12b88: e52de004 push {lr} ; (str lr, [sp, #-4]!) Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 12b8c: e59f005c ldr r0, [pc, #92] ; 12bf0 <_Timer_Server_process_insertions+0x68> 12b90: eb0002a9 bl 1363c <_Chain_Get> if ( the_timer == NULL ) 12b94: e3500000 cmp r0, #0 ; 0x0 12b98: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 12b9c: e5903038 ldr r3, [r0, #56] 12ba0: e3530001 cmp r3, #1 ; 0x1 12ba4: 0a00000c beq 12bdc <_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 ) { 12ba8: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 12bac: 0a000005 beq 12bc8 <_Timer_Server_process_insertions+0x40> <== NOT EXECUTED } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12bb0: ebfffff4 bl 12b88 <_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 ); 12bb4: e59f0034 ldr r0, [pc, #52] ; 12bf0 <_Timer_Server_process_insertions+0x68> 12bb8: eb00029f bl 1363c <_Chain_Get> if ( the_timer == NULL ) 12bbc: e3500000 cmp r0, #0 ; 0x0 12bc0: 1afffff5 bne 12b9c <_Timer_Server_process_insertions+0x14> 12bc4: 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 ); 12bc8: e2801010 add r1, r0, #16 ; 0x10 <== NOT EXECUTED 12bcc: e59f0020 ldr r0, [pc, #32] ; 12bf4 <_Timer_Server_process_insertions+0x6c> <== NOT EXECUTED 12bd0: eb001158 bl 17138 <_Watchdog_Insert> <== NOT EXECUTED } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12bd4: ebffffeb bl 12b88 <_Timer_Server_process_insertions> <== NOT EXECUTED 12bd8: eafffff5 b 12bb4 <_Timer_Server_process_insertions+0x2c> <== NOT EXECUTED 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 ); 12bdc: e2801010 add r1, r0, #16 ; 0x10 12be0: e59f0010 ldr r0, [pc, #16] ; 12bf8 <_Timer_Server_process_insertions+0x70> 12be4: eb001153 bl 17138 <_Watchdog_Insert> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12be8: ebffffe6 bl 12b88 <_Timer_Server_process_insertions> 12bec: eafffff0 b 12bb4 <_Timer_Server_process_insertions+0x2c> 12bf0: 00032734 .word 0x00032734 12bf4: 00032728 .word 0x00032728 12bf8: 00032714 .word 0x00032714 00022938 <_Timespec_Divide_by_integer>: void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 22938: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; 2293c: e3a0c5ee mov ip, #998244352 ; 0x3b800000 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 22940: e5907000 ldr r7, [r0] <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 22944: e28cc96b add ip, ip, #1753088 ; 0x1ac000 <== NOT EXECUTED 22948: e28ccc0a add ip, ip, #2560 ; 0xa00 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 2294c: e1a08fc7 asr r8, r7, #31 <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 22950: e086579c umull r5, r6, ip, r7 <== NOT EXECUTED 22954: e026689c mla r6, ip, r8, r6 <== NOT EXECUTED t += time->tv_nsec; 22958: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED 2295c: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 22960: e0950003 adds r0, r5, r3 <== NOT EXECUTED 22964: e1a07001 mov r7, r1 <== NOT EXECUTED 22968: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 2296c: e1a0a002 mov sl, r2 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 22970: e0a61004 adc r1, r6, r4 <== NOT EXECUTED 22974: e1a02007 mov r2, r7 <== NOT EXECUTED 22978: e1a03008 mov r3, r8 <== NOT EXECUTED 2297c: eb006e8c bl 3e3b4 <__udivdi3> <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 22980: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED 22984: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED 22988: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED 2298c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 22990: e1a04000 mov r4, r0 <== NOT EXECUTED 22994: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 22998: eb006e85 bl 3e3b4 <__udivdi3> <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 2299c: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED 229a0: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 229a4: e58a0000 str r0, [sl] <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 229a8: e1a01005 mov r1, r5 <== NOT EXECUTED 229ac: e1a00004 mov r0, r4 <== NOT EXECUTED 229b0: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED 229b4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 229b8: eb006fc5 bl 3e8d4 <__umoddi3> <== NOT EXECUTED 229bc: e58a0004 str r0, [sl, #4] <== NOT EXECUTED } 229c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 0000d740 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { d740: e92d4010 push {r4, lr} d744: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); d748: eb00136f bl 1250c <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) d74c: e5943024 ldr r3, [r4, #36] d750: e3530000 cmp r3, #0 ; 0x0 d754: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); d758: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } d75c: 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 ); d760: ea001369 b 1250c <_Chain_Extract> <== NOT EXECUTED 00009944 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 9944: e92d41f0 push {r4, r5, r6, r7, r8, lr} 9948: e1a07000 mov r7, r0 994c: e1a04002 mov r4, r2 ISR_Level level; _ISR_Disable( level ); 9950: e10fc000 mrs ip, CPSR 9954: e38c30c0 orr r3, ip, #192 ; 0xc0 9958: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 995c: e1a06000 mov r6, r0 9960: 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 ) ) { 9964: e1500006 cmp r0, r6 9968: 0a000019 beq 99d4 <_Watchdog_Adjust+0x90> switch ( direction ) { 996c: e3510000 cmp r1, #0 ; 0x0 9970: 1a000019 bne 99dc <_Watchdog_Adjust+0x98> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 9974: e3520000 cmp r2, #0 ; 0x0 9978: 0a000015 beq 99d4 <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 997c: e5905010 ldr r5, [r0, #16] 9980: e1520005 cmp r2, r5 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 9984: e1a01000 mov r1, r0 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 9988: 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 ) { 998c: 2a000005 bcs 99a8 <_Watchdog_Adjust+0x64> 9990: ea000017 b 99f4 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 9994: e0544005 subs r4, r4, r5 9998: 0a00000d beq 99d4 <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 999c: e5915010 ldr r5, [r1, #16] 99a0: e1550004 cmp r5, r4 99a4: 8a000012 bhi 99f4 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 99a8: e5818010 str r8, [r1, #16] _ISR_Enable( level ); 99ac: e129f00c msr CPSR_fc, ip _Watchdog_Tickle( header ); 99b0: e1a00007 mov r0, r7 99b4: eb0000ab bl 9c68 <_Watchdog_Tickle> _ISR_Disable( level ); 99b8: e10fc000 mrs ip, CPSR 99bc: e38c30c0 orr r3, ip, #192 ; 0xc0 99c0: e129f003 msr CPSR_fc, r3 99c4: e5973000 ldr r3, [r7] if ( _Chain_Is_empty( header ) ) 99c8: e1560003 cmp r6, r3 99cc: e1a01003 mov r1, r3 99d0: 1affffef bne 9994 <_Watchdog_Adjust+0x50> } break; } } _ISR_Enable( level ); 99d4: e129f00c msr CPSR_fc, ip } 99d8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 99dc: e3510001 cmp r1, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 99e0: 05903010 ldreq r3, [r0, #16] 99e4: 00833002 addeq r3, r3, r2 99e8: 05803010 streq r3, [r0, #16] } break; } } _ISR_Enable( level ); 99ec: e129f00c msr CPSR_fc, ip } 99f0: 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; 99f4: e0643005 rsb r3, r4, r5 99f8: e5813010 str r3, [r1, #16] 99fc: eafffff4 b 99d4 <_Watchdog_Adjust+0x90> 00007ad8 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7ad8: e59f3144 ldr r3, [pc, #324] ; 7c24 <_Watchdog_Insert+0x14c> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 7adc: e92d01f0 push {r4, r5, r6, r7, r8} 7ae0: e1a04001 mov r4, r1 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7ae4: e5935000 ldr r5, [r3] _ISR_Disable( level ); 7ae8: e10f6000 mrs r6, CPSR 7aec: e38630c0 orr r3, r6, #192 ; 0xc0 7af0: 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 ) { 7af4: e5913008 ldr r3, [r1, #8] 7af8: e3530000 cmp r3, #0 ; 0x0 7afc: 1a000041 bne 7c08 <_Watchdog_Insert+0x130> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 7b00: e59f8120 ldr r8, [pc, #288] ; 7c28 <_Watchdog_Insert+0x150> 7b04: e5983000 ldr r3, [r8] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 7b08: e3a02001 mov r2, #1 ; 0x1 _Watchdog_Sync_count++; 7b0c: e2833001 add r3, r3, #1 ; 0x1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 7b10: e5812008 str r2, [r1, #8] _Watchdog_Sync_count++; 7b14: e5883000 str r3, [r8] 7b18: e59f710c ldr r7, [pc, #268] ; 7c2c <_Watchdog_Insert+0x154> restart: delta_interval = the_watchdog->initial; 7b1c: e594c00c ldr ip, [r4, #12] */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7b20: e35c0000 cmp ip, #0 ; 0x0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 7b24: e5902000 ldr r2, [r0] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7b28: 0a000023 beq 7bbc <_Watchdog_Insert+0xe4> 7b2c: e5923000 ldr r3, [r2] 7b30: e3530000 cmp r3, #0 ; 0x0 7b34: 0a000020 beq 7bbc <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 7b38: e5921010 ldr r1, [r2, #16] 7b3c: e15c0001 cmp ip, r1 7b40: 3a000032 bcc 7c10 <_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 ); 7b44: e10f3000 mrs r3, CPSR 7b48: e129f006 msr CPSR_fc, r6 7b4c: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7b50: e5943008 ldr r3, [r4, #8] 7b54: e3530001 cmp r3, #1 ; 0x1 7b58: 1a000023 bne 7bec <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7b5c: e5973000 ldr r3, [r7] 7b60: e1550003 cmp r5, r3 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 7b64: 2061c00c rsbcs ip, r1, ip if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7b68: 2a000010 bcs 7bb0 <_Watchdog_Insert+0xd8> 7b6c: ea00002a b 7c1c <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7b70: e5923000 ldr r3, [r2] 7b74: e3530000 cmp r3, #0 ; 0x0 7b78: 0a00000f beq 7bbc <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 7b7c: e5921010 ldr r1, [r2, #16] 7b80: e151000c cmp r1, ip 7b84: 8a000021 bhi 7c10 <_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 ); 7b88: e10f3000 mrs r3, CPSR 7b8c: e129f006 msr CPSR_fc, r6 7b90: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7b94: e5943008 ldr r3, [r4, #8] 7b98: e3530001 cmp r3, #1 ; 0x1 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 7b9c: e061c00c rsb ip, r1, ip * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7ba0: 1a000011 bne 7bec <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7ba4: e5973000 ldr r3, [r7] 7ba8: e1550003 cmp r5, r3 7bac: 3a00001a bcc 7c1c <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7bb0: e35c0000 cmp ip, #0 ; 0x0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 7bb4: e5922000 ldr r2, [r2] 7bb8: 1affffec bne 7b70 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 7bbc: e5921004 ldr r1, [r2, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 7bc0: e59f3068 ldr r3, [pc, #104] ; 7c30 <_Watchdog_Insert+0x158> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 7bc4: e5910000 ldr r0, [r1] 7bc8: e5932000 ldr r2, [r3] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 7bcc: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 7bd0: e5814000 str r4, [r1] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 7bd4: e5841004 str r1, [r4, #4] 7bd8: e5842014 str r2, [r4, #20] 7bdc: e5843008 str r3, [r4, #8] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 7be0: 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; 7be4: 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; 7be8: 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; 7bec: e5875000 str r5, [r7] _Watchdog_Sync_count--; 7bf0: e5983000 ldr r3, [r8] 7bf4: e2433001 sub r3, r3, #1 ; 0x1 7bf8: e5883000 str r3, [r8] _ISR_Enable( level ); 7bfc: e129f006 msr CPSR_fc, r6 } 7c00: e8bd01f0 pop {r4, r5, r6, r7, r8} 7c04: 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 ); 7c08: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 7c0c: eafffffb b 7c00 <_Watchdog_Insert+0x128> <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 7c10: e06c3001 rsb r3, ip, r1 7c14: e5823010 str r3, [r2, #16] 7c18: eaffffe7 b 7bbc <_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; 7c1c: e5875000 str r5, [r7] 7c20: eaffffbd b 7b1c <_Watchdog_Insert+0x44> 7c24: 00016fa0 .word 0x00016fa0 7c28: 00017060 .word 0x00017060 7c2c: 00016fc0 .word 0x00016fc0 7c30: 00017064 .word 0x00017064 00007e24 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7e24: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7e28: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7e2c: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7e30: 0a000010 beq 7e78 <_Workspace_Handler_initialization+0x54> 7e34: e214c003 ands ip, r4, #3 ; 0x3 7e38: 1a00000e bne 7e78 <_Workspace_Handler_initialization+0x54> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 7e3c: e59f3054 ldr r3, [pc, #84] ; 7e98 <_Workspace_Handler_initialization+0x74> 7e40: e5932000 ldr r2, [r3] 7e44: e5d21028 ldrb r1, [r2, #40] 7e48: e3510000 cmp r1, #0 ; 0x0 7e4c: 1a00000d bne 7e88 <_Workspace_Handler_initialization+0x64> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 7e50: e1a01004 mov r1, r4 7e54: e1a02005 mov r2, r5 7e58: e59f003c ldr r0, [pc, #60] ; 7e9c <_Workspace_Handler_initialization+0x78> 7e5c: e3a03004 mov r3, #4 ; 0x4 7e60: ebfff665 bl 57fc <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 7e64: e3500000 cmp r0, #0 ; 0x0 7e68: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 7e6c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 7e70: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 7e74: ebfff6eb bl 5a28 <_Internal_error_Occurred> <== NOT EXECUTED ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 7e78: e3a00000 mov r0, #0 ; 0x0 7e7c: e3a01001 mov r1, #1 ; 0x1 7e80: e3a02002 mov r2, #2 ; 0x2 7e84: ebfff6e7 bl 5a28 <_Internal_error_Occurred> TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 7e88: e1a0100c mov r1, ip <== NOT EXECUTED 7e8c: e1a02005 mov r2, r5 <== NOT EXECUTED 7e90: eb001243 bl c7a4 <== NOT EXECUTED 7e94: eaffffed b 7e50 <_Workspace_Handler_initialization+0x2c> <== NOT EXECUTED 7e98: 00016f9c .word 0x00016f9c 7e9c: 00016f2c .word 0x00016f2c 00008e00 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 8e00: e1a03002 mov r3, r2 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 8e04: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 8e08: eaffffe9 b 8db4 <__assert_func> <== NOT EXECUTED 00014774 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 14774: e1a04000 mov r4, r0 14778: eb00023c bl 15070 <___DTOR_END__> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 1477c: ebffffe2 bl 1470c rtems_shutdown_executive(status); 14780: e1a00004 mov r0, r4 14784: eb000040 bl 1488c 14788: eafffffe b 14788 <_exit+0x14> <== NOT EXECUTED 0002b374 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 2b374: e1a00001 mov r0, r1 <== NOT EXECUTED 2b378: e1a01002 mov r1, r2 <== NOT EXECUTED 2b37c: e1a02003 mov r2, r3 <== NOT EXECUTED 2b380: eaffff72 b 2b150 <== NOT EXECUTED 00020d0c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 20d0c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 20d10: e12fff1e bx lr <== NOT EXECUTED 00009250 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 9250: eaffffe4 b 91e8 <== NOT EXECUTED 0001f500 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 1f500: e1a00001 mov r0, r1 <== NOT EXECUTED 1f504: e1a01002 mov r1, r2 <== NOT EXECUTED 1f508: eaffff6a b 1f2b8 <== NOT EXECUTED 0001f6e4 <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 1f6e4: e1a00001 mov r0, r1 <== NOT EXECUTED 1f6e8: e1a01002 mov r1, r2 <== NOT EXECUTED 1f6ec: eaffffc6 b 1f60c <== NOT EXECUTED 00014870 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 14870: e1a00001 mov r0, r1 <== NOT EXECUTED 14874: e1a01002 mov r1, r2 <== NOT EXECUTED 14878: ea000012 b 148c8 <== NOT EXECUTED 0003f0d0 <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3f0d0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3f0d4: e24dd04c sub sp, sp, #76 ; 0x4c <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3f0d8: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3f0dc: e1a04001 mov r4, r1 <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3f0e0: e1a0100d mov r1, sp <== NOT EXECUTED int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3f0e4: e1a05002 mov r5, r2 <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3f0e8: ebff196a bl 5698 <== NOT EXECUTED if ( s < 0 ) 3f0ec: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3f0f0: ba00000a blt 3f120 <_rename_r+0x50> <== NOT EXECUTED return s; s = link( old, new ); 3f0f4: e1a01005 mov r1, r5 <== NOT EXECUTED 3f0f8: e1a00004 mov r0, r4 <== NOT EXECUTED 3f0fc: ebff806d bl 1f2b8 <== NOT EXECUTED if ( s < 0 ) 3f100: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3f104: ba000005 blt 3f120 <_rename_r+0x50> <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 3f108: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 3f10c: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 3f110: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED 3f114: 0a000003 beq 3f128 <_rename_r+0x58> <== NOT EXECUTED 3f118: e1a00004 mov r0, r4 <== NOT EXECUTED 3f11c: ebff845a bl 2028c <== NOT EXECUTED } 3f120: e28dd04c add sp, sp, #76 ; 0x4c <== NOT EXECUTED 3f124: 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 ); 3f128: e1a00004 mov r0, r4 <== NOT EXECUTED 3f12c: ebff8350 bl 1fe74 <== NOT EXECUTED 3f130: eafffffa b 3f120 <_rename_r+0x50> <== NOT EXECUTED 00005770 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 5770: e1a00001 mov r0, r1 <== NOT EXECUTED 5774: e1a01002 mov r1, r2 <== NOT EXECUTED 5778: eaffffc6 b 5698 <== NOT EXECUTED 000203d8 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 203d8: e1a00001 mov r0, r1 <== NOT EXECUTED 203dc: eaffffaa b 2028c <== NOT EXECUTED 00004410 : int alphasort( const void *d1, const void *d2 ) { return(strcmp((*(struct dirent **)d1)->d_name, 4410: e5900000 ldr r0, [r0] <== NOT EXECUTED 4414: e5911000 ldr r1, [r1] <== NOT EXECUTED 4418: e280000c add r0, r0, #12 ; 0xc <== NOT EXECUTED 441c: e281100c add r1, r1, #12 ; 0xc <== NOT EXECUTED 4420: ea0031cc b 10b58 <== NOT EXECUTED 0001da94 : #include int chdir( const char *pathname ) { 1da94: e92d4030 push {r4, r5, lr} /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1da98: e3a01001 mov r1, #1 ; 0x1 #include int chdir( const char *pathname ) { 1da9c: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1daa0: e1a0200d mov r2, sp 1daa4: e1a03001 mov r3, r1 1daa8: ebff98d5 bl 3e04 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 1daac: e3500000 cmp r0, #0 ; 0x0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1dab0: e1a0400d mov r4, sp pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 1dab4: 1a000021 bne 1db40 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 1dab8: e59d2008 ldr r2, [sp, #8] 1dabc: e5923010 ldr r3, [r2, #16] 1dac0: e3530000 cmp r3, #0 ; 0x0 1dac4: 0a000015 beq 1db20 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1dac8: e1a0000d mov r0, sp 1dacc: e1a0e00f mov lr, pc 1dad0: e12fff13 bx r3 1dad4: e3500001 cmp r0, #1 ; 0x1 1dad8: 1a00001a bne 1db48 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 1dadc: e59f5098 ldr r5, [pc, #152] ; 1db7c 1dae0: e5950000 ldr r0, [r5] 1dae4: e590300c ldr r3, [r0, #12] 1dae8: e3530000 cmp r3, #0 ; 0x0 1daec: 0a000004 beq 1db04 1daf0: e593301c ldr r3, [r3, #28] 1daf4: e3530000 cmp r3, #0 ; 0x0 1daf8: 12800004 addne r0, r0, #4 ; 0x4 1dafc: 11a0e00f movne lr, pc 1db00: 112fff13 bxne r3 rtems_filesystem_current = loc; 1db04: e595c000 ldr ip, [r5] 1db08: e894000f ldm r4, {r0, r1, r2, r3} 1db0c: e28cc004 add ip, ip, #4 ; 0x4 1db10: e88c000f stm ip, {r0, r1, r2, r3} 1db14: e3a00000 mov r0, #0 ; 0x0 return 0; } 1db18: e28dd010 add sp, sp, #16 ; 0x10 1db1c: e8bd8030 pop {r4, r5, pc} /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 1db20: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1db24: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1db28: 11a0000d movne r0, sp <== NOT EXECUTED 1db2c: 11a0e00f movne lr, pc <== NOT EXECUTED 1db30: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1db34: eb003ffd bl 2db30 <__errno> <== NOT EXECUTED 1db38: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1db3c: e5803000 str r3, [r0] <== NOT EXECUTED 1db40: e3e00000 mvn r0, #0 ; 0x0 1db44: eafffff3 b 1db18 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 1db48: e59d3008 ldr r3, [sp, #8] 1db4c: e3530000 cmp r3, #0 ; 0x0 1db50: 0a000004 beq 1db68 1db54: e593301c ldr r3, [r3, #28] 1db58: e3530000 cmp r3, #0 ; 0x0 1db5c: 11a0000d movne r0, sp 1db60: 11a0e00f movne lr, pc 1db64: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1db68: eb003ff0 bl 2db30 <__errno> 1db6c: e3a03014 mov r3, #20 ; 0x14 1db70: e5803000 str r3, [r0] 1db74: e3e00000 mvn r0, #0 ; 0x0 1db78: eaffffe6 b 1db18 1db7c: 000402b8 .word 0x000402b8 00003bc0 : int chmod( const char *path, mode_t mode ) { 3bc0: e92d4030 push {r4, r5, lr} 3bc4: e24dd010 sub sp, sp, #16 ; 0x10 3bc8: e1a04001 mov r4, r1 int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 3bcc: e1a0200d mov r2, sp 3bd0: e3a01000 mov r1, #0 ; 0x0 3bd4: e3a03001 mov r3, #1 ; 0x1 3bd8: eb000089 bl 3e04 if ( status != 0 ) 3bdc: e3500000 cmp r0, #0 ; 0x0 { int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 3be0: e1a0500d mov r5, sp if ( status != 0 ) 3be4: 1a000020 bne 3c6c return -1; if ( !loc.handlers ){ 3be8: e59d3004 ldr r3, [sp, #4] 3bec: e3530000 cmp r3, #0 ; 0x0 3bf0: 0a000012 beq 3c40 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 3bf4: e593301c ldr r3, [r3, #28] 3bf8: e3530000 cmp r3, #0 ; 0x0 3bfc: 0a00001c beq 3c74 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 3c00: e1a01004 mov r1, r4 3c04: e1a0000d mov r0, sp 3c08: e1a0e00f mov lr, pc 3c0c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3c10: e59d3008 ldr r3, [sp, #8] 3c14: e3530000 cmp r3, #0 ; 0x0 if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 3c18: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3c1c: 0a000004 beq 3c34 3c20: e593301c ldr r3, [r3, #28] 3c24: e3530000 cmp r3, #0 ; 0x0 3c28: 11a0000d movne r0, sp 3c2c: 11a0e00f movne lr, pc 3c30: 112fff13 bxne r3 return result; } 3c34: e1a00004 mov r0, r4 3c38: e28dd010 add sp, sp, #16 ; 0x10 3c3c: 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 ); 3c40: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3c44: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3c48: 0a000004 beq 3c60 <== NOT EXECUTED 3c4c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3c50: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3c54: 11a0000d movne r0, sp <== NOT EXECUTED 3c58: 11a0e00f movne lr, pc <== NOT EXECUTED 3c5c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 3c60: eb00a7b2 bl 2db30 <__errno> <== NOT EXECUTED 3c64: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3c68: e5803000 str r3, [r0] <== NOT EXECUTED 3c6c: e3e04000 mvn r4, #0 ; 0x0 3c70: eaffffef b 3c34 } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 3c74: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3c78: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3c7c: 0a000004 beq 3c94 <== NOT EXECUTED 3c80: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3c84: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3c88: 11a0000d movne r0, sp <== NOT EXECUTED 3c8c: 11a0e00f movne lr, pc <== NOT EXECUTED 3c90: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3c94: eb00a7a5 bl 2db30 <__errno> <== NOT EXECUTED 3c98: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3c9c: e5803000 str r3, [r0] <== NOT EXECUTED 3ca0: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 3ca4: eaffffe2 b 3c34 <== NOT EXECUTED 0001db80 : int chown( const char *path, uid_t owner, gid_t group ) { 1db80: e92d4070 push {r4, r5, r6, lr} 1db84: e24dd010 sub sp, sp, #16 ; 0x10 1db88: e1a0c801 lsl ip, r1, #16 1db8c: e1a04802 lsl r4, r2, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 1db90: e3a01000 mov r1, #0 ; 0x0 1db94: e1a0200d mov r2, sp 1db98: e3a03001 mov r3, #1 ; 0x1 int chown( const char *path, uid_t owner, gid_t group ) { 1db9c: e1a0582c lsr r5, ip, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 1dba0: ebff9897 bl 3e04 1dba4: e3500000 cmp r0, #0 ; 0x0 1dba8: e1a0600d mov r6, sp int chown( const char *path, uid_t owner, gid_t group ) { 1dbac: e1a04824 lsr r4, r4, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 1dbb0: 1a00001c bne 1dc28 return -1; if ( !loc.ops->chown_h ) { 1dbb4: e59d2008 ldr r2, [sp, #8] 1dbb8: e5923018 ldr r3, [r2, #24] 1dbbc: e3530000 cmp r3, #0 ; 0x0 1dbc0: 0a000010 beq 1dc08 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 1dbc4: e1a02004 mov r2, r4 1dbc8: e1a01005 mov r1, r5 1dbcc: e1a0000d mov r0, sp 1dbd0: e1a0e00f mov lr, pc 1dbd4: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 1dbd8: e59d3008 ldr r3, [sp, #8] 1dbdc: e3530000 cmp r3, #0 ; 0x0 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 ); 1dbe0: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 1dbe4: 0a000004 beq 1dbfc 1dbe8: e593301c ldr r3, [r3, #28] 1dbec: e3530000 cmp r3, #0 ; 0x0 1dbf0: 11a0000d movne r0, sp 1dbf4: 11a0e00f movne lr, pc 1dbf8: 112fff13 bxne r3 return result; } 1dbfc: e1a00004 mov r0, r4 1dc00: e28dd010 add sp, sp, #16 ; 0x10 1dc04: 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 ); 1dc08: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1dc0c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1dc10: 11a0000d movne r0, sp <== NOT EXECUTED 1dc14: 11a0e00f movne lr, pc <== NOT EXECUTED 1dc18: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1dc1c: eb003fc3 bl 2db30 <__errno> <== NOT EXECUTED 1dc20: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1dc24: e5803000 str r3, [r0] <== NOT EXECUTED 1dc28: e3e04000 mvn r4, #0 ; 0x0 1dc2c: eafffff2 b 1dbfc 0001dc30 : #include int chroot( const char *pathname ) { 1dc30: 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) { 1dc34: e59f60c4 ldr r6, [pc, #196] ; 1dd00 1dc38: e59f30c4 ldr r3, [pc, #196] ; 1dd04 1dc3c: e5964000 ldr r4, [r6] 1dc40: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 1dc44: e24dd010 sub sp, sp, #16 ; 0x10 1dc48: 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) { 1dc4c: 0a00001b beq 1dcc0 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); 1dc50: e1a00005 mov r0, r5 1dc54: ebffff8e bl 1da94 if (result) { 1dc58: e3500000 cmp r0, #0 ; 0x0 1dc5c: 1a000020 bne 1dce4 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 1dc60: e1a01000 mov r1, r0 1dc64: e1a0200d mov r2, sp 1dc68: e59f0098 ldr r0, [pc, #152] ; 1dd08 1dc6c: e1a03001 mov r3, r1 1dc70: ebff9863 bl 3e04 1dc74: e3500000 cmp r0, #0 ; 0x0 1dc78: e1a0400d mov r4, sp 1dc7c: 1a000018 bne 1dce4 /* 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); 1dc80: e5960000 ldr r0, [r6] 1dc84: e590301c ldr r3, [r0, #28] 1dc88: e3530000 cmp r3, #0 ; 0x0 1dc8c: 0a000004 beq 1dca4 1dc90: e593301c ldr r3, [r3, #28] 1dc94: e3530000 cmp r3, #0 ; 0x0 1dc98: 12800014 addne r0, r0, #20 ; 0x14 1dc9c: 11a0e00f movne lr, pc 1dca0: 112fff13 bxne r3 rtems_filesystem_root = loc; 1dca4: e596c000 ldr ip, [r6] 1dca8: e894000f ldm r4, {r0, r1, r2, r3} 1dcac: e28cc014 add ip, ip, #20 ; 0x14 1dcb0: e88c000f stm ip, {r0, r1, r2, r3} 1dcb4: e3a00000 mov r0, #0 ; 0x0 return 0; } 1dcb8: e28dd010 add sp, sp, #16 ; 0x10 1dcbc: 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*/ 1dcc0: eb00075c bl 1fa38 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 1dcc4: e5963000 ldr r3, [r6] 1dcc8: e1530004 cmp r3, r4 1dccc: 1affffdf bne 1dc50 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1dcd0: eb003f96 bl 2db30 <__errno> <== NOT EXECUTED 1dcd4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1dcd8: e5803000 str r3, [r0] <== NOT EXECUTED 1dcdc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1dce0: eafffff4 b 1dcb8 <== 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 ); 1dce4: eb003f91 bl 2db30 <__errno> <== NOT EXECUTED 1dce8: e1a04000 mov r4, r0 <== NOT EXECUTED 1dcec: eb003f8f bl 2db30 <__errno> <== NOT EXECUTED 1dcf0: e5903000 ldr r3, [r0] <== NOT EXECUTED 1dcf4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1dcf8: e5843000 str r3, [r4] <== NOT EXECUTED 1dcfc: eaffffed b 1dcb8 <== NOT EXECUTED 1dd00: 000402b8 .word 0x000402b8 1dd04: 0005ad3c .word 0x0005ad3c 1dd08: 000437f4 .word 0x000437f4 0002af94 : * close a directory. */ int closedir( DIR *dirp ) { 2af94: e92d4030 push {r4, r5, lr} int fd; if ( !dirp ) 2af98: e2505000 subs r5, r0, #0 ; 0x0 2af9c: 0a00000b beq 2afd0 rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; 2afa0: e3a03000 mov r3, #0 ; 0x0 2afa4: e5853004 str r3, [r5, #4] if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; 2afa8: e2433001 sub r3, r3, #1 ; 0x1 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 2afac: e5954000 ldr r4, [r5] dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 2afb0: e595000c ldr r0, [r5, #12] if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; 2afb4: e5853000 str r3, [r5] dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 2afb8: ebff63e6 bl 3f58 (void)free((void *)dirp); 2afbc: e1a00005 mov r0, r5 2afc0: ebff63e4 bl 3f58 return(close(fd)); 2afc4: e1a00004 mov r0, r4 } 2afc8: 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)); 2afcc: eaff6335 b 3ca8 DIR *dirp ) { int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 2afd0: eb000ad6 bl 2db30 <__errno> <== NOT EXECUTED 2afd4: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 2afd8: 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)); } 2afdc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2afe0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 0000b188 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { b188: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED b18c: 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; b190: e88d0007 stm sp, {r0, r1, r2} <== NOT EXECUTED the_jnode = iop->file_info; b194: e590302c ldr r3, [r0, #44] <== NOT EXECUTED status = rtems_io_control( b198: e1a0200d mov r2, sp <== NOT EXECUTED b19c: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED b1a0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED b1a4: eb000268 bl bb4c <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) b1a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; b1ac: 059d000c ldreq r0, [sp, #12] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) b1b0: 1a000001 bne b1bc <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; } b1b4: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED b1b8: e8bd8000 pop {pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); b1bc: ebffffe6 bl b15c <== NOT EXECUTED b1c0: eafffffb b b1b4 <== NOT EXECUTED 0000b220 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { b220: 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; b224: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { b228: 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; b22c: e590c00c ldr ip, [r0, #12] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; b230: e58d3004 str r3, [sp, #4] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; b234: 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; b238: e58d200c str r2, [sp, #12] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; b23c: e58d3014 str r3, [sp, #20] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; b240: e58d1008 str r1, [sp, #8] <== NOT EXECUTED args.count = count; args.flags = iop->flags; b244: e58dc010 str ip, [sp, #16] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; b248: e58d0000 str r0, [sp] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; b24c: e590302c ldr r3, [r0, #44] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( b250: e1a0200d mov r2, sp <== NOT EXECUTED b254: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED b258: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED b25c: eb000264 bl bbf4 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) b260: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; b264: 059d0014 ldreq r0, [sp, #20] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) b268: 1a000001 bne b274 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } b26c: e28dd018 add sp, sp, #24 ; 0x18 <== NOT EXECUTED b270: e8bd8000 pop {pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); b274: ebffffb8 bl b15c <== NOT EXECUTED b278: eafffffb b b26c <== NOT EXECUTED 0000b1c4 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { b1c4: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; b1c8: e5903008 ldr r3, [r0, #8] ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { b1cc: e24dd018 sub sp, sp, #24 ; 0x18 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; b1d0: e590c00c ldr ip, [r0, #12] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; b1d4: e58d3004 str r3, [sp, #4] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; b1d8: e3a03000 mov r3, #0 ; 0x0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; b1dc: e58d200c str r2, [sp, #12] args.flags = iop->flags; args.bytes_moved = 0; b1e0: e58d3014 str r3, [sp, #20] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; b1e4: e58d1008 str r1, [sp, #8] args.count = count; args.flags = iop->flags; b1e8: e58dc010 str ip, [sp, #16] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; b1ec: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; b1f0: e590302c ldr r3, [r0, #44] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( b1f4: e1a0200d mov r2, sp b1f8: e2830050 add r0, r3, #80 ; 0x50 b1fc: e8900003 ldm r0, {r0, r1} b200: eb000290 bl bc48 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) b204: e3500000 cmp r0, #0 ; 0x0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; b208: 059d0014 ldreq r0, [sp, #20] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) b20c: 1a000001 bne b218 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } b210: e28dd018 add sp, sp, #24 ; 0x18 b214: e8bd8000 pop {pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); b218: ebffffcf bl b15c <== NOT EXECUTED b21c: eafffffb b b210 <== NOT EXECUTED 00002f54 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2f54: e59030b4 ldr r3, [r0, #180] 2f58: e3530000 cmp r3, #0 ; 0x0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2f5c: e92d4030 push {r4, r5, lr} 2f60: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2f64: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 2f68: e10f1000 mrs r1, CPSR <== NOT EXECUTED 2f6c: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 2f70: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 2f74: e5902084 ldr r2, [r0, #132] <== NOT EXECUTED 2f78: e5903080 ldr r3, [r0, #128] <== NOT EXECUTED 2f7c: e1520003 cmp r2, r3 <== NOT EXECUTED 2f80: 0a00000f beq 2fc4 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2f84: e3a05002 mov r5, #2 ; 0x2 <== NOT EXECUTED 2f88: e5845094 str r5, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 2f8c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2f90: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2f94: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 2f98: e1a02001 mov r2, r1 <== NOT EXECUTED 2f9c: eb00060c bl 47d4 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2fa0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 2fa4: 1a000008 bne 2fcc <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 2fa8: e10f1000 mrs r1, CPSR <== NOT EXECUTED 2fac: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 2fb0: 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) { 2fb4: e5942084 ldr r2, [r4, #132] <== NOT EXECUTED 2fb8: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 2fbc: e1520003 cmp r2, r3 <== NOT EXECUTED 2fc0: 1afffff0 bne 2f88 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 2fc4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 2fc8: 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); 2fcc: eb0007be bl 4ecc <== NOT EXECUTED 0000210c : int dup2( int fildes, int fildes2 ) { 210c: e92d4070 push {r4, r5, r6, lr} 2110: e24dd04c sub sp, sp, #76 ; 0x4c 2114: e1a06001 mov r6, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2118: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 211c: e1a05000 mov r5, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2120: eb0001ba bl 2810 if ( status == -1 ) 2124: e3700001 cmn r0, #1 ; 0x1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2128: e1a0400d mov r4, sp if ( status == -1 ) 212c: 1a000002 bne 213c /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2130: e3e00000 mvn r0, #0 ; 0x0 } 2134: e28dd04c add sp, sp, #76 ; 0x4c 2138: e8bd8070 pop {r4, r5, r6, pc} /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 213c: e1a0100d mov r1, sp 2140: e1a00006 mov r0, r6 2144: eb0001b1 bl 2810 if ( status == -1 ) 2148: e3700001 cmn r0, #1 ; 0x1 214c: 0afffff7 beq 2130 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2150: e1a00005 mov r0, r5 <== NOT EXECUTED 2154: e1a02006 mov r2, r6 <== NOT EXECUTED 2158: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 215c: eb000082 bl 236c <== NOT EXECUTED 2160: eafffff3 b 2134 <== NOT EXECUTED 000029f8 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 29f8: e92d4010 push {r4, lr} <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 29fc: e591303c ldr r3, [r1, #60] <== NOT EXECUTED 2a00: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2a04: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 2a08: e1a04001 mov r4, r1 <== NOT EXECUTED 2a0c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2a10: 0a000006 beq 2a30 <== NOT EXECUTED 2a14: e59f305c ldr r3, [pc, #92] ; 2a78 <== NOT EXECUTED 2a18: e5932000 ldr r2, [r3] <== NOT EXECUTED 2a1c: e7d21000 ldrb r1, [r2, r0] <== NOT EXECUTED 2a20: e2503009 subs r3, r0, #9 ; 0x9 <== NOT EXECUTED 2a24: 13a03001 movne r3, #1 ; 0x1 <== NOT EXECUTED 2a28: e01332a1 ands r3, r3, r1, lsr #5 <== NOT EXECUTED 2a2c: 1a000003 bne 2a40 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2a30: e1a01004 mov r1, r4 <== NOT EXECUTED 2a34: ebffff96 bl 2894 <== NOT EXECUTED } } 2a38: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 2a3c: 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')) { 2a40: e350000a cmp r0, #10 ; 0xa <== NOT EXECUTED 2a44: 0afffff9 beq 2a30 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2a48: e220c040 eor ip, r0, #64 ; 0x40 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2a4c: e3a0305e mov r3, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 2a50: e28d0002 add r0, sp, #2 ; 0x2 <== NOT EXECUTED 2a54: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 2a58: 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] = '^'; 2a5c: e5cd3002 strb r3, [sp, #2] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 2a60: e5cdc003 strb ip, [sp, #3] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 2a64: ebffff42 bl 2774 <== NOT EXECUTED tty->column += 2; 2a68: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2a6c: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 2a70: e5843028 str r3, [r4, #40] <== NOT EXECUTED 2a74: eaffffef b 2a38 <== NOT EXECUTED 2a78: 000156fc .word 0x000156fc 0001e7d0 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 1e7d0: e59f300c ldr r3, [pc, #12] ; 1e7e4 <== NOT EXECUTED 1e7d4: e5930000 ldr r0, [r3] <== NOT EXECUTED 1e7d8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1e7dc: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 1e7e0: ea003d23 b 2dc74 <== NOT EXECUTED 1e7e4: 00059d84 .word 0x00059d84 0001e7e8 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 1e7e8: e59f300c ldr r3, [pc, #12] ; 1e7fc <== NOT EXECUTED 1e7ec: e5930000 ldr r0, [r3] <== NOT EXECUTED 1e7f0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1e7f4: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 1e7f8: ea003d1d b 2dc74 <== NOT EXECUTED 1e7fc: 00059c9c .word 0x00059c9c 00002a7c : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 2a7c: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 2a80: 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) { 2a84: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 2a88: e1a04000 mov r4, r0 <== NOT EXECUTED 2a8c: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 2a90: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 2a94: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 2a98: 0590103c ldreq r1, [r0, #60] <== NOT EXECUTED 2a9c: 1a000019 bne 2b08 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2aa0: e59f81a8 ldr r8, [pc, #424] ; 2c50 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2aa4: e2430001 sub r0, r3, #1 ; 0x1 <== NOT EXECUTED 2aa8: e5840020 str r0, [r4, #32] <== NOT EXECUTED 2aac: e594c01c ldr ip, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2ab0: e3110008 tst r1, #8 ; 0x8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2ab4: e7dc5000 ldrb r5, [ip, r0] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2ab8: 0a00000b beq 2aec <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2abc: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 2ac0: 1a000001 bne 2acc <== NOT EXECUTED 2ac4: e3110010 tst r1, #16 ; 0x10 <== NOT EXECUTED 2ac8: 0a00005c beq 2c40 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 2acc: e3550009 cmp r5, #9 ; 0x9 <== NOT EXECUTED 2ad0: 0a000037 beq 2bb4 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2ad4: e5983000 ldr r3, [r8] <== NOT EXECUTED 2ad8: e7d32005 ldrb r2, [r3, r5] <== NOT EXECUTED 2adc: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED 2ae0: 0a000028 beq 2b88 <== NOT EXECUTED 2ae4: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED 2ae8: 1a000017 bne 2b4c <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2aec: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 2af0: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2af4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2af8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2afc: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2b00: e594103c ldr r1, [r4, #60] <== NOT EXECUTED 2b04: eaffffe6 b 2aa4 <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 2b08: e590103c ldr r1, [r0, #60] <== NOT EXECUTED 2b0c: e2112008 ands r2, r1, #8 ; 0x8 <== NOT EXECUTED tty->ccount = 0; 2b10: 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)) { 2b14: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 2b18: e2112010 ands r2, r1, #16 ; 0x10 <== NOT EXECUTED 2b1c: 1affffdf bne 2aa0 <== NOT EXECUTED tty->ccount = 0; 2b20: e5802020 str r2, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2b24: e1a01004 mov r1, r4 <== NOT EXECUTED 2b28: e5d00044 ldrb r0, [r0, #68] <== NOT EXECUTED 2b2c: ebffffb1 bl 29f8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2b30: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 2b34: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 2b38: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED echo ('\n', tty); 2b3c: e1a01004 mov r1, r4 <== NOT EXECUTED 2b40: e3a0000a mov r0, #10 ; 0xa <== NOT EXECUTED } } if (!lineFlag) break; } } 2b44: 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); 2b48: eaffffaa b 29f8 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 2b4c: e1a02004 mov r2, r4 <== NOT EXECUTED 2b50: e59f00fc ldr r0, [pc, #252] ; 2c54 <== NOT EXECUTED 2b54: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 2b58: ebffff05 bl 2774 <== NOT EXECUTED if (tty->column) 2b5c: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2b60: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 2b64: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 2b68: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2b6c: e5983000 ldr r3, [r8] <== NOT EXECUTED 2b70: e7d32005 ldrb r2, [r3, r5] <== NOT EXECUTED 2b74: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED 2b78: 0a000002 beq 2b88 <== NOT EXECUTED 2b7c: e594103c ldr r1, [r4, #60] <== NOT EXECUTED 2b80: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED 2b84: 0affffd8 beq 2aec <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2b88: e59f00c4 ldr r0, [pc, #196] ; 2c54 <== NOT EXECUTED 2b8c: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 2b90: e1a02004 mov r2, r4 <== NOT EXECUTED 2b94: ebfffef6 bl 2774 <== NOT EXECUTED if (tty->column) 2b98: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2b9c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 2ba0: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 2ba4: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } } } if (!lineFlag) 2ba8: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 2bac: 1affffd0 bne 2af4 <== NOT EXECUTED 2bb0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2bb4: 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; 2bb8: e594502c ldr r5, [r4, #44] <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2bbc: 0a000010 beq 2c04 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 2bc0: e5986000 ldr r6, [r8] <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2bc4: 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)) { 2bc8: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2bcc: e7dc3002 ldrb r3, [ip, r2] <== NOT EXECUTED if (c == '\t') { 2bd0: e3530009 cmp r3, #9 ; 0x9 <== NOT EXECUTED col = (col | 7) + 1; 2bd4: 03853007 orreq r3, r5, #7 ; 0x7 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2bd8: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; 2bdc: 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') { 2be0: 0a000005 beq 2bfc <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2be4: e7d63003 ldrb r3, [r6, r3] <== NOT EXECUTED 2be8: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 2bec: 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)) { 2bf0: 0a000001 beq 2bfc <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2bf4: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED col += 2; 2bf8: 12855002 addne r5, r5, #2 ; 0x2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2bfc: e1500002 cmp r0, r2 <== NOT EXECUTED 2c00: 1afffff1 bne 2bcc <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2c04: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2c08: e1530005 cmp r3, r5 <== NOT EXECUTED 2c0c: daffffb6 ble 2aec <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 2c10: e59f0040 ldr r0, [pc, #64] ; 2c58 <== NOT EXECUTED 2c14: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 2c18: e1a02004 mov r2, r4 <== NOT EXECUTED 2c1c: ebfffed4 bl 2774 <== NOT EXECUTED tty->column--; 2c20: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2c24: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2c28: e1530005 cmp r3, r5 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 2c2c: e5843028 str r3, [r4, #40] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2c30: cafffff6 bgt 2c10 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2c34: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 2c38: 1affffad bne 2af4 <== NOT EXECUTED 2c3c: 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); 2c40: e5d40043 ldrb r0, [r4, #67] <== NOT EXECUTED 2c44: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 2c48: 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); 2c4c: eaffff69 b 29f8 <== NOT EXECUTED 2c50: 000156fc .word 0x000156fc 2c54: 000166b0 .word 0x000166b0 2c58: 000166ac .word 0x000166ac 0002afe4 : #include int fchdir( int fd ) { 2afe4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 2afe8: e59f3150 ldr r3, [pc, #336] ; 2b140 <== NOT EXECUTED 2afec: e5932000 ldr r2, [r3] <== NOT EXECUTED 2aff0: e1500002 cmp r0, r2 <== NOT EXECUTED #include int fchdir( int fd ) { 2aff4: e24dd020 sub sp, sp, #32 ; 0x20 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 2aff8: 2a00003b bcs 2b0ec <== NOT EXECUTED iop = rtems_libio_iop( fd ); 2affc: e1a03200 lsl r3, r0, #4 <== NOT EXECUTED 2b000: e59f213c ldr r2, [pc, #316] ; 2b144 <== NOT EXECUTED 2b004: e0433100 sub r3, r3, r0, lsl #2 <== NOT EXECUTED 2b008: e0833000 add r3, r3, r0 <== NOT EXECUTED 2b00c: e5921000 ldr r1, [r2] <== NOT EXECUTED 2b010: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 2b014: e0810003 add r0, r1, r3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 2b018: e590200c ldr r2, [r0, #12] <== NOT EXECUTED 2b01c: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 2b020: 0a000031 beq 2b0ec <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 2b024: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED 2b028: 0a00003a beq 2b118 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 2b02c: e5902018 ldr r2, [r0, #24] <== NOT EXECUTED 2b030: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 2b034: 0a00003c beq 2b12c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 2b038: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED 2b03c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 2b040: 0a000039 beq 2b12c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 2b044: e2804010 add r4, r0, #16 ; 0x10 <== NOT EXECUTED 2b048: e1a00004 mov r0, r4 <== NOT EXECUTED 2b04c: e1a0e00f mov lr, pc <== NOT EXECUTED 2b050: e12fff12 bx r2 <== NOT EXECUTED 2b054: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 2b058: 1a00001e bne 2b0d8 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 2b05c: e59f60e4 ldr r6, [pc, #228] ; 2b148 <== NOT EXECUTED 2b060: e596c000 ldr ip, [r6] <== NOT EXECUTED 2b064: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 2b068: e89c000f ldm ip, {r0, r1, r2, r3} <== NOT EXECUTED 2b06c: e88d000f stm sp, {r0, r1, r2, r3} <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 2b070: e894000f ldm r4, {r0, r1, r2, r3} <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 2b074: e28d4010 add r4, sp, #16 ; 0x10 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 2b078: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 2b07c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2b080: e59f00c4 ldr r0, [pc, #196] ; 2b14c <== NOT EXECUTED 2b084: e1a02004 mov r2, r4 <== NOT EXECUTED 2b088: e1a03001 mov r3, r1 <== NOT EXECUTED 2b08c: ebff635c bl 3e04 <== NOT EXECUTED 2b090: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 2b094: e1a0500d mov r5, sp <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 2b098: 1a000018 bne 2b100 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 2b09c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 2b0a0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2b0a4: 0a000004 beq 2b0bc <== NOT EXECUTED 2b0a8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2b0ac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2b0b0: 11a0000d movne r0, sp <== NOT EXECUTED 2b0b4: 11a0e00f movne lr, pc <== NOT EXECUTED 2b0b8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 2b0bc: e596c000 ldr ip, [r6] <== NOT EXECUTED 2b0c0: e894000f ldm r4, {r0, r1, r2, r3} <== NOT EXECUTED 2b0c4: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 2b0c8: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED 2b0cc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return 0; } 2b0d0: e28dd020 add sp, sp, #32 ; 0x20 <== NOT EXECUTED 2b0d4: e8bd8070 pop {r4, r5, r6, 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 ); 2b0d8: eb000a94 bl 2db30 <__errno> <== NOT EXECUTED 2b0dc: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 2b0e0: e5803000 str r3, [r0] <== NOT EXECUTED 2b0e4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2b0e8: eafffff8 b 2b0d0 <== 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); 2b0ec: eb000a8f bl 2db30 <__errno> <== NOT EXECUTED 2b0f0: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 2b0f4: e5803000 str r3, [r0] <== NOT EXECUTED 2b0f8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2b0fc: eafffff3 b 2b0d0 <== 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; 2b100: e596c000 ldr ip, [r6] <== NOT EXECUTED 2b104: e89d000f ldm sp, {r0, r1, r2, r3} <== NOT EXECUTED 2b108: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 2b10c: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED 2b110: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2b114: eaffffed b 2b0d0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 2b118: eb000a84 bl 2db30 <__errno> <== NOT EXECUTED 2b11c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 2b120: e5803000 str r3, [r0] <== NOT EXECUTED 2b124: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2b128: eaffffe8 b 2b0d0 <== 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 ); 2b12c: eb000a7f bl 2db30 <__errno> <== NOT EXECUTED 2b130: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2b134: e5803000 str r3, [r0] <== NOT EXECUTED 2b138: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2b13c: eaffffe3 b 2b0d0 <== NOT EXECUTED 2b140: 0003f784 .word 0x0003f784 2b144: 0005a58c .word 0x0005a58c 2b148: 000402b8 .word 0x000402b8 2b14c: 000437f4 .word 0x000437f4 0001df38 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1df38: e59f309c ldr r3, [pc, #156] ; 1dfdc <== NOT EXECUTED 1df3c: e5932000 ldr r2, [r3] <== NOT EXECUTED 1df40: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 1df44: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1df48: 2a000014 bcs 1dfa0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 1df4c: e1a03200 lsl r3, r0, #4 <== NOT EXECUTED 1df50: e59f2088 ldr r2, [pc, #136] ; 1dfe0 <== NOT EXECUTED 1df54: e0433100 sub r3, r3, r0, lsl #2 <== NOT EXECUTED 1df58: e0833000 add r3, r3, r0 <== NOT EXECUTED 1df5c: e5920000 ldr r0, [r2] <== NOT EXECUTED 1df60: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 1df64: e080c003 add ip, r0, r3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 1df68: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED 1df6c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 1df70: 0a00000a beq 1dfa0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1df74: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 1df78: 0a00000d beq 1dfb4 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 1df7c: e59c3030 ldr r3, [ip, #48] <== NOT EXECUTED 1df80: e593201c ldr r2, [r3, #28] <== NOT EXECUTED 1df84: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1df88: 0a00000e beq 1dfc8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 1df8c: e28c0010 add r0, ip, #16 ; 0x10 <== NOT EXECUTED 1df90: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED 1df94: e1a0e00f mov lr, pc <== NOT EXECUTED 1df98: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 1df9c: 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); 1dfa0: eb003ee2 bl 2db30 <__errno> <== NOT EXECUTED 1dfa4: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 1dfa8: e5803000 str r3, [r0] <== NOT EXECUTED 1dfac: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1dfb0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1dfb4: eb003edd bl 2db30 <__errno> <== NOT EXECUTED 1dfb8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1dfbc: e5803000 str r3, [r0] <== NOT EXECUTED 1dfc0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1dfc4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1dfc8: eb003ed8 bl 2db30 <__errno> <== NOT EXECUTED 1dfcc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1dfd0: e5803000 str r3, [r0] <== NOT EXECUTED 1dfd4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1dfd8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1dfdc: 0003f784 .word 0x0003f784 1dfe0: 0005a58c .word 0x0005a58c 0001dfe4 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1dfe4: e59f30b0 ldr r3, [pc, #176] ; 1e09c <== NOT EXECUTED 1dfe8: e593c000 ldr ip, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 1dfec: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1dff0: e150000c cmp r0, ip <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 1dff4: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED 1dff8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1dffc: e1a0c821 lsr ip, r1, #16 <== NOT EXECUTED 1e000: e1a0e822 lsr lr, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1e004: 2a000015 bcs 1e060 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 1e008: e1a03200 lsl r3, r0, #4 <== NOT EXECUTED 1e00c: e59f208c ldr r2, [pc, #140] ; 1e0a0 <== NOT EXECUTED 1e010: e0433100 sub r3, r3, r0, lsl #2 <== NOT EXECUTED 1e014: e0833000 add r3, r3, r0 <== NOT EXECUTED 1e018: e5921000 ldr r1, [r2] <== NOT EXECUTED 1e01c: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 1e020: e0810003 add r0, r1, r3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 1e024: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 1e028: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 1e02c: 0a00000b beq 1e060 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1e030: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 1e034: 0a00000e beq 1e074 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 1e038: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED 1e03c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 1e040: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e044: 0a00000f beq 1e088 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 1e048: e1a0100c mov r1, ip <== NOT EXECUTED 1e04c: e1a0200e mov r2, lr <== NOT EXECUTED 1e050: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED 1e054: e1a0e00f mov lr, pc <== NOT EXECUTED 1e058: e12fff13 bx r3 <== NOT EXECUTED } 1e05c: 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); 1e060: eb003eb2 bl 2db30 <__errno> <== NOT EXECUTED 1e064: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 1e068: e5803000 str r3, [r0] <== NOT EXECUTED 1e06c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1e070: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1e074: eb003ead bl 2db30 <__errno> <== NOT EXECUTED 1e078: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1e07c: e5803000 str r3, [r0] <== NOT EXECUTED 1e080: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1e084: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1e088: eb003ea8 bl 2db30 <__errno> <== NOT EXECUTED 1e08c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1e090: e5803000 str r3, [r0] <== NOT EXECUTED 1e094: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1e098: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1e09c: 0003f784 .word 0x0003f784 1e0a0: 0005a58c .word 0x0005a58c 0002b150 : int fcntl( int fd, int cmd, ... ) { 2b150: e92d000e push {r1, r2, r3} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2b154: e59f3210 ldr r3, [pc, #528] ; 2b36c int fcntl( int fd, int cmd, ... ) { 2b158: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2b15c: e5932000 ldr r2, [r3] 2b160: e1500002 cmp r0, r2 int fcntl( int fd, int cmd, ... ) { 2b164: e59d8024 ldr r8, [sp, #36] 2b168: e28d1028 add r1, sp, #40 ; 0x28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2b16c: 2a000072 bcs 2b33c iop = rtems_libio_iop( fd ); 2b170: e59f61f8 ldr r6, [pc, #504] ; 2b370 2b174: e1a03200 lsl r3, r0, #4 2b178: e0433100 sub r3, r3, r0, lsl #2 2b17c: e0833000 add r3, r3, r0 2b180: e596c000 ldr ip, [r6] 2b184: e1a03103 lsl r3, r3, #2 2b188: e08ca003 add sl, ip, r3 rtems_libio_check_is_open(iop); 2b18c: e59a900c ldr r9, [sl, #12] 2b190: e3190c01 tst r9, #256 ; 0x100 2b194: 0a000068 beq 2b33c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2b198: e3580009 cmp r8, #9 ; 0x9 2b19c: 979ff108 ldrls pc, [pc, r8, lsl #2] 2b1a0: ea00002b b 2b254 2b1a4: 0002b268 .word 0x0002b268 <== NOT EXECUTED 2b1a8: 0002b2fc .word 0x0002b2fc <== NOT EXECUTED 2b1ac: 0002b308 .word 0x0002b308 <== NOT EXECUTED 2b1b0: 0002b32c .word 0x0002b32c <== NOT EXECUTED 2b1b4: 0002b1ec .word 0x0002b1ec <== NOT EXECUTED 2b1b8: 0002b1cc .word 0x0002b1cc <== NOT EXECUTED 2b1bc: 0002b1cc .word 0x0002b1cc <== NOT EXECUTED 2b1c0: 0002b1cc .word 0x0002b1cc <== NOT EXECUTED 2b1c4: 0002b1cc .word 0x0002b1cc <== NOT EXECUTED 2b1c8: 0002b1cc .word 0x0002b1cc <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 2b1cc: eb000a57 bl 2db30 <__errno> 2b1d0: e3a03086 mov r3, #134 ; 0x86 2b1d4: e5803000 str r3, [r0] 2b1d8: e3e06000 mvn r6, #0 ; 0x0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2b1dc: e1a00006 mov r0, r6 2b1e0: e8bd4ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2b1e4: e28dd00c add sp, sp, #12 ; 0xc 2b1e8: 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 ) ); 2b1ec: e5910000 ldr r0, [r1] 2b1f0: ebff6492 bl 4440 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 2b1f4: e59a300c ldr r3, [sl, #12] 2b1f8: e3c00f7f bic r0, r0, #508 ; 0x1fc 2b1fc: e3c00002 bic r0, r0, #2 ; 0x2 2b200: e1a00b00 lsl r0, r0, #22 2b204: e3c33c02 bic r3, r3, #512 ; 0x200 2b208: e1a00b20 lsr r0, r0, #22 2b20c: e3c33001 bic r3, r3, #1 ; 0x1 2b210: e1800003 orr r0, r0, r3 2b214: e58a000c str r0, [sl, #12] 2b218: e3a06000 mov r6, #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) { 2b21c: e59a3030 ldr r3, [sl, #48] 2b220: e5933030 ldr r3, [r3, #48] 2b224: e3530000 cmp r3, #0 ; 0x0 2b228: 0affffeb beq 2b1dc int err = (*iop->handlers->fcntl_h)( cmd, iop ); 2b22c: e1a00008 mov r0, r8 2b230: e1a0100a mov r1, sl 2b234: e1a0e00f mov lr, pc 2b238: e12fff13 bx r3 if (err) { 2b23c: e2504000 subs r4, r0, #0 ; 0x0 2b240: 0affffe5 beq 2b1dc errno = err; 2b244: eb000a39 bl 2db30 <__errno> <== NOT EXECUTED 2b248: e3e06000 mvn r6, #0 ; 0x0 <== NOT EXECUTED 2b24c: e5804000 str r4, [r0] <== NOT EXECUTED 2b250: eaffffe1 b 2b1dc <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 2b254: eb000a35 bl 2db30 <__errno> 2b258: e3a03016 mov r3, #22 ; 0x16 2b25c: e5803000 str r3, [r0] 2b260: e3e06000 mvn r6, #0 ; 0x0 2b264: eaffffdc b 2b1dc * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 2b268: e5910000 ldr r0, [r1] if ( fd2 ) 2b26c: e3500000 cmp r0, #0 ; 0x0 2b270: 0a000036 beq 2b350 diop = rtems_libio_iop( fd2 ); 2b274: e1520000 cmp r2, r0 <== NOT EXECUTED 2b278: 81a03200 lslhi r3, r0, #4 <== NOT EXECUTED 2b27c: 80433100 subhi r3, r3, r0, lsl #2 <== NOT EXECUTED 2b280: 80833000 addhi r3, r3, r0 <== NOT EXECUTED 2b284: 81a03103 lslhi r3, r3, #2 <== NOT EXECUTED 2b288: 93a0b000 movls fp, #0 ; 0x0 <== NOT EXECUTED 2b28c: 808cb003 addhi fp, ip, r3 <== NOT EXECUTED 2b290: 91a0300b movls r3, fp <== NOT EXECUTED 2b294: 81a0300b movhi r3, fp <== 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); 2b298: e5966000 ldr r6, [r6] 2b29c: e0666003 rsb r6, r6, r3 2b2a0: e1a06146 asr r6, r6, #2 2b2a4: e1a03306 lsl r3, r6, #6 2b2a8: e0433106 sub r3, r3, r6, lsl #2 2b2ac: e1a05303 lsl r5, r3, #6 2b2b0: e0635005 rsb r5, r3, r5 2b2b4: e1a02605 lsl r2, r5, #12 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2b2b8: e28a4010 add r4, sl, #16 ; 0x10 ret = (int) (diop - rtems_libio_iops); 2b2bc: e0855002 add r5, r5, r2 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2b2c0: e894000f ldm r4, {r0, r1, r2, r3} 2b2c4: e28bc010 add ip, fp, #16 ; 0x10 ret = (int) (diop - rtems_libio_iops); 2b2c8: e0855006 add r5, r5, r6 ret = -1; break; } } diop->handlers = iop->handlers; 2b2cc: e59a7030 ldr r7, [sl, #48] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2b2d0: e88c000f stm ip, {r0, r1, r2, r3} break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 2b2d4: e59a302c ldr r3, [sl, #44] diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 2b2d8: e1a05205 lsl r5, r5, #4 2b2dc: e0665005 rsb r5, r6, r5 ret = -1; break; } } diop->handlers = iop->handlers; 2b2e0: e58b7030 str r7, [fp, #48] diop->file_info = iop->file_info; 2b2e4: e58b302c str r3, [fp, #44] diop->flags = iop->flags; 2b2e8: e58b900c str r9, [fp, #12] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 2b2ec: e0466105 sub r6, r6, r5, lsl #2 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2b2f0: e3560000 cmp r6, #0 ; 0x0 2b2f4: aaffffc8 bge 2b21c 2b2f8: eaffffb7 b 2b1dc <== 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); 2b2fc: e1a035a9 lsr r3, r9, #11 2b300: e2036001 and r6, r3, #1 ; 0x1 2b304: eaffffc4 b 2b21c * 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 ) ) 2b308: e5910000 ldr r0, [r1] 2b30c: e3500000 cmp r0, #0 ; 0x0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 2b310: 13893b02 orrne r3, r9, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2b314: 03c93b02 biceq r3, r9, #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; 2b318: 158a300c strne r3, [sl, #12] 2b31c: 13a06000 movne r6, #0 ; 0x0 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2b320: 058a300c streq r3, [sl, #12] 2b324: 01a06000 moveq r6, r0 2b328: eaffffbb b 2b21c break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 2b32c: e1a00009 mov r0, r9 2b330: ebff638e bl 4170 2b334: e1a06000 mov r6, r0 2b338: eaffffec b 2b2f0 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 2b33c: eb0009fb bl 2db30 <__errno> <== NOT EXECUTED 2b340: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 2b344: e5803000 str r3, [r0] <== NOT EXECUTED 2b348: e3e06000 mvn r6, #0 ; 0x0 <== NOT EXECUTED 2b34c: eaffffa2 b 2b1dc <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 2b350: ebff63f6 bl 4330 if ( diop == 0 ) { 2b354: e250b000 subs fp, r0, #0 ; 0x0 2b358: 159a900c ldrne r9, [sl, #12] 2b35c: 11a0300b movne r3, fp 2b360: 1affffcc bne 2b298 if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 2b364: e3e06000 mvn r6, #0 ; 0x0 <== NOT EXECUTED 2b368: eaffff9b b 2b1dc <== NOT EXECUTED 2b36c: 0003f784 .word 0x0003f784 2b370: 0005a58c .word 0x0005a58c 000203f8 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 203f8: e59f0044 ldr r0, [pc, #68] ; 20444 <== NOT EXECUTED 203fc: e4902004 ldr r2, [r0], #4 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 20400: e1520000 cmp r2, r0 <== NOT EXECUTED 20404: 0a00000a beq 20434 <== 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 ) { 20408: e591100c ldr r1, [r1, #12] <== NOT EXECUTED 2040c: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED 20410: e1530001 cmp r3, r1 <== NOT EXECUTED 20414: 1a000003 bne 20428 <== NOT EXECUTED 20418: ea000007 b 2043c <== NOT EXECUTED 2041c: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED 20420: e1530001 cmp r3, r1 <== NOT EXECUTED 20424: 0a000004 beq 2043c <== 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 ) { 20428: 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 ); 2042c: e1520000 cmp r2, r0 <== NOT EXECUTED 20430: 1afffff9 bne 2041c <== NOT EXECUTED 20434: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; } } return false; } 20438: 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 ); 2043c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 20440: e12fff1e bx lr <== NOT EXECUTED 20444: 0005a628 .word 0x0005a628 00002644 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2644: e59f311c ldr r3, [pc, #284] ; 2768 2648: e5932000 ldr r2, [r3] 264c: e1500002 cmp r0, r2 long fpathconf( int fd, int name ) { 2650: e52de004 push {lr} ; (str lr, [sp, #-4]!) 2654: e1a0c001 mov ip, r1 long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2658: 2a000038 bcs 2740 iop = rtems_libio_iop(fd); 265c: e1a03200 lsl r3, r0, #4 2660: e59f2104 ldr r2, [pc, #260] ; 276c 2664: e0433100 sub r3, r3, r0, lsl #2 2668: e0833000 add r3, r3, r0 266c: e5921000 ldr r1, [r2] 2670: e1a03103 lsl r3, r3, #2 2674: e0810003 add r0, r1, r3 rtems_libio_check_is_open(iop); 2678: e590200c ldr r2, [r0, #12] 267c: e3120c01 tst r2, #256 ; 0x100 2680: 0a00002e beq 2740 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2684: e3120002 tst r2, #2 ; 0x2 2688: 0a000031 beq 2754 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 268c: e590001c ldr r0, [r0, #28] switch ( name ) { 2690: e35c000b cmp ip, #11 ; 0xb 2694: 979ff10c ldrls pc, [pc, ip, lsl #2] 2698: ea00000b b 26cc 269c: 000026e0 .word 0x000026e0 <== NOT EXECUTED 26a0: 000026e8 .word 0x000026e8 <== NOT EXECUTED 26a4: 000026f0 .word 0x000026f0 <== NOT EXECUTED 26a8: 000026f8 .word 0x000026f8 <== NOT EXECUTED 26ac: 00002700 .word 0x00002700 <== NOT EXECUTED 26b0: 00002708 .word 0x00002708 <== NOT EXECUTED 26b4: 00002710 .word 0x00002710 <== NOT EXECUTED 26b8: 00002718 .word 0x00002718 <== NOT EXECUTED 26bc: 00002720 .word 0x00002720 <== NOT EXECUTED 26c0: 00002728 .word 0x00002728 <== NOT EXECUTED 26c4: 00002730 .word 0x00002730 <== NOT EXECUTED 26c8: 00002738 .word 0x00002738 <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 26cc: eb002fbe bl e5cc <__errno> 26d0: e3a03016 mov r3, #22 ; 0x16 26d4: e5803000 str r3, [r0] 26d8: e3e00000 mvn r0, #0 ; 0x0 break; } return return_value; } 26dc: 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; 26e0: e5900030 ldr r0, [r0, #48] 26e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 26e8: e5900034 ldr r0, [r0, #52] 26ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 26f0: e5900038 ldr r0, [r0, #56] 26f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_NAME_MAX: return_value = the_limits->name_max; 26f8: e590003c ldr r0, [r0, #60] 26fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PATH_MAX: return_value = the_limits->path_max; 2700: e5900040 ldr r0, [r0, #64] 2704: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2708: e5900044 ldr r0, [r0, #68] 270c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2710: e590004c ldr r0, [r0, #76] 2714: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2718: e5900050 ldr r0, [r0, #80] 271c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2720: e590005c ldr r0, [r0, #92] 2724: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2728: e5900048 ldr r0, [r0, #72] 272c: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2730: e5900054 ldr r0, [r0, #84] 2734: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2738: e5900058 ldr r0, [r0, #88] 273c: 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); 2740: eb002fa1 bl e5cc <__errno> 2744: e3a03009 mov r3, #9 ; 0x9 2748: e5803000 str r3, [r0] 274c: e3e00000 mvn r0, #0 ; 0x0 2750: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2754: eb002f9c bl e5cc <__errno> <== NOT EXECUTED 2758: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 275c: e5803000 str r3, [r0] <== NOT EXECUTED 2760: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2764: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 2768: 000140a4 .word 0x000140a4 276c: 00015f30 .word 0x00015f30 00009024 : void free( void *ptr ) { MSBUMP(free_calls, 1); 9024: e59f2084 ldr r2, [pc, #132] ; 90b0 9028: e592300c ldr r3, [r2, #12] 902c: e92d4030 push {r4, r5, lr} 9030: e2833001 add r3, r3, #1 ; 0x1 if ( !ptr ) 9034: e2505000 subs r5, r0, #0 ; 0x0 void free( void *ptr ) { MSBUMP(free_calls, 1); 9038: e582300c str r3, [r2, #12] if ( !ptr ) 903c: 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()) && 9040: e59f306c ldr r3, [pc, #108] ; 90b4 9044: e5932000 ldr r2, [r3] 9048: e3520003 cmp r2, #3 ; 0x3 904c: 0a000011 beq 9098 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 9050: e59f3060 ldr r3, [pc, #96] ; 90b8 9054: e5933000 ldr r3, [r3] 9058: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 905c: 11a00005 movne r0, r5 9060: 11a0e00f movne lr, pc 9064: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 9068: e59f404c ldr r4, [pc, #76] ; 90bc 906c: e1a01005 mov r1, r5 9070: e1a00004 mov r0, r4 9074: eb0006d5 bl abd0 <_Protected_heap_Free> 9078: e3500000 cmp r0, #0 ; 0x0 907c: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 9080: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 9084: e59f0034 ldr r0, [pc, #52] ; 90c0 <== NOT EXECUTED 9088: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 908c: e1a01005 mov r1, r5 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 9090: 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", 9094: eaffe42d b 2150 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 9098: eb000131 bl 9564 909c: e3500000 cmp r0, #0 ; 0x0 90a0: 1affffea bne 9050 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 90a4: e1a00005 mov r0, r5 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 90a8: 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); 90ac: ea00013f b 95b0 <== NOT EXECUTED 90b0: 00016df4 .word 0x00016df4 90b4: 000170b4 .word 0x000170b4 90b8: 00016bc4 .word 0x00016bc4 90bc: 00016d9c .word 0x00016d9c 90c0: 00016884 .word 0x00016884 0001f924 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 1f924: e59f3058 ldr r3, [pc, #88] ; 1f984 <== NOT EXECUTED 1f928: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 1f92c: e92d4010 push {r4, lr} <== NOT EXECUTED 1f930: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 1f934: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 1f938: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 1f93c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f940: 0a000004 beq 1f958 <== NOT EXECUTED 1f944: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1f948: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f94c: 12800004 addne r0, r0, #4 ; 0x4 <== NOT EXECUTED 1f950: 11a0e00f movne lr, pc <== NOT EXECUTED 1f954: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 1f958: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 1f95c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f960: 0a000004 beq 1f978 <== NOT EXECUTED 1f964: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1f968: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f96c: 12840014 addne r0, r4, #20 ; 0x14 <== NOT EXECUTED 1f970: 11a0e00f movne lr, pc <== NOT EXECUTED 1f974: 112fff13 bxne r3 <== NOT EXECUTED free(env); 1f978: e1a00004 mov r0, r4 <== NOT EXECUTED } } 1f97c: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 1f980: eaff9174 b 3f58 <== NOT EXECUTED 1f984: 0005ad3c .word 0x0005ad3c 000144f8 : int fstat( int fd, struct stat *sbuf ) { 144f8: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 144fc: e2515000 subs r5, r1, #0 ; 0x0 14500: 0a000027 beq 145a4 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 14504: e59f30ac ldr r3, [pc, #172] ; 145b8 14508: e5932000 ldr r2, [r3] 1450c: e1500002 cmp r0, r2 14510: 2a000019 bcs 1457c 14514: e59f20a0 ldr r2, [pc, #160] ; 145bc 14518: e1a03200 lsl r3, r0, #4 1451c: e0433100 sub r3, r3, r0, lsl #2 14520: e5921000 ldr r1, [r2] 14524: e0833000 add r3, r3, r0 14528: e1a03103 lsl r3, r3, #2 1452c: e0814003 add r4, r1, r3 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 14530: e594200c ldr r2, [r4, #12] 14534: e3120c01 tst r2, #256 ; 0x100 14538: 0a00000f beq 1457c if ( !iop->handlers ) 1453c: e5943030 ldr r3, [r4, #48] 14540: e3530000 cmp r3, #0 ; 0x0 14544: 0a00000c beq 1457c rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 14548: e5933018 ldr r3, [r3, #24] 1454c: e3530000 cmp r3, #0 ; 0x0 14550: 0a00000e beq 14590 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 14554: e3a01000 mov r1, #0 ; 0x0 14558: e3a0204c mov r2, #76 ; 0x4c 1455c: e1a00005 mov r0, r5 14560: ebffe08f bl c7a4 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 14564: e2840010 add r0, r4, #16 ; 0x10 14568: e1a01005 mov r1, r5 1456c: e5943030 ldr r3, [r4, #48] 14570: e1a0e00f mov lr, pc 14574: e593f018 ldr pc, [r3, #24] } 14578: 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 ); 1457c: ebffde7f bl bf80 <__errno> 14580: e3a03009 mov r3, #9 ; 0x9 14584: e5803000 str r3, [r0] 14588: e3e00000 mvn r0, #0 ; 0x0 1458c: e8bd8030 pop {r4, r5, pc} if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 14590: ebffde7a bl bf80 <__errno> <== NOT EXECUTED 14594: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 14598: e5803000 str r3, [r0] <== NOT EXECUTED 1459c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 145a0: 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 ); 145a4: ebffde75 bl bf80 <__errno> 145a8: e3a0300e mov r3, #14 ; 0xe 145ac: e5803000 str r3, [r0] 145b0: e3e00000 mvn r0, #0 ; 0x0 145b4: e8bd8030 pop {r4, r5, pc} 145b8: 00015094 .word 0x00015094 145bc: 00016d90 .word 0x00016d90 0001e178 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1e178: e59f309c ldr r3, [pc, #156] ; 1e21c 1e17c: e5932000 ldr r2, [r3] 1e180: e1500002 cmp r0, r2 #include int fsync( int fd ) { 1e184: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1e188: 2a000014 bcs 1e1e0 iop = rtems_libio_iop( fd ); 1e18c: e1a03200 lsl r3, r0, #4 1e190: e59f2088 ldr r2, [pc, #136] ; 1e220 1e194: e0433100 sub r3, r3, r0, lsl #2 1e198: e0833000 add r3, r3, r0 1e19c: e5921000 ldr r1, [r2] 1e1a0: e1a03103 lsl r3, r3, #2 1e1a4: e0810003 add r0, r1, r3 rtems_libio_check_is_open(iop); 1e1a8: e590200c ldr r2, [r0, #12] 1e1ac: e3120c01 tst r2, #256 ; 0x100 1e1b0: 0a00000a beq 1e1e0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1e1b4: e3120004 tst r2, #4 ; 0x4 1e1b8: 0a00000d beq 1e1f4 /* * Now process the fsync(). */ if ( !iop->handlers ) 1e1bc: e5902030 ldr r2, [r0, #48] 1e1c0: e3520000 cmp r2, #0 ; 0x0 1e1c4: 0a000005 beq 1e1e0 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 1e1c8: e5922028 ldr r2, [r2, #40] 1e1cc: e3520000 cmp r2, #0 ; 0x0 1e1d0: 0a00000c beq 1e208 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 1e1d4: e1a0e00f mov lr, pc 1e1d8: e12fff12 bx r2 } 1e1dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 1e1e0: eb003e52 bl 2db30 <__errno> <== NOT EXECUTED 1e1e4: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 1e1e8: e5803000 str r3, [r0] <== NOT EXECUTED 1e1ec: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1e1f0: 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 ); 1e1f4: eb003e4d bl 2db30 <__errno> 1e1f8: e3a03016 mov r3, #22 ; 0x16 1e1fc: e5803000 str r3, [r0] 1e200: e3e00000 mvn r0, #0 ; 0x0 1e204: 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 ); 1e208: eb003e48 bl 2db30 <__errno> 1e20c: e3a03086 mov r3, #134 ; 0x86 1e210: e5803000 str r3, [r0] 1e214: e3e00000 mvn r0, #0 ; 0x0 1e218: e49df004 pop {pc} ; (ldr pc, [sp], #4) 1e21c: 0003f784 .word 0x0003f784 1e220: 0005a58c .word 0x0005a58c 000090c4 : int ftruncate( int fd, off_t length ) { 90c4: e92d4030 push {r4, r5, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 90c8: e59f30e8 ldr r3, [pc, #232] ; 91b8 90cc: e5932000 ldr r2, [r3] 90d0: e1500002 cmp r0, r2 int ftruncate( int fd, off_t length ) { 90d4: e24dd010 sub sp, sp, #16 ; 0x10 90d8: e1a05001 mov r5, r1 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 90dc: 2a000021 bcs 9168 iop = rtems_libio_iop( fd ); 90e0: e59f20d4 ldr r2, [pc, #212] ; 91bc 90e4: e1a03200 lsl r3, r0, #4 90e8: e0433100 sub r3, r3, r0, lsl #2 90ec: e5921000 ldr r1, [r2] 90f0: e0833000 add r3, r3, r0 90f4: e1a03103 lsl r3, r3, #2 90f8: e0814003 add r4, r1, r3 rtems_libio_check_is_open(iop); 90fc: e594200c ldr r2, [r4, #12] 9100: e3120c01 tst r2, #256 ; 0x100 9104: 0a000017 beq 9168 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 9108: e284c010 add ip, r4, #16 ; 0x10 910c: e89c000f ldm ip, {r0, r1, r2, r3} 9110: e88d000f stm sp, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 9114: e5923010 ldr r3, [r2, #16] 9118: e3530000 cmp r3, #0 ; 0x0 911c: 0a00001b beq 9190 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 9120: e1a0000d mov r0, sp 9124: e1a0e00f mov lr, pc 9128: e12fff13 bx r3 912c: e3500001 cmp r0, #1 ; 0x1 9130: 0a00001b beq 91a4 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 9134: e594300c ldr r3, [r4, #12] 9138: e3130004 tst r3, #4 ; 0x4 913c: 0a00000e beq 917c if ( !iop->handlers->ftruncate_h ) 9140: e5943030 ldr r3, [r4, #48] 9144: e5933020 ldr r3, [r3, #32] 9148: e3530000 cmp r3, #0 ; 0x0 914c: 0a00000f beq 9190 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 9150: e1a00004 mov r0, r4 9154: e1a01005 mov r1, r5 9158: e1a0e00f mov lr, pc 915c: e12fff13 bx r3 } 9160: e28dd010 add sp, sp, #16 ; 0x10 9164: 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); 9168: eb000b84 bl bf80 <__errno> <== NOT EXECUTED 916c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 9170: e5803000 str r3, [r0] <== NOT EXECUTED 9174: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 9178: eafffff8 b 9160 <== 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 ); 917c: eb000b7f bl bf80 <__errno> <== NOT EXECUTED 9180: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 9184: e5803000 str r3, [r0] <== NOT EXECUTED 9188: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 918c: eafffff3 b 9160 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 9190: eb000b7a bl bf80 <__errno> <== NOT EXECUTED 9194: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9198: e5803000 str r3, [r0] <== NOT EXECUTED 919c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 91a0: eaffffee b 9160 <== 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 ); 91a4: eb000b75 bl bf80 <__errno> 91a8: e3a03015 mov r3, #21 ; 0x15 91ac: e5803000 str r3, [r0] 91b0: e3e00000 mvn r0, #0 ; 0x0 91b4: eaffffe9 b 9160 91b8: 00015094 .word 0x00015094 91bc: 00016d90 .word 0x00016d90 0001e320 : char * getcwd ( char *pt, size_t size) { 1e320: 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) 1e324: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED char * getcwd ( char *pt, size_t size) { 1e328: e24dd078 sub sp, sp, #120 ; 0x78 <== NOT EXECUTED 1e32c: 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) 1e330: 0a000104 beq 1e748 <== NOT EXECUTED { ptsize = 0; if (!size) 1e334: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED { errno = EINVAL; return (char *) NULL; } ept = pt + size; 1e338: 108ab001 addne fp, sl, r1 <== NOT EXECUTED 1e33c: 13a01000 movne r1, #0 ; 0x0 <== NOT EXECUTED 1e340: 158d101c strne r1, [sp, #28] <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 1e344: 0a0000fa beq 1e734 <== NOT EXECUTED return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; *bpt = '\0'; 1e348: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 1e34c: 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))) 1e350: e3a00fff mov r0, #1020 ; 0x3fc <== NOT EXECUTED 1e354: ebff989f bl 45d8 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; 1e358: 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))) 1e35c: e2506000 subs r6, r0, #0 ; 0x0 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; 1e360: 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))) 1e364: 0a000007 beq 1e388 <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 1e368: e3a0502e mov r5, #46 ; 0x2e <== NOT EXECUTED up[1] = '\0'; 1e36c: e5c64001 strb r4, [r6, #1] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 1e370: e5c65000 strb r5, [r6] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 1e374: e59f03fc ldr r0, [pc, #1020] ; 1e778 <== NOT EXECUTED 1e378: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 1e37c: ebff9cc5 bl 5698 <== NOT EXECUTED 1e380: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 1e384: 0a00000b beq 1e3b8 <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 1e388: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED 1e38c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1e390: 1a000005 bne 1e3ac <== NOT EXECUTED free (pt); free (up); 1e394: e1a00006 mov r0, r6 <== NOT EXECUTED 1e398: ebff96ee bl 3f58 <== NOT EXECUTED 1e39c: e3a0a000 mov sl, #0 ; 0x0 <== NOT EXECUTED return (char *) NULL; } 1e3a0: e1a0000a mov r0, sl <== NOT EXECUTED 1e3a4: e28dd078 add sp, sp, #120 ; 0x78 <== NOT EXECUTED 1e3a8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED err: if(dir) (void) _closedir (dir); if (ptsize) free (pt); 1e3ac: e1a0000a mov r0, sl <== NOT EXECUTED 1e3b0: ebff96e8 bl 3f58 <== NOT EXECUTED 1e3b4: eafffff6 b 1e394 <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; 1e3b8: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 1e3bc: e891000e ldm r1, {r1, r2, r3} <== NOT EXECUTED 1e3c0: e58d1008 str r1, [sp, #8] <== NOT EXECUTED 1e3c4: e58d2004 str r2, [sp, #4] <== NOT EXECUTED root_ino = s.st_ino; 1e3c8: e58d3018 str r3, [sp, #24] <== NOT EXECUTED errno = 0; /* XXX readdir has no error return. */ 1e3cc: eb003dd7 bl 2db30 <__errno> <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 1e3d0: 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. */ 1e3d4: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 1e3d8: e3a03fff mov r3, #1020 ; 0x3fc <== NOT EXECUTED 1e3dc: e5804000 str r4, [r0] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 1e3e0: 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. */ 1e3e4: e58d2010 str r2, [sp, #16] <== NOT EXECUTED 1e3e8: e58d3020 str r3, [sp, #32] <== NOT EXECUTED 1e3ec: e1a08006 mov r8, r6 <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 1e3f0: e1a00006 mov r0, r6 <== NOT EXECUTED 1e3f4: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 1e3f8: ebff9ca6 bl 5698 <== NOT EXECUTED 1e3fc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1e400: 1affffe0 bne 1e388 <== NOT EXECUTED goto err; /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; 1e404: e59d902c ldr r9, [sp, #44] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 1e408: 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; 1e40c: e59d2034 ldr r2, [sp, #52] <== NOT EXECUTED dev = s.st_dev; 1e410: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 1e414: e1510009 cmp r1, r9 <== NOT EXECUTED /* Stat the current level. */ if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; 1e418: e58d200c str r2, [sp, #12] <== NOT EXECUTED dev = s.st_dev; 1e41c: e58d3000 str r3, [sp] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 1e420: 0a0000bd beq 1e71c <== NOT EXECUTED 1e424: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 1e428: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED 1e42c: e1520001 cmp r2, r1 <== NOT EXECUTED 1e430: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED 1e434: 02003001 andeq r3, r0, #1 ; 0x1 <== NOT EXECUTED 1e438: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e43c: 0a000009 beq 1e468 <== NOT EXECUTED { *--bpt = '/'; 1e440: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 1e444: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED 1e448: e2421001 sub r1, r2, #1 ; 0x1 <== NOT EXECUTED 1e44c: 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); 1e450: e1a0000a mov r0, sl <== NOT EXECUTED 1e454: e061200b rsb r2, r1, fp <== NOT EXECUTED 1e458: eb00476b bl 3020c <== NOT EXECUTED free (up); 1e45c: e1a00006 mov r0, r6 <== NOT EXECUTED 1e460: ebff96bc bl 3f58 <== NOT EXECUTED 1e464: eaffffcd b 1e3a0 <== 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) 1e468: e2883b01 add r3, r8, #1024 ; 0x400 <== NOT EXECUTED 1e46c: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED 1e470: e2833004 add r3, r3, #4 ; 0x4 <== NOT EXECUTED 1e474: e1510003 cmp r1, r3 <== NOT EXECUTED 1e478: 9a000053 bls 1e5cc <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 1e47c: e1a04008 mov r4, r8 <== NOT EXECUTED 1e480: e3a0102e mov r1, #46 ; 0x2e <== NOT EXECUTED 1e484: e4c41001 strb r1, [r4], #1 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 1e488: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 1e48c: e5c81001 strb r1, [r8, #1] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 1e490: e1a00006 mov r0, r6 <== NOT EXECUTED bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; *bup = '\0'; 1e494: e5c42001 strb r2, [r4, #1] <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 1e498: eb0004fd bl 1f894 <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 1e49c: e2843001 add r3, r4, #1 ; 0x1 <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 1e4a0: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 1e4a4: e58d3028 str r3, [sp, #40] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 1e4a8: 0affffb6 beq 1e388 <== NOT EXECUTED 1e4ac: e5970000 ldr r0, [r7] <== NOT EXECUTED 1e4b0: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 1e4b4: ebfffefa bl 1e0a4 <== NOT EXECUTED 1e4b8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1e4bc: 1a00002c bne 1e574 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 1e4c0: e3a0102f mov r1, #47 ; 0x2f <== NOT EXECUTED 1e4c4: 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) 1e4c8: e28d2028 add r2, sp, #40 ; 0x28 <== NOT EXECUTED 1e4cc: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 1e4d0: 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++ = '/'; 1e4d4: 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) 1e4d8: 0a000048 beq 1e600 <== NOT EXECUTED 1e4dc: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 1e4e0: e1a00007 mov r0, r7 <== NOT EXECUTED 1e4e4: eb00059d bl 1fb60 <== NOT EXECUTED 1e4e8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1e4ec: 0a00001c beq 1e564 <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 1e4f0: e5d0300c ldrb r3, [r0, #12] <== NOT EXECUTED 1e4f4: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED 1e4f8: 1a000004 bne 1e510 <== NOT EXECUTED 1e4fc: e5d0300d ldrb r3, [r0, #13] <== NOT EXECUTED 1e500: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e504: 0afffff5 beq 1e4e0 <== NOT EXECUTED 1e508: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED 1e50c: 0a00002a beq 1e5bc <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 1e510: e280400c add r4, r0, #12 ; 0xc <== NOT EXECUTED 1e514: e1a00004 mov r0, r4 <== NOT EXECUTED 1e518: eb00541a bl 33588 <== NOT EXECUTED 1e51c: e1a01004 mov r1, r4 <== NOT EXECUTED 1e520: e2802001 add r2, r0, #1 ; 0x1 <== NOT EXECUTED 1e524: e1a00008 mov r0, r8 <== NOT EXECUTED 1e528: eb004737 bl 3020c <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 1e52c: e1a00006 mov r0, r6 <== NOT EXECUTED 1e530: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 1e534: ebff9c57 bl 5698 <== NOT EXECUTED 1e538: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1e53c: 0a00000f beq 1e580 <== NOT EXECUTED { if (!save_errno) 1e540: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 1e544: 0a000019 beq 1e5b0 <== NOT EXECUTED save_errno = errno; errno = 0; 1e548: eb003d78 bl 2db30 <__errno> <== NOT EXECUTED 1e54c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1e550: e5803000 str r3, [r0] <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 1e554: e1a00007 mov r0, r7 <== NOT EXECUTED 1e558: eb000580 bl 1fb60 <== NOT EXECUTED 1e55c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1e560: 1affffe2 bne 1e4f0 <== 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) 1e564: eb003d71 bl 2db30 <__errno> <== NOT EXECUTED 1e568: e5903000 ldr r3, [r0] <== NOT EXECUTED 1e56c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e570: 0a000064 beq 1e708 <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 1e574: e1a00007 mov r0, r7 <== NOT EXECUTED 1e578: eb003285 bl 2af94 <== NOT EXECUTED 1e57c: eaffff81 b 1e388 <== NOT EXECUTED if (!save_errno) save_errno = errno; errno = 0; continue; } if (s.st_dev == dev && s.st_ino == ino) 1e580: e59d302c ldr r3, [sp, #44] <== NOT EXECUTED 1e584: e1530009 cmp r3, r9 <== NOT EXECUTED 1e588: 1affffd4 bne 1e4e0 <== NOT EXECUTED 1e58c: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED 1e590: e59d1000 ldr r1, [sp] <== NOT EXECUTED 1e594: e1530001 cmp r3, r1 <== NOT EXECUTED 1e598: 1affffd0 bne 1e4e0 <== NOT EXECUTED 1e59c: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 1e5a0: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 1e5a4: e1530002 cmp r3, r2 <== NOT EXECUTED 1e5a8: 1affffcc bne 1e4e0 <== NOT EXECUTED 1e5ac: ea000020 b 1e634 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) { if (!save_errno) save_errno = errno; 1e5b0: eb003d5e bl 2db30 <__errno> <== NOT EXECUTED 1e5b4: e5905000 ldr r5, [r0] <== NOT EXECUTED 1e5b8: eaffffe2 b 1e548 <== NOT EXECUTED else for (;;) { if (!(dp = _readdir (dir))) goto notfound; if (ISDOT (dp)) 1e5bc: e5d0300e ldrb r3, [r0, #14] <== NOT EXECUTED 1e5c0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e5c4: 0affffc5 beq 1e4e0 <== NOT EXECUTED 1e5c8: eaffffd0 b 1e510 <== NOT EXECUTED * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) { if (!(up = (char *) realloc (up, upsize *= 2))) 1e5cc: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED 1e5d0: e1a02082 lsl r2, r2, #1 <== NOT EXECUTED 1e5d4: e1a00006 mov r0, r6 <== NOT EXECUTED 1e5d8: e1a01002 mov r1, r2 <== NOT EXECUTED 1e5dc: e58d2020 str r2, [sp, #32] <== NOT EXECUTED 1e5e0: eb0005d6 bl 1fd40 <== NOT EXECUTED 1e5e4: e2506000 subs r6, r0, #0 ; 0x0 <== NOT EXECUTED 1e5e8: 0affff66 beq 1e388 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 1e5ec: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 1e5f0: e0863003 add r3, r6, r3 <== NOT EXECUTED 1e5f4: e58d3024 str r3, [sp, #36] <== NOT EXECUTED 1e5f8: e1a08006 mov r8, r6 <== NOT EXECUTED 1e5fc: eaffff9e b 1e47c <== 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) 1e600: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED 1e604: e59d1000 ldr r1, [sp] <== NOT EXECUTED 1e608: e1530001 cmp r3, r1 <== NOT EXECUTED 1e60c: 1affffb2 bne 1e4dc <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 1e610: e1a00007 mov r0, r7 <== NOT EXECUTED 1e614: eb000551 bl 1fb60 <== NOT EXECUTED 1e618: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1e61c: 0a000042 beq 1e72c <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 1e620: e5903000 ldr r3, [r0] <== NOT EXECUTED 1e624: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 1e628: e1530002 cmp r3, r2 <== NOT EXECUTED 1e62c: 1afffff7 bne 1e610 <== NOT EXECUTED 1e630: 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)) 1e634: e1a00004 mov r0, r4 <== NOT EXECUTED 1e638: eb0053d2 bl 33588 <== NOT EXECUTED 1e63c: e28d1010 add r1, sp, #16 ; 0x10 <== NOT EXECUTED 1e640: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 1e644: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 1e648: 13a03001 movne r3, #1 ; 0x1 <== NOT EXECUTED 1e64c: 03a03002 moveq r3, #2 ; 0x2 <== NOT EXECUTED 1e650: e0833000 add r3, r3, r0 <== NOT EXECUTED 1e654: e06a5002 rsb r5, sl, r2 <== NOT EXECUTED 1e658: e1550003 cmp r5, r3 <== NOT EXECUTED 1e65c: 8a000012 bhi 1e6ac <== NOT EXECUTED { size_t len, off; if (!ptsize) 1e660: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED 1e664: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e668: 0a00003e beq 1e768 <== NOT EXECUTED errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 1e66c: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED 1e670: e1a0000a mov r0, sl <== NOT EXECUTED 1e674: e1a01081 lsl r1, r1, #1 <== NOT EXECUTED 1e678: e58d101c str r1, [sp, #28] <== NOT EXECUTED 1e67c: eb0005af bl 1fd40 <== NOT EXECUTED 1e680: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 1e684: 0affffba beq 1e574 <== NOT EXECUTED { errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; 1e688: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 1e68c: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED { errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; 1e690: e063200b rsb r2, r3, fp <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 1e694: e08ab001 add fp, sl, r1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 1e698: e062300b rsb r3, r2, fp <== NOT EXECUTED 1e69c: e08a1005 add r1, sl, r5 <== NOT EXECUTED 1e6a0: e1a00003 mov r0, r3 <== NOT EXECUTED 1e6a4: e58d3014 str r3, [sp, #20] <== NOT EXECUTED 1e6a8: eb0046d7 bl 3020c <== NOT EXECUTED bpt = ept - len; } if (!first) 1e6ac: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 1e6b0: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED *--bpt = '/'; 1e6b4: 059d2014 ldreq r2, [sp, #20] <== NOT EXECUTED 1e6b8: 03a0302f moveq r3, #47 ; 0x2f <== NOT EXECUTED 1e6bc: 05623001 strbeq r3, [r2, #-1]! <== NOT EXECUTED bpt -= strlen (dp->d_name); 1e6c0: e1a00004 mov r0, r4 <== NOT EXECUTED ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); bpt = ept - len; } if (!first) *--bpt = '/'; 1e6c4: 058d2014 streq r2, [sp, #20] <== NOT EXECUTED bpt -= strlen (dp->d_name); 1e6c8: eb0053ae bl 33588 <== NOT EXECUTED 1e6cc: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED 1e6d0: e0601001 rsb r1, r0, r1 <== NOT EXECUTED 1e6d4: e58d1014 str r1, [sp, #20] <== NOT EXECUTED 1e6d8: e1a02000 mov r2, r0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 1e6dc: e1a01004 mov r1, r4 <== NOT EXECUTED 1e6e0: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED 1e6e4: eb0046c8 bl 3020c <== NOT EXECUTED (void) _closedir (dir); 1e6e8: e1a00007 mov r0, r7 <== NOT EXECUTED 1e6ec: eb003228 bl 2af94 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 1e6f0: e59d2028 ldr r2, [sp, #40] <== NOT EXECUTED 1e6f4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1e6f8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1e6fc: e5c23001 strb r3, [r2, #1] <== NOT EXECUTED 1e700: e58d1010 str r1, [sp, #16] <== NOT EXECUTED 1e704: eaffff39 b 1e3f0 <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 1e708: eb003d08 bl 2db30 <__errno> <== NOT EXECUTED 1e70c: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 1e710: 03a05002 moveq r5, #2 ; 0x2 <== NOT EXECUTED 1e714: e5805000 str r5, [r0] <== NOT EXECUTED 1e718: eaffff95 b 1e574 <== 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) 1e71c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 1e720: e1510003 cmp r1, r3 <== NOT EXECUTED 1e724: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED 1e728: eaffff3d b 1e424 <== NOT EXECUTED (void) _closedir (dir); dir = 0; /* Truncate any file name. */ *bup = '\0'; } 1e72c: e1a05000 mov r5, r0 <== NOT EXECUTED 1e730: eaffff8b b 1e564 <== NOT EXECUTED if (pt) { ptsize = 0; if (!size) { errno = EINVAL; 1e734: eb003cfd bl 2db30 <__errno> <== NOT EXECUTED 1e738: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1e73c: e5803000 str r3, [r0] <== NOT EXECUTED 1e740: e1a0a004 mov sl, r4 <== NOT EXECUTED 1e744: eaffff15 b 1e3a0 <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 1e748: e3a00fff mov r0, #1020 ; 0x3fc <== NOT EXECUTED 1e74c: ebff97a1 bl 45d8 <== NOT EXECUTED 1e750: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 1e754: 0affff11 beq 1e3a0 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 1e758: e3a02fff mov r2, #1020 ; 0x3fc <== NOT EXECUTED 1e75c: e28abfff add fp, sl, #1020 ; 0x3fc <== NOT EXECUTED 1e760: e58d201c str r2, [sp, #28] <== NOT EXECUTED 1e764: eafffef7 b 1e348 <== NOT EXECUTED { size_t len, off; if (!ptsize) { errno = ERANGE; 1e768: eb003cf0 bl 2db30 <__errno> <== NOT EXECUTED 1e76c: e3a03022 mov r3, #34 ; 0x22 <== NOT EXECUTED 1e770: e5803000 str r3, [r0] <== NOT EXECUTED 1e774: eaffff7e b 1e574 <== NOT EXECUTED 1e778: 00045438 .word 0x00045438 0002b384 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 2b384: e59f30b4 ldr r3, [pc, #180] ; 2b440 2b388: e593c000 ldr ip, [r3] 2b38c: e150000c cmp r0, ip 2b390: 31a03200 lslcc r3, r0, #4 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 2b394: e92d4070 push {r4, r5, r6, lr} 2b398: e1a06002 mov r6, r2 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 2b39c: 359f20a0 ldrcc r2, [pc, #160] ; 2b444 2b3a0: 30433100 subcc r3, r3, r0, lsl #2 2b3a4: 30833000 addcc r3, r3, r0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 2b3a8: e1a05001 mov r5, r1 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 2b3ac: 35921000 ldrcc r1, [r2] 2b3b0: 31a03103 lslcc r3, r3, #2 2b3b4: 30814003 addcc r4, r1, r3 2b3b8: 23a04000 movcs r4, #0 ; 0x0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 2b3bc: e284c010 add ip, r4, #16 ; 0x10 2b3c0: e89c000f ldm ip, {r0, r1, r2, r3} int getdents( int dd_fd, char *dd_buf, int dd_len ) { 2b3c4: e24dd010 sub sp, sp, #16 ; 0x10 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 2b3c8: e88d000f stm sp, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 2b3cc: e5923010 ldr r3, [r2, #16] 2b3d0: e3530000 cmp r3, #0 ; 0x0 2b3d4: 0a000014 beq 2b42c rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 2b3d8: e1a0000d mov r0, sp 2b3dc: e1a0e00f mov lr, pc 2b3e0: e12fff13 bx r3 2b3e4: e3500001 cmp r0, #1 ; 0x1 2b3e8: 1a00000a bne 2b418 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 2b3ec: e5943030 ldr r3, [r4, #48] 2b3f0: e5933008 ldr r3, [r3, #8] 2b3f4: e3530000 cmp r3, #0 ; 0x0 2b3f8: 0a00000b beq 2b42c rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 2b3fc: e1a00004 mov r0, r4 2b400: e1a01005 mov r1, r5 2b404: e1a02006 mov r2, r6 2b408: e1a0e00f mov lr, pc 2b40c: e12fff13 bx r3 } 2b410: e28dd010 add sp, sp, #16 ; 0x10 2b414: 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 ); 2b418: eb0009c4 bl 2db30 <__errno> 2b41c: e3a03014 mov r3, #20 ; 0x14 2b420: e5803000 str r3, [r0] 2b424: e3e00000 mvn r0, #0 ; 0x0 2b428: eafffff8 b 2b410 * 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 ); 2b42c: eb0009bf bl 2db30 <__errno> <== NOT EXECUTED 2b430: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2b434: e5803000 str r3, [r0] <== NOT EXECUTED 2b438: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2b43c: eafffff3 b 2b410 <== NOT EXECUTED 2b440: 0003f784 .word 0x0003f784 2b444: 0005a58c .word 0x0005a58c 0001e7a4 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 1e7a4: e59f3008 ldr r3, [pc, #8] ; 1e7b4 <== NOT EXECUTED 1e7a8: e5932000 ldr r2, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 1e7ac: e1d202bc ldrh r0, [r2, #44] <== NOT EXECUTED 1e7b0: e12fff1e bx lr <== NOT EXECUTED 1e7b4: 000402b8 .word 0x000402b8 0001ee14 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 1ee14: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 1ee18: e59d801c ldr r8, [sp, #28] <== NOT EXECUTED 1ee1c: e1a06000 mov r6, r0 <== NOT EXECUTED 1ee20: e1a0a001 mov sl, r1 <== NOT EXECUTED 1ee24: e1a04002 mov r4, r2 <== NOT EXECUTED 1ee28: e1a07003 mov r7, r3 <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 1ee2c: ebffffb2 bl 1ecfc <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 1ee30: e59f00b0 ldr r0, [pc, #176] ; 1eee8 <== NOT EXECUTED 1ee34: e59f10b0 ldr r1, [pc, #176] ; 1eeec <== NOT EXECUTED 1ee38: eb003d80 bl 2e440 <== NOT EXECUTED 1ee3c: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 1ee40: 1a000006 bne 1ee60 <== NOT EXECUTED 1ee44: ea000022 b 1eed4 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 1ee48: e5940000 ldr r0, [r4] <== NOT EXECUTED 1ee4c: eb004fa6 bl 32cec <== NOT EXECUTED 1ee50: e2700001 rsbs r0, r0, #1 ; 0x1 <== NOT EXECUTED 1ee54: 33a00000 movcc r0, #0 ; 0x0 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); } if (match) { 1ee58: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1ee5c: 1a00000f bne 1eea0 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 1ee60: e1a01004 mov r1, r4 <== NOT EXECUTED 1ee64: e1a02007 mov r2, r7 <== NOT EXECUTED 1ee68: e1a03008 mov r3, r8 <== NOT EXECUTED 1ee6c: e1a00005 mov r0, r5 <== NOT EXECUTED 1ee70: ebfffede bl 1e9f0 <== NOT EXECUTED 1ee74: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 1ee78: e1a01006 mov r1, r6 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 1ee7c: 0a00000d beq 1eeb8 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 1ee80: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 1ee84: 1affffef bne 1ee48 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 1ee88: e1d430b8 ldrh r3, [r4, #8] <== NOT EXECUTED 1ee8c: e153000a cmp r3, sl <== NOT EXECUTED 1ee90: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 1ee94: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED } if (match) { 1ee98: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1ee9c: 0affffef beq 1ee60 <== NOT EXECUTED fclose(fp); 1eea0: e1a00005 mov r0, r5 <== NOT EXECUTED 1eea4: eb003b72 bl 2dc74 <== NOT EXECUTED *result = grp; 1eea8: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 1eeac: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1eeb0: e5834000 str r4, [r3] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 1eeb4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 1eeb8: eb003b1c bl 2db30 <__errno> <== NOT EXECUTED 1eebc: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1eec0: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 1eec4: e1a00005 mov r0, r5 <== NOT EXECUTED 1eec8: eb003b69 bl 2dc74 <== NOT EXECUTED 1eecc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1eed0: 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; 1eed4: eb003b15 bl 2db30 <__errno> <== NOT EXECUTED 1eed8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1eedc: e5803000 str r3, [r0] <== NOT EXECUTED 1eee0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1eee4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 1eee8: 00045354 .word 0x00045354 1eeec: 000462f8 .word 0x000462f8 0001eb48 : return p; } struct group *getgrent() { if (group_fp == NULL) 1eb48: e59f3030 ldr r3, [pc, #48] ; 1eb80 <== NOT EXECUTED 1eb4c: e5930000 ldr r0, [r3] <== NOT EXECUTED 1eb50: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; } struct group *getgrent() { 1eb54: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if (group_fp == NULL) 1eb58: 0a000006 beq 1eb78 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 1eb5c: e59f1020 ldr r1, [pc, #32] ; 1eb84 <== NOT EXECUTED 1eb60: e59f2020 ldr r2, [pc, #32] ; 1eb88 <== NOT EXECUTED 1eb64: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1eb68: ebffffa0 bl 1e9f0 <== NOT EXECUTED 1eb6c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1eb70: 159f000c ldrne r0, [pc, #12] ; 1eb84 <== NOT EXECUTED 1eb74: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED 1eb78: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return &grent; } 1eb7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1eb80: 00059d84 .word 0x00059d84 1eb84: 00059e50 .word 0x00059e50 1eb88: 00059d88 .word 0x00059d88 0001ef2c : struct group *getgrgid( gid_t gid ) { 1ef2c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1ef30: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED 1ef34: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 1ef38: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 1ef3c: e59f1024 ldr r1, [pc, #36] ; 1ef68 <== NOT EXECUTED 1ef40: e59f2024 ldr r2, [pc, #36] ; 1ef6c <== NOT EXECUTED 1ef44: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1ef48: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 1ef4c: e58dc000 str ip, [sp] <== NOT EXECUTED 1ef50: ebffffe6 bl 1eef0 <== NOT EXECUTED 1ef54: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1ef58: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 1ef5c: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 1ef60: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1ef64: e8bd8000 pop {pc} <== NOT EXECUTED 1ef68: 00059e50 .word 0x00059e50 1ef6c: 00059d88 .word 0x00059d88 0001eef0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 1eef0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1eef4: e1a0c001 mov ip, r1 <== NOT EXECUTED 1eef8: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 1eefc: e1a0e002 mov lr, r2 <== NOT EXECUTED 1ef00: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 1ef04: e1a0200c mov r2, ip <== NOT EXECUTED 1ef08: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 1ef0c: e58d3000 str r3, [sp] <== NOT EXECUTED 1ef10: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 1ef14: e1a0300e mov r3, lr <== NOT EXECUTED 1ef18: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1ef1c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 1ef20: ebffffbb bl 1ee14 <== NOT EXECUTED } 1ef24: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1ef28: e8bd8000 pop {pc} <== NOT EXECUTED 0001efa0 : struct group *getgrnam( const char *name ) { 1efa0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1efa4: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 1efa8: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 1efac: e59f1020 ldr r1, [pc, #32] ; 1efd4 <== NOT EXECUTED 1efb0: e59f2020 ldr r2, [pc, #32] ; 1efd8 <== NOT EXECUTED 1efb4: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1efb8: e58dc000 str ip, [sp] <== NOT EXECUTED 1efbc: ebffffeb bl 1ef70 <== NOT EXECUTED 1efc0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1efc4: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 1efc8: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 1efcc: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1efd0: e8bd8000 pop {pc} <== NOT EXECUTED 1efd4: 00059e50 .word 0x00059e50 1efd8: 00059d88 .word 0x00059d88 0001ef70 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 1ef70: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1ef74: e1a0c002 mov ip, r2 <== NOT EXECUTED 1ef78: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 1ef7c: e58d3000 str r3, [sp] <== NOT EXECUTED 1ef80: e1a0300c mov r3, ip <== NOT EXECUTED 1ef84: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 1ef88: e1a02001 mov r2, r1 <== NOT EXECUTED 1ef8c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1ef90: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 1ef94: ebffff9e bl 1ee14 <== NOT EXECUTED } 1ef98: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1ef9c: e8bd8000 pop {pc} <== NOT EXECUTED 0001f014 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 1f014: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 1f018: e59d801c ldr r8, [sp, #28] <== NOT EXECUTED 1f01c: e1a06000 mov r6, r0 <== NOT EXECUTED 1f020: e1a0a001 mov sl, r1 <== NOT EXECUTED 1f024: e1a04002 mov r4, r2 <== NOT EXECUTED 1f028: e1a07003 mov r7, r3 <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 1f02c: ebffff32 bl 1ecfc <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 1f030: e59f00b0 ldr r0, [pc, #176] ; 1f0e8 <== NOT EXECUTED 1f034: e59f10b0 ldr r1, [pc, #176] ; 1f0ec <== NOT EXECUTED 1f038: eb003d00 bl 2e440 <== NOT EXECUTED 1f03c: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 1f040: 1a000006 bne 1f060 <== NOT EXECUTED 1f044: ea000022 b 1f0d4 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 1f048: e5940000 ldr r0, [r4] <== NOT EXECUTED 1f04c: eb004f26 bl 32cec <== NOT EXECUTED 1f050: e2700001 rsbs r0, r0, #1 ; 0x1 <== NOT EXECUTED 1f054: 33a00000 movcc r0, #0 ; 0x0 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); } if (match) { 1f058: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1f05c: 1a00000f bne 1f0a0 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 1f060: e1a01004 mov r1, r4 <== NOT EXECUTED 1f064: e1a02007 mov r2, r7 <== NOT EXECUTED 1f068: e1a03008 mov r3, r8 <== NOT EXECUTED 1f06c: e1a00005 mov r0, r5 <== NOT EXECUTED 1f070: ebfffec5 bl 1eb8c <== NOT EXECUTED 1f074: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 1f078: e1a01006 mov r1, r6 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 1f07c: 0a00000d beq 1f0b8 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 1f080: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 1f084: 1affffef bne 1f048 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 1f088: e1d430b8 ldrh r3, [r4, #8] <== NOT EXECUTED 1f08c: e153000a cmp r3, sl <== NOT EXECUTED 1f090: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 1f094: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED } if (match) { 1f098: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1f09c: 0affffef beq 1f060 <== NOT EXECUTED fclose(fp); 1f0a0: e1a00005 mov r0, r5 <== NOT EXECUTED 1f0a4: eb003af2 bl 2dc74 <== NOT EXECUTED *result = pwd; 1f0a8: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 1f0ac: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1f0b0: e5834000 str r4, [r3] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 1f0b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 1f0b8: eb003a9c bl 2db30 <__errno> <== NOT EXECUTED 1f0bc: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1f0c0: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 1f0c4: e1a00005 mov r0, r5 <== NOT EXECUTED 1f0c8: eb003ae9 bl 2dc74 <== NOT EXECUTED 1f0cc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1f0d0: 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; 1f0d4: eb003a95 bl 2db30 <__errno> <== NOT EXECUTED 1f0d8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1f0dc: e5803000 str r3, [r0] <== NOT EXECUTED 1f0e0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1f0e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 1f0e8: 000452e0 .word 0x000452e0 1f0ec: 000462f8 .word 0x000462f8 0001ecb8 : return p; } struct passwd *getpwent() { if (passwd_fp == NULL) 1ecb8: e59f3030 ldr r3, [pc, #48] ; 1ecf0 <== NOT EXECUTED 1ecbc: e5930000 ldr r0, [r3] <== NOT EXECUTED 1ecc0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; } struct passwd *getpwent() { 1ecc4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if (passwd_fp == NULL) 1ecc8: 0a000006 beq 1ece8 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 1eccc: e59f1020 ldr r1, [pc, #32] ; 1ecf4 <== NOT EXECUTED 1ecd0: e59f2020 ldr r2, [pc, #32] ; 1ecf8 <== NOT EXECUTED 1ecd4: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1ecd8: ebffffab bl 1eb8c <== NOT EXECUTED 1ecdc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1ece0: 159f000c ldrne r0, [pc, #12] ; 1ecf4 <== NOT EXECUTED 1ece4: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED 1ece8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return &pwent; } 1ecec: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1ecf0: 00059c9c .word 0x00059c9c 1ecf4: 00059d68 .word 0x00059d68 1ecf8: 00059ca0 .word 0x00059ca0 0001f1a0 : struct passwd *getpwnam( const char *name ) { 1f1a0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1f1a4: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 1f1a8: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 1f1ac: e59f1020 ldr r1, [pc, #32] ; 1f1d4 <== NOT EXECUTED 1f1b0: e59f2020 ldr r2, [pc, #32] ; 1f1d8 <== NOT EXECUTED 1f1b4: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1f1b8: e58dc000 str ip, [sp] <== NOT EXECUTED 1f1bc: ebffffeb bl 1f170 <== NOT EXECUTED 1f1c0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1f1c4: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 1f1c8: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 1f1cc: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1f1d0: e8bd8000 pop {pc} <== NOT EXECUTED 1f1d4: 00059d68 .word 0x00059d68 1f1d8: 00059ca0 .word 0x00059ca0 0001f170 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 1f170: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1f174: e1a0c002 mov ip, r2 <== NOT EXECUTED 1f178: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 1f17c: e58d3000 str r3, [sp] <== NOT EXECUTED 1f180: e1a0300c mov r3, ip <== NOT EXECUTED 1f184: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 1f188: e1a02001 mov r2, r1 <== NOT EXECUTED 1f18c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1f190: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 1f194: ebffff9e bl 1f014 <== NOT EXECUTED } 1f198: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1f19c: e8bd8000 pop {pc} <== NOT EXECUTED 0001f12c : struct passwd *getpwuid( uid_t uid ) { 1f12c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1f130: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED 1f134: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 1f138: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 1f13c: e59f1024 ldr r1, [pc, #36] ; 1f168 <== NOT EXECUTED 1f140: e59f2024 ldr r2, [pc, #36] ; 1f16c <== NOT EXECUTED 1f144: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1f148: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 1f14c: e58dc000 str ip, [sp] <== NOT EXECUTED 1f150: ebffffe6 bl 1f0f0 <== NOT EXECUTED 1f154: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1f158: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 1f15c: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 1f160: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1f164: e8bd8000 pop {pc} <== NOT EXECUTED 1f168: 00059d68 .word 0x00059d68 1f16c: 00059ca0 .word 0x00059ca0 0001f0f0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 1f0f0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1f0f4: e1a0c001 mov ip, r1 <== NOT EXECUTED 1f0f8: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 1f0fc: e1a0e002 mov lr, r2 <== NOT EXECUTED 1f100: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 1f104: e1a0200c mov r2, ip <== NOT EXECUTED 1f108: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 1f10c: e58d3000 str r3, [sp] <== NOT EXECUTED 1f110: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 1f114: e1a0300e mov r3, lr <== NOT EXECUTED 1f118: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1f11c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 1f120: ebffffbb bl 1f014 <== NOT EXECUTED } 1f124: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1f128: e8bd8000 pop {pc} <== NOT EXECUTED 000091e8 : int gettimeofday( struct timeval *tp, void * __tz ) { 91e8: e92d4030 push {r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 91ec: e2505000 subs r5, r0, #0 ; 0x0 int gettimeofday( struct timeval *tp, void * __tz ) { 91f0: e24dd008 sub sp, sp, #8 ; 0x8 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 91f4: 0a00000f beq 9238 ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 91f8: e10f4000 mrs r4, CPSR 91fc: e38430c0 orr r3, r4, #192 ; 0xc0 9200: e129f003 msr CPSR_fc, r3 _TOD_Get( &now ); 9204: e1a0000d mov r0, sp 9208: ebfff128 bl 56b0 <_TOD_Get> _ISR_Enable(level); 920c: e129f004 msr CPSR_fc, r4 time->tv_sec = now.tv_sec; 9210: e59d3000 ldr r3, [sp] 9214: e5853000 str r3, [r5] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 9218: e59d2004 ldr r2, [sp, #4] 921c: e59f1028 ldr r1, [pc, #40] ; 924c 9220: e0830291 umull r0, r3, r1, r2 9224: e1a03323 lsr r3, r3, #6 9228: e5853004 str r3, [r5, #4] 922c: e3a00000 mov r0, #0 ; 0x0 * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 9230: e28dd008 add sp, sp, #8 ; 0x8 9234: e8bd8030 pop {r4, r5, pc} void * __tz ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 9238: eb000b50 bl bf80 <__errno> <== NOT EXECUTED 923c: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 9240: e5803000 str r3, [r0] <== NOT EXECUTED 9244: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 9248: eafffff8 b 9230 <== NOT EXECUTED 924c: 10624dd3 .word 0x10624dd3 00004070 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 4070: e59f3008 ldr r3, [pc, #8] ; 4080 <== NOT EXECUTED 4074: e5932000 ldr r2, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 4078: e1d202ba ldrh r0, [r2, #42] <== NOT EXECUTED 407c: e12fff1e bx lr <== NOT EXECUTED 4080: 000402b8 .word 0x000402b8 0002ad20 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2ad20: 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; 2ad24: e590302c ldr r3, [r0, #44] */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2ad28: e5936050 ldr r6, [r3, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2ad2c: e2833054 add r3, r3, #84 ; 0x54 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2ad30: e24ddf46 sub sp, sp, #280 ; 0x118 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 ) ) 2ad34: e1560003 cmp r6, r3 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2ad38: e58d1000 str r1, [sp] 2ad3c: e1a08000 mov r8, r0 2ad40: e58d3008 str r3, [sp, #8] 2ad44: 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 ) ) 2ad48: 0a00003b beq 2ae3c 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); 2ad4c: e59f30f0 ldr r3, [pc, #240] ; 2ae44 2ad50: e0820193 umull r0, r2, r3, r1 2ad54: e1a021a2 lsr r2, r2, #3 2ad58: e1a03102 lsl r3, r2, #2 2ad5c: e1a01302 lsl r1, r2, #6 2ad60: e0833001 add r3, r3, r1 2ad64: e0623003 rsb r3, r2, r3 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 2ad68: e5982008 ldr r2, [r8, #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); 2ad6c: e1a03103 lsl r3, r3, #2 2ad70: e083b002 add fp, r3, r2 /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 2ad74: e35b0000 cmp fp, #0 ; 0x0 2ad78: c3a07000 movgt r7, #0 ; 0x0 } 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 ); 2ad7c: c3a094bf movgt r9, #-1090519040 ; 0xbf000000 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 2ad80: c3e0ac01 mvngt sl, #256 ; 0x100 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 2ad84: e58d2004 str r2, [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 ); 2ad88: c1a09b49 asrgt r9, r9, #22 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 2ad8c: c24aa001 subgt sl, sl, #1 ; 0x1 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; 2ad90: c1a05007 movgt r5, r7 2ad94: ca000007 bgt 2adb8 2ad98: ea000027 b 2ae3c <== NOT EXECUTED ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2ad9c: 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; 2ada0: e15b0005 cmp fp, r5 ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 2ada4: 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; 2ada8: da000020 ble 2ae30 current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 2adac: e59d3008 ldr r3, [sp, #8] 2adb0: e1560003 cmp r6, r3 2adb4: 0a00001d beq 2ae30 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 2adb8: e59d0004 ldr r0, [sp, #4] 2adbc: e1500005 cmp r0, r5 2adc0: cafffff5 bgt 2ad9c /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 2adc4: e58d5010 str r5, [sp, #16] tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 2adc8: e5963038 ldr r3, [r6, #56] tmp_dirent.d_namlen = strlen( the_jnode->name ); 2adcc: 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 ); 2add0: e28d2f46 add r2, sp, #280 ; 0x118 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 2add4: e58d300c str r3, [sp, #12] } 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 ); 2add8: e3a03f43 mov r3, #268 ; 0x10c 2addc: e18230b9 strh r3, [r2, r9] the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 2ade0: e1a00004 mov r0, r4 2ade4: eb0021e7 bl 33588 2ade8: e28d2f46 add r2, sp, #280 ; 0x118 2adec: e18200ba strh r0, [r2, sl] strcpy( tmp_dirent.d_name, the_jnode->name ); 2adf0: e1a01004 mov r1, r4 2adf4: e28d0018 add r0, sp, #24 ; 0x18 2adf8: eb001ff5 bl 32dd4 memcpy( 2adfc: e59d3000 ldr r3, [sp] 2ae00: e28d100c add r1, sp, #12 ; 0xc 2ae04: e0830007 add r0, r3, r7 2ae08: e3a02f43 mov r2, #268 ; 0x10c 2ae0c: eb0014bf bl 30110 buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 2ae10: e5983008 ldr r3, [r8, #8] ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2ae14: e2855f43 add r5, r5, #268 ; 0x10c memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 2ae18: 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; 2ae1c: e15b0005 cmp fp, r5 buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 2ae20: e2877f43 add r7, r7, #268 ; 0x10c memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 2ae24: e5883008 str r3, [r8, #8] bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 2ae28: 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; 2ae2c: caffffde bgt 2adac the_node = the_node->next; } /* Success */ return bytes_transferred; } 2ae30: e1a00007 mov r0, r7 2ae34: e28ddf46 add sp, sp, #280 ; 0x118 2ae38: 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; 2ae3c: e3a07000 mov r7, #0 ; 0x0 2ae40: eafffffa b 2ae30 2ae44: 07a44c6b .word 0x07a44c6b 0001ecfc : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 1ecfc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 1ed00: e59f20b4 ldr r2, [pc, #180] ; 1edbc <== NOT EXECUTED 1ed04: e5d23000 ldrb r3, [r2] <== NOT EXECUTED 1ed08: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ed0c: 18bd8030 popne {r4, r5, pc} <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 1ed10: e3a01f7f mov r1, #508 ; 0x1fc <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 1ed14: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED mkdir("/etc", 0777); 1ed18: e2811003 add r1, r1, #3 ; 0x3 <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 1ed1c: e5c24000 strb r4, [r2] <== NOT EXECUTED mkdir("/etc", 0777); 1ed20: e59f0098 ldr r0, [pc, #152] ; 1edc0 <== NOT EXECUTED 1ed24: ebff96aa bl 47d4 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 1ed28: e59f0094 ldr r0, [pc, #148] ; 1edc4 <== NOT EXECUTED 1ed2c: e59f1094 ldr r1, [pc, #148] ; 1edc8 <== NOT EXECUTED 1ed30: eb003dc2 bl 2e440 <== NOT EXECUTED 1ed34: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1ed38: 0a000007 beq 1ed5c <== 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); 1ed3c: eb003bcc bl 2dc74 <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 1ed40: e59f0084 ldr r0, [pc, #132] ; 1edcc <== NOT EXECUTED 1ed44: e59f107c ldr r1, [pc, #124] ; 1edc8 <== NOT EXECUTED 1ed48: eb003dbc bl 2e440 <== NOT EXECUTED 1ed4c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1ed50: 0a00000d beq 1ed8c <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 1ed54: 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); 1ed58: ea003bc5 b 2dc74 <== NOT EXECUTED * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 1ed5c: e59f0060 ldr r0, [pc, #96] ; 1edc4 <== NOT EXECUTED 1ed60: e59f1068 ldr r1, [pc, #104] ; 1edd0 <== NOT EXECUTED 1ed64: eb003db5 bl 2e440 <== NOT EXECUTED 1ed68: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 1ed6c: 0afffff3 beq 1ed40 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 1ed70: e1a01004 mov r1, r4 <== NOT EXECUTED 1ed74: e59f0058 ldr r0, [pc, #88] ; 1edd4 <== NOT EXECUTED 1ed78: e3a02066 mov r2, #102 ; 0x66 <== NOT EXECUTED 1ed7c: e1a03005 mov r3, r5 <== NOT EXECUTED 1ed80: eb0040b2 bl 2f050 <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 1ed84: e1a00005 mov r0, r5 <== NOT EXECUTED 1ed88: eaffffeb b 1ed3c <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 1ed8c: e59f0038 ldr r0, [pc, #56] ; 1edcc <== NOT EXECUTED 1ed90: e59f1038 ldr r1, [pc, #56] ; 1edd0 <== NOT EXECUTED 1ed94: eb003da9 bl 2e440 <== NOT EXECUTED 1ed98: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 1ed9c: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 1eda0: e59f0030 ldr r0, [pc, #48] ; 1edd8 <== NOT EXECUTED 1eda4: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 1eda8: e3a0202a mov r2, #42 ; 0x2a <== NOT EXECUTED 1edac: e1a03004 mov r3, r4 <== NOT EXECUTED 1edb0: eb0040a6 bl 2f050 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 1edb4: e1a00004 mov r0, r4 <== NOT EXECUTED 1edb8: eaffffe5 b 1ed54 <== NOT EXECUTED 1edbc: 00059c98 .word 0x00059c98 1edc0: 000452d8 .word 0x000452d8 1edc4: 000452e0 .word 0x000452e0 1edc8: 000462f8 .word 0x000462f8 1edcc: 00045354 .word 0x00045354 1edd0: 00043524 .word 0x00043524 1edd4: 000452ec .word 0x000452ec 1edd8: 00045360 .word 0x00045360 00015360 : int ioctl( int fd, ioctl_command_t command, ... ) { 15360: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 15364: e59f3090 ldr r3, [pc, #144] ; 153fc 15368: e5932000 ldr r2, [r3] 1536c: e1500002 cmp r0, r2 int ioctl( int fd, ioctl_command_t command, ... ) { 15370: 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 ); 15374: 2a000016 bcs 153d4 iop = rtems_libio_iop( fd ); 15378: e1a03200 lsl r3, r0, #4 1537c: e59f207c ldr r2, [pc, #124] ; 15400 15380: e0433100 sub r3, r3, r0, lsl #2 15384: e0833000 add r3, r3, r0 15388: e5921000 ldr r1, [r2] 1538c: e1a03103 lsl r3, r3, #2 15390: e0810003 add r0, r1, r3 rtems_libio_check_is_open(iop); 15394: e590200c ldr r2, [r0, #12] 15398: e3120c01 tst r2, #256 ; 0x100 1539c: 0a00000c beq 153d4 /* * Now process the ioctl(). */ if ( !iop->handlers ) 153a0: e590c030 ldr ip, [r0, #48] 153a4: e35c0000 cmp ip, #0 ; 0x0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 153a8: e59d2008 ldr r2, [sp, #8] /* * Now process the ioctl(). */ if ( !iop->handlers ) 153ac: 0a000008 beq 153d4 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 153b0: e59c3010 ldr r3, [ip, #16] 153b4: e3530000 cmp r3, #0 ; 0x0 153b8: 0a00000a beq 153e8 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 153bc: e59d1004 ldr r1, [sp, #4] 153c0: e1a0e00f mov lr, pc 153c4: e12fff13 bx r3 return rc; } 153c8: e49de004 pop {lr} ; (ldr lr, [sp], #4) 153cc: e28dd00c add sp, sp, #12 ; 0xc 153d0: e12fff1e bx lr /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 153d4: eb000310 bl 1601c <__errno> <== NOT EXECUTED 153d8: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 153dc: e5803000 str r3, [r0] <== NOT EXECUTED 153e0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 153e4: eafffff7 b 153c8 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 153e8: eb00030b bl 1601c <__errno> <== NOT EXECUTED 153ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 153f0: e5803000 str r3, [r0] <== NOT EXECUTED 153f4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 153f8: eafffff2 b 153c8 <== NOT EXECUTED 153fc: 00021664 .word 0x00021664 15400: 000270d0 .word 0x000270d0 00002c5c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2c5c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2c60: e1a05001 mov r5, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 2c64: e5911030 ldr r1, [r1, #48] <== NOT EXECUTED 2c68: e3110020 tst r1, #32 ; 0x20 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2c6c: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 2c70: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 2c74: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED 2c78: 0a000006 beq 2c98 <== NOT EXECUTED c = tolower (c); 2c7c: e59f3190 ldr r3, [pc, #400] ; 2e14 <== NOT EXECUTED 2c80: e5932000 ldr r2, [r3] <== NOT EXECUTED 2c84: e7d23004 ldrb r3, [r2, r4] <== NOT EXECUTED 2c88: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 2c8c: e1a00004 mov r0, r4 <== NOT EXECUTED 2c90: 12840020 addne r0, r4, #32 ; 0x20 <== NOT EXECUTED 2c94: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 2c98: e354000d cmp r4, #13 ; 0xd <== NOT EXECUTED 2c9c: 0a000034 beq 2d74 <== 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)) { 2ca0: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 2ca4: 0a000010 beq 2cec <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2ca8: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 2cac: 1a000011 bne 2cf8 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2cb0: e59f2160 ldr r2, [pc, #352] ; 2e18 <== NOT EXECUTED 2cb4: e5923000 ldr r3, [r2] <== NOT EXECUTED 2cb8: e5951020 ldr r1, [r5, #32] <== NOT EXECUTED 2cbc: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 2cc0: e1510003 cmp r1, r3 <== NOT EXECUTED 2cc4: aa00002c bge 2d7c <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2cc8: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 2ccc: e3130008 tst r3, #8 ; 0x8 <== NOT EXECUTED 2cd0: 1a00002f bne 2d94 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 2cd4: e595301c ldr r3, [r5, #28] <== NOT EXECUTED 2cd8: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED 2cdc: e7c34001 strb r4, [r3, r1] <== NOT EXECUTED 2ce0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2ce4: e5852020 str r2, [r5, #32] <== NOT EXECUTED 2ce8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2cec: e3110040 tst r1, #64 ; 0x40 <== NOT EXECUTED 2cf0: 03a0400a moveq r4, #10 ; 0xa <== NOT EXECUTED 2cf4: 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)) { 2cf8: e595203c ldr r2, [r5, #60] <== NOT EXECUTED 2cfc: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED 2d00: 0affffea beq 2cb0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 2d04: e5d53043 ldrb r3, [r5, #67] <== NOT EXECUTED 2d08: e1530004 cmp r3, r4 <== NOT EXECUTED 2d0c: 0a000036 beq 2dec <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2d10: e5d53044 ldrb r3, [r5, #68] <== NOT EXECUTED 2d14: e1530004 cmp r3, r4 <== NOT EXECUTED 2d18: 0a000038 beq 2e00 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2d1c: e5d53045 ldrb r3, [r5, #69] <== NOT EXECUTED 2d20: e1530004 cmp r3, r4 <== NOT EXECUTED 2d24: 0a00002e beq 2de4 <== NOT EXECUTED return 1; } else if (c == '\n') { 2d28: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 2d2c: 0a000022 beq 2dbc <== 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]) 2d30: e5d5304c ldrb r3, [r5, #76] <== NOT EXECUTED 2d34: e1530004 cmp r3, r4 <== NOT EXECUTED 2d38: 0a000002 beq 2d48 <== NOT EXECUTED 2d3c: e5d53051 ldrb r3, [r5, #81] <== NOT EXECUTED 2d40: e1530004 cmp r3, r4 <== NOT EXECUTED 2d44: 1affffd9 bne 2cb0 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 2d48: e3120008 tst r2, #8 ; 0x8 <== NOT EXECUTED echo (c, tty); 2d4c: 11a00004 movne r0, r4 <== NOT EXECUTED 2d50: 11a01005 movne r1, r5 <== NOT EXECUTED 2d54: 1bffff27 blne 29f8 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2d58: e285201c add r2, r5, #28 ; 0x1c <== NOT EXECUTED 2d5c: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 2d60: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED 2d64: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED 2d68: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2d6c: e5851020 str r1, [r5, #32] <== NOT EXECUTED 2d70: 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) 2d74: e3110080 tst r1, #128 ; 0x80 <== NOT EXECUTED 2d78: 0a000001 beq 2d84 <== 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; 2d7c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } return 0; } 2d80: 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) 2d84: e3110c01 tst r1, #256 ; 0x100 <== NOT EXECUTED 2d88: 03a0400d moveq r4, #13 ; 0xd <== NOT EXECUTED 2d8c: 13a0400a movne r4, #10 ; 0xa <== NOT EXECUTED 2d90: eaffffd8 b 2cf8 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 2d94: e1a00004 mov r0, r4 <== NOT EXECUTED 2d98: e1a01005 mov r1, r5 <== NOT EXECUTED 2d9c: ebffff15 bl 29f8 <== NOT EXECUTED 2da0: e5951020 ldr r1, [r5, #32] <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2da4: e595301c ldr r3, [r5, #28] <== NOT EXECUTED 2da8: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED 2dac: e7c34001 strb r4, [r3, r1] <== NOT EXECUTED 2db0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2db4: e5852020 str r2, [r5, #32] <== NOT EXECUTED 2db8: 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)) 2dbc: e3120048 tst r2, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 2dc0: 11a00004 movne r0, r4 <== NOT EXECUTED 2dc4: 11a01005 movne r1, r5 <== NOT EXECUTED 2dc8: 1bffff0a blne 29f8 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2dcc: e285101c add r1, r5, #28 ; 0x1c <== NOT EXECUTED 2dd0: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 2dd4: e2820001 add r0, r2, #1 ; 0x1 <== NOT EXECUTED 2dd8: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED 2ddc: e7c13002 strb r3, [r1, r2] <== NOT EXECUTED 2de0: e5850020 str r0, [r5, #32] <== NOT EXECUTED 2de4: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2de8: 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); 2dec: e1a00005 mov r0, r5 <== NOT EXECUTED 2df0: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2df4: ebffff20 bl 2a7c <== NOT EXECUTED 2df8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2dfc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 2e00: e1a00005 mov r0, r5 <== NOT EXECUTED 2e04: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 2e08: ebffff1b bl 2a7c <== NOT EXECUTED 2e0c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2e10: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2e14: 000156fc .word 0x000156fc 2e18: 00015650 .word 0x00015650 00021038 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 21038: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2103c: e24dd00c sub sp, sp, #12 ; 0xc 21040: e1a04000 mov r4, r0 21044: e1a05001 mov r5, r1 21048: e1a06002 mov r6, r2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 2104c: ebffff2c bl 20d04 21050: e1500004 cmp r0, r4 21054: 1a0000a5 bne 212f0 /* * Validate the signal passed. */ if ( !sig ) 21058: e3550000 cmp r5, #0 ; 0x0 2105c: 0a0000a8 beq 21304 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 21060: e2450001 sub r0, r5, #1 ; 0x1 21064: e350001f cmp r0, #31 ; 0x1f 21068: 8a0000a5 bhi 21304 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 2106c: e59f22b8 ldr r2, [pc, #696] ; 2132c 21070: e1a0b105 lsl fp, r5, #2 21074: e1a09205 lsl r9, r5, #4 21078: e06b3009 rsb r3, fp, r9 2107c: e0823003 add r3, r2, r3 21080: e5932008 ldr r2, [r3, #8] 21084: e3520001 cmp r2, #1 ; 0x1 21088: 0a00003c beq 21180 * 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 ) ) 2108c: e3550004 cmp r5, #4 ; 0x4 21090: 13550008 cmpne r5, #8 ; 0x8 21094: 0a00003b beq 21188 21098: e355000b cmp r5, #11 ; 0xb 2109c: 0a000039 beq 21188 return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 210a0: e3a03001 mov r3, #1 ; 0x1 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 210a4: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 210a8: e58d5000 str r5, [sp] siginfo->si_code = SI_USER; if ( !value ) { 210ac: e3560000 cmp r6, #0 ; 0x0 */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 210b0: e1a04013 lsl r4, r3, r0 210b4: e59f2274 ldr r2, [pc, #628] ; 21330 siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 210b8: 15963000 ldrne r3, [r6] 210bc: 158d3008 strne r3, [sp, #8] 210c0: e5923000 ldr r3, [r2] 210c4: e2833001 add r3, r3, #1 ; 0x1 siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 210c8: 058d6008 streq r6, [sp, #8] 210cc: 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; 210d0: e59f325c ldr r3, [pc, #604] ; 21334 210d4: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 210d8: e5902108 ldr r2, [r0, #264] 210dc: e59230c4 ldr r3, [r2, #196] 210e0: e1d43003 bics r3, r4, r3 210e4: 1a000016 bne 21144 goto process_it; 210e8: e59fc248 ldr ip, [pc, #584] ; 21338 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 210ec: e28ce030 add lr, ip, #48 ; 0x30 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 210f0: e1a0100c mov r1, ip 210f4: e4912004 ldr r2, [r1], #4 !_Chain_Is_tail( the_chain, the_node ) ; 210f8: e1520001 cmp r2, r1 210fc: 0a000036 beq 211dc 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)) { 21100: e5923030 ldr r3, [r2, #48] 21104: 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; 21108: e1a00002 mov r0, r2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2110c: e5923108 ldr r3, [r2, #264] if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 21110: 0a000008 beq 21138 21114: ea00000a b 21144 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 ) { 21118: 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 ) ; 2111c: e1520001 cmp r2, r1 <== NOT EXECUTED 21120: 0a00002d beq 211dc <== NOT EXECUTED 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)) { 21124: e5923030 ldr r3, [r2, #48] <== NOT EXECUTED 21128: 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; 2112c: e1a00002 mov r0, r2 <== NOT EXECUTED api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 21130: e5923108 ldr r3, [r2, #264] <== NOT EXECUTED if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 21134: 1a000002 bne 21144 <== NOT EXECUTED 21138: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 2113c: e1d43003 bics r3, r4, r3 <== NOT EXECUTED 21140: 0afffff4 beq 21118 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 21144: e3a03001 mov r3, #1 ; 0x1 21148: 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 ) ) { 2114c: e1a01005 mov r1, r5 21150: e1a0200d mov r2, sp 21154: eb000090 bl 2139c <_POSIX_signals_Unblock_thread> 21158: e3500000 cmp r0, #0 ; 0x0 2115c: 1a00001b bne 211d0 /* * 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 ); 21160: e1a00004 mov r0, r4 21164: eb000079 bl 21350 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 21168: e59f21bc ldr r2, [pc, #444] ; 2132c 2116c: e06b5009 rsb r5, fp, r9 21170: e7923005 ldr r3, [r2, r5] 21174: e3530002 cmp r3, #2 ; 0x2 21178: 0a000007 beq 2119c psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); 2117c: ebffad41 bl c688 <_Thread_Enable_dispatch> 21180: e3a00000 mov r0, #0 ; 0x0 21184: ea000002 b 21194 * 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 ); 21188: eb00010f bl 215cc 2118c: e1a01005 mov r1, r5 21190: eb0000cf bl 214d4 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 21194: e28dd00c add sp, sp, #12 ; 0xc 21198: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 2119c: e59f0198 ldr r0, [pc, #408] ; 2133c 211a0: ebffa795 bl affc <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 211a4: e250e000 subs lr, r0, #0 ; 0x0 211a8: 0a00005a beq 21318 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 211ac: e89d0007 ldm sp, {r0, r1, r2} 211b0: e28ec008 add ip, lr, #8 ; 0x8 211b4: e88c0007 stm ip, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 211b8: e59f0180 ldr r0, [pc, #384] ; 21340 211bc: e1a0100e mov r1, lr 211c0: e0800005 add r0, r0, r5 211c4: ebffa781 bl afd0 <_Chain_Append> } _Thread_Enable_dispatch(); 211c8: ebffad2e bl c688 <_Thread_Enable_dispatch> 211cc: eaffffeb b 21180 * 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(); 211d0: ebffad2c bl c688 <_Thread_Enable_dispatch> 211d4: e3a00000 mov r0, #0 ; 0x0 211d8: eaffffed b 21194 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 211dc: e28cc00c add ip, ip, #12 ; 0xc */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 211e0: e15c000e cmp ip, lr 211e4: 1affffc1 bne 210f0 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 211e8: e59f3154 ldr r3, [pc, #340] ; 21344 211ec: e5d32000 ldrb r2, [r3] 211f0: e59f7150 ldr r7, [pc, #336] ; 21348 211f4: e2822001 add r2, r2, #1 ; 0x1 211f8: e3a0a000 mov sl, #0 ; 0x0 the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 211fc: e5973008 ldr r3, [r7, #8] 21200: e3530000 cmp r3, #0 ; 0x0 21204: 0a00002d beq 212c0 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 21208: 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 ) 2120c: e3530000 cmp r3, #0 ; 0x0 21210: 0a00002a beq 212c0 continue; maximum = the_info->maximum; 21214: e1d361b0 ldrh r6, [r3, #16] object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21218: e3560000 cmp r6, #0 ; 0x0 */ if ( !the_info ) continue; maximum = the_info->maximum; object_table = the_info->local_table; 2121c: e593001c ldr r0, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { 21220: 0a000026 beq 212c0 21224: e3a0c001 mov ip, #1 ; 0x1 the_thread = (Thread_Control *) object_table[ index ]; 21228: e790110c ldr r1, [r0, ip, lsl #2] if ( !the_thread ) 2122c: e3510000 cmp r1, #0 ; 0x0 21230: 0a000018 beq 21298 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 21234: e591e014 ldr lr, [r1, #20] 21238: e15e0002 cmp lr, r2 2123c: 8a000015 bhi 21298 /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 21240: e5913108 ldr r3, [r1, #264] if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 21244: e3530000 cmp r3, #0 ; 0x0 21248: 0a000012 beq 21298 2124c: e59330c4 ldr r3, [r3, #196] 21250: e1d43003 bics r3, r4, r3 21254: 0a00000f beq 21298 * 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 ) { 21258: e15e0002 cmp lr, r2 2125c: 3a000005 bcc 21278 * 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 ) ) 21260: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED 21264: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 21268: 0a00000a beq 21298 <== 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 ) ) { 2126c: e5918010 ldr r8, [r1, #16] <== NOT EXECUTED 21270: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 21274: 1a000017 bne 212d8 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21278: e28cc001 add ip, ip, #1 ; 0x1 2127c: 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 ) { 21280: e1a0a001 mov sl, r1 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21284: 3a000007 bcc 212a8 the_thread = (Thread_Control *) object_table[ index ]; 21288: e790110c ldr r1, [r0, ip, lsl #2] if ( !the_thread ) 2128c: e3510000 cmp r1, #0 ; 0x0 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 21290: e1a0200e mov r2, lr the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 21294: 1affffe6 bne 21234 * 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 ) { 21298: e1a0e002 mov lr, r2 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2129c: e28cc001 add ip, ip, #1 ; 0x1 212a0: e156000c cmp r6, ip 212a4: 2afffff7 bcs 21288 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 212a8: e59f309c ldr r3, [pc, #156] ; 2134c continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 212ac: 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; 212b0: e1570003 cmp r7, r3 212b4: 0a000003 beq 212c8 212b8: e1a0200e mov r2, lr 212bc: eaffffce b 211fc continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 212c0: e1a0e002 mov lr, r2 212c4: eafffff7 b 212a8 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 212c8: e35a0000 cmp sl, #0 ; 0x0 212cc: 0affffa3 beq 21160 212d0: e1a0000a mov r0, sl 212d4: eaffff9a b 21144 * 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 ) 212d8: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED 212dc: 1affffed bne 21298 <== 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 ) { 212e0: e3180201 tst r8, #268435456 ; 0x10000000 <== NOT EXECUTED 212e4: 1affffe3 bne 21278 <== NOT EXECUTED 212e8: e1a0e002 mov lr, r2 <== NOT EXECUTED 212ec: eaffffea b 2129c <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 212f0: ebffd349 bl 1601c <__errno> 212f4: e3a03003 mov r3, #3 ; 0x3 212f8: e5803000 str r3, [r0] 212fc: e3e00000 mvn r0, #0 ; 0x0 21300: eaffffa3 b 21194 if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 21304: ebffd344 bl 1601c <__errno> 21308: e3a03016 mov r3, #22 ; 0x16 2130c: e5803000 str r3, [r0] 21310: e3e00000 mvn r0, #0 ; 0x0 21314: eaffff9e b 21194 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 ); 21318: ebffd33f bl 1601c <__errno> <== NOT EXECUTED 2131c: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED 21320: e5803000 str r3, [r0] <== NOT EXECUTED 21324: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 21328: eaffff99 b 21194 <== NOT EXECUTED 2132c: 0002780c .word 0x0002780c 21330: 0002724c .word 0x0002724c 21334: 00027304 .word 0x00027304 21338: 00027998 .word 0x00027998 2133c: 0002798c .word 0x0002798c 21340: 000279dc .word 0x000279dc 21344: 00021710 .word 0x00021710 21348: 00027208 .word 0x00027208 2134c: 00027214 .word 0x00027214 0001f2b8 : int link( const char *existing, const char *new ) { 1f2b8: e92d4070 push {r4, r5, r6, lr} 1f2bc: e24dd024 sub sp, sp, #36 ; 0x24 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true ); 1f2c0: e28d6010 add r6, sp, #16 ; 0x10 int link( const char *existing, const char *new ) { 1f2c4: e1a05001 mov r5, r1 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true ); 1f2c8: e1a02006 mov r2, r6 1f2cc: e3a01000 mov r1, #0 ; 0x0 1f2d0: e3a03001 mov r3, #1 ; 0x1 1f2d4: ebff92ca bl 3e04 if ( result != 0 ) 1f2d8: e3500000 cmp r0, #0 ; 0x0 1f2dc: 1a00004d bne 1f418 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 1f2e0: e5d53000 ldrb r3, [r5] 1f2e4: e353005c cmp r3, #92 ; 0x5c 1f2e8: 1353002f cmpne r3, #47 ; 0x2f 1f2ec: 13a0e000 movne lr, #0 ; 0x0 1f2f0: 03a0e001 moveq lr, #1 ; 0x1 1f2f4: 1a000032 bne 1f3c4 1f2f8: e59f31fc ldr r3, [pc, #508] ; 1f4fc 1f2fc: e593c000 ldr ip, [r3] 1f300: e28cc014 add ip, ip, #20 ; 0x14 1f304: e89c000f ldm ip, {r0, r1, r2, r3} 1f308: e1a0400d mov r4, sp 1f30c: e88d000f stm sp, {r0, r1, r2, r3} 1f310: e3a02001 mov r2, #1 ; 0x1 if ( !parent_loc.ops->evalformake_h ) { 1f314: e59d3008 ldr r3, [sp, #8] 1f318: e5933004 ldr r3, [r3, #4] 1f31c: e3530000 cmp r3, #0 ; 0x0 1f320: 0a000031 beq 1f3ec 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 ); 1f324: e0850002 add r0, r5, r2 1f328: e1a0100d mov r1, sp 1f32c: e28d2020 add r2, sp, #32 ; 0x20 1f330: e1a0e00f mov lr, pc 1f334: e12fff13 bx r3 if ( result != 0 ) { 1f338: e2505000 subs r5, r0, #0 ; 0x0 1f33c: 1a00004c bne 1f474 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 1f340: e59d201c ldr r2, [sp, #28] 1f344: e59d300c ldr r3, [sp, #12] 1f348: e1530002 cmp r3, r2 1f34c: 1a000033 bne 1f420 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 1f350: e59d2008 ldr r2, [sp, #8] 1f354: e5923008 ldr r3, [r2, #8] 1f358: e3530000 cmp r3, #0 ; 0x0 1f35c: 0a000050 beq 1f4a4 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 ); 1f360: e1a00006 mov r0, r6 1f364: e1a0100d mov r1, sp 1f368: e59d2020 ldr r2, [sp, #32] 1f36c: e1a0e00f mov lr, pc 1f370: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 1f374: e59d3018 ldr r3, [sp, #24] 1f378: e3530000 cmp r3, #0 ; 0x0 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 ); 1f37c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 1f380: 0a000004 beq 1f398 1f384: e593301c ldr r3, [r3, #28] 1f388: e3530000 cmp r3, #0 ; 0x0 1f38c: 11a00006 movne r0, r6 1f390: 11a0e00f movne lr, pc 1f394: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 1f398: e59d3008 ldr r3, [sp, #8] 1f39c: e3530000 cmp r3, #0 ; 0x0 1f3a0: 0a000004 beq 1f3b8 1f3a4: e593301c ldr r3, [r3, #28] 1f3a8: e3530000 cmp r3, #0 ; 0x0 1f3ac: 11a0000d movne r0, sp 1f3b0: 11a0e00f movne lr, pc 1f3b4: 112fff13 bxne r3 return result; } 1f3b8: e1a00005 mov r0, r5 1f3bc: e28dd024 add sp, sp, #36 ; 0x24 1f3c0: e8bd8070 pop {r4, r5, r6, pc} /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 1f3c4: e3530000 cmp r3, #0 ; 0x0 1f3c8: 0affffca beq 1f2f8 1f3cc: e59f3128 ldr r3, [pc, #296] ; 1f4fc 1f3d0: e593c000 ldr ip, [r3] 1f3d4: e28cc004 add ip, ip, #4 ; 0x4 1f3d8: e89c000f ldm ip, {r0, r1, r2, r3} 1f3dc: e1a0400d mov r4, sp 1f3e0: e88d000f stm sp, {r0, r1, r2, r3} 1f3e4: e1a0200e mov r2, lr 1f3e8: eaffffc9 b 1f314 if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 1f3ec: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED 1f3f0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f3f4: 0a000004 beq 1f40c <== NOT EXECUTED 1f3f8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1f3fc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f400: 11a00006 movne r0, r6 <== NOT EXECUTED 1f404: 11a0e00f movne lr, pc <== NOT EXECUTED 1f408: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1f40c: eb0039c7 bl 2db30 <__errno> <== NOT EXECUTED 1f410: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1f414: e5803000 str r3, [r0] <== NOT EXECUTED 1f418: e3e05000 mvn r5, #0 ; 0x0 1f41c: eaffffe5 b 1f3b8 * 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 ); 1f420: e59d3018 ldr r3, [sp, #24] 1f424: e3530000 cmp r3, #0 ; 0x0 1f428: 0a000004 beq 1f440 1f42c: e593301c ldr r3, [r3, #28] 1f430: e3530000 cmp r3, #0 ; 0x0 1f434: 11a00006 movne r0, r6 1f438: 11a0e00f movne lr, pc 1f43c: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 1f440: e59d3008 ldr r3, [sp, #8] 1f444: e3530000 cmp r3, #0 ; 0x0 1f448: 0a000004 beq 1f460 1f44c: e593301c ldr r3, [r3, #28] 1f450: e3530000 cmp r3, #0 ; 0x0 1f454: 11a0000d movne r0, sp 1f458: 11a0e00f movne lr, pc 1f45c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 1f460: eb0039b2 bl 2db30 <__errno> 1f464: e3a03012 mov r3, #18 ; 0x12 1f468: e5803000 str r3, [r0] 1f46c: e3e05000 mvn r5, #0 ; 0x0 1f470: eaffffd0 b 1f3b8 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 ); 1f474: e59d3018 ldr r3, [sp, #24] 1f478: e3530000 cmp r3, #0 ; 0x0 1f47c: 0a000004 beq 1f494 1f480: e593301c ldr r3, [r3, #28] 1f484: e3530000 cmp r3, #0 ; 0x0 1f488: 11a00006 movne r0, r6 1f48c: 11a0e00f movne lr, pc 1f490: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 1f494: eb0039a5 bl 2db30 <__errno> 1f498: e5805000 str r5, [r0] 1f49c: e3e05000 mvn r5, #0 ; 0x0 1f4a0: eaffffc4 b 1f3b8 rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 1f4a4: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED 1f4a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f4ac: 0a000006 beq 1f4cc <== NOT EXECUTED 1f4b0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1f4b4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f4b8: 0a000003 beq 1f4cc <== NOT EXECUTED 1f4bc: e1a00006 mov r0, r6 <== NOT EXECUTED 1f4c0: e1a0e00f mov lr, pc <== NOT EXECUTED 1f4c4: e12fff13 bx r3 <== NOT EXECUTED 1f4c8: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 1f4cc: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1f4d0: 0a000004 beq 1f4e8 <== NOT EXECUTED 1f4d4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1f4d8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f4dc: 11a0000d movne r0, sp <== NOT EXECUTED 1f4e0: 11a0e00f movne lr, pc <== NOT EXECUTED 1f4e4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1f4e8: eb003990 bl 2db30 <__errno> <== NOT EXECUTED 1f4ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1f4f0: e5803000 str r3, [r0] <== NOT EXECUTED 1f4f4: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 1f4f8: eaffffae b 1f3b8 <== NOT EXECUTED 1f4fc: 000402b8 .word 0x000402b8 00014604 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 14604: e59f30e0 ldr r3, [pc, #224] ; 146ec 14608: e593c000 ldr ip, [r3] 1460c: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 14610: e92d4070 push {r4, r5, r6, lr} 14614: e1a0c002 mov ip, r2 14618: e1a0e001 mov lr, r1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 1461c: 2a000028 bcs 146c4 iop = rtems_libio_iop( fd ); 14620: e59f20c8 ldr r2, [pc, #200] ; 146f0 14624: e1a03200 lsl r3, r0, #4 14628: e0433100 sub r3, r3, r0, lsl #2 1462c: e5921000 ldr r1, [r2] 14630: e0833000 add r3, r3, r0 14634: e1a03103 lsl r3, r3, #2 14638: e0814003 add r4, r1, r3 rtems_libio_check_is_open(iop); 1463c: e594200c ldr r2, [r4, #12] 14640: e3120c01 tst r2, #256 ; 0x100 14644: 0a00001e beq 146c4 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 14648: e5945030 ldr r5, [r4, #48] 1464c: e5953014 ldr r3, [r5, #20] 14650: e3530000 cmp r3, #0 ; 0x0 14654: 0a00001f beq 146d8 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 14658: e35c0001 cmp ip, #1 ; 0x1 /* * Now process the lseek(). */ old_offset = iop->offset; 1465c: e5946008 ldr r6, [r4, #8] switch ( whence ) { 14660: 0a000014 beq 146b8 14664: e35c0002 cmp ip, #2 ; 0x2 14668: 0a000007 beq 1468c 1466c: e35c0000 cmp ip, #0 ; 0x0 case SEEK_SET: iop->offset = offset; 14670: 0584e008 streq lr, [r4, #8] /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 14674: 0a000007 beq 14698 case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 14678: ebffde40 bl bf80 <__errno> 1467c: e3a03016 mov r3, #22 ; 0x16 14680: e5803000 str r3, [r0] 14684: e3e00000 mvn r0, #0 ; 0x0 14688: e8bd8070 pop {r4, r5, r6, pc} case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 1468c: e5943004 ldr r3, [r4, #4] 14690: e08e3003 add r3, lr, r3 14694: 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 ); 14698: e1a0100e mov r1, lr 1469c: e1a0200c mov r2, ip 146a0: e1a00004 mov r0, r4 146a4: e1a0e00f mov lr, pc 146a8: e595f014 ldr pc, [r5, #20] if ( status == (off_t) -1 ) 146ac: e3700001 cmn r0, #1 ; 0x1 iop->offset = old_offset; 146b0: 05846008 streq r6, [r4, #8] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 146b4: e8bd8070 pop {r4, r5, r6, pc} case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 146b8: e08e3006 add r3, lr, r6 146bc: e5843008 str r3, [r4, #8] 146c0: eafffff4 b 14698 off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 146c4: ebffde2d bl bf80 <__errno> <== NOT EXECUTED 146c8: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 146cc: e5803000 str r3, [r0] <== NOT EXECUTED 146d0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 146d4: e8bd8070 pop {r4, r5, r6, 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 ); 146d8: ebffde28 bl bf80 <__errno> <== NOT EXECUTED 146dc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 146e0: e5803000 str r3, [r0] <== NOT EXECUTED 146e4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 146e8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 146ec: 00015094 .word 0x00015094 146f0: 00016d90 .word 0x00016d90 0001f60c : int _STAT_NAME( const char *path, struct stat *buf ) { 1f60c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 1f610: e2514000 subs r4, r1, #0 ; 0x0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 1f614: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 1f618: 0a00002c beq 1f6d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 1f61c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1f620: e1a0200d mov r2, sp <== NOT EXECUTED 1f624: e1a03001 mov r3, r1 <== NOT EXECUTED 1f628: ebff91f5 bl 3e04 <== NOT EXECUTED if ( status != 0 ) 1f62c: 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 ); 1f630: e1a0500d mov r5, sp <== NOT EXECUTED if ( status != 0 ) 1f634: 1a000023 bne 1f6c8 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 1f638: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 1f63c: e5932018 ldr r2, [r3, #24] <== NOT EXECUTED 1f640: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1f644: 0a000014 beq 1f69c <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 1f648: e1a01000 mov r1, r0 <== NOT EXECUTED 1f64c: e3a0204c mov r2, #76 ; 0x4c <== NOT EXECUTED 1f650: e1a00004 mov r0, r4 <== NOT EXECUTED 1f654: eb00433d bl 30350 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 1f658: e1a01004 mov r1, r4 <== NOT EXECUTED 1f65c: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 1f660: e1a0000d mov r0, sp <== NOT EXECUTED 1f664: e1a0e00f mov lr, pc <== NOT EXECUTED 1f668: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1f66c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1f670: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 1f674: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1f678: 0a000004 beq 1f690 <== NOT EXECUTED 1f67c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1f680: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f684: 11a0000d movne r0, sp <== NOT EXECUTED 1f688: 11a0e00f movne lr, pc <== NOT EXECUTED 1f68c: 112fff13 bxne r3 <== NOT EXECUTED return status; } 1f690: e1a00004 mov r0, r4 <== NOT EXECUTED 1f694: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 1f698: 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 ); 1f69c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1f6a0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f6a4: 0a000004 beq 1f6bc <== NOT EXECUTED 1f6a8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1f6ac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1f6b0: 11a0000d movne r0, sp <== NOT EXECUTED 1f6b4: 11a0e00f movne lr, pc <== NOT EXECUTED 1f6b8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1f6bc: eb00391b bl 2db30 <__errno> <== NOT EXECUTED 1f6c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1f6c4: e5803000 str r3, [r0] <== NOT EXECUTED 1f6c8: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 1f6cc: eaffffef b 1f690 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 1f6d0: eb003916 bl 2db30 <__errno> <== NOT EXECUTED 1f6d4: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 1f6d8: e5803000 str r3, [r0] <== NOT EXECUTED 1f6dc: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 1f6e0: eaffffea b 1f690 <== NOT EXECUTED 000095e4 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 95e4: e59f20d0 ldr r2, [pc, #208] ; 96bc 95e8: e5923004 ldr r3, [r2, #4] 95ec: e2833001 add r3, r3, #1 ; 0x1 95f0: e92d4070 push {r4, r5, r6, lr} 95f4: e5823004 str r3, [r2, #4] 95f8: e1a06000 mov r6, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 95fc: ebffffef bl 95c0 /* * Validate the parameters */ if ( !size ) 9600: e3560000 cmp r6, #0 ; 0x0 9604: 0a00001c beq 967c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 9608: e59f30b0 ldr r3, [pc, #176] ; 96c0 960c: e5932000 ldr r2, [r3] 9610: e3520003 cmp r2, #3 ; 0x3 9614: 0a000015 beq 9670 * 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 ); 9618: e59f00a4 ldr r0, [pc, #164] ; 96c4 961c: e1a01006 mov r1, r6 9620: eb00055b bl ab94 <_Protected_heap_Allocate> if ( !return_this ) { 9624: 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; 9628: 11a05004 movne r5, r4 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { 962c: 0a000015 beq 9688 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 9630: e59f3090 ldr r3, [pc, #144] ; 96c8 9634: e5933000 ldr r3, [r3] 9638: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_dirty_helper)( return_this, size ); 963c: 11a01006 movne r1, r6 9640: 11a00005 movne r0, r5 9644: 11a0e00f movne lr, pc 9648: 112fff13 bxne r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 964c: e59f3078 ldr r3, [pc, #120] ; 96cc 9650: e5933000 ldr r3, [r3] 9654: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 9658: 11a00005 movne r0, r5 965c: 11a0e00f movne lr, pc 9660: 1593f004 ldrne pc, [r3, #4] 9664: e1a04005 mov r4, r5 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 9668: e1a00004 mov r0, r4 966c: 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()) && 9670: ebffffbb bl 9564 9674: e3500000 cmp r0, #0 ; 0x0 9678: 1affffe6 bne 9618 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 967c: e3a04000 mov r4, #0 ; 0x0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 9680: e1a00004 mov r0, r4 9684: e8bd8070 pop {r4, r5, r6, pc} */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 9688: e59f3040 ldr r3, [pc, #64] ; 96d0 968c: e5933000 ldr r3, [r3] 9690: e3530000 cmp r3, #0 ; 0x0 9694: 0a000004 beq 96ac return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 9698: e1a00006 mov r0, r6 <== NOT EXECUTED 969c: e1a0e00f mov lr, pc <== NOT EXECUTED 96a0: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 96a4: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 96a8: 1affffe0 bne 9630 <== NOT EXECUTED errno = ENOMEM; 96ac: eb000a33 bl bf80 <__errno> 96b0: e3a0300c mov r3, #12 ; 0xc 96b4: e5803000 str r3, [r0] 96b8: eaffffea b 9668 96bc: 00016df4 .word 0x00016df4 96c0: 000170b4 .word 0x000170b4 96c4: 00016d9c .word 0x00016d9c 96c8: 00016bcc .word 0x00016bcc 96cc: 00016bc4 .word 0x00016bc4 96d0: 00016bc8 .word 0x00016bc8 000095b0 : } void malloc_deferred_free( void *pointer ) { 95b0: 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 ); 95b4: e59f0000 ldr r0, [pc, #0] ; 95bc <== NOT EXECUTED 95b8: eaffef3d b 52b4 <_Chain_Append> <== NOT EXECUTED 95bc: 00017448 .word 0x00017448 000095c0 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 95c0: e52de004 push {lr} ; (str lr, [sp, #-4]!) 95c4: ea000000 b 95cc /* * 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); 95c8: ebfffe95 bl 9024 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 95cc: e59f000c ldr r0, [pc, #12] ; 95e0 95d0: eb00041d bl a64c <_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) 95d4: e3500000 cmp r0, #0 ; 0x0 95d8: 1afffffa bne 95c8 free(to_be_freed); } 95dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) 95e0: 00017448 .word 0x00017448 00024d0c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 24d0c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( block_table ); 24d10: e250a000 subs sl, r0, #0 ; 0x0 void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 24d14: e1a07001 mov r7, r1 /* * Perform internal consistency checks */ assert( block_table ); 24d18: 0a000014 beq 24d70 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 24d28: e3a05000 mov r5, #0 ; 0x0 24d2c: e1a04005 mov r4, r5 if ( b[i] ) { memfile_free_block( b[i] ); b[i] = 0; 24d30: e1a08005 mov r8, r5 */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 24d40: ebffff38 bl 24a28 b[i] = 0; 24d44: 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 24d58: 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 ); 24d5c: e1a00006 mov r0, r6 24d60: ebffff30 bl 24a28 *block_table = 0; 24d64: e3a03000 mov r3, #0 ; 0x0 24d68: e58a3000 str r3, [sl] } 24d6c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Perform internal consistency checks */ assert( block_table ); 24d70: e3a01e1b mov r1, #432 ; 0x1b0 <== NOT EXECUTED 24d74: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 24d78: e59f0008 ldr r0, [pc, #8] ; 24d88 <== NOT EXECUTED 24d7c: e59f2008 ldr r2, [pc, #8] ; 24d8c <== NOT EXECUTED 24d80: e59f3008 ldr r3, [pc, #8] ; 24d90 <== NOT EXECUTED 24d84: ebffe2a9 bl 1d830 <__assert_func> <== NOT EXECUTED 24d88: 000455ac .word 0x000455ac 24d8c: 00041fe4 .word 0x00041fe4 24d90: 00045628 .word 0x00045628 000251b4 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 251b4: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 251b8: e590402c ldr r4, [r0, #44] * 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 ) 251bc: e5943050 ldr r3, [r4, #80] 251c0: e1530001 cmp r3, r1 int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 251c4: 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 ) 251c8: ba000009 blt 251f4 * 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; 251cc: e5841050 str r1, [r4, #80] iop->size = the_jnode->info.file.size; 251d0: e5801004 str r1, [r0, #4] IMFS_update_atime( the_jnode ); 251d4: e1a0000d mov r0, sp 251d8: e3a01000 mov r1, #0 ; 0x0 251dc: ebff7b85 bl 3ff8 251e0: e59d3000 ldr r3, [sp] 251e4: e5843040 str r3, [r4, #64] 251e8: e3a00000 mov r0, #0 ; 0x0 return 0; } 251ec: e28dd008 add sp, sp, #8 ; 0x8 251f0: 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 ); 251f4: e1a00004 mov r0, r4 <== NOT EXECUTED 251f8: ebffffa0 bl 25080 <== NOT EXECUTED 251fc: eafffffa b 251ec <== NOT EXECUTED 00025200 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 25200: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 25204: e590402c ldr r4, [r0, #44] if (the_jnode->type == IMFS_LINEAR_FILE) { 25208: e594304c ldr r3, [r4, #76] 2520c: e3530006 cmp r3, #6 ; 0x6 off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 25210: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 25214: 1a000005 bne 25230 if (iop->offset > the_jnode->info.linearfile.size) 25218: e5943050 ldr r3, [r4, #80] <== NOT EXECUTED 2521c: e5900008 ldr r0, [r0, #8] <== NOT EXECUTED 25220: e1500003 cmp r0, r3 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 25224: c5853008 strgt r3, [r5, #8] <== NOT EXECUTED 25228: c1a00003 movgt r0, r3 <== NOT EXECUTED 2522c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 25230: e1a00004 mov r0, r4 25234: e5951008 ldr r1, [r5, #8] 25238: ebffff90 bl 25080 2523c: e3500000 cmp r0, #0 ; 0x0 25240: 1a000003 bne 25254 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 25244: e5943050 ldr r3, [r4, #80] 25248: e5950008 ldr r0, [r5, #8] 2524c: e5853004 str r3, [r5, #4] } return iop->offset; } 25250: 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 ); 25254: eb002235 bl 2db30 <__errno> <== NOT EXECUTED 25258: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 2525c: e5803000 str r3, [r0] <== NOT EXECUTED 25260: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 25264: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 000254cc : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 254cc: e590200c ldr r2, [r0, #12] 254d0: e3120f81 tst r2, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 254d4: e92d4030 push {r4, r5, lr} 254d8: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 254dc: e590402c ldr r4, [r0, #44] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 254e0: 0a000002 beq 254f0 254e4: e594304c ldr r3, [r4, #76] 254e8: e3530006 cmp r3, #6 ; 0x6 254ec: 0a000006 beq 2550c 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) 254f0: e3120c02 tst r2, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 254f4: 15943050 ldrne r3, [r4, #80] 254f8: 15853008 strne r3, [r5, #8] iop->size = the_jnode->info.file.size; 254fc: e5943050 ldr r3, [r4, #80] 25500: e3a00000 mov r0, #0 ; 0x0 25504: e5853004 str r3, [r5, #4] return 0; } 25508: 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; 2550c: 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; 25510: 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; 25514: 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) 25518: e3500000 cmp r0, #0 ; 0x0 <== 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; 2551c: e5942054 ldr r2, [r4, #84] <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 25520: e584304c str r3, [r4, #76] <== NOT EXECUTED the_jnode->info.file.size = 0; 25524: e5841050 str r1, [r4, #80] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 25528: e5841058 str r1, [r4, #88] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 2552c: 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; 25530: e5841054 str r1, [r4, #84] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 25534: 0595200c ldreq r2, [r5, #12] <== NOT EXECUTED 25538: 0affffec beq 254f0 <== NOT EXECUTED 2553c: e1a03000 mov r3, r0 <== NOT EXECUTED 25540: e1a00004 mov r0, r4 <== NOT EXECUTED 25544: ebffff47 bl 25268 <== NOT EXECUTED 25548: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED 2554c: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED 25550: e595200c ldr r2, [r5, #12] <== NOT EXECUTED 25554: eaffffe5 b 254f0 <== NOT EXECUTED 0000167c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 167c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 1680: 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) ) ) 1684: e2111a0f ands r1, r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1688: e24dd018 sub sp, sp, #24 ; 0x18 168c: e1a06000 mov r6, r0 1690: e1a07002 mov r7, r2 1694: 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) ) ) 1698: 0a000045 beq 17b4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) 169c: e3510a01 cmp r1, #4096 ; 0x1000 16a0: 0a000032 beq 1770 rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 16a4: e5d03000 ldrb r3, [r0] 16a8: e353005c cmp r3, #92 ; 0x5c 16ac: 1353002f cmpne r3, #47 ; 0x2f 16b0: 13a0e000 movne lr, #0 ; 0x0 16b4: 03a0e001 moveq lr, #1 ; 0x1 16b8: 1a000033 bne 178c 16bc: e59f3104 ldr r3, [pc, #260] ; 17c8 16c0: e593c000 ldr ip, [r3] 16c4: e28cc014 add ip, ip, #20 ; 0x14 16c8: e89c000f ldm ip, {r0, r1, r2, r3} 16cc: e28d4004 add r4, sp, #4 ; 0x4 16d0: e884000f stm r4, {r0, r1, r2, r3} 16d4: e3a02001 mov r2, #1 ; 0x1 if ( !temp_loc.ops->evalformake_h ) { 16d8: e59d300c ldr r3, [sp, #12] 16dc: e5933004 ldr r3, [r3, #4] 16e0: e3530000 cmp r3, #0 ; 0x0 16e4: 0a000021 beq 1770 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 16e8: e0860002 add r0, r6, r2 16ec: e1a01004 mov r1, r4 16f0: e28d2014 add r2, sp, #20 ; 0x14 16f4: e1a0e00f mov lr, pc 16f8: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 16fc: e3500000 cmp r0, #0 ; 0x0 1700: 1a00001d bne 177c return -1; if ( !temp_loc.ops->mknod_h ) { 1704: e59d300c ldr r3, [sp, #12] 1708: e593c014 ldr ip, [r3, #20] 170c: e35c0000 cmp ip, #0 ; 0x0 1710: 0a000011 beq 175c 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 ); 1714: e1a01005 mov r1, r5 1718: e1a03008 mov r3, r8 171c: e58d4000 str r4, [sp] 1720: e59d0014 ldr r0, [sp, #20] 1724: e1a02007 mov r2, r7 1728: e1a0e00f mov lr, pc 172c: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 1730: e59d300c ldr r3, [sp, #12] 1734: e3530000 cmp r3, #0 ; 0x0 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 ); 1738: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 173c: 0a00000f beq 1780 1740: e593301c ldr r3, [r3, #28] 1744: e3530000 cmp r3, #0 ; 0x0 1748: 0a00000c beq 1780 174c: e1a00004 mov r0, r4 1750: e1a0e00f mov lr, pc 1754: e12fff13 bx r3 1758: ea000008 b 1780 ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 175c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1760: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1764: 11a00004 movne r0, r4 <== NOT EXECUTED 1768: 11a0e00f movne lr, pc <== NOT EXECUTED 176c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1770: eb002a02 bl bf80 <__errno> 1774: e3a03086 mov r3, #134 ; 0x86 1778: e5803000 str r3, [r0] 177c: e3e05000 mvn r5, #0 ; 0x0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 1780: e1a00005 mov r0, r5 1784: e28dd018 add sp, sp, #24 ; 0x18 1788: 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 ); 178c: e3530000 cmp r3, #0 ; 0x0 1790: 0affffc9 beq 16bc 1794: e59f302c ldr r3, [pc, #44] ; 17c8 1798: e593c000 ldr ip, [r3] 179c: e28cc004 add ip, ip, #4 ; 0x4 17a0: e89c000f ldm ip, {r0, r1, r2, r3} 17a4: e28d4004 add r4, sp, #4 ; 0x4 17a8: e884000f stm r4, {r0, r1, r2, r3} 17ac: e1a0200e mov r2, lr 17b0: eaffffc8 b 16d8 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 ); 17b4: eb0029f1 bl bf80 <__errno> <== NOT EXECUTED 17b8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 17bc: e5803000 str r3, [r0] <== NOT EXECUTED 17c0: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 17c4: eaffffed b 1780 <== NOT EXECUTED 17c8: 00015668 .word 0x00015668 00009700 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 9700: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 9704: 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 ) { 9708: e24dd010 sub sp, sp, #16 ; 0x10 970c: e1a09000 mov r9, r0 9710: e1a07002 mov r7, r2 9714: e1a05003 mov r5, r3 9718: e59d6030 ldr r6, [sp, #48] /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 971c: 0a000093 beq 9970 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 9720: e3520001 cmp r2, #1 ; 0x1 9724: 8a000091 bhi 9970 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 9728: e59a4024 ldr r4, [sl, #36] 972c: e3540000 cmp r4, #0 ; 0x0 9730: 0a000032 beq 9800 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 9734: e3530000 cmp r3, #0 ; 0x0 9738: 03a00064 moveq r0, #100 ; 0x64 973c: 0a000002 beq 974c size += strlen( device ) + 1; 9740: e1a00003 mov r0, r3 <== NOT EXECUTED 9744: eb000f43 bl d458 <== NOT EXECUTED 9748: e2800065 add r0, r0, #101 ; 0x65 <== NOT EXECUTED temp_mt_entry = malloc( size ); 974c: ebffffa4 bl 95e4 if ( !temp_mt_entry ) { 9750: e3500000 cmp r0, #0 ; 0x0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 9754: e1a04000 mov r4, r0 9758: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 975c: 0a000088 beq 9984 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 9760: 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; 9764: e5807028 str r7, [r0, #40] if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 9768: 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; 976c: 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 ) { 9770: 0a000004 beq 9788 temp_mt_entry->dev = 9774: 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 ); 9778: e1a00003 mov r0, r3 <== NOT EXECUTED 977c: 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 = 9780: e5843060 str r3, [r4, #96] <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 9784: eb000f05 bl d3a0 <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 9788: e3560000 cmp r6, #0 ; 0x0 978c: 0a000024 beq 9824 if ( rtems_filesystem_evaluate_path( 9790: e1a00006 mov r0, r6 9794: e3a01007 mov r1, #7 ; 0x7 9798: e1a0200d mov r2, sp 979c: e3a03001 mov r3, #1 ; 0x1 97a0: ebffdefb bl 1394 97a4: e3700001 cmn r0, #1 ; 0x1 97a8: e1a0500d mov r5, sp 97ac: 0a000017 beq 9810 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 97b0: e59d3008 ldr r3, [sp, #8] 97b4: e5933010 ldr r3, [r3, #16] 97b8: e3530000 cmp r3, #0 ; 0x0 97bc: 0a00005d beq 9938 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 97c0: e1a0000d mov r0, sp 97c4: e1a0e00f mov lr, pc 97c8: e12fff13 bx r3 97cc: e3500001 cmp r0, #1 ; 0x1 97d0: 0a00002c beq 9888 errno = ENOTDIR; 97d4: eb0009e9 bl bf80 <__errno> 97d8: e3a03014 mov r3, #20 ; 0x14 97dc: e5803000 str r3, [r0] return 0; cleanup_and_bail: free( temp_mt_entry ); 97e0: e1a00004 mov r0, r4 97e4: ebfffe0e bl 9024 97e8: e1a0500d mov r5, sp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 97ec: e5953008 ldr r3, [r5, #8] 97f0: e3530000 cmp r3, #0 ; 0x0 97f4: 1a000053 bne 9948 97f8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 97fc: ea000006 b 981c <== NOT EXECUTED return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 9800: eb0009de bl bf80 <__errno> <== NOT EXECUTED 9804: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9808: e5803000 str r3, [r0] <== NOT EXECUTED 980c: e1a08004 mov r8, r4 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 9810: e1a00008 mov r0, r8 <== NOT EXECUTED 9814: ebfffe02 bl 9024 <== NOT EXECUTED 9818: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 981c: e28dd010 add sp, sp, #16 ; 0x10 9820: 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; 9824: e5846018 str r6, [r4, #24] temp_mt_entry->mt_fs_root.handlers = NULL; 9828: e584601c str r6, [r4, #28] temp_mt_entry->mt_fs_root.ops = NULL; 982c: e5846020 str r6, [r4, #32] temp_mt_entry->mt_point_node.node_access = NULL; 9830: e5846008 str r6, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 9834: e584600c str r6, [r4, #12] temp_mt_entry->mt_point_node.ops = NULL; 9838: e5846010 str r6, [r4, #16] temp_mt_entry->mt_point_node.mt_entry = NULL; 983c: e5846014 str r6, [r4, #20] 9840: e1a05006 mov r5, r6 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 9844: e1a00004 mov r0, r4 9848: e1a0e00f mov lr, pc 984c: e59af024 ldr pc, [sl, #36] 9850: e2506000 subs r6, r0, #0 ; 0x0 9854: 0a00002b beq 9908 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 9858: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 985c: e5933028 ldr r3, [r3, #40] <== NOT EXECUTED 9860: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 9864: 11a00004 movne r0, r4 <== NOT EXECUTED 9868: 11a0e00f movne lr, pc <== NOT EXECUTED 986c: 112fff13 bxne r3 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 9870: e1a00004 mov r0, r4 <== NOT EXECUTED 9874: ebfffdea bl 9024 <== NOT EXECUTED if ( loc_to_free ) 9878: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 987c: 1affffda bne 97ec <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 9880: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 9884: eaffffe4 b 981c <== NOT EXECUTED /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 9888: e59f1108 ldr r1, [pc, #264] ; 9998 988c: e4912004 ldr r2, [r1], #4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 9890: e1520001 cmp r2, r1 9894: 0a000033 beq 9968 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 ) 9898: e59d0000 ldr r0, [sp] 989c: e5923018 ldr r3, [r2, #24] 98a0: e1530000 cmp r3, r0 98a4: 1a000003 bne 98b8 98a8: ea00001e b 9928 <== NOT EXECUTED 98ac: e5923018 ldr r3, [r2, #24] 98b0: e1530000 cmp r3, r0 98b4: 0a00001b beq 9928 * 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 ) { 98b8: 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 ); 98bc: e1520001 cmp r2, r1 98c0: 1afffff9 bne 98ac * 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; 98c4: e59d3008 ldr r3, [sp, #8] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 98c8: e593c020 ldr ip, [r3, #32] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 98cc: e59d2004 ldr r2, [sp, #4] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 98d0: 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 ){ 98d4: 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; 98d8: e5840008 str r0, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; 98dc: 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; 98e0: 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; 98e4: 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 ){ 98e8: 0a000012 beq 9938 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 98ec: e1a00004 mov r0, r4 98f0: e1a0e00f mov lr, pc 98f4: e12fff1c bx ip 98f8: e3500000 cmp r0, #0 ; 0x0 goto cleanup_and_bail; 98fc: 01a0500d moveq r5, sp if ( !loc.ops->mount_h ){ errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 9900: 0affffcf beq 9844 9904: eaffffb5 b 97e0 <== 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 ); 9908: e59f0088 ldr r0, [pc, #136] ; 9998 990c: e1a01004 mov r1, r4 9910: ebffee67 bl 52b4 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 9914: e3590000 cmp r9, #0 ; 0x0 9918: 01a00009 moveq r0, r9 *mt_entry = temp_mt_entry; 991c: 15894000 strne r4, [r9] 9920: 11a00006 movne r0, r6 9924: eaffffbc b 981c /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 9928: eb000994 bl bf80 <__errno> 992c: e3a03010 mov r3, #16 ; 0x10 9930: e5803000 str r3, [r0] 9934: eaffffa9 b 97e0 * 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; 9938: eb000990 bl bf80 <__errno> <== NOT EXECUTED 993c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9940: e5803000 str r3, [r0] <== NOT EXECUTED 9944: eaffffa5 b 97e0 <== NOT EXECUTED cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 9948: e593301c ldr r3, [r3, #28] 994c: e3530000 cmp r3, #0 ; 0x0 9950: 0affffa8 beq 97f8 9954: e1a00005 mov r0, r5 9958: e1a0e00f mov lr, pc 995c: e12fff13 bx r3 9960: e3e00000 mvn r0, #0 ; 0x0 9964: eaffffac b 981c 9968: e59d0000 ldr r0, [sp] <== NOT EXECUTED 996c: eaffffd4 b 98c4 <== NOT EXECUTED * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 9970: eb000982 bl bf80 <__errno> 9974: e3a03016 mov r3, #22 ; 0x16 9978: e5803000 str r3, [r0] 997c: e3e00000 mvn r0, #0 ; 0x0 9980: eaffffa5 b 981c if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 9984: eb00097d bl bf80 <__errno> <== NOT EXECUTED 9988: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 998c: e5803000 str r3, [r0] <== NOT EXECUTED 9990: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 9994: eaffffa0 b 981c <== NOT EXECUTED 9998: 00017454 .word 0x00017454 000116a8 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 116a8: e92d4070 push {r4, r5, r6, lr} 116ac: e1a06001 mov r6, r1 116b0: e1a04000 mov r4, r0 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 116b4: eb000732 bl 13384 <_Timespec_Is_valid> 116b8: e3500000 cmp r0, #0 ; 0x0 116bc: 0a000038 beq 117a4 * 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 ) 116c0: e5943000 ldr r3, [r4] 116c4: e3530000 cmp r3, #0 ; 0x0 116c8: ba000035 blt 117a4 116cc: e5943004 ldr r3, [r4, #4] 116d0: e3530000 cmp r3, #0 ; 0x0 116d4: ba000032 blt 117a4 rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 116d8: e1a00004 mov r0, r4 116dc: eb000739 bl 133c8 <_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 ) { 116e0: e2505000 subs r5, r0, #0 ; 0x0 116e4: 0a000022 beq 11774 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 116e8: e59f20dc ldr r2, [pc, #220] ; 117cc 116ec: e5923000 ldr r3, [r2] 116f0: e2833001 add r3, r3, #1 ; 0x1 116f4: e5823000 str r3, [r2] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 116f8: e59f40d0 ldr r4, [pc, #208] ; 117d0 116fc: e3a01281 mov r1, #268435464 ; 0x10000008 11700: e5940000 ldr r0, [r4] 11704: ebffee79 bl d0f0 <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 11708: e5943000 ldr r3, [r4] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 1170c: e59f20c0 ldr r2, [pc, #192] ; 117d4 11710: e5931008 ldr r1, [r3, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11714: e3a00000 mov r0, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; 11718: e5831068 str r1, [r3, #104] the_watchdog->user_data = user_data; 1171c: e583006c str r0, [r3, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11720: e5830050 str r0, [r3, #80] the_watchdog->routine = routine; 11724: e5832064 str r2, [r3, #100] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11728: e2831048 add r1, r3, #72 ; 0x48 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1172c: e5835054 str r5, [r3, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11730: e59f00a0 ldr r0, [pc, #160] ; 117d8 11734: ebfff08e bl d974 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 11738: ebffebd2 bl c688 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 1173c: e3560000 cmp r6, #0 ; 0x0 11740: 0a000009 beq 1176c ticks -= 11744: e5943000 ldr r3, [r4] 11748: e283205c add r2, r3, #92 ; 0x5c 1174c: e8920014 ldm r2, {r2, r4} 11750: e0424004 sub r4, r2, r4 11754: e0844005 add r4, r4, r5 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 11758: e1a01006 mov r1, r6 1175c: e1a00004 mov r0, r4 11760: eb0006f3 bl 13334 <_Timespec_From_ticks> /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 11764: e3540000 cmp r4, #0 ; 0x0 11768: 1a000012 bne 117b8 rtems_set_errno_and_return_minus_one( EINTR ); 1176c: e3a00000 mov r0, #0 ; 0x0 } return 0; } 11770: e8bd8070 pop {r4, r5, r6, pc} 11774: e59f2050 ldr r2, [pc, #80] ; 117cc 11778: e5923000 ldr r3, [r2] 1177c: e2833001 add r3, r3, #1 ; 0x1 11780: e5823000 str r3, [r2] * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); 11784: ebffef52 bl d4d4 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 11788: ebffebbe bl c688 <_Thread_Enable_dispatch> if ( rmtp ) { 1178c: e3560000 cmp r6, #0 ; 0x0 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 11790: 15865004 strne r5, [r6, #4] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 11794: 15865000 strne r5, [r6] rmtp->tv_nsec = 0; 11798: 11a00005 movne r0, r5 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { 1179c: 18bd8070 popne {r4, r5, r6, pc} 117a0: eafffff1 b 1176c <== 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 ); 117a4: eb00121c bl 1601c <__errno> 117a8: e3a03016 mov r3, #22 ; 0x16 117ac: e5803000 str r3, [r0] 117b0: e3e00000 mvn r0, #0 ; 0x0 117b4: 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 ); 117b8: eb001217 bl 1601c <__errno> 117bc: e3a03004 mov r3, #4 ; 0x4 117c0: e5803000 str r3, [r0] 117c4: e3e00000 mvn r0, #0 ; 0x0 117c8: e8bd8070 pop {r4, r5, r6, pc} 117cc: 0002724c .word 0x0002724c 117d0: 00027304 .word 0x00027304 117d4: 0000c4f0 .word 0x0000c4f0 117d8: 00027324 .word 0x00027324 00001858 : */ int newlib_free_buffers( FILE *fp ) { 1858: e92d4010 push {r4, lr} 185c: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 1860: eb002a93 bl c2b4 1864: e3500002 cmp r0, #2 ; 0x2 1868: 9a000003 bls 187c fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 186c: e1a00004 mov r0, r4 <== NOT EXECUTED 1870: eb002a13 bl c0c4 <== NOT EXECUTED } return 0; } 1874: e3a00000 mov r0, #0 ; 0x0 1878: e8bd8010 pop {r4, pc} { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 187c: e1d430bc ldrh r3, [r4, #12] 1880: e3130080 tst r3, #128 ; 0x80 1884: 0afffffa beq 1874 free( fp->_bf._base ); 1888: e5940010 ldr r0, [r4, #16] 188c: eb001de4 bl 9024 fp->_flags &= ~__SMBF; 1890: e1d430bc ldrh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 1894: e3a02000 mov r2, #0 ; 0x0 case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 1898: e3c33080 bic r3, r3, #128 ; 0x80 fp->_bf._base = fp->_p = (unsigned char *) NULL; 189c: e5842010 str r2, [r4, #16] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 18a0: e1c430bc strh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 18a4: e5842000 str r2, [r4] break; default: fclose(fp); } return 0; } 18a8: e3a00000 mov r0, #0 ; 0x0 18ac: e8bd8010 pop {r4, pc} 0000202c : void *pargp ) { rtems_device_driver status; if ( !initialized ) { 202c: e59fc040 ldr ip, [pc, #64] ; 2074 2030: e5dc2000 ldrb r2, [ip] 2034: e3520000 cmp r2, #0 ; 0x0 rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 2038: e92d4010 push {r4, lr} 203c: e1a04000 mov r4, r0 rtems_device_driver status; if ( !initialized ) { 2040: 0a000001 beq 204c NULL_major = major; } return RTEMS_SUCCESSFUL; } 2044: e3a00000 mov r0, #0 ; 0x0 2048: e8bd8010 pop {r4, pc} ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 204c: e3a03001 mov r3, #1 ; 0x1 status = rtems_io_register_name( 2050: e59f0020 ldr r0, [pc, #32] ; 2078 2054: e1a01004 mov r1, r4 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 2058: e5cc3000 strb r3, [ip] status = rtems_io_register_name( 205c: eb00004b bl 2190 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 2060: e3500000 cmp r0, #0 ; 0x0 rtems_fatal_error_occurred(status); NULL_major = major; 2064: 059f3010 ldreq r3, [pc, #16] ; 207c 2068: 05834000 streq r4, [r3] "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 206c: 0afffff4 beq 2044 rtems_fatal_error_occurred(status); 2070: eb000fed bl 602c <== NOT EXECUTED 2074: 0001b004 .word 0x0001b004 2078: 00019f78 .word 0x00019f78 207c: 0001b1ac .word 0x0001b1ac 00001ac0 : int open( const char *pathname, int flags, ... ) { 1ac0: e92d000e push {r1, r2, r3} 1ac4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1ac8: e24dd010 sub sp, sp, #16 ; 0x10 1acc: e59da034 ldr sl, [sp, #52] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 1ad0: e28a3001 add r3, sl, #1 ; 0x1 if ( ( status & _FREAD ) == _FREAD ) 1ad4: e2132001 ands r2, r3, #1 ; 0x1 1ad8: 01a04002 moveq r4, r2 1adc: 13a04004 movne r4, #4 ; 0x4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 1ae0: e3130002 tst r3, #2 ; 0x2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 1ae4: 13844002 orrne r4, r4, #2 ; 0x2 int open( const char *pathname, int flags, ... ) { 1ae8: e1a09000 mov r9, r0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1aec: e59db038 ldr fp, [sp, #56] * 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(); 1af0: eb001e4a bl 9420 if ( iop == 0 ) { 1af4: e2506000 subs r6, r0, #0 ; 0x0 1af8: 03a05017 moveq r5, #23 ; 0x17 1afc: 0a000030 beq 1bc4 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1b00: e1a01004 mov r1, r4 1b04: e1a00009 mov r0, r9 1b08: e1a0200d mov r2, sp 1b0c: e3a03001 mov r3, #1 ; 0x1 1b10: ebfffe1f bl 1394 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 1b14: e3700001 cmn r0, #1 ; 0x1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1b18: e1a0700d mov r7, sp pathname, eval_flags, &loc, true ); if ( status == -1 ) { 1b1c: 0a000040 beq 1c24 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1b20: e20a3c0a and r3, sl, #2560 ; 0xa00 1b24: e3530c0a cmp r3, #2560 ; 0xa00 1b28: 01a0400d moveq r4, sp 1b2c: 03a05011 moveq r5, #17 ; 0x11 1b30: 0a000055 beq 1c8c /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1b34: e89d000c ldm sp, {r2, r3} 1b38: e5863030 str r3, [r6, #48] iop->file_info = loc.node_access; 1b3c: e586202c str r2, [r6, #44] iop->flags |= rtems_libio_fcntl_flags( flags ); 1b40: e1a0000a mov r0, sl 1b44: e596400c ldr r4, [r6, #12] 1b48: eb001e78 bl 9530 iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 1b4c: e5963030 ldr r3, [r6, #48] 1b50: e5938000 ldr r8, [r3] * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1b54: e1805004 orr r5, r0, r4 iop->pathinfo = loc; 1b58: e897000f ldm r7, {r0, r1, r2, r3} 1b5c: e286c010 add ip, r6, #16 ; 0x10 if ( !iop->handlers->open_h ) { 1b60: e3580000 cmp r8, #0 ; 0x0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1b64: e88c000f stm ip, {r0, r1, r2, r3} * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1b68: e586500c str r5, [r6, #12] iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 1b6c: 0a000044 beq 1c84 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 1b70: e1a01009 mov r1, r9 1b74: e1a0300b mov r3, fp 1b78: e1a00006 mov r0, r6 1b7c: e1a0200a mov r2, sl 1b80: e1a0e00f mov lr, pc 1b84: e12fff18 bx r8 if ( rc ) 1b88: e2505000 subs r5, r0, #0 ; 0x0 1b8c: 11a0400d movne r4, sp 1b90: 0a00000f beq 1bd4 done: va_end(ap); if ( rc ) { if ( iop ) rtems_libio_free( iop ); 1b94: e1a00006 mov r0, r6 1b98: eb001e0a bl 93c8 if ( loc_to_free ) 1b9c: e3540000 cmp r4, #0 ; 0x0 1ba0: 0a000007 beq 1bc4 rtems_filesystem_freenode( loc_to_free ); 1ba4: e5943008 ldr r3, [r4, #8] 1ba8: e3530000 cmp r3, #0 ; 0x0 1bac: 0a000004 beq 1bc4 1bb0: e593301c ldr r3, [r3, #28] 1bb4: e3530000 cmp r3, #0 ; 0x0 1bb8: 11a00004 movne r0, r4 1bbc: 11a0e00f movne lr, pc 1bc0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 1bc4: eb0028ed bl bf80 <__errno> 1bc8: e5805000 str r5, [r0] 1bcc: e3e00000 mvn r0, #0 ; 0x0 1bd0: ea00000f b 1c14 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1bd4: e31a0b01 tst sl, #1024 ; 0x400 1bd8: 1a000034 bne 1cb0 1bdc: e59f4170 ldr r4, [pc, #368] ; 1d54 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1be0: e5941000 ldr r1, [r4] 1be4: e0611006 rsb r1, r1, r6 1be8: e1a01141 asr r1, r1, #2 1bec: e1a02301 lsl r2, r1, #6 1bf0: e0422101 sub r2, r2, r1, lsl #2 1bf4: e1a03302 lsl r3, r2, #6 1bf8: e0623003 rsb r3, r2, r3 1bfc: e1a00603 lsl r0, r3, #12 1c00: e0833000 add r3, r3, r0 1c04: e0833001 add r3, r3, r1 1c08: e1a03203 lsl r3, r3, #4 1c0c: e0613003 rsb r3, r1, r3 1c10: e0410103 sub r0, r1, r3, lsl #2 } 1c14: e28dd010 add sp, sp, #16 ; 0x10 1c18: e8bd4ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1c1c: e28dd00c add sp, sp, #12 ; 0xc 1c20: e12fff1e bx lr status = rtems_filesystem_evaluate_path( pathname, eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 1c24: eb0028d5 bl bf80 <__errno> 1c28: e5900000 ldr r0, [r0] 1c2c: e3500002 cmp r0, #2 ; 0x2 1c30: 1a000018 bne 1c98 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1c34: e21a3c02 ands r3, sl, #512 ; 0x200 1c38: 01a05000 moveq r5, r0 1c3c: 01a04003 moveq r4, r3 1c40: 0a000011 beq 1c8c rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1c44: e1a00009 mov r0, r9 1c48: e38b1902 orr r1, fp, #32768 ; 0x8000 1c4c: e3a02000 mov r2, #0 ; 0x0 1c50: e3a03000 mov r3, #0 ; 0x0 1c54: ebfffe88 bl 167c if ( rc ) { 1c58: e2504000 subs r4, r0, #0 ; 0x0 1c5c: 1a00000d bne 1c98 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 ); 1c60: e1a00009 mov r0, r9 1c64: e1a01004 mov r1, r4 1c68: e1a0200d mov r2, sp 1c6c: e3a03001 mov r3, #1 ; 0x1 1c70: ebfffdc7 bl 1394 if ( status != 0 ) { /* The file did not exist */ 1c74: e3500000 cmp r0, #0 ; 0x0 1c78: 13a0500d movne r5, #13 ; 0xd 1c7c: 1a000002 bne 1c8c 1c80: eaffffab b 1b34 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1c84: e1a0400d mov r4, sp <== NOT EXECUTED 1c88: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 1c8c: e3560000 cmp r6, #0 ; 0x0 1c90: 0affffc1 beq 1b9c 1c94: eaffffbe b 1b94 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 1c98: eb0028b8 bl bf80 <__errno> 1c9c: e5905000 ldr r5, [r0] */ done: va_end(ap); if ( rc ) { 1ca0: e3550000 cmp r5, #0 ; 0x0 1ca4: 0affffcc beq 1bdc 1ca8: e3a04000 mov r4, #0 ; 0x0 1cac: eafffff6 b 1c8c /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 1cb0: e59f409c ldr r4, [pc, #156] ; 1d54 1cb4: e5942000 ldr r2, [r4] 1cb8: e0622006 rsb r2, r2, r6 1cbc: e1a02142 asr r2, r2, #2 1cc0: e1a03302 lsl r3, r2, #6 1cc4: e0433102 sub r3, r3, r2, lsl #2 1cc8: e1a00303 lsl r0, r3, #6 1ccc: e0630000 rsb r0, r3, r0 1cd0: e1a01600 lsl r1, r0, #12 1cd4: e0800001 add r0, r0, r1 1cd8: e0800002 add r0, r0, r2 1cdc: e1a00200 lsl r0, r0, #4 1ce0: e0620000 rsb r0, r2, r0 1ce4: e1a01005 mov r1, r5 1ce8: e0420100 sub r0, r2, r0, lsl #2 1cec: eb001cf4 bl 90c4 if ( rc ) { 1cf0: e2505000 subs r5, r0, #0 ; 0x0 1cf4: 0affffb9 beq 1be0 if(errno) rc = errno; 1cf8: eb0028a0 bl bf80 <__errno> <== NOT EXECUTED 1cfc: e5903000 ldr r3, [r0] <== NOT EXECUTED 1d00: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d04: 1a00000f bne 1d48 <== NOT EXECUTED close( iop - rtems_libio_iops ); 1d08: e5942000 ldr r2, [r4] <== NOT EXECUTED 1d0c: e0622006 rsb r2, r2, r6 <== NOT EXECUTED 1d10: e1a02142 asr r2, r2, #2 <== NOT EXECUTED 1d14: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED 1d18: e0433102 sub r3, r3, r2, lsl #2 <== NOT EXECUTED 1d1c: e1a00303 lsl r0, r3, #6 <== NOT EXECUTED 1d20: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 1d24: e1a01600 lsl r1, r0, #12 <== NOT EXECUTED 1d28: e0800001 add r0, r0, r1 <== NOT EXECUTED 1d2c: e0800002 add r0, r0, r2 <== NOT EXECUTED 1d30: e1a00200 lsl r0, r0, #4 <== NOT EXECUTED 1d34: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 1d38: e0420100 sub r0, r2, r0, lsl #2 <== NOT EXECUTED 1d3c: eb001c8b bl 8f70 <== NOT EXECUTED 1d40: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 1d44: eaffffd5 b 1ca0 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 1d48: eb00288c bl bf80 <__errno> <== NOT EXECUTED 1d4c: e5905000 ldr r5, [r0] <== NOT EXECUTED 1d50: eaffffec b 1d08 <== NOT EXECUTED 1d54: 00016d90 .word 0x00016d90 00001a58 : int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1a58: e3a01000 mov r1, #0 ; 0x0 /* * This is a replaceable stub */ void open_dev_console(void) { 1a5c: 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) { 1a60: e59f004c ldr r0, [pc, #76] ; 1ab4 1a64: e1a02001 mov r2, r1 1a68: eb000014 bl 1ac0 1a6c: e3700001 cmn r0, #1 ; 0x1 1a70: 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) 1a74: e59f0038 ldr r0, [pc, #56] ; 1ab4 1a78: e3a01001 mov r1, #1 ; 0x1 1a7c: e3a02000 mov r2, #0 ; 0x0 1a80: eb00000e bl 1ac0 1a84: e3700001 cmn r0, #1 ; 0x1 1a88: 0a000007 beq 1aac rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1a8c: e59f0020 ldr r0, [pc, #32] ; 1ab4 1a90: e3a01001 mov r1, #1 ; 0x1 1a94: e3a02000 mov r2, #0 ; 0x0 1a98: eb000008 bl 1ac0 1a9c: e3700001 cmn r0, #1 ; 0x1 1aa0: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( error_code | '2' ); 1aa4: e59f000c ldr r0, [pc, #12] ; 1ab8 <== NOT EXECUTED 1aa8: eb000d07 bl 4ecc <== 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' ); 1aac: e59f0008 ldr r0, [pc, #8] ; 1abc <== NOT EXECUTED 1ab0: eb000d05 bl 4ecc <== NOT EXECUTED 1ab4: 00016644 .word 0x00016644 1ab8: 53544432 .word 0x53544432 1abc: 53544431 .word 0x53544431 0001f894 : * open a directory. */ DIR * opendir( const char *name ) { 1f894: e92d4030 push {r4, r5, lr} register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 1f898: e3a01000 mov r1, #0 ; 0x0 1f89c: ebff958f bl 4ee0 1f8a0: e3700001 cmn r0, #1 ; 0x1 1f8a4: e1a05000 mov r5, r0 1f8a8: 0a00001a beq 1f918 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 1f8ac: e3a01002 mov r1, #2 ; 0x2 1f8b0: e3a02001 mov r2, #1 ; 0x1 1f8b4: eb002e25 bl 2b150 1f8b8: e3700001 cmn r0, #1 ; 0x1 1f8bc: 0a000013 beq 1f910 1f8c0: e3a00018 mov r0, #24 ; 0x18 1f8c4: ebff9343 bl 45d8 1f8c8: e2504000 subs r4, r0, #0 ; 0x0 1f8cc: 0a00000f beq 1f910 * 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); 1f8d0: e3a00c02 mov r0, #512 ; 0x200 1f8d4: ebff933f bl 45d8 dirp->dd_len = 512; 1f8d8: e3a03c02 mov r3, #512 ; 0x200 if (dirp->dd_buf == NULL) { 1f8dc: 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; 1f8e0: e5843010 str r3, [r4, #16] if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; dirp->dd_loc = 0; 1f8e4: 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); 1f8e8: e1a02000 mov r2, r0 1f8ec: e584000c str r0, [r4, #12] if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; 1f8f0: 15845000 strne r5, [r4] dirp->dd_loc = 0; dirp->dd_seek = 0; 1f8f4: 15843014 strne r3, [r4, #20] if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; dirp->dd_loc = 0; 1f8f8: 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) { 1f8fc: 1a000006 bne 1f91c close (fd); 1f900: e1a00005 mov r0, r5 <== NOT EXECUTED 1f904: e1a04002 mov r4, r2 <== NOT EXECUTED 1f908: ebff90e6 bl 3ca8 <== NOT EXECUTED 1f90c: ea000002 b 1f91c <== 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); 1f910: e1a00005 mov r0, r5 <== NOT EXECUTED 1f914: ebff90e3 bl 3ca8 <== NOT EXECUTED 1f918: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED dirp->dd_seek = 0; /* * Set up seek point for rewinddir. */ return dirp; } 1f91c: e1a00004 mov r0, r4 1f920: e8bd8030 pop {r4, r5, pc} 00002894 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2894: e92d4010 push {r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 2898: e5912034 ldr r2, [r1, #52] /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 289c: e24dd004 sub sp, sp, #4 ; 0x4 int i; if (tty->termios.c_oflag & OPOST) { 28a0: e3120001 tst r2, #1 ; 0x1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 28a4: e1a04001 mov r4, r1 28a8: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 28ac: 0a000016 beq 290c switch (c) { 28b0: e5dd1000 ldrb r1, [sp] 28b4: e2413008 sub r3, r1, #8 ; 0x8 28b8: e3530005 cmp r3, #5 ; 0x5 28bc: 979ff103 ldrls pc, [pc, r3, lsl #2] 28c0: ea000017 b 2924 28c4: 0000296c .word 0x0000296c <== NOT EXECUTED 28c8: 000029b0 .word 0x000029b0 <== NOT EXECUTED 28cc: 00002980 .word 0x00002980 <== NOT EXECUTED 28d0: 00002924 .word 0x00002924 <== NOT EXECUTED 28d4: 00002924 .word 0x00002924 <== NOT EXECUTED 28d8: 000028dc .word 0x000028dc <== NOT EXECUTED tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 28dc: e3120010 tst r2, #16 ; 0x10 <== NOT EXECUTED 28e0: 0a000002 beq 28f0 <== NOT EXECUTED 28e4: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 28e8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 28ec: 0a00000a beq 291c <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 28f0: e2123008 ands r3, r2, #8 ; 0x8 <== NOT EXECUTED 28f4: 0a00001a beq 2964 <== NOT EXECUTED c = '\n'; 28f8: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 28fc: 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'; 2900: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) tty->column = 0; 2904: 1243300a subne r3, r3, #10 ; 0xa <== NOT EXECUTED 2908: 15843028 strne r3, [r4, #40] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 290c: e1a02004 mov r2, r4 2910: e1a0000d mov r0, sp 2914: e3a01001 mov r1, #1 ; 0x1 2918: ebffff95 bl 2774 } 291c: e28dd004 add sp, sp, #4 ; 0x4 2920: e8bd8010 pop {r4, pc} if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 2924: e3120002 tst r2, #2 ; 0x2 2928: 059f00bc ldreq r0, [pc, #188] ; 29ec 292c: 0a000006 beq 294c c = toupper(c); 2930: e59f00b4 ldr r0, [pc, #180] ; 29ec <== NOT EXECUTED 2934: e5902000 ldr r2, [r0] <== NOT EXECUTED 2938: e7d23001 ldrb r3, [r2, r1] <== NOT EXECUTED 293c: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 2940: 12411020 subne r1, r1, #32 ; 0x20 <== NOT EXECUTED 2944: e5cd1000 strb r1, [sp] <== NOT EXECUTED 2948: e5dd1000 ldrb r1, [sp] <== NOT EXECUTED if (!iscntrl(c)) 294c: e5903000 ldr r3, [r0] 2950: e7d32001 ldrb r2, [r3, r1] 2954: e3120020 tst r2, #32 ; 0x20 2958: 1affffeb bne 290c tty->column++; 295c: e5943028 ldr r3, [r4, #40] 2960: e2833001 add r3, r3, #1 ; 0x1 2964: e5843028 str r3, [r4, #40] 2968: eaffffe7 b 290c } tty->column += i; break; case '\b': if (tty->column > 0) 296c: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2970: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 2974: c2433001 subgt r3, r3, #1 ; 0x1 <== NOT EXECUTED 2978: c5843028 strgt r3, [r4, #40] <== NOT EXECUTED 297c: eaffffe2 b 290c <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 2980: e3120020 tst r2, #32 ; 0x20 tty->column = 0; 2984: 13a03000 movne r3, #0 ; 0x0 2988: 15843028 strne r3, [r4, #40] if (tty->termios.c_oflag & ONLCR) { 298c: e3120004 tst r2, #4 ; 0x4 2990: 0affffdd beq 290c rtems_termios_puts ("\r", 1, tty); 2994: e59f0054 ldr r0, [pc, #84] ; 29f0 2998: e3a01001 mov r1, #1 ; 0x1 299c: e1a02004 mov r2, r4 29a0: ebffff73 bl 2774 tty->column = 0; 29a4: e3a03000 mov r3, #0 ; 0x0 29a8: e5843028 str r3, [r4, #40] 29ac: eaffffd6 b 290c } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 29b0: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 29b4: e2023b06 and r3, r2, #6144 ; 0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 29b8: e2012007 and r2, r1, #7 ; 0x7 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 29bc: e3530b06 cmp r3, #6144 ; 0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 29c0: 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; 29c4: 10803001 addne r3, r0, r1 <== NOT EXECUTED 29c8: 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) { 29cc: 1affffce bne 290c <== NOT EXECUTED tty->column += i; 29d0: e0803001 add r3, r0, r1 <== NOT EXECUTED 29d4: e5843028 str r3, [r4, #40] <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 29d8: e1a01000 mov r1, r0 <== NOT EXECUTED 29dc: e1a02004 mov r2, r4 <== NOT EXECUTED 29e0: e59f000c ldr r0, [pc, #12] ; 29f4 <== NOT EXECUTED 29e4: ebffff62 bl 2774 <== NOT EXECUTED 29e8: eaffffcb b 291c <== NOT EXECUTED 29ec: 000156fc .word 0x000156fc 29f0: 00016764 .word 0x00016764 29f4: 000166a0 .word 0x000166a0 00005294 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 5294: e92d4030 push {r4, r5, lr} 5298: e24dd004 sub sp, sp, #4 ; 0x4 529c: e1a04000 mov r4, r0 52a0: 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) ) { 52a4: e1a00002 mov r0, r2 52a8: e1a0100d mov r1, sp 52ac: eb000130 bl 5774 <_POSIX_Absolute_timeout_to_ticks> 52b0: e3500003 cmp r0, #3 ; 0x3 52b4: 979ff100 ldrls pc, [pc, r0, lsl #2] 52b8: ea000004 b 52d0 <== NOT EXECUTED 52bc: 000052f0 .word 0x000052f0 <== NOT EXECUTED 52c0: 000052e8 .word 0x000052e8 <== NOT EXECUTED 52c4: 000052e8 .word 0x000052e8 <== NOT EXECUTED 52c8: 000052cc .word 0x000052cc <== NOT EXECUTED 52cc: e3a03000 mov r3, #0 ; 0x0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: already_timedout = FALSE; break; } return _POSIX_Condition_variables_Wait_support( 52d0: e1a00004 mov r0, r4 52d4: e1a01005 mov r1, r5 52d8: e59d2000 ldr r2, [sp] 52dc: eb000008 bl 5304 <_POSIX_Condition_variables_Wait_support> cond, mutex, ticks, already_timedout ); } 52e0: e28dd004 add sp, sp, #4 ; 0x4 52e4: 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) ) { 52e8: e3a03001 mov r3, #1 ; 0x1 52ec: eafffff7 b 52d0 52f0: e3a00016 mov r0, #22 ; 0x16 52f4: eafffff9 b 52e0 000054e8 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 54e8: 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 ) 54ec: e2529000 subs r9, r2, #0 ; 0x0 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 54f0: e24dd03c sub sp, sp, #60 ; 0x3c 54f4: e58d001c str r0, [sp, #28] 54f8: e1a0a003 mov sl, r3 POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 54fc: 03a0000e moveq r0, #14 ; 0xe 5500: 0a000014 beq 5558 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 5504: e59f32d0 ldr r3, [pc, #720] ; 57dc 5508: e3510000 cmp r1, #0 ; 0x0 550c: 11a06001 movne r6, r1 5510: 01a06003 moveq r6, r3 if ( !the_attr->is_initialized ) 5514: e5962000 ldr r2, [r6] 5518: e3520000 cmp r2, #0 ; 0x0 551c: 0a00000c beq 5554 * 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) ) 5520: e5963004 ldr r3, [r6, #4] 5524: e3530000 cmp r3, #0 ; 0x0 5528: 0a000004 beq 5540 552c: e59f32ac ldr r3, [pc, #684] ; 57e0 5530: e5962008 ldr r2, [r6, #8] 5534: e5931000 ldr r1, [r3] 5538: e1520001 cmp r2, r1 553c: 3a000004 bcc 5554 * 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 ) { 5540: e5963010 ldr r3, [r6, #16] 5544: e3530001 cmp r3, #1 ; 0x1 5548: 0a00001b beq 55bc 554c: e3530002 cmp r3, #2 ; 0x2 5550: 0a000002 beq 5560 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 5554: e3a00016 mov r0, #22 ; 0x16 } 5558: e28dd03c add sp, sp, #60 ; 0x3c 555c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 5560: e286c018 add ip, r6, #24 ; 0x18 5564: e8bc000f ldm ip!, {r0, r1, r2, r3} 5568: e28d7024 add r7, sp, #36 ; 0x24 556c: e1a04007 mov r4, r7 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 5570: e5968014 ldr r8, [r6, #20] schedparam = the_attr->schedparam; 5574: e8a4000f stmia r4!, {r0, r1, r2, r3} 5578: e89c0003 ldm ip, {r0, r1} 557c: 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 ) 5580: e596300c ldr r3, [r6, #12] 5584: e3530000 cmp r3, #0 ; 0x0 5588: 13a00086 movne r0, #134 ; 0x86 558c: 1afffff1 bne 5558 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 5590: e59db024 ldr fp, [sp, #36] 5594: e24b3001 sub r3, fp, #1 ; 0x1 5598: e35300fd cmp r3, #253 ; 0xfd 559c: 8affffec bhi 5554 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 55a0: e3580003 cmp r8, #3 ; 0x3 55a4: 979ff108 ldrls pc, [pc, r8, lsl #2] 55a8: eaffffe9 b 5554 55ac: 000056d8 .word 0x000056d8 <== NOT EXECUTED 55b0: 000056cc .word 0x000056cc <== NOT EXECUTED 55b4: 000056bc .word 0x000056bc <== NOT EXECUTED 55b8: 000055ec .word 0x000055ec <== NOT EXECUTED * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 55bc: e59f3220 ldr r3, [pc, #544] ; 57e4 55c0: e5932000 ldr r2, [r3] 55c4: e5925108 ldr r5, [r2, #264] schedpolicy = api->schedpolicy; schedparam = api->schedparam; 55c8: e285c080 add ip, r5, #128 ; 0x80 55cc: e8bc000f ldm ip!, {r0, r1, r2, r3} 55d0: e28d7024 add r7, sp, #36 ; 0x24 55d4: e1a04007 mov r4, r7 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 55d8: e595807c ldr r8, [r5, #124] schedparam = api->schedparam; 55dc: e8a4000f stmia r4!, {r0, r1, r2, r3} 55e0: e89c0003 ldm ip, {r0, r1} 55e4: e8840003 stm r4, {r0, r1} 55e8: eaffffe4 b 5580 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 ) < 55ec: e28d002c add r0, sp, #44 ; 0x2c 55f0: eb0010d9 bl 995c <_Timespec_To_ticks> 55f4: e1a04000 mov r4, r0 55f8: e28d0034 add r0, sp, #52 ; 0x34 55fc: eb0010d6 bl 995c <_Timespec_To_ticks> 5600: e1540000 cmp r4, r0 5604: 3affffd2 bcc 5554 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 5608: e59d3028 ldr r3, [sp, #40] 560c: e2433001 sub r3, r3, #1 ; 0x1 5610: e35300fd cmp r3, #253 ; 0xfd 5614: 8affffce bhi 5554 5618: e59fc1c8 ldr ip, [pc, #456] ; 57e8 561c: e58dc020 str ip, [sp, #32] 5620: e3a04003 mov r4, #3 ; 0x3 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 5624: e59f21c0 ldr r2, [pc, #448] ; 57ec 5628: e5920000 ldr r0, [r2] 562c: eb0006f1 bl 71f8 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 5630: e59f01b8 ldr r0, [pc, #440] ; 57f0 5634: eb00094a bl 7b64 <_Objects_Allocate> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 5638: e2505000 subs r5, r0, #0 ; 0x0 563c: 0a000052 beq 578c /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 5640: e59f2198 ldr r2, [pc, #408] ; 57e0 5644: e26bc0ff rsb ip, fp, #255 ; 0xff 5648: e5923000 ldr r3, [r2] 564c: e5961008 ldr r1, [r6, #8] 5650: e5962004 ldr r2, [r6, #4] 5654: e58dc004 str ip, [sp, #4] 5658: e59dc020 ldr ip, [sp, #32] 565c: 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 */ 5660: e3a0b000 mov fp, #0 ; 0x0 status = _Thread_Initialize( 5664: e1530001 cmp r3, r1 5668: 31a03001 movcc r3, r1 566c: e58dc010 str ip, [sp, #16] 5670: e59f0178 ldr r0, [pc, #376] ; 57f0 5674: e3a0c001 mov ip, #1 ; 0x1 5678: e1a01005 mov r1, r5 567c: e58d400c str r4, [sp, #12] 5680: e58db000 str fp, [sp] 5684: e58dc008 str ip, [sp, #8] 5688: e58db014 str fp, [sp, #20] 568c: e58db018 str fp, [sp, #24] 5690: eb000ce4 bl 8a28 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 5694: e150000b cmp r0, fp 5698: 1a000012 bne 56e8 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 569c: e1a01005 mov r1, r5 56a0: e59f0148 ldr r0, [pc, #328] ; 57f0 56a4: eb000a1b bl 7f18 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 56a8: e59f213c ldr r2, [pc, #316] ; 57ec 56ac: e5920000 ldr r0, [r2] 56b0: eb0006ec bl 7268 <_API_Mutex_Unlock> 56b4: e3a0000b mov r0, #11 ; 0xb 56b8: eaffffa6 b 5558 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 56bc: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 56c0: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED 56c4: e58d3020 str r3, [sp, #32] <== NOT EXECUTED 56c8: eaffffd5 b 5624 <== NOT EXECUTED 56cc: e3a04000 mov r4, #0 ; 0x0 56d0: e58d4020 str r4, [sp, #32] 56d4: eaffffd2 b 5624 56d8: e3a02000 mov r2, #0 ; 0x0 56dc: e3a04001 mov r4, #1 ; 0x1 56e0: e58d2020 str r2, [sp, #32] 56e4: eaffffce b 5624 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 56e8: e5954108 ldr r4, [r5, #264] api->Attributes = *the_attr; 56ec: e1a0c006 mov ip, r6 56f0: e8bc000f ldm ip!, {r0, r1, r2, r3} 56f4: e1a0e004 mov lr, r4 56f8: e8ae000f stmia lr!, {r0, r1, r2, r3} 56fc: e8bc000f ldm ip!, {r0, r1, r2, r3} 5700: e8ae000f stmia lr!, {r0, r1, r2, r3} 5704: e8bc000f ldm ip!, {r0, r1, r2, r3} 5708: e8ae000f stmia lr!, {r0, r1, r2, r3} 570c: e89c0003 ldm ip, {r0, r1} 5710: e88e0003 stm lr, {r0, r1} api->detachstate = the_attr->detachstate; 5714: e5963034 ldr r3, [r6, #52] api->schedpolicy = schedpolicy; 5718: e584807c str r8, [r4, #124] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 571c: e5843038 str r3, [r4, #56] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 5720: e1a0e007 mov lr, r7 5724: e8be000f ldm lr!, {r0, r1, r2, r3} 5728: e284c080 add ip, r4, #128 ; 0x80 572c: e8ac000f stmia ip!, {r0, r1, r2, r3} 5730: 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; 5734: 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; 5738: e88c0003 stm ip, {r0, r1} * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 573c: e5c53075 strb r3, [r5, #117] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 5740: e3a01001 mov r1, #1 ; 0x1 5744: e1a02009 mov r2, r9 5748: e1a0300a mov r3, sl 574c: e1a00005 mov r0, r5 5750: e58db000 str fp, [sp] 5754: eb000fc6 bl 9674 <_Thread_Start> start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 5758: e3580003 cmp r8, #3 ; 0x3 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 575c: e1a06000 mov r6, r0 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 5760: 0a000016 beq 57c0 * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 5764: e3560000 cmp r6, #0 ; 0x0 5768: 1a00000c bne 57a0 576c: e1a01005 mov r1, r5 <== NOT EXECUTED 5770: e59f0078 ldr r0, [pc, #120] ; 57f0 <== NOT EXECUTED 5774: eb0009e7 bl 7f18 <_Objects_Free> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 5778: e59fc06c ldr ip, [pc, #108] ; 57ec <== NOT EXECUTED 577c: e59c0000 ldr r0, [ip] <== NOT EXECUTED 5780: eb0006b8 bl 7268 <_API_Mutex_Unlock> <== NOT EXECUTED 5784: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED 5788: eaffff72 b 5558 <== NOT EXECUTED */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 578c: e59f3058 ldr r3, [pc, #88] ; 57ec 5790: e5930000 ldr r0, [r3] 5794: eb0006b3 bl 7268 <_API_Mutex_Unlock> 5798: e3a0000b mov r0, #11 ; 0xb 579c: eaffff6d b 5558 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 57a0: e5953008 ldr r3, [r5, #8] 57a4: e59d201c ldr r2, [sp, #28] 57a8: e5823000 str r3, [r2] _RTEMS_Unlock_allocator(); 57ac: e59f3038 ldr r3, [pc, #56] ; 57ec 57b0: e5930000 ldr r0, [r3] 57b4: eb0006ab bl 7268 <_API_Mutex_Unlock> 57b8: e3a00000 mov r0, #0 ; 0x0 57bc: eaffff65 b 5558 arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 57c0: e2840088 add r0, r4, #136 ; 0x88 57c4: eb001064 bl 995c <_Timespec_To_ticks> 57c8: e284109c add r1, r4, #156 ; 0x9c Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 57cc: e58400a8 str r0, [r4, #168] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 57d0: e59f001c ldr r0, [pc, #28] ; 57f4 57d4: eb001163 bl 9d68 <_Watchdog_Insert> 57d8: eaffffe1 b 5764 57dc: 00019718 .word 0x00019718 57e0: 00018c3c .word 0x00018c3c 57e4: 0001b424 .word 0x0001b424 57e8: 00005b6c .word 0x00005b6c 57ec: 0001b41c .word 0x0001b41c 57f0: 0001b580 .word 0x0001b580 57f4: 0001b444 .word 0x0001b444 00004574 : 4574: e59f2104 ldr r2, [pc, #260] ; 4680 4578: e5923000 ldr r3, [r2] 457c: e2833001 add r3, r3, #1 ; 0x1 int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 4580: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 4584: e5823000 str r3, [r2] 4588: e1a09000 mov r9, r0 458c: e1a04001 mov r4, r1 * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 4590: e59fa0ec ldr sl, [pc, #236] ; 4684 4594: e1a0000a mov r0, sl 4598: eb00093a bl 6a88 <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 459c: e2507000 subs r7, r0, #0 ; 0x0 45a0: 0a000024 beq 4638 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 45a4: e5874014 str r4, [r7, #20] 45a8: e59f80d8 ldr r8, [pc, #216] ; 4688 45ac: e1a06007 mov r6, r7 45b0: e3a05001 mov r5, #1 ; 0x1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 45b4: e7983105 ldr r3, [r8, r5, lsl #2] 45b8: e3530000 cmp r3, #0 ; 0x0 45bc: 0a00001b beq 4630 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 45c0: e5933004 ldr r3, [r3, #4] 45c4: e1d341b0 ldrh r4, [r3, #16] 45c8: e2844001 add r4, r4, #1 ; 0x1 45cc: e1a04104 lsl r4, r4, #2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 45d0: e1a00004 mov r0, r4 45d4: eb001236 bl 8eb4 <_Workspace_Allocate> if ( !table ) { 45d8: e2503000 subs r3, r0, #0 ; 0x0 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 45dc: e1a02004 mov r2, r4 45e0: 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 ) { 45e4: 0a000016 beq 4644 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 45e8: e586301c str r3, [r6, #28] memset( table, '\0', bytes_to_allocate ); 45ec: eb00243b bl d6e0 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 45f0: 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; 45f4: e3550005 cmp r5, #5 ; 0x5 the_api++ ) { 45f8: 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; 45fc: 1affffec bne 45b4 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4600: e5970008 ldr r0, [r7, #8] 4604: e59a101c ldr r1, [sl, #28] 4608: e1a02800 lsl r2, r0, #16 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 460c: e3a04000 mov r4, #0 ; 0x0 } } the_key->is_active = TRUE; 4610: e3a03001 mov r3, #1 ; 0x1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4614: e7817722 str r7, [r1, r2, lsr #14] 4618: e5c73010 strb r3, [r7, #16] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 461c: e587400c str r4, [r7, #12] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 4620: e5890000 str r0, [r9] _Thread_Enable_dispatch(); 4624: eb000c7f bl 7828 <_Thread_Enable_dispatch> 4628: e1a00004 mov r0, r4 return 0; } 462c: 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; 4630: e586301c str r3, [r6, #28] 4634: eaffffed b 45f0 _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 4638: eb000c7a bl 7828 <_Thread_Enable_dispatch> 463c: e3a0000b mov r0, #11 ; 0xb 4640: 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; 4644: e2554001 subs r4, r5, #1 ; 0x1 4648: 0a000006 beq 4668 464c: e2853006 add r3, r5, #6 ; 0x6 <== NOT EXECUTED 4650: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 4654: e0875003 add r5, r7, r3 <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 4658: e5350004 ldr r0, [r5, #-4]! <== NOT EXECUTED 465c: eb001210 bl 8ea4 <_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; 4660: e2544001 subs r4, r4, #1 ; 0x1 <== NOT EXECUTED 4664: 1afffffb bne 4658 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 4668: e59f0014 ldr r0, [pc, #20] ; 4684 466c: e1a01007 mov r1, r7 4670: eb0009f1 bl 6e3c <_Objects_Free> the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 4674: eb000c6b bl 7828 <_Thread_Enable_dispatch> 4678: e3a0000c mov r0, #12 ; 0xc 467c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 4680: 0001478c .word 0x0001478c 4684: 00014b64 .word 0x00014b64 4688: 00014748 .word 0x00014748 00005cf8 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 5cf8: e92d4030 push {r4, r5, lr} 5cfc: e24dd004 sub sp, sp, #4 ; 0x4 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5d00: e1a0100d mov r1, sp 5d04: eb000030 bl 5dcc <_POSIX_Mutex_Get> switch ( location ) { 5d08: e59d5000 ldr r5, [sp] 5d0c: e3550000 cmp r5, #0 ; 0x0 ) { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5d10: e1a04000 mov r4, r0 switch ( location ) { 5d14: 13a00016 movne r0, #22 ; 0x16 5d18: 1a000004 bne 5d30 /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 5d1c: e5943064 ldr r3, [r4, #100] 5d20: e3530000 cmp r3, #0 ; 0x0 5d24: 1a000003 bne 5d38 _Thread_Enable_dispatch(); 5d28: eb000dc5 bl 9444 <_Thread_Enable_dispatch> <== NOT EXECUTED 5d2c: e3a00010 mov r0, #16 ; 0x10 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 5d30: e28dd004 add sp, sp, #4 ; 0x4 5d34: e8bd8030 pop {r4, r5, pc} if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 5d38: e59f002c ldr r0, [pc, #44] ; 5d6c 5d3c: e1a01004 mov r1, r4 5d40: eb000a7d bl 873c <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 5d44: e3a02016 mov r2, #22 ; 0x16 5d48: e2840014 add r0, r4, #20 ; 0x14 5d4c: e1a01005 mov r1, r5 5d50: eb000846 bl 7e70 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 5d54: e59f0010 ldr r0, [pc, #16] ; 5d6c 5d58: e1a01004 mov r1, r4 5d5c: eb000b3d bl 8a58 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 5d60: eb000db7 bl 9444 <_Thread_Enable_dispatch> 5d64: e1a00005 mov r0, r5 5d68: eafffff0 b 5d30 5d6c: 000175a0 .word 0x000175a0 00005e20 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 5e20: e92d4030 push {r4, r5, lr} <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 5e24: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 5e28: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 5e2c: 0a000004 beq 5e44 <== NOT EXECUTED return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5e30: e1a0100d mov r1, sp <== NOT EXECUTED 5e34: ebffffe4 bl 5dcc <_POSIX_Mutex_Get> <== NOT EXECUTED switch ( location ) { 5e38: e59d4000 ldr r4, [sp] <== NOT EXECUTED 5e3c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 5e40: 0a000002 beq 5e50 <== NOT EXECUTED case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; 5e44: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 5e48: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 5e4c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 5e50: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED 5e54: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED 5e58: e5853000 str r3, [r5] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 5e5c: eb000d78 bl 9444 <_Thread_Enable_dispatch> <== NOT EXECUTED 5e60: e1a00004 mov r0, r4 <== NOT EXECUTED 5e64: eafffff7 b 5e48 <== NOT EXECUTED 00005e68 : #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 5e68: e59f3148 ldr r3, [pc, #328] ; 5fb8 5e6c: e3510000 cmp r1, #0 ; 0x0 int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 5e70: 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; 5e74: 11a04001 movne r4, r1 5e78: 01a04003 moveq r4, r3 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 5e7c: e2507000 subs r7, r0, #0 ; 0x0 5e80: 0a000011 beq 5ecc break; } } #endif if ( !the_attr->is_initialized ) 5e84: e5943000 ldr r3, [r4] 5e88: e3530000 cmp r3, #0 ; 0x0 5e8c: 0a00000e beq 5ecc /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 5e90: e5943004 ldr r3, [r4, #4] 5e94: e3530000 cmp r3, #0 ; 0x0 5e98: 1a000041 bne 5fa4 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 5e9c: e594300c ldr r3, [r4, #12] 5ea0: e3530001 cmp r3, #1 ; 0x1 5ea4: 0a00002f beq 5f68 5ea8: e3530002 cmp r3, #2 ; 0x2 5eac: 0a000033 beq 5f80 5eb0: e3530000 cmp r3, #0 ; 0x0 5eb4: 01a06003 moveq r6, r3 5eb8: 1a000003 bne 5ecc break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5ebc: e5943008 ldr r3, [r4, #8] 5ec0: e2433001 sub r3, r3, #1 ; 0x1 5ec4: e35300fd cmp r3, #253 ; 0xfd 5ec8: 9a000001 bls 5ed4 _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; 5ecc: e3a00016 mov r0, #22 ; 0x16 } 5ed0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 5ed4: e59f20e0 ldr r2, [pc, #224] ; 5fbc 5ed8: e5923000 ldr r3, [r2] 5edc: e2833001 add r3, r3, #1 ; 0x1 5ee0: 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 ); 5ee4: e59f80d4 ldr r8, [pc, #212] ; 5fc0 5ee8: e1a00008 mov r0, r8 5eec: eb0009ec bl 86a4 <_Objects_Allocate> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 5ef0: e2505000 subs r5, r0, #0 ; 0x0 5ef4: 0a000027 beq 5f98 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 5ef8: e5943004 ldr r3, [r4, #4] 5efc: e5853010 str r3, [r5, #16] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 5f00: e5942010 ldr r2, [r4, #16] 5f04: e3520000 cmp r2, #0 ; 0x0 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 5f08: 13a03000 movne r3, #0 ; 0x0 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 5f0c: 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; 5f10: 15853054 strne r3, [r5, #84] else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 5f14: 05853054 streq r3, [r5, #84] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 5f18: e5943008 ldr r3, [r4, #8] 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; 5f1c: e3a01001 mov r1, #1 ; 0x1 the_mutex_attr->priority_ceiling = 5f20: e26330ff rsb r3, r3, #255 ; 0xff /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 5f24: 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 = 5f28: e5853060 str r3, [r5, #96] 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; 5f2c: e5c51058 strb r1, [r5, #88] the_mutex_attr->priority_ceiling = _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 5f30: e585605c str r6, [r5, #92] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 5f34: e2851054 add r1, r5, #84 ; 0x54 5f38: e2850014 add r0, r5, #20 ; 0x14 5f3c: eb0007cc bl 7e74 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5f40: e5951008 ldr r1, [r5, #8] 5f44: e598201c ldr r2, [r8, #28] 5f48: e1a03801 lsl r3, r1, #16 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 5f4c: e3a04000 mov r4, #0 ; 0x0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5f50: 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; 5f54: e585400c str r4, [r5, #12] CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 5f58: e5871000 str r1, [r7] _Thread_Enable_dispatch(); 5f5c: eb000d38 bl 9444 <_Thread_Enable_dispatch> 5f60: e1a00004 mov r0, r4 5f64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5f68: e5943008 ldr r3, [r4, #8] 5f6c: e2433001 sub r3, r3, #1 ; 0x1 5f70: e35300fd cmp r3, #253 ; 0xfd /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 5f74: e3a06002 mov r6, #2 ; 0x2 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5f78: 8affffd3 bhi 5ecc 5f7c: eaffffd4 b 5ed4 5f80: e5943008 ldr r3, [r4, #8] 5f84: e2433001 sub r3, r3, #1 ; 0x1 5f88: e35300fd cmp r3, #253 ; 0xfd /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 5f8c: e3a06003 mov r6, #3 ; 0x3 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5f90: 8affffcd bhi 5ecc 5f94: eaffffce b 5ed4 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 5f98: eb000d29 bl 9444 <_Thread_Enable_dispatch> <== NOT EXECUTED 5f9c: e3a0000b mov r0, #11 ; 0xb <== NOT EXECUTED 5fa0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 5fa4: e59f0018 ldr r0, [pc, #24] ; 5fc4 <== NOT EXECUTED 5fa8: e3a01068 mov r1, #104 ; 0x68 <== NOT EXECUTED 5fac: e59f2014 ldr r2, [pc, #20] ; 5fc8 <== NOT EXECUTED 5fb0: e59f3014 ldr r3, [pc, #20] ; 5fcc <== NOT EXECUTED 5fb4: ebfff391 bl 2e00 <__assert_func> <== NOT EXECUTED 5fb8: 00014ec0 .word 0x00014ec0 5fbc: 0001724c .word 0x0001724c 5fc0: 000175a0 .word 0x000175a0 5fc4: 000169fc .word 0x000169fc 5fc8: 00014ed4 .word 0x00014ed4 5fcc: 00016a44 .word 0x00016a44 00006044 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 6044: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 6048: e2527000 subs r7, r2, #0 ; 0x0 <== NOT EXECUTED int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 604c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 6050: e1a06001 mov r6, r1 <== NOT EXECUTED 6054: e1a05000 mov r5, r0 <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 6058: 0a000002 beq 6068 <== NOT EXECUTED return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 605c: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED 6060: e35300fd cmp r3, #253 ; 0xfd <== NOT EXECUTED 6064: 9a000003 bls 6078 <== NOT EXECUTED &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); return 0; 6068: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 606c: e1a00004 mov r0, r4 <== NOT EXECUTED 6070: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 6074: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 6078: ebffffd4 bl 5fd0 <== NOT EXECUTED if ( status ) 607c: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 6080: 1afffff9 bne 606c <== NOT EXECUTED return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 6084: e1a00005 mov r0, r5 <== NOT EXECUTED 6088: e1a0100d mov r1, sp <== NOT EXECUTED 608c: ebffff4e bl 5dcc <_POSIX_Mutex_Get> <== NOT EXECUTED switch ( location ) { 6090: e59d3000 ldr r3, [sp] <== NOT EXECUTED 6094: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 6098: 1afffff2 bne 6068 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 609c: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 60a0: e26620ff rsb r2, r6, #255 ; 0xff <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 60a4: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 60a8: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 60ac: e5873000 str r3, [r7] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 60b0: e5802060 str r2, [r0, #96] <== NOT EXECUTED _CORE_mutex_Surrender( 60b4: e1a02004 mov r2, r4 <== NOT EXECUTED 60b8: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 60bc: eb0007e8 bl 8064 <_CORE_mutex_Surrender> <== NOT EXECUTED &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 60c0: eb000cdf bl 9444 <_Thread_Enable_dispatch> <== NOT EXECUTED 60c4: eaffffe8 b 606c <== NOT EXECUTED 000060c8 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 60c8: e92d4010 push {r4, lr} <== NOT EXECUTED 60cc: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 60d0: e1a04000 mov r4, r0 <== NOT EXECUTED * 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 ); 60d4: e1a00001 mov r0, r1 <== NOT EXECUTED 60d8: e1a0100d mov r1, sp <== NOT EXECUTED 60dc: eb000026 bl 617c <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED switch ( status ) { 60e0: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 60e4: 9a000001 bls 60f0 <== NOT EXECUTED 60e8: e3500003 cmp r0, #3 ; 0x3 <== NOT EXECUTED 60ec: 0a000005 beq 6108 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 60f0: e1a00004 mov r0, r4 <== NOT EXECUTED 60f4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 60f8: e59d2000 ldr r2, [sp] <== NOT EXECUTED 60fc: ebffffb6 bl 5fdc <_POSIX_Mutex_Lock_support> <== NOT EXECUTED break; } } return lock_status; } 6100: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 6104: e8bd8010 pop {r4, pc} <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 6108: e1a00004 mov r0, r4 <== NOT EXECUTED 610c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 6110: e59d2000 ldr r2, [sp] <== NOT EXECUTED 6114: ebffffb0 bl 5fdc <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 6118: eafffff8 b 6100 <== NOT EXECUTED 00004d70 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 4d70: e92d40f0 push {r4, r5, r6, r7, lr} const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 4d74: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 4d78: e24dd00c sub sp, sp, #12 ; 0xc const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 4d7c: 0a000007 beq 4da0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 4d80: e3510000 cmp r1, #0 ; 0x0 4d84: 0a000020 beq 4e0c } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 4d88: e5913000 ldr r3, [r1] 4d8c: e3530000 cmp r3, #0 ; 0x0 4d90: 0a000002 beq 4da0 return EINVAL; switch ( the_attr->process_shared ) { 4d94: e5915004 ldr r5, [r1, #4] 4d98: e3550000 cmp r5, #0 ; 0x0 4d9c: 0a000002 beq 4dac ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 4da0: e3a00016 mov r0, #22 ; 0x16 } 4da4: e28dd00c add sp, sp, #12 ; 0xc 4da8: e8bd80f0 pop {r4, r5, r6, r7, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4dac: e59f206c ldr r2, [pc, #108] ; 4e20 4db0: e5923000 ldr r3, [r2] 4db4: e2833001 add r3, r3, #1 ; 0x1 4db8: 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 *) 4dbc: e59f7060 ldr r7, [pc, #96] ; 4e24 4dc0: e1a00007 mov r0, r7 4dc4: eb000a66 bl 7764 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 4dc8: e2504000 subs r4, r0, #0 ; 0x0 4dcc: 0a00000b beq 4e00 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 4dd0: e2840010 add r0, r4, #16 ; 0x10 4dd4: e28d1008 add r1, sp, #8 ; 0x8 4dd8: eb00087d bl 6fd4 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4ddc: e5941008 ldr r1, [r4, #8] 4de0: e597201c ldr r2, [r7, #28] 4de4: e1a03801 lsl r3, r1, #16 4de8: 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; 4dec: e584500c str r5, [r4, #12] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 4df0: e5861000 str r1, [r6] _Thread_Enable_dispatch(); 4df4: eb000dc2 bl 8504 <_Thread_Enable_dispatch> 4df8: e1a00005 mov r0, r5 4dfc: eaffffe8 b 4da4 _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 4e00: eb000dbf bl 8504 <_Thread_Enable_dispatch> 4e04: e3a0000b mov r0, #11 ; 0xb 4e08: eaffffe5 b 4da4 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 4e0c: e1a0000d mov r0, sp <== NOT EXECUTED 4e10: eb000294 bl 5868 <== NOT EXECUTED 4e14: e1a0400d mov r4, sp <== NOT EXECUTED 4e18: e1a0100d mov r1, sp <== NOT EXECUTED 4e1c: eaffffd9 b 4d88 <== NOT EXECUTED 4e20: 0001958c .word 0x0001958c 4e24: 00019760 .word 0x00019760 00004e98 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4e98: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4e9c: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4ea0: e24dd00c sub sp, sp, #12 ; 0xc 4ea4: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4ea8: 0a00000c beq 4ee0 * 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 ); 4eac: e28d1004 add r1, sp, #4 ; 0x4 4eb0: eb001b38 bl bb98 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 4eb4: 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 ); 4eb8: e1a05000 mov r5, r0 switch (status) { 4ebc: 93a04000 movls r4, #0 ; 0x0 4ec0: 8a000009 bhi 4eec 4ec4: e59f00a8 ldr r0, [pc, #168] ; 4f74 4ec8: e5961000 ldr r1, [r6] 4ecc: e28d2008 add r2, sp, #8 ; 0x8 4ed0: eb000b6a bl 7c80 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4ed4: e59dc008 ldr ip, [sp, #8] 4ed8: e35c0000 cmp ip, #0 ; 0x0 4edc: 0a00000c beq 4f14 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 4ee0: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 4ee4: e28dd00c add sp, sp, #12 ; 0xc 4ee8: 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) { 4eec: e3500003 cmp r0, #3 ; 0x3 4ef0: e5961000 ldr r1, [r6] 4ef4: e59f0078 ldr r0, [pc, #120] ; 4f74 4ef8: e28d2008 add r2, sp, #8 ; 0x8 4efc: e3a04000 mov r4, #0 ; 0x0 4f00: 03a04001 moveq r4, #1 ; 0x1 4f04: eb000b5d bl 7c80 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4f08: e59dc008 ldr ip, [sp, #8] 4f0c: e35c0000 cmp ip, #0 ; 0x0 4f10: 1afffff2 bne 4ee0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 4f14: e5961000 ldr r1, [r6] 4f18: e2800010 add r0, r0, #16 ; 0x10 4f1c: e59d3004 ldr r3, [sp, #4] 4f20: e1a02004 mov r2, r4 4f24: e58dc000 str ip, [sp] 4f28: eb000831 bl 6ff4 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 4f2c: eb000d74 bl 8504 <_Thread_Enable_dispatch> if ( !do_wait && 4f30: e3540000 cmp r4, #0 ; 0x0 4f34: 159f103c ldrne r1, [pc, #60] ; 4f78 4f38: 1a000009 bne 4f64 4f3c: e59f1034 ldr r1, [pc, #52] ; 4f78 <== NOT EXECUTED 4f40: e5913000 ldr r3, [r1] <== NOT EXECUTED 4f44: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED 4f48: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 4f4c: 1a000004 bne 4f64 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4f50: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 4f54: 0affffe1 beq 4ee0 <== NOT EXECUTED 4f58: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 4f5c: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 4f60: 9affffdf bls 4ee4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 4f64: e5913000 ldr r3, [r1] 4f68: e5930034 ldr r0, [r3, #52] 4f6c: eb00003b bl 5060 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4f70: eaffffdb b 4ee4 4f74: 00019760 .word 0x00019760 4f78: 00019644 .word 0x00019644 00004f7c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4f7c: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4f80: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4f84: e24dd00c sub sp, sp, #12 ; 0xc 4f88: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4f8c: 0a00000c beq 4fc4 * 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 ); 4f90: e28d1004 add r1, sp, #4 ; 0x4 4f94: eb001aff bl bb98 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 4f98: 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 ); 4f9c: e1a05000 mov r5, r0 switch (status) { 4fa0: 93a04000 movls r4, #0 ; 0x0 4fa4: 8a000009 bhi 4fd0 4fa8: e59f00a8 ldr r0, [pc, #168] ; 5058 4fac: e5961000 ldr r1, [r6] 4fb0: e28d2008 add r2, sp, #8 ; 0x8 4fb4: eb000b31 bl 7c80 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4fb8: e59dc008 ldr ip, [sp, #8] 4fbc: e35c0000 cmp ip, #0 ; 0x0 4fc0: 0a00000c beq 4ff8 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 4fc4: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 4fc8: e28dd00c add sp, sp, #12 ; 0xc 4fcc: 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) { 4fd0: e3500003 cmp r0, #3 ; 0x3 4fd4: e5961000 ldr r1, [r6] 4fd8: e59f0078 ldr r0, [pc, #120] ; 5058 4fdc: e28d2008 add r2, sp, #8 ; 0x8 4fe0: e3a04000 mov r4, #0 ; 0x0 4fe4: 03a04001 moveq r4, #1 ; 0x1 4fe8: eb000b24 bl 7c80 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4fec: e59dc008 ldr ip, [sp, #8] 4ff0: e35c0000 cmp ip, #0 ; 0x0 4ff4: 1afffff2 bne 4fc4 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 4ff8: e5961000 ldr r1, [r6] 4ffc: e2800010 add r0, r0, #16 ; 0x10 5000: e59d3004 ldr r3, [sp, #4] 5004: e1a02004 mov r2, r4 5008: e58dc000 str ip, [sp] 500c: eb00082f bl 70d0 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 5010: eb000d3b bl 8504 <_Thread_Enable_dispatch> if ( !do_wait && 5014: e3540000 cmp r4, #0 ; 0x0 5018: 159f103c ldrne r1, [pc, #60] ; 505c 501c: 1a000009 bne 5048 5020: e59f1034 ldr r1, [pc, #52] ; 505c <== NOT EXECUTED 5024: e5913000 ldr r3, [r1] <== NOT EXECUTED 5028: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED 502c: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 5030: 1a000004 bne 5048 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 5034: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 5038: 0affffe1 beq 4fc4 <== NOT EXECUTED 503c: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 5040: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 5044: 9affffdf bls 4fc8 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 5048: e5913000 ldr r3, [r1] 504c: e5930034 ldr r0, [r3, #52] 5050: eb000002 bl 5060 <_POSIX_RWLock_Translate_core_RWLock_return_code> 5054: eaffffdb b 4fc8 5058: 00019760 .word 0x00019760 505c: 00019644 .word 0x00019644 0000478c : * 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() ) 478c: e59f309c ldr r3, [pc, #156] ; 4830 4790: e5932000 ldr r2, [r3] 4794: e3520000 cmp r2, #0 ; 0x0 int pthread_setcancelstate( int state, int *oldstate ) { 4798: e92d4030 push {r4, r5, lr} 479c: e1a04000 mov r4, r0 47a0: 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() ) 47a4: 13a00047 movne r0, #71 ; 0x47 47a8: 18bd8030 popne {r4, r5, pc} return EPROTO; if ( !oldstate ) 47ac: e3500000 cmp r0, #0 ; 0x0 47b0: 0a000001 beq 47bc return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 47b4: e3540001 cmp r4, #1 ; 0x1 47b8: 9a000001 bls 47c4 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 47bc: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 47c0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47c4: e59f1068 ldr r1, [pc, #104] ; 4834 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 47c8: e59f5068 ldr r5, [pc, #104] ; 4838 47cc: e5913000 ldr r3, [r1] 47d0: e5952000 ldr r2, [r5] 47d4: e2833001 add r3, r3, #1 ; 0x1 47d8: e5813000 str r3, [r1] 47dc: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 47e0: e59230cc ldr r3, [r2, #204] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 47e4: e3540000 cmp r4, #0 ; 0x0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 47e8: e5803000 str r3, [r0] thread_support->cancelability_state = state; 47ec: e58240cc str r4, [r2, #204] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 47f0: 1a000002 bne 4800 47f4: e59230d0 ldr r3, [r2, #208] 47f8: e3530001 cmp r3, #1 ; 0x1 47fc: 0a000002 beq 480c thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4800: eb000a9c bl 7278 <_Thread_Enable_dispatch> 4804: e3a00000 mov r0, #0 ; 0x0 4808: 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 && 480c: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED 4810: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 4814: 0afffff9 beq 4800 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4818: eb000a96 bl 7278 <_Thread_Enable_dispatch> <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 481c: e5950000 ldr r0, [r5] <== NOT EXECUTED 4820: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 4824: ebfffed1 bl 4370 <_POSIX_Thread_Exit> <== NOT EXECUTED 4828: e1a00004 mov r0, r4 <== NOT EXECUTED 482c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 4830: 00014520 .word 0x00014520 4834: 0001448c .word 0x0001448c 4838: 00014544 .word 0x00014544 0000483c : * 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() ) 483c: e59f3098 ldr r3, [pc, #152] ; 48dc 4840: e5932000 ldr r2, [r3] 4844: e3520000 cmp r2, #0 ; 0x0 int pthread_setcanceltype( int type, int *oldtype ) { 4848: e92d4030 push {r4, r5, lr} 484c: 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() ) 4850: 13a00047 movne r0, #71 ; 0x47 4854: 18bd8030 popne {r4, r5, pc} return EPROTO; if ( !oldtype ) 4858: e3510000 cmp r1, #0 ; 0x0 485c: 0a000001 beq 4868 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 4860: e3500001 cmp r0, #1 ; 0x1 4864: 9a000001 bls 4870 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4868: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 486c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 4870: e59f1068 ldr r1, [pc, #104] ; 48e0 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4874: e59f5068 ldr r5, [pc, #104] ; 48e4 4878: e5913000 ldr r3, [r1] 487c: e5952000 ldr r2, [r5] 4880: e2833001 add r3, r3, #1 ; 0x1 4884: e5813000 str r3, [r1] 4888: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 488c: e59230d0 ldr r3, [r2, #208] 4890: e58c3000 str r3, [ip] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4894: e59240cc ldr r4, [r2, #204] 4898: e3540000 cmp r4, #0 ; 0x0 thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; 489c: e58200d0 str r0, [r2, #208] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 48a0: 1a000001 bne 48ac 48a4: e3500001 cmp r0, #1 ; 0x1 48a8: 0a000002 beq 48b8 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 48ac: eb000a71 bl 7278 <_Thread_Enable_dispatch> 48b0: e3a00000 mov r0, #0 ; 0x0 48b4: 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 && 48b8: e59230d4 ldr r3, [r2, #212] 48bc: e3530000 cmp r3, #0 ; 0x0 48c0: 0afffff9 beq 48ac thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 48c4: eb000a6b bl 7278 <_Thread_Enable_dispatch> <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 48c8: e5950000 ldr r0, [r5] <== NOT EXECUTED 48cc: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 48d0: ebfffea6 bl 4370 <_POSIX_Thread_Exit> <== NOT EXECUTED 48d4: e1a00004 mov r0, r4 <== NOT EXECUTED 48d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 48dc: 00014520 .word 0x00014520 48e0: 0001448c .word 0x0001448c 48e4: 00014544 .word 0x00014544 000069c0 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 69c0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Check all the parameters */ if ( !param ) 69c4: e2525000 subs r5, r2, #0 ; 0x0 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 69c8: e24dd004 sub sp, sp, #4 ; 0x4 69cc: e1a06000 mov r6, r0 69d0: e1a07001 mov r7, r1 /* * Check all the parameters */ if ( !param ) 69d4: 0a000015 beq 6a30 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 69d8: e5953000 ldr r3, [r5] 69dc: e2433001 sub r3, r3, #1 ; 0x1 69e0: e35300fd cmp r3, #253 ; 0xfd 69e4: 8a000011 bhi 6a30 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 69e8: e3510003 cmp r1, #3 ; 0x3 69ec: 979ff101 ldrls pc, [pc, r1, lsl #2] 69f0: ea00000e b 6a30 69f4: 00006a3c .word 0x00006a3c <== NOT EXECUTED 69f8: 00006adc .word 0x00006adc <== NOT EXECUTED 69fc: 00006ae8 .word 0x00006ae8 <== NOT EXECUTED 6a00: 00006a04 .word 0x00006a04 <== 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 ) < 6a04: e2850008 add r0, r5, #8 ; 0x8 6a08: eb000e86 bl a428 <_Timespec_To_ticks> 6a0c: e1a04000 mov r4, r0 6a10: e2850010 add r0, r5, #16 ; 0x10 6a14: eb000e83 bl a428 <_Timespec_To_ticks> 6a18: e1540000 cmp r4, r0 6a1c: 3a000003 bcc 6a30 _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 6a20: e5953004 ldr r3, [r5, #4] 6a24: e2433001 sub r3, r3, #1 ; 0x1 6a28: e35300fd cmp r3, #253 ; 0xfd 6a2c: 9a00003a bls 6b1c _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 6a30: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return ESRCH; } 6a34: e28dd004 add sp, sp, #4 ; 0x4 6a38: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 6a3c: e3a08001 mov r8, #1 ; 0x1 6a40: e3a0a000 mov sl, #0 ; 0x0 6a44: e1a01006 mov r1, r6 6a48: e59f00e4 ldr r0, [pc, #228] ; 6b34 6a4c: e1a0200d mov r2, sp 6a50: eb00085a bl 8bc0 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 6a54: e59d3000 ldr r3, [sp] 6a58: e3530000 cmp r3, #0 ; 0x0 6a5c: e1a06000 mov r6, r0 6a60: 13a00003 movne r0, #3 ; 0x3 6a64: 1afffff2 bne 6a34 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 6a68: e5964108 ldr r4, [r6, #264] if ( api->schedpolicy == SCHED_SPORADIC ) 6a6c: e594307c ldr r3, [r4, #124] 6a70: e3530003 cmp r3, #3 ; 0x3 6a74: 0a00002b beq 6b28 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 6a78: e584707c str r7, [r4, #124] api->schedparam = *param; 6a7c: e1a0e005 mov lr, r5 6a80: e8be000f ldm lr!, {r0, r1, r2, r3} 6a84: e284c080 add ip, r4, #128 ; 0x80 6a88: e8ac000f stmia ip!, {r0, r1, r2, r3} 6a8c: e89e0003 ldm lr, {r0, r1} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 6a90: e3570000 cmp r7, #0 ; 0x0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 6a94: e88c0003 stm ip, {r0, r1} the_thread->budget_algorithm = budget_algorithm; 6a98: e586807c str r8, [r6, #124] the_thread->budget_callout = budget_callout; 6a9c: e586a080 str sl, [r6, #128] switch ( api->schedpolicy ) { 6aa0: ba00000a blt 6ad0 6aa4: e3570002 cmp r7, #2 ; 0x2 6aa8: ca000011 bgt 6af4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 6aac: e59f3084 ldr r3, [pc, #132] ; 6b38 6ab0: e5941080 ldr r1, [r4, #128] 6ab4: e5932000 ldr r2, [r3] 6ab8: e26110ff rsb r1, r1, #255 ; 0xff 6abc: e5862078 str r2, [r6, #120] the_thread->real_priority = 6ac0: e5861018 str r1, [r6, #24] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 6ac4: e1a00006 mov r0, r6 6ac8: e3a02001 mov r2, #1 ; 0x1 6acc: eb0008ea bl 8e7c <_Thread_Change_priority> _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 6ad0: eb000a5b bl 9444 <_Thread_Enable_dispatch> 6ad4: e3a00000 mov r0, #0 ; 0x0 6ad8: eaffffd5 b 6a34 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 6adc: e3a08000 mov r8, #0 ; 0x0 6ae0: e1a0a008 mov sl, r8 6ae4: eaffffd6 b 6a44 6ae8: e3a08002 mov r8, #2 ; 0x2 6aec: e3a0a000 mov sl, #0 ; 0x0 6af0: eaffffd3 b 6a44 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 6af4: e3570003 cmp r7, #3 ; 0x3 6af8: 1afffff4 bne 6ad0 TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 6afc: e5943080 ldr r3, [r4, #128] _Watchdog_Remove( &api->Sporadic_timer ); 6b00: e284009c add r0, r4, #156 ; 0x9c TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 6b04: e5843098 str r3, [r4, #152] _Watchdog_Remove( &api->Sporadic_timer ); 6b08: eb000fb8 bl a9f0 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 6b0c: e1a01006 mov r1, r6 6b10: e3a00000 mov r0, #0 ; 0x0 6b14: ebffff86 bl 6934 <_POSIX_Threads_Sporadic_budget_TSR> 6b18: eaffffec b 6ad0 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 ) ) 6b1c: e59fa018 ldr sl, [pc, #24] ; 6b3c 6b20: e3a08003 mov r8, #3 ; 0x3 6b24: eaffffc6 b 6a44 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 6b28: e284009c add r0, r4, #156 ; 0x9c 6b2c: eb000faf bl a9f0 <_Watchdog_Remove> 6b30: eaffffd0 b 6a78 6b34: 00017460 .word 0x00017460 6b38: 00017204 .word 0x00017204 6b3c: 000068fc .word 0x000068fc 0001478c : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1478c: e59f30c4 ldr r3, [pc, #196] ; 14858 14790: e593c000 ldr ip, [r3] 14794: e150000c cmp r0, ip ssize_t read( int fd, void *buffer, size_t count ) { 14798: e92d4070 push {r4, r5, r6, lr} 1479c: e1a06001 mov r6, r1 147a0: e1a05002 mov r5, r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 147a4: 2a00001c bcs 1481c iop = rtems_libio_iop( fd ); 147a8: e1a03200 lsl r3, r0, #4 147ac: e0433100 sub r3, r3, r0, lsl #2 147b0: e0833000 add r3, r3, r0 147b4: e59f00a0 ldr r0, [pc, #160] ; 1485c 147b8: e590c000 ldr ip, [r0] 147bc: e1a03103 lsl r3, r3, #2 147c0: e08c4003 add r4, ip, r3 rtems_libio_check_is_open( iop ); 147c4: e594300c ldr r3, [r4, #12] 147c8: e3130c01 tst r3, #256 ; 0x100 147cc: 0a000012 beq 1481c rtems_libio_check_buffer( buffer ); 147d0: e3510000 cmp r1, #0 ; 0x0 147d4: 0a000015 beq 14830 rtems_libio_check_count( count ); 147d8: e3520000 cmp r2, #0 ; 0x0 147dc: 01a00002 moveq r0, r2 147e0: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 147e4: e3130002 tst r3, #2 ; 0x2 147e8: 0a000010 beq 14830 /* * Now process the read(). */ if ( !iop->handlers->read_h ) 147ec: e5943030 ldr r3, [r4, #48] 147f0: e5933008 ldr r3, [r3, #8] 147f4: e3530000 cmp r3, #0 ; 0x0 147f8: 0a000011 beq 14844 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 147fc: e1a00004 mov r0, r4 14800: e1a0e00f mov lr, pc 14804: e12fff13 bx r3 if ( rc > 0 ) 14808: e3500000 cmp r0, #0 ; 0x0 iop->offset += rc; 1480c: c5943008 ldrgt r3, [r4, #8] 14810: c0833000 addgt r3, r3, r0 14814: c5843008 strgt r3, [r4, #8] return rc; } 14818: 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 ); 1481c: ebffddd7 bl bf80 <__errno> <== NOT EXECUTED 14820: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 14824: e5803000 str r3, [r0] <== NOT EXECUTED 14828: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1482c: 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 ); 14830: ebffddd2 bl bf80 <__errno> <== NOT EXECUTED 14834: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 14838: e5803000 str r3, [r0] <== NOT EXECUTED 1483c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14840: 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 ); 14844: ebffddcd bl bf80 <__errno> <== NOT EXECUTED 14848: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1484c: e5803000 str r3, [r0] <== NOT EXECUTED 14850: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14854: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 14858: 00015094 .word 0x00015094 1485c: 00016d90 .word 0x00016d90 0001fc00 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 1fc00: e92d4070 push {r4, r5, r6, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 1fc04: e2514000 subs r4, r1, #0 ; 0x0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 1fc08: e24dd010 sub sp, sp, #16 ; 0x10 1fc0c: e1a06002 mov r6, r2 rtems_filesystem_location_info_t loc; int result; if (!buf) 1fc10: 0a00002e beq 1fcd0 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 1fc14: e3a01000 mov r1, #0 ; 0x0 1fc18: e1a0200d mov r2, sp 1fc1c: e1a03001 mov r3, r1 1fc20: ebff9077 bl 3e04 if ( result != 0 ) 1fc24: 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 ); 1fc28: e1a0500d mov r5, sp if ( result != 0 ) 1fc2c: 1a000025 bne 1fcc8 return -1; if ( !loc.ops->node_type_h ){ 1fc30: e59d2008 ldr r2, [sp, #8] 1fc34: e5923010 ldr r3, [r2, #16] 1fc38: e3530000 cmp r3, #0 ; 0x0 1fc3c: 0a000019 beq 1fca8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 1fc40: e1a0000d mov r0, sp 1fc44: e1a0e00f mov lr, pc 1fc48: e12fff13 bx r3 1fc4c: e3500004 cmp r0, #4 ; 0x4 1fc50: 1a000023 bne 1fce4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 1fc54: e59d2008 ldr r2, [sp, #8] 1fc58: e592303c ldr r3, [r2, #60] 1fc5c: e3530000 cmp r3, #0 ; 0x0 1fc60: 0a00002c beq 1fd18 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 1fc64: e1a01004 mov r1, r4 1fc68: e1a02006 mov r2, r6 1fc6c: e1a0000d mov r0, sp 1fc70: e1a0e00f mov lr, pc 1fc74: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 1fc78: e59d3008 ldr r3, [sp, #8] 1fc7c: e3530000 cmp r3, #0 ; 0x0 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 ); 1fc80: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 1fc84: 0a000004 beq 1fc9c 1fc88: e593301c ldr r3, [r3, #28] 1fc8c: e3530000 cmp r3, #0 ; 0x0 1fc90: 11a0000d movne r0, sp 1fc94: 11a0e00f movne lr, pc 1fc98: 112fff13 bxne r3 return result; } 1fc9c: e1a00004 mov r0, r4 1fca0: e28dd010 add sp, sp, #16 ; 0x10 1fca4: 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 ); 1fca8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1fcac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1fcb0: 11a0000d movne r0, sp <== NOT EXECUTED 1fcb4: 11a0e00f movne lr, pc <== NOT EXECUTED 1fcb8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1fcbc: eb00379b bl 2db30 <__errno> <== NOT EXECUTED 1fcc0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1fcc4: e5803000 str r3, [r0] <== NOT EXECUTED 1fcc8: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 1fccc: eafffff2 b 1fc9c <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 1fcd0: eb003796 bl 2db30 <__errno> <== NOT EXECUTED 1fcd4: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 1fcd8: e5803000 str r3, [r0] <== NOT EXECUTED 1fcdc: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 1fce0: eaffffed b 1fc9c <== 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 ); 1fce4: e59d3008 ldr r3, [sp, #8] 1fce8: e3530000 cmp r3, #0 ; 0x0 1fcec: 0a000004 beq 1fd04 1fcf0: e593301c ldr r3, [r3, #28] 1fcf4: e3530000 cmp r3, #0 ; 0x0 1fcf8: 11a0000d movne r0, sp 1fcfc: 11a0e00f movne lr, pc 1fd00: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 1fd04: eb003789 bl 2db30 <__errno> 1fd08: e3a03016 mov r3, #22 ; 0x16 1fd0c: e5803000 str r3, [r0] 1fd10: e3e04000 mvn r4, #0 ; 0x0 1fd14: eaffffe0 b 1fc9c } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 1fd18: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1fd1c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1fd20: 11a0000d movne r0, sp <== NOT EXECUTED 1fd24: 11a0e00f movne lr, pc <== NOT EXECUTED 1fd28: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1fd2c: eb00377f bl 2db30 <__errno> <== NOT EXECUTED 1fd30: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1fd34: e5803000 str r3, [r0] <== NOT EXECUTED 1fd38: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 1fd3c: eaffffd6 b 1fc9c <== NOT EXECUTED 000148c8 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 148c8: 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())) { 148cc: e59f3114 ldr r3, [pc, #276] ; 149e8 { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 148d0: e59f7114 ldr r7, [pc, #276] ; 149ec /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 148d4: e593c000 ldr ip, [r3] { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 148d8: e5972010 ldr r2, [r7, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 148dc: e35c0003 cmp ip, #3 ; 0x3 { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 148e0: e2822001 add r2, r2, #1 ; 0x1 148e4: e24dd004 sub sp, sp, #4 ; 0x4 148e8: e5872010 str r2, [r7, #16] 148ec: e1a04000 mov r4, r0 148f0: 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())) { 148f4: 0a00001f beq 14978 } /* * Continue with realloc(). */ if ( !ptr ) 148f8: e3540000 cmp r4, #0 ; 0x0 148fc: 0a000010 beq 14944 return malloc( size ); if ( !size ) { 14900: e3560000 cmp r6, #0 ; 0x0 14904: 0a000012 beq 14954 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 14908: e59f00e0 ldr r0, [pc, #224] ; 149f0 1490c: e1a01004 mov r1, r4 14910: e1a0200d mov r2, sp 14914: eb00006d bl 14ad0 <_Protected_heap_Get_block_size> 14918: e2505000 subs r5, r0, #0 ; 0x0 1491c: 0a000010 beq 14964 #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 ) ) { 14920: e59f00c8 ldr r0, [pc, #200] ; 149f0 14924: e1a01004 mov r1, r4 14928: e1a02006 mov r2, r6 1492c: eb000078 bl 14b14 <_Protected_heap_Resize_block> 14930: e3500000 cmp r0, #0 ; 0x0 14934: 0a00001b beq 149a8 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 14938: e1a00004 mov r0, r4 1493c: e28dd004 add sp, sp, #4 ; 0x4 14940: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 14944: e1a00006 mov r0, r6 <== NOT EXECUTED 14948: ebffd325 bl 95e4 <== NOT EXECUTED 1494c: e1a04000 mov r4, r0 <== NOT EXECUTED 14950: eafffff8 b 14938 <== NOT EXECUTED if ( !size ) { free( ptr ); 14954: e1a00004 mov r0, r4 <== NOT EXECUTED 14958: ebffd1b1 bl 9024 <== NOT EXECUTED 1495c: e1a04006 mov r4, r6 <== NOT EXECUTED 14960: eafffff4 b 14938 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 14964: ebffdd85 bl bf80 <__errno> 14968: e3a03016 mov r3, #22 ; 0x16 1496c: e5803000 str r3, [r0] 14970: e1a04005 mov r4, r5 14974: eaffffef b 14938 /* * 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) 14978: e59f3074 ldr r3, [pc, #116] ; 149f4 1497c: e5932000 ldr r2, [r3] 14980: e3520000 cmp r2, #0 ; 0x0 14984: 0a000001 beq 14990 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 14988: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 1498c: eaffffe9 b 14938 <== NOT EXECUTED if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 14990: e59f3060 ldr r3, [pc, #96] ; 149f8 14994: e5932000 ldr r2, [r3] 14998: e3520000 cmp r2, #0 ; 0x0 1499c: 0affffd5 beq 148f8 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 149a0: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 149a4: eaffffe3 b 14938 <== 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 ); 149a8: e1a00006 mov r0, r6 149ac: ebffd30c bl 95e4 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 149b0: e5973004 ldr r3, [r7, #4] if ( !new_area ) { 149b4: e2505000 subs r5, r0, #0 ; 0x0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 149b8: e2433001 sub r3, r3, #1 ; 0x1 149bc: e5873004 str r3, [r7, #4] if ( !new_area ) { 149c0: 0afffff0 beq 14988 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 149c4: e59d2000 ldr r2, [sp] 149c8: e1a01004 mov r1, r4 149cc: e1560002 cmp r6, r2 149d0: 31a02006 movcc r2, r6 149d4: ebffdf33 bl c6a8 free( ptr ); 149d8: e1a00004 mov r0, r4 149dc: ebffd190 bl 9024 149e0: e1a04005 mov r4, r5 149e4: eaffffd3 b 14938 149e8: 000170b4 .word 0x000170b4 149ec: 00016df4 .word 0x00016df4 149f0: 00016d9c .word 0x00016d9c 149f4: 00016f0c .word 0x00016f0c 149f8: 00016fa0 .word 0x00016fa0 0001fe74 : #include int rmdir( const char *pathname ) { 1fe74: e92d4030 push {r4, r5, lr} /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 1fe78: e3a01000 mov r1, #0 ; 0x0 #include int rmdir( const char *pathname ) { 1fe7c: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 1fe80: e1a0200d mov r2, sp 1fe84: e1a03001 mov r3, r1 1fe88: ebff8fdd bl 3e04 if ( result != 0 ) 1fe8c: e3500000 cmp r0, #0 ; 0x0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 1fe90: e1a0500d mov r5, sp if ( result != 0 ) 1fe94: 0a000003 beq 1fea8 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); rtems_filesystem_freenode( &loc ); 1fe98: e3e04000 mvn r4, #0 ; 0x0 return result; } 1fe9c: e1a00004 mov r0, r4 1fea0: e28dd010 add sp, sp, #16 ; 0x10 1fea4: 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 ); 1fea8: e2800002 add r0, r0, #2 ; 0x2 1feac: e1a0100d mov r1, sp 1feb0: ebff8fa9 bl 3d5c if (result != 0) { 1feb4: e3500000 cmp r0, #0 ; 0x0 1feb8: 1a000027 bne 1ff5c /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 1febc: e59d2008 ldr r2, [sp, #8] 1fec0: e5923010 ldr r3, [r2, #16] 1fec4: e3530000 cmp r3, #0 ; 0x0 1fec8: 0a00002e beq 1ff88 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 1fecc: e1a0000d mov r0, sp 1fed0: e1a0e00f mov lr, pc 1fed4: e12fff13 bx r3 1fed8: e3500001 cmp r0, #1 ; 0x1 1fedc: 1a000011 bne 1ff28 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 1fee0: e59d3004 ldr r3, [sp, #4] 1fee4: e5933034 ldr r3, [r3, #52] 1fee8: e3530000 cmp r3, #0 ; 0x0 1feec: 0a000030 beq 1ffb4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); 1fef0: e1a0000d mov r0, sp 1fef4: e1a0e00f mov lr, pc 1fef8: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 1fefc: e59d3008 ldr r3, [sp, #8] 1ff00: e3530000 cmp r3, #0 ; 0x0 if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); 1ff04: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 1ff08: 0affffe3 beq 1fe9c 1ff0c: e593301c ldr r3, [r3, #28] 1ff10: e3530000 cmp r3, #0 ; 0x0 1ff14: 0affffe0 beq 1fe9c 1ff18: e1a0000d mov r0, sp 1ff1c: e1a0e00f mov lr, pc 1ff20: e12fff13 bx r3 1ff24: eaffffdc b 1fe9c 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 ); 1ff28: e59d3008 ldr r3, [sp, #8] 1ff2c: e3530000 cmp r3, #0 ; 0x0 1ff30: 0a000004 beq 1ff48 1ff34: e593301c ldr r3, [r3, #28] 1ff38: e3530000 cmp r3, #0 ; 0x0 1ff3c: 11a0000d movne r0, sp 1ff40: 11a0e00f movne lr, pc 1ff44: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1ff48: eb0036f8 bl 2db30 <__errno> 1ff4c: e3a03014 mov r3, #20 ; 0x14 1ff50: e5803000 str r3, [r0] 1ff54: e3e04000 mvn r4, #0 ; 0x0 1ff58: eaffffcf b 1fe9c if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0) { rtems_filesystem_freenode( &loc ); 1ff5c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1ff60: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ff64: 0affffcb beq 1fe98 <== NOT EXECUTED 1ff68: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1ff6c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ff70: 0affffc8 beq 1fe98 <== NOT EXECUTED 1ff74: e1a0000d mov r0, sp <== NOT EXECUTED 1ff78: e1a0e00f mov lr, pc <== NOT EXECUTED 1ff7c: e12fff13 bx r3 <== NOT EXECUTED 1ff80: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 1ff84: eaffffc4 b 1fe9c <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 1ff88: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1ff8c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ff90: 0a000002 beq 1ffa0 <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 1ff94: e1a0000d mov r0, sp <== NOT EXECUTED 1ff98: e1a0e00f mov lr, pc <== NOT EXECUTED 1ff9c: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1ffa0: eb0036e2 bl 2db30 <__errno> <== NOT EXECUTED 1ffa4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1ffa8: e5803000 str r3, [r0] <== NOT EXECUTED 1ffac: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 1ffb0: eaffffb9 b 1fe9c <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 1ffb4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1ffb8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ffbc: 0afffff7 beq 1ffa0 <== NOT EXECUTED 1ffc0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1ffc4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ffc8: 1afffff1 bne 1ff94 <== NOT EXECUTED 1ffcc: eafffff3 b 1ffa0 <== NOT EXECUTED 000152bc : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 152bc: e59f0000 ldr r0, [pc, #0] ; 152c4 <== NOT EXECUTED 152c0: e12fff1e bx lr <== NOT EXECUTED 152c4: 000226dc .word 0x000226dc 000109c0 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 109c0: e92d4010 push {r4, lr} <== NOT EXECUTED 109c4: e1a04001 mov r4, r1 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 109c8: eb000006 bl 109e8 <== NOT EXECUTED if (nap) 109cc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 109d0: 0a000001 beq 109dc <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 109d4: e5900000 ldr r0, [r0] <== NOT EXECUTED 109d8: 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); 109dc: e1a00004 mov r0, r4 <== NOT EXECUTED } 109e0: 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); 109e4: ea001234 b 152bc <== NOT EXECUTED 0000bea4 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { bea4: e92d4030 push {r4, r5, lr} bea8: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) beac: e5900000 ldr r0, [r0] beb0: e3500000 cmp r0, #0 ; 0x0 const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { beb4: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) beb8: 01a04000 moveq r4, r0 bebc: 0a000013 beq bf10 bec0: e59f105c ldr r1, [pc, #92] ; bf24 bec4: eb0004fb bl d2b8 bec8: e3500000 cmp r0, #0 ; 0x0 becc: 13a02000 movne r2, #0 ; 0x0 bed0: 1a00000b bne bf04 default_ap = ap++; for ( ; ap->name; ap++) bed4: e594300c ldr r3, [r4, #12] <== NOT EXECUTED bed8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; bedc: e284300c add r3, r4, #12 ; 0xc <== NOT EXECUTED for ( ; ap->name; ap++) bee0: 0a00000a beq bf10 <== NOT EXECUTED bee4: e1a02004 mov r2, r4 <== NOT EXECUTED bee8: e1a04003 mov r4, r3 <== NOT EXECUTED if (ap->local_value == local_value) beec: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED bef0: e1530005 cmp r3, r5 <== NOT EXECUTED bef4: 0a000005 beq bf10 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) bef8: e5b4300c ldr r3, [r4, #12]! befc: e3530000 cmp r3, #0 ; 0x0 bf00: 0a000004 beq bf18 if (ap->local_value == local_value) bf04: e5943004 ldr r3, [r4, #4] bf08: e1530005 cmp r3, r5 bf0c: 1afffff9 bne bef8 return ap; return default_ap; } bf10: e1a00004 mov r0, r4 bf14: 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++) bf18: e1a04002 mov r4, r2 if (ap->local_value == local_value) return ap; return default_ap; } bf1c: e1a00004 mov r0, r4 bf20: e8bd8030 pop {r4, r5, pc} bf24: 000169bc .word 0x000169bc 0000b56c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { b56c: e92d4030 push {r4, r5, lr} b570: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) b574: e5900000 ldr r0, [r0] b578: e3500000 cmp r0, #0 ; 0x0 const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { b57c: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) b580: 01a04000 moveq r4, r0 b584: 0a000013 beq b5d8 b588: e59f105c ldr r1, [pc, #92] ; b5ec b58c: eb000749 bl d2b8 b590: e3500000 cmp r0, #0 ; 0x0 b594: 13a02000 movne r2, #0 ; 0x0 b598: 1a00000b bne b5cc default_ap = ap++; for ( ; ap->name; ap++) b59c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED b5a0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; b5a4: e284300c add r3, r4, #12 ; 0xc <== NOT EXECUTED for ( ; ap->name; ap++) b5a8: 0a00000a beq b5d8 <== NOT EXECUTED b5ac: e1a02004 mov r2, r4 <== NOT EXECUTED b5b0: e1a04003 mov r4, r3 <== NOT EXECUTED if (ap->remote_value == remote_value) b5b4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED b5b8: e1530005 cmp r3, r5 <== NOT EXECUTED b5bc: 0a000005 beq b5d8 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) b5c0: e5b4300c ldr r3, [r4, #12]! b5c4: e3530000 cmp r3, #0 ; 0x0 b5c8: 0a000004 beq b5e0 if (ap->remote_value == remote_value) b5cc: e5943008 ldr r3, [r4, #8] b5d0: e1530005 cmp r3, r5 b5d4: 1afffff9 bne b5c0 return ap; return default_ap; } b5d8: e1a00004 mov r0, r4 b5dc: 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++) b5e0: e1a04002 mov r4, r2 if (ap->remote_value == remote_value) return ap; return default_ap; } b5e4: e1a00004 mov r0, r4 b5e8: e8bd8030 pop {r4, r5, pc} b5ec: 000169bc .word 0x000169bc 0000b5f0 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { b5f0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); b5f4: eb00022a bl bea4 <== NOT EXECUTED if (nap) b5f8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return nap->remote_value; b5fc: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } b600: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00003ee4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 3ee4: e92d4010 push {r4, lr} if ( !time_buffer ) 3ee8: e2514000 subs r4, r1, #0 ; 0x0 3eec: 03a00009 moveq r0, #9 ; 0x9 3ef0: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 3ef4: e3500004 cmp r0, #4 ; 0x4 3ef8: 979ff100 ldrls pc, [pc, r0, lsl #2] 3efc: ea000004 b 3f14 3f00: 00003f1c .word 0x00003f1c <== NOT EXECUTED 3f04: 00003f28 .word 0x00003f28 <== NOT EXECUTED 3f08: 00003f34 .word 0x00003f34 <== NOT EXECUTED 3f0c: 00003f44 .word 0x00003f44 <== NOT EXECUTED 3f10: 00003f54 .word 0x00003f54 <== NOT EXECUTED 3f14: e3a0000a mov r0, #10 ; 0xa 3f18: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 3f1c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f20: 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 ); 3f24: ea000027 b 3fc8 case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 3f28: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f2c: 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); 3f30: ea00000a b 3f60 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 3f34: eb00001f bl 3fb8 3f38: e5840000 str r0, [r4] 3f3c: e3a00000 mov r0, #0 ; 0x0 3f40: 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(); 3f44: eb000013 bl 3f98 3f48: e5840000 str r0, [r4] 3f4c: e3a00000 mov r0, #0 ; 0x0 3f50: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 3f54: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f58: 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 ); 3f5c: ea00004c b 4094 0000b15c : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { b15c: e92d4010 push {r4, lr} <== NOT EXECUTED b160: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) b164: e59f0018 ldr r0, [pc, #24] ; b184 <== NOT EXECUTED b168: eb000120 bl b5f0 <== NOT EXECUTED b16c: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED b170: 0a000001 beq b17c <== NOT EXECUTED { errno = rc; b174: eb000381 bl bf80 <__errno> <== NOT EXECUTED b178: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } b17c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED b180: e8bd8010 pop {r4, pc} <== NOT EXECUTED b184: 000160b8 .word 0x000160b8 00006994 : int rtems_error( int error_flag, const char *printf_format, ... ) { 6994: e92d000e push {r1, r2, r3} <== NOT EXECUTED 6998: 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); 699c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 69a0: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 69a4: ebffff7b bl 6798 <== NOT EXECUTED va_end(arglist); return chars_written; } 69a8: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 69ac: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 69b0: e12fff1e bx lr <== NOT EXECUTED 000012ec : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 12ec: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 12f0: e3510000 cmp r1, #0 ; 0x0 int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 12f4: e24dd010 sub sp, sp, #16 ; 0x10 12f8: e1a0e000 mov lr, r0 rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 12fc: 0a00001e beq 137c rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 1300: e5913008 ldr r3, [r1, #8] 1304: e593c000 ldr ip, [r3] 1308: e35c0000 cmp ip, #0 ; 0x0 130c: 0a000015 beq 1368 rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 1310: e891000f ldm r1, {r0, r1, r2, r3} 1314: e88d000f stm sp, {r0, r1, r2, r3} result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 1318: e1a0100e mov r1, lr 131c: e59f006c ldr r0, [pc, #108] ; 1390 1320: e1a0200d mov r2, sp 1324: e1a0e00f mov lr, pc 1328: e12fff1c bx ip if (result != 0){ 132c: 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; 1330: e1a0400d mov r4, sp result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); if (result != 0){ 1334: 13e05000 mvnne r5, #0 ; 0x0 1338: 1a000007 bne 135c return -1; } rtems_filesystem_freenode( &parent ); 133c: e59d3008 ldr r3, [sp, #8] 1340: e3530000 cmp r3, #0 ; 0x0 1344: 0a000004 beq 135c 1348: e593301c ldr r3, [r3, #28] 134c: e3530000 cmp r3, #0 ; 0x0 1350: 11a0000d movne r0, sp 1354: 11a0e00f movne lr, pc 1358: 112fff13 bxne r3 return result; } 135c: e1a00005 mov r0, r5 1360: e28dd010 add sp, sp, #16 ; 0x10 1364: 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 ); 1368: eb002b04 bl bf80 <__errno> <== NOT EXECUTED 136c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1370: e5803000 str r3, [r0] <== NOT EXECUTED 1374: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 1378: eafffff7 b 135c <== NOT EXECUTED { rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 137c: eb002aff bl bf80 <__errno> <== NOT EXECUTED 1380: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 1384: e5803000 str r3, [r0] <== NOT EXECUTED 1388: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED 138c: eafffff2 b 135c <== NOT EXECUTED 1390: 00016684 .word 0x00016684 00001394 : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1394: e92d40f0 push {r4, r5, r6, r7, lr} /* * Verify Input parameters. */ if ( !pathname ) 1398: e2505000 subs r5, r0, #0 ; 0x0 const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 139c: e1a07001 mov r7, r1 13a0: e1a04002 mov r4, r2 13a4: e1a06003 mov r6, r3 /* * Verify Input parameters. */ if ( !pathname ) 13a8: 0a000043 beq 14bc rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 13ac: e3520000 cmp r2, #0 ; 0x0 13b0: 0a000046 beq 14d0 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 13b4: e5d53000 ldrb r3, [r5] 13b8: e353005c cmp r3, #92 ; 0x5c 13bc: 1353002f cmpne r3, #47 ; 0x2f 13c0: 13a0e000 movne lr, #0 ; 0x0 13c4: 03a0e001 moveq lr, #1 ; 0x1 13c8: 1a000028 bne 1470 13cc: e59f3110 ldr r3, [pc, #272] ; 14e4 13d0: e593c000 ldr ip, [r3] 13d4: e28cc014 add ip, ip, #20 ; 0x14 13d8: e89c000f ldm ip, {r0, r1, r2, r3} 13dc: e884000f stm r4, {r0, r1, r2, r3} 13e0: e3a02001 mov r2, #1 ; 0x1 if ( !pathloc->ops->evalpath_h ) 13e4: e5943008 ldr r3, [r4, #8] 13e8: e5933000 ldr r3, [r3] 13ec: e3530000 cmp r3, #0 ; 0x0 13f0: 0a00002c beq 14a8 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 13f4: e0850002 add r0, r5, r2 13f8: e1a01007 mov r1, r7 13fc: e1a02004 mov r2, r4 1400: e1a0e00f mov lr, pc 1404: e12fff13 bx r3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 1408: e2703001 rsbs r3, r0, #1 ; 0x1 140c: 33a03000 movcc r3, #0 ; 0x0 1410: e3560000 cmp r6, #0 ; 0x0 1414: 03a03000 moveq r3, #0 ; 0x0 1418: e3530000 cmp r3, #0 ; 0x0 141c: 08bd80f0 popeq {r4, r5, r6, r7, pc} if ( !pathloc->ops->node_type_h ){ 1420: e5942008 ldr r2, [r4, #8] 1424: e5923010 ldr r3, [r2, #16] 1428: e3530000 cmp r3, #0 ; 0x0 142c: 0a000018 beq 1494 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 1430: e1a00004 mov r0, r4 1434: e1a0e00f mov lr, pc 1438: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 143c: e2400003 sub r0, r0, #3 ; 0x3 1440: e3500001 cmp r0, #1 ; 0x1 1444: 83a00000 movhi r0, #0 ; 0x0 1448: 88bd80f0 pophi {r4, r5, r6, r7, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 144c: e5942008 ldr r2, [r4, #8] 1450: e5923034 ldr r3, [r2, #52] 1454: e3530000 cmp r3, #0 ; 0x0 1458: 0a00000d beq 1494 * 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 ); 145c: e1a00004 mov r0, r4 1460: e1a01007 mov r1, r7 1464: e1a0e00f mov lr, pc 1468: e12fff13 bx r3 } } return result; } 146c: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 1470: e3530000 cmp r3, #0 ; 0x0 1474: 0affffd4 beq 13cc 1478: e59f3064 ldr r3, [pc, #100] ; 14e4 147c: e593c000 ldr ip, [r3] 1480: e28cc004 add ip, ip, #4 ; 0x4 1484: e89c000f ldm ip, {r0, r1, r2, r3} 1488: e884000f stm r4, {r0, r1, r2, r3} 148c: e1a0200e mov r2, lr 1490: eaffffd3 b 13e4 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 1494: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1498: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 149c: 11a00004 movne r0, r4 <== NOT EXECUTED 14a0: 11a0e00f movne lr, pc <== NOT EXECUTED 14a4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 14a8: eb002ab4 bl bf80 <__errno> <== NOT EXECUTED 14ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 14b0: e5803000 str r3, [r0] <== NOT EXECUTED 14b4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 14bc: eb002aaf bl bf80 <__errno> 14c0: e3a0300e mov r3, #14 ; 0xe 14c4: e5803000 str r3, [r0] 14c8: e3e00000 mvn r0, #0 ; 0x0 14cc: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 14d0: eb002aaa bl bf80 <__errno> <== NOT EXECUTED 14d4: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 14d8: e5803000 str r3, [r0] <== NOT EXECUTED 14dc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14e0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 14e4: 00015668 .word 0x00015668 00008e0c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 8e0c: e92d4070 push {r4, r5, r6, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8e10: e59f60fc ldr r6, [pc, #252] ; 8f14 8e14: e5962000 ldr r2, [r6] 8e18: e3a03012 mov r3, #18 ; 0x12 8e1c: e5823024 str r3, [r2, #36] * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 8e20: e24dd018 sub sp, sp, #24 ; 0x18 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 8e24: eb00022e bl 96e4 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8e28: e59f30e8 ldr r3, [pc, #232] ; 8f18 8e2c: e5932000 ldr r2, [r3] 8e30: e3520000 cmp r2, #0 ; 0x0 8e34: 0a00002a beq 8ee4 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 8e38: e59f30dc ldr r3, [pc, #220] ; 8f1c 8e3c: e5930000 ldr r0, [r3] status = mount( 8e40: e890100e ldm r0, {r1, r2, r3, ip} 8e44: e28d0014 add r0, sp, #20 ; 0x14 8e48: e58dc000 str ip, [sp] 8e4c: eb00022b bl 9700 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 8e50: e3700001 cmn r0, #1 ; 0x1 8e54: 0a000026 beq 8ef4 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8e58: e59de014 ldr lr, [sp, #20] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 8e5c: 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; 8e60: e28ee018 add lr, lr, #24 ; 0x18 8e64: e89e000f ldm lr, {r0, r1, r2, r3} 8e68: e285c014 add ip, r5, #20 ; 0x14 8e6c: e88c000f stm ip, {r0, r1, r2, r3} /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 8e70: e28d4004 add r4, sp, #4 ; 0x4 8e74: 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; 8e78: e3a03000 mov r3, #0 ; 0x0 8e7c: 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); 8e80: e1a02004 mov r2, r4 8e84: e1a03001 mov r3, r1 8e88: e59f0090 ldr r0, [pc, #144] ; 8f20 8e8c: ebffe140 bl 1394 rtems_filesystem_root = loc; 8e90: e596c000 ldr ip, [r6] 8e94: e894000f ldm r4, {r0, r1, r2, r3} 8e98: e28cc014 add ip, ip, #20 ; 0x14 8e9c: e88c000f stm ip, {r0, r1, r2, r3} /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 8ea0: e3a01000 mov r1, #0 ; 0x0 8ea4: e1a02004 mov r2, r4 8ea8: e1a03001 mov r3, r1 8eac: e59f006c ldr r0, [pc, #108] ; 8f20 8eb0: ebffe137 bl 1394 rtems_filesystem_current = loc; 8eb4: e596c000 ldr ip, [r6] 8eb8: e894000f ldm r4, {r0, r1, r2, r3} 8ebc: e28cc004 add ip, ip, #4 ; 0x4 8ec0: 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); 8ec4: e3a01f7f mov r1, #508 ; 0x1fc 8ec8: e2811003 add r1, r1, #3 ; 0x3 8ecc: e59f0050 ldr r0, [pc, #80] ; 8f24 8ed0: eb0001ff bl 96d4 if ( status != 0 ) 8ed4: e3500000 cmp r0, #0 ; 0x0 8ed8: 1a000009 bne 8f04 * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ #endif } 8edc: e28dd018 add sp, sp, #24 ; 0x18 8ee0: e8bd8070 pop {r4, r5, r6, pc} /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 8ee4: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 8ee8: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 8eec: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 8ef0: ebffeff5 bl 4ecc <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 8ef4: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 8ef8: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 8efc: e2800002 add r0, r0, #2 ; 0x2 <== NOT EXECUTED 8f00: ebffeff1 bl 4ecc <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 8f04: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 8f08: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 8f0c: e2800003 add r0, r0, #3 ; 0x3 <== NOT EXECUTED 8f10: ebffefed bl 4ecc <== NOT EXECUTED 8f14: 00015668 .word 0x00015668 8f18: 00015bf8 .word 0x00015bf8 8f1c: 0001509c .word 0x0001509c 8f20: 00016878 .word 0x00016878 8f24: 0001687c .word 0x0001687c 000203e0 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 203e0: e5903000 ldr r3, [r0] <== NOT EXECUTED 203e4: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 203e8: e1530000 cmp r3, r0 <== NOT EXECUTED 203ec: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 203f0: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED 203f4: e12fff1e bx lr <== NOT EXECUTED 000011b0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 11b0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 11b4: 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 ); 11b8: e1a0200d mov r2, sp <== NOT EXECUTED 11bc: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 11c0: 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 ); 11c4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 11c8: e1a07000 mov r7, 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 ); 11cc: eb000070 bl 1394 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 11d0: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 11d4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 11d8: e3530000 cmp r3, #0 ; 0x0 <== 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 ); 11dc: e1a0800d mov r8, sp <== NOT EXECUTED 11e0: e1a04000 mov r4, r0 <== NOT EXECUTED the_jnode = loc.node_access; 11e4: e59d6000 ldr r6, [sp] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 11e8: 0a000013 beq 123c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 11ec: e1a0000d mov r0, sp <== NOT EXECUTED 11f0: e1a0e00f mov lr, pc <== NOT EXECUTED 11f4: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 11f8: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 11fc: 03540000 cmpeq r4, #0 ; 0x0 <== NOT EXECUTED 1200: 03a04000 moveq r4, #0 ; 0x0 <== NOT EXECUTED 1204: 13a04001 movne r4, #1 ; 0x1 <== NOT EXECUTED 1208: 0a000015 beq 1264 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 120c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1210: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1214: 0a000025 beq 12b0 <== NOT EXECUTED 1218: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 121c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1220: 0a000022 beq 12b0 <== NOT EXECUTED 1224: e1a0000d mov r0, sp <== NOT EXECUTED 1228: e1a0e00f mov lr, pc <== NOT EXECUTED 122c: e12fff13 bx r3 <== NOT EXECUTED 1230: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED rtems_filesystem_freenode( &loc ); #endif return RTEMS_SUCCESSFUL; } 1234: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 1238: 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 ); 123c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1240: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1244: 11a0000d movne r0, sp <== NOT EXECUTED 1248: 11a0e00f movne lr, pc <== NOT EXECUTED 124c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1250: eb002b4a bl bf80 <__errno> <== NOT EXECUTED 1254: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1258: e5803000 str r3, [r0] <== NOT EXECUTED 125c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1260: eafffff3 b 1234 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 1264: e5857000 str r7, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 1268: e1a00007 mov r0, r7 <== NOT EXECUTED 126c: eb003079 bl d458 <== NOT EXECUTED 1270: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 1274: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED 1278: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 127c: e59d2008 ldr r2, [sp, #8] <== 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; 1280: e5963054 ldr r3, [r6, #84] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1284: e3520000 cmp r2, #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; 1288: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 128c: 0a000009 beq 12b8 <== NOT EXECUTED 1290: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1294: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1298: 0a000006 beq 12b8 <== NOT EXECUTED 129c: e1a0000d mov r0, sp <== NOT EXECUTED 12a0: e1a0e00f mov lr, pc <== NOT EXECUTED 12a4: e12fff13 bx r3 <== NOT EXECUTED 12a8: e1a00004 mov r0, r4 <== NOT EXECUTED 12ac: eaffffe0 b 1234 <== NOT EXECUTED 12b0: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED 12b4: eaffffde b 1234 <== NOT EXECUTED 12b8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12bc: eaffffdc b 1234 <== NOT EXECUTED 000062bc : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 62bc: 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 ) { 62c0: e92d00f0 push {r4, r5, r6, r7} 62c4: e1a06000 mov r6, r0 62c8: e1a07002 mov r7, r2 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 62cc: 0a00003e beq 63cc return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 62d0: e3520000 cmp r2, #0 ; 0x0 62d4: 0a00003c beq 63cc return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 62d8: e59c3000 ldr r3, [ip] 62dc: e3530000 cmp r3, #0 ; 0x0 62e0: 0a000036 beq 63c0 return RTEMS_INVALID_ADDRESS; *registered_major = 0; 62e4: e3a03000 mov r3, #0 ; 0x0 62e8: e5873000 str r3, [r7] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 62ec: e59f20e0 ldr r2, [pc, #224] ; 63d4 62f0: e5922000 ldr r2, [r2] 62f4: e1520006 cmp r2, r6 62f8: 93a0000a movls r0, #10 ; 0xa 62fc: 9a00002b bls 63b0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 6300: e3560000 cmp r6, #0 ; 0x0 6304: 1a00001d bne 6380 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 6308: e2526001 subs r6, r2, #1 ; 0x1 630c: 0a000029 beq 63b8 6310: e1a03282 lsl r3, r2, #5 6314: e0433182 sub r3, r3, r2, lsl #3 6318: e59f20b8 ldr r2, [pc, #184] ; 63d8 631c: e5921000 ldr r1, [r2] 6320: e2433018 sub r3, r3, #24 ; 0x18 6324: e0811003 add r1, r1, r3 6328: ea000002 b 6338 632c: e2566001 subs r6, r6, #1 ; 0x1 6330: e2411018 sub r1, r1, #24 ; 0x18 6334: 0a00001f beq 63b8 if ( !_IO_Driver_address_table[major].initialization_entry && 6338: e5913000 ldr r3, [r1] 633c: e3530000 cmp r3, #0 ; 0x0 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 6340: e1a05001 mov r5, r1 if ( !_IO_Driver_address_table[major].initialization_entry && 6344: 1afffff8 bne 632c 6348: e5913004 ldr r3, [r1, #4] 634c: e3530000 cmp r3, #0 ; 0x0 6350: 1afffff5 bne 632c 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; 6354: e8bc000f ldm ip!, {r0, r1, r2, r3} 6358: e1a04005 mov r4, r5 635c: e8a4000f stmia r4!, {r0, r1, r2, r3} 6360: e89c0003 ldm ip, {r0, r1} 6364: e8840003 stm r4, {r0, r1} *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 6368: e3a01000 mov r1, #0 ; 0x0 636c: e1a00006 mov r0, r6 6370: 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; 6374: e5876000 str r6, [r7] return rtems_io_initialize( major, 0, NULL ); } 6378: e8bd00f0 pop {r4, r5, r6, r7} _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 637c: eaffff58 b 60e4 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 6380: e59f2050 ldr r2, [pc, #80] ; 63d8 6384: e1a03286 lsl r3, r6, #5 6388: e5921000 ldr r1, [r2] 638c: e0433186 sub r3, r3, r6, lsl #3 6390: e7912003 ldr r2, [r1, r3] 6394: e3520000 cmp r2, #0 ; 0x0 6398: e0815003 add r5, r1, r3 639c: 1a000002 bne 63ac 63a0: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 63a4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 63a8: 0affffe9 beq 6354 <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63ac: e3a0000c mov r0, #12 ; 0xc } 63b0: e8bd00f0 pop {r4, r5, r6, r7} 63b4: e12fff1e bx lr _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63b8: e3a00005 mov r0, #5 ; 0x5 63bc: eafffffb b 63b0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 63c0: e59c3004 ldr r3, [ip, #4] 63c4: e3530000 cmp r3, #0 ; 0x0 63c8: 1affffc5 bne 62e4 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63cc: e3a00009 mov r0, #9 ; 0x9 63d0: eafffff6 b 63b0 63d4: 0001b500 .word 0x0001b500 63d8: 0001b504 .word 0x0001b504 000014e8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 14e8: e92d4010 push {r4, lr} rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 14ec: e59f40b4 ldr r4, [pc, #180] ; 15a8 14f0: e5940000 ldr r0, [r4] 14f4: e3500000 cmp r0, #0 ; 0x0 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 14f8: e24dd004 sub sp, sp, #4 ; 0x4 rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 14fc: 0a00001a beq 156c { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1500: e3a01034 mov r1, #52 ; 0x34 1504: eb001e87 bl 8f28 1508: e59f309c ldr r3, [pc, #156] ; 15ac sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 150c: 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, 1510: e5830000 str r0, [r3] 1514: e1a02000 mov r2, r0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1518: 0a00001f beq 159c 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++) 151c: 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; 1520: e59f3088 ldr r3, [pc, #136] ; 15b0 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 1524: 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; 1528: e5830000 str r0, [r3] for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 152c: 0a00000c beq 1564 1530: e2803034 add r3, r0, #52 ; 0x34 1534: e3a02001 mov r2, #1 ; 0x1 iop->data1 = iop + 1; 1538: 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++) 153c: e1520001 cmp r2, r1 iop->data1 = iop + 1; 1540: e503300c str r3, [r3, #-12] 1544: 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++) 1548: 1afffffa bne 1538 154c: e1a03202 lsl r3, r2, #4 1550: e0433102 sub r3, r3, r2, lsl #2 1554: e0833002 add r3, r3, r2 1558: e1a03103 lsl r3, r3, #2 155c: e2433034 sub r3, r3, #52 ; 0x34 1560: e0802003 add r2, r0, r3 iop->data1 = iop + 1; iop->data1 = NULL; 1564: e3a03000 mov r3, #0 ; 0x0 1568: e5823028 str r3, [r2, #40] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 156c: e59fc040 ldr ip, [pc, #64] ; 15b4 1570: e59f0040 ldr r0, [pc, #64] ; 15b8 1574: e3a01001 mov r1, #1 ; 0x1 1578: e3a02054 mov r2, #84 ; 0x54 157c: e3a03000 mov r3, #0 ; 0x0 1580: e58dc000 str ip, [sp] 1584: eb000bee bl 4544 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1588: e3500000 cmp r0, #0 ; 0x0 158c: 1a000004 bne 15a4 /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); } 1590: e28dd004 add sp, sp, #4 ; 0x4 1594: e8bd4010 pop {r4, lr} /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 1598: ea001e1b b 8e0c 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); 159c: e280001a add r0, r0, #26 ; 0x1a <== NOT EXECUTED 15a0: eb000e49 bl 4ecc <== 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 ); 15a4: eb000e48 bl 4ecc <== NOT EXECUTED 15a8: 00015094 .word 0x00015094 15ac: 00016d90 .word 0x00016d90 15b0: 00016d94 .word 0x00016d94 15b4: 00016d98 .word 0x00016d98 15b8: 4c42494f .word 0x4c42494f 0001fa38 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 1fa38: 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); 1fa3c: e3a00000 mov r0, #0 ; 0x0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 1fa40: 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); 1fa44: e1a01000 mov r1, r0 1fa48: e28d2010 add r2, sp, #16 ; 0x10 1fa4c: eb0006b8 bl 21534 if (sc != RTEMS_SUCCESSFUL) return sc; 1fa50: e2506000 subs r6, r0, #0 ; 0x0 1fa54: 1a000029 bne 1fb00 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 1fa58: e59f70ec ldr r7, [pc, #236] ; 1fb4c 1fa5c: e59f50ec ldr r5, [pc, #236] ; 1fb50 1fa60: e5973000 ldr r3, [r7] 1fa64: e1530005 cmp r3, r5 1fa68: 0a000027 beq 1fb0c return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 1fa6c: e5974000 ldr r4, [r7] 1fa70: e1a0c005 mov ip, r5 1fa74: e8bc000f ldm ip!, {r0, r1, r2, r3} 1fa78: e1a0e004 mov lr, r4 1fa7c: e8ae000f stmia lr!, {r0, r1, r2, r3} 1fa80: e8bc000f ldm ip!, {r0, r1, r2, r3} 1fa84: e8ae000f stmia lr!, {r0, r1, r2, r3} 1fa88: e8bc000f ldm ip!, {r0, r1, r2, r3} 1fa8c: e8ae000f stmia lr!, {r0, r1, r2, r3} 1fa90: e89c000f ldm ip, {r0, r1, r2, r3} 1fa94: 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; 1fa98: e59f20b4 ldr r2, [pc, #180] ; 1fb54 } 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*/ 1fa9c: e59d3010 ldr r3, [sp, #16] 1faa0: e4843014 str r3, [r4], #20 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 1faa4: e592c000 ldr ip, [r2] 1faa8: e28cc018 add ip, ip, #24 ; 0x18 1faac: e89c000f ldm ip, {r0, r1, r2, r3} 1fab0: 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); 1fab4: e3a01000 mov r1, #0 ; 0x0 1fab8: e1a0200d mov r2, sp 1fabc: e1a03001 mov r3, r1 1fac0: e59f0090 ldr r0, [pc, #144] ; 1fb58 1fac4: ebff90ce bl 3e04 rtems_filesystem_root = loc; 1fac8: e597c000 ldr ip, [r7] 1facc: e89d000f ldm sp, {r0, r1, r2, r3} 1fad0: e28cc014 add ip, ip, #20 ; 0x14 1fad4: e88c000f stm ip, {r0, r1, r2, r3} rtems_filesystem_evaluate_path("/", 0, &loc, 0); 1fad8: e3a01000 mov r1, #0 ; 0x0 1fadc: e1a0200d mov r2, sp 1fae0: e1a03001 mov r3, r1 1fae4: e59f006c ldr r0, [pc, #108] ; 1fb58 1fae8: ebff90c5 bl 3e04 rtems_filesystem_current = loc; 1faec: e597c000 ldr ip, [r7] 1faf0: e89d000f ldm sp, {r0, r1, r2, r3} 1faf4: e28cc004 add ip, ip, #4 ; 0x4 1faf8: e88c000f stm ip, {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); 1fafc: e1a0500d mov r5, sp rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 1fb00: e1a00006 mov r0, r6 1fb04: e28dd014 add sp, sp, #20 ; 0x14 1fb08: 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)); 1fb0c: e2800040 add r0, r0, #64 ; 0x40 1fb10: ebff92b0 bl 45d8 if (!tmp) 1fb14: e2508000 subs r8, r0, #0 ; 0x0 1fb18: 03a0601a moveq r6, #26 ; 0x1a 1fb1c: 0afffff7 beq 1fb00 #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); 1fb20: e1a00006 mov r0, r6 1fb24: e1a01007 mov r1, r7 1fb28: e59f202c ldr r2, [pc, #44] ; 1fb5c 1fb2c: eb00078b bl 21960 if (sc != RTEMS_SUCCESSFUL) { 1fb30: e2504000 subs r4, r0, #0 ; 0x0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 1fb34: 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) { 1fb38: 0affffcb beq 1fa6c /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 1fb3c: e1a00008 mov r0, r8 <== NOT EXECUTED 1fb40: ebff9104 bl 3f58 <== NOT EXECUTED 1fb44: e1a06004 mov r6, r4 <== NOT EXECUTED 1fb48: eaffffec b 1fb00 <== NOT EXECUTED 1fb4c: 000402b8 .word 0x000402b8 1fb50: 0005ad3c .word 0x0005ad3c 1fb54: 0005a628 .word 0x0005a628 1fb58: 00045438 .word 0x00045438 1fb5c: 0001f924 .word 0x0001f924 0001f988 : * 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) { 1f988: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 1f98c: e1a05000 mov r5, r0 <== NOT EXECUTED 1f990: 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); 1f994: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1f998: e1a0200d mov r2, sp <== NOT EXECUTED 1f99c: e1a01000 mov r1, r0 <== NOT EXECUTED 1f9a0: eb0006e3 bl 21534 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 1f9a4: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED 1f9a8: 1a00000d bne 1f9e4 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 1f9ac: e59f6078 ldr r6, [pc, #120] ; 1fa2c <== NOT EXECUTED 1f9b0: e5964000 ldr r4, [r6] <== NOT EXECUTED 1f9b4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 1f9b8: e5942000 ldr r2, [r4] <== NOT EXECUTED 1f9bc: e1520003 cmp r2, r3 <== NOT EXECUTED 1f9c0: 0a00000a beq 1f9f0 <== 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, 1f9c4: e28d2004 add r2, sp, #4 ; 0x4 <== NOT EXECUTED 1f9c8: e1a00005 mov r0, r5 <== NOT EXECUTED 1f9cc: e59f1058 ldr r1, [pc, #88] ; 1fa2c <== NOT EXECUTED 1f9d0: eb000834 bl 21aa8 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 1f9d4: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED 1f9d8: 0a00000b beq 1fa0c <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 1f9dc: e59f304c ldr r3, [pc, #76] ; 1fa30 <== NOT EXECUTED 1f9e0: e5863000 str r3, [r6] <== NOT EXECUTED return sc; } 1f9e4: e1a00002 mov r0, r2 <== NOT EXECUTED 1f9e8: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1f9ec: 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); 1f9f0: e1a01006 mov r1, r6 <== NOT EXECUTED 1f9f4: eb000806 bl 21a14 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 1f9f8: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED 1f9fc: 1afffff8 bne 1f9e4 <== NOT EXECUTED free_user_env(tmp); 1fa00: e1a00004 mov r0, r4 <== NOT EXECUTED 1fa04: ebffffc6 bl 1f924 <== NOT EXECUTED 1fa08: eaffffed b 1f9c4 <== 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); 1fa0c: e59f2020 ldr r2, [pc, #32] ; 1fa34 <== NOT EXECUTED 1fa10: e59f1014 ldr r1, [pc, #20] ; 1fa2c <== NOT EXECUTED 1fa14: eb0007d1 bl 21960 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 1fa18: 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; 1fa1c: 059d3004 ldreq r3, [sp, #4] <== NOT EXECUTED 1fa20: 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) 1fa24: 1affffec bne 1f9dc <== NOT EXECUTED 1fa28: eaffffed b 1f9e4 <== NOT EXECUTED 1fa2c: 000402b8 .word 0x000402b8 1fa30: 0005ad3c .word 0x0005ad3c 1fa34: 0001f924 .word 0x0001f924 000046c8 : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 46c8: e92d4010 push {r4, lr} <== NOT EXECUTED 46cc: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 46d0: e1a01000 mov r1, r0 <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 46d4: e1a0200d mov r2, sp <== NOT EXECUTED 46d8: e59f0034 ldr r0, [pc, #52] ; 4714 <== NOT EXECUTED 46dc: eb001500 bl 9ae4 <_Protected_heap_Get_block_size> <== NOT EXECUTED 46e0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 46e4: 0a000008 beq 470c <== NOT EXECUTED MSBUMP(lifetime_freed, size); 46e8: e59f0028 ldr r0, [pc, #40] ; 4718 <== NOT EXECUTED 46ec: e59d3000 ldr r3, [sp] <== NOT EXECUTED 46f0: e2801024 add r1, r0, #36 ; 0x24 <== NOT EXECUTED 46f4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 46f8: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 46fc: e0933001 adds r3, r3, r1 <== NOT EXECUTED 4700: e0a44002 adc r4, r4, r2 <== NOT EXECUTED 4704: e5803024 str r3, [r0, #36] <== NOT EXECUTED 4708: e5804028 str r4, [r0, #40] <== NOT EXECUTED } } 470c: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 4710: e8bd8010 pop {r4, pc} <== NOT EXECUTED 4714: 0005a5a4 .word 0x0005a5a4 4718: 0005a5fc .word 0x0005a5fc 0000471c : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 471c: 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 ) 4720: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED } void rtems_malloc_statistics_at_malloc( void *pointer ) { 4724: 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 ) 4728: 0a000014 beq 4780 <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 472c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 4730: e28d2004 add r2, sp, #4 ; 0x4 <== NOT EXECUTED 4734: 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); 4738: e1a01000 mov r1, r0 <== NOT EXECUTED 473c: e1a0200d mov r2, sp <== NOT EXECUTED 4740: e59f0040 ldr r0, [pc, #64] ; 4788 <== NOT EXECUTED 4744: eb0014e6 bl 9ae4 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 4748: e59fe03c ldr lr, [pc, #60] ; 478c <== NOT EXECUTED 474c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 4750: e28e101c add r1, lr, #28 ; 0x1c <== NOT EXECUTED 4754: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 4758: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 475c: 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); 4760: e0933001 adds r3, r3, r1 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; if (current_depth > s->max_depth) 4764: e59e0018 ldr r0, [lr, #24] <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 4768: e0a44002 adc r4, r4, r2 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 476c: e06c2003 rsb r2, ip, r3 <== NOT EXECUTED if (current_depth > s->max_depth) 4770: e1520000 cmp r2, r0 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 4774: e58e301c str r3, [lr, #28] <== NOT EXECUTED 4778: e58e4020 str r4, [lr, #32] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; if (current_depth > s->max_depth) s->max_depth = current_depth; 477c: 858e2018 strhi r2, [lr, #24] <== NOT EXECUTED } 4780: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 4784: e8bd8010 pop {r4, pc} <== NOT EXECUTED 4788: 0005a5a4 .word 0x0005a5a4 478c: 0005a5fc .word 0x0005a5fc 00004790 : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 4790: e59f1038 ldr r1, [pc, #56] ; 47d0 <== NOT EXECUTED 4794: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 4798: e1a03001 mov r3, r1 <== NOT EXECUTED 479c: e4832004 str r2, [r3], #4 <== NOT EXECUTED 47a0: e2833004 add r3, r3, #4 ; 0x4 <== NOT EXECUTED 47a4: e4832004 str r2, [r3], #4 <== NOT EXECUTED 47a8: e4832004 str r2, [r3], #4 <== NOT EXECUTED 47ac: e4832004 str r2, [r3], #4 <== NOT EXECUTED 47b0: e4832004 str r2, [r3], #4 <== NOT EXECUTED 47b4: e4832004 str r2, [r3], #4 <== NOT EXECUTED 47b8: e4832004 str r2, [r3], #4 <== NOT EXECUTED 47bc: e4832004 str r2, [r3], #4 <== NOT EXECUTED 47c0: e4832004 str r2, [r3], #4 <== NOT EXECUTED 47c4: e5812004 str r2, [r1, #4] <== NOT EXECUTED 47c8: e5832000 str r2, [r3] <== NOT EXECUTED } 47cc: e12fff1e bx lr <== NOT EXECUTED 47d0: 0005a5fc .word 0x0005a5fc 00006970 : void rtems_panic( const char *printf_format, ... ) { 6970: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 6974: 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); 6978: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 697c: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 6980: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED 6984: ebffff83 bl 6798 <== NOT EXECUTED va_end(arglist); } 6988: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 698c: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 6990: e12fff1e bx lr <== NOT EXECUTED 0002b994 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 2b994: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 2b998: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 2b99c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 2b9a0: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED 2b9a4: 0a000007 beq 2b9c8 <== NOT EXECUTED 2b9a8: e1a01000 mov r1, r0 <== NOT EXECUTED 2b9ac: e1a0200d mov r2, sp <== NOT EXECUTED 2b9b0: e59f004c ldr r0, [pc, #76] ; 2ba04 <== NOT EXECUTED 2b9b4: ebff7791 bl 9800 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2b9b8: e59d6000 ldr r6, [sp] <== NOT EXECUTED 2b9bc: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 2b9c0: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 2b9c4: 0a000001 beq 2b9d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2b9c8: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 2b9cc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *statistics = the_period->Statistics; 2b9d0: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED 2b9d4: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9d8: e1a04005 mov r4, r5 <== NOT EXECUTED 2b9dc: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9e0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9e4: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9e8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9ec: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 2b9f0: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED 2b9f4: e8840003 stm r4, {r0, r1} <== NOT EXECUTED _Thread_Enable_dispatch(); 2b9f8: ebff79de bl a178 <_Thread_Enable_dispatch> <== NOT EXECUTED 2b9fc: e1a00006 mov r0, r6 <== NOT EXECUTED 2ba00: eafffff0 b 2b9c8 <== NOT EXECUTED 2ba04: 0005b25c .word 0x0005b25c 0002ba08 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 2ba08: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 2ba0c: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 2ba10: e24dd00c sub sp, sp, #12 ; 0xc Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 2ba14: 03a00009 moveq r0, #9 ; 0x9 2ba18: 0a000016 beq 2ba78 2ba1c: e1a01000 mov r1, r0 2ba20: e28d2008 add r2, sp, #8 ; 0x8 2ba24: e59f0084 ldr r0, [pc, #132] ; 2bab0 2ba28: ebff7774 bl 9800 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2ba2c: e59d3008 ldr r3, [sp, #8] 2ba30: e3530000 cmp r3, #0 ; 0x0 2ba34: e1a06000 mov r6, r0 2ba38: 13a00004 movne r0, #4 ; 0x4 2ba3c: 1a00000d bne 2ba78 case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 2ba40: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED 2ba44: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2ba48: 01a02003 moveq r2, r3 <== NOT EXECUTED 2ba4c: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED status->state = the_period->state; 2ba50: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED if ( status->state == RATE_MONOTONIC_INACTIVE ) { 2ba54: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 2ba58: e885000c stm r5, {r2, r3} <== NOT EXECUTED status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { 2ba5c: 1a000007 bne 2ba80 <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; 2ba60: e5853014 str r3, [r5, #20] <== NOT EXECUTED status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 2ba64: e5853008 str r3, [r5, #8] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 2ba68: e585300c str r3, [r5, #12] <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 2ba6c: e5853010 str r3, [r5, #16] <== NOT EXECUTED the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 2ba70: ebff79c0 bl a178 <_Thread_Enable_dispatch> <== NOT EXECUTED 2ba74: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2ba78: e28dd00c add sp, sp, #12 ; 0xc 2ba7c: e8bd8070 pop {r4, r5, r6, pc} * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 2ba80: e1a0000d mov r0, sp <== NOT EXECUTED 2ba84: ebffd8f4 bl 21e5c <_TOD_Get_uptime> <== NOT EXECUTED #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 2ba88: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED 2ba8c: e1a0100d mov r1, sp <== NOT EXECUTED 2ba90: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED 2ba94: ebff7d79 bl b080 <_Timespec_Subtract> <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 2ba98: e1a0100d mov r1, sp <== NOT EXECUTED 2ba9c: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED 2baa0: e59f000c ldr r0, [pc, #12] ; 2bab4 <== NOT EXECUTED * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 2baa4: e1a0400d mov r4, sp <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 2baa8: ebff7d74 bl b080 <_Timespec_Subtract> <== NOT EXECUTED 2baac: eaffffef b 2ba70 <== NOT EXECUTED 2bab0: 0005b25c .word 0x0005b25c 2bab4: 0005a7cc .word 0x0005a7cc 0002131c : } } void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 2131c: e59f1004 ldr r1, [pc, #4] ; 21328 <== NOT EXECUTED 21320: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 21324: eaffff71 b 210f0 <== NOT EXECUTED 21328: 00005590 .word 0x00005590 000210f0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 210f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 210f4: e2516000 subs r6, r1, #0 ; 0x0 <== NOT EXECUTED */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 210f8: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED 210fc: e1a07000 mov r7, r0 <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 21100: 0a000042 beq 21210 <== NOT EXECUTED return; (*print)( context, "Period information by period\n" ); 21104: e59f11e4 ldr r1, [pc, #484] ; 212f0 <== NOT EXECUTED 21108: e1a0e00f mov lr, pc <== NOT EXECUTED 2110c: e12fff16 bx r6 <== NOT EXECUTED #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 21110: e59f11dc ldr r1, [pc, #476] ; 212f4 <== NOT EXECUTED 21114: e1a00007 mov r0, r7 <== NOT EXECUTED 21118: e1a0e00f mov lr, pc <== NOT EXECUTED 2111c: e12fff16 bx r6 <== NOT EXECUTED #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 21120: e59f11d0 ldr r1, [pc, #464] ; 212f8 <== NOT EXECUTED 21124: e1a00007 mov r0, r7 <== NOT EXECUTED 21128: e1a0e00f mov lr, pc <== NOT EXECUTED 2112c: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 21130: e59f81c4 ldr r8, [pc, #452] ; 212fc <== NOT EXECUTED Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 21134: e59f11c4 ldr r1, [pc, #452] ; 21300 <== NOT EXECUTED 21138: e1a00007 mov r0, r7 <== NOT EXECUTED 2113c: e1a0e00f mov lr, pc <== NOT EXECUTED 21140: e12fff16 bx r6 <== NOT EXECUTED #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 21144: e1a00007 mov r0, r7 <== NOT EXECUTED 21148: e59f11b4 ldr r1, [pc, #436] ; 21304 <== NOT EXECUTED 2114c: e1a0e00f mov lr, pc <== NOT EXECUTED 21150: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 21154: e5985008 ldr r5, [r8, #8] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 21158: e598300c ldr r3, [r8, #12] <== NOT EXECUTED 2115c: e1550003 cmp r5, r3 <== NOT EXECUTED 21160: 8a00002a bhi 21210 <== NOT EXECUTED _Timespec_Divide_by_integer( &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 21164: e59fa19c ldr sl, [pc, #412] ; 21308 <== NOT EXECUTED 21168: e28d9010 add r9, sp, #16 ; 0x10 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2116c: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED 21170: ea000003 b 21184 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 21174: e598300c ldr r3, [r8, #12] <== NOT EXECUTED id++ ) { 21178: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 2117c: e1530005 cmp r3, r5 <== NOT EXECUTED 21180: 3a000022 bcc 21210 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 21184: e1a00005 mov r0, r5 <== NOT EXECUTED 21188: e1a01009 mov r1, r9 <== NOT EXECUTED 2118c: eb002a00 bl 2b994 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) 21190: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 21194: 1afffff6 bne 21174 <== NOT EXECUTED continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 21198: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED 2119c: e1a00005 mov r0, r5 <== NOT EXECUTED 211a0: eb002a18 bl 2ba08 <== NOT EXECUTED continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 211a4: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED 211a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 211ac: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED if ( the_status.owner ) { 211b0: 1a00004a bne 212e0 <== NOT EXECUTED /* * Print part of report line that is not dependent on granularity */ (*print)( context, 211b4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 211b8: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 211bc: e58d3000 str r3, [sp] <== NOT EXECUTED 211c0: e58d2004 str r2, [sp, #4] <== NOT EXECUTED 211c4: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED 211c8: e1a02005 mov r2, r5 <== NOT EXECUTED 211cc: e59f1138 ldr r1, [pc, #312] ; 2130c <== NOT EXECUTED 211d0: e1a00007 mov r0, r7 <== NOT EXECUTED 211d4: e1a0e00f mov lr, pc <== NOT EXECUTED 211d8: e12fff16 bx r6 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 211dc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 211e0: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 211e4: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED 211e8: e1a0200b mov r2, fp <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 211ec: 1a000009 bne 21218 <== NOT EXECUTED (*print)( context, "\n" ); 211f0: e1a00007 mov r0, r7 <== NOT EXECUTED 211f4: e59f1114 ldr r1, [pc, #276] ; 21310 <== NOT EXECUTED 211f8: e1a0e00f mov lr, pc <== NOT EXECUTED 211fc: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 21200: e598300c ldr r3, [r8, #12] <== NOT EXECUTED id++ ) { 21204: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 21208: e1530005 cmp r3, r5 <== NOT EXECUTED 2120c: 2affffdc bcs 21184 <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 21210: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED 21214: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 21218: eb0005c6 bl 22938 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 2121c: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED 21220: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED 21224: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 21228: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED 2122c: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED 21230: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED 21234: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED 21238: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED 2123c: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED 21240: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 21244: e58d2000 str r2, [sp] <== NOT EXECUTED 21248: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED 2124c: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED 21250: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 21254: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED 21258: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED 2125c: e58d000c str r0, [sp, #12] <== NOT EXECUTED 21260: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 21264: e59f10a8 ldr r1, [pc, #168] ; 21314 <== NOT EXECUTED 21268: e1a00007 mov r0, r7 <== NOT EXECUTED 2126c: e1a0e00f mov lr, pc <== NOT EXECUTED 21270: e12fff16 bx r6 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 21274: e28d0040 add r0, sp, #64 ; 0x40 <== NOT EXECUTED 21278: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 2127c: e1a0200b mov r2, fp <== NOT EXECUTED 21280: eb0005ac bl 22938 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 21284: e59d103c ldr r1, [sp, #60] <== NOT EXECUTED 21288: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED 2128c: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 21290: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 21294: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED 21298: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED 2129c: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED 212a0: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED 212a4: e59d2038 ldr r2, [sp, #56] <== NOT EXECUTED 212a8: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 212ac: e58d2000 str r2, [sp] <== NOT EXECUTED 212b0: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED 212b4: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED 212b8: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 212bc: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED 212c0: e58d000c str r0, [sp, #12] <== NOT EXECUTED 212c4: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED 212c8: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED 212cc: e1a00007 mov r0, r7 <== NOT EXECUTED 212d0: e59f1040 ldr r1, [pc, #64] ; 21318 <== NOT EXECUTED 212d4: e1a0e00f mov lr, pc <== NOT EXECUTED 212d8: e12fff16 bx r6 <== NOT EXECUTED 212dc: eaffffa4 b 21174 <== NOT EXECUTED #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 212e0: e28d206b add r2, sp, #107 ; 0x6b <== NOT EXECUTED 212e4: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED 212e8: ebff9a4d bl 7c24 <== NOT EXECUTED 212ec: eaffffb0 b 211b4 <== NOT EXECUTED 212f0: 0004543c .word 0x0004543c 212f4: 0004545c .word 0x0004545c 212f8: 00045480 .word 0x00045480 212fc: 0005b25c .word 0x0005b25c 21300: 000454a4 .word 0x000454a4 21304: 000454f0 .word 0x000454f0 21308: 10624dd3 .word 0x10624dd3 2130c: 0004553c .word 0x0004553c 21310: 000469c4 .word 0x000469c4 21314: 00045554 .word 0x00045554 21318: 00045574 .word 0x00045574 0002132c : 2132c: e59f3040 ldr r3, [pc, #64] ; 21374 <== NOT EXECUTED 21330: e5932000 ldr r2, [r3] <== NOT EXECUTED 21334: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 21338: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2133c: e5832000 str r2, [r3] <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 21340: e59f5030 ldr r5, [pc, #48] ; 21378 <== NOT EXECUTED 21344: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 21348: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 2134c: e1540003 cmp r4, r3 <== NOT EXECUTED 21350: 8a000005 bhi 2136c <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 21354: e1a00004 mov r0, r4 <== NOT EXECUTED 21358: eb000007 bl 2137c <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 2135c: e595300c ldr r3, [r5, #12] <== NOT EXECUTED id++ ) { 21360: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 21364: e1530004 cmp r3, r4 <== NOT EXECUTED 21368: 2afffff9 bcs 21354 <== NOT EXECUTED /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 2136c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 21370: eaffa380 b a178 <_Thread_Enable_dispatch> <== NOT EXECUTED 21374: 0005a70c .word 0x0005a70c 21378: 0005b25c .word 0x0005b25c 0002137c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( Objects_Id id ) { 2137c: e92d4010 push {r4, lr} <== NOT EXECUTED 21380: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 21384: e1a01000 mov r1, r0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 21388: e1a0200d mov r2, sp <== NOT EXECUTED 2138c: e59f005c ldr r0, [pc, #92] ; 213f0 <== NOT EXECUTED 21390: ebffa11a bl 9800 <_Objects_Get> <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 21394: e59d4000 ldr r4, [sp] <== NOT EXECUTED 21398: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 2139c: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 213a0: 1a000010 bne 213e8 <== NOT EXECUTED case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 213a4: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED 213a8: e5803078 str r3, [r0, #120] <== NOT EXECUTED 213ac: e5804054 str r4, [r0, #84] <== NOT EXECUTED 213b0: e5804058 str r4, [r0, #88] <== NOT EXECUTED 213b4: e5804064 str r4, [r0, #100] <== NOT EXECUTED 213b8: e5804068 str r4, [r0, #104] <== NOT EXECUTED 213bc: e580406c str r4, [r0, #108] <== NOT EXECUTED 213c0: e5804070 str r4, [r0, #112] <== NOT EXECUTED 213c4: e580407c str r4, [r0, #124] <== NOT EXECUTED 213c8: e5804080 str r4, [r0, #128] <== NOT EXECUTED 213cc: e5804084 str r4, [r0, #132] <== NOT EXECUTED 213d0: e5804088 str r4, [r0, #136] <== NOT EXECUTED 213d4: e580305c str r3, [r0, #92] <== NOT EXECUTED 213d8: e5803060 str r3, [r0, #96] <== NOT EXECUTED 213dc: e5803074 str r3, [r0, #116] <== NOT EXECUTED _Thread_Enable_dispatch(); 213e0: ebffa364 bl a178 <_Thread_Enable_dispatch> <== NOT EXECUTED 213e4: e1a00004 mov r0, r4 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 213e8: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 213ec: e8bd8010 pop {r4, pc} <== NOT EXECUTED 213f0: 0005b25c .word 0x0005b25c 000110a4 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 110a4: 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 ) 110a8: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 110ac: e1a04000 mov r4, r0 110b0: e24dd008 sub sp, sp, #8 ; 0x8 110b4: 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 ) 110b8: 03a04009 moveq r4, #9 ; 0x9 110bc: 0a000020 beq 11144 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 110c0: e59f80a0 ldr r8, [pc, #160] ; 11168 110c4: e5980000 ldr r0, [r8] 110c8: eb000928 bl 13570 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 110cc: e1a01004 mov r1, r4 110d0: e59f0094 ldr r0, [pc, #148] ; 1116c 110d4: e1a0200d mov r2, sp 110d8: eb000ff5 bl 150b4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 110dc: e59d4000 ldr r4, [sp] 110e0: e3540000 cmp r4, #0 ; 0x0 110e4: e1a05000 mov r5, r0 110e8: 1a000018 bne 11150 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 110ec: e1a01007 mov r1, r7 110f0: e1a02006 mov r2, r6 110f4: e2800068 add r0, r0, #104 ; 0x68 110f8: e28d3004 add r3, sp, #4 ; 0x4 110fc: eb000c3a bl 141ec <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 11100: e3500001 cmp r0, #1 ; 0x1 11104: 03a04009 moveq r4, #9 ; 0x9 11108: 0a00000b beq 1113c 1110c: 2a000007 bcs 11130 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 11110: e59d1004 ldr r1, [sp, #4] 11114: e5952054 ldr r2, [r5, #84] the_region->maximum_segment_size += amount_extended; 11118: e595305c ldr r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 1111c: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; 11120: e0833001 add r3, r3, r1 11124: e585305c str r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 11128: e5852054 str r2, [r5, #84] 1112c: ea000002 b 1113c starting_address, length, &amount_extended ); switch ( heap_status ) { 11130: e3500002 cmp r0, #2 ; 0x2 11134: 0a000009 beq 11160 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 11138: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1113c: e5980000 ldr r0, [r8] 11140: eb000926 bl 135e0 <_API_Mutex_Unlock> return return_status; } 11144: e1a00004 mov r0, r4 11148: e28dd008 add sp, sp, #8 ; 0x8 1114c: 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 ) { 11150: e3540001 cmp r4, #1 ; 0x1 11154: 03a04004 moveq r4, #4 ; 0x4 11158: 1afffff6 bne 11138 1115c: eafffff6 b 1113c switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 11160: e3a04018 mov r4, #24 ; 0x18 11164: eafffff4 b 1113c 11168: 0003287c .word 0x0003287c 1116c: 00032654 .word 0x00032654 0001148c : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 1148c: 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 ) 11490: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { 11494: e24dd010 sub sp, sp, #16 ; 0x10 11498: e1a04000 mov r4, r0 1149c: e1a05001 mov r5, r1 114a0: 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 ) 114a4: 0a000028 beq 1154c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 114a8: e59f70b4 ldr r7, [pc, #180] ; 11564 114ac: e5970000 ldr r0, [r7] 114b0: eb00082e bl 13570 <_API_Mutex_Lock> 114b4: e1a01004 mov r1, r4 114b8: e59f00a8 ldr r0, [pc, #168] ; 11568 114bc: e28d2008 add r2, sp, #8 ; 0x8 114c0: eb000efb bl 150b4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 114c4: e59d3008 ldr r3, [sp, #8] 114c8: e3530000 cmp r3, #0 ; 0x0 114cc: e1a08000 mov r8, r0 114d0: 0a000007 beq 114f4 114d4: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114d8: e5970000 ldr r0, [r7] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 114dc: 03a04004 moveq r4, #4 ; 0x4 114e0: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114e4: eb00083d bl 135e0 <_API_Mutex_Unlock> return return_status; } 114e8: e1a00004 mov r0, r4 114ec: e28dd010 add sp, sp, #16 ; 0x10 114f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 114f4: e1a01005 mov r1, r5 114f8: e28d3004 add r3, sp, #4 ; 0x4 114fc: e28dc00c add ip, sp, #12 ; 0xc 11500: e1a02006 mov r2, r6 11504: e2800068 add r0, r0, #104 ; 0x68 11508: e58dc000 str ip, [sp] 1150c: eb000cc1 bl 14818 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11510: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 11514: e2505000 subs r5, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11518: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 1151c: 1a000005 bne 11538 11520: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED 11524: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 11528: 1a000009 bne 11554 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1152c: e5970000 ldr r0, [r7] <== NOT EXECUTED 11530: eb00082a bl 135e0 <_API_Mutex_Unlock> <== NOT EXECUTED 11534: eaffffeb b 114e8 <== NOT EXECUTED 11538: e5970000 ldr r0, [r7] 1153c: eb000827 bl 135e0 <_API_Mutex_Unlock> return 11540: e3550001 cmp r5, #1 ; 0x1 11544: 03a0400d moveq r4, #13 ; 0xd 11548: 0affffe6 beq 114e8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 1154c: e3a04009 mov r4, #9 ; 0x9 11550: eaffffe4 b 114e8 *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 */ 11554: e1a00008 mov r0, r8 <== NOT EXECUTED 11558: eb0020fe bl 19958 <_Region_Process_queue> <== NOT EXECUTED 1155c: e1a04005 mov r4, r5 <== NOT EXECUTED 11560: eaffffe0 b 114e8 <== NOT EXECUTED 11564: 0003287c .word 0x0003287c 11568: 00032654 .word 0x00032654 00004544 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 4544: 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 ) ) 4548: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 454c: e24dd018 sub sp, sp, #24 ; 0x18 4550: e1a06001 mov r6, r1 4554: e1a04002 mov r4, r2 4558: 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 ) ) 455c: 02800003 addeq r0, r0, #3 ; 0x3 4560: 0a000037 beq 4644 return RTEMS_INVALID_NAME; if ( !id ) 4564: e59d3038 ldr r3, [sp, #56] 4568: e3530000 cmp r3, #0 ; 0x0 456c: 03a00009 moveq r0, #9 ; 0x9 4570: 0a000033 beq 4644 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 4574: e21230c0 ands r3, r2, #192 ; 0xc0 4578: 02025030 andeq r5, r2, #48 ; 0x30 457c: 1a000032 bne 464c 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 ) ) 4580: e3550000 cmp r5, #0 ; 0x0 4584: 0a000002 beq 4594 4588: e3560001 cmp r6, #1 ; 0x1 458c: 83a0000a movhi r0, #10 ; 0xa 4590: 8a00002b bhi 4644 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4594: e59f218c ldr r2, [pc, #396] ; 4728 4598: e5923000 ldr r3, [r2] 459c: e2833001 add r3, r3, #1 ; 0x1 45a0: 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 ); 45a4: e59f9180 ldr r9, [pc, #384] ; 472c 45a8: e1a00009 mov r0, r9 45ac: eb000537 bl 5a90 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 45b0: e2507000 subs r7, r0, #0 ; 0x0 45b4: 0a000048 beq 46dc * 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 ) ) { 45b8: e3550000 cmp r5, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 45bc: 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 ) ) { 45c0: 0a00002e beq 4680 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 45c4: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c8: 13a03002 movne r3, #2 ; 0x2 45cc: 158d3008 strne r3, [sp, #8] */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 45d0: 1a000007 bne 45f4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 45d4: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45d8: 13a03003 movne r3, #3 ; 0x3 45dc: 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 ) ) 45e0: 1a000003 bne 45f4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 45e4: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 45e8: 13a03001 movne r3, #1 ; 0x1 45ec: 158d3008 strne r3, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 45f0: 058d3008 streq r3, [sp, #8] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 45f4: 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; 45f8: 13a03002 movne r3, #2 ; 0x2 the_mutex_attributes.only_owner_release = FALSE; 45fc: 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; 4600: 158d3000 strne r3, [sp] the_mutex_attributes.only_owner_release = FALSE; 4604: 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 ) ) { 4608: 0a000036 beq 46e8 the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 460c: e3560001 cmp r6, #1 ; 0x1 4610: 13a02000 movne r2, #0 ; 0x0 4614: 03a02001 moveq r2, #1 ; 0x1 4618: e2870014 add r0, r7, #20 ; 0x14 461c: 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; 4620: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 4624: eb00032e bl 52e4 <_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 ) { 4628: e3500006 cmp r0, #6 ; 0x6 462c: 1a000020 bne 46b4 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 4630: e59f00f4 ldr r0, [pc, #244] ; 472c <== NOT EXECUTED 4634: e1a01007 mov r1, r7 <== NOT EXECUTED 4638: eb000601 bl 5e44 <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 463c: eb00089f bl 68c0 <_Thread_Enable_dispatch> <== NOT EXECUTED 4640: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4644: e28dd018 add sp, sp, #24 ; 0x18 4648: 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); 464c: 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 ) || 4650: e3550010 cmp r5, #16 ; 0x10 4654: 0a000003 beq 4668 4658: e3550020 cmp r5, #32 ; 0x20 465c: 0a000001 beq 4668 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4660: e3a0000b mov r0, #11 ; 0xb 4664: eafffff6 b 4644 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4668: e3140004 tst r4, #4 ; 0x4 466c: 0afffffb beq 4660 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4670: e35300c0 cmp r3, #192 ; 0xc0 4674: 1affffc1 bne 4580 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4678: e3a0000b mov r0, #11 ; 0xb 467c: eafffff0 b 4644 _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 4680: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 4684: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 4688: 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; 468c: 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( 4690: e1a02006 mov r2, r6 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4694: 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( 4698: e2870014 add r0, r7, #20 ; 0x14 469c: 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; 46a0: 058d5014 streq r5, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 46a4: 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; 46a8: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 46ac: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 46b0: eb0003df bl 5634 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46b4: e5971008 ldr r1, [r7, #8] 46b8: e599201c ldr r2, [r9, #28] 46bc: e1a03801 lsl r3, r1, #16 46c0: e7827723 str r7, [r2, r3, lsr #14] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 46c4: e59d3038 ldr r3, [sp, #56] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 46c8: e587a00c str sl, [r7, #12] 46cc: e5831000 str r1, [r3] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 46d0: eb00087a bl 68c0 <_Thread_Enable_dispatch> 46d4: e3a00000 mov r0, #0 ; 0x0 46d8: eaffffd9 b 4644 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 46dc: eb000877 bl 68c0 <_Thread_Enable_dispatch> 46e0: e3a00005 mov r0, #5 ; 0x5 46e4: eaffffd6 b 4644 if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 46e8: 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; 46ec: e3a03000 mov r3, #0 ; 0x0 46f0: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 46f4: e3520003 cmp r2, #3 ; 0x3 46f8: 979ff102 ldrls pc, [pc, r2, lsl #2] 46fc: eaffffc2 b 460c <== NOT EXECUTED 4700: 0000471c .word 0x0000471c <== NOT EXECUTED 4704: 0000471c .word 0x0000471c <== NOT EXECUTED 4708: 00004710 .word 0x00004710 <== NOT EXECUTED 470c: 00004710 .word 0x00004710 <== 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; 4710: e3a03001 mov r3, #1 ; 0x1 4714: e5cd3004 strb r3, [sp, #4] 4718: eaffffbb b 460c 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; 471c: e3a03000 mov r3, #0 ; 0x0 4720: e5cd3004 strb r3, [sp, #4] 4724: eaffffb8 b 460c 4728: 00016f0c .word 0x00016f0c 472c: 00016e2c .word 0x00016e2c 00021488 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 21488: e52de004 push {lr} ; (str lr, [sp, #-4]!) 2148c: e24dd004 sub sp, sp, #4 ; 0x4 21490: e1a01000 mov r1, r0 21494: e1a0200d mov r2, sp 21498: e59f004c ldr r0, [pc, #76] ; 214ec 2149c: ebffa0d7 bl 9800 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 214a0: e59d1000 ldr r1, [sp] 214a4: e3510000 cmp r1, #0 ; 0x0 214a8: 13a00004 movne r0, #4 ; 0x4 214ac: 1a000008 bne 214d4 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 214b0: e5903010 ldr r3, [r0, #16] 214b4: e2133030 ands r3, r3, #48 ; 0x30 214b8: 1a000007 bne 214dc &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 214bc: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 214c0: e1a01003 mov r1, r3 <== NOT EXECUTED 214c4: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 214c8: ebff9e08 bl 8cf0 <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 214cc: ebffa329 bl a178 <_Thread_Enable_dispatch> 214d0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 214d4: e28dd004 add sp, sp, #4 ; 0x4 214d8: 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( 214dc: e2800014 add r0, r0, #20 ; 0x14 214e0: e3a02001 mov r2, #1 ; 0x1 214e4: ebff9d2d bl 89a0 <_CORE_mutex_Flush> 214e8: eafffff7 b 214cc 214ec: 0005a640 .word 0x0005a640 0001488c : */ void rtems_shutdown_executive( uint32_t result ) { 1488c: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 14890: e59f2028 ldr r2, [pc, #40] ; 148c0 14894: e5923000 ldr r3, [r2] 14898: e3530004 cmp r3, #4 ; 0x4 */ void rtems_shutdown_executive( uint32_t result ) { 1489c: e24dd030 sub sp, sp, #48 ; 0x30 if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 148a0: 0a000004 beq 148b8 148a4: 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 ); 148a8: e1a0000d mov r0, sp 148ac: e59f1010 ldr r1, [pc, #16] ; 148c4 148b0: e5823000 str r3, [r2] 148b4: ebffcd79 bl 7ea0 <_CPU_Context_switch> _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 148b8: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 148bc: e8bd8000 pop {pc} <== NOT EXECUTED 148c0: 000170b4 .word 0x000170b4 148c4: 00016edc .word 0x00016edc 00002b64 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 2b64: e1a0c00d mov ip, sp <== NOT EXECUTED 2b68: e92dd830 push {r4, r5, fp, ip, lr, pc} <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 2b6c: e59f407c ldr r4, [pc, #124] ; 2bf0 <== NOT EXECUTED 2b70: e5943000 ldr r3, [r4] <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 2b74: e59300c8 ldr r0, [r3, #200] <== NOT EXECUTED /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 2b78: e24cb004 sub fp, ip, #4 ; 0x4 <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 2b7c: e15b0000 cmp fp, r0 <== NOT EXECUTED 2b80: 33a05000 movcc r5, #0 ; 0x0 <== NOT EXECUTED 2b84: 3a000004 bcc 2b9c <== NOT EXECUTED 2b88: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 2b8c: e0803003 add r3, r0, r3 <== NOT EXECUTED 2b90: e15b0003 cmp fp, r3 <== NOT EXECUTED 2b94: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED 2b98: 93a05001 movls r5, #1 ; 0x1 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 2b9c: e59f3050 ldr r3, [pc, #80] ; 2bf4 <== NOT EXECUTED 2ba0: e5932000 ldr r2, [r3] <== NOT EXECUTED 2ba4: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 2ba8: 03a01001 moveq r1, #1 ; 0x1 <== NOT EXECUTED 2bac: 1a000008 bne 2bd4 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 2bb0: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 2bb4: 0a000002 beq 2bc4 <== NOT EXECUTED 2bb8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 2bbc: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 2bc0: 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 ); 2bc4: e5940000 ldr r0, [r4] <== NOT EXECUTED 2bc8: ebffffc9 bl 2af4 <== NOT EXECUTED 2bcc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return true; } 2bd0: 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( 2bd4: e59f101c ldr r1, [pc, #28] ; 2bf8 <== NOT EXECUTED 2bd8: e2800008 add r0, r0, #8 ; 0x8 <== NOT EXECUTED 2bdc: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED 2be0: eb00b51f bl 30064 <== NOT EXECUTED 2be4: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED 2be8: 33a01000 movcc r1, #0 ; 0x0 <== NOT EXECUTED 2bec: eaffffef b 2bb0 <== NOT EXECUTED 2bf0: 0005a7c4 .word 0x0005a7c4 2bf4: 00047528 .word 0x00047528 2bf8: 0005a574 .word 0x0005a574 00002ae4 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 2ae4: e59f1004 ldr r1, [pc, #4] ; 2af0 <== NOT EXECUTED 2ae8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2aec: eaffffe1 b 2a78 <== NOT EXECUTED 2af0: 00005590 .word 0x00005590 00002a78 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 2a78: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED print_context = context; 2a7c: e59f704c ldr r7, [pc, #76] ; 2ad0 <== NOT EXECUTED print_handler = print; 2a80: e59f604c ldr r6, [pc, #76] ; 2ad4 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 2a84: e1a04001 mov r4, r1 <== NOT EXECUTED 2a88: e1a05000 mov r5, r0 <== NOT EXECUTED print_context = context; print_handler = print; 2a8c: e5861000 str r1, [r6] <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 2a90: e5870000 str r0, [r7] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 2a94: e59f103c ldr r1, [pc, #60] ; 2ad8 <== NOT EXECUTED 2a98: e1a0e00f mov lr, pc <== NOT EXECUTED 2a9c: e12fff14 bx r4 <== NOT EXECUTED (*print)( context, 2aa0: e59f1034 ldr r1, [pc, #52] ; 2adc <== NOT EXECUTED 2aa4: e1a00005 mov r0, r5 <== NOT EXECUTED 2aa8: e1a0e00f mov lr, pc <== NOT EXECUTED 2aac: 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 ); 2ab0: e59f0028 ldr r0, [pc, #40] ; 2ae0 <== NOT EXECUTED 2ab4: eb0019a5 bl 9150 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 2ab8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2abc: ebffff93 bl 2910 <== NOT EXECUTED print_context = NULL; 2ac0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED print_handler = NULL; 2ac4: 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; 2ac8: e5873000 str r3, [r7] <== NOT EXECUTED print_handler = NULL; } 2acc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 2ad0: 0004752c .word 0x0004752c 2ad4: 00047530 .word 0x00047530 2ad8: 00043168 .word 0x00043168 2adc: 00043180 .word 0x00043180 2ae0: 00002910 .word 0x00002910 00002bfc : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 2bfc: 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; 2c00: e59020c8 ldr r2, [r0, #200] */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 2c04: e92dd810 push {r4, fp, ip, lr, pc} 2c08: e24cb004 sub fp, ip, #4 ; 0x4 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 2c0c: e15b0002 cmp fp, r2 */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 2c10: 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; 2c14: e2820008 add r0, r2, #8 ; 0x8 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 2c18: 3a000003 bcc 2c2c return false; } if ( sp > (the_stack->area + the_stack->size) ) { 2c1c: e59430c4 ldr r3, [r4, #196] 2c20: e0823003 add r3, r2, r3 2c24: e15b0003 cmp fp, r3 2c28: 9a000007 bls 2c4c /* * 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, 2c2c: e59f1034 ldr r1, [pc, #52] ; 2c68 <== NOT EXECUTED 2c30: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED 2c34: eb00b50a bl 30064 <== NOT EXECUTED 2c38: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED 2c3c: 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 ); 2c40: e1a00004 mov r0, r4 } } 2c44: e89d6810 ldm sp, {r4, fp, sp, lr} pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 2c48: eaffffa9 b 2af4 /* * 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, 2c4c: e59f1014 ldr r1, [pc, #20] ; 2c68 2c50: e3a02010 mov r2, #16 ; 0x10 2c54: eb00b502 bl 30064 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 2c58: e3500000 cmp r0, #0 ; 0x0 2c5c: 13a01000 movne r1, #0 ; 0x0 2c60: 1afffff6 bne 2c40 2c64: e89da810 ldm sp, {r4, fp, sp, pc} 2c68: 0005a574 .word 0x0005a574 00006788 : const char * rtems_status_text( rtems_status_code status ) { 6788: e1a01000 mov r1, r0 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 678c: e59f0000 ldr r0, [pc, #0] ; 6794 <== NOT EXECUTED 6790: ea00288a b 109c0 <== NOT EXECUTED 6794: 00022cb4 .word 0x00022cb4 000021b8 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 21b8: e59f3018 ldr r3, [pc, #24] ; 21d8 <== NOT EXECUTED 21bc: e5830000 str r0, [r3] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 21c0: e59f0014 ldr r0, [pc, #20] ; 21dc <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 21c4: e59f3014 ldr r3, [pc, #20] ; 21e0 <== NOT EXECUTED int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; 21c8: e5801000 str r1, [r0] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 21cc: e5832000 str r2, [r3] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 21d0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 21d4: e12fff1e bx lr <== NOT EXECUTED 21d8: 00015650 .word 0x00015650 21dc: 00015654 .word 0x00015654 21e0: 00015658 .word 0x00015658 000037d8 : } } rtems_status_code rtems_termios_close (void *arg) { 37d8: 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); 37dc: e59f6188 ldr r6, [pc, #392] ; 396c rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 37e0: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 37e4: e3a01000 mov r1, #0 ; 0x0 } } rtems_status_code rtems_termios_close (void *arg) { 37e8: 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); 37ec: e1a02001 mov r2, r1 37f0: 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; 37f4: e5934028 ldr r4, [r3, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 37f8: eb0003f5 bl 47d4 if (sc != RTEMS_SUCCESSFUL) 37fc: e3500000 cmp r0, #0 ; 0x0 3800: 1a000046 bne 3920 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 3804: e5943008 ldr r3, [r4, #8] 3808: e2433001 sub r3, r3, #1 ; 0x1 380c: e3530000 cmp r3, #0 ; 0x0 3810: e5843008 str r3, [r4, #8] 3814: 1a000030 bne 38dc if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3818: e59430cc ldr r3, [r4, #204] 381c: e59f214c ldr r2, [pc, #332] ; 3970 3820: e1a03183 lsl r3, r3, #3 3824: e2833001 add r3, r3, #1 ; 0x1 3828: e7923103 ldr r3, [r2, r3, lsl #2] 382c: e3530000 cmp r3, #0 ; 0x0 3830: 0a00003b beq 3924 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3834: e1a00004 mov r0, r4 <== NOT EXECUTED 3838: e1a0e00f mov lr, pc <== NOT EXECUTED 383c: e12fff13 bx r3 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 3840: e59430b4 ldr r3, [r4, #180] 3844: e3530002 cmp r3, #2 ; 0x2 3848: 0a00002a beq 38f8 tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 384c: e594309c ldr r3, [r4, #156] 3850: e3530000 cmp r3, #0 ; 0x0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 3854: 11a02005 movne r2, r5 3858: 1284000c addne r0, r4, #12 ; 0xc 385c: 18900003 ldmne r0, {r0, r1} 3860: 11a0e00f movne lr, pc 3864: 112fff13 bxne r3 if (tty->forw == NULL) { 3868: e5941000 ldr r1, [r4] 386c: e3510000 cmp r1, #0 ; 0x0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 3870: 15943004 ldrne r3, [r4, #4] 3874: 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) { 3878: 0a00002c beq 3930 } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 387c: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 3880: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 3884: 15821000 strne r1, [r2] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3888: 0a000032 beq 3958 <== NOT EXECUTED } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 388c: e5940014 ldr r0, [r4, #20] 3890: eb0003a6 bl 4730 rtems_semaphore_delete (tty->osem); 3894: e5940018 ldr r0, [r4, #24] 3898: eb0003a4 bl 4730 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 389c: e594008c ldr r0, [r4, #140] 38a0: eb0003a2 bl 4730 if ((tty->device.pollRead == NULL) || 38a4: e59430a0 ldr r3, [r4, #160] 38a8: e3530000 cmp r3, #0 ; 0x0 38ac: 0a00000e beq 38ec 38b0: e59430b4 ldr r3, [r4, #180] 38b4: e3530002 cmp r3, #2 ; 0x2 38b8: 0a00000b beq 38ec (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 38bc: e5940058 ldr r0, [r4, #88] 38c0: eb0015d7 bl 9024 free (tty->rawOutBuf.theBuf); 38c4: e594007c ldr r0, [r4, #124] 38c8: eb0015d5 bl 9024 free (tty->cbuf); 38cc: e594001c ldr r0, [r4, #28] 38d0: eb0015d3 bl 9024 free (tty); 38d4: e1a00004 mov r0, r4 38d8: eb0015d1 bl 9024 } rtems_semaphore_release (rtems_termios_ttyMutex); 38dc: e5960000 ldr r0, [r6] 38e0: eb000402 bl 48f0 return RTEMS_SUCCESSFUL; } 38e4: e3a00000 mov r0, #0 ; 0x0 38e8: 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); 38ec: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED 38f0: eb00038e bl 4730 <== NOT EXECUTED 38f4: eafffff0 b 38bc <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 38f8: e59400c4 ldr r0, [r4, #196] <== NOT EXECUTED 38fc: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3900: eb000275 bl 42dc <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3904: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3908: 1a000004 bne 3920 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 390c: e59400c8 ldr r0, [r4, #200] <== NOT EXECUTED 3910: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3914: eb000270 bl 42dc <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3918: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 391c: 0affffca beq 384c <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3920: eb000569 bl 4ecc <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 3924: e1a00004 mov r0, r4 3928: ebfffd89 bl 2f54 392c: eaffffc3 b 3840 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; 3930: e5942004 ldr r2, [r4, #4] 3934: e59f3038 ldr r3, [pc, #56] ; 3974 if ( rtems_termios_ttyTail != NULL ) { 3938: 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; 393c: e5832000 str r2, [r3] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 3940: 15821000 strne r1, [r2] 3944: 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 ) { 3948: 1affffcb bne 387c } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 394c: e59f3024 ldr r3, [pc, #36] ; 3978 3950: e5832000 str r2, [r3] 3954: eaffffcc b 388c 3958: e59f3018 ldr r3, [pc, #24] ; 3978 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { 395c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3960: e5831000 str r1, [r3] <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 3964: 15812004 strne r2, [r1, #4] <== NOT EXECUTED 3968: eaffffc7 b 388c <== NOT EXECUTED 396c: 00016e20 .word 0x00016e20 3970: 00016c0c .word 0x00016c0c 3974: 00016e24 .word 0x00016e24 3978: 00016e28 .word 0x00016e28 00002400 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2400: e5903090 ldr r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2404: e590c0b4 ldr ip, [r0, #180] <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2408: e0833001 add r3, r3, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 240c: 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) { 2410: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2414: e5803090 str r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2418: 0a00000b beq 244c <== 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 ) { 241c: e59030cc ldr r3, [r0, #204] <== NOT EXECUTED 2420: e3530005 cmp r3, #5 ; 0x5 <== NOT EXECUTED 2424: 1a000006 bne 2444 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2428: e59f3034 ldr r3, [pc, #52] ; 2464 <== NOT EXECUTED 242c: e59330b4 ldr r3, [r3, #180] <== NOT EXECUTED 2430: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2434: 11a0e00f movne lr, pc <== NOT EXECUTED 2438: 112fff13 bxne r3 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 243c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2440: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 2444: 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); 2448: eaffff68 b 21f0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 244c: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 2450: e1a0100c mov r1, ip <== NOT EXECUTED 2454: eb0007a0 bl 42dc <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 2458: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 245c: 0afffff6 beq 243c <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2460: eb000a99 bl 4ecc <== NOT EXECUTED 2464: 00016c0c .word 0x00016c0c 00002468 : 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) { 2468: 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) { 246c: 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) { 2470: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED 2474: e59f62f4 ldr r6, [pc, #756] ; 2770 <== NOT EXECUTED 2478: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 247c: e7963203 ldr r3, [r6, r3, lsl #4] <== NOT EXECUTED 2480: 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) { 2484: e24dd00c sub sp, sp, #12 ; 0xc <== NOT EXECUTED 2488: e1a05000 mov r5, r0 <== NOT EXECUTED 248c: e1a08001 mov r8, r1 <== NOT EXECUTED 2490: 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) { 2494: 0a000020 beq 251c <== NOT EXECUTED while (len--) { 2498: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 249c: 0a00000c beq 24d4 <== NOT EXECUTED 24a0: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 24a4: ea000003 b 24b8 <== NOT EXECUTED 24a8: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 24ac: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED 24b0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 24b4: e7963203 ldr r3, [r6, r3, lsl #4] <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 24b8: e7d80004 ldrb r0, [r8, r4] <== NOT EXECUTED 24bc: e1a01005 mov r1, r5 <== NOT EXECUTED 24c0: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED 24c4: e1a0e00f mov lr, pc <== NOT EXECUTED 24c8: 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--) { 24cc: e1540007 cmp r4, r7 <== NOT EXECUTED 24d0: 1afffff4 bne 24a8 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 24d4: e59540e4 ldr r4, [r5, #228] <== NOT EXECUTED 24d8: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 24dc: 1a00000a bne 250c <== NOT EXECUTED 24e0: e59530dc ldr r3, [r5, #220] <== NOT EXECUTED 24e4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 24e8: 0a000007 beq 250c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 24ec: e2850030 add r0, r5, #48 ; 0x30 <== NOT EXECUTED 24f0: e59510e0 ldr r1, [r5, #224] <== NOT EXECUTED 24f4: e1a0e00f mov lr, pc <== NOT EXECUTED 24f8: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 24fc: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 2500: e58530e4 str r3, [r5, #228] <== NOT EXECUTED 2504: e1a09004 mov r9, r4 <== NOT EXECUTED 2508: ea000000 b 2510 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 250c: e3a09000 mov r9, #0 ; 0x0 <== NOT EXECUTED } 2510: e1a00009 mov r0, r9 <== NOT EXECUTED 2514: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 2518: 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); 251c: 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, 2520: 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); 2524: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2528: 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, 252c: 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); 2530: e58d3008 str r3, [sp, #8] <== NOT EXECUTED 2534: e1a0b009 mov fp, r9 <== NOT EXECUTED 2538: e1a0a009 mov sl, r9 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 253c: 3a000049 bcc 2668 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 2540: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 2544: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 2548: 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) { 254c: 0a000008 beq 2574 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 2550: e5d5204a ldrb r2, [r5, #74] <== NOT EXECUTED 2554: e1520006 cmp r2, r6 <== NOT EXECUTED 2558: 0a000048 beq 2680 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 255c: e5d53049 ldrb r3, [r5, #73] <== NOT EXECUTED 2560: e1530006 cmp r3, r6 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 2564: 059530b8 ldreq r3, [r5, #184] <== NOT EXECUTED 2568: 03c33010 biceq r3, r3, #16 ; 0x10 <== NOT EXECUTED 256c: 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]) { 2570: 0a00004a beq 26a0 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 2574: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED 2578: 1a000048 bne 26a0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 257c: e5950060 ldr r0, [r5, #96] <== NOT EXECUTED 2580: e5951064 ldr r1, [r5, #100] <== NOT EXECUTED 2584: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 2588: eb0041eb bl 12d3c <__umodsi3> <== NOT EXECUTED 258c: e1a04000 mov r4, r0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 2590: e10f2000 mrs r2, CPSR <== NOT EXECUTED 2594: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 2598: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 259c: e58d2004 str r2, [sp, #4] <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 25a0: e595305c ldr r3, [r5, #92] <== NOT EXECUTED 25a4: e5950064 ldr r0, [r5, #100] <== NOT EXECUTED 25a8: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 25ac: e5951064 ldr r1, [r5, #100] <== NOT EXECUTED 25b0: e0800004 add r0, r0, r4 <== NOT EXECUTED 25b4: eb0041e0 bl 12d3c <__umodsi3> <== NOT EXECUTED 25b8: e59530c0 ldr r3, [r5, #192] <== NOT EXECUTED 25bc: e1500003 cmp r0, r3 <== NOT EXECUTED 25c0: 9a000010 bls 2608 <== NOT EXECUTED 25c4: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 25c8: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 25cc: 1a00000d bne 2608 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 25d0: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 25d4: e3822001 orr r2, r2, #1 ; 0x1 <== NOT EXECUTED 25d8: e58520b8 str r2, [r5, #184] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 25dc: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 25e0: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 25e4: e3c33001 bic r3, r3, #1 ; 0x1 <== NOT EXECUTED 25e8: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 25ec: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 25f0: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 25f4: 0a000044 beq 270c <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 25f8: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 25fc: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2600: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2604: 0a00004f beq 2748 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 2608: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 260c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 2610: e595305c ldr r3, [r5, #92] <== NOT EXECUTED 2614: e1530004 cmp r3, r4 <== NOT EXECUTED dropped++; 2618: 02899001 addeq r9, r9, #1 ; 0x1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 261c: 0a00000e beq 265c <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 2620: e5953058 ldr r3, [r5, #88] <== NOT EXECUTED 2624: 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 )) { 2628: e59520e4 ldr r2, [r5, #228] <== NOT EXECUTED 262c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 2630: 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 )) { 2634: 1a000008 bne 265c <== NOT EXECUTED 2638: e59530dc ldr r3, [r5, #220] <== NOT EXECUTED 263c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2640: 0a000005 beq 265c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2644: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 2648: e59510e0 ldr r1, [r5, #224] <== NOT EXECUTED 264c: e1a0e00f mov lr, pc <== NOT EXECUTED 2650: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 2654: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2658: e58520e4 str r2, [r5, #228] <== NOT EXECUTED 265c: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2660: e2577001 subs r7, r7, #1 ; 0x1 <== NOT EXECUTED 2664: 2affffb5 bcs 2540 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 2668: e5953078 ldr r3, [r5, #120] <== NOT EXECUTED 266c: e0833009 add r3, r3, r9 <== NOT EXECUTED 2670: e5853078 str r3, [r5, #120] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 2674: e5950068 ldr r0, [r5, #104] <== NOT EXECUTED 2678: eb00089c bl 48f0 <== NOT EXECUTED 267c: eaffffa3 b 2510 <== 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]) { 2680: e5d53049 ldrb r3, [r5, #73] <== NOT EXECUTED 2684: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 2688: 059530b8 ldreq r3, [r5, #184] <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 268c: 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; 2690: 02233010 eoreq r3, r3, #16 ; 0x10 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2694: 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; 2698: 058530b8 streq r3, [r5, #184] <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 269c: 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) { 26a0: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 26a4: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 26a8: e3530020 cmp r3, #32 ; 0x20 <== NOT EXECUTED 26ac: 0a000002 beq 26bc <== 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); 26b0: 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; 26b4: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED 26b8: eaffffe8 b 2660 <== 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); 26bc: e10f4000 mrs r4, CPSR <== NOT EXECUTED 26c0: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED 26c4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 26c8: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 26cc: 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; 26d0: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 26d4: 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; 26d8: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 26dc: 1a000002 bne 26ec <== 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); 26e0: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 26e4: e3a0b001 mov fp, #1 ; 0x1 <== NOT EXECUTED 26e8: eafffff1 b 26b4 <== 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, 26ec: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED 26f0: e595107c ldr r1, [r5, #124] <== NOT EXECUTED 26f4: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 26f8: e0811003 add r1, r1, r3 <== NOT EXECUTED 26fc: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2700: e1a0e00f mov lr, pc <== NOT EXECUTED 2704: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED 2708: eafffff4 b 26e0 <== 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) || 270c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 2710: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 2714: 1a000002 bne 2724 <== NOT EXECUTED 2718: e5953094 ldr r3, [r5, #148] <== NOT EXECUTED 271c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2720: 1affffb8 bne 2608 <== 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; 2724: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 2728: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 272c: e58530b8 str r3, [r5, #184] <== NOT EXECUTED (*tty->device.write)(tty->minor, 2730: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 2734: e59d1000 ldr r1, [sp] <== NOT EXECUTED 2738: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 273c: e1a0e00f mov lr, pc <== NOT EXECUTED 2740: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED 2744: eaffffaf b 2608 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2748: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 274c: e59520ac ldr r2, [r5, #172] <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2750: e3833004 orr r3, r3, #4 ; 0x4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2754: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2758: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 275c: 0affffa9 beq 2608 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 2760: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 2764: e1a0e00f mov lr, pc <== NOT EXECUTED 2768: e12fff12 bx r2 <== NOT EXECUTED 276c: eaffffa5 b 2608 <== NOT EXECUTED 2770: 00016c0c .word 0x00016c0c 00002170 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 2170: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 2174: e59fc034 ldr ip, [pc, #52] ; 21b0 2178: e59c3000 ldr r3, [ip] 217c: e3530000 cmp r3, #0 ; 0x0 struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 2180: e24dd004 sub sp, sp, #4 ; 0x4 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 2184: 0a000001 beq 2190 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 2188: e28dd004 add sp, sp, #4 ; 0x4 218c: e8bd8000 pop {pc} /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 2190: e59f001c ldr r0, [pc, #28] ; 21b4 2194: e3a01001 mov r1, #1 ; 0x1 2198: e3a02054 mov r2, #84 ; 0x54 219c: e58dc000 str ip, [sp] 21a0: eb0008e7 bl 4544 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) 21a4: e3500000 cmp r0, #0 ; 0x0 21a8: 0afffff6 beq 2188 rtems_fatal_error_occurred (sc); 21ac: eb000b46 bl 4ecc <== NOT EXECUTED 21b0: 00016e20 .word 0x00016e20 21b4: 54526d69 .word 0x54526d69 000033dc : } } rtems_status_code rtems_termios_ioctl (void *arg) { 33dc: 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; 33e0: e5903000 ldr r3, [r0] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 33e4: 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; 33e8: e5935028 ldr r5, [r3, #40] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 33ec: e580100c str r1, [r0, #12] <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 33f0: e1a06000 mov r6, r0 <== NOT EXECUTED 33f4: 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); 33f8: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 33fc: 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; 3400: 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); 3404: eb0004f2 bl 47d4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 3408: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED 340c: 1a00000a bne 343c <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 3410: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED 3414: e3520004 cmp r2, #4 ; 0x4 <== NOT EXECUTED 3418: 0a000021 beq 34a4 <== NOT EXECUTED 341c: 8a00000a bhi 344c <== NOT EXECUTED 3420: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 3424: 0a000064 beq 35bc <== NOT EXECUTED 3428: 9a00004b bls 355c <== NOT EXECUTED if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 342c: e1a00005 mov r0, r5 <== NOT EXECUTED 3430: ebfffec7 bl 2f54 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 3434: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 3438: eb00052c bl 48f0 <== NOT EXECUTED args->ioctl_return = sc; 343c: e586700c str r7, [r6, #12] <== NOT EXECUTED return sc; } 3440: e1a00007 mov r0, r7 <== NOT EXECUTED 3444: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 3448: 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) { 344c: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED 3450: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED 3454: e283313d add r3, r3, #1073741839 ; 0x4000000f <== NOT EXECUTED 3458: e1520003 cmp r2, r3 <== NOT EXECUTED 345c: 0a00004a beq 358c <== NOT EXECUTED 3460: 8a000017 bhi 34c4 <== NOT EXECUTED 3464: e3520005 cmp r2, #5 ; 0x5 <== NOT EXECUTED 3468: 0a000011 beq 34b4 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 346c: e59520cc ldr r2, [r5, #204] <== NOT EXECUTED 3470: e59f3358 ldr r3, [pc, #856] ; 37d0 <== NOT EXECUTED 3474: e1a02282 lsl r2, r2, #5 <== NOT EXECUTED 3478: e0833002 add r3, r3, r2 <== NOT EXECUTED 347c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 3480: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3484: 03a0700a moveq r7, #10 ; 0xa <== NOT EXECUTED 3488: 0affffe9 beq 3434 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 348c: e1a00005 mov r0, r5 <== NOT EXECUTED 3490: e1a01006 mov r1, r6 <== NOT EXECUTED 3494: e1a0e00f mov lr, pc <== NOT EXECUTED 3498: e12fff13 bx r3 <== NOT EXECUTED 349c: e1a07000 mov r7, r0 <== NOT EXECUTED 34a0: eaffffe3 b 3434 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 34a4: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 34a8: e58530e0 str r3, [r5, #224] <== NOT EXECUTED 34ac: e58520dc str r2, [r5, #220] <== NOT EXECUTED 34b0: eaffffdf b 3434 <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 34b4: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 34b8: e58530d8 str r3, [r5, #216] <== NOT EXECUTED 34bc: e58520d4 str r2, [r5, #212] <== NOT EXECUTED 34c0: eaffffdb b 3434 <== 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) { 34c4: e3a03a47 mov r3, #290816 ; 0x47000 <== NOT EXECUTED 34c8: e2833e41 add r3, r3, #1040 ; 0x410 <== NOT EXECUTED 34cc: e2833129 add r3, r3, #1073741834 ; 0x4000000a <== NOT EXECUTED 34d0: e1520003 cmp r2, r3 <== NOT EXECUTED 34d4: 0a00001c beq 354c <== NOT EXECUTED 34d8: e3a03a47 mov r3, #290816 ; 0x47000 <== NOT EXECUTED 34dc: e2833e41 add r3, r3, #1040 ; 0x410 <== NOT EXECUTED 34e0: e283312e add r3, r3, #-2147483637 ; 0x8000000b <== NOT EXECUTED 34e4: e1520003 cmp r2, r3 <== NOT EXECUTED 34e8: 1affffdf bne 346c <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 34ec: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 34f0: e59f42d8 ldr r4, [pc, #728] ; 37d0 <== NOT EXECUTED 34f4: e1a03183 lsl r3, r3, #3 <== NOT EXECUTED 34f8: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 34fc: e7943103 ldr r3, [r4, r3, lsl #2] <== NOT EXECUTED 3500: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3504: 0a000003 beq 3518 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3508: e1a00005 mov r0, r5 <== NOT EXECUTED 350c: e1a0e00f mov lr, pc <== NOT EXECUTED 3510: e12fff13 bx r3 <== NOT EXECUTED 3514: e1a07000 mov r7, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 3518: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED 351c: e5932000 ldr r2, [r3] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3520: e7941282 ldr r1, [r4, r2, lsl #5] <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3524: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3528: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 352c: e58530d0 str r3, [r5, #208] <== 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); 3530: e58520cc str r2, [r5, #204] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3534: 0affffbe beq 3434 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3538: e1a00005 mov r0, r5 <== NOT EXECUTED 353c: e1a0e00f mov lr, pc <== NOT EXECUTED 3540: e12fff11 bx r1 <== NOT EXECUTED 3544: e1a07000 mov r7, r0 <== NOT EXECUTED 3548: eaffffb9 b 3434 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 354c: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED 3550: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 3554: e5823000 str r3, [r2] <== NOT EXECUTED 3558: eaffffb5 b 3434 <== 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) { 355c: e3520001 cmp r2, #1 ; 0x1 <== NOT EXECUTED 3560: 1affffc1 bne 346c <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 3564: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED 3568: e285c030 add ip, r5, #48 ; 0x30 <== NOT EXECUTED 356c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3570: e1a0e004 mov lr, r4 <== NOT EXECUTED 3574: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 3578: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 357c: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 3580: e59c3000 ldr r3, [ip] <== NOT EXECUTED 3584: e58e3000 str r3, [lr] <== NOT EXECUTED 3588: eaffffa9 b 3434 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 358c: e5952060 ldr r2, [r5, #96] <== NOT EXECUTED 3590: e595305c ldr r3, [r5, #92] <== NOT EXECUTED if ( rawnc < 0 ) 3594: e0521003 subs r1, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 3598: 45953064 ldrmi r3, [r5, #100] <== NOT EXECUTED 359c: 40811003 addmi r1, r1, r3 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 35a0: e2852020 add r2, r5, #32 ; 0x20 <== NOT EXECUTED 35a4: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 35a8: e0423003 sub r3, r2, r3 <== NOT EXECUTED 35ac: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED 35b0: e0833001 add r3, r3, r1 <== NOT EXECUTED 35b4: e5823000 str r3, [r2] <== NOT EXECUTED 35b8: eaffff9d b 3434 <== 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; 35bc: e596c008 ldr ip, [r6, #8] <== NOT EXECUTED 35c0: e1a0e00c mov lr, ip <== NOT EXECUTED 35c4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 35c8: e2854030 add r4, r5, #48 ; 0x30 <== NOT EXECUTED 35cc: e1a0c004 mov ip, r4 <== NOT EXECUTED 35d0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 35d4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 35d8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 35dc: 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; 35e0: 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) && 35e4: 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; 35e8: e58c2000 str r2, [ip] <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 35ec: 0a000012 beq 363c <== NOT EXECUTED 35f0: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 35f4: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 35f8: 1a00000f bne 363c <== NOT EXECUTED !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 35fc: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3600: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3604: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3608: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 360c: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED 3610: 0a000009 beq 363c <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 3614: e10f8000 mrs r8, CPSR <== NOT EXECUTED 3618: e38830c0 orr r3, r8, #192 ; 0xc0 <== NOT EXECUTED 361c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 3620: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3624: 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; 3628: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 362c: 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; 3630: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3634: 1a00005d bne 37b0 <== 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); 3638: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 363c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3640: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 3644: 0a000008 beq 366c <== NOT EXECUTED 3648: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 364c: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 3650: 1a000005 bne 366c <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 3654: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3658: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 365c: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 3660: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 3664: e3c22002 bic r2, r2, #2 ; 0x2 <== NOT EXECUTED 3668: e58520b8 str r2, [r5, #184] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 366c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3670: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3674: 05951038 ldreq r1, [r5, #56] <== NOT EXECUTED 3678: 0a000012 beq 36c8 <== NOT EXECUTED 367c: e5951038 ldr r1, [r5, #56] <== NOT EXECUTED 3680: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 3684: ba00003d blt 3780 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 3688: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 368c: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 3690: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 3694: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED 3698: e3120004 tst r2, #4 ; 0x4 <== NOT EXECUTED 369c: 0a000006 beq 36bc <== NOT EXECUTED 36a0: e59530b0 ldr r3, [r5, #176] <== NOT EXECUTED 36a4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 36a8: 0a000003 beq 36bc <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 36ac: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 36b0: e1a0e00f mov lr, pc <== NOT EXECUTED 36b4: e12fff13 bx r3 <== NOT EXECUTED 36b8: e5951038 ldr r1, [r5, #56] <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 36bc: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 36c0: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED 36c4: 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) { 36c8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 36cc: ba00002b blt 3780 <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 36d0: e5952030 ldr r2, [r5, #48] <== NOT EXECUTED 36d4: e3120a01 tst r2, #4096 ; 0x1000 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 36d8: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 36dc: 13833b01 orrne r3, r3, #1024 ; 0x400 <== NOT EXECUTED 36e0: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 36e4: e3120b01 tst r2, #1024 ; 0x400 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 36e8: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 36ec: 13833c02 orrne r3, r3, #512 ; 0x200 <== NOT EXECUTED 36f0: 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) { 36f4: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 36f8: e2138002 ands r8, r3, #2 ; 0x2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 36fc: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3700: 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; 3704: 1585306c strne r3, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3708: 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) { 370c: 0a000007 beq 3730 <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 3710: e59530a8 ldr r3, [r5, #168] <== NOT EXECUTED 3714: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3718: 0affff45 beq 3434 <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 371c: e1a01004 mov r1, r4 <== NOT EXECUTED 3720: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 3724: e1a0e00f mov lr, pc <== NOT EXECUTED 3728: e12fff13 bx r3 <== NOT EXECUTED 372c: eaffff40 b 3434 <== 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); 3730: e1a0100d mov r1, sp <== NOT EXECUTED 3734: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3738: eb0001e9 bl 3ee4 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 373c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3740: e5d50046 ldrb r0, [r5, #70] <== NOT EXECUTED 3744: e0010093 mul r1, r3, r0 <== NOT EXECUTED 3748: e59f2084 ldr r2, [pc, #132] ; 37d4 <== NOT EXECUTED 374c: e083c192 umull ip, r3, r2, r1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 3750: 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; 3754: e1a021a3 lsr r2, r3, #3 <== NOT EXECUTED 3758: e5852054 str r2, [r5, #84] <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 375c: 0a00000b beq 3790 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 3760: e5d53047 ldrb r3, [r5, #71] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3764: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3768: 01a03002 moveq r3, r2 <== NOT EXECUTED 376c: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3770: e585806c str r8, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3774: 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; 3778: e5852070 str r2, [r5, #112] <== NOT EXECUTED 377c: eaffffe3 b 3710 <== 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; 3780: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3784: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED 3788: e58530b8 str r3, [r5, #184] <== NOT EXECUTED 378c: eaffffcf b 36d0 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 3790: e5d53047 ldrb r3, [r5, #71] <== NOT EXECUTED 3794: 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; 3798: 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; 379c: 15850074 strne r0, [r5, #116] <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 37a0: 1585006c strne r0, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 37a4: 15850070 strne r0, [r5, #112] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 37a8: 0585306c streq r3, [r5, #108] <== NOT EXECUTED 37ac: eaffffd7 b 3710 <== 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, 37b0: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED 37b4: e595107c ldr r1, [r5, #124] <== NOT EXECUTED 37b8: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 37bc: e0811003 add r1, r1, r3 <== NOT EXECUTED 37c0: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 37c4: e1a0e00f mov lr, pc <== NOT EXECUTED 37c8: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED 37cc: eaffff99 b 3638 <== NOT EXECUTED 37d0: 00016c0c .word 0x00016c0c 37d4: cccccccd .word 0xcccccccd 0000397c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 397c: 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, 3980: e59fb434 ldr fp, [pc, #1076] ; 3dbc rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3984: e24dd00c sub sp, sp, #12 ; 0xc 3988: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 398c: e3a01000 mov r1, #0 ; 0x0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3990: e58d2008 str r2, [sp, #8] 3994: e1a07000 mov r7, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3998: e1a02001 mov r2, r1 399c: e59b0000 ldr r0, [fp] rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 39a0: e1a04003 mov r4, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 39a4: eb00038a bl 47d4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 39a8: e2509000 subs r9, r0, #0 ; 0x0 39ac: 1a000021 bne 3a38 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 39b0: e59f5408 ldr r5, [pc, #1032] ; 3dc0 39b4: e5956000 ldr r6, [r5] 39b8: e3560000 cmp r6, #0 ; 0x0 39bc: 1a000003 bne 39d0 39c0: ea00001f b 3a44 39c4: e5966000 ldr r6, [r6] <== NOT EXECUTED 39c8: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 39cc: 0a00001c beq 3a44 <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 39d0: e596300c ldr r3, [r6, #12] 39d4: e1530007 cmp r3, r7 39d8: 1afffff9 bne 39c4 39dc: e5963010 ldr r3, [r6, #16] 39e0: e153000a cmp r3, sl 39e4: 1afffff6 bne 39c4 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 39e8: e59d1008 ldr r1, [sp, #8] if (!tty->refcount++) { 39ec: e5963008 ldr r3, [r6, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 39f0: e5912000 ldr r2, [r1] if (!tty->refcount++) { 39f4: e3530000 cmp r3, #0 ; 0x0 39f8: e2833001 add r3, r3, #1 ; 0x1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 39fc: e5826028 str r6, [r2, #40] if (!tty->refcount++) { 3a00: e5863008 str r3, [r6, #8] 3a04: 1a000009 bne 3a30 if (tty->device.firstOpen) 3a08: e5963098 ldr r3, [r6, #152] 3a0c: e3530000 cmp r3, #0 ; 0x0 (*tty->device.firstOpen)(major, minor, arg); 3a10: 11a00007 movne r0, r7 3a14: 11a0100a movne r1, sl 3a18: 159d2008 ldrne r2, [sp, #8] 3a1c: 11a0e00f movne lr, pc 3a20: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3a24: e59630b4 ldr r3, [r6, #180] 3a28: e3530002 cmp r3, #2 ; 0x2 3a2c: 0a0000a1 beq 3cb8 (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 3a30: e59b0000 ldr r0, [fp] 3a34: eb0003ad bl 48f0 return RTEMS_SUCCESSFUL; } 3a38: e1a00009 mov r0, r9 3a3c: e28dd00c add sp, sp, #12 ; 0xc 3a40: 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)); 3a44: e3a00001 mov r0, #1 ; 0x1 3a48: e3a010e8 mov r1, #232 ; 0xe8 3a4c: eb001535 bl 8f28 if (tty == NULL) { 3a50: e3500000 cmp r0, #0 ; 0x0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3a54: e1a08000 mov r8, r0 3a58: e1a06000 mov r6, r0 if (tty == NULL) { 3a5c: 0a0000a8 beq 3d04 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 3a60: e59f335c ldr r3, [pc, #860] ; 3dc4 3a64: e5932000 ldr r2, [r3] 3a68: e5882064 str r2, [r8, #100] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3a6c: e5980064 ldr r0, [r8, #100] 3a70: eb0016db bl 95e4 if (tty->rawInBuf.theBuf == NULL) { 3a74: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3a78: e5880058 str r0, [r8, #88] if (tty->rawInBuf.theBuf == NULL) { 3a7c: 0a00009e beq 3cfc return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 3a80: e59f3340 ldr r3, [pc, #832] ; 3dc8 3a84: e5932000 ldr r2, [r3] 3a88: e5882088 str r2, [r8, #136] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3a8c: e5980088 ldr r0, [r8, #136] 3a90: eb0016d3 bl 95e4 if (tty->rawOutBuf.theBuf == NULL) { 3a94: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3a98: e588007c str r0, [r8, #124] if (tty->rawOutBuf.theBuf == NULL) { 3a9c: 0a000094 beq 3cf4 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3aa0: e59f3324 ldr r3, [pc, #804] ; 3dcc 3aa4: e5930000 ldr r0, [r3] 3aa8: eb0016cd bl 95e4 if (tty->cbuf == NULL) { 3aac: e3500000 cmp r0, #0 ; 0x0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3ab0: e588001c str r0, [r8, #28] if (tty->cbuf == NULL) { 3ab4: 0a00008c beq 3cec tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3ab8: e5952000 ldr r2, [r5] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3abc: e3a03000 mov r3, #0 ; 0x0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 3ac0: e3520000 cmp r2, #0 ; 0x0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 3ac4: e888000c stm r8, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 3ac8: 15828004 strne r8, [r2, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3acc: e58830d4 str r3, [r8, #212] tty->tty_snd.sw_arg = NULL; 3ad0: e58830d8 str r3, [r8, #216] tty->tty_rcv.sw_pfn = NULL; 3ad4: e58830dc str r3, [r8, #220] tty->tty_rcv.sw_arg = NULL; 3ad8: e58830e0 str r3, [r8, #224] tty->tty_rcvwakeup = 0; 3adc: e58830e4 str r3, [r8, #228] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3ae0: e59f12e8 ldr r1, [pc, #744] ; 3dd0 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) 3ae4: e59f22e8 ldr r2, [pc, #744] ; 3dd4 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3ae8: e5d10000 ldrb r0, [r1] 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) 3aec: e5923000 ldr r3, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3af0: e3800315 orr r0, r0, #1409286144 ; 0x54000000 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) 3af4: e3530000 cmp r3, #0 ; 0x0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3af8: e3800852 orr r0, r0, #5373952 ; 0x520000 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; 3afc: 05828000 streq r8, [r2] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3b00: e5858000 str r8, [r5] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3b04: e288c014 add ip, r8, #20 ; 0x14 3b08: e3a03000 mov r3, #0 ; 0x0 3b0c: e3800c69 orr r0, r0, #26880 ; 0x6900 3b10: e3a01001 mov r1, #1 ; 0x1 3b14: e3a02054 mov r2, #84 ; 0x54 3b18: 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; 3b1c: e588a010 str sl, [r8, #16] tty->major = major; 3b20: e588700c str r7, [r8, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3b24: eb000286 bl 4544 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) 3b28: e2503000 subs r3, r0, #0 ; 0x0 3b2c: 1a00006d bne 3ce8 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 3b30: e59f2298 ldr r2, [pc, #664] ; 3dd0 3b34: e5d20000 ldrb r0, [r2] 3b38: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3b3c: e3800852 orr r0, r0, #5373952 ; 0x520000 3b40: e288c018 add ip, r8, #24 ; 0x18 3b44: e3a01001 mov r1, #1 ; 0x1 3b48: e3800c6f orr r0, r0, #28416 ; 0x6f00 3b4c: e3a02054 mov r2, #84 ; 0x54 3b50: e58dc000 str ip, [sp] 3b54: eb00027a bl 4544 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) 3b58: e2501000 subs r1, r0, #0 ; 0x0 3b5c: 1a000061 bne 3ce8 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 3b60: e59f3268 ldr r3, [pc, #616] ; 3dd0 3b64: e5d30000 ldrb r0, [r3] 3b68: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3b6c: e3800852 orr r0, r0, #5373952 ; 0x520000 3b70: e288c08c add ip, r8, #140 ; 0x8c 3b74: e3800b1e orr r0, r0, #30720 ; 0x7800 3b78: e3a02020 mov r2, #32 ; 0x20 3b7c: e1a03001 mov r3, r1 3b80: e58dc000 str ip, [sp] 3b84: eb00026e bl 4544 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3b88: e2505000 subs r5, r0, #0 ; 0x0 3b8c: 1a000055 bne 3ce8 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3b90: e1a0c004 mov ip, r4 3b94: e8bc000f ldm ip!, {r0, r1, r2, r3} 3b98: e288e098 add lr, r8, #152 ; 0x98 3b9c: e8ae000f stmia lr!, {r0, r1, r2, r3} 3ba0: e89c000f ldm ip, {r0, r1, r2, r3} 3ba4: e88e000f stm lr, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3ba8: e59830b4 ldr r3, [r8, #180] 3bac: e3530002 cmp r3, #2 ; 0x2 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; 3bb0: e5885094 str r5, [r8, #148] tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3bb4: 0a000064 beq 3d4c &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 3bb8: e59830a0 ldr r3, [r8, #160] 3bbc: e3530000 cmp r3, #0 ; 0x0 3bc0: 0a000053 beq 3d14 3bc4: e59830b4 ldr r3, [r8, #180] 3bc8: e3530002 cmp r3, #2 ; 0x2 3bcc: 0a000050 beq 3d14 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'; 3bd0: e3a04000 mov r4, #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; 3bd4: e58840b8 str r4, [r8, #184] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3bd8: e59f21f0 ldr r2, [pc, #496] ; 3dd0 /* 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; 3bdc: e5985064 ldr r5, [r8, #100] tty->highwater = tty->rawInBuf.Size * 3/4; 3be0: e5983064 ldr r3, [r8, #100] /* * Bump name characer */ if (c++ == 'z') 3be4: e5d21000 ldrb r1, [r2] 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; 3be8: e1a02083 lsl r2, r3, #1 3bec: e0822003 add r2, r2, r3 3bf0: e1a02122 lsr r2, r2, #2 3bf4: e58820c0 str r2, [r8, #192] /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3bf8: e3a03b06 mov r3, #6144 ; 0x1800 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3bfc: e59f21cc ldr r2, [pc, #460] ; 3dd0 3c00: e351007a cmp r1, #122 ; 0x7a /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3c04: e2833005 add r3, r3, #5 ; 0x5 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3c08: e2811001 add r1, r1, #1 ; 0x1 3c0c: e5c21000 strb r1, [r2] /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3c10: e5883034 str r3, [r8, #52] 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'; 3c14: e3a03003 mov r3, #3 ; 0x3 3c18: e5c83041 strb r3, [r8, #65] tty->termios.c_cc[VQUIT] = '\034'; 3c1c: e3a0201c mov r2, #28 ; 0x1c tty->termios.c_cc[VERASE] = '\177'; 3c20: e283307c add r3, r3, #124 ; 0x7c tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 3c24: e5c82042 strb r2, [r8, #66] tty->termios.c_cc[VERASE] = '\177'; 3c28: e5c83043 strb r3, [r8, #67] tty->termios.c_cc[VKILL] = '\025'; 3c2c: e2422007 sub r2, r2, #7 ; 0x7 tty->termios.c_cc[VEOF] = '\004'; 3c30: e243307b sub r3, r3, #123 ; 0x7b 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'; tty->termios.c_cc[VKILL] = '\025'; 3c34: e5c82044 strb r2, [r8, #68] tty->termios.c_cc[VEOF] = '\004'; 3c38: e5c83045 strb r3, [r8, #69] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3c3c: e2422004 sub r2, r2, #4 ; 0x4 tty->termios.c_cc[VSTOP] = '\023'; 3c40: e283300f add r3, r3, #15 ; 0xf tty->termios.c_cc[VERASE] = '\177'; 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'; 3c44: e5c82049 strb r2, [r8, #73] tty->termios.c_cc[VSTOP] = '\023'; 3c48: e5c8304a strb r3, [r8, #74] tty->termios.c_cc[VSUSP] = '\032'; 3c4c: e2822009 add r2, r2, #9 ; 0x9 tty->termios.c_cc[VREPRINT] = '\022'; 3c50: e2433001 sub r3, r3, #1 ; 0x1 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'; tty->termios.c_cc[VSUSP] = '\032'; 3c54: e5c8204b strb r2, [r8, #75] tty->termios.c_cc[VREPRINT] = '\022'; 3c58: e5c8304d strb r3, [r8, #77] tty->termios.c_cc[VDISCARD] = '\017'; 3c5c: e242200b sub r2, r2, #11 ; 0xb tty->termios.c_cc[VWERASE] = '\027'; 3c60: e2833005 add r3, r3, #5 ; 0x5 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'; tty->termios.c_cc[VDISCARD] = '\017'; 3c64: e5c8204e strb r2, [r8, #78] tty->termios.c_cc[VWERASE] = '\027'; 3c68: e5c8304f strb r3, [r8, #79] tty->termios.c_cc[VLNEXT] = '\026'; 3c6c: e2822007 add r2, r2, #7 ; 0x7 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3c70: e3a00c25 mov r0, #9472 ; 0x2500 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3c74: e3a0ce8b mov ip, #2224 ; 0x8b0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3c78: e3a0ec82 mov lr, #33280 ; 0x8200 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 3c7c: 059f314c ldreq r3, [pc, #332] ; 3dd0 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 3c80: e5c82050 strb r2, [r8, #80] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3c84: e2800002 add r0, r0, #2 ; 0x2 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3c88: e28cc00d add ip, ip, #13 ; 0xd tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3c8c: e28ee03b add lr, lr, #59 ; 0x3b /* 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; 3c90: e1a050a5 lsr r5, r5, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 3c94: 0282204b addeq r2, r2, #75 ; 0x4b } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3c98: e5880030 str r0, [r8, #48] tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3c9c: e588c038 str ip, [r8, #56] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3ca0: e588e03c str lr, [r8, #60] /* 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; 3ca4: e58850bc str r5, [r8, #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'; 3ca8: e5c8404c strb r4, [r8, #76] tty->termios.c_cc[VEOL2] = '\000'; 3cac: e5c84051 strb r4, [r8, #81] tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 3cb0: 05c32000 strbeq r2, [r3] 3cb4: eaffff4b b 39e8 (*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, 3cb8: e59600c4 ldr r0, [r6, #196] <== NOT EXECUTED 3cbc: e59f1114 ldr r1, [pc, #276] ; 3dd8 <== NOT EXECUTED 3cc0: e1a02006 mov r2, r6 <== NOT EXECUTED 3cc4: eb0003df bl 4c48 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3cc8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3ccc: 1a000005 bne 3ce8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 3cd0: e1a02006 mov r2, r6 <== NOT EXECUTED 3cd4: e59600c8 ldr r0, [r6, #200] <== NOT EXECUTED 3cd8: e59f10fc ldr r1, [pc, #252] ; 3ddc <== NOT EXECUTED 3cdc: eb0003d9 bl 4c48 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3ce0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3ce4: 0affff51 beq 3a30 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3ce8: eb000477 bl 4ecc <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 3cec: e598007c ldr r0, [r8, #124] <== NOT EXECUTED 3cf0: eb0014cb bl 9024 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 3cf4: e5980058 ldr r0, [r8, #88] <== NOT EXECUTED 3cf8: eb0014c9 bl 9024 <== NOT EXECUTED free(tty); 3cfc: e1a00008 mov r0, r8 <== NOT EXECUTED 3d00: eb0014c7 bl 9024 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 3d04: e59b0000 ldr r0, [fp] <== NOT EXECUTED 3d08: eb0002f8 bl 48f0 <== NOT EXECUTED 3d0c: e3a0901a mov r9, #26 ; 0x1a <== NOT EXECUTED 3d10: eaffff48 b 3a38 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 3d14: e59f30b4 ldr r3, [pc, #180] ; 3dd0 <== NOT EXECUTED 3d18: e5d30000 ldrb r0, [r3] <== NOT EXECUTED 3d1c: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 3d20: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 3d24: e3800852 orr r0, r0, #5373952 ; 0x520000 <== NOT EXECUTED 3d28: e288c068 add ip, r8, #104 ; 0x68 <== NOT EXECUTED 3d2c: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED 3d30: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 3d34: e1a03001 mov r3, r1 <== NOT EXECUTED 3d38: e58dc000 str ip, [sp] <== NOT EXECUTED 3d3c: eb000200 bl 4544 <== 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) 3d40: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3d44: 0affffa1 beq 3bd0 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3d48: eb00045f bl 4ecc <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 3d4c: e59f107c ldr r1, [pc, #124] ; 3dd0 <== NOT EXECUTED 3d50: e5d10000 ldrb r0, [r1] <== NOT EXECUTED 3d54: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 3d58: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 3d5c: e288c0c8 add ip, r8, #200 ; 0xc8 <== NOT EXECUTED 3d60: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 3d64: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 3d68: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3d6c: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3d70: e88d1020 stm sp, {r5, ip} <== NOT EXECUTED 3d74: eb000306 bl 4994 <== 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) 3d78: e250e000 subs lr, r0, #0 ; 0x0 <== NOT EXECUTED 3d7c: 1affffd9 bne 3ce8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 3d80: e59f2048 ldr r2, [pc, #72] ; 3dd0 <== NOT EXECUTED 3d84: e5d20000 ldrb r0, [r2] <== NOT EXECUTED 3d88: e3800452 orr r0, r0, #1375731712 ; 0x52000000 <== NOT EXECUTED 3d8c: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 3d90: e288c0c4 add ip, r8, #196 ; 0xc4 <== NOT EXECUTED 3d94: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 3d98: e3a01009 mov r1, #9 ; 0x9 <== NOT EXECUTED 3d9c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3da0: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3da4: e58de000 str lr, [sp] <== NOT EXECUTED 3da8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3dac: eb0002f8 bl 4994 <== 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) 3db0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3db4: 0affff7f beq 3bb8 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3db8: eb000443 bl 4ecc <== NOT EXECUTED 3dbc: 00016e20 .word 0x00016e20 3dc0: 00016e28 .word 0x00016e28 3dc4: 00015654 .word 0x00015654 3dc8: 00015658 .word 0x00015658 3dcc: 00015650 .word 0x00015650 3dd0: 0001565c .word 0x0001565c 3dd4: 00016e24 .word 0x00016e24 3dd8: 00003e54 .word 0x00003e54 3ddc: 00003de0 .word 0x00003de0 00002774 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 2774: e59230b4 ldr r3, [r2, #180] 2778: 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) { 277c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2780: e1a04002 mov r4, r2 2784: e1a0b000 mov fp, r0 2788: 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) { 278c: 0a00003a beq 287c (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 2790: 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; 2794: e5928080 ldr r8, [r2, #128] <== NOT EXECUTED while (len) { 2798: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 279c: 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; 27a0: 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; 27a4: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 27a8: e2880001 add r0, r8, #1 ; 0x1 <== NOT EXECUTED 27ac: eb004162 bl 12d3c <__umodsi3> <== NOT EXECUTED 27b0: e1a08000 mov r8, r0 <== NOT EXECUTED rtems_interrupt_disable (level); 27b4: e10f5000 mrs r5, CPSR <== NOT EXECUTED 27b8: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 27bc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 27c0: e5946084 ldr r6, [r4, #132] <== NOT EXECUTED 27c4: e1560000 cmp r6, r0 <== NOT EXECUTED 27c8: 1a00000d bne 2804 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 27cc: e5847094 str r7, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 27d0: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 27d4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 27d8: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 27dc: e1a02001 mov r2, r1 <== NOT EXECUTED 27e0: eb0007fb bl 47d4 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 27e4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 27e8: 1a00001a bne 2858 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 27ec: e10f5000 mrs r5, CPSR <== NOT EXECUTED 27f0: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 27f4: 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) { 27f8: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 27fc: e1530006 cmp r3, r6 <== NOT EXECUTED 2800: 0afffff1 beq 27cc <== 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++; 2804: e5940080 ldr r0, [r4, #128] <== NOT EXECUTED 2808: e7db100a ldrb r1, [fp, sl] <== NOT EXECUTED 280c: e594307c ldr r3, [r4, #124] <== NOT EXECUTED 2810: e7c31000 strb r1, [r3, r0] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 2814: e5942094 ldr r2, [r4, #148] <== NOT EXECUTED 2818: e3520000 cmp r2, #0 ; 0x0 <== 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; 281c: e5848080 str r8, [r4, #128] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 2820: 1a000007 bne 2844 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 2824: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 2828: 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; 282c: 159430b8 ldrne r3, [r4, #184] <== NOT EXECUTED 2830: 13833020 orrne r3, r3, #32 ; 0x20 <== NOT EXECUTED 2834: 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)) { 2838: 0a000007 beq 285c <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 283c: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 2840: e5843094 str r3, [r4, #148] <== NOT EXECUTED } rtems_interrupt_enable (level); 2844: 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) { 2848: e2599001 subs r9, r9, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; 284c: 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) { 2850: 1affffd3 bne 27a4 <== NOT EXECUTED 2854: 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); 2858: eb00099b bl 4ecc <== 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, 285c: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 2860: e594107c ldr r1, [r4, #124] <== NOT EXECUTED 2864: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2868: e0811003 add r1, r1, r3 <== NOT EXECUTED 286c: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED 2870: e1a0e00f mov lr, pc <== NOT EXECUTED 2874: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 2878: eaffffef b 283c <== 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); 287c: e1a01000 mov r1, r0 2880: e1a02009 mov r2, r9 2884: e5940010 ldr r0, [r4, #16] 2888: e1a0e00f mov lr, pc 288c: e594f0a4 ldr pc, [r4, #164] 2890: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 00002fd0 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2fd0: 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; 2fd4: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2fd8: e1a0a000 mov sl, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2fdc: 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); 2fe0: 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; 2fe4: e59a3008 ldr r3, [sl, #8] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2fe8: 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); 2fec: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2ff0: e1a02001 mov r2, r1 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 2ff4: e59a700c ldr r7, [sl, #12] <== NOT EXECUTED char *buffer = args->buffer; 2ff8: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2ffc: eb0005f4 bl 47d4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 3000: e250b000 subs fp, r0, #0 ; 0x0 <== NOT EXECUTED 3004: 1a00000f bne 3048 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 3008: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 300c: e59f23c0 ldr r2, [pc, #960] ; 33d4 <== NOT EXECUTED 3010: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 3014: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 3018: e7923183 ldr r3, [r2, r3, lsl #3] <== NOT EXECUTED 301c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3020: 0a00000b beq 3054 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 3024: e1a0100a mov r1, sl <== NOT EXECUTED 3028: e1a00004 mov r0, r4 <== NOT EXECUTED 302c: e1a0e00f mov lr, pc <== NOT EXECUTED 3030: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 3034: 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); 3038: e1a0b000 mov fp, r0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 303c: e58430e4 str r3, [r4, #228] <== NOT EXECUTED rtems_semaphore_release (tty->isem); 3040: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3044: eb000629 bl 48f0 <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 3048: e1a0000b mov r0, fp <== NOT EXECUTED 304c: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 3050: 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) { 3054: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 3058: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 305c: e1520003 cmp r2, r3 <== NOT EXECUTED 3060: 0a00001b beq 30d4 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 3064: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 3068: 0a000011 beq 30b4 <== NOT EXECUTED 306c: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 3070: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3074: e1520003 cmp r2, r3 <== NOT EXECUTED 3078: aa00000d bge 30b4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 307c: 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)) { 3080: e1a01002 mov r1, r2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 3084: e0620003 rsb r0, r2, r3 <== NOT EXECUTED 3088: ea000002 b 3098 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 308c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3090: e1530001 cmp r3, r1 <== NOT EXECUTED 3094: da000006 ble 30b4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 3098: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 309c: e7d32001 ldrb r2, [r3, r1] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30a0: e2577001 subs r7, r7, #1 ; 0x1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30a4: e7c02001 strb r2, [r0, r1] <== NOT EXECUTED 30a8: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED 30ac: 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)) { 30b0: 1afffff5 bne 308c <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 30b4: e59a300c ldr r3, [sl, #12] <== NOT EXECUTED 30b8: e0673003 rsb r3, r7, r3 <== NOT EXECUTED 30bc: e58a3014 str r3, [sl, #20] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 30c0: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30c4: e58420e4 str r2, [r4, #228] <== NOT EXECUTED rtems_semaphore_release (tty->isem); 30c8: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 30cc: eb000607 bl 48f0 <== NOT EXECUTED 30d0: eaffffdc b 3048 <== 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 30d4: 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; 30d8: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED if (tty->device.pollRead != NULL 30dc: 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; 30e0: 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; 30e4: e584b020 str fp, [r4, #32] <== NOT EXECUTED 30e8: e584b024 str fp, [r4, #36] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 30ec: e1a01002 mov r1, r2 <== NOT EXECUTED 30f0: 0a000002 beq 3100 <== NOT EXECUTED 30f4: e59430b4 ldr r3, [r4, #180] <== NOT EXECUTED 30f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30fc: 0a000060 beq 3284 <== 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, 3100: e2843049 add r3, r4, #73 ; 0x49 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 3104: e3a06c02 mov r6, #512 ; 0x200 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 3108: e5945074 ldr r5, [r4, #116] <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 310c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3110: e59f92c0 ldr r9, [pc, #704] ; 33d8 <== 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)) 3114: e2866002 add r6, r6, #2 ; 0x2 <== 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, 3118: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 311c: e594205c ldr r2, [r4, #92] <== NOT EXECUTED 3120: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 3124: e1520003 cmp r2, r3 <== NOT EXECUTED 3128: 0a000037 beq 320c <== NOT EXECUTED 312c: e5993000 ldr r3, [r9] <== NOT EXECUTED 3130: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3134: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 3138: e1520003 cmp r2, r3 <== NOT EXECUTED 313c: aa000032 bge 320c <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 3140: e594005c ldr r0, [r4, #92] <== NOT EXECUTED 3144: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 3148: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 314c: eb003efa bl 12d3c <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 3150: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED 3154: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 3158: e584005c str r0, [r4, #92] <== 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; 315c: e1a02000 mov r2, r0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 3160: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 3164: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 3168: e0800003 add r0, r0, r3 <== NOT EXECUTED 316c: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 3170: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 3174: eb003ef0 bl 12d3c <__umodsi3> <== NOT EXECUTED 3178: e59430bc ldr r3, [r4, #188] <== NOT EXECUTED 317c: e1500003 cmp r0, r3 <== NOT EXECUTED 3180: 2a000014 bcs 31d8 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 3184: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED 3188: e3c22001 bic r2, r2, #1 ; 0x1 <== NOT EXECUTED 318c: e58420b8 str r2, [r4, #184] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 3190: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 3194: e3c33f7f bic r3, r3, #508 ; 0x1fc <== NOT EXECUTED 3198: e3c33001 bic r3, r3, #1 ; 0x1 <== NOT EXECUTED 319c: e1a03b03 lsl r3, r3, #22 <== NOT EXECUTED 31a0: e1a03b23 lsr r3, r3, #22 <== NOT EXECUTED 31a4: e1530006 cmp r3, r6 <== NOT EXECUTED 31a8: 0a000029 beq 3254 <== 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) { 31ac: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 31b0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 31b4: 0a000007 beq 31d8 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 31b8: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 31bc: 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; 31c0: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 31c4: 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; 31c8: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 31cc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 31d0: 11a0e00f movne lr, pc <== NOT EXECUTED 31d4: 112fff12 bxne r2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 31d8: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 31dc: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 31e0: 0a000012 beq 3230 <== NOT EXECUTED if (siproc (c, tty)) 31e4: e1a00005 mov r0, r5 <== NOT EXECUTED 31e8: e1a01004 mov r1, r4 <== NOT EXECUTED 31ec: ebffff0a bl 2e1c <== NOT EXECUTED 31f0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 31f4: 1a000014 bne 324c <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 31f8: e594205c ldr r2, [r4, #92] <== NOT EXECUTED 31fc: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 3200: e1520003 cmp r2, r3 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 3204: e5945070 ldr r5, [r4, #112] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3208: 1affffc7 bne 312c <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 320c: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 3210: 0affff93 beq 3064 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 3214: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 3218: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 321c: e1a02005 mov r2, r5 <== NOT EXECUTED 3220: eb00056b bl 47d4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 3224: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3228: 0affffbb beq 311c <== NOT EXECUTED 322c: eaffff8c b 3064 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 3230: e1a00005 mov r0, r5 <== NOT EXECUTED 3234: e1a01004 mov r1, r4 <== NOT EXECUTED 3238: ebfffef7 bl 2e1c <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 323c: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 3240: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3244: e1530002 cmp r3, r2 <== NOT EXECUTED 3248: baffffea blt 31f8 <== NOT EXECUTED 324c: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED 3250: eaffffe8 b 31f8 <== 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)) 3254: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 3258: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 325c: 0a000002 beq 326c <== NOT EXECUTED 3260: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 3264: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 3268: 0affffcf beq 31ac <== 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, 326c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3270: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 3274: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3278: e1a0e00f mov lr, pc <== NOT EXECUTED 327c: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 3280: eaffffd4 b 31d8 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3284: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 3288: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 328c: 1a000032 bne 335c <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 3290: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 3294: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3298: 1a000006 bne 32b8 <== NOT EXECUTED 329c: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 32a0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 32a4: 0a000003 beq 32b8 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 32a8: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 32ac: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 32b0: eb00030b bl 3ee4 <== NOT EXECUTED 32b4: 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); 32b8: e28d600c add r6, sp, #12 ; 0xc <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 32bc: 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); 32c0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 32c4: e1a0e00f mov lr, pc <== NOT EXECUTED 32c8: e12fff12 bx r2 <== NOT EXECUTED if (n < 0) { 32cc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 32d0: aa000010 bge 3318 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 32d4: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 32d8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 32dc: 0a00002f beq 33a0 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 32e0: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 32e4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 32e8: 0a000002 beq 32f8 <== NOT EXECUTED 32ec: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 32f0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 32f4: 1a00002c bne 33ac <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 32f8: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 32fc: eb00066c bl 4cb4 <== NOT EXECUTED 3300: 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); 3304: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3308: e1a0e00f mov lr, pc <== NOT EXECUTED 330c: e12fff12 bx r2 <== NOT EXECUTED if (n < 0) { 3310: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3314: baffffee blt 32d4 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 3318: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 331c: e1a01004 mov r1, r4 <== NOT EXECUTED 3320: ebfffebd bl 2e1c <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3324: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 3328: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 332c: e1530002 cmp r3, r2 <== NOT EXECUTED 3330: aaffff4b bge 3064 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 3334: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 3338: 0a000002 beq 3348 <== NOT EXECUTED 333c: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 3340: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3344: 1a000010 bne 338c <== NOT EXECUTED 3348: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED 334c: eaffffdb b 32c0 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 3350: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3354: eb000656 bl 4cb4 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3358: e59410a0 ldr r1, [r4, #160] <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 335c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3360: e1a0e00f mov lr, pc <== NOT EXECUTED 3364: e12fff11 bx r1 <== NOT EXECUTED if (n < 0) { 3368: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 336c: e1a01004 mov r1, r4 <== NOT EXECUTED 3370: 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) { 3374: bafffff5 blt 3350 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 3378: ebfffea7 bl 2e1c <== NOT EXECUTED 337c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3380: 1affff37 bne 3064 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3384: e59410a0 ldr r1, [r4, #160] <== NOT EXECUTED 3388: eafffff3 b 335c <== 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); 338c: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 3390: e1a01006 mov r1, r6 <== NOT EXECUTED 3394: eb0002d2 bl 3ee4 <== NOT EXECUTED 3398: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED 339c: eaffffc7 b 32c0 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 33a0: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 33a4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 33a8: 0affff2d beq 3064 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 33ac: e1a01005 mov r1, r5 <== NOT EXECUTED 33b0: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 33b4: eb0002ca bl 3ee4 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 33b8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 33bc: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 33c0: e5941054 ldr r1, [r4, #84] <== NOT EXECUTED 33c4: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 33c8: e1530001 cmp r3, r1 <== NOT EXECUTED 33cc: 9affffc9 bls 32f8 <== NOT EXECUTED 33d0: eaffff23 b 3064 <== NOT EXECUTED 33d4: 00016c0c .word 0x00016c0c 33d8: 00015650 .word 0x00015650 000021f0 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 21f0: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 21f4: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 21f8: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 21fc: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 2200: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 2204: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED 2208: e1530002 cmp r3, r2 <== NOT EXECUTED * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 220c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 2210: 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)) 2214: 0a000038 beq 22fc <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 2218: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 221c: e2033003 and r3, r3, #3 ; 0x3 <== NOT EXECUTED 2220: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 2224: 0a000051 beq 2370 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 2228: e5902080 ldr r2, [r0, #128] <== NOT EXECUTED 222c: e5903084 ldr r3, [r0, #132] <== NOT EXECUTED 2230: e1520003 cmp r2, r3 <== NOT EXECUTED 2234: 0a00002a beq 22e4 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 2238: e10f2000 mrs r2, CPSR <== NOT EXECUTED 223c: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 2240: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; 2244: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 2248: e590c090 ldr ip, [r0, #144] <== NOT EXECUTED tty->t_dqlen = 0; 224c: e5803090 str r3, [r0, #144] <== NOT EXECUTED rtems_interrupt_enable(level); 2250: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 2254: e5900084 ldr r0, [r0, #132] <== NOT EXECUTED 2258: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 225c: e08c0000 add r0, ip, r0 <== NOT EXECUTED 2260: eb0042b5 bl 12d3c <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 2264: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 2268: e3530002 cmp r3, #2 ; 0x2 <== 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; 226c: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 2270: e5840084 str r0, [r4, #132] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 2274: 0a00005a beq 23e4 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 2278: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 227c: e1530006 cmp r3, r6 <== NOT EXECUTED 2280: 0a00002f beq 2344 <== 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)) 2284: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 2288: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 228c: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 2290: 0a000048 beq 23b8 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 2294: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 2298: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 229c: 85943088 ldrhi r3, [r4, #136] <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 22a0: 95943080 ldrls r3, [r4, #128] <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 22a4: 80665003 rsbhi r5, r6, r3 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 22a8: 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)) { 22ac: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 22b0: e594107c ldr r1, [r4, #124] <== 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)) { 22b4: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 22b8: 13a05001 movne r5, #1 ; 0x1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 22bc: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 22c0: e5843094 str r3, [r4, #148] <== NOT EXECUTED (*tty->device.write)(tty->minor, 22c4: e0811006 add r1, r1, r6 <== NOT EXECUTED 22c8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 22cc: e1a02005 mov r2, r5 <== NOT EXECUTED 22d0: e1a0e00f mov lr, pc <== NOT EXECUTED 22d4: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 22d8: e5846084 str r6, [r4, #132] <== NOT EXECUTED } return nToSend; } 22dc: e1a00005 mov r0, r5 <== NOT EXECUTED 22e0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 22e4: e5903094 ldr r3, [r0, #148] <== NOT EXECUTED 22e8: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 22ec: 0a00003f beq 23f0 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 22f0: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 22f4: e1a00005 mov r0, r5 <== NOT EXECUTED 22f8: 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, 22fc: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 2300: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 2304: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2308: e1a0e00f mov lr, pc <== NOT EXECUTED 230c: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 2310: e10f1000 mrs r1, CPSR <== NOT EXECUTED 2314: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 2318: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 231c: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2320: 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--; 2324: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2328: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 232c: 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--; 2330: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 2334: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 2338: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 233c: e1a00005 mov r0, r5 <== NOT EXECUTED 2340: 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) { 2344: e59420d4 ldr r2, [r4, #212] <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2348: 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) { 234c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2350: 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) { 2354: 01a05002 moveq r5, r2 <== NOT EXECUTED 2358: 0affffde beq 22d8 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 235c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2360: e59410d8 ldr r1, [r4, #216] <== NOT EXECUTED 2364: e1a0e00f mov lr, pc <== NOT EXECUTED 2368: e12fff12 bx r2 <== NOT EXECUTED 236c: eaffffd9 b 22d8 <== 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, 2370: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 2374: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2378: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 237c: e1a0e00f mov lr, pc <== NOT EXECUTED 2380: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 2384: e10f1000 mrs r1, CPSR <== NOT EXECUTED 2388: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 238c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 2390: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2394: 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--; 2398: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 239c: e3c33002 bic r3, r3, #2 ; 0x2 <== NOT EXECUTED 23a0: 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--; 23a4: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 23a8: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 23ac: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 23b0: e1a00005 mov r0, r5 <== NOT EXECUTED 23b4: 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); 23b8: e10f3000 mrs r3, CPSR <== NOT EXECUTED 23bc: e38320c0 orr r2, r3, #192 ; 0xc0 <== NOT EXECUTED 23c0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 23c4: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 23c8: 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; 23cc: e3822020 orr r2, r2, #32 ; 0x20 <== NOT EXECUTED 23d0: e58420b8 str r2, [r4, #184] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 23d4: e5841094 str r1, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable(level); 23d8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 23dc: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 23e0: eaffffbc b 22d8 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 23e4: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 23e8: eb000940 bl 48f0 <== NOT EXECUTED 23ec: eaffffa1 b 2278 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 23f0: e590008c ldr r0, [r0, #140] <== NOT EXECUTED 23f4: eb00093d bl 48f0 <== NOT EXECUTED 23f8: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 23fc: eaffffbc b 22f4 <== NOT EXECUTED 00003e54 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 3e54: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3e58: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 3e5c: e1a04000 mov r4, r0 <== NOT EXECUTED 3e60: e28d6007 add r6, sp, #7 ; 0x7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3e64: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED 3e68: e1a0300d mov r3, sp <== NOT EXECUTED 3e6c: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 3e70: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3e74: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3e78: eb0000b6 bl 4158 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3e7c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3e80: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 3e84: 1a000012 bne 3ed4 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 3e88: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3e8c: e1a0e00f mov lr, pc <== NOT EXECUTED 3e90: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED 3e94: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 3e98: e3730001 cmn r3, #1 ; 0x1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 3e9c: e1a01006 mov r1, r6 <== NOT EXECUTED 3ea0: e1a00004 mov r0, r4 <== NOT EXECUTED 3ea4: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 3ea8: 0affffee beq 3e68 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 3eac: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 3eb0: ebfff96c bl 2468 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3eb4: e1a0300d mov r3, sp <== NOT EXECUTED 3eb8: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 3ebc: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3ec0: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3ec4: eb0000a3 bl 4158 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3ec8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ecc: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 3ed0: 0affffec beq 3e88 <== NOT EXECUTED tty->rxTaskId = 0; 3ed4: e58470c4 str r7, [r4, #196] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3ed8: e1a00007 mov r0, r7 <== NOT EXECUTED 3edc: eb0002fb bl 4ad0 <== NOT EXECUTED 3ee0: eaffffe0 b 3e68 <== NOT EXECUTED 000021e4 : 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); 21e4: e59000c4 ldr r0, [r0, #196] <== NOT EXECUTED 21e8: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 21ec: ea00083a b 42dc <== NOT EXECUTED 00003de0 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 3de0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3de4: e59f7064 ldr r7, [pc, #100] ; 3e50 <== NOT EXECUTED 3de8: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 3dec: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 3df0: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 3df4: e1a0300d mov r3, sp <== NOT EXECUTED 3df8: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 3dfc: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3e00: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3e04: eb0000d3 bl 4158 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 3e08: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3e0c: e3130001 tst r3, #1 ; 0x1 <== 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); 3e10: 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) { 3e14: 1a000009 bne 3e40 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 3e18: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 3e1c: e1a03283 lsl r3, r3, #5 <== NOT EXECUTED 3e20: e0873003 add r3, r7, r3 <== NOT EXECUTED 3e24: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 3e28: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 3e2c: 11a0e00f movne lr, pc <== NOT EXECUTED 3e30: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 3e34: e1a00004 mov r0, r4 <== NOT EXECUTED 3e38: ebfff8ec bl 21f0 <== NOT EXECUTED 3e3c: eaffffec b 3df4 <== 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; 3e40: e58460c8 str r6, [r4, #200] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3e44: e1a00006 mov r0, r6 <== NOT EXECUTED 3e48: eb000320 bl 4ad0 <== NOT EXECUTED 3e4c: eaffffe8 b 3df4 <== NOT EXECUTED 3e50: 00016c0c .word 0x00016c0c 00002e80 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2e80: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2e84: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2e88: e5935028 ldr r5, [r3, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2e8c: e3a01000 mov r1, #0 ; 0x0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2e90: 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); 2e94: e1a02001 mov r2, r1 2e98: e5950018 ldr r0, [r5, #24] 2e9c: eb00064c bl 47d4 if (sc != RTEMS_SUCCESSFUL) 2ea0: e250a000 subs sl, r0, #0 ; 0x0 2ea4: 1a00000d bne 2ee0 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2ea8: e59520cc ldr r2, [r5, #204] 2eac: e59f309c ldr r3, [pc, #156] ; 2f50 2eb0: e1a02282 lsl r2, r2, #5 2eb4: e0833002 add r3, r3, r2 2eb8: e593300c ldr r3, [r3, #12] 2ebc: e3530000 cmp r3, #0 ; 0x0 2ec0: 0a000008 beq 2ee8 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2ec4: e1a01006 mov r1, r6 <== NOT EXECUTED 2ec8: e1a00005 mov r0, r5 <== NOT EXECUTED 2ecc: e1a0e00f mov lr, pc <== NOT EXECUTED 2ed0: e12fff13 bx r3 <== NOT EXECUTED 2ed4: e1a0a000 mov sl, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2ed8: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 2edc: eb000683 bl 48f0 <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 2ee0: e1a0000a mov r0, sl <== NOT EXECUTED 2ee4: 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) { 2ee8: e5953034 ldr r3, [r5, #52] 2eec: e3130001 tst r3, #1 ; 0x1 2ef0: 0a000011 beq 2f3c uint32_t count = args->count; 2ef4: e596800c ldr r8, [r6, #12] char *buffer = args->buffer; while (count--) 2ef8: e3580000 cmp r8, #0 ; 0x0 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 2efc: e5967008 ldr r7, [r6, #8] while (count--) 2f00: 01a0300a moveq r3, sl 2f04: 0a000007 beq 2f28 2f08: e1a0400a mov r4, sl oproc (*buffer++, tty); 2f0c: e7d70004 ldrb r0, [r7, r4] 2f10: e1a01005 mov r1, r5 2f14: e2844001 add r4, r4, #1 ; 0x1 2f18: ebfffe5d bl 2894 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2f1c: e1580004 cmp r8, r4 2f20: 1afffff9 bne 2f0c oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 2f24: e596300c ldr r3, [r6, #12] 2f28: e5863014 str r3, [r6, #20] } rtems_semaphore_release (tty->osem); 2f2c: e5950018 ldr r0, [r5, #24] 2f30: eb00066e bl 48f0 return sc; } 2f34: e1a0000a mov r0, sl 2f38: 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); 2f3c: e2860008 add r0, r6, #8 ; 0x8 <== NOT EXECUTED 2f40: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2f44: e1a02005 mov r2, r5 <== NOT EXECUTED 2f48: ebfffe09 bl 2774 <== NOT EXECUTED 2f4c: eafffff4 b 2f24 <== NOT EXECUTED 2f50: 00016c0c .word 0x00016c0c 00005990 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 5990: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 5994: e2518000 subs r8, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 5998: e1a06000 mov r6, r0 599c: e24dd004 sub sp, sp, #4 ; 0x4 59a0: e1a05002 mov r5, r2 59a4: e1a07003 mov r7, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 59a8: 03a0000a moveq r0, #10 ; 0xa 59ac: 0a000020 beq 5a34 return RTEMS_INVALID_NUMBER; if ( !routine ) 59b0: e3520000 cmp r2, #0 ; 0x0 59b4: 03a00009 moveq r0, #9 ; 0x9 59b8: 0a00001d beq 5a34 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 59bc: e59f0088 ldr r0, [pc, #136] ; 5a4c 59c0: e1a01006 mov r1, r6 59c4: e1a0200d mov r2, sp 59c8: eb0004f4 bl 6da0 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59cc: e59d3000 ldr r3, [sp] 59d0: e3530000 cmp r3, #0 ; 0x0 59d4: e1a04000 mov r4, r0 59d8: 13a00004 movne r0, #4 ; 0x4 59dc: 1a000014 bne 5a34 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 59e0: e284a010 add sl, r4, #16 ; 0x10 59e4: e1a0000a mov r0, sl 59e8: eb000c31 bl 8ab4 <_Watchdog_Remove> _ISR_Disable( level ); 59ec: e10f2000 mrs r2, CPSR 59f0: e38230c0 orr r3, r2, #192 ; 0xc0 59f4: 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 ) { 59f8: e5943018 ldr r3, [r4, #24] 59fc: e3530000 cmp r3, #0 ; 0x0 5a00: 1a00000d bne 5a3c Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5a04: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 5a08: e584502c str r5, [r4, #44] the_watchdog->id = id; 5a0c: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 5a10: 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; 5a14: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 5a18: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 5a1c: e59f002c ldr r0, [pc, #44] ; 5a50 5a20: e1a0100a mov r1, sl Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 5a24: e584801c str r8, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 5a28: eb000bb2 bl 88f8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 5a2c: eb0006fc bl 7624 <_Thread_Enable_dispatch> 5a30: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5a34: e28dd004 add sp, sp, #4 ; 0x4 5a38: 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 ); 5a3c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _Thread_Enable_dispatch(); 5a40: eb0006f7 bl 7624 <_Thread_Enable_dispatch> <== NOT EXECUTED 5a44: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5a48: eafffff9 b 5a34 <== NOT EXECUTED 5a4c: 000158c4 .word 0x000158c4 5a50: 00015444 .word 0x00015444 000129a4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 129a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 129a8: e3500000 cmp r0, #0 ; 0x0 129ac: e24dd010 sub sp, sp, #16 ; 0x10 129b0: e1a07001 mov r7, r1 129b4: e1a06002 mov r6, r2 129b8: 1a000002 bne 129c8 * 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; 129bc: e3a00013 mov r0, #19 ; 0x13 } return status; } 129c0: e28dd010 add sp, sp, #16 ; 0x10 129c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 129c8: e59f3144 ldr r3, [pc, #324] ; 12b14 129cc: e5d32000 ldrb r2, [r3] 129d0: e1500002 cmp r0, r2 129d4: 8a00004a bhi 12b04 129d8: e1a08000 mov r8, r0 <== NOT EXECUTED 129dc: e59f3134 ldr r3, [pc, #308] ; 12b18 129e0: e5932000 ldr r2, [r3] 129e4: e2822001 add r2, r2, #1 ; 0x1 129e8: e5832000 str r2, [r3] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 129ec: e59fa128 ldr sl, [pc, #296] ; 12b1c 129f0: e5da5000 ldrb r5, [sl] initialized = true; 129f4: e3a03001 mov r3, #1 ; 0x1 129f8: e5ca3000 strb r3, [sl] _Thread_Enable_dispatch(); 129fc: eb000c02 bl 15a0c <_Thread_Enable_dispatch> if ( tmpInitialized ) 12a00: e3550000 cmp r5, #0 ; 0x0 12a04: 13a0000e movne r0, #14 ; 0xe 12a08: 1affffec bne 129c0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12a0c: e59f410c ldr r4, [pc, #268] ; 12b20 12a10: e284c004 add ip, r4, #4 ; 0x4 12a14: e584c000 str ip, [r4] * 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( 12a18: e386e902 orr lr, r6, #32768 ; 0x8000 12a1c: e28dc00c add ip, sp, #12 ; 0xc the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12a20: e5844008 str r4, [r4, #8] 12a24: e1a01008 mov r1, r8 12a28: e58de000 str lr, [sp] 12a2c: e58dc004 str ip, [sp, #4] 12a30: e1a02007 mov r2, r7 12a34: e59f00e8 ldr r0, [pc, #232] ; 12b24 12a38: 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; 12a3c: e5845004 str r5, [r4, #4] 12a40: ebfffc60 bl 11bc8 /* 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) { 12a44: e3500000 cmp r0, #0 ; 0x0 initialized = false; 12a48: 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) { 12a4c: 1affffdb bne 129c0 * 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( 12a50: e59d200c ldr r2, [sp, #12] RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 12a54: e59fc0cc ldr ip, [pc, #204] ; 12b28 12a58: e1a03802 lsl r3, r2, #16 12a5c: e58d2008 str r2, [sp, #8] 12a60: e1dc21b0 ldrh r2, [ip, #16] 12a64: e1a01823 lsr r1, r3, #16 12a68: e1520001 cmp r2, r1 12a6c: 259c301c ldrcs r3, [ip, #28] 12a70: 27939101 ldrcs r9, [r3, r1, lsl #2] the_watchdog->routine = routine; 12a74: e59f30b0 ldr r3, [pc, #176] ; 12b2c 12a78: 31a09000 movcc r9, r0 12a7c: e5893064 str r3, [r9, #100] /* * 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; 12a80: e59fe0a8 ldr lr, [pc, #168] ; 12b30 12a84: e59f30a8 ldr r3, [pc, #168] ; 12b34 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12a88: e59f40a8 ldr r4, [pc, #168] ; 12b38 the_watchdog->id = id; 12a8c: e59f50a8 ldr r5, [pc, #168] ; 12b3c 12a90: e59d2008 ldr r2, [sp, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12a94: e59f60a4 ldr r6, [pc, #164] ; 12b40 12a98: 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( 12a9c: e59fc0a0 ldr ip, [pc, #160] ; 12b44 the_watchdog->routine = routine; 12aa0: e59f3084 ldr r3, [pc, #132] ; 12b2c the_chain->permanent_null = NULL; 12aa4: e3a0b000 mov fp, #0 ; 0x0 _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 12aa8: e1a00002 mov r0, r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12aac: e2847004 add r7, r4, #4 ; 0x4 12ab0: e2858004 add r8, r5, #4 ; 0x4 the_watchdog->id = id; 12ab4: e5892068 str r2, [r9, #104] the_watchdog->user_data = user_data; 12ab8: e589b06c str fp, [r9, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12abc: e589b050 str fp, [r9, #80] 12ac0: e59f1080 ldr r1, [pc, #128] ; 12b48 12ac4: 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( 12ac8: e58c9000 str r9, [ip] 12acc: e5847000 str r7, [r4] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12ad0: e5844008 str r4, [r4, #8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12ad4: e5858000 str r8, [r5] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12ad8: e5855008 str r5, [r5, #8] the_watchdog->routine = routine; 12adc: e586301c str r3, [r6, #28] the_watchdog->id = id; the_watchdog->user_data = user_data; 12ae0: 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; 12ae4: e584b004 str fp, [r4, #4] 12ae8: e585b004 str fp, [r5, #4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12aec: e586b008 str fp, [r6, #8] the_watchdog->routine = routine; the_watchdog->id = id; 12af0: e5860020 str r0, [r6, #32] _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 12af4: ebfffd8e bl 12134 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 12af8: 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; 12afc: 15cab000 strbne fp, [sl] 12b00: eaffffae b 129c0 * 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 ) 12b04: e3700001 cmn r0, #1 ; 0x1 12b08: 03a08000 moveq r8, #0 ; 0x0 12b0c: 0affffb2 beq 129dc 12b10: eaffffa9 b 129bc 12b14: 000260d0 .word 0x000260d0 12b18: 000327cc .word 0x000327cc 12b1c: 0002e26c .word 0x0002e26c 12b20: 00032734 .word 0x00032734 12b24: 54494d45 .word 0x54494d45 12b28: 000326d4 .word 0x000326d4 12b2c: 00015874 .word 0x00015874 12b30: 00012b4c .word 0x00012b4c 12b34: 000330fc .word 0x000330fc 12b38: 00032714 .word 0x00032714 12b3c: 00032728 .word 0x00032728 12b40: 00032740 .word 0x00032740 12b44: 00033100 .word 0x00033100 12b48: 00012bfc .word 0x00012bfc 000126ec : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 126ec: e92d4030 push {r4, r5, lr} 126f0: e24dd004 sub sp, sp, #4 ; 0x4 126f4: e1a01000 mov r1, r0 126f8: e1a0200d mov r2, sp 126fc: e59f00a8 ldr r0, [pc, #168] ; 127ac 12700: eb000a7c bl 150f8 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12704: e59d3000 ldr r3, [sp] 12708: e3530000 cmp r3, #0 ; 0x0 1270c: e1a04000 mov r4, r0 12710: 13a00004 movne r0, #4 ; 0x4 12714: 1a00000a bne 12744 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 12718: e5943038 ldr r3, [r4, #56] 1271c: e3530004 cmp r3, #4 ; 0x4 12720: 979ff103 ldrls pc, [pc, r3, lsl #2] 12724: ea000011 b 12770 <== NOT EXECUTED 12728: 00012788 .word 0x00012788 <== NOT EXECUTED 1272c: 0001274c .word 0x0001274c <== NOT EXECUTED 12730: 0001277c .word 0x0001277c <== NOT EXECUTED 12734: 0001277c .word 0x0001277c <== NOT EXECUTED 12738: 0001277c .word 0x0001277c <== 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(); 1273c: eb000cb2 bl 15a0c <_Thread_Enable_dispatch> <== NOT EXECUTED 12740: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12744: e28dd004 add sp, sp, #4 ; 0x4 12748: 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 ) { 1274c: e59f505c ldr r5, [pc, #92] ; 127b0 <== NOT EXECUTED 12750: e5953000 ldr r3, [r5] <== NOT EXECUTED 12754: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 12758: 0afffff7 beq 1273c <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 1275c: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED 12760: eb0012e3 bl 172f4 <_Watchdog_Remove> <== NOT EXECUTED (*_Timer_Server_schedule_operation)( the_timer ); 12764: e1a00004 mov r0, r4 <== NOT EXECUTED 12768: e1a0e00f mov lr, pc <== NOT EXECUTED 1276c: e595f000 ldr pc, [r5] <== NOT EXECUTED case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 12770: eb000ca5 bl 15a0c <_Thread_Enable_dispatch> <== NOT EXECUTED 12774: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12778: eafffff1 b 12744 <== NOT EXECUTED (*_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(); 1277c: eb000ca2 bl 15a0c <_Thread_Enable_dispatch> 12780: e3a0000b mov r0, #11 ; 0xb 12784: eaffffee b 12744 switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 12788: e2844010 add r4, r4, #16 ; 0x10 1278c: e1a00004 mov r0, r4 12790: eb0012d7 bl 172f4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 12794: e59f0018 ldr r0, [pc, #24] ; 127b4 12798: e1a01004 mov r1, r4 1279c: eb001265 bl 17138 <_Watchdog_Insert> case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 127a0: eb000c99 bl 15a0c <_Thread_Enable_dispatch> 127a4: e3a00000 mov r0, #0 ; 0x0 127a8: eaffffe5 b 12744 127ac: 000330bc .word 0x000330bc 127b0: 000330fc .word 0x000330fc 127b4: 000328a4 .word 0x000328a4 000127b8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 127b8: e92d41f0 push {r4, r5, r6, r7, r8, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 127bc: e59fc0d0 ldr ip, [pc, #208] ; 12894 127c0: e59c4000 ldr r4, [ip] 127c4: e3540000 cmp r4, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 127c8: e1a07000 mov r7, r0 127cc: e24dd004 sub sp, sp, #4 ; 0x4 127d0: e1a06001 mov r6, r1 127d4: e1a05002 mov r5, r2 127d8: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 127dc: 03a0000e moveq r0, #14 ; 0xe 127e0: 0a000005 beq 127fc return RTEMS_INCORRECT_STATE; if ( !routine ) 127e4: e3520000 cmp r2, #0 ; 0x0 127e8: 03a00009 moveq r0, #9 ; 0x9 127ec: 0a000002 beq 127fc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 127f0: e3510000 cmp r1, #0 ; 0x0 127f4: 03a0000a moveq r0, #10 ; 0xa 127f8: 1a000001 bne 12804 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 127fc: e28dd004 add sp, sp, #4 ; 0x4 12800: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 12804: e59f008c ldr r0, [pc, #140] ; 12898 12808: e1a01007 mov r1, r7 1280c: e1a0200d mov r2, sp 12810: eb000a38 bl 150f8 <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12814: e59d3000 ldr r3, [sp] 12818: e3530000 cmp r3, #0 ; 0x0 1281c: e1a04000 mov r4, r0 12820: 13a00004 movne r0, #4 ; 0x4 12824: 1afffff4 bne 127fc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12828: e2840010 add r0, r4, #16 ; 0x10 1282c: eb0012b0 bl 172f4 <_Watchdog_Remove> _ISR_Disable( level ); 12830: e10f1000 mrs r1, CPSR 12834: e38130c0 orr r3, r1, #192 ; 0xc0 12838: 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 ) { 1283c: e5942018 ldr r2, [r4, #24] 12840: e3520000 cmp r2, #0 ; 0x0 12844: 1a00000e bne 12884 /* * 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; 12848: e3a03001 mov r3, #1 ; 0x1 1284c: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12850: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 12854: e584502c str r5, [r4, #44] the_watchdog->id = id; 12858: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 1285c: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 12860: e584601c str r6, [r4, #28] _ISR_Enable( level ); 12864: 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 ); 12868: e59f302c ldr r3, [pc, #44] ; 1289c 1286c: e1a00004 mov r0, r4 12870: e1a0e00f mov lr, pc 12874: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 12878: eb000c63 bl 15a0c <_Thread_Enable_dispatch> 1287c: e3a00000 mov r0, #0 ; 0x0 12880: eaffffdd b 127fc * 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 ); 12884: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_Enable_dispatch(); 12888: eb000c5f bl 15a0c <_Thread_Enable_dispatch> <== NOT EXECUTED 1288c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12890: eaffffd9 b 127fc <== NOT EXECUTED 12894: 00033100 .word 0x00033100 12898: 000330bc .word 0x000330bc 1289c: 000330fc .word 0x000330fc 000128a0 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 128a0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 128a4: e59fc0e4 ldr ip, [pc, #228] ; 12990 128a8: e59c4000 ldr r4, [ip] 128ac: e3540000 cmp r4, #0 ; 0x0 Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 128b0: e1a06000 mov r6, r0 128b4: e24dd004 sub sp, sp, #4 ; 0x4 128b8: e1a04001 mov r4, r1 128bc: e1a05002 mov r5, r2 128c0: e1a0a003 mov sl, r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 128c4: 03a0000e moveq r0, #14 ; 0xe 128c8: 0a00000c beq 12900 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 128cc: e59f30c0 ldr r3, [pc, #192] ; 12994 128d0: e5d32000 ldrb r2, [r3] 128d4: e3520000 cmp r2, #0 ; 0x0 128d8: 03a0000b moveq r0, #11 ; 0xb 128dc: 0a000007 beq 12900 return RTEMS_NOT_DEFINED; if ( !routine ) 128e0: e3550000 cmp r5, #0 ; 0x0 128e4: 03a00009 moveq r0, #9 ; 0x9 128e8: 0a000004 beq 12900 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 128ec: e1a00001 mov r0, r1 128f0: ebfff458 bl fa58 <_TOD_Validate> 128f4: e3500000 cmp r0, #0 ; 0x0 128f8: 1a000002 bne 12908 */ (*_Timer_Server_schedule_operation)( the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 128fc: e3a00014 mov r0, #20 ; 0x14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12900: e28dd004 add sp, sp, #4 ; 0x4 12904: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 12908: e1a00004 mov r0, r4 1290c: ebfff417 bl f970 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch ) 12910: e59f9080 ldr r9, [pc, #128] ; 12998 12914: e5993000 ldr r3, [r9] 12918: e1500003 cmp r0, r3 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1291c: e1a08000 mov r8, r0 if ( seconds <= _TOD_Seconds_since_epoch ) 12920: 9afffff5 bls 128fc 12924: e59f0070 ldr r0, [pc, #112] ; 1299c 12928: e1a01006 mov r1, r6 1292c: e1a0200d mov r2, sp 12930: eb0009f0 bl 150f8 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12934: e59d7000 ldr r7, [sp] 12938: e3570000 cmp r7, #0 ; 0x0 1293c: e1a04000 mov r4, r0 12940: 13a00004 movne r0, #4 ; 0x4 12944: 1affffed bne 12900 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12948: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED 1294c: eb001268 bl 172f4 <_Watchdog_Remove> <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 12950: e5846030 str r6, [r4, #48] <== NOT EXECUTED the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 12954: e5993000 ldr r3, [r9] <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 12958: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 1295c: e0633008 rsb r3, r3, r8 <== NOT EXECUTED /* * _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 ); 12960: e1a00004 mov r0, r4 <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 12964: e5842038 str r2, [r4, #56] <== NOT EXECUTED _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 12968: e584301c str r3, [r4, #28] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 1296c: e584502c str r5, [r4, #44] <== NOT EXECUTED /* * _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 ); 12970: e59f3028 ldr r3, [pc, #40] ; 129a0 <== NOT EXECUTED the_watchdog->id = id; the_watchdog->user_data = user_data; 12974: e584a034 str sl, [r4, #52] <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12978: e5847018 str r7, [r4, #24] <== NOT EXECUTED 1297c: e1a0e00f mov lr, pc <== NOT EXECUTED 12980: e593f000 ldr pc, [r3] <== NOT EXECUTED _Thread_Enable_dispatch(); 12984: eb000c20 bl 15a0c <_Thread_Enable_dispatch> <== NOT EXECUTED 12988: e1a00007 mov r0, r7 <== NOT EXECUTED 1298c: eaffffdb b 12900 <== NOT EXECUTED 12990: 00033100 .word 0x00033100 12994: 000327dc .word 0x000327dc 12998: 00032854 .word 0x00032854 1299c: 000330bc .word 0x000330bc 129a0: 000330fc .word 0x000330fc 00006798 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 6798: 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) 679c: e2109202 ands r9, r0, #536870912 ; 0x20000000 <== NOT EXECUTED static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 67a0: e1a05000 mov r5, r0 <== NOT EXECUTED 67a4: e1a06001 mov r6, r1 <== NOT EXECUTED 67a8: e1a0a002 mov sl, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 67ac: 0a00000c beq 67e4 <== NOT EXECUTED { if (rtems_panic_in_progress++) 67b0: e59f1190 ldr r1, [pc, #400] ; 6948 <== NOT EXECUTED 67b4: e5913000 ldr r3, [r1] <== NOT EXECUTED 67b8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 67bc: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 67c0: e5813000 str r3, [r1] <== NOT EXECUTED 67c4: 0a000003 beq 67d8 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 67c8: e59f217c ldr r2, [pc, #380] ; 694c <== NOT EXECUTED 67cc: e5923000 ldr r3, [r2] <== NOT EXECUTED 67d0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 67d4: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 67d8: e5913000 ldr r3, [r1] <== NOT EXECUTED 67dc: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 67e0: ca00002f bgt 68a4 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 67e4: e59f8164 ldr r8, [pc, #356] ; 6950 <== NOT EXECUTED 67e8: e5983000 ldr r3, [r8] <== NOT EXECUTED 67ec: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 67f0: eb003ec9 bl 1631c <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 67f4: e2150101 ands r0, r5, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 67f8: e3c54207 bic r4, r5, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 67fc: 01a07000 moveq r7, r0 <== NOT EXECUTED 6800: 1a000037 bne 68e4 <== 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); 6804: e5983000 ldr r3, [r8] <== NOT EXECUTED 6808: e1a01006 mov r1, r6 <== NOT EXECUTED 680c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6810: e1a0200a mov r2, sl <== NOT EXECUTED 6814: eb0057e3 bl 1c7a8 <== NOT EXECUTED if (status) 6818: 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); 681c: e1a06000 mov r6, r0 <== NOT EXECUTED if (status) 6820: 1a000021 bne 68ac <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 6824: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 6828: 0a00000b beq 685c <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 682c: da000004 ble 6844 <== NOT EXECUTED 6830: e1a00007 mov r0, r7 <== NOT EXECUTED 6834: eb004bc6 bl 19754 <== NOT EXECUTED 6838: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 683c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 6840: 1a000032 bne 6910 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 6844: e5983000 ldr r3, [r8] <== NOT EXECUTED 6848: e59f1104 ldr r1, [pc, #260] ; 6954 <== NOT EXECUTED 684c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6850: e1a02007 mov r2, r7 <== NOT EXECUTED 6854: eb004003 bl 16868 <== NOT EXECUTED 6858: e0866000 add r6, r6, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 685c: e5983000 ldr r3, [r8] <== NOT EXECUTED 6860: e59f10f0 ldr r1, [pc, #240] ; 6958 <== NOT EXECUTED 6864: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6868: eb003ffe bl 16868 <== NOT EXECUTED (void) fflush(stderr); 686c: 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"); 6870: e1a04000 mov r4, r0 <== NOT EXECUTED (void) fflush(stderr); 6874: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6878: eb003ea7 bl 1631c <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 687c: 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"); 6880: 00840006 addeq r0, r4, r6 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 6884: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 6888: e3590000 cmp r9, #0 ; 0x0 <== NOT EXECUTED 688c: 0a000029 beq 6938 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 6890: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 6894: e59f10c0 ldr r1, [pc, #192] ; 695c <== NOT EXECUTED 6898: eb00003d bl 6994 <== NOT EXECUTED _exit(local_errno); 689c: e1a00007 mov r0, r7 <== NOT EXECUTED 68a0: eb000219 bl 710c <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); abort(); 68a4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } } return chars_written; } 68a8: 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)); 68ac: e59f309c ldr r3, [pc, #156] ; 6950 <== NOT EXECUTED 68b0: 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); 68b4: e1a01004 mov r1, r4 <== NOT EXECUTED 68b8: e59f00a0 ldr r0, [pc, #160] ; 6960 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 68bc: 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); 68c0: eb00283e bl 109c0 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 68c4: e59f1098 ldr r1, [pc, #152] ; 6964 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 68c8: 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)); 68cc: e1a00004 mov r0, r4 <== NOT EXECUTED 68d0: eb003fe4 bl 16868 <== NOT EXECUTED if (local_errno) 68d4: 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)); 68d8: e0866000 add r6, r6, r0 <== NOT EXECUTED if (local_errno) 68dc: 0affffde beq 685c <== NOT EXECUTED 68e0: eaffffd1 b 682c <== 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; 68e4: eb003dcc bl 1601c <__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); 68e8: 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; 68ec: 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); 68f0: e1a01006 mov r1, r6 <== NOT EXECUTED 68f4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 68f8: e1a0200a mov r2, sl <== NOT EXECUTED 68fc: eb0057a9 bl 1c7a8 <== NOT EXECUTED if (status) 6900: 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); 6904: e1a06000 mov r6, r0 <== NOT EXECUTED if (status) 6908: 0affffc5 beq 6824 <== NOT EXECUTED 690c: eaffffe6 b 68ac <== 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)); 6910: e5983000 ldr r3, [r8] <== NOT EXECUTED 6914: e1a00007 mov r0, r7 <== NOT EXECUTED 6918: e593400c ldr r4, [r3, #12] <== NOT EXECUTED 691c: eb004b8c bl 19754 <== NOT EXECUTED 6920: e59f1040 ldr r1, [pc, #64] ; 6968 <== NOT EXECUTED 6924: e1a02000 mov r2, r0 <== NOT EXECUTED 6928: e1a00004 mov r0, r4 <== NOT EXECUTED 692c: eb003fcd bl 16868 <== NOT EXECUTED 6930: e0866000 add r6, r6, r0 <== NOT EXECUTED 6934: eaffffc8 b 685c <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 6938: e59f102c ldr r1, [pc, #44] ; 696c <== NOT EXECUTED 693c: e1a00009 mov r0, r9 <== NOT EXECUTED 6940: eb000013 bl 6994 <== NOT EXECUTED abort(); 6944: eb003dab bl 15ff8 <== NOT EXECUTED 6948: 000270cc .word 0x000270cc 694c: 0002724c .word 0x0002724c 6950: 00022708 .word 0x00022708 6954: 00024638 .word 0x00024638 6958: 00023f34 .word 0x00023f34 695c: 0002464c .word 0x0002464c 6960: 00022cb4 .word 0x00022cb4 6964: 00024618 .word 0x00024618 6968: 00024628 .word 0x00024628 696c: 00024664 .word 0x00024664 0000563c : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 563c: e92d4010 push {r4, lr} void *ptr; /* * check the arguments */ if ( !pointer ) 5640: e2514000 subs r4, r1, #0 ; 0x0 5644: 0a000001 beq 5650 return false; if ( !bytes ) 5648: e3500000 cmp r0, #0 ; 0x0 564c: 1a000001 bne 5658 ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) return false; *pointer = ptr; return true; 5650: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 5654: e8bd8010 pop {r4, pc} <== NOT EXECUTED return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 5658: e1a01000 mov r1, r0 565c: e59f0014 ldr r0, [pc, #20] ; 5678 5660: eb000570 bl 6c28 <_Protected_heap_Allocate> if (!ptr) 5664: e3500000 cmp r0, #0 ; 0x0 return false; *pointer = ptr; 5668: 15840000 strne r0, [r4] 566c: 13a00001 movne r0, #1 ; 0x1 /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 5670: 18bd8010 popne {r4, pc} 5674: eafffff5 b 5650 <== NOT EXECUTED 5678: 0001bb6c .word 0x0001bb6c 0000562c : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 562c: e1a01000 mov r1, r0 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 5630: e59f0000 ldr r0, [pc, #0] ; 5638 <== NOT EXECUTED 5634: ea00058a b 6c64 <_Protected_heap_Free> <== NOT EXECUTED 5638: 0001bb6c .word 0x0001bb6c 0001e800 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 1e800: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 1e804: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1e808: e59f90ec ldr r9, [pc, #236] ; 1e8fc <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 1e80c: e59f80ec ldr r8, [pc, #236] ; 1e900 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 1e810: e59fa0ec ldr sl, [pc, #236] ; 1e904 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 1e814: e1a05000 mov r5, r0 <== NOT EXECUTED 1e818: e1a0b001 mov fp, r1 <== NOT EXECUTED 1e81c: e3e07102 mvn r7, #-2147483648 ; 0x80000000 <== NOT EXECUTED 1e820: e1a06004 mov r6, r4 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1e824: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 1e828: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 1e82c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e830: e5853004 str r3, [r5, #4] <== NOT EXECUTED 1e834: ba00001d blt 1e8b0 <== NOT EXECUTED 1e838: e5953000 ldr r3, [r5] <== NOT EXECUTED 1e83c: e4d30001 ldrb r0, [r3], #1 <== NOT EXECUTED if (c == ':') 1e840: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1e844: e5853000 str r3, [r5] <== NOT EXECUTED if (c == ':') 1e848: 0a00001d beq 1e8c4 <== NOT EXECUTED break; if (sign == 0) { 1e84c: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 1e850: 1a000004 bne 1e868 <== NOT EXECUTED if (c == '-') { 1e854: e350002d cmp r0, #45 ; 0x2d <== NOT EXECUTED sign = -1; limit++; 1e858: 02877001 addeq r7, r7, #1 ; 0x1 <== NOT EXECUTED 1e85c: 02466001 subeq r6, r6, #1 ; 0x1 <== NOT EXECUTED for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 1e860: 0affffef beq 1e824 <== NOT EXECUTED sign = -1; limit++; continue; 1e864: e3a06001 mov r6, #1 ; 0x1 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 1e868: e5983000 ldr r3, [r8] <== NOT EXECUTED 1e86c: e7d32000 ldrb r2, [r3, r0] <== NOT EXECUTED 1e870: e3120004 tst r2, #4 ; 0x4 <== NOT EXECUTED 1e874: 0a000017 beq 1e8d8 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 1e878: e083279a umull r2, r3, sl, r7 <== NOT EXECUTED 1e87c: e15401a3 cmp r4, r3, lsr #3 <== NOT EXECUTED 1e880: 8a000014 bhi 1e8d8 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 1e884: e2400030 sub r0, r0, #48 ; 0x30 <== NOT EXECUTED 1e888: 11a01184 lslne r1, r4, #3 <== NOT EXECUTED 1e88c: 11a02084 lslne r2, r4, #1 <== NOT EXECUTED if ((i > (limit / 10)) 1e890: 0a000012 beq 1e8e0 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 1e894: e0823001 add r3, r2, r1 <== NOT EXECUTED 1e898: e0804003 add r4, r0, r3 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1e89c: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 1e8a0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 1e8a4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e8a8: e5853004 str r3, [r5, #4] <== NOT EXECUTED 1e8ac: aaffffe1 bge 1e838 <== NOT EXECUTED 1e8b0: e5990000 ldr r0, [r9] <== NOT EXECUTED 1e8b4: e1a01005 mov r1, r5 <== NOT EXECUTED 1e8b8: eb004f02 bl 324c8 <__srget_r> <== NOT EXECUTED if (c == ':') 1e8bc: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 1e8c0: 1affffe1 bne 1e84c <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 1e8c4: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED return 0; *val = i * sign; 1e8c8: 10030694 mulne r3, r4, r6 <== NOT EXECUTED 1e8cc: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 1e8d0: 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) 1e8d4: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED return 0; *val = i * sign; return 1; 1e8d8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 1e8dc: 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)) 1e8e0: e1a01184 lsl r1, r4, #3 <== NOT EXECUTED 1e8e4: e1a02084 lsl r2, r4, #1 <== NOT EXECUTED 1e8e8: e0823001 add r3, r2, r1 <== NOT EXECUTED 1e8ec: e0633007 rsb r3, r3, r7 <== NOT EXECUTED 1e8f0: e1500003 cmp r0, r3 <== NOT EXECUTED 1e8f4: 9affffe6 bls 1e894 <== NOT EXECUTED 1e8f8: eafffff6 b 1e8d8 <== NOT EXECUTED 1e8fc: 000411fc .word 0x000411fc 1e900: 000411f0 .word 0x000411f0 1e904: cccccccd .word 0xcccccccd 0001e908 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 1e908: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 1e90c: e1a05002 mov r5, r2 <== NOT EXECUTED int c; *name = *bufp; 1e910: e5922000 ldr r2, [r2] <== NOT EXECUTED for (;;) { c = getc(fp); 1e914: e59f70d0 ldr r7, [pc, #208] ; 1e9ec <== NOT EXECUTED static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 1e918: 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) { 1e91c: e1a04000 mov r4, r0 <== NOT EXECUTED 1e920: e1a06003 mov r6, r3 <== NOT EXECUTED 1e924: ea000013 b 1e978 <== NOT EXECUTED int c; *name = *bufp; for (;;) { c = getc(fp); 1e928: e5943000 ldr r3, [r4] <== NOT EXECUTED 1e92c: e4d30001 ldrb r0, [r3], #1 <== NOT EXECUTED if (c == ':') { 1e930: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 1e934: e5843000 str r3, [r4] <== NOT EXECUTED if (c == ':') { 1e938: 0a000018 beq 1e9a0 <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { 1e93c: e350000a cmp r0, #10 ; 0xa <== NOT EXECUTED 1e940: 0a000024 beq 1e9d8 <== NOT EXECUTED if (!nlFlag) return 0; break; } if (c == EOF) 1e944: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED 1e948: 0a000025 beq 1e9e4 <== NOT EXECUTED return 0; if (*nleft < 2) 1e94c: e5963000 ldr r3, [r6] <== NOT EXECUTED 1e950: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 1e954: 9a000022 bls 1e9e4 <== NOT EXECUTED return 0; **bufp = c; 1e958: e5953000 ldr r3, [r5] <== NOT EXECUTED 1e95c: e5c30000 strb r0, [r3] <== NOT EXECUTED ++(*bufp); 1e960: e5952000 ldr r2, [r5] <== NOT EXECUTED --(*nleft); 1e964: e5963000 ldr r3, [r6] <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 1e968: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED --(*nleft); 1e96c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 1e970: e5852000 str r2, [r5] <== NOT EXECUTED --(*nleft); 1e974: e5863000 str r3, [r6] <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 1e978: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 1e97c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 1e980: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e984: e5843004 str r3, [r4, #4] <== NOT EXECUTED 1e988: aaffffe6 bge 1e928 <== NOT EXECUTED 1e98c: e5970000 ldr r0, [r7] <== NOT EXECUTED 1e990: e1a01004 mov r1, r4 <== NOT EXECUTED 1e994: eb004ecb bl 324c8 <__srget_r> <== NOT EXECUTED if (c == ':') { 1e998: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 1e99c: 1affffe6 bne 1e93c <== NOT EXECUTED if (nlFlag) 1e9a0: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 1e9a4: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1e9a8: 1a00000d bne 1e9e4 <== NOT EXECUTED return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 1e9ac: e5951000 ldr r1, [r5] <== NOT EXECUTED 1e9b0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1e9b4: e5c13000 strb r3, [r1] <== NOT EXECUTED ++(*bufp); 1e9b8: e5952000 ldr r2, [r5] <== NOT EXECUTED --(*nleft); 1e9bc: e5963000 ldr r3, [r6] <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 1e9c0: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED --(*nleft); 1e9c4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 1e9c8: e5852000 str r2, [r5] <== NOT EXECUTED --(*nleft); 1e9cc: e5863000 str r3, [r6] <== NOT EXECUTED 1e9d0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 1e9d4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 1e9d8: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 1e9dc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e9e0: 1afffff1 bne 1e9ac <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 1e9e4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 1e9e8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 1e9ec: 000411fc .word 0x000411fc 00004424 : scandir( const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)) { 4424: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 4428: e24dd054 sub sp, sp, #84 ; 0x54 442c: e58d1004 str r1, [sp, #4] 4430: e1a09002 mov r9, r2 4434: e58d3000 str r3, [sp] struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 4438: ebfffd9a bl 3aa8 443c: e250a000 subs sl, r0, #0 ; 0x0 4440: 02400001 subeq r0, r0, #1 ; 0x1 4444: 0a000040 beq 454c return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 4448: e28db008 add fp, sp, #8 ; 0x8 444c: e59a0000 ldr r0, [sl] 4450: e1a0100b mov r1, fp 4454: eb001bfb bl b448 4458: e3500000 cmp r0, #0 ; 0x0 445c: ba00004b blt 4590 /* * 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); 4460: e59d3028 ldr r3, [sp, #40] 4464: e59f4174 ldr r4, [pc, #372] ; 45e0 4468: e0c21394 smull r1, r2, r4, r3 446c: e1a03fc3 asr r3, r3, #31 4470: e0638142 rsb r8, r3, r2, asr #2 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); 4474: e1a00108 lsl r0, r8, #2 4478: ebfffb8b bl 32ac if (names == NULL) 447c: e2507000 subs r7, r0, #0 ; 0x0 goto cleanup_and_bail; 4480: 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) 4484: 0a000041 beq 4590 goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 4488: e1a0000a mov r0, sl 448c: ebffff55 bl 41e8 4490: e2504000 subs r4, r0, #0 ; 0x0 4494: 0a000020 beq 451c if (select != NULL && !(*select)(d)) 4498: e3590000 cmp r9, #0 ; 0x0 449c: 0a000003 beq 44b0 44a0: e1a0e00f mov lr, pc 44a4: e12fff19 bx r9 44a8: e3500000 cmp r0, #0 ; 0x0 44ac: 0afffff5 beq 4488 continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 44b0: e1d400ba ldrh r0, [r4, #10] 44b4: e2800004 add r0, r0, #4 ; 0x4 44b8: e3c00003 bic r0, r0, #3 ; 0x3 44bc: e280000c add r0, r0, #12 ; 0xc 44c0: ebfffb79 bl 32ac if (p == NULL) 44c4: 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); 44c8: e284100c add r1, r4, #12 ; 0xc 44cc: 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) 44d0: 0a000032 beq 45a0 goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; 44d4: 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; 44d8: e5943000 ldr r3, [r4] p->d_reclen = d->d_reclen; 44dc: e1d440b8 ldrh r4, [r4, #8] * 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; 44e0: e5853000 str r3, [r5] p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 44e4: e28c2001 add r2, ip, #1 ; 0x1 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 44e8: 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; 44ec: e1c540b8 strh r4, [r5, #8] p->d_namlen = d->d_namlen; 44f0: e1c5c0ba strh ip, [r5, #10] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 44f4: eb00323a bl 10de4 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 44f8: e1560008 cmp r6, r8 44fc: 2a000014 bcs 4554 names = (struct dirent **)realloc((char *)names, arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; 4500: e1a03106 lsl r3, r6, #2 4504: e2433004 sub r3, r3, #4 ; 0x4 4508: 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) { 450c: e1a0000a mov r0, sl 4510: ebffff34 bl 41e8 4514: e2504000 subs r4, r0, #0 ; 0x0 4518: 1affffde bne 4498 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 451c: e1a0000a mov r0, sl 4520: ebfff848 bl 2648 if (nitems && dcomp != NULL){ 4524: e59d3000 ldr r3, [sp] 4528: e3560000 cmp r6, #0 ; 0x0 452c: 13530000 cmpne r3, #0 ; 0x0 qsort(names, nitems, sizeof(struct dirent *), 4530: 11a00007 movne r0, r7 4534: 11a01006 movne r1, r6 4538: 13a02004 movne r2, #4 ; 0x4 453c: 1b002ee7 blne 100e0 (int (*)(const void *, const void *)) dcomp); } *namelist = names; 4540: e59dc004 ldr ip, [sp, #4] 4544: e58c7000 str r7, [ip] return(nitems); 4548: e1a00006 mov r0, r6 free( names[i] ); free( names ); } return(-1); } 454c: e28dd054 add sp, sp, #84 ; 0x54 4550: 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) 4554: e1a0100b mov r1, fp <== NOT EXECUTED 4558: e59a0000 ldr r0, [sl] <== NOT EXECUTED 455c: eb001bb9 bl b448 <== NOT EXECUTED 4560: 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, 4564: 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) 4568: ba00000c blt 45a0 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 456c: e59d3028 ldr r3, [sp, #40] <== NOT EXECUTED 4570: e59fc068 ldr ip, [pc, #104] ; 45e0 <== NOT EXECUTED 4574: e0c2139c smull r1, r2, ip, r3 <== NOT EXECUTED 4578: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 457c: e06380c2 rsb r8, r3, r2, asr #1 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 4580: e1a01108 lsl r1, r8, #2 <== NOT EXECUTED 4584: eb001c5e bl b704 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 4588: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED 458c: 1affffdb bne 4500 <== NOT EXECUTED return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 4590: e1a0000a mov r0, sl 4594: ebfff82b bl 2648 4598: e3e00000 mvn r0, #0 ; 0x0 459c: eaffffea b 454c 45a0: e1a0000a mov r0, sl <== NOT EXECUTED 45a4: ebfff827 bl 2648 <== NOT EXECUTED if ( names ) { for (i=0; i < nitems; i++ ) 45a8: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 45ac: 0a000007 beq 45d0 <== NOT EXECUTED 45b0: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 45b4: e1a03004 mov r3, r4 <== NOT EXECUTED free( names[i] ); 45b8: e7970103 ldr r0, [r7, r3, lsl #2] <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 45bc: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED free( names[i] ); 45c0: ebfff96d bl 2b7c <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 45c4: e1560004 cmp r6, r4 <== NOT EXECUTED 45c8: e1a03004 mov r3, r4 <== NOT EXECUTED 45cc: 8afffff9 bhi 45b8 <== NOT EXECUTED free( names[i] ); free( names ); 45d0: e1a00007 mov r0, r7 <== NOT EXECUTED 45d4: ebfff968 bl 2b7c <== NOT EXECUTED 45d8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 45dc: eaffffda b 454c <== NOT EXECUTED 45e0: 2aaaaaab .word 0x2aaaaaab 0001e9f0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1e9f0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 1e9f4: e24dd014 sub sp, sp, #20 ; 0x14 <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1e9f8: e28d5008 add r5, sp, #8 ; 0x8 <== NOT EXECUTED 1e9fc: e28d6004 add r6, sp, #4 ; 0x4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1ea00: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 1ea04: e58d3004 str r3, [sp, #4] <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1ea08: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED 1ea0c: e1a02005 mov r2, r5 <== NOT EXECUTED 1ea10: e1a03006 mov r3, r6 <== NOT EXECUTED 1ea14: e58d7000 str r7, [sp] <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1ea18: e1a04000 mov r4, r0 <== NOT EXECUTED 1ea1c: e1a08001 mov r8, r1 <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1ea20: ebffffb8 bl 1e908 <== NOT EXECUTED 1ea24: e1500007 cmp r0, r7 <== NOT EXECUTED 1ea28: 1a000002 bne 1ea38 <== NOT EXECUTED *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 1ea2c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 1ea30: e28dd014 add sp, sp, #20 ; 0x14 <== NOT EXECUTED 1ea34: 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) 1ea38: e1a00004 mov r0, r4 <== NOT EXECUTED 1ea3c: e2881004 add r1, r8, #4 ; 0x4 <== NOT EXECUTED 1ea40: e1a02005 mov r2, r5 <== NOT EXECUTED 1ea44: e1a03006 mov r3, r6 <== NOT EXECUTED 1ea48: e58d7000 str r7, [sp] <== NOT EXECUTED 1ea4c: ebffffad bl 1e908 <== NOT EXECUTED 1ea50: e1500007 cmp r0, r7 <== NOT EXECUTED 1ea54: 0afffff4 beq 1ea2c <== NOT EXECUTED 1ea58: e1a00004 mov r0, r4 <== NOT EXECUTED 1ea5c: e28d1010 add r1, sp, #16 ; 0x10 <== NOT EXECUTED 1ea60: ebffff66 bl 1e800 <== NOT EXECUTED 1ea64: e1500007 cmp r0, r7 <== NOT EXECUTED 1ea68: 0affffef beq 1ea2c <== NOT EXECUTED 1ea6c: e1a00004 mov r0, r4 <== NOT EXECUTED 1ea70: e1a02005 mov r2, r5 <== NOT EXECUTED 1ea74: e1a03006 mov r3, r6 <== NOT EXECUTED 1ea78: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 1ea7c: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 1ea80: e58d4000 str r4, [sp] <== NOT EXECUTED 1ea84: ebffff9f bl 1e908 <== NOT EXECUTED 1ea88: e1500007 cmp r0, r7 <== NOT EXECUTED 1ea8c: 0affffe6 beq 1ea2c <== 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; 1ea90: e1dd31b0 ldrh r3, [sp, #16] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1ea94: 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; 1ea98: e1c830b8 strh r3, [r8, #8] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1ea9c: e5d02000 ldrb r2, [r0] <== NOT EXECUTED 1eaa0: e1520007 cmp r2, r7 <== NOT EXECUTED 1eaa4: 03a02017 moveq r2, #23 ; 0x17 <== NOT EXECUTED 1eaa8: 0a000008 beq 1ead0 <== NOT EXECUTED 1eaac: e1a03004 mov r3, r4 <== NOT EXECUTED 1eab0: e1a01000 mov r1, r0 <== NOT EXECUTED if(*cp == ',') 1eab4: e352002c cmp r2, #44 ; 0x2c <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1eab8: e5f12001 ldrb r2, [r1, #1]! <== NOT EXECUTED if(*cp == ',') memcount++; 1eabc: 02833001 addeq r3, r3, #1 ; 0x1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1eac0: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1eac4: 1afffffa bne 1eab4 <== NOT EXECUTED 1eac8: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 1eacc: 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)) 1ead0: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 1ead4: e1530002 cmp r3, r2 <== NOT EXECUTED 1ead8: 3affffd3 bcc 1ea2c <== NOT EXECUTED return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 1eadc: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1eae0: e283300f add r3, r3, #15 ; 0xf <== NOT EXECUTED 1eae4: e3c3300f bic r3, r3, #15 ; 0xf <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 1eae8: e5830000 str r0, [r3] <== NOT EXECUTED /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 1eaec: e588300c str r3, [r8, #12] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1eaf0: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 1eaf4: e5d23000 ldrb r3, [r2] <== NOT EXECUTED 1eaf8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1eafc: 03a01004 moveq r1, #4 ; 0x4 <== NOT EXECUTED 1eb00: 0a00000b beq 1eb34 <== NOT EXECUTED 1eb04: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED 1eb08: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; 1eb0c: 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 == ',') { 1eb10: e353002c cmp r3, #44 ; 0x2c <== NOT EXECUTED *cp = '\0'; 1eb14: 05420001 strbeq r0, [r2, #-1] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 1eb18: 0598300c ldreq r3, [r8, #12] <== NOT EXECUTED 1eb1c: 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++) { 1eb20: e4d23001 ldrb r3, [r2], #1 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 1eb24: 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++) { 1eb28: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1eb2c: 1afffff7 bne 1eb10 <== NOT EXECUTED 1eb30: e1a01101 lsl r1, r1, #2 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 1eb34: e598200c ldr r2, [r8, #12] <== NOT EXECUTED 1eb38: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1eb3c: e7823001 str r3, [r2, r1] <== NOT EXECUTED 1eb40: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 1eb44: eaffffb9 b 1ea30 <== NOT EXECUTED 0001eb8c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 1eb8c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 1eb90: e24dd014 sub sp, sp, #20 ; 0x14 <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1eb94: e28d7008 add r7, sp, #8 ; 0x8 <== NOT EXECUTED 1eb98: e28d8004 add r8, sp, #4 ; 0x4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 1eb9c: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 1eba0: e58d3004 str r3, [sp, #4] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1eba4: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 1eba8: e1a02007 mov r2, r7 <== NOT EXECUTED 1ebac: e1a03008 mov r3, r8 <== NOT EXECUTED 1ebb0: e58d6000 str r6, [sp] <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 1ebb4: e1a04000 mov r4, r0 <== NOT EXECUTED 1ebb8: e1a05001 mov r5, r1 <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1ebbc: ebffff51 bl 1e908 <== NOT EXECUTED 1ebc0: e1500006 cmp r0, r6 <== NOT EXECUTED 1ebc4: 1a000002 bne 1ebd4 <== 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; 1ebc8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 1ebcc: e28dd014 add sp, sp, #20 ; 0x14 <== NOT EXECUTED 1ebd0: 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) 1ebd4: e1a00004 mov r0, r4 <== NOT EXECUTED 1ebd8: e2851004 add r1, r5, #4 ; 0x4 <== NOT EXECUTED 1ebdc: e1a02007 mov r2, r7 <== NOT EXECUTED 1ebe0: e1a03008 mov r3, r8 <== NOT EXECUTED 1ebe4: e58d6000 str r6, [sp] <== NOT EXECUTED 1ebe8: ebffff46 bl 1e908 <== NOT EXECUTED 1ebec: e1500006 cmp r0, r6 <== NOT EXECUTED 1ebf0: 0afffff4 beq 1ebc8 <== NOT EXECUTED 1ebf4: e1a00004 mov r0, r4 <== NOT EXECUTED 1ebf8: e28d1010 add r1, sp, #16 ; 0x10 <== NOT EXECUTED 1ebfc: ebfffeff bl 1e800 <== NOT EXECUTED 1ec00: e1500006 cmp r0, r6 <== NOT EXECUTED 1ec04: 0affffef beq 1ebc8 <== NOT EXECUTED 1ec08: e1a00004 mov r0, r4 <== NOT EXECUTED 1ec0c: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 1ec10: ebfffefa bl 1e800 <== NOT EXECUTED 1ec14: e1500006 cmp r0, r6 <== NOT EXECUTED 1ec18: 0affffea beq 1ebc8 <== NOT EXECUTED 1ec1c: e1a00004 mov r0, r4 <== NOT EXECUTED 1ec20: e285100c add r1, r5, #12 ; 0xc <== NOT EXECUTED 1ec24: e1a02007 mov r2, r7 <== NOT EXECUTED 1ec28: e1a03008 mov r3, r8 <== NOT EXECUTED 1ec2c: e58d6000 str r6, [sp] <== NOT EXECUTED 1ec30: ebffff34 bl 1e908 <== NOT EXECUTED 1ec34: e1500006 cmp r0, r6 <== NOT EXECUTED 1ec38: 0affffe2 beq 1ebc8 <== NOT EXECUTED 1ec3c: e1a00004 mov r0, r4 <== NOT EXECUTED 1ec40: e2851010 add r1, r5, #16 ; 0x10 <== NOT EXECUTED 1ec44: e1a02007 mov r2, r7 <== NOT EXECUTED 1ec48: e1a03008 mov r3, r8 <== NOT EXECUTED 1ec4c: e58d6000 str r6, [sp] <== NOT EXECUTED 1ec50: ebffff2c bl 1e908 <== NOT EXECUTED 1ec54: e1500006 cmp r0, r6 <== NOT EXECUTED 1ec58: 0affffda beq 1ebc8 <== NOT EXECUTED 1ec5c: e1a00004 mov r0, r4 <== NOT EXECUTED 1ec60: e2851014 add r1, r5, #20 ; 0x14 <== NOT EXECUTED 1ec64: e1a02007 mov r2, r7 <== NOT EXECUTED 1ec68: e1a03008 mov r3, r8 <== NOT EXECUTED 1ec6c: e58d6000 str r6, [sp] <== NOT EXECUTED 1ec70: ebffff24 bl 1e908 <== NOT EXECUTED 1ec74: e1500006 cmp r0, r6 <== NOT EXECUTED 1ec78: 0affffd2 beq 1ebc8 <== NOT EXECUTED 1ec7c: e1a00004 mov r0, r4 <== NOT EXECUTED 1ec80: e1a02007 mov r2, r7 <== NOT EXECUTED 1ec84: e1a03008 mov r3, r8 <== NOT EXECUTED 1ec88: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 1ec8c: e2851018 add r1, r5, #24 ; 0x18 <== NOT EXECUTED 1ec90: e58d4000 str r4, [sp] <== NOT EXECUTED 1ec94: ebffff1b bl 1e908 <== NOT EXECUTED 1ec98: e1500006 cmp r0, r6 <== NOT EXECUTED 1ec9c: 0affffc9 beq 1ebc8 <== 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; 1eca0: e1dd30bc ldrh r3, [sp, #12] <== NOT EXECUTED 1eca4: 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; 1eca8: e1dd31b0 ldrh r3, [sp, #16] <== NOT EXECUTED pwd->pw_gid = pwgid; 1ecac: e1a00004 mov r0, r4 <== 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; 1ecb0: e1c530b8 strh r3, [r5, #8] <== NOT EXECUTED 1ecb4: eaffffc4 b 1ebcc <== NOT EXECUTED 00006ddc : */ int sem_destroy( sem_t *sem ) { 6ddc: e92d4010 push {r4, lr} 6de0: e24dd004 sub sp, sp, #4 ; 0x4 6de4: e5901000 ldr r1, [r0] 6de8: e1a0200d mov r2, sp 6dec: e59f0058 ldr r0, [pc, #88] ; 6e4c 6df0: eb0008c6 bl 9110 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 6df4: e59d3000 ldr r3, [sp] 6df8: e3530000 cmp r3, #0 ; 0x0 6dfc: 0a000005 beq 6e18 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 6e00: eb002286 bl f820 <__errno> 6e04: e3a03016 mov r3, #22 ; 0x16 6e08: e5803000 str r3, [r0] 6e0c: e3e00000 mvn r0, #0 ; 0x0 } 6e10: e28dd004 add sp, sp, #4 ; 0x4 6e14: e8bd8010 pop {r4, pc} case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 6e18: e5d04014 ldrb r4, [r0, #20] 6e1c: e3540000 cmp r4, #0 ; 0x0 6e20: 1a000003 bne 6e34 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 6e24: eb0019fa bl d614 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 6e28: eb000ad9 bl 9994 <_Thread_Enable_dispatch> 6e2c: e1a00004 mov r0, r4 6e30: eafffff6 b 6e10 /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); 6e34: eb000ad6 bl 9994 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 6e38: eb002278 bl f820 <__errno> <== NOT EXECUTED 6e3c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 6e40: e5803000 str r3, [r0] <== NOT EXECUTED 6e44: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 6e48: eafffff0 b 6e10 <== NOT EXECUTED 6e4c: 0001d620 .word 0x0001d620 00006eac : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 6eac: e92d4010 push {r4, lr} int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 6eb0: e2504000 subs r4, r0, #0 ; 0x0 int sem_init( sem_t *sem, int pshared, unsigned int value ) { 6eb4: e24dd004 sub sp, sp, #4 ; 0x4 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 6eb8: 0a000008 beq 6ee0 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 6ebc: e1a0300d mov r3, sp 6ec0: e3a00000 mov r0, #0 ; 0x0 6ec4: eb001990 bl d50c <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 6ec8: e3700001 cmn r0, #1 ; 0x1 *sem = the_semaphore->Object.id; 6ecc: 159d3000 ldrne r3, [sp] 6ed0: 15932008 ldrne r2, [r3, #8] 6ed4: 15842000 strne r2, [r4] return status; } 6ed8: e28dd004 add sp, sp, #4 ; 0x4 6edc: e8bd8010 pop {r4, pc} { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 6ee0: eb00224e bl f820 <__errno> <== NOT EXECUTED 6ee4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 6ee8: e5803000 str r3, [r0] <== NOT EXECUTED 6eec: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 6ef0: eafffff8 b 6ed8 <== NOT EXECUTED 00007050 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 7050: e92d4010 push {r4, lr} 7054: e24dd004 sub sp, sp, #4 ; 0x4 7058: 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 ); 705c: e1a00001 mov r0, r1 7060: e1a0100d mov r1, sp 7064: eb0016c4 bl cb7c <_POSIX_Absolute_timeout_to_ticks> switch ( status ) { 7068: e3500002 cmp r0, #2 ; 0x2 706c: 9a000005 bls 7088 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 7070: e1a00004 mov r0, r4 7074: e3a01001 mov r1, #1 ; 0x1 7078: e59d2000 ldr r2, [sp] 707c: eb001999 bl d6e8 <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 7080: e28dd004 add sp, sp, #4 ; 0x4 7084: 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 ); 7088: e1a00004 mov r0, r4 <== NOT EXECUTED 708c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 7090: e59d2000 ldr r2, [sp] <== NOT EXECUTED 7094: eb001993 bl d6e8 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 7098: eafffff8 b 7080 <== NOT EXECUTED 0001e7b8 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 1e7b8: e59f300c ldr r3, [pc, #12] ; 1e7cc <== NOT EXECUTED 1e7bc: e5932000 ldr r2, [r3] <== NOT EXECUTED 1e7c0: e1c202bc strh r0, [r2, #44] <== NOT EXECUTED return 0; } 1e7c4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1e7c8: e12fff1e bx lr <== NOT EXECUTED 1e7cc: 000402b8 .word 0x000402b8 0001eddc : return NULL; return &grent; } void setgrent(void) { 1eddc: e92d4010 push {r4, lr} <== NOT EXECUTED init_etc_passwd_group(); if (group_fp != NULL) 1ede0: e59f4020 ldr r4, [pc, #32] ; 1ee08 <== NOT EXECUTED return &grent; } void setgrent(void) { init_etc_passwd_group(); 1ede4: ebffffc4 bl 1ecfc <== NOT EXECUTED if (group_fp != NULL) 1ede8: e5940000 ldr r0, [r4] <== NOT EXECUTED 1edec: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED fclose(group_fp); 1edf0: 1b003b9f blne 2dc74 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 1edf4: e59f0010 ldr r0, [pc, #16] ; 1ee0c <== NOT EXECUTED 1edf8: e59f1010 ldr r1, [pc, #16] ; 1ee10 <== NOT EXECUTED 1edfc: eb003d8f bl 2e440 <== NOT EXECUTED 1ee00: e5840000 str r0, [r4] <== NOT EXECUTED } 1ee04: e8bd8010 pop {r4, pc} <== NOT EXECUTED 1ee08: 00059d84 .word 0x00059d84 1ee0c: 00045354 .word 0x00045354 1ee10: 000462f8 .word 0x000462f8 0001efdc : return NULL; return &pwent; } void setpwent(void) { 1efdc: e92d4010 push {r4, lr} <== NOT EXECUTED init_etc_passwd_group(); if (passwd_fp != NULL) 1efe0: e59f4020 ldr r4, [pc, #32] ; 1f008 <== NOT EXECUTED return &pwent; } void setpwent(void) { init_etc_passwd_group(); 1efe4: ebffff44 bl 1ecfc <== NOT EXECUTED if (passwd_fp != NULL) 1efe8: e5940000 ldr r0, [r4] <== NOT EXECUTED 1efec: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED fclose(passwd_fp); 1eff0: 1b003b1f blne 2dc74 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 1eff4: e59f0010 ldr r0, [pc, #16] ; 1f00c <== NOT EXECUTED 1eff8: e59f1010 ldr r1, [pc, #16] ; 1f010 <== NOT EXECUTED 1effc: eb003d0f bl 2e440 <== NOT EXECUTED 1f000: e5840000 str r0, [r4] <== NOT EXECUTED } 1f004: e8bd8010 pop {r4, pc} <== NOT EXECUTED 1f008: 00059c9c .word 0x00059c9c 1f00c: 000452e0 .word 0x000452e0 1f010: 000462f8 .word 0x000462f8 00004084 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 4084: e59f300c ldr r3, [pc, #12] ; 4098 <== NOT EXECUTED 4088: e5932000 ldr r2, [r3] <== NOT EXECUTED 408c: e1c202ba strh r0, [r2, #42] <== NOT EXECUTED return 0; } 4090: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 4094: e12fff1e bx lr <== NOT EXECUTED 4098: 000402b8 .word 0x000402b8 00006d5c : int sigwait( const sigset_t *set, int *sig ) { 6d5c: e92d4010 push {r4, lr} 6d60: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 6d64: e3a01000 mov r1, #0 ; 0x0 6d68: e1a02001 mov r2, r1 6d6c: ebffff8c bl 6ba4 if ( status != -1 ) { 6d70: e3700001 cmn r0, #1 ; 0x1 6d74: 0a000004 beq 6d8c if ( sig ) 6d78: e3540000 cmp r4, #0 ; 0x0 *sig = status; 6d7c: 15840000 strne r0, [r4] int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 6d80: 01a00004 moveq r0, r4 *sig = status; 6d84: 13a00000 movne r0, #0 ; 0x0 6d88: e8bd8010 pop {r4, pc} return 0; } return errno; 6d8c: eb0020ee bl f14c <__errno> <== NOT EXECUTED 6d90: e5900000 ldr r0, [r0] <== NOT EXECUTED } 6d94: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00002e1c : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2e1c: e591303c ldr r3, [r1, #60] <== NOT EXECUTED 2e20: e3c33f61 bic r3, r3, #388 ; 0x184 <== NOT EXECUTED 2e24: e3c33003 bic r3, r3, #3 ; 0x3 <== NOT EXECUTED 2e28: e1a03a03 lsl r3, r3, #20 <== NOT EXECUTED 2e2c: e1a03a23 lsr r3, r3, #20 <== NOT EXECUTED 2e30: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2e34: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2e38: e1a05001 mov r5, r1 <== NOT EXECUTED 2e3c: 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)) { 2e40: 1a000002 bne 2e50 <== 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); 2e44: e1a00004 mov r0, r4 <== NOT EXECUTED } return i; } 2e48: 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); 2e4c: eaffff82 b 2c5c <== 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); 2e50: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2e54: e1a02001 mov r2, r1 <== NOT EXECUTED 2e58: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 2e5c: eb00065c bl 47d4 <== NOT EXECUTED i = iproc (c, tty); 2e60: e1a01005 mov r1, r5 <== NOT EXECUTED 2e64: e1a00004 mov r0, r4 <== NOT EXECUTED 2e68: ebffff7b bl 2c5c <== NOT EXECUTED 2e6c: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2e70: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 2e74: eb00069d bl 48f0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2e78: e1a00004 mov r0, r4 <== NOT EXECUTED 2e7c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00005698 : int _STAT_NAME( const char *path, struct stat *buf ) { 5698: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 569c: e2514000 subs r4, r1, #0 ; 0x0 int _STAT_NAME( const char *path, struct stat *buf ) { 56a0: e24dd010 sub sp, sp, #16 ; 0x10 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 56a4: 0a00002c beq 575c rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 56a8: e3a01000 mov r1, #0 ; 0x0 56ac: e1a0200d mov r2, sp 56b0: e3a03001 mov r3, #1 ; 0x1 56b4: ebfff9d2 bl 3e04 if ( status != 0 ) 56b8: 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 ); 56bc: e1a0500d mov r5, sp if ( status != 0 ) 56c0: 1a000023 bne 5754 return -1; if ( !loc.handlers->fstat_h ){ 56c4: e59d3004 ldr r3, [sp, #4] 56c8: e5932018 ldr r2, [r3, #24] 56cc: e3520000 cmp r2, #0 ; 0x0 56d0: 0a000014 beq 5728 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 56d4: e1a01000 mov r1, r0 56d8: e3a0204c mov r2, #76 ; 0x4c 56dc: e1a00004 mov r0, r4 56e0: eb00ab1a bl 30350 status = (*loc.handlers->fstat_h)( &loc, buf ); 56e4: e1a01004 mov r1, r4 56e8: e59d3004 ldr r3, [sp, #4] 56ec: e1a0000d mov r0, sp 56f0: e1a0e00f mov lr, pc 56f4: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 56f8: e59d3008 ldr r3, [sp, #8] 56fc: e3530000 cmp r3, #0 ; 0x0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 5700: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 5704: 0a000004 beq 571c 5708: e593301c ldr r3, [r3, #28] 570c: e3530000 cmp r3, #0 ; 0x0 5710: 11a0000d movne r0, sp 5714: 11a0e00f movne lr, pc 5718: 112fff13 bxne r3 return status; } 571c: e1a00004 mov r0, r4 5720: e28dd010 add sp, sp, #16 ; 0x10 5724: 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 ); 5728: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 572c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 5730: 0a000004 beq 5748 <== NOT EXECUTED 5734: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5738: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 573c: 11a0000d movne r0, sp <== NOT EXECUTED 5740: 11a0e00f movne lr, pc <== NOT EXECUTED 5744: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 5748: eb00a0f8 bl 2db30 <__errno> <== NOT EXECUTED 574c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5750: e5803000 str r3, [r0] <== NOT EXECUTED 5754: e3e04000 mvn r4, #0 ; 0x0 5758: eaffffef b 571c /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 575c: eb00a0f3 bl 2db30 <__errno> 5760: e3a0300e mov r3, #14 ; 0xe 5764: e5803000 str r3, [r0] 5768: e3e04000 mvn r4, #0 ; 0x0 576c: eaffffea b 571c 0001ffd0 : int symlink( const char *actualpath, const char *sympath ) { 1ffd0: 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 ); 1ffd4: e5d13000 ldrb r3, [r1] 1ffd8: e353005c cmp r3, #92 ; 0x5c 1ffdc: 1353002f cmpne r3, #47 ; 0x2f int symlink( const char *actualpath, const char *sympath ) { 1ffe0: e24dd014 sub sp, sp, #20 ; 0x14 1ffe4: e1a0e001 mov lr, r1 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 1ffe8: 13a05000 movne r5, #0 ; 0x0 1ffec: 03a05001 moveq r5, #1 ; 0x1 int symlink( const char *actualpath, const char *sympath ) { 1fff0: 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 ); 1fff4: 0a000001 beq 20000 1fff8: e3530000 cmp r3, #0 ; 0x0 1fffc: 1a000023 bne 20090 20000: e59f30d0 ldr r3, [pc, #208] ; 200d8 20004: e593c000 ldr ip, [r3] 20008: e28cc014 add ip, ip, #20 ; 0x14 2000c: e89c000f ldm ip, {r0, r1, r2, r3} 20010: e1a0400d mov r4, sp 20014: e88d000f stm sp, {r0, r1, r2, r3} 20018: e3a03001 mov r3, #1 ; 0x1 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 2001c: e08e0003 add r0, lr, r3 20020: e1a0100d mov r1, sp 20024: e28d2010 add r2, sp, #16 ; 0x10 20028: e59d3008 ldr r3, [sp, #8] 2002c: e1a0e00f mov lr, pc 20030: e593f004 ldr pc, [r3, #4] if ( result != 0 ) 20034: e3500000 cmp r0, #0 ; 0x0 20038: 1a000024 bne 200d0 return -1; if ( !loc.ops->symlink_h ) { 2003c: e59d2008 ldr r2, [sp, #8] 20040: e5923038 ldr r3, [r2, #56] 20044: e3530000 cmp r3, #0 ; 0x0 20048: 0a000018 beq 200b0 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 2004c: e1a01006 mov r1, r6 20050: e1a0000d mov r0, sp 20054: e59d2010 ldr r2, [sp, #16] 20058: e1a0e00f mov lr, pc 2005c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 20060: e59d3008 ldr r3, [sp, #8] 20064: e3530000 cmp r3, #0 ; 0x0 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); 20068: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 2006c: 0a000004 beq 20084 20070: e593301c ldr r3, [r3, #28] 20074: e3530000 cmp r3, #0 ; 0x0 20078: 11a0000d movne r0, sp 2007c: 11a0e00f movne lr, pc 20080: 112fff13 bxne r3 return result; } 20084: e1a00005 mov r0, r5 20088: e28dd014 add sp, sp, #20 ; 0x14 2008c: 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 ); 20090: e59f3040 ldr r3, [pc, #64] ; 200d8 20094: e593c000 ldr ip, [r3] 20098: e28cc004 add ip, ip, #4 ; 0x4 2009c: e89c000f ldm ip, {r0, r1, r2, r3} 200a0: e1a0400d mov r4, sp 200a4: e88d000f stm sp, {r0, r1, r2, r3} 200a8: e1a03005 mov r3, r5 200ac: eaffffda b 2001c result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 200b0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 200b4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 200b8: 11a0000d movne r0, sp <== NOT EXECUTED 200bc: 11a0e00f movne lr, pc <== NOT EXECUTED 200c0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 200c4: eb003699 bl 2db30 <__errno> <== NOT EXECUTED 200c8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 200cc: e5803000 str r3, [r0] <== NOT EXECUTED 200d0: e3e05000 mvn r5, #0 ; 0x0 200d4: eaffffea b 20084 200d8: 000402b8 .word 0x000402b8 00011520 : int tcgetattr( int fd, struct termios *tp ) { 11520: e1a02001 mov r2, r1 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 11524: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 11528: ea000f8c b 15360 <== NOT EXECUTED 0001152c : int fd, int opt, struct termios *tp ) { switch (opt) { 1152c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED int tcsetattr( int fd, int opt, struct termios *tp ) { 11530: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 11534: e1a05002 mov r5, r2 <== NOT EXECUTED 11538: e1a04000 mov r4, r0 <== NOT EXECUTED switch (opt) { 1153c: 0a00000b beq 11570 <== NOT EXECUTED 11540: e3510001 cmp r1, #1 ; 0x1 <== NOT EXECUTED 11544: 0a000004 beq 1155c <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 11548: eb0012b3 bl 1601c <__errno> <== NOT EXECUTED 1154c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 11550: e5803000 str r3, [r0] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 11554: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 11558: 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) 1155c: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 11560: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 11564: eb000f7d bl 15360 <== NOT EXECUTED 11568: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1156c: bafffff8 blt 11554 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 11570: e1a00004 mov r0, r4 <== NOT EXECUTED 11574: e1a02005 mov r2, r5 <== NOT EXECUTED 11578: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED } } 1157c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 11580: ea000f76 b 15360 <== NOT EXECUTED 000046f0 : DIR *dirp ) { rtems_libio_t *iop; if ( !dirp ) 46f0: e3500000 cmp r0, #0 ; 0x0 #include long telldir( DIR *dirp ) { 46f4: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; if ( !dirp ) 46f8: 0a000013 beq 474c /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 46fc: e59f305c ldr r3, [pc, #92] ; 4760 4700: e5900000 ldr r0, [r0] 4704: e5932000 ldr r2, [r3] 4708: e1500002 cmp r0, r2 470c: 2a000009 bcs 4738 4710: e1a03200 lsl r3, r0, #4 4714: e59f2048 ldr r2, [pc, #72] ; 4764 4718: e0433100 sub r3, r3, r0, lsl #2 471c: e0833000 add r3, r3, r0 4720: e5921000 ldr r1, [r2] 4724: e1a03103 lsl r3, r3, #2 if (iop == NULL) 4728: e0910003 adds r0, r1, r3 472c: 0a000001 beq 4738 assert(0); return (long)( iop->offset ); 4730: e5900008 ldr r0, [r0, #8] } 4734: e49df004 pop {pc} ; (ldr pc, [sp], #4) */ iop = rtems_libio_iop( dirp->dd_fd ); if (iop == NULL) assert(0); 4738: e59f0028 ldr r0, [pc, #40] ; 4768 <== NOT EXECUTED 473c: e3a0102c mov r1, #44 ; 0x2c <== NOT EXECUTED 4740: e59f2024 ldr r2, [pc, #36] ; 476c <== NOT EXECUTED 4744: e59f3024 ldr r3, [pc, #36] ; 4770 <== NOT EXECUTED 4748: ebfff75b bl 24bc <__assert_func> <== NOT EXECUTED ) { rtems_libio_t *iop; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 474c: eb0029e7 bl eef0 <__errno> <== NOT EXECUTED 4750: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 4754: e5803000 str r3, [r0] <== NOT EXECUTED 4758: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 475c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 4760: 000141f4 .word 0x000141f4 4764: 00016af4 .word 0x00016af4 4768: 000163f0 .word 0x000163f0 476c: 00014ecc .word 0x00014ecc 4770: 00016320 .word 0x00016320 00005afc : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 5afc: e92d41f0 push {r4, r5, r6, r7, r8, lr} Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 5b00: e2524000 subs r4, r2, #0 ; 0x0 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 5b04: e24dd018 sub sp, sp, #24 ; 0x18 5b08: e1a05000 mov r5, r0 5b0c: e1a0c001 mov ip, r1 5b10: e1a06003 mov r6, r3 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 5b14: 0a00003b beq 5c08 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 ) || 5b18: e3e02331 mvn r2, #-1006632960 ; 0xc4000000 5b1c: e2422865 sub r2, r2, #6619136 ; 0x650000 5b20: e594300c ldr r3, [r4, #12] 5b24: e2422c36 sub r2, r2, #13824 ; 0x3600 5b28: e1530002 cmp r3, r2 5b2c: 8a000035 bhi 5c08 5b30: e5943004 ldr r3, [r4, #4] 5b34: e1530002 cmp r3, r2 5b38: 8a000032 bhi 5c08 5b3c: e3530000 cmp r3, #0 ; 0x0 5b40: ba000030 blt 5c08 ( 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 ) { 5b44: e3510004 cmp r1, #4 ; 0x4 5b48: 13510000 cmpne r1, #0 ; 0x0 5b4c: 1a00002d bne 5c08 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 5b50: e894000f ldm r4, {r0, r1, r2, r3} 5b54: e28d7004 add r7, sp, #4 ; 0x4 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 5b58: e35c0004 cmp ip, #4 ; 0x4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 5b5c: e887000f stm r7, {r0, r1, r2, r3} /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 5b60: 0a00003c beq 5c58 5b64: e1a01005 mov r1, r5 5b68: e59f0120 ldr r0, [pc, #288] ; 5c90 5b6c: e28d2014 add r2, sp, #20 ; 0x14 5b70: eb000860 bl 7cf8 <_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 ) { 5b74: e59d3014 ldr r3, [sp, #20] 5b78: e3530000 cmp r3, #0 ; 0x0 5b7c: e1a05000 mov r5, r0 5b80: 1a000020 bne 5c08 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 ) { 5b84: e59d300c ldr r3, [sp, #12] 5b88: e3530000 cmp r3, #0 ; 0x0 5b8c: 1a000002 bne 5b9c 5b90: e59d3010 ldr r3, [sp, #16] 5b94: e3530000 cmp r3, #0 ; 0x0 5b98: 0a000020 beq 5c20 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 5b9c: e1a00004 mov r0, r4 5ba0: eb000e71 bl 956c <_Timespec_To_ticks> 5ba4: e5850064 str r0, [r5, #100] initial_period = _Timespec_To_ticks( &normalize.it_value ); 5ba8: e28d000c add r0, sp, #12 ; 0xc 5bac: eb000e6e bl 956c <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 5bb0: 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 ); 5bb4: e1a01000 mov r1, r0 activated = _POSIX_Timer_Insert_helper( 5bb8: e59f30d4 ldr r3, [pc, #212] ; 5c94 5bbc: e2850010 add r0, r5, #16 ; 0x10 5bc0: e58d5000 str r5, [sp] 5bc4: eb001961 bl c150 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 5bc8: e2504000 subs r4, r0, #0 ; 0x0 5bcc: 0a00002c beq 5c84 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 5bd0: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 5bd4: 1285c054 addne ip, r5, #84 ; 0x54 5bd8: 189c000f ldmne ip, {r0, r1, r2, r3} 5bdc: 1886000f stmne r6, {r0, r1, r2, r3} ptimer->timer_data = normalize; 5be0: e897000f ldm r7, {r0, r1, r2, r3} 5be4: 0285c054 addeq ip, r5, #84 ; 0x54 5be8: e88c000f stm ip, {r0, r1, r2, r3} /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 5bec: e3a03003 mov r3, #3 ; 0x3 _TOD_Get( &ptimer->time ); 5bf0: 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; 5bf4: e5c5303c strb r3, [r5, #60] _TOD_Get( &ptimer->time ); 5bf8: eb0005ff bl 73fc <_TOD_Get> _Thread_Enable_dispatch(); 5bfc: eb000a5e bl 857c <_Thread_Enable_dispatch> 5c00: e3a00000 mov r0, #0 ; 0x0 5c04: ea000003 b 5c18 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 5c08: eb0020f4 bl dfe0 <__errno> 5c0c: e3a03016 mov r3, #22 ; 0x16 5c10: e5803000 str r3, [r0] 5c14: e3e00000 mvn r0, #0 ; 0x0 } 5c18: e28dd018 add sp, sp, #24 ; 0x18 5c1c: 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 ); 5c20: e2800010 add r0, r0, #16 ; 0x10 5c24: eb000f93 bl 9a78 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 5c28: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 5c2c: 1285c054 addne ip, r5, #84 ; 0x54 5c30: 189c000f ldmne ip, {r0, r1, r2, r3} 5c34: 1886000f stmne r6, {r0, r1, r2, r3} /* The new data are set */ ptimer->timer_data = normalize; 5c38: e897000f ldm r7, {r0, r1, r2, r3} 5c3c: 0285c054 addeq ip, r5, #84 ; 0x54 5c40: e88c000f stm ip, {r0, r1, r2, r3} /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 5c44: e3a03004 mov r3, #4 ; 0x4 5c48: e5c5303c strb r3, [r5, #60] /* Returns with success */ _Thread_Enable_dispatch(); 5c4c: eb000a4a bl 857c <_Thread_Enable_dispatch> 5c50: e3a00000 mov r0, #0 ; 0x0 5c54: eaffffef b 5c18 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 ) ) 5c58: e28d800c add r8, sp, #12 ; 0xc 5c5c: e59f0034 ldr r0, [pc, #52] ; 5c98 5c60: e1a01008 mov r1, r8 5c64: eb000e1a bl 94d4 <_Timespec_Greater_than> 5c68: e3500000 cmp r0, #0 ; 0x0 5c6c: 1affffe5 bne 5c08 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 5c70: e1a01008 mov r1, r8 5c74: e59f001c ldr r0, [pc, #28] ; 5c98 5c78: e1a02008 mov r2, r8 5c7c: eb000e21 bl 9508 <_Timespec_Subtract> 5c80: eaffffb7 b 5b64 ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 5c84: eb000a3c bl 857c <_Thread_Enable_dispatch> <== NOT EXECUTED 5c88: e1a00004 mov r0, r4 <== NOT EXECUTED 5c8c: eaffffe1 b 5c18 <== NOT EXECUTED 5c90: 0001bc20 .word 0x0001bc20 5c94: 00005c9c .word 0x00005c9c 5c98: 0001b9d4 .word 0x0001b9d4 00020244 : char *ttyname( int fd ) { if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 20244: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED */ char *ttyname( int fd ) { 20248: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 2024c: e2822006 add r2, r2, #6 ; 0x6 <== NOT EXECUTED 20250: e59f1014 ldr r1, [pc, #20] ; 2026c <== NOT EXECUTED 20254: ebffffbc bl 2014c <== NOT EXECUTED 20258: e59f300c ldr r3, [pc, #12] ; 2026c <== NOT EXECUTED return ttyname_buf; return NULL; } 2025c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 20260: 01a00003 moveq r0, r3 <== NOT EXECUTED 20264: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 20268: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 2026c: 000402bc .word 0x000402bc 0002014c : int ttyname_r( int fd, char *name, size_t namesize ) { 2014c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 20150: e24dd0bc sub sp, sp, #188 ; 0xbc <== NOT EXECUTED 20154: e1a05001 mov r5, r1 <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 20158: e28d1098 add r1, sp, #152 ; 0x98 <== NOT EXECUTED int ttyname_r( int fd, char *name, size_t namesize ) { 2015c: e1a04000 mov r4, r0 <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 20160: ebffffe0 bl 200e8 <== NOT EXECUTED 20164: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 20168: ba000008 blt 20190 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 2016c: e1a00004 mov r0, r4 <== NOT EXECUTED 20170: e28d104c add r1, sp, #76 ; 0x4c <== NOT EXECUTED 20174: ebfff7ca bl 1e0a4 <== NOT EXECUTED 20178: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 2017c: 1a000003 bne 20190 <== NOT EXECUTED 20180: e59d3058 ldr r3, [sp, #88] <== NOT EXECUTED 20184: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 20188: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED 2018c: 0a000005 beq 201a8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) rtems_set_errno_and_return_minus_one(EBADF); 20190: eb003666 bl 2db30 <__errno> <== NOT EXECUTED 20194: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 20198: e5803000 str r3, [r0] <== NOT EXECUTED 2019c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED rval = name; break; } (void) closedir (dp); return 0; } 201a0: e28dd0bc add sp, sp, #188 ; 0xbc <== NOT EXECUTED 201a4: 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) 201a8: e59f0090 ldr r0, [pc, #144] ; 20240 <== NOT EXECUTED 201ac: ebfffdb8 bl 1f894 <== NOT EXECUTED 201b0: 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); 201b4: 12856005 addne r6, r5, #5 ; 0x5 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 201b8: 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) 201bc: 0afffff3 beq 20190 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 201c0: e1a00004 mov r0, r4 <== NOT EXECUTED 201c4: ebfffe65 bl 1fb60 <== NOT EXECUTED 201c8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 201cc: 0a000017 beq 20230 <== NOT EXECUTED { if (dirp->d_ino != sb.st_ino) 201d0: e5902000 ldr r2, [r0] <== NOT EXECUTED 201d4: e59d3054 ldr r3, [sp, #84] <== NOT EXECUTED 201d8: e1520003 cmp r2, r3 <== NOT EXECUTED 201dc: 1afffff7 bne 201c0 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 201e0: e280100c add r1, r0, #12 ; 0xc <== NOT EXECUTED 201e4: e1a00006 mov r0, r6 <== NOT EXECUTED 201e8: eb004af9 bl 32dd4 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 201ec: e1a00005 mov r0, r5 <== NOT EXECUTED 201f0: e1a0100d mov r1, sp <== NOT EXECUTED 201f4: ebff9527 bl 5698 <== NOT EXECUTED 201f8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 201fc: 1affffef bne 201c0 <== NOT EXECUTED 20200: e59d2000 ldr r2, [sp] <== NOT EXECUTED 20204: e59d304c ldr r3, [sp, #76] <== NOT EXECUTED 20208: e1530002 cmp r3, r2 <== NOT EXECUTED 2020c: 1affffeb bne 201c0 <== NOT EXECUTED 20210: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 20214: e59d3050 ldr r3, [sp, #80] <== NOT EXECUTED 20218: e1530002 cmp r3, r2 <== NOT EXECUTED 2021c: 1affffe7 bne 201c0 <== NOT EXECUTED 20220: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 20224: e59d3054 ldr r3, [sp, #84] <== NOT EXECUTED 20228: e1530002 cmp r3, r2 <== NOT EXECUTED 2022c: 1affffe3 bne 201c0 <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 20230: e1a00004 mov r0, r4 <== NOT EXECUTED 20234: eb002b56 bl 2af94 <== NOT EXECUTED 20238: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2023c: eaffffd7 b 201a0 <== NOT EXECUTED 20240: 00045434 .word 0x00045434 00004454 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 4454: e92d4070 push {r4, r5, r6, lr} /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 4458: e59f6108 ldr r6, [pc, #264] ; 4568 445c: e596201c ldr r2, [r6, #28] 4460: e3520000 cmp r2, #0 ; 0x0 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 4464: e24dd008 sub sp, sp, #8 ; 0x8 4468: e1a04000 mov r4, r0 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 446c: 0a000036 beq 454c _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 4470: e1a00006 mov r0, r6 <== NOT EXECUTED 4474: eb000fd5 bl 83d0 <_Watchdog_Remove> <== NOT EXECUTED 4478: e2400002 sub r0, r0, #2 ; 0x2 <== NOT EXECUTED 447c: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 4480: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED 4484: 9a00001b bls 44f8 <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 4488: e3540000 cmp r4, #0 ; 0x0 448c: 0a000016 beq 44ec Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4490: e59f30d4 ldr r3, [pc, #212] ; 456c 4494: e0812493 umull r2, r1, r3, r4 4498: e1a01921 lsr r1, r1, #18 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 449c: e1a02401 lsl r2, r1, #8 44a0: e0422181 sub r2, r2, r1, lsl #3 44a4: e1a03302 lsl r3, r2, #6 44a8: e0623003 rsb r3, r2, r3 44ac: e0833001 add r3, r3, r1 44b0: e0443303 sub r3, r4, r3, lsl #6 44b4: e1a02383 lsl r2, r3, #7 44b8: e0422103 sub r2, r2, r3, lsl #2 44bc: e0822003 add r2, r2, r3 44c0: e1a02182 lsl r2, r2, #3 ticks = _Timespec_To_ticks( &tp ); 44c4: e1a0000d mov r0, sp * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 44c8: e88d0006 stm sp, {r1, r2} tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44cc: eb000e5c bl 7e44 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 44d0: e1a0000d mov r0, sp 44d4: eb000e5a bl 7e44 <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44d8: e59f1088 ldr r1, [pc, #136] ; 4568 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 44dc: e586000c str r0, [r6, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44e0: e59f0088 ldr r0, [pc, #136] ; 4570 if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44e4: e1a0400d mov r4, sp 44e8: eb000f49 bl 8214 <_Watchdog_Insert> _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 44ec: e1a00005 mov r0, r5 44f0: e28dd008 add sp, sp, #8 ; 0x8 44f4: e8bd8070 pop {r4, r5, r6, pc} * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 44f8: e596300c ldr r3, [r6, #12] <== NOT EXECUTED 44fc: e2860014 add r0, r6, #20 ; 0x14 <== NOT EXECUTED 4500: e8900005 ldm r0, {r0, r2} <== NOT EXECUTED 4504: e0800003 add r0, r0, r3 <== NOT EXECUTED /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 4508: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 450c: e1a0100d mov r1, sp <== NOT EXECUTED 4510: eb000e1e bl 7d90 <_Timespec_From_ticks> <== NOT EXECUTED remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; remaining += tp.tv_nsec / 1000; 4514: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 4518: e59f3054 ldr r3, [pc, #84] ; 4574 <== NOT EXECUTED 451c: e0cc2093 smull r2, ip, r3, r0 <== NOT EXECUTED ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4520: e59d1000 ldr r1, [sp] <== NOT EXECUTED 4524: e1a02401 lsl r2, r1, #8 <== NOT EXECUTED 4528: e0422181 sub r2, r2, r1, lsl #3 <== NOT EXECUTED 452c: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED 4530: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 4534: e0833001 add r3, r3, r1 <== NOT EXECUTED remaining += tp.tv_nsec / 1000; 4538: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 453c: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4540: e1a03303 lsl r3, r3, #6 <== NOT EXECUTED remaining += tp.tv_nsec / 1000; 4544: e0805003 add r5, r0, r3 <== NOT EXECUTED 4548: eaffffce b 4488 <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 454c: e59f3024 ldr r3, [pc, #36] ; 4578 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4550: e5862008 str r2, [r6, #8] the_watchdog->routine = routine; 4554: e586301c str r3, [r6, #28] the_watchdog->id = id; 4558: e5862020 str r2, [r6, #32] the_watchdog->user_data = user_data; 455c: e5862024 str r2, [r6, #36] 4560: e1a05002 mov r5, r2 4564: eaffffc7 b 4488 4568: 0001472c .word 0x0001472c 456c: 431bde83 .word 0x431bde83 4570: 00014904 .word 0x00014904 4574: 10624dd3 .word 0x10624dd3 4578: 0000457c .word 0x0000457c 0002028c : #include int unlink( const char *path ) { 2028c: e92d4030 push {r4, r5, lr} /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 20290: e3a01000 mov r1, #0 ; 0x0 #include int unlink( const char *path ) { 20294: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 20298: e1a0200d mov r2, sp 2029c: e1a03001 mov r3, r1 202a0: ebff8ed7 bl 3e04 if ( result != 0 ) 202a4: e3500000 cmp r0, #0 ; 0x0 /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 202a8: e1a0500d mov r5, sp if ( result != 0 ) 202ac: 0a000003 beq 202c0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); rtems_filesystem_freenode( &loc ); 202b0: e3e04000 mvn r4, #0 ; 0x0 return result; } 202b4: e1a00004 mov r0, r4 202b8: e28dd010 add sp, sp, #16 ; 0x10 202bc: 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 ); 202c0: e2800002 add r0, r0, #2 ; 0x2 202c4: e1a0100d mov r1, sp 202c8: ebff8ea3 bl 3d5c if (result != 0 && errno != ENOTSUP) { 202cc: e3500000 cmp r0, #0 ; 0x0 202d0: 1a00001a bne 20340 rtems_filesystem_freenode( &loc ); return -1; } if ( !loc.ops->node_type_h ) { 202d4: e59d2008 ldr r2, [sp, #8] 202d8: e5923010 ldr r3, [r2, #16] 202dc: e3530000 cmp r3, #0 ; 0x0 202e0: 0a000025 beq 2037c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 202e4: e1a0000d mov r0, sp 202e8: e1a0e00f mov lr, pc 202ec: e12fff13 bx r3 202f0: e3500001 cmp r0, #1 ; 0x1 202f4: 0a00002a beq 203a4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 202f8: e59d2008 ldr r2, [sp, #8] 202fc: e592300c ldr r3, [r2, #12] 20300: e3530000 cmp r3, #0 ; 0x0 20304: 0a00001c beq 2037c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); 20308: e1a0000d mov r0, sp 2030c: e1a0e00f mov lr, pc 20310: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 20314: e59d3008 ldr r3, [sp, #8] 20318: e3530000 cmp r3, #0 ; 0x0 if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); 2031c: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 20320: 0affffe3 beq 202b4 20324: e593301c ldr r3, [r3, #28] 20328: e3530000 cmp r3, #0 ; 0x0 2032c: 0affffe0 beq 202b4 20330: e1a0000d mov r0, sp 20334: e1a0e00f mov lr, pc 20338: e12fff13 bx r3 2033c: eaffffdc b 202b4 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) { 20340: eb0035fa bl 2db30 <__errno> <== NOT EXECUTED 20344: e5903000 ldr r3, [r0] <== NOT EXECUTED 20348: e3530086 cmp r3, #134 ; 0x86 <== NOT EXECUTED 2034c: 0affffe0 beq 202d4 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 20350: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 20354: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 20358: 0affffd4 beq 202b0 <== NOT EXECUTED 2035c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 20360: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 20364: 0affffd1 beq 202b0 <== NOT EXECUTED 20368: e1a0000d mov r0, sp <== NOT EXECUTED 2036c: e1a0e00f mov lr, pc <== NOT EXECUTED 20370: e12fff13 bx r3 <== NOT EXECUTED 20374: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 20378: eaffffcd b 202b4 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 2037c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 20380: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 20384: 11a0000d movne r0, sp <== NOT EXECUTED 20388: 11a0e00f movne lr, pc <== NOT EXECUTED 2038c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 20390: eb0035e6 bl 2db30 <__errno> <== NOT EXECUTED 20394: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 20398: e5803000 str r3, [r0] <== NOT EXECUTED 2039c: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 203a0: eaffffc3 b 202b4 <== 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 ); 203a4: e59d3008 ldr r3, [sp, #8] 203a8: e3530000 cmp r3, #0 ; 0x0 203ac: 0a000004 beq 203c4 203b0: e593301c ldr r3, [r3, #28] 203b4: e3530000 cmp r3, #0 ; 0x0 203b8: 11a0000d movne r0, sp 203bc: 11a0e00f movne lr, pc 203c0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EISDIR ); 203c4: eb0035d9 bl 2db30 <__errno> 203c8: e3a03015 mov r3, #21 ; 0x15 203cc: e5803000 str r3, [r0] 203d0: e3e04000 mvn r4, #0 ; 0x0 203d4: eaffffb6 b 202b4 00020448 : */ int unmount( const char *path ) { 20448: e92d4030 push {r4, r5, lr} 2044c: 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 ) ) 20450: e3a01000 mov r1, #0 ; 0x0 20454: e1a0200d mov r2, sp 20458: e3a03001 mov r3, #1 ; 0x1 2045c: ebff8e68 bl 3e04 20460: e3500000 cmp r0, #0 ; 0x0 20464: e1a0500d mov r5, sp 20468: 1a000032 bne 20538 return -1; mt_entry = loc.mt_entry; 2046c: 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) ){ 20470: e59d3000 ldr r3, [sp] 20474: e5942018 ldr r2, [r4, #24] 20478: e1520003 cmp r2, r3 2047c: 1a000035 bne 20558 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 20480: e59d3008 ldr r3, [sp, #8] 20484: e3530000 cmp r3, #0 ; 0x0 20488: 0a000004 beq 204a0 2048c: e593301c ldr r3, [r3, #28] 20490: e3530000 cmp r3, #0 ; 0x0 20494: 11a0000d movne r0, sp 20498: 11a0e00f movne lr, pc 2049c: 112fff13 bxne r3 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 204a0: e5943010 ldr r3, [r4, #16] 204a4: e5932028 ldr r2, [r3, #40] 204a8: e3520000 cmp r2, #0 ; 0x0 204ac: 0a000052 beq 205fc rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 204b0: e5943020 ldr r3, [r4, #32] 204b4: e593202c ldr r2, [r3, #44] 204b8: e3520000 cmp r2, #0 ; 0x0 204bc: 0a00004e beq 205fc * 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 ) 204c0: e59f3148 ldr r3, [pc, #328] ; 20610 204c4: e5932000 ldr r2, [r3] 204c8: e5921010 ldr r1, [r2, #16] 204cc: e1510004 cmp r1, r4 204d0: 0a00001b beq 20544 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 204d4: e59f1138 ldr r1, [pc, #312] ; 20614 204d8: e4912004 ldr r2, [r1], #4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 204dc: e1510002 cmp r1, r2 204e0: 0a00000a beq 20510 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 ) { 204e4: e5940024 ldr r0, [r4, #36] 204e8: e5923014 ldr r3, [r2, #20] 204ec: e1530000 cmp r3, r0 204f0: 1a000003 bne 20504 204f4: ea000012 b 20544 <== NOT EXECUTED 204f8: e5923014 ldr r3, [r2, #20] 204fc: e1500003 cmp r0, r3 20500: 0a00000f beq 20544 * 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 ) { 20504: 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 ); 20508: e1510002 cmp r1, r2 2050c: 1afffff9 bne 204f8 * 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 ) 20510: e1a00004 mov r0, r4 20514: ebff8f4a bl 4244 20518: e3500001 cmp r0, #1 ; 0x1 2051c: 0a000008 beq 20544 * 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 ) 20520: e5943010 ldr r3, [r4, #16] 20524: e1a00004 mov r0, r4 20528: e1a0e00f mov lr, pc 2052c: e593f028 ldr pc, [r3, #40] 20530: e2505000 subs r5, r0, #0 ; 0x0 20534: 0a000014 beq 2058c */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 20538: e3e00000 mvn r0, #0 ; 0x0 } 2053c: e28dd010 add sp, sp, #16 ; 0x10 20540: 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 ); 20544: eb003579 bl 2db30 <__errno> 20548: e3a03010 mov r3, #16 ; 0x10 2054c: e5803000 str r3, [r0] 20550: e3e00000 mvn r0, #0 ; 0x0 20554: eafffff8 b 2053c /* * 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 ); 20558: e59d3008 ldr r3, [sp, #8] 2055c: e3530000 cmp r3, #0 ; 0x0 20560: 0a000004 beq 20578 20564: e593301c ldr r3, [r3, #28] 20568: e3530000 cmp r3, #0 ; 0x0 2056c: 11a0000d movne r0, sp 20570: 11a0e00f movne lr, pc 20574: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 20578: eb00356c bl 2db30 <__errno> 2057c: e3a0300d mov r3, #13 ; 0xd 20580: e5803000 str r3, [r0] 20584: e3e00000 mvn r0, #0 ; 0x0 20588: eaffffeb b 2053c * 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){ 2058c: e5943020 ldr r3, [r4, #32] 20590: e1a00004 mov r0, r4 20594: e1a0e00f mov lr, pc 20598: e593f02c ldr pc, [r3, #44] 2059c: e3500000 cmp r0, #0 ; 0x0 205a0: 1a00000d bne 205dc */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 205a4: e1a00004 mov r0, r4 205a8: eb0005ae bl 21c68 <_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 ); 205ac: e5943010 ldr r3, [r4, #16] 205b0: e3530000 cmp r3, #0 ; 0x0 205b4: 0a000004 beq 205cc 205b8: e593301c ldr r3, [r3, #28] 205bc: e3530000 cmp r3, #0 ; 0x0 205c0: 12840008 addne r0, r4, #8 ; 0x8 205c4: 11a0e00f movne lr, pc 205c8: 112fff13 bxne r3 free( mt_entry ); 205cc: e1a00004 mov r0, r4 205d0: ebff8e60 bl 3f58 205d4: e3a00000 mov r0, #0 ; 0x0 205d8: eaffffd7 b 2053c * 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 ) 205dc: e1a00004 mov r0, r4 <== NOT EXECUTED 205e0: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 205e4: e1a0e00f mov lr, pc <== NOT EXECUTED 205e8: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 205ec: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 205f0: 0affffd0 beq 20538 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 205f4: e1a00005 mov r0, r5 <== NOT EXECUTED 205f8: ebff9fd6 bl 8558 <== 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 ); 205fc: eb00354b bl 2db30 <__errno> <== NOT EXECUTED 20600: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 20604: e5803000 str r3, [r0] <== NOT EXECUTED 20608: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2060c: eaffffca b 2053c <== NOT EXECUTED 20610: 000402b8 .word 0x000402b8 20614: 0005a628 .word 0x0005a628 00020618 : int utime( const char *path, const struct utimbuf *times ) { 20618: e92d4030 push {r4, r5, lr} 2061c: e24dd010 sub sp, sp, #16 ; 0x10 20620: e1a04001 mov r4, r1 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) ) 20624: e1a0200d mov r2, sp 20628: e3a01000 mov r1, #0 ; 0x0 2062c: e3a03001 mov r3, #1 ; 0x1 20630: ebff8df3 bl 3e04 20634: e3500000 cmp r0, #0 ; 0x0 20638: e1a0500d mov r5, sp 2063c: 1a00001b bne 206b0 return -1; if ( !temp_loc.ops->utime_h ){ 20640: e59d2008 ldr r2, [sp, #8] 20644: e5923030 ldr r3, [r2, #48] 20648: e3530000 cmp r3, #0 ; 0x0 2064c: 0a00000f beq 20690 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 ); 20650: e8940006 ldm r4, {r1, r2} 20654: e1a0000d mov r0, sp 20658: e1a0e00f mov lr, pc 2065c: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 20660: e59d3008 ldr r3, [sp, #8] 20664: e3530000 cmp r3, #0 ; 0x0 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 ); 20668: e1a04000 mov r4, r0 rtems_filesystem_freenode( &temp_loc ); 2066c: 0a000004 beq 20684 20670: e593301c ldr r3, [r3, #28] 20674: e3530000 cmp r3, #0 ; 0x0 20678: 11a0000d movne r0, sp 2067c: 11a0e00f movne lr, pc 20680: 112fff13 bxne r3 return result; } 20684: e1a00004 mov r0, r4 20688: e28dd010 add sp, sp, #16 ; 0x10 2068c: 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 ); 20690: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 20694: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 20698: 11a0000d movne r0, sp <== NOT EXECUTED 2069c: 11a0e00f movne lr, pc <== NOT EXECUTED 206a0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 206a4: eb003521 bl 2db30 <__errno> <== NOT EXECUTED 206a8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 206ac: e5803000 str r3, [r0] <== NOT EXECUTED 206b0: e3e04000 mvn r4, #0 ; 0x0 206b4: eafffff2 b 20684 00001d68 : */ void vprintk( const char *fmt, va_list ap ) { 1d68: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1d6c: e1a08000 mov r8, r0 char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 1d70: e5d00000 ldrb r0, [r0] 1d74: e3500000 cmp r0, #0 ; 0x0 */ void vprintk( const char *fmt, va_list ap ) { 1d78: e24dd01c sub sp, sp, #28 ; 0x1c 1d7c: e1a07001 mov r7, r1 char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 1d80: 0a0000a1 beq 200c 1d84: e59fa3bc ldr sl, [pc, #956] ; 2148 base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 1d88: e3500025 cmp r0, #37 ; 0x25 1d8c: 1a000059 bne 1ef8 fmt++; if (*fmt == '0' ) { 1d90: e5d80001 ldrb r0, [r8, #1] sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; 1d94: e2881001 add r1, r8, #1 ; 0x1 if (*fmt == '0' ) { 1d98: e3500030 cmp r0, #48 ; 0x30 lead = '0'; fmt++; 1d9c: 05f10001 ldrbeq r0, [r1, #1]! width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; if (*fmt == '0' ) { 1da0: 13a09020 movne r9, #32 ; 0x20 lead = '0'; fmt++; 1da4: 03a09030 moveq r9, #48 ; 0x30 } if (*fmt == '-' ) { 1da8: e350002d cmp r0, #45 ; 0x2d minus = 1; fmt++; 1dac: 05f10001 ldrbeq r0, [r1, #1]! 1db0: 03a03001 moveq r3, #1 ; 0x1 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 1db4: 13a02000 movne r2, #0 ; 0x0 minus = 1; fmt++; 1db8: 058d3000 streq r3, [sp] } while (*fmt >= '0' && *fmt <= '9' ) { 1dbc: e2403030 sub r3, r0, #48 ; 0x30 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 1dc0: 158d2000 strne r2, [sp] minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 1dc4: e3530009 cmp r3, #9 ; 0x9 1dc8: 83a04000 movhi r4, #0 ; 0x0 1dcc: 81a08001 movhi r8, r1 1dd0: 81a0b004 movhi fp, r4 1dd4: 8a00000b bhi 1e08 1dd8: e3a04000 mov r4, #0 ; 0x0 width *= 10; width += (*fmt - '0'); 1ddc: e1a03184 lsl r3, r4, #3 1de0: e1a02084 lsl r2, r4, #1 1de4: e0822003 add r2, r2, r3 1de8: e0822000 add r2, r2, r0 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 1dec: e5f10001 ldrb r0, [r1, #1]! 1df0: e2403030 sub r3, r0, #48 ; 0x30 1df4: e3530009 cmp r3, #9 ; 0x9 width *= 10; width += (*fmt - '0'); 1df8: e2424030 sub r4, r2, #48 ; 0x30 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 1dfc: 9afffff6 bls 1ddc 1e00: e1a0b004 mov fp, r4 1e04: e1a08001 mov r8, r1 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 1e08: e350006c cmp r0, #108 ; 0x6c lflag = 1; c = *++fmt; 1e0c: 05d10001 ldrbeq r0, [r1, #1] } switch (c) { 1e10: e2403044 sub r3, r0, #68 ; 0x44 fmt++; } if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; 1e14: 02818001 addeq r8, r1, #1 ; 0x1 } switch (c) { 1e18: e3530034 cmp r3, #52 ; 0x34 1e1c: 979ff103 ldrls pc, [pc, r3, lsl #2] 1e20: ea000034 b 1ef8 1e24: 00002014 .word 0x00002014 <== NOT EXECUTED 1e28: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e2c: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e30: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e34: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e38: 00002014 .word 0x00002014 <== NOT EXECUTED 1e3c: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e40: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e44: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e48: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e4c: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e50: 00001f18 .word 0x00001f18 <== NOT EXECUTED 1e54: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e58: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e5c: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e60: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e64: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e68: 00002108 .word 0x00002108 <== NOT EXECUTED 1e6c: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e70: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e74: 0000213c .word 0x0000213c <== NOT EXECUTED 1e78: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e7c: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e80: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e84: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e88: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e8c: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e90: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e94: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e98: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1e9c: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ea0: 000020f0 .word 0x000020f0 <== NOT EXECUTED 1ea4: 00002014 .word 0x00002014 <== NOT EXECUTED 1ea8: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1eac: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1eb0: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1eb4: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1eb8: 00002014 .word 0x00002014 <== NOT EXECUTED 1ebc: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ec0: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ec4: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ec8: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ecc: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ed0: 00001f18 .word 0x00001f18 <== NOT EXECUTED 1ed4: 0000213c .word 0x0000213c <== NOT EXECUTED 1ed8: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1edc: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ee0: 0000204c .word 0x0000204c <== NOT EXECUTED 1ee4: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ee8: 00002108 .word 0x00002108 <== NOT EXECUTED 1eec: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ef0: 00001ef8 .word 0x00001ef8 <== NOT EXECUTED 1ef4: 0000213c .word 0x0000213c <== 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); 1ef8: e1a0e00f mov lr, pc 1efc: e59af000 ldr pc, [sl] 1f00: e58d7004 str r7, [sp, #4] ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 1f04: e5f80001 ldrb r0, [r8, #1]! 1f08: e3500000 cmp r0, #0 ; 0x0 1f0c: 0a00003e beq 200c 1f10: e59d7004 ldr r7, [sp, #4] 1f14: eaffff9b b 1d88 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 1f18: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1f1c: e3a06008 mov r6, #8 ; 0x8 <== NOT EXECUTED break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 1f20: e5975000 ldr r5, [r7] 1f24: e2877004 add r7, r7, #4 ; 0x4 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 1f28: 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), 1f2c: e58d7004 str r7, [sp, #4] { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 1f30: 1a00003e bne 2030 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 1f34: e1a00005 mov r0, r5 1f38: e1a01006 mov r1, r6 1f3c: eb00433a bl 12c2c <__aeabi_uidiv> 1f40: e3500000 cmp r0, #0 ; 0x0 1f44: 01a04000 moveq r4, r0 1f48: 03a07001 moveq r7, #1 ; 0x1 1f4c: 0a000010 beq 1f94 1f50: e1a02005 mov r2, r5 1f54: e3a04000 mov r4, #0 ; 0x0 1f58: e1a05000 mov r5, r0 1f5c: ea000000 b 1f64 1f60: e1a05000 mov r5, r0 toPrint[count++] = (num - (n*base)); 1f64: e0030596 mul r3, r6, r5 1f68: e0633002 rsb r3, r3, r2 1f6c: e28d2008 add r2, sp, #8 ; 0x8 1f70: e7c23004 strb r3, [r2, r4] num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 1f74: e1a00005 mov r0, r5 1f78: e1a01006 mov r1, r6 1f7c: eb00432a bl 12c2c <__aeabi_uidiv> 1f80: e3500000 cmp r0, #0 ; 0x0 1f84: e1a02005 mov r2, r5 toPrint[count++] = (num - (n*base)); 1f88: e2844001 add r4, r4, #1 ; 0x1 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 1f8c: 1afffff3 bne 1f60 1f90: e2847001 add r7, r4, #1 ; 0x1 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 1f94: e28d201c add r2, sp, #28 ; 0x1c 1f98: e0823004 add r3, r2, r4 for (n=maxwidth ; n > count; n-- ) 1f9c: e157000b cmp r7, fp 1fa0: e1a0600b mov r6, fp count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 1fa4: e5435014 strb r5, [r3, #-20] for (n=maxwidth ; n > count; n-- ) 1fa8: 2a000006 bcs 1fc8 1fac: e20940ff and r4, r9, #255 ; 0xff 1fb0: e2466001 sub r6, r6, #1 ; 0x1 BSP_output_char(lead); 1fb4: e1a00004 mov r0, r4 1fb8: e1a0e00f mov lr, pc 1fbc: e59af000 ldr pc, [sl] toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 1fc0: e1570006 cmp r7, r6 1fc4: 3afffff9 bcc 1fb0 BSP_output_char(lead); for (n = 0; n < count; n++) { 1fc8: e3570000 cmp r7, #0 ; 0x0 1fcc: 0affffcc beq 1f04 1fd0: e28d301c add r3, sp, #28 ; 0x1c 1fd4: e3a04000 mov r4, #0 ; 0x0 1fd8: e0835007 add r5, r3, r7 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 1fdc: e0643005 rsb r3, r4, r5 1fe0: e5532015 ldrb r2, [r3, #-21] 1fe4: e59f3160 ldr r3, [pc, #352] ; 214c toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 1fe8: e2844001 add r4, r4, #1 ; 0x1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 1fec: e7d30002 ldrb r0, [r3, r2] 1ff0: e1a0e00f mov lr, pc 1ff4: e59af000 ldr pc, [sl] toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 1ff8: e1570004 cmp r7, r4 1ffc: 8afffff6 bhi 1fdc ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2000: e5f80001 ldrb r0, [r8, #1]! 2004: e3500000 cmp r0, #0 ; 0x0 2008: 1affffc0 bne 1f10 base, sign, width, lead); } else { BSP_output_char(*fmt); } } } 200c: e28dd01c add sp, sp, #28 ; 0x1c 2010: 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), 2014: e5975000 ldr r5, [r7] if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2018: 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), 201c: e2877004 add r7, r7, #4 ; 0x4 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 2020: e0133fa5 ands r3, r3, r5, lsr #31 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2024: 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), 2028: e58d7004 str r7, [sp, #4] { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 202c: 0affffc0 beq 1f34 BSP_output_char('-'); 2030: e3a0002d mov r0, #45 ; 0x2d <== NOT EXECUTED 2034: e1a0e00f mov lr, pc <== NOT EXECUTED 2038: e59af000 ldr pc, [sl] <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 203c: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 2040: e2655000 rsb r5, r5, #0 ; 0x0 <== NOT EXECUTED if (maxwidth) maxwidth--; 2044: 124bb001 subne fp, fp, #1 ; 0x1 <== NOT EXECUTED 2048: eaffffb9 b 1f34 <== NOT EXECUTED case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 204c: e5979000 ldr r9, [r7] /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 2050: e5d93000 ldrb r3, [r9] case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 2054: e2877004 add r7, r7, #4 ; 0x4 /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 2058: e3530000 cmp r3, #0 ; 0x0 case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 205c: e58d7004 str r7, [sp, #4] /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 2060: 01a06003 moveq r6, r3 2064: 0a000004 beq 207c 2068: e3a06000 mov r6, #0 ; 0x0 206c: e2866001 add r6, r6, #1 ; 0x1 2070: e7d93006 ldrb r3, [r9, r6] 2074: e3530000 cmp r3, #0 ; 0x0 2078: 1afffffb bne 206c ; /* leading spaces */ if ( !minus ) 207c: e59d2000 ldr r2, [sp] 2080: e3520000 cmp r2, #0 ; 0x0 2084: 0a000022 beq 2114 for ( i=len ; i 2098: e5d90000 ldrb r0, [r9] 209c: e3500000 cmp r0, #0 ; 0x0 20a0: 0a000005 beq 20bc 20a4: e1a04009 mov r4, r9 BSP_output_char(*str); 20a8: e1a0e00f mov lr, pc 20ac: e59af000 ldr pc, [sl] if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 20bc: e59d3000 ldr r3, [sp] 20c0: e3530000 cmp r3, #0 ; 0x0 20c4: 0affff8e beq 1f04 for ( i=len ; i 20d0: e1a04006 mov r4, r6 20d4: e2844001 add r4, r4, #1 ; 0x1 BSP_output_char(' '); 20d8: e3a00020 mov r0, #32 ; 0x20 20dc: e1a0e00f mov lr, pc 20e0: e59af000 ldr pc, [sl] for ( i=0 ; i 20ec: eaffff84 b 1f04 BSP_output_char(' '); } break; case 'c': BSP_output_char(va_arg(ap, int)); 20f0: e5d70000 ldrb r0, [r7] <== NOT EXECUTED 20f4: e2877004 add r7, r7, #4 ; 0x4 <== NOT EXECUTED 20f8: e58d7004 str r7, [sp, #4] <== NOT EXECUTED 20fc: e1a0e00f mov lr, pc <== NOT EXECUTED 2100: e59af000 ldr pc, [sl] <== NOT EXECUTED 2104: eaffff7e b 1f04 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2108: e3a03000 mov r3, #0 ; 0x0 210c: e3a0600a mov r6, #10 ; 0xa 2110: eaffff82 b 1f20 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 211c: e1a05006 mov r5, r6 <== NOT EXECUTED 2120: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED BSP_output_char(' '); 2124: e3a00020 mov r0, #32 ; 0x20 <== NOT EXECUTED 2128: e1a0e00f mov lr, pc <== NOT EXECUTED 212c: e59af000 ldr pc, [sl] <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== NOT EXECUTED 2138: eaffffd4 b 2090 <== NOT EXECUTED break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 213c: e3a03000 mov r3, #0 ; 0x0 2140: e3a06010 mov r6, #16 ; 0x10 2144: eaffff75 b 1f20 2148: 00015248 .word 0x00015248 214c: 0001668c .word 0x0001668c 000149fc : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 149fc: e59f30c4 ldr r3, [pc, #196] ; 14ac8 14a00: e593c000 ldr ip, [r3] 14a04: e150000c cmp r0, ip ssize_t write( int fd, const void *buffer, size_t count ) { 14a08: e92d4070 push {r4, r5, r6, lr} 14a0c: e1a06001 mov r6, r1 14a10: e1a05002 mov r5, r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 14a14: 2a00001c bcs 14a8c iop = rtems_libio_iop( fd ); 14a18: e1a03200 lsl r3, r0, #4 14a1c: e0433100 sub r3, r3, r0, lsl #2 14a20: e0833000 add r3, r3, r0 14a24: e59f00a0 ldr r0, [pc, #160] ; 14acc 14a28: e590c000 ldr ip, [r0] 14a2c: e1a03103 lsl r3, r3, #2 14a30: e08c4003 add r4, ip, r3 rtems_libio_check_is_open( iop ); 14a34: e594300c ldr r3, [r4, #12] 14a38: e3130c01 tst r3, #256 ; 0x100 14a3c: 0a000012 beq 14a8c rtems_libio_check_buffer( buffer ); 14a40: e3510000 cmp r1, #0 ; 0x0 14a44: 0a000015 beq 14aa0 rtems_libio_check_count( count ); 14a48: e3520000 cmp r2, #0 ; 0x0 14a4c: 01a00002 moveq r0, r2 14a50: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 14a54: e3130004 tst r3, #4 ; 0x4 14a58: 0a000010 beq 14aa0 /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 14a5c: e5943030 ldr r3, [r4, #48] 14a60: e593300c ldr r3, [r3, #12] 14a64: e3530000 cmp r3, #0 ; 0x0 14a68: 0a000011 beq 14ab4 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 14a6c: e1a00004 mov r0, r4 14a70: e1a0e00f mov lr, pc 14a74: e12fff13 bx r3 if ( rc > 0 ) 14a78: e3500000 cmp r0, #0 ; 0x0 iop->offset += rc; 14a7c: c5943008 ldrgt r3, [r4, #8] 14a80: c0833000 addgt r3, r3, r0 14a84: c5843008 strgt r3, [r4, #8] return rc; } 14a88: 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 ); 14a8c: ebffdd3b bl bf80 <__errno> <== NOT EXECUTED 14a90: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 14a94: e5803000 str r3, [r0] <== NOT EXECUTED 14a98: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14a9c: 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 ); 14aa0: ebffdd36 bl bf80 <__errno> <== NOT EXECUTED 14aa4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 14aa8: e5803000 str r3, [r0] <== NOT EXECUTED 14aac: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14ab0: 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 ); 14ab4: ebffdd31 bl bf80 <__errno> <== NOT EXECUTED 14ab8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 14abc: e5803000 str r3, [r0] <== NOT EXECUTED 14ac0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 14ac4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 14ac8: 00015094 .word 0x00015094 14acc: 00016d90 .word 0x00016d90