0000796c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 796c: e5903000 ldr r3, [r0] 7970: e593304c ldr r3, [r3, #76] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 7974: e590200c ldr r2, [r0, #12] switch( node->type ) { 7978: e2433001 sub r3, r3, #1 ; 0x1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 797c: e592202c ldr r2, [r2, #44] switch( node->type ) { 7980: e3530005 cmp r3, #5 ; 0x5 7984: 979ff103 ldrls pc, [pc, r3, lsl #2] 7988: ea00000d b 79c4 <== NOT EXECUTED 798c: 000079a4 .word 0x000079a4 <== NOT EXECUTED 7990: 000079ac .word 0x000079ac <== NOT EXECUTED 7994: 000079b4 .word 0x000079b4 <== NOT EXECUTED 7998: 000079b4 .word 0x000079b4 <== NOT EXECUTED 799c: 000079bc .word 0x000079bc <== NOT EXECUTED 79a0: 000079bc .word 0x000079bc <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 79a4: e5923008 ldr r3, [r2, #8] 79a8: ea000004 b 79c0 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 79ac: e59f3018 ldr r3, [pc, #24] ; 79cc 79b0: ea000002 b 79c0 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 79b4: e59f3014 ldr r3, [pc, #20] ; 79d0 79b8: ea000000 b 79c0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 79bc: e5923004 ldr r3, [r2, #4] 79c0: e5803004 str r3, [r0, #4] break; } return 0; } 79c4: e3a00000 mov r0, #0 ; 0x0 79c8: e12fff1e bx lr 79cc: 0001517c .word 0x0001517c 79d0: 000151b4 .word 0x000151b4 0001a3a4 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 1a3a4: e92d40f0 push {r4, r5, r6, r7, lr} 1a3a8: e1a01801 lsl r1, r1, #16 1a3ac: e1a02802 lsl r2, r2, #16 1a3b0: 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; 1a3b4: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 1a3b8: e1a06821 lsr r6, r1, #16 1a3bc: 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(); 1a3c0: eb000676 bl 1bda0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 1a3c4: e1d433bc ldrh r3, [r4, #60] 1a3c8: e1530000 cmp r3, r0 1a3cc: 13500000 cmpne r0, #0 ; 0x0 1a3d0: 03a05000 moveq r5, #0 ; 0x0 1a3d4: 13a05001 movne r5, #1 ; 0x1 1a3d8: 0a000004 beq 1a3f0 rtems_set_errno_and_return_minus_one( EPERM ); 1a3dc: eb003f2d bl 2a098 <__errno> <== NOT EXECUTED 1a3e0: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 1a3e4: e5803000 str r3, [r0] <== NOT EXECUTED 1a3e8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1a3ec: ea000007 b 1a410 <== NOT EXECUTED #endif jnode->st_uid = owner; 1a3f0: e1c463bc strh r6, [r4, #60] jnode->st_gid = group; 1a3f4: e1c473be strh r7, [r4, #62] IMFS_update_ctime( jnode ); 1a3f8: e1a0000d mov r0, sp 1a3fc: e1a01005 mov r1, r5 1a400: ebffa689 bl 3e2c 1a404: e59d3000 ldr r3, [sp] 1a408: e5843048 str r3, [r4, #72] 1a40c: e1a00005 mov r0, r5 return 0; } 1a410: e28dd008 add sp, sp, #8 ; 0x8 1a414: e8bd80f0 pop {r4, r5, r6, r7, pc} 0000a838 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { a838: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} IMFS_jnode_t *node; struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; if ( parent_loc != NULL ) a83c: e2508000 subs r8, r0, #0 ; 0x0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { a840: e24dd008 sub sp, sp, #8 ; 0x8 a844: e1a09001 mov r9, r1 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); a848: e3a00001 mov r0, #1 ; 0x1 a84c: 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 ) a850: 01a06008 moveq r6, r8 parent = parent_loc->node_access; a854: 15986000 ldrne r6, [r8] IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { a858: e1a05002 mov r5, r2 a85c: e1a0a003 mov sl, r3 a860: e59d7028 ldr r7, [sp, #40] /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); a864: ebfff76d bl 8620 if ( !node ) a868: e2504000 subs r4, r0, #0 ; 0x0 a86c: 0a000048 beq a994 /* * Fill in the basic information */ node->st_nlink = 1; a870: e3a03001 mov r3, #1 ; 0x1 node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); a874: e3a02020 mov r2, #32 ; 0x20 a878: e1a01005 mov r1, r5 /* * Fill in the basic information */ node->st_nlink = 1; a87c: e1c433b4 strh r3, [r4, #52] node->type = type; a880: e584904c str r9, [r4, #76] strncpy( node->name, name, IMFS_NAME_MAX ); a884: e284000c add r0, r4, #12 ; 0xc a888: eb00081f bl c90c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; a88c: e59f310c ldr r3, [pc, #268] ; a9a0 a890: e5933000 ldr r3, [r3] a894: e5933024 ldr r3, [r3, #36] a898: e1ca3003 bic r3, sl, r3 a89c: e5843030 str r3, [r4, #48] #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); a8a0: ebfff7fe bl 88a0 a8a4: e1c403bc strh r0, [r4, #60] node->st_gid = getegid(); a8a8: ebfff7f7 bl 888c /* * Now set all the times. */ gettimeofday( &tv, 0 ); a8ac: 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(); a8b0: e1c403be strh r0, [r4, #62] /* * Now set all the times. */ gettimeofday( &tv, 0 ); a8b4: e1a0000d mov r0, sp a8b8: ebfff7fd bl 88b4 node->stat_atime = (time_t) tv.tv_sec; a8bc: e59d3000 ldr r3, [sp] /* * Set the type specific information */ switch (type) { a8c0: e2492001 sub r2, r9, #1 ; 0x1 gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; a8c4: e5843048 str r3, [r4, #72] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; a8c8: e5843040 str r3, [r4, #64] node->stat_mtime = (time_t) tv.tv_sec; a8cc: e5843044 str r3, [r4, #68] /* * Set the type specific information */ switch (type) { a8d0: e3520005 cmp r2, #5 ; 0x5 a8d4: 979ff102 ldrls pc, [pc, r2, lsl #2] a8d8: ea00001c b a950 <== NOT EXECUTED a8dc: 0000a8f4 .word 0x0000a8f4 <== NOT EXECUTED a8e0: 0000a91c .word 0x0000a91c <== NOT EXECUTED a8e4: 0000a910 .word 0x0000a910 <== NOT EXECUTED a8e8: 0000a910 .word 0x0000a910 <== NOT EXECUTED a8ec: 0000a938 .word 0x0000a938 <== NOT EXECUTED a8f0: 0000a92c .word 0x0000a92c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a8f4: e2843054 add r3, r4, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); a8f8: e2842050 add r2, r4, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a8fc: e5843050 str r3, [r4, #80] the_chain->permanent_null = NULL; a900: e3a03000 mov r3, #0 ; 0x0 a904: e5843054 str r3, [r4, #84] the_chain->last = _Chain_Head(the_chain); a908: e5842058 str r2, [r4, #88] a90c: ea000014 b a964 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; a910: e5973000 ldr r3, [r7] a914: e5843050 str r3, [r4, #80] a918: ea000011 b a964 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; a91c: e897000c ldm r7, {r2, r3} a920: 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; a924: e5842050 str r2, [r4, #80] a928: ea00000d b a964 node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; a92c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED node->info.linearfile.direct = 0; a930: 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; a934: e5843050 str r3, [r4, #80] <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; a938: e3a03000 mov r3, #0 ; 0x0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; a93c: 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; a940: e5843050 str r3, [r4, #80] node->info.file.indirect = 0; a944: e5843054 str r3, [r4, #84] node->info.file.doubly_indirect = 0; a948: e5843058 str r3, [r4, #88] a94c: ea000004 b a964 node->info.file.triply_indirect = 0; break; default: assert(0); a950: e59f004c ldr r0, [pc, #76] ; a9a4 <== NOT EXECUTED a954: e3a01074 mov r1, #116 ; 0x74 <== NOT EXECUTED a958: e59f2048 ldr r2, [pc, #72] ; a9a8 <== NOT EXECUTED a95c: e59f3048 ldr r3, [pc, #72] ; a9ac <== NOT EXECUTED a960: ebfff6d5 bl 84bc <__assert_func> <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { a964: e3560000 cmp r6, #0 ; 0x0 a968: 0a000009 beq a994 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); a96c: e2860050 add r0, r6, #80 ; 0x50 a970: e1a01004 mov r1, r4 a974: ebffe90e bl 4db4 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; a978: e598300c ldr r3, [r8, #12] a97c: e593202c ldr r2, [r3, #44] node->st_ino = ++fs_info->ino_count; a980: e5923000 ldr r3, [r2] a984: e2833001 add r3, r3, #1 ; 0x1 a988: e5823000 str r3, [r2] * 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; a98c: e5846008 str r6, [r4, #8] fs_info = parent_loc->mt_entry->fs_info; node->st_ino = ++fs_info->ino_count; a990: e5843038 str r3, [r4, #56] } return node; } a994: e1a00004 mov r0, r4 a998: e28dd008 add sp, sp, #8 ; 0x8 a99c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} a9a0: 000149b8 .word 0x000149b8 a9a4: 00015c5f .word 0x00015c5f a9a8: 000154b8 .word 0x000154b8 a9ac: 000159bb .word 0x000159bb 000028e8 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 28e8: e3500000 cmp r0, #0 ; 0x0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 28ec: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 28f0: e1a06001 mov r6, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 28f4: 059f00a4 ldreq r0, [pc, #164] ; 29a0 28f8: 03a0107f moveq r1, #127 ; 0x7f 28fc: 059f20a0 ldreq r2, [pc, #160] ; 29a4 2900: 059f30a0 ldreq r3, [pc, #160] ; 29a8 2904: 0a000005 beq 2920 assert( level >= 0 ); 2908: e3510000 cmp r1, #0 ; 0x0 290c: aa000004 bge 2924 2910: e59f0088 ldr r0, [pc, #136] ; 29a0 <== NOT EXECUTED 2914: e59f2088 ldr r2, [pc, #136] ; 29a4 <== NOT EXECUTED 2918: e59f308c ldr r3, [pc, #140] ; 29ac <== NOT EXECUTED 291c: e3a01081 mov r1, #129 ; 0x81 <== NOT EXECUTED 2920: eb0001b1 bl 2fec <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 2924: e590304c ldr r3, [r0, #76] 2928: e3530001 cmp r3, #1 ; 0x1 292c: 159f006c ldrne r0, [pc, #108] ; 29a0 2930: 13a01083 movne r1, #131 ; 0x83 2934: 159f2068 ldrne r2, [pc, #104] ; 29a4 2938: 159f3070 ldrne r3, [pc, #112] ; 29b0 293c: 1afffff7 bne 2920 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2940: e2808054 add r8, r0, #84 ; 0x54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2944: e5905050 ldr r5, [r0, #80] the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2948: e59fa064 ldr sl, [pc, #100] ; 29b4 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 294c: e2817001 add r7, r1, #1 ; 0x1 2950: ea00000f b 2994 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; 2954: e3a04000 mov r4, #0 ; 0x0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2958: e59a3000 ldr r3, [sl] !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 295c: e2844001 add r4, r4, #1 ; 0x1 fprintf(stdout, "...." ); 2960: e5931008 ldr r1, [r3, #8] 2964: e59f004c ldr r0, [pc, #76] ; 29b8 2968: eb003297 bl f3cc !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++ ) 296c: e1540006 cmp r4, r6 2970: dafffff8 ble 2958 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2974: e1a00005 mov r0, r5 2978: ebffff87 bl 279c if ( the_jnode->type == IMFS_DIRECTORY ) 297c: e595304c ldr r3, [r5, #76] 2980: e3530001 cmp r3, #1 ; 0x1 IMFS_dump_directory( the_jnode, level + 1 ); 2984: 01a00005 moveq r0, r5 2988: 01a01007 moveq r1, r7 298c: 0bffffd5 bleq 28e8 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 ) { 2990: e5955000 ldr r5, [r5] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 2994: e1550008 cmp r5, r8 2998: 1affffed bne 2954 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 299c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 29a0: 0001c192 .word 0x0001c192 29a4: 0001ad3e .word 0x0001ad3e 29a8: 0001c238 .word 0x0001c238 29ac: 0001c246 .word 0x0001c246 29b0: 0001c251 .word 0x0001c251 29b4: 0001a80c .word 0x0001a80c 29b8: 0001c277 .word 0x0001c277 00007b4c : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 7b4c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 7b50: e24dd038 sub sp, sp, #56 ; 0x38 7b54: e1a05002 mov r5, r2 7b58: e1a0a000 mov sl, r0 7b5c: e1a09001 mov r9, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 7b60: e5924000 ldr r4, [r2] 7b64: e3a08000 mov r8, #0 ; 0x0 7b68: e3a06001 mov r6, #1 ; 0x1 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], token, &len ); 7b6c: e28db003 add fp, sp, #3 ; 0x3 7b70: ea000054 b 7cc8 7b74: e08a0008 add r0, sl, r8 7b78: e1a0100b mov r1, fp 7b7c: e28d2034 add r2, sp, #52 ; 0x34 7b80: eb000156 bl 80e0 i += len; if ( !pathloc->node_access ) 7b84: e5953000 ldr r3, [r5] 7b88: e3530000 cmp r3, #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 ); 7b8c: e1a06000 mov r6, r0 i += len; 7b90: e59d7034 ldr r7, [sp, #52] if ( !pathloc->node_access ) 7b94: 0a000043 beq 7ca8 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 7b98: e3500000 cmp r0, #0 ; 0x0 7b9c: 0a000006 beq 7bbc if ( node->type == IMFS_DIRECTORY ) 7ba0: e594104c ldr r1, [r4, #76] 7ba4: e3510001 cmp r1, #1 ; 0x1 7ba8: 1a000003 bne 7bbc if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 7bac: e1a00005 mov r0, r5 7bb0: ebffff87 bl 79d4 7bb4: e3500000 cmp r0, #0 ; 0x0 7bb8: 0a000062 beq 7d48 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 7bbc: e3560003 cmp r6, #3 ; 0x3 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], token, &len ); i += len; 7bc0: e0888007 add r8, r8, r7 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 7bc4: e5954000 ldr r4, [r5] switch( type ) { 7bc8: 0a000013 beq 7c1c 7bcc: e3560004 cmp r6, #4 ; 0x4 7bd0: 0a000039 beq 7cbc 7bd4: e3560002 cmp r6, #2 ; 0x2 7bd8: 1a00003a bne 7cc8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7bdc: e59f2180 ldr r2, [pc, #384] ; 7d64 7be0: e5923000 ldr r3, [r2] 7be4: e5933014 ldr r3, [r3, #20] 7be8: e1540003 cmp r4, r3 7bec: 0a000035 beq 7cc8 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 7bf0: e595200c ldr r2, [r5, #12] 7bf4: e5923018 ldr r3, [r2, #24] 7bf8: e1540003 cmp r4, r3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 7bfc: 02823008 addeq r3, r2, #8 ; 0x8 7c00: 0a00003a beq 7cf0 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 7c04: e5944008 ldr r4, [r4, #8] 7c08: e3540000 cmp r4, #0 ; 0x0 7c0c: 1a000028 bne 7cb4 rtems_set_errno_and_return_minus_one( ENOENT ); 7c10: eb000de0 bl b398 <__errno> 7c14: e5806000 str r6, [r0] 7c18: ea00004d b 7d54 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 7c1c: e594304c ldr r3, [r4, #76] 7c20: e3530003 cmp r3, #3 ; 0x3 7c24: 1a000006 bne 7c44 IMFS_evaluate_hard_link( pathloc, 0 ); 7c28: e1a00005 mov r0, r5 7c2c: e3a01000 mov r1, #0 ; 0x0 7c30: ebffff7b bl 7a24 node = pathloc->node_access; 7c34: e5954000 ldr r4, [r5] if ( !node ) 7c38: e3540000 cmp r4, #0 ; 0x0 7c3c: 1a00000a bne 7c6c 7c40: ea00000c b 7c78 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 7c44: e3530004 cmp r3, #4 ; 0x4 7c48: 1a000007 bne 7c6c result = IMFS_evaluate_sym_link( pathloc, 0 ); 7c4c: e1a00005 mov r0, r5 7c50: e3a01000 mov r1, #0 ; 0x0 7c54: ebffff89 bl 7a80 node = pathloc->node_access; if ( result == -1 ) 7c58: 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 ); 7c5c: e1a04000 mov r4, r0 node = pathloc->node_access; 7c60: e5950000 ldr r0, [r5] if ( result == -1 ) 7c64: 0a00003b beq 7d58 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 7c68: e1a04000 mov r4, r0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7c6c: e594304c ldr r3, [r4, #76] 7c70: e3530001 cmp r3, #1 ; 0x1 7c74: 0a000002 beq 7c84 rtems_set_errno_and_return_minus_one( ENOTDIR ); 7c78: eb000dc6 bl b398 <__errno> 7c7c: e3a03014 mov r3, #20 ; 0x14 7c80: ea000032 b 7d50 /* * 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 ) { 7c84: e594305c ldr r3, [r4, #92] 7c88: e3530000 cmp r3, #0 ; 0x0 newloc = node->info.directory.mt_fs->mt_fs_root; 7c8c: 12833018 addne r3, r3, #24 ; 0x18 7c90: 1a000016 bne 7cf0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7c94: e1a00004 mov r0, r4 7c98: e1a0100b mov r1, fp 7c9c: eb0000e7 bl 8040 if ( !node ) 7ca0: e2504000 subs r4, r0, #0 ; 0x0 7ca4: 1a000002 bne 7cb4 rtems_set_errno_and_return_minus_one( ENOENT ); 7ca8: eb000dba bl b398 <__errno> 7cac: e3a03002 mov r3, #2 ; 0x2 7cb0: ea000026 b 7d50 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 7cb4: e5854000 str r4, [r5] 7cb8: ea000002 b 7cc8 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7cbc: eb000db5 bl b398 <__errno> 7cc0: e3a0305b mov r3, #91 ; 0x5b 7cc4: ea000021 b 7d50 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 7cc8: e3560000 cmp r6, #0 ; 0x0 7ccc: 13560004 cmpne r6, #4 ; 0x4 7cd0: 1affffa7 bne 7b74 * 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 ) { 7cd4: e594304c ldr r3, [r4, #76] 7cd8: e3530001 cmp r3, #1 ; 0x1 7cdc: 1a000011 bne 7d28 if ( node->info.directory.mt_fs != NULL ) { 7ce0: e594005c ldr r0, [r4, #92] 7ce4: e3500000 cmp r0, #0 ; 0x0 7ce8: 0a00000e beq 7d28 newloc = node->info.directory.mt_fs->mt_fs_root; 7cec: e2803018 add r3, r0, #24 ; 0x18 7cf0: e893000f ldm r3, {r0, r1, r2, r3} 7cf4: e28dc024 add ip, sp, #36 ; 0x24 7cf8: e88c000f stm ip, {r0, r1, r2, r3} *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 7cfc: e59dc034 ldr ip, [sp, #52] 7d00: e06cc008 rsb ip, ip, r8 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 7d04: e885000f stm r5, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 7d08: e5923000 ldr r3, [r2] 7d0c: e08a000c add r0, sl, ip 7d10: e1a01009 mov r1, r9 7d14: e1a02005 mov r2, r5 7d18: e1a0e00f mov lr, pc 7d1c: e12fff13 bx r3 7d20: e1a04000 mov r4, r0 7d24: ea00000b b 7d58 } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 7d28: e1a00005 mov r0, r5 7d2c: ebffff0e bl 796c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 7d30: e1a01009 mov r1, r9 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 7d34: e1a04000 mov r4, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 7d38: e1a00005 mov r0, r5 7d3c: ebffff24 bl 79d4 7d40: e3500000 cmp r0, #0 ; 0x0 7d44: 1a000003 bne 7d58 rtems_set_errno_and_return_minus_one( EACCES ); 7d48: eb000d92 bl b398 <__errno> 7d4c: e3a0300d mov r3, #13 ; 0xd 7d50: e5803000 str r3, [r0] 7d54: e3e04000 mvn r4, #0 ; 0x0 return result; } 7d58: e1a00004 mov r0, r4 7d5c: e28dd038 add sp, sp, #56 ; 0x38 7d60: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 7d64: 000149b8 .word 0x000149b8 00007e1c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 7e1c: 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; 7e20: e5914000 ldr r4, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 7e24: e24dd038 sub sp, sp, #56 ; 0x38 7e28: e1a05001 mov r5, r1 7e2c: e1a0a000 mov sl, r0 7e30: e1a09002 mov r9, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 7e34: e3a07000 mov r7, #0 ; 0x0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 7e38: e28db003 add fp, sp, #3 ; 0x3 7e3c: e08a0007 add r0, sl, r7 7e40: e1a0100b mov r1, fp 7e44: e28d2034 add r2, sp, #52 ; 0x34 7e48: eb0000a4 bl 80e0 i += len; if ( !pathloc->node_access ) 7e4c: e5953000 ldr r3, [r5] 7e50: e3530000 cmp r3, #0 ; 0x0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 7e54: e1a06000 mov r6, r0 i += len; 7e58: e59d8034 ldr r8, [sp, #52] if ( !pathloc->node_access ) 7e5c: 0a000059 beq 7fc8 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 7e60: e3500000 cmp r0, #0 ; 0x0 7e64: 0a000006 beq 7e84 if ( node->type == IMFS_DIRECTORY ) 7e68: e594104c ldr r1, [r4, #76] 7e6c: e3510001 cmp r1, #1 ; 0x1 7e70: 1a000003 bne 7e84 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 7e74: e1a00005 mov r0, r5 7e78: ebfffed5 bl 79d4 7e7c: e3500000 cmp r0, #0 ; 0x0 7e80: 0a000066 beq 8020 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 7e84: e5952000 ldr r2, [r5] */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); i += len; 7e88: e0877008 add r7, r7, r8 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 7e8c: e1a04002 mov r4, r2 switch( type ) { 7e90: e3560004 cmp r6, #4 ; 0x4 7e94: 979ff106 ldrls pc, [pc, r6, lsl #2] 7e98: eaffffe7 b 7e3c <== NOT EXECUTED 7e9c: 00007f8c .word 0x00007f8c <== NOT EXECUTED 7ea0: 00007e3c .word 0x00007e3c <== NOT EXECUTED 7ea4: 00007eb0 .word 0x00007eb0 <== NOT EXECUTED 7ea8: 00007ee8 .word 0x00007ee8 <== NOT EXECUTED 7eac: 00007f98 .word 0x00007f98 <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7eb0: e59f1184 ldr r1, [pc, #388] ; 803c 7eb4: e5913000 ldr r3, [r1] 7eb8: e5933014 ldr r3, [r3, #20] 7ebc: e1520003 cmp r2, r3 7ec0: 0affffdd beq 7e3c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 7ec4: e595100c ldr r1, [r5, #12] 7ec8: e5913018 ldr r3, [r1, #24] 7ecc: e1520003 cmp r2, r3 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 7ed0: 02813008 addeq r3, r1, #8 ; 0x8 7ed4: 0a000018 beq 7f3c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 7ed8: e5924008 ldr r4, [r2, #8] 7edc: e3540000 cmp r4, #0 ; 0x0 7ee0: 1a000027 bne 7f84 7ee4: ea000037 b 7fc8 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 7ee8: e592304c ldr r3, [r2, #76] 7eec: e3530003 cmp r3, #3 ; 0x3 7ef0: 0a000001 beq 7efc result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 7ef4: e3530004 cmp r3, #4 ; 0x4 7ef8: 1a000005 bne 7f14 result = IMFS_evaluate_link( pathloc, 0 ); 7efc: e1a00005 mov r0, r5 7f00: e3a01000 mov r1, #0 ; 0x0 7f04: ebffff97 bl 7d68 if ( result == -1 ) 7f08: e3700001 cmn r0, #1 ; 0x1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 7f0c: e1a04000 mov r4, r0 if ( result == -1 ) 7f10: 0a000046 beq 8030 return -1; } node = pathloc->node_access; 7f14: e5950000 ldr r0, [r5] if ( !node ) 7f18: e3500000 cmp r0, #0 ; 0x0 7f1c: 0a000037 beq 8000 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7f20: e590304c ldr r3, [r0, #76] 7f24: e3530001 cmp r3, #1 ; 0x1 7f28: 1a000034 bne 8000 /* * 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 ) { 7f2c: e590305c ldr r3, [r0, #92] 7f30: e3530000 cmp r3, #0 ; 0x0 7f34: 0a00000e beq 7f74 newloc = node->info.directory.mt_fs->mt_fs_root; 7f38: e2833018 add r3, r3, #24 ; 0x18 7f3c: e893000f ldm r3, {r0, r1, r2, r3} 7f40: e28dc024 add ip, sp, #36 ; 0x24 7f44: e88c000f stm ip, {r0, r1, r2, r3} *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7f48: e59dc034 ldr ip, [sp, #52] 7f4c: e06cc007 rsb ip, ip, r7 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 7f50: e885000f stm r5, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7f54: e5923004 ldr r3, [r2, #4] 7f58: e08a000c add r0, sl, ip 7f5c: e1a01005 mov r1, r5 7f60: e1a02009 mov r2, r9 7f64: e1a0e00f mov lr, pc 7f68: e12fff13 bx r3 7f6c: e1a04000 mov r4, r0 7f70: ea00002e b 8030 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7f74: e1a0100b mov r1, fp 7f78: eb000030 bl 8040 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 7f7c: e2504000 subs r4, r0, #0 ; 0x0 7f80: 0a000007 beq 7fa4 done = true; else pathloc->node_access = node; 7f84: e5854000 str r4, [r5] 7f88: eaffffab b 7e3c break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 7f8c: eb000d01 bl b398 <__errno> 7f90: e3a03011 mov r3, #17 ; 0x11 7f94: ea000023 b 8028 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7f98: eb000cfe bl b398 <__errno> 7f9c: e3a0305b mov r3, #91 ; 0x5b 7fa0: ea000020 b 8028 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 7fa4: e59d3034 ldr r3, [sp, #52] 7fa8: e0633007 rsb r3, r3, r7 7fac: e08a3003 add r3, sl, r3 7fb0: e5893000 str r3, [r9] 7fb4: e08a0007 add r0, sl, r7 7fb8: ea000005 b 7fd4 * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) 7fbc: e352002f cmp r2, #47 ; 0x2f 7fc0: 1352005c cmpne r2, #92 ; 0x5c 7fc4: 0a000002 beq 7fd4 rtems_set_errno_and_return_minus_one( ENOENT ); 7fc8: eb000cf2 bl b398 <__errno> 7fcc: e3a03002 mov r3, #2 ; 0x2 7fd0: ea000014 b 8028 /* * 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++) { 7fd4: e5d02000 ldrb r2, [r0] 7fd8: e3520000 cmp r2, #0 ; 0x0 7fdc: e2800001 add r0, r0, #1 ; 0x1 7fe0: 1afffff5 bne 7fbc /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 7fe4: e1a00005 mov r0, r5 7fe8: ebfffe5f bl 796c /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 7fec: e5953000 ldr r3, [r5] 7ff0: e593304c ldr r3, [r3, #76] 7ff4: e3530001 cmp r3, #1 ; 0x1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 7ff8: e1a04000 mov r4, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 7ffc: 0a000002 beq 800c rtems_set_errno_and_return_minus_one( ENOTDIR ); 8000: eb000ce4 bl b398 <__errno> 8004: e3a03014 mov r3, #20 ; 0x14 8008: ea000006 b 8028 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 800c: e1a00005 mov r0, r5 8010: e3a01003 mov r1, #3 ; 0x3 8014: ebfffe6e bl 79d4 8018: e3500000 cmp r0, #0 ; 0x0 801c: 1a000003 bne 8030 rtems_set_errno_and_return_minus_one( EACCES ); 8020: eb000cdc bl b398 <__errno> 8024: e3a0300d mov r3, #13 ; 0xd 8028: e5803000 str r3, [r0] 802c: e3e04000 mvn r4, #0 ; 0x0 return result; } 8030: e1a00004 mov r0, r4 8034: e28dd038 add sp, sp, #56 ; 0x38 8038: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 803c: 000149b8 .word 0x000149b8 00007a24 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 7a24: e5902000 ldr r2, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 7a28: e592304c ldr r3, [r2, #76] 7a2c: e3530003 cmp r3, #3 ; 0x3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7a30: e92d4030 push {r4, r5, lr} 7a34: e1a04000 mov r4, r0 7a38: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 7a3c: 159f0038 ldrne r0, [pc, #56] ; 7a7c 7a40: 1bfff3ee blne 4a00 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 7a44: e5923050 ldr r3, [r2, #80] 7a48: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 7a4c: ebffffc6 bl 796c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 7a50: e1a00004 mov r0, r4 7a54: e1a01005 mov r1, r5 7a58: ebffffdd bl 79d4 7a5c: e3500000 cmp r0, #0 ; 0x0 7a60: 13a00000 movne r0, #0 ; 0x0 7a64: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 7a68: eb000e4a bl b398 <__errno> <== NOT EXECUTED 7a6c: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 7a70: e5803000 str r3, [r0] <== NOT EXECUTED 7a74: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED return result; } 7a78: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 7a7c: abcd0000 .word 0xabcd0000 00007a80 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7a80: e92d4070 push {r4, r5, r6, lr} 7a84: e1a04000 mov r4, r0 IMFS_jnode_t *jnode = node->node_access; 7a88: e5900000 ldr r0, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 7a8c: e590304c ldr r3, [r0, #76] 7a90: e3530004 cmp r3, #4 ; 0x4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7a94: e1a06001 mov r6, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 7a98: 159f00a0 ldrne r0, [pc, #160] ; 7b40 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 7a9c: 1a000003 bne 7ab0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 7aa0: e5903008 ldr r3, [r0, #8] 7aa4: e3530000 cmp r3, #0 ; 0x0 7aa8: 1a000001 bne 7ab4 rtems_fatal_error_occurred( 0xBAD00000 ); 7aac: e59f0090 ldr r0, [pc, #144] ; 7b44 <== NOT EXECUTED 7ab0: ebfff3d2 bl 4a00 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 7ab4: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 7ab8: e590c050 ldr ip, [r0, #80] 7abc: e5dc3000 ldrb r3, [ip] 7ac0: e353005c cmp r3, #92 ; 0x5c 7ac4: 1353002f cmpne r3, #47 ; 0x2f 7ac8: 13a02000 movne r2, #0 ; 0x0 7acc: 03a02001 moveq r2, #1 ; 0x1 7ad0: 0a000002 beq 7ae0 7ad4: e3530000 cmp r3, #0 ; 0x0 7ad8: 11a03002 movne r3, r2 7adc: 1a000005 bne 7af8 7ae0: e59f3060 ldr r3, [pc, #96] ; 7b48 7ae4: e5933000 ldr r3, [r3] 7ae8: e2833014 add r3, r3, #20 ; 0x14 7aec: e893000f ldm r3, {r0, r1, r2, r3} 7af0: e884000f stm r4, {r0, r1, r2, r3} 7af4: e3a03001 mov r3, #1 ; 0x1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 7af8: e08c0003 add r0, ip, r3 7afc: e1a02004 mov r2, r4 7b00: e1a01006 mov r1, r6 7b04: eb000010 bl 7b4c 7b08: e1a05000 mov r5, r0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 7b0c: e1a00004 mov r0, r4 7b10: ebffff95 bl 796c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 7b14: e1a00004 mov r0, r4 7b18: e1a01006 mov r1, r6 7b1c: ebffffac bl 79d4 7b20: e3500000 cmp r0, #0 ; 0x0 7b24: 1a000003 bne 7b38 rtems_set_errno_and_return_minus_one( EACCES ); 7b28: eb000e1a bl b398 <__errno> <== NOT EXECUTED 7b2c: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED 7b30: e5803000 str r3, [r0] <== NOT EXECUTED 7b34: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED return result; } 7b38: e1a00005 mov r0, r5 7b3c: e8bd8070 pop {r4, r5, r6, pc} 7b40: abcd0000 .word 0xabcd0000 7b44: bad00000 .word 0xbad00000 7b48: 000149b8 .word 0x000149b8 0001ac6c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 1ac6c: 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; 1ac70: e1a03000 mov r3, r0 1ac74: e5b34018 ldr r4, [r3, #24]! ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 1ac78: e1a0e000 mov lr, r0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 1ac7c: e893000f ldm r3, {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 ) { 1ac80: 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; 1ac84: 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; 1ac88: e3a03000 mov r3, #0 ; 0x0 1ac8c: e58e3018 str r3, [lr, #24] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 1ac90: e1a0500d mov r5, sp 1ac94: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 1ac98: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 1ac9c: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 1aca0: ebfffe3a bl 1a590 if ( jnode->type != IMFS_DIRECTORY ) { 1aca4: e594304c ldr r3, [r4, #76] 1aca8: e3530001 cmp r3, #1 ; 0x1 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 1acac: e2842054 add r2, r4, #84 ; 0x54 do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { 1acb0: 1a000002 bne 1acc0 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 1acb4: e5943050 ldr r3, [r4, #80] 1acb8: e1530002 cmp r3, r2 1acbc: 1a000004 bne 1acd4 result = IMFS_unlink( &loc ); 1acc0: e1a0000d mov r0, sp 1acc4: ebffa2b0 bl 378c if (result != 0) 1acc8: e3500000 cmp r0, #0 ; 0x0 1accc: 1a00000c bne 1ad04 1acd0: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { 1acd4: e3540000 cmp r4, #0 ; 0x0 1acd8: 0a00000b beq 1ad0c if ( jnode->type == IMFS_DIRECTORY ) { 1acdc: e594304c ldr r3, [r4, #76] 1ace0: e3530001 cmp r3, #1 ; 0x1 1ace4: 1affffea bne 1ac94 if ( jnode_has_children( jnode ) ) 1ace8: e5942050 ldr r2, [r4, #80] 1acec: e2843054 add r3, r4, #84 ; 0x54 1acf0: e1520003 cmp r2, r3 1acf4: 0affffe6 beq 1ac94 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 1acf8: e2524000 subs r4, r2, #0 ; 0x0 1acfc: 1affffe4 bne 1ac94 1ad00: ea000001 b 1ad0c <== NOT EXECUTED 1ad04: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1ad08: ea000000 b 1ad10 <== NOT EXECUTED 1ad0c: e3a00000 mov r0, #0 ; 0x0 return 0; } 1ad10: e28dd010 add sp, sp, #16 ; 0x10 1ad14: e8bd8070 pop {r4, r5, r6, pc} 000081b0 : 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 ) { 81b0: e92d45f0 push {r4, r5, r6, r7, r8, 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, 81b4: e59fc0e4 ldr ip, [pc, #228] ; 82a0 81b8: e59cc000 ldr ip, [ip] rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 81bc: e1a07003 mov r7, r3 81c0: e24dd004 sub sp, sp, #4 ; 0x4 81c4: e1a05000 mov r5, r0 81c8: e1a08001 mov r8, r1 81cc: e1a0a002 mov sl, r2 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 81d0: e3a0e010 mov lr, #16 ; 0x10 81d4: e3a03000 mov r3, #0 ; 0x0 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 81d8: e15e000c cmp lr, ip bit_mask <<= 1) { 81dc: e2833001 add r3, r3, #1 ; 0x1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 81e0: 0a000003 beq 81f4 81e4: e3530006 cmp r3, #6 ; 0x6 bit_mask <<= 1) { 81e8: e1a0e08e lsl lr, lr, #1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 81ec: 1afffff9 bne 81d8 81f0: 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) 81f4: e59fc0a8 ldr ip, [pc, #168] ; 82a4 * 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( 81f8: e3a06000 mov r6, #0 ; 0x0 bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 81fc: 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( 8200: e3a01001 mov r1, #1 ; 0x1 8204: e59f209c ldr r2, [pc, #156] ; 82a8 8208: e59f309c ldr r3, [pc, #156] ; 82ac 820c: e1a00006 mov r0, r6 8210: e58d6000 str r6, [sp] 8214: eb000987 bl a838 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; 8218: e59f3090 ldr r3, [pc, #144] ; 82b0 821c: e1a04003 mov r4, r3 * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_node( 8220: e5850018 str r0, [r5, #24] NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8224: e8b4000f ldm r4!, {r0, r1, r2, r3} 8228: e285c030 add ip, r5, #48 ; 0x30 822c: e8ac000f stmia ip!, {r0, r1, r2, r3} 8230: e8b4000f ldm r4!, {r0, r1, r2, r3} 8234: e8ac000f stmia ip!, {r0, r1, r2, r3} 8238: 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; 823c: e5858020 str r8, [r5, #32] temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8240: e88c000f stm ip, {r0, r1, r2, r3} "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 8244: e585701c str r7, [r5, #28] temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 8248: e3a00001 mov r0, #1 ; 0x1 824c: e3a0100c mov r1, #12 ; 0xc 8250: eb0000f2 bl 8620 if ( !fs_info ){ 8254: e3500000 cmp r0, #0 ; 0x0 8258: 1a000006 bne 8278 free(temp_mt_entry->mt_fs_root.node_access); 825c: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 8260: eb00012b bl 8714 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8264: eb000c4b bl b398 <__errno> <== NOT EXECUTED 8268: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 826c: e5803000 str r3, [r0] <== NOT EXECUTED 8270: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8274: ea000007 b 8298 <== NOT EXECUTED fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8278: e5952018 ldr r2, [r5, #24] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 827c: e3a03001 mov r3, #1 ; 0x1 8280: 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; 8284: 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; 8288: e5807008 str r7, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 828c: e580a004 str sl, [r0, #4] fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ){ free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 8290: e585002c str r0, [r5, #44] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8294: e1a00006 mov r0, r6 return 0; } 8298: e28dd004 add sp, sp, #4 ; 0x4 829c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 82a0: 000143e8 .word 0x000143e8 82a4: 00016014 .word 0x00016014 82a8: df .byte 0xdf 82a9: 59 .byte 0x59 82aa: 0001 .short 0x0001 82ac: 000041ed .word 0x000041ed 82b0: 00015488 .word 0x00015488 0000352c : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 352c: e92d4030 push {r4, r5, lr} /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 3530: e5903000 ldr r3, [r0] int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 3534: e24dd044 sub sp, sp, #68 ; 0x44 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 3538: e58d3028 str r3, [sp, #40] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 353c: e1d333b4 ldrh r3, [r3, #52] 3540: 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 */ ) { 3544: e1a05001 mov r5, r1 3548: 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 ) 354c: 9a000002 bls 355c rtems_set_errno_and_return_minus_one( EMLINK ); 3550: eb009ad0 bl 2a098 <__errno> 3554: e3a0301f mov r3, #31 ; 0x1f 3558: ea00000e b 3598 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 355c: e28d4007 add r4, sp, #7 ; 0x7 3560: e1a01004 mov r1, r4 3564: e28d2040 add r2, sp, #64 ; 0x40 3568: ebffff73 bl 333c /* * Create a new link node. */ new_node = IMFS_create_node( 356c: e28dc028 add ip, sp, #40 ; 0x28 3570: e1a00005 mov r0, r5 3574: e1a02004 mov r2, r4 3578: e3a01003 mov r1, #3 ; 0x3 357c: e59f3054 ldr r3, [pc, #84] ; 35d8 3580: e58dc000 str ip, [sp] 3584: eb005ba3 bl 1a418 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 3588: e3500000 cmp r0, #0 ; 0x0 358c: 1a000004 bne 35a4 rtems_set_errno_and_return_minus_one( ENOMEM ); 3590: eb009ac0 bl 2a098 <__errno> <== NOT EXECUTED 3594: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3598: e5803000 str r3, [r0] 359c: e3e00000 mvn r0, #0 ; 0x0 35a0: ea00000a b 35d0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 35a4: e59d2028 ldr r2, [sp, #40] 35a8: e1d233b4 ldrh r3, [r2, #52] 35ac: e2833001 add r3, r3, #1 ; 0x1 35b0: e1c233b4 strh r3, [r2, #52] IMFS_update_ctime( info.hard_link.link_node ); 35b4: e28d0038 add r0, sp, #56 ; 0x38 35b8: e3a01000 mov r1, #0 ; 0x0 35bc: eb00021a bl 3e2c 35c0: e59d2038 ldr r2, [sp, #56] 35c4: e59d3028 ldr r3, [sp, #40] 35c8: e5832048 str r2, [r3, #72] 35cc: e3a00000 mov r0, #0 ; 0x0 return 0; } 35d0: e28dd044 add sp, sp, #68 ; 0x44 35d4: e8bd8030 pop {r4, r5, pc} 35d8: 0000a1ff .word 0x0000a1ff 00022008 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 22008: e2503000 subs r3, r0, #0 ; 0x0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 2200c: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 22010: 059f0060 ldreq r0, [pc, #96] ; 22078 22014: 059f1060 ldreq r1, [pc, #96] ; 2207c 22018: 059f2060 ldreq r2, [pc, #96] ; 22080 2201c: 059f3060 ldreq r3, [pc, #96] ; 22084 22020: 0a000006 beq 22040 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 22024: e593304c ldr r3, [r3, #76] 22028: e3530005 cmp r3, #5 ; 0x5 2202c: 0a000004 beq 22044 22030: e59f0040 ldr r0, [pc, #64] ; 22078 <== NOT EXECUTED 22034: e59f104c ldr r1, [pc, #76] ; 22088 <== NOT EXECUTED 22038: e59f2040 ldr r2, [pc, #64] ; 22080 <== NOT EXECUTED 2203c: e59f3048 ldr r3, [pc, #72] ; 2208c <== NOT EXECUTED 22040: ebffe3cf bl 1af84 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 22044: e3a02001 mov r2, #1 ; 0x1 22048: ebfffeab bl 21afc if ( *block_entry_ptr ) 2204c: e5905000 ldr r5, [r0] 22050: 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 ); 22054: e1a04000 mov r4, r0 if ( *block_entry_ptr ) 22058: 13a00000 movne r0, #0 ; 0x0 2205c: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 22060: ebfffe98 bl 21ac8 if ( !memory ) 22064: e3500000 cmp r0, #0 ; 0x0 return 1; *block_entry_ptr = memory; 22068: 15840000 strne r0, [r4] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 2206c: 03a00001 moveq r0, #1 ; 0x1 return 1; *block_entry_ptr = memory; 22070: 11a00005 movne r0, r5 return 0; } 22074: e8bd8030 pop {r4, r5, pc} 22078: 000415d6 .word 0x000415d6 2207c: 00000169 .word 0x00000169 22080: 0003e385 .word 0x0003e385 22084: 0004161f .word 0x0004161f 22088: 0000016d .word 0x0000016d 2208c: 00041629 .word 0x00041629 00022090 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 22090: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 22094: e2507000 subs r7, r0, #0 ; 0x0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 22098: e1a06001 mov r6, r1 /* * Perform internal consistency checks */ assert( the_jnode ); 2209c: 059f00f8 ldreq r0, [pc, #248] ; 2219c 220a0: 059f10f8 ldreq r1, [pc, #248] ; 221a0 220a4: 059f20f8 ldreq r2, [pc, #248] ; 221a4 220a8: 059f30f8 ldreq r3, [pc, #248] ; 221a8 220ac: 0a000006 beq 220cc if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 220b0: e597304c ldr r3, [r7, #76] 220b4: e3530005 cmp r3, #5 ; 0x5 220b8: 0a000004 beq 220d0 220bc: e59f00d8 ldr r0, [pc, #216] ; 2219c <== NOT EXECUTED 220c0: e59f10e4 ldr r1, [pc, #228] ; 221ac <== NOT EXECUTED 220c4: e59f20d8 ldr r2, [pc, #216] ; 221a4 <== NOT EXECUTED 220c8: e59f30e0 ldr r3, [pc, #224] ; 221b0 <== NOT EXECUTED 220cc: ebffe3ac bl 1af84 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 220d0: e59f30dc ldr r3, [pc, #220] ; 221b4 220d4: e5934000 ldr r4, [r3] 220d8: e1a02124 lsr r2, r4, #2 220dc: e2823001 add r3, r2, #1 ; 0x1 220e0: e0030392 mul r3, r2, r3 220e4: e2833001 add r3, r3, #1 ; 0x1 220e8: e0030392 mul r3, r2, r3 220ec: e2433001 sub r3, r3, #1 ; 0x1 220f0: e0030394 mul r3, r4, r3 220f4: e1510003 cmp r1, r3 220f8: 3a000002 bcc 22108 rtems_set_errno_and_return_minus_one( EINVAL ); 220fc: eb001fe5 bl 2a098 <__errno> <== NOT EXECUTED 22100: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 22104: ea00001b b 22178 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 22108: e5975050 ldr r5, [r7, #80] 2210c: e1510005 cmp r1, r5 22110: d3a00000 movle r0, #0 ; 0x0 22114: 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; 22118: e1a00001 mov r0, r1 2211c: e1a01004 mov r1, r4 22120: eb0060a2 bl 3a3b0 <__aeabi_idiv> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 22124: e1a01004 mov r1, r4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 22128: e1a08000 mov r8, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 2212c: e1a00005 mov r0, r5 22130: eb00609e bl 3a3b0 <__aeabi_idiv> 22134: e1a05000 mov r5, r0 22138: e1a04000 mov r4, r0 2213c: ea000011 b 22188 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 22140: e1a00007 mov r0, r7 22144: e1a01004 mov r1, r4 22148: ebffffae bl 22008 2214c: e3500000 cmp r0, #0 ; 0x0 22150: 0a00000b beq 22184 22154: ea000003 b 22168 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 22158: e1a01004 mov r1, r4 <== NOT EXECUTED 2215c: e1a00007 mov r0, r7 <== NOT EXECUTED 22160: ebfffef4 bl 21d38 <== 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-- ) { 22164: e2444001 sub r4, r4, #1 ; 0x1 <== NOT EXECUTED 22168: e1540005 cmp r4, r5 <== NOT EXECUTED 2216c: 2afffff9 bcs 22158 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 22170: eb001fc8 bl 2a098 <__errno> <== NOT EXECUTED 22174: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 22178: e5803000 str r3, [r0] <== NOT EXECUTED 2217c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 22180: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 22184: e2844001 add r4, r4, #1 ; 0x1 22188: e1540008 cmp r4, r8 2218c: 9affffeb bls 22140 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 22190: e5876050 str r6, [r7, #80] 22194: e3a00000 mov r0, #0 ; 0x0 return 0; } 22198: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 2219c: 000415d6 .word 0x000415d6 221a0: 00000131 .word 0x00000131 221a4: 0003e39b .word 0x0003e39b 221a8: 161f .short 0x161f 221aa: 04 .byte 0x04 221ab: 00 .byte 0x00 221ac: 00000135 .word 0x00000135 221b0: 00041629 .word 0x00041629 221b4: 00043454 .word 0x00043454 00021afc : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 21afc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 21b00: e2507000 subs r7, r0, #0 ; 0x0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 21b04: e1a04001 mov r4, r1 21b08: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); 21b0c: 059f0208 ldreq r0, [pc, #520] ; 21d1c 21b10: 059f1208 ldreq r1, [pc, #520] ; 21d20 21b14: 059f2208 ldreq r2, [pc, #520] ; 21d24 21b18: 059f3208 ldreq r3, [pc, #520] ; 21d28 21b1c: 0a000006 beq 21b3c if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 21b20: e597304c ldr r3, [r7, #76] 21b24: e3530005 cmp r3, #5 ; 0x5 21b28: 0a000004 beq 21b40 21b2c: e59f01e8 ldr r0, [pc, #488] ; 21d1c <== NOT EXECUTED 21b30: e59f11f4 ldr r1, [pc, #500] ; 21d2c <== NOT EXECUTED 21b34: e59f21e8 ldr r2, [pc, #488] ; 21d24 <== NOT EXECUTED 21b38: e59f31f0 ldr r3, [pc, #496] ; 21d30 <== NOT EXECUTED 21b3c: ebffe510 bl 1af84 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 21b40: e59f31ec ldr r3, [pc, #492] ; 21d34 21b44: e5933000 ldr r3, [r3] 21b48: e1a05123 lsr r5, r3, #2 21b4c: e2453001 sub r3, r5, #1 ; 0x1 21b50: e1510003 cmp r1, r3 21b54: 8a00000f bhi 21b98 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 21b58: e3520000 cmp r2, #0 ; 0x0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 21b5c: e5970054 ldr r0, [r7, #84] if ( malloc_it ) { 21b60: 0a000008 beq 21b88 if ( !p ) { 21b64: e3500000 cmp r0, #0 ; 0x0 21b68: 1a000003 bne 21b7c p = memfile_alloc_block(); 21b6c: ebffffd5 bl 21ac8 if ( !p ) 21b70: e3500000 cmp r0, #0 ; 0x0 21b74: 0a000066 beq 21d14 return 0; info->indirect = p; 21b78: e5870054 str r0, [r7, #84] } return &info->indirect[ my_block ]; 21b7c: e5973054 ldr r3, [r7, #84] 21b80: e0830104 add r0, r3, r4, lsl #2 21b84: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } if ( !p ) 21b88: e3500000 cmp r0, #0 ; 0x0 return 0; return &info->indirect[ my_block ]; 21b8c: 10800101 addne r0, r0, r1, lsl #2 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 21b90: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} 21b94: ea00005e b 21d14 <== NOT EXECUTED /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 21b98: e2853001 add r3, r5, #1 ; 0x1 <== NOT EXECUTED 21b9c: e0000395 mul r0, r5, r3 <== NOT EXECUTED 21ba0: e2403001 sub r3, r0, #1 ; 0x1 <== NOT EXECUTED 21ba4: e1510003 cmp r1, r3 <== NOT EXECUTED 21ba8: 8a000022 bhi 21c38 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 21bac: e0654001 rsb r4, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 21bb0: e1a00004 mov r0, r4 <== NOT EXECUTED 21bb4: e1a01005 mov r1, r5 <== NOT EXECUTED 21bb8: eb00624c bl 3a4f0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 21bbc: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 21bc0: e1a06000 mov r6, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 21bc4: e1a00004 mov r0, r4 <== NOT EXECUTED 21bc8: eb0061b4 bl 3a2a0 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 21bcc: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 21bd0: e1a04000 mov r4, r0 <== NOT EXECUTED p = info->doubly_indirect; 21bd4: e5970058 ldr r0, [r7, #88] <== NOT EXECUTED if ( malloc_it ) { 21bd8: 0a00000f beq 21c1c <== NOT EXECUTED if ( !p ) { 21bdc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 21be0: 1a000003 bne 21bf4 <== NOT EXECUTED p = memfile_alloc_block(); 21be4: ebffffb7 bl 21ac8 <== NOT EXECUTED if ( !p ) 21be8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 21bec: 0a000048 beq 21d14 <== NOT EXECUTED return 0; info->doubly_indirect = p; 21bf0: e5870058 str r0, [r7, #88] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 21bf4: e7901104 ldr r1, [r0, r4, lsl #2] <== NOT EXECUTED if ( !p1 ) { 21bf8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 21bfc: e0804104 add r4, r0, r4, lsl #2 <== NOT EXECUTED if ( !p1 ) { 21c00: 1a000003 bne 21c14 <== NOT EXECUTED p1 = memfile_alloc_block(); 21c04: ebffffaf bl 21ac8 <== NOT EXECUTED if ( !p1 ) 21c08: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 21c0c: 0a000040 beq 21d14 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 21c10: e5841000 str r1, [r4] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 21c14: e0810106 add r0, r1, r6, lsl #2 <== NOT EXECUTED 21c18: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if ( !p ) 21c1c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 21c20: 0a00003b beq 21d14 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 21c24: e7900104 ldr r0, [r0, r4, lsl #2] <== NOT EXECUTED if ( !p ) 21c28: 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 ]; 21c2c: 10800106 addne r0, r0, r6, lsl #2 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 21c30: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 21c34: ea000036 b 21d14 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 21c38: e2803001 add r3, r0, #1 ; 0x1 <== NOT EXECUTED 21c3c: e0030395 mul r3, r5, r3 <== NOT EXECUTED 21c40: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 21c44: e1510003 cmp r1, r3 <== NOT EXECUTED 21c48: 8a000031 bhi 21d14 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 21c4c: e0604001 rsb r4, r0, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 21c50: e1a00004 mov r0, r4 <== NOT EXECUTED 21c54: e1a01005 mov r1, r5 <== NOT EXECUTED 21c58: eb006224 bl 3a4f0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 21c5c: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 21c60: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 21c64: e1a00004 mov r0, r4 <== NOT EXECUTED 21c68: eb00618c bl 3a2a0 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 21c6c: 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; 21c70: e1a04000 mov r4, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 21c74: eb006189 bl 3a2a0 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 21c78: 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; 21c7c: e1a06000 mov r6, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 21c80: e1a00004 mov r0, r4 <== NOT EXECUTED 21c84: eb006219 bl 3a4f0 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 21c88: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 21c8c: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; 21c90: e597005c ldr r0, [r7, #92] <== NOT EXECUTED if ( malloc_it ) { 21c94: 0a000017 beq 21cf8 <== NOT EXECUTED if ( !p ) { 21c98: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 21c9c: 1a000003 bne 21cb0 <== NOT EXECUTED p = memfile_alloc_block(); 21ca0: ebffff88 bl 21ac8 <== NOT EXECUTED if ( !p ) 21ca4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 21ca8: 0a000019 beq 21d14 <== NOT EXECUTED return 0; info->triply_indirect = p; 21cac: e587005c str r0, [r7, #92] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 21cb0: e7903106 ldr r3, [r0, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) { 21cb4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 21cb8: e0804106 add r4, r0, r6, lsl #2 <== NOT EXECUTED if ( !p1 ) { 21cbc: 1a000003 bne 21cd0 <== NOT EXECUTED p1 = memfile_alloc_block(); 21cc0: ebffff80 bl 21ac8 <== NOT EXECUTED if ( !p1 ) 21cc4: e2503000 subs r3, r0, #0 ; 0x0 <== NOT EXECUTED 21cc8: 0a000011 beq 21d14 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 21ccc: e5843000 str r3, [r4] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 21cd0: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) { 21cd4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 21cd8: e0834105 add r4, r3, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { 21cdc: 1a000003 bne 21cf0 <== NOT EXECUTED p2 = memfile_alloc_block(); 21ce0: ebffff78 bl 21ac8 <== NOT EXECUTED if ( !p2 ) 21ce4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 21ce8: 0a000009 beq 21d14 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 21cec: e5840000 str r0, [r4] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 21cf0: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED 21cf4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if ( !p ) 21cf8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 21cfc: 0a000004 beq 21d14 <== 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 ]; 21d00: e7900106 ldr r0, [r0, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) 21d04: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 21d08: 17903105 ldrne r3, [r0, r5, lsl #2] <== NOT EXECUTED 21d0c: 1083010a addne r0, r3, sl, lsl #2 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; if ( !p1 ) 21d10: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 21d14: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 21d18: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 21d1c: 000415d6 .word 0x000415d6 21d20: 00000386 .word 0x00000386 21d24: 0003e310 .word 0x0003e310 21d28: 0004161f .word 0x0004161f 21d2c: 0000038a .word 0x0000038a 21d30: 00041629 .word 0x00041629 21d34: 00043454 .word 0x00043454 0002253c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 2253c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 22540: e250a000 subs sl, r0, #0 ; 0x0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 22544: e24dd008 sub sp, sp, #8 ; 0x8 22548: e1a06001 mov r6, r1 2254c: e1a08002 mov r8, r2 22550: e1a00003 mov r0, r3 /* * Perform internal consistency checks */ assert( the_jnode ); 22554: 059f0204 ldreq r0, [pc, #516] ; 22760 22558: 059f1204 ldreq r1, [pc, #516] ; 22764 2255c: 059f2204 ldreq r2, [pc, #516] ; 22768 22560: 059f3204 ldreq r3, [pc, #516] ; 2276c 22564: 0a000007 beq 22588 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 22568: e59a204c ldr r2, [sl, #76] 2256c: e2423005 sub r3, r2, #5 ; 0x5 22570: e3530001 cmp r3, #1 ; 0x1 22574: 9a000004 bls 2258c 22578: e59f01e0 ldr r0, [pc, #480] ; 22760 <== NOT EXECUTED 2257c: e59f11ec ldr r1, [pc, #492] ; 22770 <== NOT EXECUTED 22580: e59f21e0 ldr r2, [pc, #480] ; 22768 <== NOT EXECUTED 22584: e59f31e8 ldr r3, [pc, #488] ; 22774 <== NOT EXECUTED 22588: ebffe27d bl 1af84 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 2258c: e3580000 cmp r8, #0 ; 0x0 22590: 059f01c8 ldreq r0, [pc, #456] ; 22760 22594: 03a01f96 moveq r1, #600 ; 0x258 22598: 059f21c8 ldreq r2, [pc, #456] ; 22768 2259c: 059f31d4 ldreq r3, [pc, #468] ; 22778 225a0: 0afffff8 beq 22588 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 225a4: e3500000 cmp r0, #0 ; 0x0 225a8: 1a000004 bne 225c0 rtems_set_errno_and_return_minus_one( EINVAL ); 225ac: eb001eb9 bl 2a098 <__errno> <== NOT EXECUTED 225b0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 225b4: e5803000 str r3, [r0] <== NOT EXECUTED 225b8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 225bc: ea000065 b 22758 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 225c0: e3520006 cmp r2, #6 ; 0x6 225c4: 1a00000f bne 22608 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 225c8: e59a4050 ldr r4, [sl, #80] <== NOT EXECUTED 225cc: e0614004 rsb r4, r1, r4 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 225d0: 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)) 225d4: e1540000 cmp r4, r0 <== NOT EXECUTED 225d8: 21a04000 movcs r4, r0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 225dc: e0811006 add r1, r1, r6 <== NOT EXECUTED 225e0: e1a02004 mov r2, r4 <== NOT EXECUTED 225e4: e1a00008 mov r0, r8 <== NOT EXECUTED 225e8: eb002822 bl 2c678 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 225ec: e1a0000d mov r0, sp <== NOT EXECUTED 225f0: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 225f4: ebff860c bl 3e2c <== NOT EXECUTED 225f8: e59d3000 ldr r3, [sp] <== NOT EXECUTED return my_length; 225fc: e1a00004 mov r0, r4 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); IMFS_update_atime( the_jnode ); 22600: e58a3040 str r3, [sl, #64] <== NOT EXECUTED 22604: ea000053 b 22758 <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 22608: e59a2050 ldr r2, [sl, #80] 2260c: e0803001 add r3, r0, r1 22610: e1530002 cmp r3, r2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 22614: e59f3160 ldr r3, [pc, #352] ; 2277c 22618: e5934000 ldr r4, [r3] * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 2261c: 91a07000 movls r7, r0 my_length = the_jnode->info.file.size - start; 22620: 80617002 rsbhi r7, r1, r2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 22624: e1a00001 mov r0, r1 22628: e1a01004 mov r1, r4 2262c: eb005fe2 bl 3a5bc <__modsi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 22630: e1a01004 mov r1, r4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 22634: e1a05000 mov r5, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 22638: e1a00006 mov r0, r6 2263c: eb005f5b bl 3a3b0 <__aeabi_idiv> if ( start_offset ) { 22640: e3550000 cmp r5, #0 ; 0x0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 22644: e1a06000 mov r6, r0 if ( start_offset ) { 22648: 0a000013 beq 2269c 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 ); 2264c: e1a01006 mov r1, r6 22650: e1a0000a mov r0, sl 22654: e3a02000 mov r2, #0 ; 0x0 22658: ebfffd27 bl 21afc assert( block_ptr ); 2265c: e3500000 cmp r0, #0 ; 0x0 22660: 059f00f8 ldreq r0, [pc, #248] ; 22760 22664: 03a01fa5 moveq r1, #660 ; 0x294 22668: 0a00002c beq 22720 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 2266c: 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; 22670: e0654004 rsb r4, r5, r4 22674: e1570004 cmp r7, r4 22678: 31a04007 movcc r4, r7 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 2267c: e0811005 add r1, r1, r5 22680: e1a00008 mov r0, r8 22684: e1a02004 mov r2, r4 22688: eb0027fa bl 2c678 dest += to_copy; 2268c: e0888004 add r8, r8, r4 block++; 22690: e2866001 add r6, r6, #1 ; 0x1 my_length -= to_copy; 22694: e0647007 rsb r7, r4, r7 22698: e1a05004 mov r5, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 2269c: e59f30d8 ldr r3, [pc, #216] ; 2277c while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 226a0: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 226a4: e5934000 ldr r4, [r3] 226a8: ea00000f b 226ec while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 226ac: e1a0000a mov r0, sl 226b0: e1a01006 mov r1, r6 226b4: e3a02000 mov r2, #0 ; 0x0 226b8: ebfffd0f bl 21afc assert( block_ptr ); 226bc: e3500000 cmp r0, #0 ; 0x0 226c0: 059f0098 ldreq r0, [pc, #152] ; 22760 226c4: 059f10b4 ldreq r1, [pc, #180] ; 22780 226c8: 0a000014 beq 22720 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 226cc: e5901000 ldr r1, [r0] 226d0: e1a02004 mov r2, r4 226d4: e1a00008 mov r0, r8 226d8: eb0027e6 bl 2c678 dest += to_copy; 226dc: e0888004 add r8, r8, r4 block++; 226e0: e2866001 add r6, r6, #1 ; 0x1 my_length -= to_copy; 226e4: e0647007 rsb r7, r4, r7 copied += to_copy; 226e8: e0855004 add r5, r5, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 226ec: e5993000 ldr r3, [r9] 226f0: e1570003 cmp r7, r3 226f4: 2affffec bcs 226ac * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 226f8: e3570000 cmp r7, #0 ; 0x0 226fc: 0a00000f beq 22740 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 22700: e1a01006 mov r1, r6 22704: e1a0000a mov r0, sl 22708: e3a02000 mov r2, #0 ; 0x0 2270c: ebfffcfa bl 21afc assert( block_ptr ); 22710: e2501000 subs r1, r0, #0 ; 0x0 22714: 1a000004 bne 2272c 22718: e59f0040 ldr r0, [pc, #64] ; 22760 <== NOT EXECUTED 2271c: e59f1060 ldr r1, [pc, #96] ; 22784 <== NOT EXECUTED 22720: e59f2040 ldr r2, [pc, #64] ; 22768 <== NOT EXECUTED 22724: e59f305c ldr r3, [pc, #92] ; 22788 <== NOT EXECUTED 22728: eaffff96 b 22588 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 2272c: e1a00008 mov r0, r8 22730: e5911000 ldr r1, [r1] 22734: e1a02007 mov r2, r7 22738: eb0027ce bl 2c678 copied += my_length; 2273c: e0875005 add r5, r7, r5 } IMFS_update_atime( the_jnode ); 22740: e1a0000d mov r0, sp 22744: e3a01000 mov r1, #0 ; 0x0 22748: ebff85b7 bl 3e2c 2274c: e59d3000 ldr r3, [sp] 22750: e58a3040 str r3, [sl, #64] return copied; 22754: e1a00005 mov r0, r5 } 22758: e28dd008 add sp, sp, #8 ; 0x8 2275c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 22760: 000415d6 .word 0x000415d6 22764: 0000024a .word 0x0000024a 22768: 0003e342 .word 0x0003e342 2276c: 0004161f .word 0x0004161f 22770: 0000024f .word 0x0000024f 22774: 0004168c .word 0x0004168c 22778: 000416d7 .word 0x000416d7 2277c: 00043454 .word 0x00043454 22780: 000002a5 .word 0x000002a5 22784: 000002b7 .word 0x000002b7 22788: 00041659 .word 0x00041659 00021ddc : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 21ddc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 21de0: e2506000 subs r6, r0, #0 ; 0x0 21de4: 059f0130 ldreq r0, [pc, #304] ; 21f1c 21de8: 03a01f7b moveq r1, #492 ; 0x1ec 21dec: 059f212c ldreq r2, [pc, #300] ; 21f20 21df0: 059f312c ldreq r3, [pc, #300] ; 21f24 21df4: 0a000006 beq 21e14 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 21df8: e596304c ldr r3, [r6, #76] 21dfc: e3530005 cmp r3, #5 ; 0x5 21e00: 0a000004 beq 21e18 21e04: e59f0110 ldr r0, [pc, #272] ; 21f1c <== NOT EXECUTED 21e08: e59f2110 ldr r2, [pc, #272] ; 21f20 <== NOT EXECUTED 21e0c: e59f3114 ldr r3, [pc, #276] ; 21f28 <== NOT EXECUTED 21e10: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED 21e14: ebffe45a bl 1af84 <__assert_func> <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 21e18: e59f210c ldr r2, [pc, #268] ; 21f2c * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 21e1c: e5963054 ldr r3, [r6, #84] /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 21e20: e5922000 ldr r2, [r2] * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 21e24: 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; 21e28: e1a08122 lsr r8, r2, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 21e2c: 12860054 addne r0, r6, #84 ; 0x54 21e30: 11a01008 movne r1, r8 21e34: 1bffffc9 blne 21d60 } if ( info->doubly_indirect ) { 21e38: e5963058 ldr r3, [r6, #88] 21e3c: e3530000 cmp r3, #0 ; 0x0 21e40: 13a04000 movne r4, #0 ; 0x0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 21e48: 1a000008 bne 21e70 21e4c: ea00000d b 21e88 for ( i=0 ; idoubly_indirect[i] ) { 21e50: e5960058 ldr r0, [r6, #88] <== NOT EXECUTED 21e54: e7903104 ldr r3, [r0, r4, lsl #2] <== NOT EXECUTED 21e58: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 21e5c: e1a03104 lsl r3, r4, #2 <== NOT EXECUTED memfile_free_blocks_in_table( 21e60: 10800003 addne r0, r0, r3 <== NOT EXECUTED 21e64: 11a01008 movne r1, r8 <== NOT EXECUTED 21e68: 1bffffbc blne 21d60 <== 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 ); 21e7c: e2860058 add r0, r6, #88 ; 0x58 <== NOT EXECUTED 21e80: e1a01008 mov r1, r8 <== NOT EXECUTED 21e84: ebffffb5 bl 21d60 <== NOT EXECUTED } if ( info->triply_indirect ) { 21e88: e596305c ldr r3, [r6, #92] 21e8c: e3530000 cmp r3, #0 ; 0x0 21e90: 13a07000 movne r7, #0 ; 0x0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 21e98: 1a000017 bne 21efc 21e9c: ea00001c b 21f14 for ( i=0 ; itriply_indirect[i]; 21ea0: e596305c ldr r3, [r6, #92] <== NOT EXECUTED 21ea4: e7930107 ldr r0, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 21ea8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 21eac: e1a0a107 lsl sl, r7, #2 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 21eb0: 0a000014 beq 21f08 <== NOT EXECUTED break; 21eb4: e1a04000 mov r4, r0 <== NOT EXECUTED 21eb8: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 21ebc: ea000006 b 21edc <== NOT EXECUTED for ( j=0 ; j <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 21ee8: e596005c ldr r0, [r6, #92] <== NOT EXECUTED 21eec: e1a01008 mov r1, r8 <== NOT EXECUTED 21ef0: e080000a add r0, r0, sl <== NOT EXECUTED 21ef4: ebffff99 bl 21d60 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 21f08: e286005c add r0, r6, #92 ; 0x5c <== NOT EXECUTED 21f0c: e1a01008 mov r1, r8 <== NOT EXECUTED 21f10: ebffff92 bl 21d60 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 21f14: e3a00000 mov r0, #0 ; 0x0 21f18: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 21f1c: 000415d6 .word 0x000415d6 21f20: 0003e354 .word 0x0003e354 21f24: 0004161f .word 0x0004161f 21f28: 00041629 .word 0x00041629 21f2c: 00043454 .word 0x00043454 00021d38 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 21d38: 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 ); 21d3c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 21d40: ebffff6d bl 21afc <== NOT EXECUTED ptr = *block_entry_ptr; 21d44: e5902000 ldr r2, [r0] <== NOT EXECUTED *block_entry_ptr = 0; 21d48: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 21d4c: e5803000 str r3, [r0] <== NOT EXECUTED memfile_free_block( ptr ); 21d50: e1a00002 mov r0, r2 <== NOT EXECUTED 21d54: ebffff53 bl 21aa8 <== NOT EXECUTED return 1; } 21d58: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 21d5c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00022268 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 22268: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 2226c: e2509000 subs r9, r0, #0 ; 0x0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 22270: e24dd008 sub sp, sp, #8 ; 0x8 22274: e1a05001 mov r5, r1 22278: e1a08002 mov r8, r2 2227c: e1a0a003 mov sl, r3 /* * Perform internal consistency checks */ assert( the_jnode ); 22280: 059f01d4 ldreq r0, [pc, #468] ; 2245c 22284: 059f11d4 ldreq r1, [pc, #468] ; 22460 22288: 059f21d4 ldreq r2, [pc, #468] ; 22464 2228c: 059f31d4 ldreq r3, [pc, #468] ; 22468 22290: 0a000006 beq 222b0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 22294: e599304c ldr r3, [r9, #76] 22298: e3530005 cmp r3, #5 ; 0x5 2229c: 0a000004 beq 222b4 222a0: e59f01b4 ldr r0, [pc, #436] ; 2245c <== NOT EXECUTED 222a4: e59f11c0 ldr r1, [pc, #448] ; 2246c <== NOT EXECUTED 222a8: e59f21b4 ldr r2, [pc, #436] ; 22464 <== NOT EXECUTED 222ac: e59f31bc ldr r3, [pc, #444] ; 22470 <== NOT EXECUTED 222b0: ebffe333 bl 1af84 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 222b4: e3520000 cmp r2, #0 ; 0x0 222b8: 059f019c ldreq r0, [pc, #412] ; 2245c 222bc: 059f11b0 ldreq r1, [pc, #432] ; 22474 222c0: 059f219c ldreq r2, [pc, #412] ; 22464 222c4: 059f31ac ldreq r3, [pc, #428] ; 22478 222c8: 0afffff8 beq 222b0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 222cc: e35a0000 cmp sl, #0 ; 0x0 222d0: 1a000002 bne 222e0 rtems_set_errno_and_return_minus_one( EINVAL ); 222d4: eb001f6f bl 2a098 <__errno> <== NOT EXECUTED 222d8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 222dc: ea000008 b 22304 <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 222e0: e5993050 ldr r3, [r9, #80] /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; 222e4: e08a1001 add r1, sl, r1 if ( last_byte > the_jnode->info.file.size ) { 222e8: e1510003 cmp r1, r3 222ec: 9a000007 bls 22310 status = IMFS_memfile_extend( the_jnode, last_byte ); 222f0: ebffff66 bl 22090 if ( status ) 222f4: e3500000 cmp r0, #0 ; 0x0 222f8: 0a000004 beq 22310 rtems_set_errno_and_return_minus_one( ENOSPC ); 222fc: eb001f65 bl 2a098 <__errno> <== NOT EXECUTED 22300: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 22304: e5803000 str r3, [r0] <== NOT EXECUTED 22308: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 2230c: ea00004f b 22450 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 22310: e59f3164 ldr r3, [pc, #356] ; 2247c 22314: e5934000 ldr r4, [r3] 22318: e1a00005 mov r0, r5 2231c: e1a01004 mov r1, r4 22320: eb0060a5 bl 3a5bc <__modsi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 22324: e1a01004 mov r1, r4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 22328: e1a06000 mov r6, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2232c: e1a00005 mov r0, r5 22330: eb00601e bl 3a3b0 <__aeabi_idiv> if ( start_offset ) { 22334: e3560000 cmp r6, #0 ; 0x0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 22338: e1a07000 mov r7, r0 if ( start_offset ) { 2233c: 01a0500a moveq r5, sl 22340: 01a04006 moveq r4, r6 22344: 0a000012 beq 22394 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 ); 22348: e1a00009 mov r0, r9 2234c: e1a01007 mov r1, r7 22350: e3a02000 mov r2, #0 ; 0x0 22354: ebfffde8 bl 21afc assert( block_ptr ); 22358: e3500000 cmp r0, #0 ; 0x0 2235c: 059f00f8 ldreq r0, [pc, #248] ; 2245c 22360: 059f1118 ldreq r1, [pc, #280] ; 22480 22364: 0a00002b beq 22418 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 ); 22368: 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; 2236c: e0664004 rsb r4, r6, r4 22370: e154000a cmp r4, sl 22374: 21a0400a movcs r4, sl if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 22378: e1a01008 mov r1, r8 2237c: e0800006 add r0, r0, r6 22380: e1a02004 mov r2, r4 22384: eb0028bb bl 2c678 src += to_copy; 22388: e0888004 add r8, r8, r4 block++; 2238c: e2877001 add r7, r7, #1 ; 0x1 my_length -= to_copy; 22390: e064500a rsb r5, r4, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 22394: e59f30e0 ldr r3, [pc, #224] ; 2247c while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 22398: e1a0a003 mov sl, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 2239c: e5936000 ldr r6, [r3] 223a0: ea00000f b 223e4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 223a4: e1a00009 mov r0, r9 223a8: e1a01007 mov r1, r7 223ac: e3a02000 mov r2, #0 ; 0x0 223b0: ebfffdd1 bl 21afc assert( block_ptr ); 223b4: e3500000 cmp r0, #0 ; 0x0 223b8: 059f009c ldreq r0, [pc, #156] ; 2245c 223bc: 059f10c0 ldreq r1, [pc, #192] ; 22484 223c0: 0a000014 beq 22418 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 ); 223c4: e1a01008 mov r1, r8 223c8: e5900000 ldr r0, [r0] 223cc: e1a02006 mov r2, r6 223d0: eb0028a8 bl 2c678 src += to_copy; 223d4: e0888006 add r8, r8, r6 block++; 223d8: e2877001 add r7, r7, #1 ; 0x1 my_length -= to_copy; 223dc: e0665005 rsb r5, r6, r5 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 223e0: e0844006 add r4, r4, r6 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 223e4: e59a3000 ldr r3, [sl] 223e8: e1550003 cmp r5, r3 223ec: 2affffec bcs 223a4 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 223f0: e3550000 cmp r5, #0 ; 0x0 223f4: 0a00000f beq 22438 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 223f8: e1a01007 mov r1, r7 223fc: e1a00009 mov r0, r9 22400: e3a02000 mov r2, #0 ; 0x0 22404: ebfffdbc bl 21afc assert( block_ptr ); 22408: e3500000 cmp r0, #0 ; 0x0 2240c: 1a000004 bne 22424 22410: e59f0044 ldr r0, [pc, #68] ; 2245c <== NOT EXECUTED 22414: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED 22418: e59f2044 ldr r2, [pc, #68] ; 22464 <== NOT EXECUTED 2241c: e59f3064 ldr r3, [pc, #100] ; 22488 <== NOT EXECUTED 22420: eaffffa2 b 222b0 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 22424: e5900000 ldr r0, [r0] 22428: e1a01008 mov r1, r8 2242c: e1a02005 mov r2, r5 22430: eb002890 bl 2c678 my_length = 0; copied += to_copy; 22434: e0844005 add r4, r4, r5 } IMFS_atime_mtime_update( the_jnode ); 22438: e1a0000d mov r0, sp 2243c: e3a01000 mov r1, #0 ; 0x0 22440: ebff8679 bl 3e2c 22444: e59d3000 ldr r3, [sp] 22448: e5893040 str r3, [r9, #64] 2244c: e5893044 str r3, [r9, #68] return copied; } 22450: e1a00004 mov r0, r4 22454: e28dd008 add sp, sp, #8 ; 0x8 22458: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 2245c: 000415d6 .word 0x000415d6 22460: 000002e1 .word 0x000002e1 22464: 0003e32f .word 0x0003e32f 22468: 0004161f .word 0x0004161f 2246c: 000002e5 .word 0x000002e5 22470: 1629 .short 0x1629 22472: 04 .byte 0x04 22473: 00 .byte 0x00 22474: 000002ed .word 0x000002ed 22478: 00041294 .word 0x00041294 2247c: 00043454 .word 0x00043454 22480: 0000031a .word 0x0000031a 22484: 0000032e .word 0x0000032e 22488: 00041659 .word 0x00041659 000082b4 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 82b4: e92d4070 push {r4, r5, r6, lr} 82b8: e24dd03c sub sp, sp, #60 ; 0x3c 82bc: e1a06001 mov r6, r1 82c0: e1a05002 mov r5, r2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, new_name, &result ); 82c4: e28d1007 add r1, sp, #7 ; 0x7 82c8: 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 */ ) { 82cc: 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 ); 82d0: ebffff82 bl 80e0 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 82d4: e2063a0f and r3, r6, #61440 ; 0xf000 82d8: e3530901 cmp r3, #16384 ; 0x4000 82dc: 0a00000b beq 8310 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 82e0: e3530902 cmp r3, #32768 ; 0x8000 82e4: 03a01005 moveq r1, #5 ; 0x5 82e8: 0a000009 beq 8314 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 82ec: e3530a02 cmp r3, #8192 ; 0x2000 82f0: 13530a06 cmpne r3, #24576 ; 0x6000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 82f4: 058d5028 streq r5, [sp, #40] 82f8: 058d402c streq r4, [sp, #44] 82fc: 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) ) { 8300: 0a000003 beq 8314 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 8304: eb000c23 bl b398 <__errno> <== NOT EXECUTED 8308: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 830c: ea00000b b 8340 <== NOT EXECUTED 8310: e3a01001 mov r1, #1 ; 0x1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 8314: e28dc028 add ip, sp, #40 ; 0x28 8318: e59d004c ldr r0, [sp, #76] 831c: e1a03006 mov r3, r6 8320: e28d2007 add r2, sp, #7 ; 0x7 8324: e58dc000 str ip, [sp] 8328: eb000942 bl a838 new_name, mode, &info ); if ( !new_node ) 832c: e3500000 cmp r0, #0 ; 0x0 8330: 13a00000 movne r0, #0 ; 0x0 8334: 1a000003 bne 8348 rtems_set_errno_and_return_minus_one( ENOMEM ); 8338: eb000c16 bl b398 <__errno> <== NOT EXECUTED 833c: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 8340: e5803000 str r3, [r0] <== NOT EXECUTED 8344: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED return 0; } 8348: e28dd03c add sp, sp, #60 ; 0x3c 834c: e8bd8070 pop {r4, r5, r6, pc} 00003678 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 3678: e5902008 ldr r2, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 367c: e592304c ldr r3, [r2, #76] 3680: e3530001 cmp r3, #1 ; 0x1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 3684: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 3688: 0a000004 beq 36a0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 368c: eb009a81 bl 2a098 <__errno> <== NOT EXECUTED 3690: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 3694: e5803000 str r3, [r0] <== NOT EXECUTED 3698: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 369c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 36a0: e582005c str r0, [r2, #92] 36a4: e3a00000 mov r0, #0 ; 0x0 return 0; } 36a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0000279c : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 279c: e92d4030 push {r4, r5, lr} assert( the_jnode ); 27a0: e2504000 subs r4, r0, #0 ; 0x0 27a4: 059f0110 ldreq r0, [pc, #272] ; 28bc 27a8: 03a01038 moveq r1, #56 ; 0x38 27ac: 059f210c ldreq r2, [pc, #268] ; 28c0 27b0: 059f310c ldreq r3, [pc, #268] ; 28c4 27b4: 0a00002e beq 2874 fprintf(stdout, "%s", the_jnode->name ); 27b8: e59f5108 ldr r5, [pc, #264] ; 28c8 27bc: e5953000 ldr r3, [r5] 27c0: e284000c add r0, r4, #12 ; 0xc 27c4: e5931008 ldr r1, [r3, #8] 27c8: eb0032ff bl f3cc switch( the_jnode->type ) { 27cc: e594204c ldr r2, [r4, #76] 27d0: e2423001 sub r3, r2, #1 ; 0x1 27d4: e3530005 cmp r3, #5 ; 0x5 27d8: 979ff103 ldrls pc, [pc, r3, lsl #2] 27dc: ea00002c b 2894 <== NOT EXECUTED 27e0: 000027f8 .word 0x000027f8 <== NOT EXECUTED 27e4: 0000280c .word 0x0000280c <== NOT EXECUTED 27e8: 00002854 .word 0x00002854 <== NOT EXECUTED 27ec: 00002878 .word 0x00002878 <== NOT EXECUTED 27f0: 0000283c .word 0x0000283c <== NOT EXECUTED 27f4: 00002820 .word 0x00002820 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 27f8: e5953000 ldr r3, [r5] 27fc: e3a0002f mov r0, #47 ; 0x2f 2800: e5931008 ldr r1, [r3, #8] 2804: eb0032b9 bl f2f0 2808: ea000028 b 28b0 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 280c: e5952000 ldr r2, [r5] 2810: e5943054 ldr r3, [r4, #84] 2814: e5920008 ldr r0, [r2, #8] 2818: e59f10ac ldr r1, [pc, #172] ; 28cc 281c: ea000003 b 2830 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2820: e5952000 ldr r2, [r5] <== NOT EXECUTED 2824: e5943054 ldr r3, [r4, #84] <== NOT EXECUTED 2828: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 282c: e59f109c ldr r1, [pc, #156] ; 28d0 <== NOT EXECUTED 2830: e5942050 ldr r2, [r4, #80] 2834: eb003299 bl f2a0 2838: ea00001c b 28b0 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 283c: e5953000 ldr r3, [r5] 2840: e5942050 ldr r2, [r4, #80] 2844: e5930008 ldr r0, [r3, #8] 2848: e59f1084 ldr r1, [pc, #132] ; 28d4 284c: eb003293 bl f2a0 2850: ea000016 b 28b0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 2854: e5953000 ldr r3, [r5] <== NOT EXECUTED 2858: e59f0078 ldr r0, [pc, #120] ; 28d8 <== NOT EXECUTED 285c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2860: eb0032d9 bl f3cc <== NOT EXECUTED assert(0); 2864: e59f0050 ldr r0, [pc, #80] ; 28bc <== NOT EXECUTED 2868: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 286c: e59f204c ldr r2, [pc, #76] ; 28c0 <== NOT EXECUTED 2870: e59f3064 ldr r3, [pc, #100] ; 28dc <== NOT EXECUTED 2874: eb0001dc bl 2fec <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2878: e5953000 ldr r3, [r5] <== NOT EXECUTED 287c: e59f0054 ldr r0, [pc, #84] ; 28d8 <== NOT EXECUTED 2880: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2884: eb0032d0 bl f3cc <== NOT EXECUTED assert(0); 2888: e59f002c ldr r0, [pc, #44] ; 28bc <== NOT EXECUTED 288c: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 2890: eafffff5 b 286c <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2894: e5953000 ldr r3, [r5] <== NOT EXECUTED 2898: e59f1040 ldr r1, [pc, #64] ; 28e0 <== NOT EXECUTED 289c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 28a0: eb00327e bl f2a0 <== NOT EXECUTED assert(0); 28a4: e59f0010 ldr r0, [pc, #16] ; 28bc <== NOT EXECUTED 28a8: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 28ac: eaffffee b 286c <== NOT EXECUTED break; } puts(""); 28b0: e59f002c ldr r0, [pc, #44] ; 28e4 } 28b4: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 28b8: ea00397c b 10eb0 28bc: 0001c192 .word 0x0001c192 28c0: 0001ad52 .word 0x0001ad52 28c4: 0001c1de .word 0x0001c1de 28c8: 0001a80c .word 0x0001a80c 28cc: 0001c1e8 .word 0x0001c1e8 28d0: 0001c1fb .word 0x0001c1fb 28d4: 0001c20a .word 0x0001c20a 28d8: 0001c216 .word 0x0001c216 28dc: 0001bba0 .word 0x0001bba0 28e0: 0001c22a .word 0x0001c22a 28e4: 0001c3cc .word 0x0001c3cc 000036b8 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 36b8: e590c000 ldr ip, [r0] if ( node->type != IMFS_SYM_LINK ) 36bc: e59c304c ldr r3, [ip, #76] 36c0: e3530004 cmp r3, #4 ; 0x4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 36c4: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 36c8: 03a00000 moveq r0, #0 ; 0x0 36cc: 0a000006 beq 36ec rtems_set_errno_and_return_minus_one( EINVAL ); 36d0: eb009a70 bl 2a098 <__errno> <== NOT EXECUTED 36d4: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 36d8: e5803000 str r3, [r0] <== NOT EXECUTED 36dc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 36e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 36e4: e7c13000 strb r3, [r1, r0] node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 36e8: e2800001 add r0, r0, #1 ; 0x1 36ec: e1500002 cmp r0, r2 36f0: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 36f4: e59c3050 ldr r3, [ip, #80] 36f8: e7d33000 ldrb r3, [r3, r0] 36fc: e3530000 cmp r3, #0 ; 0x0 3700: 1afffff7 bne 36e4 buf[i] = node->info.sym_link.name[i]; return i; } 3704: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0000840c : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 840c: e5900000 ldr r0, [r0] switch ( the_jnode->type ) { 8410: e590304c ldr r3, [r0, #76] 8414: e2433002 sub r3, r3, #2 ; 0x2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8418: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 841c: e3530004 cmp r3, #4 ; 0x4 8420: 979ff103 ldrls pc, [pc, r3, lsl #2] 8424: ea00000d b 8460 <== NOT EXECUTED 8428: 0000843c .word 0x0000843c <== NOT EXECUTED 842c: 00008460 .word 0x00008460 <== NOT EXECUTED 8430: 00008454 .word 0x00008454 <== NOT EXECUTED 8434: 0000844c .word 0x0000844c <== NOT EXECUTED 8438: 0000844c .word 0x0000844c <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); 843c: e2802050 add r2, r0, #80 ; 0x50 8440: e892000c ldm r2, {r2, r3} 8444: e881000c stm r1, {r2, r3} 8448: ea000009 b 8474 break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 844c: e5903050 ldr r3, [r0, #80] 8450: ea000000 b 8458 break; case IMFS_SYM_LINK: buf->st_size = 0; 8454: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 8458: e5813020 str r3, [r1, #32] 845c: ea000004 b 8474 break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8460: eb000bcc bl b398 <__errno> <== NOT EXECUTED 8464: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8468: e5803000 str r3, [r0] <== NOT EXECUTED 846c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 8470: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 8474: e5903038 ldr r3, [r0, #56] 8478: 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; 847c: e5903040 ldr r3, [r0, #64] 8480: e5813024 str r3, [r1, #36] buf->st_mtime = the_jnode->stat_mtime; 8484: 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; 8488: 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; 848c: e581302c str r3, [r1, #44] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8490: e1c1c1b0 strh ip, [r1, #16] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8494: e5903048 ldr r3, [r0, #72] 8498: e5813034 str r3, [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; 849c: e1d033bc ldrh r3, [r0, #60] 84a0: e1c131b2 strh r3, [r1, #18] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 84a4: e5902030 ldr r2, [r0, #48] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 84a8: e1d003be ldrh r0, [r0, #62] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 84ac: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 84b0: 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; 84b4: e3a00000 mov r0, #0 ; 0x0 return 0; } 84b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00003708 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 3708: e92d4070 push {r4, r5, r6, lr} 370c: e24dd03c sub sp, sp, #60 ; 0x3c /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 3710: e28d6007 add r6, sp, #7 ; 0x7 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 3714: e1a04001 mov r4, r1 3718: e1a05000 mov r5, r0 /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 371c: e1a01006 mov r1, r6 3720: e1a00002 mov r0, r2 3724: e28d2038 add r2, sp, #56 ; 0x38 3728: ebffff03 bl 333c /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 372c: e1a00004 mov r0, r4 3730: eb00af2f bl 2f3f4 if (info.sym_link.name == NULL) { 3734: e3500000 cmp r0, #0 ; 0x0 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 3738: e58d0028 str r0, [sp, #40] if (info.sym_link.name == NULL) { 373c: 0a00000b beq 3770 /* * Create a new link node. */ new_node = IMFS_create_node( 3740: e28dc028 add ip, sp, #40 ; 0x28 3744: e1a00005 mov r0, r5 3748: e1a02006 mov r2, r6 374c: e3a01004 mov r1, #4 ; 0x4 3750: e59f3030 ldr r3, [pc, #48] ; 3788 3754: e58dc000 str ip, [sp] 3758: eb005b2e bl 1a418 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 375c: e3500000 cmp r0, #0 ; 0x0 3760: 13a00000 movne r0, #0 ; 0x0 3764: 1a000005 bne 3780 free( info.sym_link.name); 3768: e59d0028 ldr r0, [sp, #40] <== NOT EXECUTED 376c: eb000186 bl 3d8c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 3770: eb009a48 bl 2a098 <__errno> <== NOT EXECUTED 3774: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 3778: e5803000 str r3, [r0] <== NOT EXECUTED 377c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED } return 0; } 3780: e28dd03c add sp, sp, #60 ; 0x3c 3784: e8bd8070 pop {r4, r5, r6, pc} 3788: 0000a1ff .word 0x0000a1ff 0000378c : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 378c: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 3790: e5906000 ldr r6, [r0] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 3794: e596304c ldr r3, [r6, #76] 3798: e3530003 cmp r3, #3 ; 0x3 #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 379c: e24dd018 sub sp, sp, #24 ; 0x18 37a0: e1a04000 mov r4, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 37a4: 1a000020 bne 382c if ( !node->info.hard_link.link_node ) 37a8: e596c050 ldr ip, [r6, #80] 37ac: e35c0000 cmp ip, #0 ; 0x0 37b0: 1a000003 bne 37c4 rtems_set_errno_and_return_minus_one( EINVAL ); 37b4: eb009a37 bl 2a098 <__errno> <== NOT EXECUTED 37b8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 37bc: e5803000 str r3, [r0] <== NOT EXECUTED 37c0: ea00000f b 3804 <== NOT EXECUTED the_link = *loc; 37c4: e890000f ldm r0, {r0, r1, r2, r3} 37c8: e88d000f stm sp, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 37cc: 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; 37d0: e58dc000 str ip, [sp] IMFS_Set_handlers( &the_link ); 37d4: eb005b6d bl 1a590 /* * 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) 37d8: e5962050 ldr r2, [r6, #80] 37dc: e1d233b4 ldrh r3, [r2, #52] 37e0: 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; 37e4: e1a0500d mov r5, sp /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 37e8: 1a000007 bne 380c { result = (*the_link.handlers->rmnod_h)( &the_link ); 37ec: e1a0000d mov r0, sp 37f0: e59d3004 ldr r3, [sp, #4] 37f4: e1a0e00f mov lr, pc 37f8: e593f034 ldr pc, [r3, #52] if ( result != 0 ) 37fc: e3500000 cmp r0, #0 ; 0x0 3800: 0a000009 beq 382c 3804: e3e00000 mvn r0, #0 ; 0x0 3808: ea00000b b 383c return -1; } else { node->info.hard_link.link_node->st_nlink --; 380c: e2433001 sub r3, r3, #1 ; 0x1 3810: e1c233b4 strh r3, [r2, #52] IMFS_update_ctime( node->info.hard_link.link_node ); 3814: e28d0010 add r0, sp, #16 ; 0x10 3818: e3a01000 mov r1, #0 ; 0x0 381c: eb000182 bl 3e2c 3820: e5962050 ldr r2, [r6, #80] 3824: e59d3010 ldr r3, [sp, #16] 3828: e5823048 str r3, [r2, #72] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 382c: e1a00004 mov r0, r4 3830: e5943004 ldr r3, [r4, #4] 3834: e1a0e00f mov lr, pc 3838: e593f034 ldr pc, [r3, #52] return result; } 383c: e28dd018 add sp, sp, #24 ; 0x18 3840: e8bd8070 pop {r4, r5, r6, pc} 00003844 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 3844: e5902008 ldr r2, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 3848: e592304c ldr r3, [r2, #76] 384c: e3530001 cmp r3, #1 ; 0x1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 3850: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 3854: 0a000002 beq 3864 rtems_set_errno_and_return_minus_one( ENOTDIR ); 3858: eb009a0e bl 2a098 <__errno> <== NOT EXECUTED 385c: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 3860: ea000004 b 3878 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 3864: e592305c ldr r3, [r2, #92] 3868: e3530000 cmp r3, #0 ; 0x0 386c: 1a000004 bne 3884 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 3870: eb009a08 bl 2a098 <__errno> <== NOT EXECUTED 3874: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 3878: e5803000 str r3, [r0] <== NOT EXECUTED 387c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 3880: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 3884: e3a03000 mov r3, #0 ; 0x0 3888: e582305c str r3, [r2, #92] 388c: e1a00003 mov r0, r3 return 0; } 3890: e49df004 pop {pc} ; (ldr pc, [sp], #4) 000014f4 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 14f4: e59f3094 ldr r3, [pc, #148] ; 1590 14f8: e5933000 ldr r3, [r3] 14fc: e3530000 cmp r3, #0 ; 0x0 void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 1500: e92d4070 push {r4, r5, r6, lr} 1504: e1a04000 mov r4, r0 1508: e1a05001 mov r5, r1 150c: e1a06002 mov r6, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->initialize)(); 1510: 11a0e00f movne lr, pc 1514: 1593f000 ldrne pc, [r3] /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1518: eb001db6 bl 8bf8 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 151c: e59f3070 ldr r3, [pc, #112] ; 1594 1520: e5933000 ldr r3, [r3] 1524: e3530000 cmp r3, #0 ; 0x0 1528: 0a000004 beq 1540 starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 152c: e1a00004 mov r0, r4 <== NOT EXECUTED 1530: e1a01006 mov r1, r6 <== NOT EXECUTED 1534: e1a0e00f mov lr, pc <== NOT EXECUTED 1538: e593f000 ldr pc, [r3] <== NOT EXECUTED 153c: 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() ) 1540: e59f3050 ldr r3, [pc, #80] ; 1598 1544: e5933000 ldr r3, [r3] 1548: e5d33028 ldrb r3, [r3, #40] 154c: e3530000 cmp r3, #0 ; 0x0 memset( starting_address, 0, length ); 1550: 11a00004 movne r0, r4 1554: 13a01000 movne r1, #0 ; 0x0 1558: 11a02005 movne r2, r5 155c: 1b002996 blne bbbc void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 1560: e1a01004 mov r1, r4 1564: e59f0030 ldr r0, [pc, #48] ; 159c 1568: e1a02005 mov r2, r5 156c: e3a03004 mov r3, #4 ; 0x4 1570: eb000f53 bl 52c4 <_Heap_Initialize> &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 1574: e3500000 cmp r0, #0 ; 0x0 rtems_fatal_error_occurred( status ); 1578: 0b000d20 bleq 4a00 rtems_print_buffer( (start + length) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif MSBUMP(space_available, length); 157c: e59f201c ldr r2, [pc, #28] ; 15a0 1580: e5923000 ldr r3, [r2] 1584: e0853003 add r3, r5, r3 1588: e5823000 str r3, [r2] } 158c: e8bd8070 pop {r4, r5, r6, pc} 1590: 00015ec4 .word 0x00015ec4 1594: 00015ec8 .word 0x00015ec8 1598: 0001629c .word 0x0001629c 159c: 0001609c .word 0x0001609c 15a0: 000160f4 .word 0x000160f4 00002844 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2844: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 2848: 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 ) { 284c: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 2850: 0a000047 beq 2974 <== NOT EXECUTED return; if ( !print_handler ) 2854: e59f3120 ldr r3, [pc, #288] ; 297c <== NOT EXECUTED 2858: e5938000 ldr r8, [r3] <== NOT EXECUTED 285c: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 2860: 0a000043 beq 2974 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 2864: 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 ); 2868: 159490f4 ldrne r9, [r4, #244] <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 286c: 128460c4 addne r6, r4, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 2870: 1a000006 bne 2890 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 2874: e59f2104 ldr r2, [pc, #260] ; 2980 <== NOT EXECUTED 2878: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 287c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 2880: 12844001 addne r4, r4, #1 ; 0x1 <== NOT EXECUTED 2884: 11a06002 movne r6, r2 <== NOT EXECUTED 2888: 11a09004 movne r9, r4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 288c: 0a000038 beq 2974 <== 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); 2890: e896000c ldm r6, {r2, r3} <== NOT EXECUTED 2894: e2835010 add r5, r3, #16 ; 0x10 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2898: e2427010 sub r7, r2, #16 ; 0x10 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 289c: e1a00005 mov r0, r5 <== NOT EXECUTED 28a0: e1a01007 mov r1, r7 <== NOT EXECUTED 28a4: ebffffd8 bl 280c <== NOT EXECUTED if ( high_water_mark ) 28a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 28ac: 10853007 addne r3, r5, r7 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 28b0: 01a0a000 moveq sl, r0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 28b4: 1060a003 rsbne sl, r0, r3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 28b8: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 28bc: e59f00c0 ldr r0, [pc, #192] ; 2984 <== NOT EXECUTED 28c0: 0a00000c beq 28f8 <== NOT EXECUTED (*print_handler)( 28c4: e5944008 ldr r4, [r4, #8] <== NOT EXECUTED 28c8: e5905000 ldr r5, [r0] <== NOT EXECUTED 28cc: e28d200b add r2, sp, #11 ; 0xb <== NOT EXECUTED 28d0: e1a00004 mov r0, r4 <== NOT EXECUTED 28d4: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED 28d8: eb00131e bl 7558 <== NOT EXECUTED 28dc: e1a02004 mov r2, r4 <== NOT EXECUTED 28e0: e1a03000 mov r3, r0 <== NOT EXECUTED 28e4: e59f109c ldr r1, [pc, #156] ; 2988 <== NOT EXECUTED 28e8: e1a00005 mov r0, r5 <== NOT EXECUTED 28ec: e1a0e00f mov lr, pc <== NOT EXECUTED 28f0: e12fff18 bx r8 <== NOT EXECUTED 28f4: ea000004 b 290c <== 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 ); 28f8: e5900000 ldr r0, [r0] <== NOT EXECUTED 28fc: e59f1088 ldr r1, [pc, #136] ; 298c <== NOT EXECUTED 2900: e3e02000 mvn r2, #0 ; 0x0 <== NOT EXECUTED 2904: e1a0e00f mov lr, pc <== NOT EXECUTED 2908: e12fff18 bx r8 <== NOT EXECUTED } (*print_handler)( 290c: e5963000 ldr r3, [r6] <== NOT EXECUTED 2910: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED 2914: e59f5068 ldr r5, [pc, #104] ; 2984 <== NOT EXECUTED 2918: e58d9000 str r9, [sp] <== NOT EXECUTED 291c: e58d7004 str r7, [sp, #4] <== NOT EXECUTED 2920: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 2924: e0823003 add r3, r2, r3 <== NOT EXECUTED 2928: e59f404c ldr r4, [pc, #76] ; 297c <== NOT EXECUTED 292c: e5950000 ldr r0, [r5] <== NOT EXECUTED 2930: e59f1058 ldr r1, [pc, #88] ; 2990 <== NOT EXECUTED 2934: e1a0e00f mov lr, pc <== NOT EXECUTED 2938: e594f000 ldr pc, [r4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 293c: e59f3050 ldr r3, [pc, #80] ; 2994 <== NOT EXECUTED 2940: e5933000 ldr r3, [r3] <== NOT EXECUTED 2944: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2948: 1a000004 bne 2960 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 294c: e5950000 ldr r0, [r5] <== NOT EXECUTED 2950: e59f1040 ldr r1, [pc, #64] ; 2998 <== NOT EXECUTED 2954: e1a0e00f mov lr, pc <== NOT EXECUTED 2958: e594f000 ldr pc, [r4] <== NOT EXECUTED 295c: ea000004 b 2974 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 2960: e5950000 ldr r0, [r5] <== NOT EXECUTED 2964: e1a0200a mov r2, sl <== NOT EXECUTED 2968: e59f102c ldr r1, [pc, #44] ; 299c <== NOT EXECUTED 296c: e1a0e00f mov lr, pc <== NOT EXECUTED 2970: e594f000 ldr pc, [r4] <== NOT EXECUTED } } 2974: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 2978: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 297c: 00043450 .word 0x00043450 2980: 000564a4 .word 0x000564a4 2984: 0004344c .word 0x0004344c 2988: 0003f40c .word 0x0003f40c 298c: 0003f419 .word 0x0003f419 2990: 0003f427 .word 0x0003f427 2994: 00043448 .word 0x00043448 2998: 0003f445 .word 0x0003f445 299c: 0003f452 .word 0x0003f452 0000280c : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 280c: 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; 2810: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 2814: e0802001 add r2, r0, r1 <== NOT EXECUTED if (*base != U32_PATTERN) 2818: e59f1020 ldr r1, [pc, #32] ; 2840 <== NOT EXECUTED 281c: ea000003 b 2830 <== NOT EXECUTED 2820: e5903000 ldr r3, [r0] <== NOT EXECUTED 2824: e1530001 cmp r3, r1 <== NOT EXECUTED 2828: 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++) 282c: e2800004 add r0, r0, #4 ; 0x4 <== NOT EXECUTED 2830: e1500002 cmp r0, r2 <== NOT EXECUTED 2834: 3afffff9 bcc 2820 <== NOT EXECUTED 2838: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 283c: e12fff1e bx lr <== NOT EXECUTED 2840: a5a5a5a5 .word 0xa5a5a5a5 00006998 <_CORE_RWLock_Release>: CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ISR_Level level; Thread_Control *executing = _Thread_Executing; 6998: e59f30dc ldr r3, [pc, #220] ; 6a7c <_CORE_RWLock_Release+0xe4> */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 699c: e92d4010 push {r4, lr} ISR_Level level; Thread_Control *executing = _Thread_Executing; 69a0: e5931000 ldr r1, [r3] */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 69a4: 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 ); 69a8: e10f2000 mrs r2, CPSR 69ac: e38230c0 orr r3, r2, #192 ; 0xc0 69b0: e129f003 msr CPSR_fc, r3 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 69b4: e5903044 ldr r3, [r0, #68] 69b8: e3530000 cmp r3, #0 ; 0x0 69bc: 1a000003 bne 69d0 <_CORE_RWLock_Release+0x38> _ISR_Enable( level ); 69c0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 69c4: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 69c8: e5813034 str r3, [r1, #52] <== NOT EXECUTED 69cc: ea000028 b 6a74 <_CORE_RWLock_Release+0xdc> <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 69d0: e3530001 cmp r3, #1 ; 0x1 69d4: 1a000006 bne 69f4 <_CORE_RWLock_Release+0x5c> the_rwlock->number_of_readers -= 1; 69d8: e5903048 ldr r3, [r0, #72] 69dc: e2433001 sub r3, r3, #1 ; 0x1 if ( the_rwlock->number_of_readers != 0 ) { 69e0: 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; 69e4: e5803048 str r3, [r0, #72] if ( the_rwlock->number_of_readers != 0 ) { 69e8: 0a000001 beq 69f4 <_CORE_RWLock_Release+0x5c> /* must be unlocked again */ _ISR_Enable( level ); 69ec: e129f002 msr CPSR_fc, r2 69f0: ea00001f b 6a74 <_CORE_RWLock_Release+0xdc> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 69f4: e3a03000 mov r3, #0 ; 0x0 69f8: 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; 69fc: e5843044 str r3, [r4, #68] _ISR_Enable( level ); 6a00: e129f002 msr CPSR_fc, r2 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 6a04: e1a00004 mov r0, r4 6a08: eb00055f bl 7f8c <_Thread_queue_Dequeue> if ( next ) { 6a0c: e3500000 cmp r0, #0 ; 0x0 6a10: 0a000017 beq 6a74 <_CORE_RWLock_Release+0xdc> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 6a14: e5903030 ldr r3, [r0, #48] 6a18: e3530001 cmp r3, #1 ; 0x1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 6a1c: 02833001 addeq r3, r3, #1 ; 0x1 6a20: 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 ) { 6a24: 0a000012 beq 6a74 <_CORE_RWLock_Release+0xdc> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 6a28: e5943048 ldr r3, [r4, #72] 6a2c: e2833001 add r3, r3, #1 ; 0x1 6a30: e5843048 str r3, [r4, #72] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 6a34: e3a03001 mov r3, #1 ; 0x1 6a38: e5843044 str r3, [r4, #68] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 6a3c: e1a00004 mov r0, r4 6a40: eb000698 bl 84a8 <_Thread_queue_First> if ( !next || 6a44: 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 ); 6a48: e1a01003 mov r1, r3 6a4c: 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 || 6a50: 0a000007 beq 6a74 <_CORE_RWLock_Release+0xdc> 6a54: e5933030 ldr r3, [r3, #48] 6a58: e3530001 cmp r3, #1 ; 0x1 6a5c: 0a000004 beq 6a74 <_CORE_RWLock_Release+0xdc> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 6a60: e5943048 ldr r3, [r4, #72] 6a64: e2833001 add r3, r3, #1 ; 0x1 6a68: e5843048 str r3, [r4, #72] _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 6a6c: eb000643 bl 8380 <_Thread_queue_Extract> 6a70: eafffff1 b 6a3c <_CORE_RWLock_Release+0xa4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 6a74: e3a00000 mov r0, #0 ; 0x0 6a78: e8bd8010 pop {r4, pc} 6a7c: 00018604 .word 0x00018604 00011b30 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11b30: e590304c ldr r3, [r0, #76] size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 11b34: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11b38: e1520003 cmp r2, r3 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 11b3c: e1a07000 mov r7, r0 11b40: e1a06002 mov r6, r2 11b44: e1a08001 mov r8, r1 11b48: e59da020 ldr sl, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11b4c: 83a00001 movhi r0, #1 ; 0x1 11b50: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc} * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 11b54: e5973048 ldr r3, [r7, #72] 11b58: e3530000 cmp r3, #0 ; 0x0 *count = 0; 11b5c: 13a03000 movne r3, #0 ; 0x0 * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 11b60: 01a05003 moveq r5, r3 * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 11b64: 158a3000 strne r3, [sl] 11b68: 11a00003 movne r0, r3 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 11b6c: 0a000005 beq 11b88 <_CORE_message_queue_Broadcast+0x58> 11b70: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11b74: e594002c ldr r0, [r4, #44] 11b78: eb001f1a bl 197e8 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11b7c: e5943028 ldr r3, [r4, #40] 11b80: 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; 11b84: 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))) { 11b88: e1a00007 mov r0, r7 11b8c: eb00092d bl 14048 <_Thread_queue_Dequeue> 11b90: e2504000 subs r4, r0, #0 ; 0x0 11b94: e1a01008 mov r1, r8 11b98: e1a02006 mov r2, r6 11b9c: 1afffff4 bne 11b74 <_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; 11ba0: e58a5000 str r5, [sl] 11ba4: e1a00004 mov r0, r4 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11ba8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 0001029c <_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 ) { 1029c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 102a0: e590c04c ldr ip, [r0, #76] 102a4: e152000c cmp r2, ip CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 102a8: e1a05000 mov r5, r0 102ac: e1a06002 mov r6, r2 102b0: e1a07001 mov r7, r1 102b4: e1a0b003 mov fp, r3 102b8: e59d9028 ldr r9, [sp, #40] 102bc: e5dda02c ldrb sl, [sp, #44] ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 102c0: 83a00001 movhi r0, #1 ; 0x1 102c4: 88bd8ff0 pophi {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 102c8: e5958048 ldr r8, [r5, #72] 102cc: e3580000 cmp r8, #0 ; 0x0 102d0: 1a00000b bne 10304 <_CORE_message_queue_Submit+0x68> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 102d4: ebffea40 bl abdc <_Thread_queue_Dequeue> if ( the_thread ) { 102d8: e2504000 subs r4, r0, #0 ; 0x0 102dc: 0a000008 beq 10304 <_CORE_message_queue_Submit+0x68> 102e0: e1a01007 mov r1, r7 102e4: e594002c ldr r0, [r4, #44] 102e8: e1a02006 mov r2, r6 102ec: eb0012c1 bl 14df8 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 102f0: e5943028 ldr r3, [r4, #40] the_thread->Wait.count = submit_type; 102f4: e1a00008 mov r0, r8 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 102f8: e5836000 str r6, [r3] the_thread->Wait.count = submit_type; 102fc: e5849024 str r9, [r4, #36] 10300: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 10304: e5952048 ldr r2, [r5, #72] 10308: e5953044 ldr r3, [r5, #68] 1030c: e1520003 cmp r2, r3 10310: 2a00000f bcs 10354 <_CORE_message_queue_Submit+0xb8> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10314: e2850068 add r0, r5, #104 ; 0x68 10318: ebffe3e6 bl 92b8 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 1031c: e2504000 subs r4, r0, #0 ; 0x0 10320: 0a000025 beq 103bc <_CORE_message_queue_Submit+0x120> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10324: e1a01007 mov r1, r7 10328: e1a02006 mov r2, r6 1032c: e2840010 add r0, r4, #16 ; 0x10 10330: eb0012b0 bl 14df8 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 10334: e1a00005 mov r0, r5 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10338: e584600c str r6, [r4, #12] the_message->priority = submit_type; 1033c: e5849008 str r9, [r4, #8] _CORE_message_queue_Insert_message( 10340: e1a01004 mov r1, r4 10344: e1a02009 mov r2, r9 10348: eb000b38 bl 13030 <_CORE_message_queue_Insert_message> 1034c: e3a00000 mov r0, #0 ; 0x0 10350: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 10354: e35a0000 cmp sl, #0 ; 0x0 10358: 03a00002 moveq r0, #2 ; 0x2 1035c: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 10360: e59f305c ldr r3, [pc, #92] ; 103c4 <_CORE_message_queue_Submit+0x128> 10364: e5933000 ldr r3, [r3] 10368: e3530000 cmp r3, #0 ; 0x0 1036c: 1a000012 bne 103bc <_CORE_message_queue_Submit+0x120> * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 10370: e59f3050 ldr r3, [pc, #80] ; 103c8 <_CORE_message_queue_Submit+0x12c> 10374: e5932000 ldr r2, [r3] _ISR_Disable( level ); 10378: e10f1000 mrs r1, CPSR 1037c: e38130c0 orr r3, r1, #192 ; 0xc0 10380: e129f003 msr CPSR_fc, r3 10384: e3a03001 mov r3, #1 ; 0x1 10388: e5853030 str r3, [r5, #48] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 1038c: e5829024 str r9, [r2, #36] Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 10390: e582b020 str fp, [r2, #32] executing->Wait.return_argument_second.immutable_object = buffer; 10394: e582702c str r7, [r2, #44] executing->Wait.option = (uint32_t) size; 10398: e5826030 str r6, [r2, #48] { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 1039c: e5825044 str r5, [r2, #68] executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 103a0: e129f001 msr CPSR_fc, r1 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 103a4: e59f2020 ldr r2, [pc, #32] ; 103cc <_CORE_message_queue_Submit+0x130> 103a8: e1a00005 mov r0, r5 103ac: e59d1030 ldr r1, [sp, #48] 103b0: ebffea62 bl ad40 <_Thread_queue_Enqueue_with_handler> 103b4: e3a00007 mov r0, #7 ; 0x7 103b8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 103bc: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 103c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 103c4: 00024420 .word 0x00024420 103c8: 00024444 .word 0x00024444 103cc: 0000b118 .word 0x0000b118 00009cb4 <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 9cb4: e59f3130 ldr r3, [pc, #304] ; 9dec <_CORE_mutex_Seize_interrupt_trylock+0x138> 9cb8: e593c000 ldr ip, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9cbc: e3a02000 mov r2, #0 ; 0x0 CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 9cc0: e5911000 ldr r1, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9cc4: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9cc8: e5903050 ldr r3, [r0, #80] 9ccc: e1530002 cmp r3, r2 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 9cd0: e52de004 push {lr} ; (str lr, [sp, #-4]!) 9cd4: 0a00002f beq 9d98 <_CORE_mutex_Seize_interrupt_trylock+0xe4> the_mutex->lock = CORE_MUTEX_LOCKED; 9cd8: 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; 9cdc: e5902048 ldr r2, [r0, #72] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 9ce0: e59c3008 ldr r3, [ip, #8] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9ce4: e3520002 cmp r2, #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; 9ce8: e5803060 str r3, [r0, #96] the_mutex->nest_count = 1; 9cec: e3a03001 mov r3, #1 ; 0x1 9cf0: 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; 9cf4: 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 ) || 9cf8: 0a000001 beq 9d04 <_CORE_mutex_Seize_interrupt_trylock+0x50> 9cfc: e3520003 cmp r2, #3 ; 0x3 9d00: 1a000002 bne 9d10 <_CORE_mutex_Seize_interrupt_trylock+0x5c> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9d04: e59c301c ldr r3, [ip, #28] 9d08: e2833001 add r3, r3, #1 ; 0x1 9d0c: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9d10: e5903048 ldr r3, [r0, #72] 9d14: e3530003 cmp r3, #3 ; 0x3 9d18: 0a000001 beq 9d24 <_CORE_mutex_Seize_interrupt_trylock+0x70> _ISR_Enable( level ); 9d1c: e129f001 msr CPSR_fc, r1 9d20: ea00002d b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 9d24: e590204c ldr r2, [r0, #76] current = executing->current_priority; 9d28: e59c3014 ldr r3, [ip, #20] if ( current == ceiling ) { 9d2c: e1530002 cmp r3, r2 9d30: 1a000001 bne 9d3c <_CORE_mutex_Seize_interrupt_trylock+0x88> _ISR_Enable( level ); 9d34: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 9d38: ea000027 b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 9d3c: 9a00000a bls 9d6c <_CORE_mutex_Seize_interrupt_trylock+0xb8> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 9d40: e59f20a8 ldr r2, [pc, #168] ; 9df0 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 9d44: e5923000 ldr r3, [r2] 9d48: e2833001 add r3, r3, #1 ; 0x1 9d4c: e5823000 str r3, [r2] _Thread_Disable_dispatch(); _ISR_Enable( level ); 9d50: e129f001 msr CPSR_fc, r1 _Thread_Change_priority( 9d54: e3a02000 mov r2, #0 ; 0x0 9d58: e590104c ldr r1, [r0, #76] 9d5c: e590005c ldr r0, [r0, #92] 9d60: ebffefdc bl 5cd8 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 9d64: ebfff143 bl 6278 <_Thread_Enable_dispatch> 9d68: ea00001b b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9d6c: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED 9d70: e58c3034 str r3, [ip, #52] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 9d74: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 9d78: e5803054 str r3, [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; 9d7c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 9d80: e5803050 str r3, [r0, #80] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 9d84: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED 9d88: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 9d8c: e58c301c str r3, [ip, #28] <== NOT EXECUTED _ISR_Enable( level ); 9d90: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 9d94: ea000010 b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> <== 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 ) ) { 9d98: e590205c ldr r2, [r0, #92] 9d9c: e152000c cmp r2, ip 9da0: 1a00000f bne 9de4 <_CORE_mutex_Seize_interrupt_trylock+0x130> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 9da4: e5903040 ldr r3, [r0, #64] 9da8: e3530000 cmp r3, #0 ; 0x0 9dac: 0a000002 beq 9dbc <_CORE_mutex_Seize_interrupt_trylock+0x108> 9db0: e3530001 cmp r3, #1 ; 0x1 9db4: 1a00000a bne 9de4 <_CORE_mutex_Seize_interrupt_trylock+0x130> 9db8: ea000004 b 9dd0 <_CORE_mutex_Seize_interrupt_trylock+0x11c> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 9dbc: e5903054 ldr r3, [r0, #84] 9dc0: e2833001 add r3, r3, #1 ; 0x1 9dc4: e5803054 str r3, [r0, #84] _ISR_Enable( level ); 9dc8: e129f001 msr CPSR_fc, r1 9dcc: ea000002 b 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 9dd0: e3a03002 mov r3, #2 ; 0x2 9dd4: e5823034 str r3, [r2, #52] _ISR_Enable( level ); 9dd8: e129f001 msr CPSR_fc, r1 9ddc: e3a00000 mov r0, #0 ; 0x0 9de0: e49df004 pop {pc} ; (ldr pc, [sp], #4) 9de4: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 9de8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 9dec: 000162c4 .word 0x000162c4 9df0: 0001620c .word 0x0001620c 00004fc4 <_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 ) { 4fc4: e5d03044 ldrb r3, [r0, #68] 4fc8: 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 ) { 4fcc: e92d4010 push {r4, lr} 4fd0: 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; 4fd4: 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 ) { 4fd8: 0a000004 beq 4ff0 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 4fdc: e59f312c ldr r3, [pc, #300] ; 5110 <_CORE_mutex_Surrender+0x14c> 4fe0: e5933000 ldr r3, [r3] 4fe4: e1500003 cmp r0, r3 4fe8: 13a00003 movne r0, #3 ; 0x3 4fec: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 4ff0: e5943054 ldr r3, [r4, #84] 4ff4: e3530000 cmp r3, #0 ; 0x0 4ff8: 0a000042 beq 5108 <_CORE_mutex_Surrender+0x144> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 4ffc: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 5000: 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--; 5004: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 5008: 0a000005 beq 5024 <_CORE_mutex_Surrender+0x60> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 500c: e5943040 ldr r3, [r4, #64] 5010: e3530000 cmp r3, #0 ; 0x0 5014: 0a00003b beq 5108 <_CORE_mutex_Surrender+0x144> 5018: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 501c: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 5020: 08bd8010 popeq {r4, pc} <== NOT EXECUTED 5024: e5943048 ldr r3, [r4, #72] /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 5028: e3530002 cmp r3, #2 ; 0x2 502c: 0a000001 beq 5038 <_CORE_mutex_Surrender+0x74> 5030: e3530003 cmp r3, #3 ; 0x3 5034: 1a000002 bne 5044 <_CORE_mutex_Surrender+0x80> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 5038: e590301c ldr r3, [r0, #28] 503c: e2433001 sub r3, r3, #1 ; 0x1 5040: e580301c str r3, [r0, #28] 5044: e5942048 ldr r2, [r4, #72] } the_mutex->holder = NULL; 5048: 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 ) || 504c: 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; 5050: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 5054: 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 ) || 5058: 0a000001 beq 5064 <_CORE_mutex_Surrender+0xa0> 505c: e3520003 cmp r2, #3 ; 0x3 5060: 1a000007 bne 5084 <_CORE_mutex_Surrender+0xc0> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); #endif if ( holder->resource_count == 0 && 5064: e590301c ldr r3, [r0, #28] 5068: e3530000 cmp r3, #0 ; 0x0 506c: 1a000004 bne 5084 <_CORE_mutex_Surrender+0xc0> 5070: e5901018 ldr r1, [r0, #24] 5074: e5903014 ldr r3, [r0, #20] 5078: e1510003 cmp r1, r3 holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 507c: 13a02001 movne r2, #1 ; 0x1 5080: 1b000314 blne 5cd8 <_Thread_Change_priority> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 5084: e1a00004 mov r0, r4 5088: eb00055c bl 6600 <_Thread_queue_Dequeue> 508c: e2502000 subs r2, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5090: 03a03001 moveq r3, #1 ; 0x1 5094: 05843050 streq r3, [r4, #80] 5098: 01a00002 moveq r0, r2 /* * 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 ) ) ) { 509c: 08bd8010 popeq {r4, pc} } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 50a0: e5923008 ldr r3, [r2, #8] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 50a4: e5941048 ldr r1, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 50a8: e5843060 str r3, [r4, #96] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 50ac: e3510002 cmp r1, #2 ; 0x2 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 50b0: e3a03001 mov r3, #1 ; 0x1 50b4: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 50b8: e584205c str r2, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 50bc: 0a000002 beq 50cc <_CORE_mutex_Surrender+0x108> 50c0: e3510003 cmp r1, #3 ; 0x3 50c4: 1a00000f bne 5108 <_CORE_mutex_Surrender+0x144> 50c8: ea000003 b 50dc <_CORE_mutex_Surrender+0x118> <== 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++; 50cc: e592301c ldr r3, [r2, #28] 50d0: e2833001 add r3, r3, #1 ; 0x1 50d4: e582301c str r3, [r2, #28] 50d8: ea000008 b 5100 <_CORE_mutex_Surrender+0x13c> 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++; 50dc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 50e0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 50e4: e582301c str r3, [r2, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 50e8: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED 50ec: e594104c ldr r1, [r4, #76] <== NOT EXECUTED 50f0: e1510003 cmp r1, r3 <== NOT EXECUTED 50f4: 2a000003 bcs 5108 <_CORE_mutex_Surrender+0x144> <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 50f8: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 50fc: eb0002f5 bl 5cd8 <_Thread_Change_priority> <== NOT EXECUTED 5100: e3a00000 mov r0, #0 ; 0x0 5104: e8bd8010 pop {r4, pc} } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5108: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 510c: e8bd8010 pop {r4, pc} 5110: 000162c4 .word 0x000162c4 000058f0 <_CORE_spinlock_Release>: CORE_spinlock_Control *the_spinlock ) { ISR_Level level; _ISR_Disable( level ); 58f0: e10f1000 mrs r1, CPSR 58f4: e38130c0 orr r3, r1, #192 ; 0xc0 58f8: e129f003 msr CPSR_fc, r3 /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 58fc: e5903004 ldr r3, [r0, #4] 5900: e3530000 cmp r3, #0 ; 0x0 5904: 1a000002 bne 5914 <_CORE_spinlock_Release+0x24> _ISR_Enable( level ); 5908: e129f001 msr CPSR_fc, r1 590c: e3a00006 mov r0, #6 ; 0x6 5910: e12fff1e bx lr } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 5914: e59f3040 ldr r3, [pc, #64] ; 595c <_CORE_spinlock_Release+0x6c> 5918: e5933000 ldr r3, [r3] 591c: e5932008 ldr r2, [r3, #8] 5920: e590300c ldr r3, [r0, #12] 5924: e1530002 cmp r3, r2 5928: 0a000002 beq 5938 <_CORE_spinlock_Release+0x48> _ISR_Enable( level ); 592c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 5930: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 5934: e12fff1e bx lr <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 5938: e5903008 ldr r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 593c: e3a02000 mov r2, #0 ; 0x0 } /* * Let it be unlocked. */ the_spinlock->users -= 1; 5940: e2433001 sub r3, r3, #1 ; 0x1 5944: e5803008 str r3, [r0, #8] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 5948: e5802004 str r2, [r0, #4] the_spinlock->holder = 0; 594c: e580200c str r2, [r0, #12] _ISR_Enable( level ); 5950: e129f001 msr CPSR_fc, r1 5954: e3a00000 mov r0, #0 ; 0x0 return CORE_SPINLOCK_SUCCESSFUL; } 5958: e12fff1e bx lr 595c: 00010fc4 .word 0x00010fc4 00005960 <_CORE_spinlock_Wait>: bool wait, Watchdog_Interval timeout ) { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 5960: e59f3104 ldr r3, [pc, #260] ; 5a6c <_CORE_spinlock_Wait+0x10c> 5964: e5933000 ldr r3, [r3] CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 5968: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 596c: e1a05002 mov r5, r2 5970: e1a04000 mov r4, r0 5974: e20180ff and r8, r1, #255 ; 0xff ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 5978: e0827003 add r7, r2, r3 _ISR_Disable( level ); 597c: e10f1000 mrs r1, CPSR 5980: e38130c0 orr r3, r1, #192 ; 0xc0 5984: e129f003 msr CPSR_fc, r3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 5988: e5903004 ldr r3, [r0, #4] 598c: e3530001 cmp r3, #1 ; 0x1 5990: 1a000008 bne 59b8 <_CORE_spinlock_Wait+0x58> 5994: e59f30d4 ldr r3, [pc, #212] ; 5a70 <_CORE_spinlock_Wait+0x110> 5998: e5933000 ldr r3, [r3] 599c: e5932008 ldr r2, [r3, #8] 59a0: e590300c ldr r3, [r0, #12] 59a4: e1530002 cmp r3, r2 59a8: 1a000002 bne 59b8 <_CORE_spinlock_Wait+0x58> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 59ac: e129f001 msr CPSR_fc, r1 59b0: e3a00001 mov r0, #1 ; 0x1 59b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 59b8: e5943008 ldr r3, [r4, #8] 59bc: e2833001 add r3, r3, #1 ; 0x1 59c0: e5843008 str r3, [r4, #8] } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 59c4: e59fa0a0 ldr sl, [pc, #160] ; 5a6c <_CORE_spinlock_Wait+0x10c> 59c8: e59f60a4 ldr r6, [pc, #164] ; 5a74 <_CORE_spinlock_Wait+0x114> _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 59cc: e5943004 ldr r3, [r4, #4] 59d0: e3530000 cmp r3, #0 ; 0x0 59d4: 1a000008 bne 59fc <_CORE_spinlock_Wait+0x9c> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 59d8: e2833001 add r3, r3, #1 ; 0x1 59dc: e5843004 str r3, [r4, #4] the_spinlock->holder = _Thread_Executing->Object.id; 59e0: e59f3088 ldr r3, [pc, #136] ; 5a70 <_CORE_spinlock_Wait+0x110> 59e4: e5933000 ldr r3, [r3] 59e8: e5933008 ldr r3, [r3, #8] 59ec: e584300c str r3, [r4, #12] _ISR_Enable( level ); 59f0: e129f001 msr CPSR_fc, r1 59f4: e3a00000 mov r0, #0 ; 0x0 59f8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 59fc: e3580000 cmp r8, #0 ; 0x0 5a00: 1a000005 bne 5a1c <_CORE_spinlock_Wait+0xbc> the_spinlock->users -= 1; 5a04: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 5a08: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 5a0c: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 5a10: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 5a14: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED 5a18: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 5a1c: e3550000 cmp r5, #0 ; 0x0 5a20: 0a000008 beq 5a48 <_CORE_spinlock_Wait+0xe8> 5a24: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5a28: e1570003 cmp r7, r3 <== NOT EXECUTED 5a2c: 8a000005 bhi 5a48 <_CORE_spinlock_Wait+0xe8> <== NOT EXECUTED the_spinlock->users -= 1; 5a30: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 5a34: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 5a38: e5843008 str r3, [r4, #8] <== NOT EXECUTED _ISR_Enable( level ); 5a3c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 5a40: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 5a44: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 5a48: e129f001 msr CPSR_fc, r1 /* An ISR could occur here */ _Thread_Enable_dispatch(); 5a4c: eb000423 bl 6ae0 <_Thread_Enable_dispatch> 5a50: e5963000 ldr r3, [r6] 5a54: e2833001 add r3, r3, #1 ; 0x1 5a58: e5863000 str r3, [r6] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 5a5c: e10f1000 mrs r1, CPSR 5a60: e38130c0 orr r3, r1, #192 ; 0xc0 5a64: e129f003 msr CPSR_fc, r3 5a68: eaffffd7 b 59cc <_CORE_spinlock_Wait+0x6c> 5a6c: 00011064 .word 0x00011064 5a70: 00010fc4 .word 0x00010fc4 5a74: 00010f0c .word 0x00010f0c 0001f050 <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 1f050: e10f2000 mrs r2, CPSR <== NOT EXECUTED 1f054: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 1f058: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 1f05c: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1f060: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 1f064: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 1f068: 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; 1f06c: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 1f070: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 1f074: e12fff1e bx lr <== NOT EXECUTED 00009bb0 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 9bb0: e59f3010 ldr r3, [pc, #16] ; 9bc8 <_Debug_Is_enabled+0x18> <== NOT EXECUTED 9bb4: e5933000 ldr r3, [r3] <== NOT EXECUTED 9bb8: e1100003 tst r0, r3 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 9bbc: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 9bc0: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 9bc4: e12fff1e bx lr <== NOT EXECUTED 9bc8: 000162c8 .word 0x000162c8 00003d54 <_Event_Seize>: rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 3d54: e59fc104 ldr ip, [pc, #260] ; 3e60 <_Event_Seize+0x10c> rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 3d58: e92d40f0 push {r4, r5, r6, r7, lr} rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 3d5c: e59c4000 ldr r4, [ip] executing->Wait.return_code = RTEMS_SUCCESSFUL; 3d60: e3a0c000 mov ip, #0 ; 0x0 3d64: e584c034 str ip, [r4, #52] rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 3d68: e1a07002 mov r7, r2 3d6c: e1a05003 mov r5, r3 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 3d70: e5946104 ldr r6, [r4, #260] _ISR_Disable( level ); 3d74: e10fc000 mrs ip, CPSR 3d78: e38c30c0 orr r3, ip, #192 ; 0xc0 3d7c: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 3d80: e5963000 ldr r3, [r6] seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 3d84: e0102003 ands r2, r0, r3 3d88: 0a000007 beq 3dac <_Event_Seize+0x58> 3d8c: e1520000 cmp r2, r0 3d90: 0a000001 beq 3d9c <_Event_Seize+0x48> 3d94: e3110002 tst r1, #2 ; 0x2 3d98: 0a000003 beq 3dac <_Event_Seize+0x58> (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 3d9c: e1c33002 bic r3, r3, r2 3da0: e5863000 str r3, [r6] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 3da4: e129f00c msr CPSR_fc, ip 3da8: ea000004 b 3dc0 <_Event_Seize+0x6c> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 3dac: e3110001 tst r1, #1 ; 0x1 3db0: 0a000004 beq 3dc8 <_Event_Seize+0x74> _ISR_Enable( level ); 3db4: e129f00c msr CPSR_fc, ip executing->Wait.return_code = RTEMS_UNSATISFIED; 3db8: e3a0300d mov r3, #13 ; 0xd 3dbc: e5843034 str r3, [r4, #52] *event_out = seized_events; 3dc0: e5852000 str r2, [r5] 3dc4: e8bd80f0 pop {r4, r5, r6, r7, pc} return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 3dc8: e59f3094 ldr r3, [pc, #148] ; 3e64 <_Event_Seize+0x110> 3dcc: e3a02001 mov r2, #1 ; 0x1 3dd0: e5832000 str r2, [r3] executing->Wait.option = (uint32_t) option_set; 3dd4: e5841030 str r1, [r4, #48] executing->Wait.count = (uint32_t) event_in; 3dd8: e5840024 str r0, [r4, #36] executing->Wait.return_argument = event_out; 3ddc: e5845028 str r5, [r4, #40] _ISR_Enable( level ); 3de0: e129f00c msr CPSR_fc, ip if ( ticks ) { 3de4: e3570000 cmp r7, #0 ; 0x0 3de8: 0a00000a beq 3e18 <_Event_Seize+0xc4> _Watchdog_Initialize( 3dec: e5943008 ldr r3, [r4, #8] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3df0: e59f2070 ldr r2, [pc, #112] ; 3e68 <_Event_Seize+0x114> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3df4: e3a01000 mov r1, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 3df8: e584106c str r1, [r4, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3dfc: e5841050 str r1, [r4, #80] the_watchdog->routine = routine; 3e00: e5842064 str r2, [r4, #100] the_watchdog->id = id; 3e04: e5843068 str r3, [r4, #104] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3e08: e5847054 str r7, [r4, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3e0c: e59f0058 ldr r0, [pc, #88] ; 3e6c <_Event_Seize+0x118> 3e10: e2841048 add r1, r4, #72 ; 0x48 3e14: eb000d52 bl 7364 <_Watchdog_Insert> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 3e18: e1a00004 mov r0, r4 3e1c: e3a01c01 mov r1, #256 ; 0x100 3e20: eb000b71 bl 6bec <_Thread_Set_state> _ISR_Disable( level ); 3e24: e10fc000 mrs ip, CPSR 3e28: e38c30c0 orr r3, ip, #192 ; 0xc0 3e2c: e129f003 msr CPSR_fc, r3 sync_state = _Event_Sync_state; 3e30: e59f202c ldr r2, [pc, #44] ; 3e64 <_Event_Seize+0x110> 3e34: e5920000 ldr r0, [r2] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 3e38: e3a03000 mov r3, #0 ; 0x0 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 3e3c: 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; 3e40: e5823000 str r3, [r2] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 3e44: 1a000001 bne 3e50 <_Event_Seize+0xfc> _ISR_Enable( level ); 3e48: e129f00c msr CPSR_fc, ip 3e4c: e8bd80f0 pop {r4, r5, r6, r7, pc} * 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 ); 3e50: e1a01004 mov r1, r4 <== NOT EXECUTED 3e54: e1a0200c mov r2, ip <== NOT EXECUTED } 3e58: e8bd40f0 pop {r4, r5, r6, r7, 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 ); 3e5c: ea00078a b 5c8c <_Thread_blocking_operation_Cancel> <== NOT EXECUTED 3e60: 000162c4 .word 0x000162c4 3e64: 00016ab0 .word 0x00016ab0 3e68: 00004004 .word 0x00004004 3e6c: 000162e4 .word 0x000162e4 00003ec8 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 3ec8: e92d40f0 push {r4, r5, r6, r7, lr} 3ecc: e1a04000 mov r4, r0 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 3ed0: e5906104 ldr r6, [r0, #260] option_set = (rtems_option) the_thread->Wait.option; 3ed4: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 3ed8: e10f5000 mrs r5, CPSR 3edc: e38530c0 orr r3, r5, #192 ; 0xc0 3ee0: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 3ee4: e596c000 ldr ip, [r6] event_condition = (rtems_event_set) the_thread->Wait.count; 3ee8: e5902024 ldr r2, [r0, #36] seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 3eec: e012000c ands r0, r2, ip 3ef0: 1a000001 bne 3efc <_Event_Surrender+0x34> _ISR_Enable( level ); 3ef4: e129f005 msr CPSR_fc, r5 3ef8: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 3efc: e59f30f0 ldr r3, [pc, #240] ; 3ff4 <_Event_Surrender+0x12c> 3f00: e5933000 ldr r3, [r3] 3f04: e3530000 cmp r3, #0 ; 0x0 3f08: 0a000019 beq 3f74 <_Event_Surrender+0xac> 3f0c: e59f30e4 ldr r3, [pc, #228] ; 3ff8 <_Event_Surrender+0x130> 3f10: e5933000 ldr r3, [r3] 3f14: e1540003 cmp r4, r3 3f18: 1a000015 bne 3f74 <_Event_Surrender+0xac> 3f1c: e59f10d8 ldr r1, [pc, #216] ; 3ffc <_Event_Surrender+0x134> <== NOT EXECUTED 3f20: e5913000 ldr r3, [r1] <== NOT EXECUTED 3f24: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 3f28: 0a000002 beq 3f38 <_Event_Surrender+0x70> <== NOT EXECUTED 3f2c: e5913000 ldr r3, [r1] <== NOT EXECUTED 3f30: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 3f34: 1a00000e bne 3f74 <_Event_Surrender+0xac> <== 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) ) { 3f38: e1500002 cmp r0, r2 <== NOT EXECUTED 3f3c: 0a000001 beq 3f48 <_Event_Surrender+0x80> <== NOT EXECUTED 3f40: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 3f44: 0a000008 beq 3f6c <_Event_Surrender+0xa4> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 3f48: e1cc3000 bic r3, ip, r0 <== NOT EXECUTED 3f4c: e5863000 str r3, [r6] <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 3f50: e59f30a4 ldr r3, [pc, #164] ; 3ffc <_Event_Surrender+0x134> <== 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; 3f54: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 3f58: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 3f5c: e5832000 str r2, [r3] <== 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; 3f60: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3f64: e5843024 str r3, [r4, #36] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3f68: e5810000 str r0, [r1] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 3f6c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 3f70: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 3f74: e5943010 ldr r3, [r4, #16] 3f78: e3130c01 tst r3, #256 ; 0x100 3f7c: 0a00001a beq 3fec <_Event_Surrender+0x124> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 3f80: e1500002 cmp r0, r2 3f84: 0a000001 beq 3f90 <_Event_Surrender+0xc8> 3f88: e3170002 tst r7, #2 ; 0x2 3f8c: 0a000016 beq 3fec <_Event_Surrender+0x124> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 3f90: e1cc3000 bic r3, ip, r0 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3f94: e5942028 ldr r2, [r4, #40] /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 3f98: e5863000 str r3, [r6] the_thread->Wait.count = 0; 3f9c: e3a03000 mov r3, #0 ; 0x0 3fa0: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3fa4: e5820000 str r0, [r2] _ISR_Flash( level ); 3fa8: e10f3000 mrs r3, CPSR 3fac: e129f005 msr CPSR_fc, r5 3fb0: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3fb4: e5943050 ldr r3, [r4, #80] 3fb8: e3530002 cmp r3, #2 ; 0x2 3fbc: 0a000001 beq 3fc8 <_Event_Surrender+0x100> _ISR_Enable( level ); 3fc0: e129f005 msr CPSR_fc, r5 3fc4: ea000004 b 3fdc <_Event_Surrender+0x114> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 3fc8: e3a03003 mov r3, #3 ; 0x3 3fcc: e5843050 str r3, [r4, #80] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3fd0: e129f005 msr CPSR_fc, r5 (void) _Watchdog_Remove( &the_thread->Timer ); 3fd4: e2840048 add r0, r4, #72 ; 0x48 3fd8: eb000d3d bl 74d4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3fdc: e59f101c ldr r1, [pc, #28] ; 4000 <_Event_Surrender+0x138> 3fe0: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 3fe4: e8bd40f0 pop {r4, r5, r6, r7, lr} 3fe8: ea0007a2 b 5e78 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 3fec: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 3ff0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 3ff4: 000162a0 .word 0x000162a0 3ff8: 000162c4 .word 0x000162c4 3ffc: 00016ab0 .word 0x00016ab0 4000: 1003fff8 .word 0x1003fff8 00004004 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 4004: e52de004 push {lr} ; (str lr, [sp, #-4]!) 4008: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400c: e1a0100d mov r1, sp 4010: eb0008a1 bl 629c <_Thread_Get> switch ( location ) { 4014: e59d2000 ldr r2, [sp] 4018: e3520000 cmp r2, #0 ; 0x0 401c: 1a00001e bne 409c <_Event_Timeout+0x98> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 4020: e10f1000 mrs r1, CPSR 4024: e38130c0 orr r3, r1, #192 ; 0xc0 4028: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 402c: e5903024 ldr r3, [r0, #36] 4030: e3530000 cmp r3, #0 ; 0x0 4034: 1a000005 bne 4050 <_Event_Timeout+0x4c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4038: e59f2064 ldr r2, [pc, #100] ; 40a4 <_Event_Timeout+0xa0> <== NOT EXECUTED 403c: e5923000 ldr r3, [r2] <== NOT EXECUTED 4040: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 4044: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4048: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 404c: ea000012 b 409c <_Event_Timeout+0x98> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 4050: e59f3050 ldr r3, [pc, #80] ; 40a8 <_Event_Timeout+0xa4> 4054: e5933000 ldr r3, [r3] 4058: e1500003 cmp r0, r3 _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 405c: e5802024 str r2, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 4060: 1a000004 bne 4078 <_Event_Timeout+0x74> Thread_blocking_operation_States sync = _Event_Sync_state; 4064: e59f2040 ldr r2, [pc, #64] ; 40ac <_Event_Timeout+0xa8> <== NOT EXECUTED 4068: e5923000 ldr r3, [r2] <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 406c: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4070: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED 4074: 95823000 strls r3, [r2] <== NOT EXECUTED } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 4078: e3a03006 mov r3, #6 ; 0x6 407c: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 4080: e129f001 msr CPSR_fc, r1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4084: e59f1024 ldr r1, [pc, #36] ; 40b0 <_Event_Timeout+0xac> 4088: eb00077a bl 5e78 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 408c: e59f2010 ldr r2, [pc, #16] ; 40a4 <_Event_Timeout+0xa0> 4090: e5923000 ldr r3, [r2] 4094: e2433001 sub r3, r3, #1 ; 0x1 4098: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 409c: e28dd004 add sp, sp, #4 ; 0x4 40a0: e8bd8000 pop {pc} 40a4: 0001620c .word 0x0001620c 40a8: 000162c4 .word 0x000162c4 40ac: 00016ab0 .word 0x00016ab0 40b0: 1003fff8 .word 0x1003fff8 00009e60 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 9e60: e92d4070 push {r4, r5, r6, lr} 9e64: e1a04000 mov r4, r0 Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 9e68: e5942014 ldr r2, [r4, #20] 9e6c: e1a00001 mov r0, r1 9e70: e5941010 ldr r1, [r4, #16] 9e74: ebffed5c bl 53ec <_Heap_Calc_block_size> _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 9e78: e3500000 cmp r0, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 9e7c: 15945008 ldrne r5, [r4, #8] 9e80: 13a06000 movne r6, #0 ; 0x0 9e84: 1a000012 bne 9ed4 <_Heap_Allocate+0x74> 9e88: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 9e8c: e5953004 ldr r3, [r5, #4] 9e90: e1530000 cmp r3, r0 9e94: 3a00000c bcc 9ecc <_Heap_Allocate+0x6c> (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 9e98: e1a02000 mov r2, r0 9e9c: e1a01005 mov r1, r5 9ea0: e1a00004 mov r0, r4 9ea4: ebffed60 bl 542c <_Heap_Block_allocate> ptr = _Heap_User_area(the_block); stats->allocs += 1; stats->searches += search_count + 1; 9ea8: e2842048 add r2, r4, #72 ; 0x48 9eac: e892000c ldm r2, {r2, r3} 9eb0: e2833001 add r3, r3, #1 ; 0x1 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 9eb4: e2822001 add r2, r2, #1 ; 0x1 stats->searches += search_count + 1; 9eb8: e0833006 add r3, r3, r6 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 9ebc: e5842048 str r2, [r4, #72] stats->searches += search_count + 1; 9ec0: e584304c str r3, [r4, #76] 9ec4: e2850008 add r0, r5, #8 ; 0x8 9ec8: ea000004 b 9ee0 <_Heap_Allocate+0x80> return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 9ecc: e5955008 ldr r5, [r5, #8] 9ed0: e2866001 add r6, r6, #1 ; 0x1 if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 9ed4: e1550004 cmp r5, r4 9ed8: 1affffeb bne 9e8c <_Heap_Allocate+0x2c> 9edc: e3a00000 mov r0, #0 ; 0x0 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 9ee0: e5943044 ldr r3, [r4, #68] 9ee4: e1530006 cmp r3, r6 stats->max_search = search_count; 9ee8: 35846044 strcc r6, [r4, #68] return ptr; } 9eec: e8bd8070 pop {r4, r5, r6, pc} 00028744 <_Heap_Get_information>: Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 28744: e3a03000 mov r3, #0 ; 0x0 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 28748: e92d4030 push {r4, r5, lr} 2874c: 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; 28750: e5813010 str r3, [r1, #16] Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 28754: e5905024 ldr r5, [r0, #36] _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 28758: e5813000 str r3, [r1] the_info->Free.total = 0; 2875c: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 28760: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 28764: e581300c str r3, [r1, #12] the_info->Used.total = 0; 28768: e5813014 str r3, [r1, #20] Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 2876c: e5902020 ldr r2, [r0, #32] 28770: ea00001e b 287f0 <_Heap_Get_information+0xac> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 28774: e5923004 ldr r3, [r2, #4] 28778: e3c30001 bic r0, r3, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 2877c: e0824000 add r4, r2, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 28780: e5943004 ldr r3, [r4, #4] 28784: e3130001 tst r3, #1 ; 0x1 28788: 0a000009 beq 287b4 <_Heap_Get_information+0x70> the_info->Used.number++; 2878c: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 28790: e59c1014 ldr r1, [ip, #20] if ( the_info->Used.largest < the_size ) 28794: 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++; 28798: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 2879c: 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; 287a0: 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++; 287a4: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 287a8: e58c1014 str r1, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 287ac: 358c0010 strcc r0, [ip, #16] 287b0: ea00000d b 287ec <_Heap_Get_information+0xa8> } else { the_info->Free.number++; 287b4: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 287b8: e59c1008 ldr r1, [ip, #8] if ( the_info->Free.largest < the_size ) 287bc: 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++; 287c0: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 287c4: 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; 287c8: e0811000 add r1, r1, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 287cc: 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++; 287d0: e58c3000 str r3, [ip] the_info->Free.total += the_size; 287d4: 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 ) 287d8: e5943000 ldr r3, [r4] 287dc: e1500003 cmp r0, r3 287e0: 0a000001 beq 287ec <_Heap_Get_information+0xa8> 287e4: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 287e8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 287ec: 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 ) { 287f0: e1520005 cmp r2, r5 287f4: 1affffde bne 28774 <_Heap_Get_information+0x30> } /* Handle the last dummy block. Don't consider this block to be "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; 287f8: e59c3014 ldr r3, [ip, #20] 287fc: e2833008 add r3, r3, #8 ; 0x8 28800: e58c3014 str r3, [ip, #20] 28804: e3a00000 mov r0, #0 ; 0x0 return HEAP_GET_INFORMATION_SUCCESSFUL; } 28808: e8bd8030 pop {r4, r5, pc} 00013de4 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13de4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13de8: e1a05000 mov r5, r0 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; 13dec: e5900014 ldr r0, [r0, #20] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13df0: e24dd00c sub sp, sp, #12 ; 0xc Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 13df4: e58d0004 str r0, [sp, #4] uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; *avail_mem_size = 0; 13df8: e59d0030 ldr r0, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13dfc: 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; 13e00: e3a03000 mov r3, #0 ; 0x0 uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 13e04: e595c010 ldr ip, [r5, #16] *old_mem_size = 0; 13e08: e5893000 str r3, [r9] *avail_mem_size = 0; 13e0c: e5803000 str r3, [r0] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13e10: 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); 13e14: e1a00001 mov r0, r1 13e18: e5951010 ldr r1, [r5, #16] 13e1c: e1a08002 mov r8, r2 uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 13e20: e58dc008 str ip, [sp, #8] 13e24: ebfff8ca bl 12154 <__umodsi3> 13e28: e2443008 sub r3, r4, #8 ; 0x8 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 13e2c: e2851020 add r1, r5, #32 ; 0x20 13e30: e8910006 ldm r1, {r1, r2} /* 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); 13e34: e0607003 rsb r7, r0, r3 *old_mem_size = 0; *avail_mem_size = 0; _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 13e38: e1570001 cmp r7, r1 13e3c: 33a03000 movcc r3, #0 ; 0x0 13e40: 23a03001 movcs r3, #1 ; 0x1 13e44: e1570002 cmp r7, r2 13e48: 83a03000 movhi r3, #0 ; 0x0 13e4c: e3530000 cmp r3, #0 ; 0x0 13e50: 0a000075 beq 1402c <_Heap_Resize_block+0x248> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 13e54: e597c004 ldr ip, [r7, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13e58: e3cc3001 bic r3, ip, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 13e5c: e0876003 add r6, r7, r3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13e60: e58d3000 str r3, [sp] old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 13e64: e1560001 cmp r6, r1 13e68: 33a03000 movcc r3, #0 ; 0x0 13e6c: 23a03001 movcs r3, #1 ; 0x1 13e70: e1560002 cmp r6, r2 13e74: 83a03000 movhi r3, #0 ; 0x0 13e78: e3530000 cmp r3, #0 ; 0x0 13e7c: 0a00006a beq 1402c <_Heap_Resize_block+0x248> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 13e80: e5963004 ldr r3, [r6, #4] 13e84: e3130001 tst r3, #1 ; 0x1 13e88: 0a000067 beq 1402c <_Heap_Resize_block+0x248> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13e8c: e3c3a001 bic sl, r3, #1 ; 0x1 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 13e90: e1560002 cmp r6, r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 13e94: e086300a add r3, r6, sl 13e98: 15933004 ldrne r3, [r3, #4] 13e9c: 12032001 andne r2, r3, #1 ; 0x1 _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 13ea0: e0643006 rsb r3, r4, r6 13ea4: e2830004 add r0, r3, #4 ; 0x4 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 13ea8: 03a02001 moveq 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) { 13eac: e1580000 cmp r8, r0 /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 13eb0: e5890000 str r0, [r9] !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 13eb4: e202b0ff and fp, r2, #255 ; 0xff _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 13eb8: e20c9001 and r9, ip, #1 ; 0x1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 13ebc: 9a000019 bls 13f28 <_Heap_Resize_block+0x144> /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 13ec0: e35b0000 cmp fp, #0 ; 0x0 13ec4: 1a00005a bne 14034 <_Heap_Resize_block+0x250> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 13ec8: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 13ecc: e1a00004 mov r0, r4 13ed0: e59d1008 ldr r1, [sp, #8] 13ed4: ebfff89e bl 12154 <__umodsi3> *value = r ? v - r + a : v; 13ed8: e3500000 cmp r0, #0 ; 0x0 13edc: 159dc008 ldrne ip, [sp, #8] 13ee0: e59d2004 ldr r2, [sp, #4] 13ee4: 1084300c addne r3, r4, ip 13ee8: 10604003 rsbne r4, r0, r3 13eec: e1540002 cmp r4, r2 13ef0: 21a02004 movcs r2, r4 _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 13ef4: e152000a cmp r2, sl 13ef8: 8a00004d bhi 14034 <_Heap_Resize_block+0x250> return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 13efc: e1a01006 mov r1, r6 13f00: e1a00005 mov r0, r5 13f04: ebffc548 bl 542c <_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; 13f08: e59d2000 ldr r2, [sp] 13f0c: e0800002 add r0, r0, r2 13f10: e1800009 orr r0, r0, r9 13f14: e5870004 str r0, [r7, #4] --stats->used_blocks; 13f18: e5953040 ldr r3, [r5, #64] 13f1c: e2433001 sub r3, r3, #1 ; 0x1 13f20: e5853040 str r3, [r5, #64] 13f24: ea00003b b 14018 <_Heap_Resize_block+0x234> } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 13f28: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 13f2c: e1a00004 mov r0, r4 13f30: e59d1008 ldr r1, [sp, #8] 13f34: ebfff886 bl 12154 <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 13f38: e0544000 subs r4, r4, r0 13f3c: 0a000035 beq 14018 <_Heap_Resize_block+0x234> /* 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; 13f40: e89d1008 ldm sp, {r3, ip} 13f44: e0640003 rsb r0, r4, r3 if (new_block_size < min_block_size) { 13f48: e150000c cmp r0, ip 13f4c: 2a000007 bcs 13f70 <_Heap_Resize_block+0x18c> uint32_t delta = min_block_size - new_block_size; 13f50: e060300c rsb r3, r0, ip _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 13f54: e0544003 subs r4, r4, r3 ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 13f58: 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) { ++stats->resizes; 13f5c: 05953054 ldreq r3, [r5, #84] 13f60: 02833001 addeq r3, r3, #1 ; 0x1 13f64: 05853054 streq r3, [r5, #84] 13f68: 01a00004 moveq r0, r4 13f6c: 0a000031 beq 14038 <_Heap_Resize_block+0x254> _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) { 13f70: e35b0000 cmp fp, #0 ; 0x0 13f74: 1a000013 bne 13fc8 <_Heap_Resize_block+0x1e4> /* 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; 13f78: e084200a add r2, r4, sl RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 13f7c: e0871000 add r1, r7, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 13f80: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 13f84: e3820001 orr r0, r2, #1 ; 0x1 Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 13f88: e5873004 str r3, [r7, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 13f8c: e786200a str r2, [r6, sl] _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 13f90: 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; 13f94: e5953030 ldr r3, [r5, #48] 13f98: e0833004 add r3, r3, r4 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 13f9c: e596000c ldr r0, [r6, #12] Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 13fa0: e596c008 ldr ip, [r6, #8] 13fa4: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 13fa8: e59d3030 ldr r3, [sp, #48] 13fac: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 13fb0: e581c008 str ip, [r1, #8] block->prev = prev; 13fb4: e581000c str r0, [r1, #12] 13fb8: e5832000 str r2, [r3] next->prev = prev->next = block; 13fbc: e5801008 str r1, [r0, #8] 13fc0: e58c100c str r1, [ip, #12] 13fc4: ea000013 b 14018 <_Heap_Resize_block+0x234> } else if (free_block_size >= min_block_size) { 13fc8: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 13fcc: e154000c cmp r4, ip <== NOT EXECUTED 13fd0: 3a000010 bcc 14018 <_Heap_Resize_block+0x234> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 13fd4: e0871000 add r1, r7, r0 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 13fd8: 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; 13fdc: 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; 13fe0: e5873004 str r3, [r7, #4] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 13fe4: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 13fe8: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 13fec: 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 */ 13ff0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 13ff4: 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 */ 13ff8: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 13ffc: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 14000: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED 14004: e1a00005 mov r0, r5 <== NOT EXECUTED 14008: ebffd7b8 bl 9ef0 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 1400c: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED 14010: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 14014: e5803000 str r3, [r0] <== NOT EXECUTED } } } ++stats->resizes; 14018: e5953054 ldr r3, [r5, #84] 1401c: e2833001 add r3, r3, #1 ; 0x1 14020: e5853054 str r3, [r5, #84] 14024: e3a00000 mov r0, #0 ; 0x0 14028: ea000002 b 14038 <_Heap_Resize_block+0x254> return HEAP_RESIZE_SUCCESSFUL; 1402c: e3a00002 mov r0, #2 ; 0x2 14030: ea000000 b 14038 <_Heap_Resize_block+0x254> 14034: e3a00001 mov r0, #1 ; 0x1 } 14038: e28dd00c add sp, sp, #12 ; 0xc 1403c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0000d4e0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { d4e0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; d4e4: e5907020 ldr r7, [r0, #32] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { d4e8: e5973004 ldr r3, [r7, #4] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) d4ec: e2516000 subs r6, r1, #0 ; 0x0 source = the_heap->stats.instance; d4f0: b5906028 ldrlt r6, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { d4f4: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { d4f8: e1a05000 mov r5, r0 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; d4fc: e590b024 ldr fp, [r0, #36] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { d500: 13a04000 movne r4, #0 ; 0x0 d504: 1a000003 bne d518 <_Heap_Walk+0x38> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); d508: e59f01a0 ldr r0, [pc, #416] ; d6b0 <_Heap_Walk+0x1d0> <== NOT EXECUTED d50c: e1a01006 mov r1, r6 <== NOT EXECUTED d510: ebffdc3f bl 4614 <== NOT EXECUTED d514: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { d518: e5972000 ldr r2, [r7] d51c: e5953010 ldr r3, [r5, #16] d520: e1520003 cmp r2, r3 d524: 0a00004c beq d65c <_Heap_Walk+0x17c> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); d528: e59f0184 ldr r0, [pc, #388] ; d6b4 <_Heap_Walk+0x1d4> <== NOT EXECUTED d52c: e1a01006 mov r1, r6 <== NOT EXECUTED d530: ebffdc37 bl 4614 <== NOT EXECUTED d534: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED d538: ea000047 b d65c <_Heap_Walk+0x17c> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); d53c: e5979004 ldr r9, [r7, #4] printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { d540: e5952020 ldr r2, [r5, #32] d544: e3c9a001 bic sl, r9, #1 ; 0x1 d548: e5953024 ldr r3, [r5, #36] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); d54c: e087800a add r8, r7, sl d550: e1580002 cmp r8, r2 d554: 33a01000 movcc r1, #0 ; 0x0 d558: 23a01001 movcs r1, #1 ; 0x1 d55c: e1580003 cmp r8, r3 d560: 83a01000 movhi r1, #0 ; 0x0 d564: e3510000 cmp r1, #0 ; 0x0 d568: 1a000004 bne d580 <_Heap_Walk+0xa0> if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); d56c: e1a02008 mov r2, r8 <== NOT EXECUTED d570: e59f0140 ldr r0, [pc, #320] ; d6b8 <_Heap_Walk+0x1d8> <== NOT EXECUTED d574: e1a01006 mov r1, r6 <== NOT EXECUTED d578: ebffdc25 bl 4614 <== NOT EXECUTED d57c: ea000039 b d668 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { d580: e5983004 ldr r3, [r8, #4] d584: e3130001 tst r3, #1 ; 0x1 d588: 1a00001e bne d608 <_Heap_Walk+0x128> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { d58c: e5983000 ldr r3, [r8] d590: e15a0003 cmp sl, r3 d594: 0a000003 beq d5a8 <_Heap_Walk+0xc8> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); d598: e59f011c ldr r0, [pc, #284] ; d6bc <_Heap_Walk+0x1dc> <== NOT EXECUTED d59c: e1a01006 mov r1, r6 <== NOT EXECUTED d5a0: ebffdc1b bl 4614 <== NOT EXECUTED d5a4: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { d5a8: e3190001 tst r9, #1 ; 0x1 d5ac: 1a000006 bne d5cc <_Heap_Walk+0xec> if (do_dump || error) printk("\n"); d5b0: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED d5b4: 159f0104 ldrne r0, [pc, #260] ; d6c0 <_Heap_Walk+0x1e0> <== NOT EXECUTED d5b8: 1bffdc15 blne 4614 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); d5bc: e59f0100 ldr r0, [pc, #256] ; d6c4 <_Heap_Walk+0x1e4> <== NOT EXECUTED d5c0: e1a01006 mov r1, r6 <== NOT EXECUTED d5c4: ebffdc12 bl 4614 <== NOT EXECUTED d5c8: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; d5cc: e5953008 ldr r3, [r5, #8] d5d0: ea000000 b d5d8 <_Heap_Walk+0xf8> } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; d5d4: 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) d5d8: e1530007 cmp r3, r7 d5dc: 11530005 cmpne r3, r5 d5e0: 1afffffb bne d5d4 <_Heap_Walk+0xf4> block = block->next; if(block != the_block) { d5e4: e1530007 cmp r3, r7 d5e8: 0a000006 beq d608 <_Heap_Walk+0x128> if (do_dump || error) printk("\n"); d5ec: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED d5f0: 159f00c8 ldrne r0, [pc, #200] ; d6c0 <_Heap_Walk+0x1e0> <== NOT EXECUTED d5f4: 1bffdc06 blne 4614 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); d5f8: e59f00c8 ldr r0, [pc, #200] ; d6c8 <_Heap_Walk+0x1e8> <== NOT EXECUTED d5fc: e1a01006 mov r1, r6 <== NOT EXECUTED d600: ebffdc03 bl 4614 <== NOT EXECUTED d604: ea000001 b d610 <_Heap_Walk+0x130> <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); d608: e3540000 cmp r4, #0 ; 0x0 d60c: 0a000002 beq d61c <_Heap_Walk+0x13c> d610: e59f00a8 ldr r0, [pc, #168] ; d6c0 <_Heap_Walk+0x1e0> <== NOT EXECUTED d614: ebffdbfe bl 4614 <== NOT EXECUTED d618: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { d61c: e5953014 ldr r3, [r5, #20] d620: e15a0003 cmp sl, r3 printk("PASS: %d !block size is too small\n", source); d624: 359f00a0 ldrcc r0, [pc, #160] ; d6cc <_Heap_Walk+0x1ec> d628: 3a000005 bcc d644 <_Heap_Walk+0x164> error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { d62c: e1a0000a mov r0, sl d630: e5951010 ldr r1, [r5, #16] d634: eb0026bf bl 17138 <__umodsi3> d638: e3500000 cmp r0, #0 ; 0x0 d63c: 0a000003 beq d650 <_Heap_Walk+0x170> printk("PASS: %d !block size is misaligned\n", source); d640: e59f0088 ldr r0, [pc, #136] ; d6d0 <_Heap_Walk+0x1f0> <== NOT EXECUTED d644: e1a01006 mov r1, r6 <== NOT EXECUTED d648: ebffdbf1 bl 4614 <== NOT EXECUTED d64c: ea000005 b d668 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; } if (++passes > (do_dump ? 10 : 0) && error) d650: e3540000 cmp r4, #0 ; 0x0 d654: 1a000003 bne d668 <_Heap_Walk+0x188> break; d658: e1a07008 mov r7, r8 if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { d65c: e157000b cmp r7, fp d660: 1affffb5 bne d53c <_Heap_Walk+0x5c> d664: ea000005 b d680 <_Heap_Walk+0x1a0> the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", d668: e1a0300b mov r3, fp <== NOT EXECUTED d66c: e59f0060 ldr r0, [pc, #96] ; d6d4 <_Heap_Walk+0x1f4> <== NOT EXECUTED d670: e1a01006 mov r1, r6 <== NOT EXECUTED d674: e1a02007 mov r2, r7 <== NOT EXECUTED d678: ebffdbe5 bl 4614 <== NOT EXECUTED d67c: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); d680: e5973004 ldr r3, [r7, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { d684: e5950010 ldr r0, [r5, #16] d688: e3c32001 bic r2, r3, #1 ; 0x1 d68c: e1520000 cmp r2, r0 d690: 0a000004 beq d6a8 <_Heap_Walk+0x1c8> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, d694: e1a03000 mov r3, r0 <== NOT EXECUTED d698: e1a01006 mov r1, r6 <== NOT EXECUTED d69c: e59f0034 ldr r0, [pc, #52] ; d6d8 <_Heap_Walk+0x1f8> <== NOT EXECUTED d6a0: ebffdbdb bl 4614 <== NOT EXECUTED d6a4: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } d6a8: e1a00004 mov r0, r4 d6ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} d6b0: 0001ad22 .word 0x0001ad22 d6b4: 0001ad58 .word 0x0001ad58 d6b8: 0001ad8a .word 0x0001ad8a d6bc: 0001adad .word 0x0001adad d6c0: 0001a725 .word 0x0001a725 d6c4: 0001add8 .word 0x0001add8 d6c8: 0001ae02 .word 0x0001ae02 d6cc: 0001ae2b .word 0x0001ae2b d6d0: 0001ae4e .word 0x0001ae4e d6d4: 0001ae72 .word 0x0001ae72 d6d8: 0001aead .word 0x0001aead 0000a0e4 <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { a0e4: e2400001 sub r0, r0, #1 ; 0x1 a0e8: e3500003 cmp r0, #3 ; 0x3 a0ec: 979ff100 ldrls pc, [pc, r0, lsl #2] a0f0: ea00000b b a124 <_Objects_API_maximum_class+0x40> a0f4: 0000a10c .word 0x0000a10c <== NOT EXECUTED a0f8: 0000a104 .word 0x0000a104 <== NOT EXECUTED a0fc: 0000a114 .word 0x0000a114 <== NOT EXECUTED a100: 0000a11c .word 0x0000a11c <== NOT EXECUTED a104: e3a0000a mov r0, #10 ; 0xa a108: e12fff1e bx lr a10c: e3a00002 mov r0, #2 ; 0x2 a110: e12fff1e bx lr a114: e3a0000c mov r0, #12 ; 0xc a118: 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; a11c: e3a00008 mov r0, #8 ; 0x8 a120: e12fff1e bx lr case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; a124: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } a128: e12fff1e bx lr 000055e0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 55e0: 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; 55e4: e1d060b8 ldrh r6, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 55e8: e1d041b0 ldrh r4, [r0, #16] 55ec: e1540006 cmp r4, r6 55f0: 33a07000 movcc r7, #0 ; 0x0 */ void _Objects_Extend_information( Objects_Information *information ) { 55f4: e24dd014 sub sp, sp, #20 ; 0x14 55f8: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 55fc: 31a0a006 movcc sl, r6 5600: 31a08007 movcc r8, r7 5604: 3a00000f bcc 5648 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; 5608: e5909014 ldr r9, [r0, #20] 560c: e1a00004 mov r0, r4 5610: e1a01009 mov r1, r9 5614: eb00328a bl 12044 <__aeabi_uidiv> 5618: e1a0a006 mov sl, r6 561c: e1a07000 mov r7, r0 5620: e3a08000 mov r8, #0 ; 0x0 5624: ea000005 b 5640 <_Objects_Extend_information+0x60> for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 5628: e5953034 ldr r3, [r5, #52] 562c: e7933108 ldr r3, [r3, r8, lsl #2] 5630: e3530000 cmp r3, #0 ; 0x0 5634: 0a000003 beq 5648 <_Objects_Extend_information+0x68> break; else index_base += information->allocation_size; 5638: e08aa009 add sl, sl, r9 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 563c: e2888001 add r8, r8, #1 ; 0x1 5640: e1580007 cmp r8, r7 5644: 3afffff7 bcc 5628 <_Objects_Extend_information+0x48> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 5648: e15a0004 cmp sl, r4 564c: 3a000056 bcc 57ac <_Objects_Extend_information+0x1cc> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5650: e5d52012 ldrb r2, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5654: e5953014 ldr r3, [r5, #20] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5658: e3520000 cmp r2, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 565c: e0843003 add r3, r4, r3 5660: e58d3004 str r3, [sp, #4] /* * Up the block count and maximum */ block_count++; 5664: e2874001 add r4, r7, #1 ; 0x1 5668: e0832006 add r2, r3, r6 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 566c: 0a000007 beq 5690 <_Objects_Extend_information+0xb0> object_blocks = (void**) 5670: e3a03003 mov r3, #3 ; 0x3 5674: e0202493 mla r0, r3, r4, r2 5678: e1a00100 lsl r0, r0, #2 567c: eb0007e6 bl 761c <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 5680: e3500000 cmp r0, #0 ; 0x0 5684: e58d0000 str r0, [sp] 5688: 1a000005 bne 56a4 <_Objects_Extend_information+0xc4> 568c: ea000078 b 5874 <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { object_blocks = (void**) 5690: e3a03003 mov r3, #3 ; 0x3 5694: e0202493 mla r0, r3, r4, r2 5698: e1a00100 lsl r0, r0, #2 569c: eb0007e2 bl 762c <_Workspace_Allocate_or_fatal_error> 56a0: e58d0000 str r0, [sp] * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 56a4: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 56a8: e59d1000 ldr r1, [sp] 56ac: e1a02104 lsl r2, r4, #2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 56b0: e1530006 cmp r3, r6 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 56b4: e081b002 add fp, r1, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 56b8: 93a03000 movls r3, #0 ; 0x0 56bc: e08b9002 add r9, fp, r2 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 56c0: 91a02003 movls r2, r3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 56c4: 9a000011 bls 5710 <_Objects_Extend_information+0x130> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 56c8: e1a04107 lsl r4, r7, #2 56cc: e5951034 ldr r1, [r5, #52] 56d0: e1a02004 mov r2, r4 56d4: e59d0000 ldr r0, [sp] 56d8: eb0018f8 bl bac0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 56dc: e1a02004 mov r2, r4 56e0: e5951030 ldr r1, [r5, #48] 56e4: e1a0000b mov r0, fp 56e8: eb0018f4 bl bac0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 56ec: e1d521b0 ldrh r2, [r5, #16] 56f0: e0862002 add r2, r6, r2 56f4: e1a02102 lsl r2, r2, #2 56f8: e1a00009 mov r0, r9 56fc: e595101c ldr r1, [r5, #28] 5700: eb0018ee bl bac0 5704: ea000003 b 5718 <_Objects_Extend_information+0x138> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 5708: e7892103 str r2, [r9, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 570c: e2833001 add r3, r3, #1 ; 0x1 5710: e1530006 cmp r3, r6 5714: 3afffffb bcc 5708 <_Objects_Extend_information+0x128> /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5718: e3a03000 mov r3, #0 ; 0x0 inactive_per_block[block_count] = 0; 571c: e78b3107 str r3, [fp, r7, lsl #2] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5720: e59dc000 ldr ip, [sp] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5724: e5952014 ldr r2, [r5, #20] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5728: e78c3107 str r3, [ip, r7, lsl #2] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 572c: e08a0002 add r0, sl, r2 5730: e089110a add r1, r9, sl, lsl #2 5734: e1a0200a mov r2, sl 5738: ea000000 b 5740 <_Objects_Extend_information+0x160> index++ ) { local_table[ index ] = NULL; 573c: e5013004 str r3, [r1, #-4] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5740: e1520000 cmp r2, r0 index++ ) { 5744: e2811004 add r1, r1, #4 ; 0x4 5748: e2822001 add r2, r2, #1 ; 0x1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 574c: 3afffffa bcc 573c <_Objects_Extend_information+0x15c> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 5750: e10f0000 mrs r0, CPSR 5754: e38030c0 orr r3, r0, #192 ; 0xc0 5758: 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( 575c: 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; 5760: e59dc004 ldr ip, [sp, #4] information->maximum_id = _Objects_Build_id( 5764: e1d510b4 ldrh r1, [r5, #4] 5768: 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; 576c: e1a0280c lsl r2, ip, #16 information->maximum_id = _Objects_Build_id( 5770: 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; 5774: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 5778: e1833d81 orr r3, r3, r1, lsl #27 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 577c: e59d1000 ldr r1, [sp] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 5780: e1833002 orr r3, r3, r2 5784: 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; 5788: e585b030 str fp, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 578c: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 5790: e585901c str r9, [r5, #28] information->maximum = maximum; 5794: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 5798: e5851034 str r1, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 579c: e129f000 msr CPSR_fc, r0 if ( old_tables ) 57a0: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 57a4: 11a00003 movne r0, r3 57a8: 1b000797 blne 760c <_Workspace_Free> /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 57ac: e5d53012 ldrb r3, [r5, #18] 57b0: e3530000 cmp r3, #0 ; 0x0 57b4: e5952014 ldr r2, [r5, #20] 57b8: e5954034 ldr r4, [r5, #52] 57bc: e5953018 ldr r3, [r5, #24] 57c0: 0a000007 beq 57e4 <_Objects_Extend_information+0x204> information->object_blocks[ block ] = 57c4: e0000392 mul r0, r2, r3 57c8: eb000793 bl 761c <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 57cc: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 57d0: e7840108 str r0, [r4, r8, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 57d4: e7933108 ldr r3, [r3, r8, lsl #2] 57d8: e3530000 cmp r3, #0 ; 0x0 57dc: 1a000003 bne 57f0 <_Objects_Extend_information+0x210> 57e0: ea000023 b 5874 <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 57e4: e0000392 mul r0, r2, r3 57e8: eb00078f bl 762c <_Workspace_Allocate_or_fatal_error> 57ec: e7840108 str r0, [r4, r8, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 57f0: e5953034 ldr r3, [r5, #52] 57f4: e28d4008 add r4, sp, #8 ; 0x8 57f8: e7931108 ldr r1, [r3, r8, lsl #2] 57fc: e1a00004 mov r0, r4 5800: e2852014 add r2, r5, #20 ; 0x14 5804: e892000c ldm r2, {r2, r3} 5808: eb001119 bl 9c74 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 580c: e1a0600a mov r6, sl /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5810: e1a08108 lsl r8, r8, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5814: e2857020 add r7, r5, #32 ; 0x20 5818: ea000008 b 5840 <_Objects_Extend_information+0x260> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 581c: e5953000 ldr r3, [r5] 5820: e1d520b4 ldrh r2, [r5, #4] 5824: e1a03c03 lsl r3, r3, #24 5828: e3833801 orr r3, r3, #65536 ; 0x10000 582c: e1833d82 orr r3, r3, r2, lsl #27 5830: e1833006 orr r3, r3, r6 5834: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5838: ebfffd5d bl 4db4 <_Chain_Append> index++; 583c: e2866001 add r6, r6, #1 ; 0x1 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 5840: e1a00004 mov r0, r4 5844: eb0010fd bl 9c40 <_Chain_Get> 5848: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 584c: e1a0100c mov r1, ip 5850: e1a00007 mov r0, r7 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 5854: 1afffff0 bne 581c <_Objects_Extend_information+0x23c> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 5858: e5952030 ldr r2, [r5, #48] 585c: e5953014 ldr r3, [r5, #20] 5860: e7823008 str r3, [r2, r8] information->inactive += information->allocation_size; 5864: e1d522bc ldrh r2, [r5, #44] 5868: e5953014 ldr r3, [r5, #20] 586c: e0833002 add r3, r3, r2 5870: e1c532bc strh r3, [r5, #44] } 5874: e28dd014 add sp, sp, #20 ; 0x14 5878: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 00013458 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 13458: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 1345c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 13460: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 13464: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 13468: 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; 1346c: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 13470: e1a05000 mov r5, r0 <== NOT EXECUTED 13474: e1a06002 mov r6, r2 <== NOT EXECUTED 13478: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 1347c: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 13480: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 13484: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 13488: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 1348c: e153000c cmp r3, ip <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 13490: e1a01004 mov r1, r4 <== NOT EXECUTED 13494: e1a00005 mov r0, r5 <== NOT EXECUTED 13498: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 1349c: 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) 134a0: 9a000005 bls 134bc <_Objects_Get_next+0x64> <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 134a4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 134a8: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 134ac: e3e03000 mvn r3, #0 ; 0x0 <== NOT EXECUTED 134b0: e5873000 str r3, [r7] <== NOT EXECUTED 134b4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 134b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 134bc: ebffda8a bl 9eec <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 134c0: e5963000 ldr r3, [r6] <== NOT EXECUTED 134c4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 134c8: 1affffec bne 13480 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 134cc: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 134d0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 00006e34 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 6e34: e92d4030 push {r4, r5, lr} Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 6e38: e2515000 subs r5, r1, #0 ; 0x0 Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 6e3c: e24dd004 sub sp, sp, #4 ; 0x4 Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 6e40: 03a00001 moveq r0, #1 ; 0x1 6e44: 0a00001b beq 6eb8 <_Objects_Id_to_name+0x84> return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 6e48: e3500000 cmp r0, #0 ; 0x0 6e4c: 059f3080 ldreq r3, [pc, #128] ; 6ed4 <_Objects_Id_to_name+0xa0> 6e50: 05933000 ldreq r3, [r3] 6e54: 05931008 ldreq r1, [r3, #8] 6e58: 11a01000 movne r1, r0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 6e5c: e1a03c21 lsr r3, r1, #24 6e60: e2030007 and r0, r3, #7 ; 0x7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 6e64: e2403001 sub r3, r0, #1 ; 0x1 6e68: e3530003 cmp r3, #3 ; 0x3 6e6c: 8a000010 bhi 6eb4 <_Objects_Id_to_name+0x80> 6e70: ea000012 b 6ec0 <_Objects_Id_to_name+0x8c> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 6e74: e1a03da1 lsr r3, r1, #27 6e78: e7900103 ldr r0, [r0, r3, lsl #2] if ( !information ) 6e7c: e3500000 cmp r0, #0 ; 0x0 6e80: 0a00000b beq 6eb4 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; if ( information->is_string ) 6e84: e5d04038 ldrb r4, [r0, #56] 6e88: e3540000 cmp r4, #0 ; 0x0 6e8c: 1a000008 bne 6eb4 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 6e90: e1a0200d mov r2, sp 6e94: ebffffcb bl 6dc8 <_Objects_Get> if ( !the_object ) 6e98: e3500000 cmp r0, #0 ; 0x0 6e9c: 0a000004 beq 6eb4 <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; *name = the_object->name; 6ea0: e590300c ldr r3, [r0, #12] 6ea4: e5853000 str r3, [r5] _Thread_Enable_dispatch(); 6ea8: eb000216 bl 7708 <_Thread_Enable_dispatch> 6eac: e1a00004 mov r0, r4 6eb0: ea000000 b 6eb8 <_Objects_Id_to_name+0x84> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 6eb4: e3a00003 mov r0, #3 ; 0x3 } 6eb8: e28dd004 add sp, sp, #4 ; 0x4 6ebc: e8bd8030 pop {r4, r5, pc} the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 6ec0: e59f3010 ldr r3, [pc, #16] ; 6ed8 <_Objects_Id_to_name+0xa4> 6ec4: e7930100 ldr r0, [r3, r0, lsl #2] 6ec8: e3500000 cmp r0, #0 ; 0x0 6ecc: 1affffe8 bne 6e74 <_Objects_Id_to_name+0x40> 6ed0: eafffff7 b 6eb4 <_Objects_Id_to_name+0x80> <== NOT EXECUTED 6ed4: 0001a6e4 .word 0x0001a6e4 6ed8: 0001a5e8 .word 0x0001a5e8 00011164 <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 11164: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 11168: e252a000 subs sl, r2, #0 ; 0x0 Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 1116c: e1a06000 mov r6, r0 11170: e1a08001 mov r8, r1 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 11174: 03a00002 moveq r0, #2 ; 0x2 11178: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return OBJECTS_INVALID_ADDRESS; if ( !name ) 1117c: e3510000 cmp r1, #0 ; 0x0 11180: 0a000016 beq 111e0 <_Objects_Name_to_id_string+0x7c> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 11184: e1d671b0 ldrh r7, [r6, #16] 11188: e3570000 cmp r7, #0 ; 0x0 1118c: 13a05001 movne r5, #1 ; 0x1 11190: 1a00000f bne 111d4 <_Objects_Name_to_id_string+0x70> 11194: ea000011 b 111e0 <_Objects_Name_to_id_string+0x7c> <== NOT EXECUTED name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 11198: e596301c ldr r3, [r6, #28] 1119c: e7934105 ldr r4, [r3, r5, lsl #2] if ( !the_object ) 111a0: e3540000 cmp r4, #0 ; 0x0 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 111a4: e2855001 add r5, r5, #1 ; 0x1 the_object = information->local_table[ index ]; if ( !the_object ) 111a8: 0a000009 beq 111d4 <_Objects_Name_to_id_string+0x70> continue; if ( !the_object->name.name_p ) 111ac: e594300c ldr r3, [r4, #12] 111b0: e2531000 subs r1, r3, #0 ; 0x0 111b4: 0a000006 beq 111d4 <_Objects_Name_to_id_string+0x70> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 111b8: e1d623ba ldrh r2, [r6, #58] 111bc: eb000c1a bl 1422c 111c0: e3500000 cmp r0, #0 ; 0x0 111c4: 1a000002 bne 111d4 <_Objects_Name_to_id_string+0x70> *id = the_object->id; 111c8: e5943008 ldr r3, [r4, #8] 111cc: e58a3000 str r3, [sl] 111d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 111d4: e1550007 cmp r5, r7 continue; if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 111d8: e1a00008 mov r0, r8 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 111dc: 9affffed bls 11198 <_Objects_Name_to_id_string+0x34> 111e0: e3a00001 mov r0, #1 ; 0x1 } } } return OBJECTS_INVALID_NAME; } 111e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 00004adc <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 4adc: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 4ae0: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 4ae4: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 4ae8: 0a000006 beq 4b08 <_POSIX_Condition_variables_Get+0x2c> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 4aec: e5953000 ldr r3, [r5] 4af0: e3730001 cmn r3, #1 ; 0x1 4af4: 1a000007 bne 4b18 <_POSIX_Condition_variables_Get+0x3c> /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 4af8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 4afc: eb00000b bl 4b30 <== NOT EXECUTED if ( status ) { 4b00: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 4b04: 0a000003 beq 4b18 <_POSIX_Condition_variables_Get+0x3c> <== NOT EXECUTED *location = OBJECTS_ERROR; 4b08: e3a03001 mov r3, #1 ; 0x1 4b0c: e5843000 str r3, [r4] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 4b10: e3a00000 mov r0, #0 ; 0x0 4b14: e8bd8030 pop {r4, r5, pc} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 4b18: e5951000 ldr r1, [r5] 4b1c: e59f0008 ldr r0, [pc, #8] ; 4b2c <_POSIX_Condition_variables_Get+0x50> 4b20: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 4b24: e8bd4030 pop {r4, r5, lr} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 4b28: ea000b06 b 7748 <_Objects_Get> 4b2c: 000147c4 .word 0x000147c4 00004cc4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 4cc4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 4cc8: e1a06001 mov r6, r1 4ccc: e24dd004 sub sp, sp, #4 ; 0x4 4cd0: 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 ) ) { 4cd4: e1a0100d mov r1, sp 4cd8: e1a00006 mov r0, r6 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 4cdc: e1a0a002 mov sl, r2 4ce0: 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 ) ) { 4ce4: eb000070 bl 4eac <_POSIX_Mutex_Get> 4ce8: e3500000 cmp r0, #0 ; 0x0 4cec: 0a000032 beq 4dbc <_POSIX_Condition_variables_Wait_support+0xf8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4cf0: e59f30d4 ldr r3, [pc, #212] ; 4dcc <_POSIX_Condition_variables_Wait_support+0x108> 4cf4: e5932000 ldr r2, [r3] 4cf8: e2422001 sub r2, r2, #1 ; 0x1 4cfc: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 4d00: e1a0100d mov r1, sp 4d04: e1a00007 mov r0, r7 4d08: ebffff73 bl 4adc <_POSIX_Condition_variables_Get> switch ( location ) { 4d0c: e59d3000 ldr r3, [sp] 4d10: e3530000 cmp r3, #0 ; 0x0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 4d14: e1a05000 mov r5, r0 switch ( location ) { 4d18: 1a000027 bne 4dbc <_POSIX_Condition_variables_Wait_support+0xf8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 4d1c: e5902014 ldr r2, [r0, #20] 4d20: e3520000 cmp r2, #0 ; 0x0 4d24: 0a000004 beq 4d3c <_POSIX_Condition_variables_Wait_support+0x78> 4d28: e5963000 ldr r3, [r6] 4d2c: e1520003 cmp r2, r3 4d30: 0a000001 beq 4d3c <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 4d34: eb000c87 bl 7f58 <_Thread_Enable_dispatch> <== NOT EXECUTED 4d38: ea00001f b 4dbc <_POSIX_Condition_variables_Wait_support+0xf8> <== NOT EXECUTED return EINVAL; } (void) pthread_mutex_unlock( mutex ); 4d3c: e1a00006 mov r0, r6 4d40: eb0000df bl 50c4 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 4d44: e3580000 cmp r8, #0 ; 0x0 4d48: 1a000015 bne 4da4 <_POSIX_Condition_variables_Wait_support+0xe0> the_cond->Mutex = *mutex; 4d4c: e5963000 ldr r3, [r6] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4d50: e59f4078 ldr r4, [pc, #120] ; 4dd0 <_POSIX_Condition_variables_Wait_support+0x10c> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 4d54: e5853014 str r3, [r5, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4d58: e5942000 ldr r2, [r4] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 4d5c: e5973000 ldr r3, [r7] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 4d60: e285c018 add ip, r5, #24 ; 0x18 _Thread_Executing->Wait.id = *cond; 4d64: e5823020 str r3, [r2, #32] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4d68: e3a03001 mov r3, #1 ; 0x1 4d6c: 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; 4d70: 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; 4d74: 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 ); 4d78: e1a0000c mov r0, ip 4d7c: e1a0100a mov r1, sl 4d80: e59f204c ldr r2, [pc, #76] ; 4dd4 <_POSIX_Condition_variables_Wait_support+0x110> 4d84: eb000dae bl 8444 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 4d88: eb000c72 bl 7f58 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 4d8c: e5943000 ldr r3, [r4] 4d90: e5934034 ldr r4, [r3, #52] if ( status && status != ETIMEDOUT ) 4d94: e3540000 cmp r4, #0 ; 0x0 4d98: 13540074 cmpne r4, #116 ; 0x74 4d9c: 0a000002 beq 4dac <_POSIX_Condition_variables_Wait_support+0xe8> 4da0: ea000006 b 4dc0 <_POSIX_Condition_variables_Wait_support+0xfc> <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 4da4: eb000c6b bl 7f58 <_Thread_Enable_dispatch> 4da8: e3a04074 mov r4, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 4dac: e1a00006 mov r0, r6 4db0: eb0000a2 bl 5040 if ( mutex_status ) 4db4: e3500000 cmp r0, #0 ; 0x0 4db8: 0a000000 beq 4dc0 <_POSIX_Condition_variables_Wait_support+0xfc> 4dbc: e3a04016 mov r4, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 4dc0: e1a00004 mov r0, r4 4dc4: e28dd004 add sp, sp, #4 ; 0x4 4dc8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 4dcc: 000143ac .word 0x000143ac 4dd0: 00014464 .word 0x00014464 4dd4: 0000888c .word 0x0000888c 0000fda0 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { fda0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} fda4: e1a0a001 mov sl, r1 fda8: 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 ); fdac: e3a010ff mov r1, #255 ; 0xff const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { fdb0: e1a04002 mov r4, r2 fdb4: e1a0b003 mov fp, r3 fdb8: 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 ); fdbc: eb0011ae bl 1447c if ( n > NAME_MAX ) fdc0: 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 ); fdc4: e1a06000 mov r6, r0 if ( n > NAME_MAX ) fdc8: 83a0005b movhi r0, #91 ; 0x5b fdcc: 8a00004b bhi ff00 <_POSIX_Message_queue_Create_support+0x160> fdd0: e59f2130 ldr r2, [pc, #304] ; ff08 <_POSIX_Message_queue_Create_support+0x168> fdd4: e5923000 ldr r3, [r2] fdd8: e2833001 add r3, r3, #1 ; 0x1 fddc: 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 ) { fde0: e3540000 cmp r4, #0 ; 0x0 fde4: 03a08010 moveq r8, #16 ; 0x10 fde8: 03a0700a moveq r7, #10 ; 0xa fdec: 0a00000d beq fe28 <_POSIX_Message_queue_Create_support+0x88> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ fdf0: e5943004 ldr r3, [r4, #4] fdf4: e3530000 cmp r3, #0 ; 0x0 fdf8: da000002 ble fe08 <_POSIX_Message_queue_Create_support+0x68> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ fdfc: e5943008 ldr r3, [r4, #8] fe00: e3530000 cmp r3, #0 ; 0x0 fe04: ca000003 bgt fe18 <_POSIX_Message_queue_Create_support+0x78> _Thread_Enable_dispatch(); fe08: ebfff41a bl ce78 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); fe0c: eb0009e9 bl 125b8 <__errno> fe10: e3a03016 mov r3, #22 ; 0x16 fe14: ea00002f b fed8 <_POSIX_Message_queue_Create_support+0x138> } attr = *attr_ptr; fe18: e894000f ldm r4, {r0, r1, r2, r3} fe1c: e88d000f stm sp, {r0, r1, r2, r3} fe20: e1a08002 mov r8, r2 fe24: e1a07001 mov r7, r1 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) fe28: e59f50dc ldr r5, [pc, #220] ; ff0c <_POSIX_Message_queue_Create_support+0x16c> fe2c: e1a00005 mov r0, r5 fe30: ebfff0b1 bl c0fc <_Objects_Allocate> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { fe34: e2504000 subs r4, r0, #0 ; 0x0 fe38: 1a000003 bne fe4c <_POSIX_Message_queue_Create_support+0xac> _Thread_Enable_dispatch(); fe3c: ebfff40d bl ce78 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); fe40: eb0009dc bl 125b8 <__errno> <== NOT EXECUTED fe44: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED fe48: ea000022 b fed8 <_POSIX_Message_queue_Create_support+0x138> <== NOT EXECUTED } the_mq->process_shared = pshared; the_mq->named = TRUE; fe4c: 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); fe50: e1a00006 mov r0, r6 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; fe54: e584a010 str sl, [r4, #16] the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; fe58: 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; fe5c: e5c43014 strb r3, [r4, #20] the_mq->open_count = 1; fe60: 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); fe64: ebfff930 bl e32c <_Workspace_Allocate> if (!name) { fe68: e2506000 subs r6, r0, #0 ; 0x0 fe6c: 1a000006 bne fe8c <_POSIX_Message_queue_Create_support+0xec> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); fe70: e1a00005 mov r0, r5 <== NOT EXECUTED fe74: e1a01004 mov r1, r4 <== NOT EXECUTED fe78: ebfff16e bl c438 <_Objects_Free> <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); fe7c: ebfff3fd bl ce78 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); fe80: eb0009cc bl 125b8 <__errno> <== NOT EXECUTED fe84: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED fe88: ea000012 b fed8 <_POSIX_Message_queue_Create_support+0x138> <== NOT EXECUTED } strcpy( name, name_arg ); fe8c: 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; fe90: e3a0a000 mov sl, #0 ; 0x0 if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); fe94: eb000eff bl 13a98 * 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; fe98: e584a05c str sl, [r4, #92] if ( ! _CORE_message_queue_Initialize( fe9c: e1a02007 mov r2, r7 fea0: e1a03008 mov r3, r8 fea4: e284001c add r0, r4, #28 ; 0x1c fea8: e284105c add r1, r4, #92 ; 0x5c feac: eb000346 bl 10bcc <_CORE_message_queue_Initialize> feb0: e150000a cmp r0, sl feb4: 1a00000a bne fee4 <_POSIX_Message_queue_Create_support+0x144> feb8: e1a01004 mov r1, r4 <== NOT EXECUTED febc: e1a00005 mov r0, r5 <== NOT EXECUTED fec0: ebfff15c bl c438 <_Objects_Free> <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); fec4: e1a00006 mov r0, r6 <== NOT EXECUTED fec8: ebfff913 bl e31c <_Workspace_Free> <== NOT EXECUTED _Thread_Enable_dispatch(); fecc: ebfff3e9 bl ce78 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); fed0: eb0009b8 bl 125b8 <__errno> <== NOT EXECUTED fed4: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED fed8: e5803000 str r3, [r0] fedc: e3e00000 mvn r0, #0 ; 0x0 fee0: ea000006 b ff00 <_POSIX_Message_queue_Create_support+0x160> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; fee4: e595201c ldr r2, [r5, #28] fee8: e1d430b8 ldrh r3, [r4, #8] feec: 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; fef0: e584600c str r6, [r4, #12] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; fef4: e58b4000 str r4, [fp] _Thread_Enable_dispatch(); fef8: ebfff3de bl ce78 <_Thread_Enable_dispatch> fefc: e1a0000a mov r0, sl return 0; } ff00: e28dd010 add sp, sp, #16 ; 0x10 ff04: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} ff08: 000210ac .word 0x000210ac ff0c: 000213c0 .word 0x000213c0 00005824 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 5824: e92d4030 push {r4, r5, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5828: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 582c: e1a04001 mov r4, r1 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 5830: 0a000006 beq 5850 <_POSIX_Mutex_Get+0x2c> 5834: e5953000 ldr r3, [r5] 5838: e3730001 cmn r3, #1 ; 0x1 583c: 1a000007 bne 5860 <_POSIX_Mutex_Get+0x3c> 5840: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 5844: eb00001d bl 58c0 <== NOT EXECUTED 5848: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 584c: 0a000003 beq 5860 <_POSIX_Mutex_Get+0x3c> <== NOT EXECUTED 5850: e3a03001 mov r3, #1 ; 0x1 5854: e5843000 str r3, [r4] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 5858: e3a00000 mov r0, #0 ; 0x0 585c: e8bd8030 pop {r4, r5, pc} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5860: e5951000 ldr r1, [r5] 5864: e59f0008 ldr r0, [pc, #8] ; 5874 <_POSIX_Mutex_Get+0x50> 5868: e1a02004 mov r2, r4 _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 586c: e8bd4030 pop {r4, r5, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5870: ea000add b 83ec <_Objects_Get> 5874: 000164e0 .word 0x000164e0 000057c8 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 57c8: e92d4070 push {r4, r5, r6, lr} Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 57cc: e2505000 subs r5, r0, #0 ; 0x0 POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 57d0: e1a04001 mov r4, r1 57d4: e1a06002 mov r6, r2 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 57d8: 0a000006 beq 57f8 <_POSIX_Mutex_Get_interrupt_disable+0x30> 57dc: e5953000 ldr r3, [r5] 57e0: e3730001 cmn r3, #1 ; 0x1 57e4: 1a000007 bne 5808 <_POSIX_Mutex_Get_interrupt_disable+0x40> 57e8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 57ec: eb000033 bl 58c0 <== NOT EXECUTED 57f0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 57f4: 0a000003 beq 5808 <_POSIX_Mutex_Get_interrupt_disable+0x40> <== NOT EXECUTED 57f8: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 57fc: e5843000 str r3, [r4] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 5800: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5804: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 5808: e5951000 ldr r1, [r5] 580c: e59f000c ldr r0, [pc, #12] ; 5820 <_POSIX_Mutex_Get_interrupt_disable+0x58> 5810: e1a02004 mov r2, r4 5814: e1a03006 mov r3, r6 _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 5818: e8bd4070 pop {r4, r5, r6, lr} { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 581c: ea000ad8 b 8384 <_Objects_Get_isr_disable> 5820: 000164e0 .word 0x000164e0 0000c988 <_POSIX_Semaphore_Create_support>: c988: e59fc0e8 ldr ip, [pc, #232] ; ca78 <_POSIX_Semaphore_Create_support+0xf0> const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { c98c: e92d41f0 push {r4, r5, r6, r7, r8, lr} c990: e59ce000 ldr lr, [ip] c994: e28ee001 add lr, lr, #1 ; 0x1 c998: e58ce000 str lr, [ip] c99c: e1a07002 mov r7, r2 c9a0: e1a08003 mov r8, r3 c9a4: e1a06000 mov r6, r0 char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { c9a8: e3510000 cmp r1, #0 ; 0x0 c9ac: 0a000003 beq c9c0 <_POSIX_Semaphore_Create_support+0x38> _Thread_Enable_dispatch(); c9b0: ebfff216 bl 9210 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); c9b4: eb000835 bl ea90 <__errno> c9b8: e3a03058 mov r3, #88 ; 0x58 c9bc: ea00000f b ca00 <_POSIX_Semaphore_Create_support+0x78> } if ( name ) { c9c0: e3500000 cmp r0, #0 ; 0x0 c9c4: 0a000006 beq c9e4 <_POSIX_Semaphore_Create_support+0x5c> if( strlen(name) > PATH_MAX ) { c9c8: eb000f07 bl 105ec c9cc: e35000ff cmp r0, #255 ; 0xff c9d0: 9a000003 bls c9e4 <_POSIX_Semaphore_Create_support+0x5c> _Thread_Enable_dispatch(); c9d4: ebfff20d bl 9210 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); c9d8: eb00082c bl ea90 <__errno> <== NOT EXECUTED c9dc: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED c9e0: ea000006 b ca00 <_POSIX_Semaphore_Create_support+0x78> <== NOT EXECUTED * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) c9e4: e59f0090 ldr r0, [pc, #144] ; ca7c <_POSIX_Semaphore_Create_support+0xf4> c9e8: ebffeedc bl 8560 <_Objects_Allocate> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { c9ec: e2505000 subs r5, r0, #0 ; 0x0 c9f0: 1a000005 bne ca0c <_POSIX_Semaphore_Create_support+0x84> _Thread_Enable_dispatch(); c9f4: ebfff205 bl 9210 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); c9f8: eb000824 bl ea90 <__errno> c9fc: e3a0301c mov r3, #28 ; 0x1c ca00: e5803000 str r3, [r0] ca04: e3e00000 mvn r0, #0 ; 0x0 ca08: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} } the_semaphore->process_shared = pshared; if ( name ) { ca0c: e3560000 cmp r6, #0 ; 0x0 if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; ca10: e3a03000 mov r3, #0 ; 0x0 ca14: e5853010 str r3, [r5, #16] if ( name ) { the_semaphore->named = TRUE; ca18: 12833001 addne r3, r3, #1 ; 0x1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; ca1c: 15c53015 strbne r3, [r5, #21] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; ca20: 15c53014 strbne r3, [r5, #20] the_semaphore->open_count = 1; ca24: 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; ca28: e3a04000 mov r4, #0 ; 0x0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; ca2c: e3e03000 mvn r3, #0 ; 0x0 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); ca30: 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; ca34: 05c56014 strbeq r6, [r5, #20] the_semaphore->open_count = 0; ca38: 05856018 streq r6, [r5, #24] the_semaphore->linked = FALSE; ca3c: 05c56015 strbeq r6, [r5, #21] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; ca40: e585305c str r3, [r5, #92] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); ca44: e1a02007 mov r2, r7 ca48: 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; ca4c: 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 ); ca50: ebffedb8 bl 8138 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ca54: e59f3020 ldr r3, [pc, #32] ; ca7c <_POSIX_Semaphore_Create_support+0xf4> ca58: e593201c ldr r2, [r3, #28] ca5c: e1d530b8 ldrh r3, [r5, #8] ca60: 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; ca64: e585600c str r6, [r5, #12] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; ca68: e5885000 str r5, [r8] _Thread_Enable_dispatch(); ca6c: ebfff1e7 bl 9210 <_Thread_Enable_dispatch> ca70: e1a00004 mov r0, r4 return 0; } ca74: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} ca78: 0001c44c .word 0x0001c44c ca7c: 0001c6e0 .word 0x0001c6e0 0000aafc <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { aafc: 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 ]; ab00: e5905108 ldr r5, [r0, #264] handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; ab04: e3a03001 mov r3, #1 ; 0x1 ab08: e58530cc str r3, [r5, #204] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ab0c: e28560dc add r6, r5, #220 ; 0xdc ab10: ea00000c b ab48 <_POSIX_Threads_cancel_run+0x4c> while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); ab14: e10f1000 mrs r1, CPSR <== NOT EXECUTED ab18: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED ab1c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) ab20: e5964004 ldr r4, [r6, #4] <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ab24: e894000c ldm r4, {r2, r3} <== NOT EXECUTED previous = the_node->previous; next->previous = previous; previous->next = next; ab28: e5832000 str r2, [r3] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ab2c: e5823004 str r3, [r2, #4] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); ab30: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED (*handler->routine)( handler->arg ); ab34: e594000c ldr r0, [r4, #12] <== NOT EXECUTED ab38: e1a0e00f mov lr, pc <== NOT EXECUTED ab3c: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED _Workspace_Free( handler ); ab40: e1a00004 mov r0, r4 <== NOT EXECUTED ab44: ebfff2b0 bl 760c <_Workspace_Free> <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ab48: e59530d8 ldr r3, [r5, #216] ab4c: e1530006 cmp r3, r6 ab50: 1affffef bne ab14 <_POSIX_Threads_cancel_run+0x18> (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } ab54: e8bd8070 pop {r4, r5, r6, pc} 0000b584 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { b584: e92d41f0 push {r4, r5, r6, r7, r8, lr} b588: e1a08001 mov r8, r1 b58c: e1a07002 mov r7, r2 b590: e1a05003 mov r5, r3 b594: e1a04000 mov r4, r0 ISR_Level level; (void) _Watchdog_Remove( timer ); b598: ebfff6da bl 9108 <_Watchdog_Remove> _ISR_Disable( level ); b59c: e10f6000 mrs r6, CPSR b5a0: e38630c0 orr r3, r6, #192 ; 0xc0 b5a4: 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 ) { b5a8: e5943008 ldr r3, [r4, #8] b5ac: e3530000 cmp r3, #0 ; 0x0 b5b0: 0a000002 beq b5c0 <_POSIX_Timer_Insert_helper+0x3c> _ISR_Enable( level ); b5b4: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED b5b8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED b5bc: 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; b5c0: e5843008 str r3, [r4, #8] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; b5c4: e59d3018 ldr r3, [sp, #24] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; b5c8: e584501c str r5, [r4, #28] the_watchdog->id = id; b5cc: e5847020 str r7, [r4, #32] the_watchdog->user_data = user_data; b5d0: e5843024 str r3, [r4, #36] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; b5d4: e584800c str r8, [r4, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); b5d8: e1a01004 mov r1, r4 b5dc: e59f000c ldr r0, [pc, #12] ; b5f0 <_POSIX_Timer_Insert_helper+0x6c> b5e0: ebfff66c bl 8f98 <_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 ); b5e4: e129f006 msr CPSR_fc, r6 b5e8: e3a00001 mov r0, #1 ; 0x1 return true; } b5ec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} b5f0: 0001aa44 .word 0x0001aa44 000056b8 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 56b8: e92d4010 push {r4, lr} bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 56bc: e5913068 ldr r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 56c0: e5912054 ldr r2, [r1, #84] bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 56c4: e2833001 add r3, r3, #1 ; 0x1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 56c8: 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) { 56cc: e24dd004 sub sp, sp, #4 ; 0x4 56d0: e1a04001 mov r4, r1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 56d4: e5813068 str r3, [r1, #104] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 56d8: 1a000003 bne 56ec <_POSIX_Timer_TSR+0x34> 56dc: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED 56e0: 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; 56e4: 03a03004 moveq r3, #4 ; 0x4 <== NOT EXECUTED /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 56e8: 0a00000a beq 5718 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 56ec: e5941064 ldr r1, [r4, #100] 56f0: e5942008 ldr r2, [r4, #8] 56f4: e2840010 add r0, r4, #16 ; 0x10 56f8: e59f3038 ldr r3, [pc, #56] ; 5738 <_POSIX_Timer_TSR+0x80> 56fc: e58d4000 str r4, [sp] 5700: eb00179f bl b584 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 5704: e3500000 cmp r0, #0 ; 0x0 5708: 0a000008 beq 5730 <_POSIX_Timer_TSR+0x78> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 570c: e284006c add r0, r4, #108 ; 0x6c 5710: eb000585 bl 6d2c <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 5714: e3a03003 mov r3, #3 ; 0x3 } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 5718: 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 ) ) { 571c: e5940038 ldr r0, [r4, #56] 5720: e5941044 ldr r1, [r4, #68] 5724: eb0016bd bl b220 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 5728: e3a03000 mov r3, #0 ; 0x0 572c: e5843068 str r3, [r4, #104] } 5730: e28dd004 add sp, sp, #4 ; 0x4 5734: e8bd8010 pop {r4, pc} 5738: 000056b8 .word 0x000056b8 00004ce8 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 4ce8: e1a02000 mov r2, r0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 4cec: e3a01001 mov r1, #1 ; 0x1 #include int _POSIX_signals_Get_highest( sigset_t set ) { 4cf0: e3a0001b mov r0, #27 ; 0x1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 4cf4: e2403001 sub r3, r0, #1 ; 0x1 4cf8: e0123311 ands r3, r2, r1, lsl r3 4cfc: 112fff1e bxne lr sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4d00: e2800001 add r0, r0, #1 ; 0x1 4d04: e3500020 cmp r0, #32 ; 0x20 4d08: 1afffff9 bne 4cf4 <_POSIX_signals_Get_highest+0xc> 4d0c: e3a00001 mov r0, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) 4d10: e1a01000 mov r1, r0 4d14: e2403001 sub r3, r0, #1 ; 0x1 4d18: e0123311 ands r3, r2, r1, lsl r3 4d1c: 112fff1e bxne lr return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4d20: e2800001 add r0, r0, #1 ; 0x1 4d24: e350001b cmp r0, #27 ; 0x1b 4d28: 1afffff9 bne 4d14 <_POSIX_signals_Get_highest+0x2c> 4d2c: e1a00003 mov r0, r3 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 4d30: e12fff1e bx lr <== NOT EXECUTED 0000920c <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 920c: e92d4070 push {r4, r5, r6, lr} POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 9210: e5905108 ldr r5, [r0, #264] if ( !api ) 9214: e3550000 cmp r5, #0 ; 0x0 9218: 08bd8070 popeq {r4, r5, r6, pc} * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & 921c: e59f60b0 ldr r6, [pc, #176] ; 92d4 <_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 ); 9220: e10f0000 mrs r0, CPSR 9224: e38030c0 orr r3, r0, #192 ; 0xc0 9228: e129f003 msr CPSR_fc, r3 if ( !(~api->signals_blocked & 922c: e5963000 ldr r3, [r6] 9230: e28510c4 add r1, r5, #196 ; 0xc4 9234: e8910006 ldm r1, {r1, r2} 9238: e1833002 orr r3, r3, r2 923c: e1d31001 bics r1, r3, r1 9240: 1a000001 bne 924c <_POSIX_signals_Post_switch_extension+0x40> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 9244: e129f000 msr CPSR_fc, r0 9248: e8bd8070 pop {r4, r5, r6, pc} break; } _ISR_Enable( level ); 924c: e129f000 msr CPSR_fc, r0 9250: e3a0401b mov r4, #27 ; 0x1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9254: e1a01004 mov r1, r4 9258: e3a02000 mov r2, #0 ; 0x0 925c: e1a00005 mov r0, r5 9260: eb000668 bl ac08 <_POSIX_signals_Check_signal> 9264: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9268: e1a01004 mov r1, r4 926c: e3a02001 mov r2, #1 ; 0x1 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 9270: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 9274: e1a00005 mov r0, r5 } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9278: 1affffe8 bne 9220 <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 927c: eb000661 bl ac08 <_POSIX_signals_Check_signal> 9280: e3500000 cmp r0, #0 ; 0x0 9284: 1affffe5 bne 9220 <_POSIX_signals_Post_switch_extension+0x14> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 9288: e3540020 cmp r4, #32 ; 0x20 928c: 1afffff0 bne 9254 <_POSIX_signals_Post_switch_extension+0x48> 9290: e3a04001 mov r4, #1 ; 0x1 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 9294: e1a01004 mov r1, r4 9298: e3a02000 mov r2, #0 ; 0x0 929c: e1a00005 mov r0, r5 92a0: eb000658 bl ac08 <_POSIX_signals_Check_signal> 92a4: e3500000 cmp r0, #0 ; 0x0 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 92a8: e1a01004 mov r1, r4 92ac: e3a02001 mov r2, #1 ; 0x1 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 92b0: e2844001 add r4, r4, #1 ; 0x1 if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 92b4: 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 ) ) 92b8: 1affffd8 bne 9220 <_POSIX_signals_Post_switch_extension+0x14> goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 92bc: eb000651 bl ac08 <_POSIX_signals_Check_signal> 92c0: e3500000 cmp r0, #0 ; 0x0 92c4: 1affffd5 bne 9220 <_POSIX_signals_Post_switch_extension+0x14> } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 92c8: e354001b cmp r4, #27 ; 0x1b 92cc: 1afffff0 bne 9294 <_POSIX_signals_Post_switch_extension+0x88> 92d0: eaffffd2 b 9220 <_POSIX_signals_Post_switch_extension+0x14> <== NOT EXECUTED 92d4: 0001692c .word 0x0001692c 00008f68 <_Protected_heap_Extend>: bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ) { 8f68: e92d40f0 push {r4, r5, r6, r7, lr} Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 8f6c: e59f7044 ldr r7, [pc, #68] ; 8fb8 <_Protected_heap_Extend+0x50> bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ) { 8f70: e24dd004 sub sp, sp, #4 ; 0x4 8f74: e1a04000 mov r4, r0 8f78: e1a05001 mov r5, r1 8f7c: e1a06002 mov r6, r2 Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 8f80: e5970000 ldr r0, [r7] 8f84: ebfffa23 bl 7818 <_API_Mutex_Lock> status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 8f88: e1a01005 mov r1, r5 8f8c: e1a02006 mov r2, r6 8f90: e1a0300d mov r3, sp 8f94: e1a00004 mov r0, r4 8f98: eb0010a8 bl d240 <_Heap_Extend> 8f9c: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 8fa0: e5970000 ldr r0, [r7] 8fa4: ebfffa37 bl 7888 <_API_Mutex_Unlock> return (status == HEAP_EXTEND_SUCCESSFUL); } 8fa8: e2740001 rsbs r0, r4, #1 ; 0x1 8fac: 33a00000 movcc r0, #0 ; 0x0 8fb0: e28dd004 add sp, sp, #4 ; 0x4 8fb4: e8bd80f0 pop {r4, r5, r6, r7, pc} 8fb8: c1dc .short 0xc1dc <== NOT EXECUTED 8fba: 01 .byte 0x01 <== NOT EXECUTED ... 0001f740 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 1f740: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 1f744: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 1f748: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 1f74c: 0a00000d beq 1f788 <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 1f750: e3510000 cmp r1, #0 ; 0x0 1f754: 0a00000b beq 1f788 <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 1f758: e59f5030 ldr r5, [pc, #48] ; 1f790 <_Protected_heap_Get_information+0x50> 1f75c: e5950000 ldr r0, [r5] 1f760: ebffa27f bl 8164 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 1f764: e1a01004 mov r1, r4 1f768: e1a00006 mov r0, r6 1f76c: eb0023f4 bl 28744 <_Heap_Get_information> 1f770: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 1f774: e5950000 ldr r0, [r5] 1f778: ebffa295 bl 81d4 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 1f77c: e2740001 rsbs r0, r4, #1 ; 0x1 1f780: 33a00000 movcc r0, #0 ; 0x0 1f784: e8bd8070 pop {r4, r5, r6, pc} 1f788: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 1f78c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 1f790: 000566dc .word 0x000566dc 000046e8 <_RTEMS_tasks_Initialize_user_tasks_body>: rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 46e8: e59f3094 ldr r3, [pc, #148] ; 4784 <_RTEMS_tasks_Initialize_user_tasks_body+0x9c> 46ec: e5933000 ldr r3, [r3] * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46f0: e92d40f0 push {r4, r5, r6, r7, lr} rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 46f4: e5933040 ldr r3, [r3, #64] /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 46f8: e593002c ldr r0, [r3, #44] maximum = api_configuration->number_of_initialization_tasks; 46fc: e5936028 ldr r6, [r3, #40] if ( !user_tasks || maximum == 0 ) 4700: e3560000 cmp r6, #0 ; 0x0 4704: 13500000 cmpne r0, #0 ; 0x0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 4708: e24dd00c sub sp, sp, #12 ; 0xc */ user_tasks = api_configuration->User_initialization_tasks_table; maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 470c: 13a03000 movne r3, #0 ; 0x0 4710: 03a03001 moveq r3, #1 ; 0x1 return; 4714: 11a04000 movne r4, r0 4718: 11a05003 movne r5, r3 for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 471c: 128d7008 addne r7, sp, #8 ; 0x8 */ user_tasks = api_configuration->User_initialization_tasks_table; maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 4720: 1a000013 bne 4774 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c> 4724: ea000014 b 477c <_RTEMS_tasks_Initialize_user_tasks_body+0x94> <== NOT EXECUTED return; for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 4728: e594300c ldr r3, [r4, #12] 472c: e88d0088 stm sp, {r3, r7} 4730: e8940005 ldm r4, {r0, r2} 4734: e5941008 ldr r1, [r4, #8] 4738: e5943014 ldr r3, [r4, #20] 473c: ebffff63 bl 44d0 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 4740: e2502000 subs r2, r0, #0 ; 0x0 4744: 1a000006 bne 4764 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 4748: e5942018 ldr r2, [r4, #24] 474c: e5941010 ldr r1, [r4, #16] 4750: e59d0008 ldr r0, [sp, #8] 4754: eb00000b bl 4788 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 4758: e2502000 subs r2, r0, #0 ; 0x0 ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 475c: e284401c add r4, r4, #28 ; 0x1c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 4760: 0a000002 beq 4770 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 4764: e3a00001 mov r0, #1 ; 0x1 4768: e1a01000 mov r1, r0 476c: eb000359 bl 54d8 <_Internal_error_Occurred> maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 4770: e2855001 add r5, r5, #1 ; 0x1 4774: e1550006 cmp r5, r6 4778: 3affffea bcc 4728 <_RTEMS_tasks_Initialize_user_tasks_body+0x40> ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); } } 477c: e28dd00c add sp, sp, #12 ; 0xc 4780: e8bd80f0 pop {r4, r5, r6, r7, pc} 4784: 0001629c .word 0x0001629c 00005188 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 5188: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 518c: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 5190: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 5194: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 5198: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 519c: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 51a0: e10f6000 mrs r6, CPSR 51a4: e38630c0 orr r3, r6, #192 ; 0xc0 51a8: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 51ac: e59f3038 ldr r3, [pc, #56] ; 51ec <_TOD_Get+0x64> 51b0: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 51b4: e59f3034 ldr r3, [pc, #52] ; 51f0 <_TOD_Get+0x68> 51b8: e8930018 ldm r3, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 51bc: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 51c0: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 51c4: 0a000002 beq 51d4 <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 51c8: e1a0e00f mov lr, pc <== NOT EXECUTED 51cc: e12fff12 bx r2 <== NOT EXECUTED 51d0: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 51d4: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 51d8: e1a00005 mov r0, r5 51dc: e1a0100d mov r1, sp 51e0: eb000794 bl 7038 <_Timespec_Add_to> } 51e4: e28dd008 add sp, sp, #8 ; 0x8 51e8: e8bd8070 pop {r4, r5, r6, pc} 51ec: 000163b8 .word 0x000163b8 51f0: 00016294 .word 0x00016294 00009df4 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { 9df4: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 9df8: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { 9dfc: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 9e00: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { 9e04: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 9e08: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); 9e0c: e10f6000 mrs r6, CPSR 9e10: e38630c0 orr r3, r6, #192 ; 0xc0 9e14: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 9e18: e59f3038 ldr r3, [pc, #56] ; 9e58 <_TOD_Get_uptime+0x64> 9e1c: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 9e20: e59f3034 ldr r3, [pc, #52] ; 9e5c <_TOD_Get_uptime+0x68> 9e24: e8930018 ldm r3, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 9e28: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 9e2c: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 9e30: 0a000002 beq 9e40 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 9e34: e1a0e00f mov lr, pc <== NOT EXECUTED 9e38: e12fff12 bx r2 <== NOT EXECUTED 9e3c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 9e40: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); 9e44: e1a00005 mov r0, r5 9e48: e1a0100d mov r1, sp 9e4c: ebfff479 bl 7038 <_Timespec_Add_to> } 9e50: e28dd008 add sp, sp, #8 ; 0x8 9e54: e8bd8070 pop {r4, r5, r6, pc} 9e58: 000163b8 .word 0x000163b8 9e5c: 00016284 .word 0x00016284 0000b19c <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; b19c: e59f30b0 ldr r3, [pc, #176] ; b254 <_Thread_Handler+0xb8> * * Output parameters: NONE */ void _Thread_Handler( void ) { b1a0: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; b1a4: 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; b1a8: e59530b8 ldr r3, [r5, #184] _ISR_Set_level(level); b1ac: e3a02000 mov r2, #0 ; 0x0 b1b0: e10f2000 mrs r2, CPSR b1b4: e3c220c0 bic r2, r2, #192 ; 0xc0 b1b8: e1822003 orr r2, r2, r3 b1bc: e121f002 msr CPSR_c, r2 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; b1c0: e59f2090 ldr r2, [pc, #144] ; b258 <_Thread_Handler+0xbc> doneConstructors = 1; b1c4: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; b1c8: 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 ); b1cc: 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; b1d0: 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 ); b1d4: ebffefe5 bl 7170 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); b1d8: ebffec26 bl 6278 <_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) */ b1dc: e3540000 cmp r4, #0 ; 0x0 { _init (); b1e0: 0bffd3ce bleq 120 <_init> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { b1e4: e59530a0 ldr r3, [r5, #160] b1e8: e3530003 cmp r3, #3 ; 0x3 b1ec: 979ff103 ldrls pc, [pc, r3, lsl #2] b1f0: ea000011 b b23c <_Thread_Handler+0xa0> <== NOT EXECUTED b1f4: 0000b204 .word 0x0000b204 <== NOT EXECUTED b1f8: 0000b20c .word 0x0000b20c <== NOT EXECUTED b1fc: 0000b21c .word 0x0000b21c <== NOT EXECUTED b200: 0000b228 .word 0x0000b228 <== NOT EXECUTED case THREAD_START_NUMERIC: executing->Wait.return_argument = b204: e59500a8 ldr r0, [r5, #168] b208: ea000000 b b210 <_Thread_Handler+0x74> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = b20c: e59500a4 ldr r0, [r5, #164] b210: e1a0e00f mov lr, pc b214: e595f09c ldr pc, [r5, #156] b218: ea000006 b b238 <_Thread_Handler+0x9c> (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = b21c: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED b220: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED b224: ea000001 b b230 <_Thread_Handler+0x94> <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = b228: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED b22c: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED b230: e1a0e00f mov lr, pc <== NOT EXECUTED b234: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED b238: 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 ); b23c: e1a00005 mov r0, r5 b240: ebffefd9 bl 71ac <_User_extensions_Thread_exitted> _Internal_error_Occurred( b244: e3a00000 mov r0, #0 ; 0x0 b248: e3a01001 mov r1, #1 ; 0x1 b24c: e3a02006 mov r2, #6 ; 0x6 b250: ebffe8a0 bl 54d8 <_Internal_error_Occurred> b254: 000162c4 .word 0x000162c4 b258: 00016050 .word 0x00016050 00006344 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 6344: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 6348: 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 ) { 634c: e1a09000 mov r9, r0 6350: e1a05001 mov r5, r1 6354: e1a04003 mov r4, r3 6358: e59d8024 ldr r8, [sp, #36] 635c: e59da02c ldr sl, [sp, #44] 6360: e5dd7028 ldrb r7, [sp, #40] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 6364: 1a00000e bne 63a4 <_Thread_Initialize+0x60> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 6368: e1a00001 mov r0, r1 636c: e1a01003 mov r1, r3 6370: eb000292 bl 6dc0 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 6374: e1500004 cmp r0, r4 6378: 23a03000 movcs r3, #0 ; 0x0 637c: 33a03001 movcc r3, #1 ; 0x1 6380: e3500000 cmp r0, #0 ; 0x0 6384: 03833001 orreq r3, r3, #1 ; 0x1 6388: e3530000 cmp r3, #0 ; 0x0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 638c: 03a03001 moveq r3, #1 ; 0x1 if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 6390: e1a01000 mov r1, r0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 6394: 05c530c0 strbeq r3, [r5, #192] actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 6398: 059520cc ldreq r2, [r5, #204] if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 639c: 0a000004 beq 63b4 <_Thread_Initialize+0x70> 63a0: ea000017 b 6404 <_Thread_Initialize+0xc0> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 63a4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 63a8: e5c130c0 strb r3, [r1, #192] <== NOT EXECUTED 63ac: e1a02006 mov r2, r6 <== NOT EXECUTED 63b0: e1a01004 mov r1, r4 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 63b4: e59f3128 ldr r3, [pc, #296] ; 64e4 <_Thread_Initialize+0x1a0> 63b8: e5930000 ldr r0, [r3] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 63bc: e3a03000 mov r3, #0 ; 0x0 63c0: e3500000 cmp r0, #0 ; 0x0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 63c4: e58520c8 str r2, [r5, #200] the_stack->size = size; 63c8: e58510c4 str r1, [r5, #196] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 63cc: e5853100 str r3, [r5, #256] 63d0: e5853050 str r3, [r5, #80] the_watchdog->routine = routine; 63d4: e5853064 str r3, [r5, #100] the_watchdog->id = id; 63d8: e5853068 str r3, [r5, #104] the_watchdog->user_data = user_data; 63dc: e585306c str r3, [r5, #108] (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return FALSE; 63e0: 01a06000 moveq r6, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 63e4: 0a000008 beq 640c <_Thread_Initialize+0xc8> extensions_area = _Workspace_Allocate( 63e8: e2800001 add r0, r0, #1 ; 0x1 63ec: e1a00100 lsl r0, r0, #2 63f0: eb000489 bl 761c <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 63f4: e2506000 subs r6, r0, #0 ; 0x0 63f8: 1a000003 bne 640c <_Thread_Initialize+0xc8> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 63fc: e1a00005 mov r0, r5 <== NOT EXECUTED 6400: eb000289 bl 6e2c <_Thread_Stack_Free> <== NOT EXECUTED 6404: e1a00006 mov r0, r6 6408: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 640c: e3560000 cmp r6, #0 ; 0x0 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 6410: e5856110 str r6, [r5, #272] * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 6414: 0a00000a beq 6444 <_Thread_Initialize+0x100> 6418: e3a02000 mov r2, #0 ; 0x0 uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 641c: e59f00c0 ldr r0, [pc, #192] ; 64e4 <_Thread_Initialize+0x1a0> the_thread->extensions[i] = NULL; 6420: e1a01002 mov r1, r2 6424: ea000002 b 6434 <_Thread_Initialize+0xf0> 6428: e5953110 ldr r3, [r5, #272] 642c: e7831102 str r1, [r3, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6430: e2822001 add r2, r2, #1 ; 0x1 6434: e5903000 ldr r3, [r0] 6438: e2833001 add r3, r3, #1 ; 0x1 643c: e1520003 cmp r2, r3 6440: 3afffff8 bcc 6428 <_Thread_Initialize+0xe4> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 6444: e59d3030 ldr r3, [sp, #48] switch ( budget_algorithm ) { 6448: e35a0002 cmp sl, #2 ; 0x2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 644c: 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; 6450: 059f3090 ldreq r3, [pc, #144] ; 64e8 <_Thread_Initialize+0x1a4> 6454: 05933000 ldreq r3, [r3] 6458: 05853078 streq r3, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 645c: e59d3034 ldr r3, [sp, #52] the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 6460: e3a04000 mov r4, #0 ; 0x0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 6464: e5c570ac strb r7, [r5, #172] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 6468: e3a07001 mov r7, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 646c: 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 ); 6470: e1a01008 mov r1, r8 6474: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 6478: e585a0b0 str sl, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 647c: e5857010 str r7, [r5, #16] the_thread->Wait.queue = NULL; 6480: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 6484: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 6488: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 648c: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 6490: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 6494: eb0001b7 bl 6b78 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 6498: e1d530b8 ldrh r3, [r5, #8] 649c: 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; 64a0: e5854088 str r4, [r5, #136] 64a4: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 64a8: e59d3038 ldr r3, [sp, #56] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 64ac: e1a00005 mov r0, r5 64b0: 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; 64b4: 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 ); 64b8: eb00035f bl 723c <_User_extensions_Thread_create> if ( !extension_status ) { 64bc: e1500004 cmp r0, r4 64c0: 11a00007 movne r0, r7 64c4: 18bd87f0 popne {r4, r5, r6, r7, r8, r9, sl, pc} if ( extensions_area ) 64c8: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 64cc: 11a00006 movne r0, r6 <== NOT EXECUTED 64d0: 1b00044d blne 760c <_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 ); 64d4: e1a00005 mov r0, r5 <== NOT EXECUTED 64d8: eb000253 bl 6e2c <_Thread_Stack_Free> <== NOT EXECUTED 64dc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 64e0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 64e4: 000162a4 .word 0x000162a4 64e8: 000161c4 .word 0x000161c4 000077b0 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 77b0: e5903010 ldr r3, [r0, #16] 77b4: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 77b8: e92d4070 push {r4, r5, r6, lr} 77bc: e1a04000 mov r4, r0 77c0: e1a05001 mov r5, r1 77c4: e1a06002 mov r6, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 77c8: 13a00000 movne r0, #0 ; 0x0 77cc: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 77d0: eb000081 bl 79dc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 77d4: e1a01005 mov r1, r5 77d8: e1a02006 mov r2, r6 77dc: e1a00004 mov r0, r4 77e0: eb000eac bl b298 <_Thread_Reset> _Thread_Load_environment( the_thread ); 77e4: e1a00004 mov r0, r4 77e8: eb000dcc bl af20 <_Thread_Load_environment> _Thread_Ready( the_thread ); 77ec: e1a00004 mov r0, r4 77f0: eb000e65 bl b18c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 77f4: e1a00004 mov r0, r4 77f8: eb0001e3 bl 7f8c <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 77fc: e59f301c ldr r3, [pc, #28] ; 7820 <_Thread_Restart+0x70> 7800: e5933000 ldr r3, [r3] 7804: e1540003 cmp r4, r3 7808: 13a00001 movne r0, #1 ; 0x1 780c: 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 ); 7810: e28400d0 add r0, r4, #208 ; 0xd0 7814: eb0002ec bl 83cc <_CPU_Context_restore> 7818: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 781c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 7820: 00019b84 .word 0x00019b84 000084e0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 84e0: e92d4030 push {r4, r5, lr} 84e4: e20110ff and r1, r1, #255 ; 0xff 84e8: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 84ec: e10f5000 mrs r5, CPSR 84f0: e38530c0 orr r3, r5, #192 ; 0xc0 84f4: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 84f8: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; else the_thread->suspend_count--; 84fc: 05903070 ldreq r3, [r0, #112] States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; 8500: 13a03000 movne r3, #0 ; 0x0 else the_thread->suspend_count--; 8504: 02433001 subeq r3, r3, #1 ; 0x1 8508: e5803070 str r3, [r0, #112] if ( the_thread->suspend_count > 0 ) { 850c: e5903070 ldr r3, [r0, #112] 8510: e3530000 cmp r3, #0 ; 0x0 8514: 0a000001 beq 8520 <_Thread_Resume+0x40> _ISR_Enable( level ); 8518: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 851c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return; } current_state = the_thread->current_state; 8520: e5903010 ldr r3, [r0, #16] if ( current_state & STATES_SUSPENDED ) { 8524: e3130002 tst r3, #2 ; 0x2 8528: 0a000028 beq 85d0 <_Thread_Resume+0xf0> 852c: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8530: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 8534: e5803010 str r3, [r0, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8538: 1a000024 bne 85d0 <_Thread_Resume+0xf0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 853c: e5900090 ldr r0, [r0, #144] 8540: e1d429b6 ldrh r2, [r4, #150] 8544: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 8548: e594108c ldr r1, [r4, #140] 854c: e1833002 orr r3, r3, r2 8550: e1c030b0 strh r3, [r0] _Priority_Major_bit_map |= the_priority_map->ready_major; 8554: e59fc07c ldr ip, [pc, #124] ; 85d8 <_Thread_Resume+0xf8> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8558: e2813004 add r3, r1, #4 ; 0x4 855c: e5843000 str r3, [r4] 8560: e1d429b4 ldrh r2, [r4, #148] 8564: e1dc30b0 ldrh r3, [ip] old_last_node = the_chain->last; 8568: e5910008 ldr r0, [r1, #8] 856c: e1833002 orr r3, r3, r2 the_chain->last = the_node; 8570: e5814008 str r4, [r1, #8] 8574: e1cc30b0 strh r3, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 8578: 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; 857c: e5804000 str r4, [r0] _ISR_Flash( level ); 8580: e10f3000 mrs r3, CPSR 8584: e129f005 msr CPSR_fc, r5 8588: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 858c: e59f1048 ldr r1, [pc, #72] ; 85dc <_Thread_Resume+0xfc> 8590: e5913000 ldr r3, [r1] 8594: e5942014 ldr r2, [r4, #20] 8598: e5933014 ldr r3, [r3, #20] 859c: e1520003 cmp r2, r3 85a0: 2a00000a bcs 85d0 <_Thread_Resume+0xf0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 85a4: e59f3034 ldr r3, [pc, #52] ; 85e0 <_Thread_Resume+0x100> 85a8: e5933000 ldr r3, [r3] 85ac: e5d33076 ldrb r3, [r3, #118] 85b0: e3530000 cmp r3, #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; 85b4: e5814000 str r4, [r1] if ( _Thread_Executing->is_preemptible || 85b8: 1a000001 bne 85c4 <_Thread_Resume+0xe4> 85bc: e3520000 cmp r2, #0 ; 0x0 85c0: 1a000002 bne 85d0 <_Thread_Resume+0xf0> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 85c4: e59f3018 ldr r3, [pc, #24] ; 85e4 <_Thread_Resume+0x104> 85c8: e3a02001 mov r2, #1 ; 0x1 85cc: e5c32000 strb r2, [r3] } } } _ISR_Enable( level ); 85d0: e129f005 msr CPSR_fc, r5 85d4: e8bd8030 pop {r4, r5, pc} 85d8: 00022878 .word 0x00022878 85dc: 00022850 .word 0x00022850 85e0: 00022884 .word 0x00022884 85e4: 00022894 .word 0x00022894 00006dc0 <_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 ) { 6dc0: e59f305c ldr r3, [pc, #92] ; 6e24 <_Thread_Stack_Allocate+0x64> 6dc4: e5933000 ldr r3, [r3] 6dc8: e5932020 ldr r2, [r3, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 6dcc: e59f3054 ldr r3, [pc, #84] ; 6e28 <_Thread_Stack_Allocate+0x68> 6dd0: e5933000 ldr r3, [r3] 6dd4: e92d4030 push {r4, r5, lr} 6dd8: e1510003 cmp r1, r3 6ddc: 21a04001 movcs r4, r1 6de0: 31a04003 movcc r4, r3 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 6de4: e3520000 cmp r2, #0 ; 0x0 size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 6de8: 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 ) { 6dec: 0a000003 beq 6e00 <_Thread_Stack_Allocate+0x40> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 6df0: e1a00004 mov r0, r4 <== NOT EXECUTED 6df4: e1a0e00f mov lr, pc <== NOT EXECUTED 6df8: e12fff12 bx r2 <== NOT EXECUTED 6dfc: ea000002 b 6e0c <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 6e00: 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 ); 6e04: e1a00004 mov r0, r4 6e08: eb000203 bl 761c <_Workspace_Allocate> 6e0c: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 6e10: e3500000 cmp r0, #0 ; 0x0 6e14: 11a00004 movne r0, r4 6e18: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 6e1c: e58530cc str r3, [r5, #204] return the_stack_size; } 6e20: e8bd8030 pop {r4, r5, pc} 6e24: 0001629c .word 0x0001629c 6e28: 0001448c .word 0x0001448c 00006e2c <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 6e2c: e5d030c0 ldrb r3, [r0, #192] 6e30: e3530000 cmp r3, #0 ; 0x0 */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 6e34: 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 ) 6e38: 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 ) 6e3c: e59f3028 ldr r3, [pc, #40] ; 6e6c <_Thread_Stack_Free+0x40> 6e40: e5933000 ldr r3, [r3] 6e44: e5933024 ldr r3, [r3, #36] 6e48: e3530000 cmp r3, #0 ; 0x0 6e4c: 0a000003 beq 6e60 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 6e50: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 6e54: e1a0e00f mov lr, pc <== NOT EXECUTED 6e58: e12fff13 bx r3 <== NOT EXECUTED 6e5c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 6e60: e59000c8 ldr r0, [r0, #200] } 6e64: 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 ); 6e68: ea0001e7 b 760c <_Workspace_Free> 6e6c: 0001629c .word 0x0001629c 00005c8c <_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 ) ) { 5c8c: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED 5c90: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 5c94: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 5c98: e92d4010 push {r4, lr} <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 5c9c: e5813044 str r3, [r1, #68] <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 5ca0: e1a04001 mov r4, r1 <== 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 ) ) { 5ca4: 1a000005 bne 5cc0 <_Thread_blocking_operation_Cancel+0x34> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 5ca8: e2833003 add r3, r3, #3 ; 0x3 <== NOT EXECUTED 5cac: e5813050 str r3, [r1, #80] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 5cb0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 5cb4: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED 5cb8: eb000605 bl 74d4 <_Watchdog_Remove> <== NOT EXECUTED 5cbc: ea000000 b 5cc4 <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED } else _ISR_Enable( level ); 5cc0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 5cc4: e59f1008 ldr r1, [pc, #8] ; 5cd4 <_Thread_blocking_operation_Cancel+0x48> <== NOT EXECUTED 5cc8: e1a00004 mov r0, r4 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 5ccc: e8bd4010 pop {r4, lr} <== NOT EXECUTED 5cd0: ea000068 b 5e78 <_Thread_Clear_state> <== NOT EXECUTED 5cd4: 1003fff8 .word 0x1003fff8 0000680c <_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 ) { 680c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 6810: e1a0c001 mov ip, r1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 6814: e5915014 ldr r5, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6818: e281303c add r3, r1, #60 ; 0x3c 681c: e58c3038 str r3, [ip, #56] the_chain->permanent_null = NULL; 6820: e3a03000 mov r3, #0 ; 0x0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 6824: e1a04000 mov r4, r0 6828: e58c303c str r3, [ip, #60] RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 682c: e1a00325 lsr r0, r5, #6 _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 ]; 6830: e283300c add r3, r3, #12 ; 0xc 6834: e0264093 mla r6, r3, r0, r4 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 6838: e3150020 tst r5, #32 ; 0x20 the_chain->last = _Chain_Head(the_chain); 683c: e2811038 add r1, r1, #56 ; 0x38 6840: e58c1040 str r1, [ip, #64] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 6844: e1a09002 mov r9, r2 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 6848: e5948038 ldr r8, [r4, #56] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 684c: 159fa19c ldrne sl, [pc, #412] ; 69f0 <_Thread_queue_Enqueue_priority+0x1e4> _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 6850: 12860008 addne r0, r6, #8 ; 0x8 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 6854: 1a00002d bne 6910 <_Thread_queue_Enqueue_priority+0x104> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6858: e3a03003 mov r3, #3 ; 0x3 685c: e0030390 mul r3, r0, r3 6860: e2833001 add r3, r3, #1 ; 0x1 6864: e0840103 add r0, r4, r3, lsl #2 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 6868: e1a07006 mov r7, r6 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 686c: e10f6000 mrs r6, CPSR 6870: e38630c0 orr r3, r6, #192 ; 0xc0 6874: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 6878: e3e02000 mvn r2, #0 ; 0x0 687c: e5971000 ldr r1, [r7] 6880: ea000011 b 68cc <_Thread_queue_Enqueue_priority+0xc0> while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 6884: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 6888: e1550002 cmp r5, r2 688c: 9a000010 bls 68d4 <_Thread_queue_Enqueue_priority+0xc8> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 6890: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 6894: e1510000 cmp r1, r0 6898: 0a00000d beq 68d4 <_Thread_queue_Enqueue_priority+0xc8> break; search_priority = search_thread->current_priority; 689c: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 68a0: e1550002 cmp r5, r2 68a4: 9a00000a bls 68d4 <_Thread_queue_Enqueue_priority+0xc8> break; #endif _ISR_Flash( level ); 68a8: e10f3000 mrs r3, CPSR 68ac: e129f006 msr CPSR_fc, r6 68b0: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 68b4: e5913010 ldr r3, [r1, #16] 68b8: e1180003 tst r8, r3 68bc: 1a000001 bne 68c8 <_Thread_queue_Enqueue_priority+0xbc> _ISR_Enable( level ); 68c0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 68c4: eaffffe8 b 686c <_Thread_queue_Enqueue_priority+0x60> <== NOT EXECUTED goto restart_forward_search; } search_thread = 68c8: 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 ) ) { 68cc: e1510000 cmp r1, r0 68d0: 1affffeb bne 6884 <_Thread_queue_Enqueue_priority+0x78> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 68d4: e5943030 ldr r3, [r4, #48] 68d8: e3530001 cmp r3, #1 ; 0x1 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 ) ) { 68dc: e1a00006 mov r0, r6 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 68e0: 1a00003f bne 69e4 <_Thread_queue_Enqueue_priority+0x1d8> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 68e4: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 68e8: e1550002 cmp r5, r2 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 68ec: e5843030 str r3, [r4, #48] if ( priority == search_priority ) 68f0: 0a000031 beq 69bc <_Thread_queue_Enqueue_priority+0x1b0> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 68f4: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 68f8: e88c000a stm ip, {r1, r3} the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 68fc: e58c4044 str r4, [ip, #68] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 6900: e583c000 str ip, [r3] search_node->previous = the_node; 6904: e581c004 str ip, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6908: e129f006 msr CPSR_fc, r6 690c: ea000032 b 69dc <_Thread_queue_Enqueue_priority+0x1d0> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 6910: e5da3000 ldrb r3, [sl] 6914: e2832001 add r2, r3, #1 ; 0x1 _ISR_Disable( level ); 6918: e10f7000 mrs r7, CPSR 691c: e38730c0 orr r3, r7, #192 ; 0xc0 6920: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 6924: e5901000 ldr r1, [r0] 6928: ea000011 b 6974 <_Thread_queue_Enqueue_priority+0x168> while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 692c: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 6930: e1550002 cmp r5, r2 6934: 2a000010 bcs 697c <_Thread_queue_Enqueue_priority+0x170> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6938: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 693c: e1510006 cmp r1, r6 6940: 0a00000d beq 697c <_Thread_queue_Enqueue_priority+0x170> break; search_priority = search_thread->current_priority; 6944: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 6948: e1550002 cmp r5, r2 694c: 2a00000a bcs 697c <_Thread_queue_Enqueue_priority+0x170> break; #endif _ISR_Flash( level ); 6950: e10f3000 mrs r3, CPSR 6954: e129f007 msr CPSR_fc, r7 6958: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 695c: e5913010 ldr r3, [r1, #16] 6960: e1180003 tst r8, r3 6964: 1a000001 bne 6970 <_Thread_queue_Enqueue_priority+0x164> _ISR_Enable( level ); 6968: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 696c: eaffffe7 b 6910 <_Thread_queue_Enqueue_priority+0x104> <== NOT EXECUTED goto restart_reverse_search; } search_thread = (Thread_Control *) 6970: 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 ) ) { 6974: e1510006 cmp r1, r6 6978: 1affffeb bne 692c <_Thread_queue_Enqueue_priority+0x120> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 697c: e5943030 ldr r3, [r4, #48] 6980: e3530001 cmp r3, #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 ) ) { 6984: e1a00007 mov r0, r7 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6988: 1a000015 bne 69e4 <_Thread_queue_Enqueue_priority+0x1d8> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 698c: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 6990: e1550002 cmp r5, r2 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 6994: e5843030 str r3, [r4, #48] if ( priority == search_priority ) 6998: 0a000007 beq 69bc <_Thread_queue_Enqueue_priority+0x1b0> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 699c: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 69a0: e58c1004 str r1, [ip, #4] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 69a4: e58c3000 str r3, [ip] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 69a8: e58c4044 str r4, [ip, #68] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 69ac: e581c000 str ip, [r1] next_node->previous = the_node; 69b0: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 69b4: e129f007 msr CPSR_fc, r7 69b8: ea000007 b 69dc <_Thread_queue_Enqueue_priority+0x1d0> 69bc: e281303c add r3, r1, #60 ; 0x3c return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 69c0: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 69c4: e58c3000 str r3, [ip] the_node->previous = previous_node; 69c8: e58c2004 str r2, [ip, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 69cc: e58c4044 str r4, [ip, #68] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 69d0: e582c000 str ip, [r2] search_node->previous = the_node; 69d4: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 69d8: e129f000 msr CPSR_fc, r0 69dc: e3a00001 mov r0, #1 ; 0x1 69e0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 69e4: e5890000 str r0, [r9] <== NOT EXECUTED return the_thread_queue->sync_state; 69e8: e5940030 ldr r0, [r4, #48] <== NOT EXECUTED } 69ec: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 69f0: 00014490 .word 0x00014490 0000b25c <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { b25c: e92d4010 push {r4, lr} b260: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); b264: e10f0000 mrs r0, CPSR b268: e38030c0 orr r3, r0, #192 ; 0xc0 b26c: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { b270: e59f3064 ldr r3, [pc, #100] ; b2dc <_Thread_queue_Extract_fifo+0x80> b274: e5912010 ldr r2, [r1, #16] b278: e0023003 and r3, r2, r3 b27c: e3530000 cmp r3, #0 ; 0x0 b280: 1a000001 bne b28c <_Thread_queue_Extract_fifo+0x30> _ISR_Enable( level ); b284: 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 } b288: e8bd8010 pop {r4, pc} <== NOT EXECUTED _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { b28c: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; b290: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; b294: e5911000 ldr r1, [r1] b298: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; b29c: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; b2a0: e5821000 str r1, [r2] b2a4: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; b2a8: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { b2ac: 0a000001 beq b2b8 <_Thread_queue_Extract_fifo+0x5c> _ISR_Enable( level ); b2b0: e129f000 msr CPSR_fc, r0 b2b4: ea000004 b b2cc <_Thread_queue_Extract_fifo+0x70> b2b8: e3a03003 mov r3, #3 ; 0x3 b2bc: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); b2c0: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); b2c4: e2840048 add r0, r4, #72 ; 0x48 b2c8: ebfff081 bl 74d4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); b2cc: e59f100c ldr r1, [pc, #12] ; b2e0 <_Thread_queue_Extract_fifo+0x84> b2d0: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } b2d4: e8bd4010 pop {r4, lr} b2d8: eaffeae6 b 5e78 <_Thread_Clear_state> b2dc: 0003bee0 .word 0x0003bee0 b2e0: 1003fff8 .word 0x1003fff8 0000a2e4 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { a2e4: e92d4070 push {r4, r5, r6, lr} a2e8: e1a04001 mov r4, r1 a2ec: 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 ); a2f0: e10fc000 mrs ip, CPSR a2f4: e38c30c0 orr r3, ip, #192 ; 0xc0 a2f8: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { a2fc: e59f30b4 ldr r3, [pc, #180] ; a3b8 <_Thread_queue_Extract_priority_helper+0xd4> a300: e5912010 ldr r2, [r1, #16] a304: e0023003 and r3, r2, r3 a308: e3530000 cmp r3, #0 ; 0x0 a30c: 1a000001 bne a318 <_Thread_queue_Extract_priority_helper+0x34> _ISR_Enable( level ); a310: e129f00c msr CPSR_fc, ip <== NOT EXECUTED a314: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a318: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a31c: e284303c add r3, r4, #60 ; 0x3c a320: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; a324: 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; a328: 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; a32c: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a330: 0a00000e beq a370 <_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; a334: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; a338: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; a33c: 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; a340: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; a344: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a348: e5942038 ldr r2, [r4, #56] a34c: e5943040 ldr r3, [r4, #64] a350: e1520003 cmp r2, r3 a354: 0a000005 beq a370 <_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 ); a358: 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 = a35c: e2813038 add r3, r1, #56 ; 0x38 a360: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; a364: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; a368: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); a36c: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { a370: e3560000 cmp r6, #0 ; 0x0 a374: 0a000001 beq a380 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); a378: e129f00c msr CPSR_fc, ip a37c: e8bd8070 pop {r4, r5, r6, pc} return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a380: e5943050 ldr r3, [r4, #80] a384: e3530002 cmp r3, #2 ; 0x2 a388: 0a000001 beq a394 <_Thread_queue_Extract_priority_helper+0xb0> _ISR_Enable( level ); a38c: e129f00c msr CPSR_fc, ip a390: ea000004 b a3a8 <_Thread_queue_Extract_priority_helper+0xc4> a394: e3a03003 mov r3, #3 ; 0x3 a398: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); a39c: e129f00c msr CPSR_fc, ip (void) _Watchdog_Remove( &the_thread->Timer ); a3a0: e2840048 add r0, r4, #72 ; 0x48 a3a4: ebfff44a bl 74d4 <_Watchdog_Remove> a3a8: e59f100c ldr r1, [pc, #12] ; a3bc <_Thread_queue_Extract_priority_helper+0xd8> a3ac: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a3b0: e8bd4070 pop {r4, r5, r6, lr} a3b4: eaffeeaf b 5e78 <_Thread_Clear_state> a3b8: 0003bee0 .word 0x0003bee0 a3bc: 1003fff8 .word 0x1003fff8 0000a3c0 <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; a3c0: e5902044 ldr r2, [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 && a3c4: e5921030 ldr r1, [r2, #48] a3c8: e3510000 cmp r1, #0 ; 0x0 a3cc: 0a000009 beq a3f8 <_Thread_queue_Process_timeout+0x38> a3d0: e59f3034 ldr r3, [pc, #52] ; a40c <_Thread_queue_Process_timeout+0x4c> <== NOT EXECUTED a3d4: e5933000 ldr r3, [r3] <== NOT EXECUTED a3d8: e1500003 cmp r0, r3 <== NOT EXECUTED a3dc: 1a000005 bne a3f8 <_Thread_queue_Process_timeout+0x38> <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { a3e0: e3510003 cmp r1, #3 ; 0x3 <== NOT EXECUTED the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a3e4: 1592303c ldrne r3, [r2, #60] <== NOT EXECUTED a3e8: 15803034 strne r3, [r0, #52] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; a3ec: 13a03002 movne r3, #2 ; 0x2 <== NOT EXECUTED a3f0: 15823030 strne r3, [r2, #48] <== NOT EXECUTED a3f4: e12fff1e bx lr <== NOT EXECUTED } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a3f8: e592303c ldr r3, [r2, #60] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); a3fc: e1a01000 mov r1, r0 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; a400: e5803034 str r3, [r0, #52] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); a404: e5900044 ldr r0, [r0, #68] a408: eaffffaf b a2cc <_Thread_queue_Extract> a40c: 000162c4 .word 0x000162c4 0001fc58 <_Timespec_Divide_by_integer>: /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 1fc58: e5903000 ldr r3, [r0] <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 1fc5c: e59fc06c ldr ip, [pc, #108] ; 1fcd0 <_Timespec_Divide_by_integer+0x78> <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 1fc60: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 1fc64: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 1fc68: e086539c umull r5, r6, ip, r3 <== NOT EXECUTED 1fc6c: e026649c mla r6, ip, r4, r6 <== NOT EXECUTED t += time->tv_nsec; 1fc70: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 1fc74: e0957000 adds r7, r5, r0 <== NOT EXECUTED 1fc78: e0a68fc0 adc r8, r6, r0, asr #31 <== NOT EXECUTED 1fc7c: e1a03001 mov r3, r1 <== NOT EXECUTED 1fc80: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 1fc84: e1a06002 mov r6, r2 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 1fc88: e1a00007 mov r0, r7 <== NOT EXECUTED 1fc8c: e1a02003 mov r2, r3 <== NOT EXECUTED 1fc90: e1a01008 mov r1, r8 <== NOT EXECUTED 1fc94: e1a03004 mov r3, r4 <== NOT EXECUTED 1fc98: eb006b1f bl 3a91c <__udivdi3> <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 1fc9c: e59f202c ldr r2, [pc, #44] ; 1fcd0 <_Timespec_Divide_by_integer+0x78> <== NOT EXECUTED 1fca0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 1fca4: e1a04000 mov r4, r0 <== NOT EXECUTED 1fca8: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 1fcac: eb006b1a bl 3a91c <__udivdi3> <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 1fcb0: e1a01005 mov r1, r5 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 1fcb4: e5860000 str r0, [r6] <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 1fcb8: e59f2010 ldr r2, [pc, #16] ; 1fcd0 <_Timespec_Divide_by_integer+0x78> <== NOT EXECUTED 1fcbc: e1a00004 mov r0, r4 <== NOT EXECUTED 1fcc0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1fcc4: eb006c5c bl 3ae3c <__umoddi3> <== NOT EXECUTED 1fcc8: e5860004 str r0, [r6, #4] <== NOT EXECUTED } 1fccc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 1fcd0: 3b9aca00 .word 0x3b9aca00 0000b7a4 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { b7a4: e92d4010 push {r4, lr} b7a8: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); b7ac: eb001231 bl 10078 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) b7b0: e5943024 ldr r3, [r4, #36] b7b4: e3530000 cmp r3, #0 ; 0x0 b7b8: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); b7bc: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } b7c0: 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 ); b7c4: ea00122b b 10078 <_Chain_Extract> <== NOT EXECUTED 00007364 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7364: e59f30fc ldr r3, [pc, #252] ; 7468 <_Watchdog_Insert+0x104> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 7368: e92d41f0 push {r4, r5, r6, r7, r8, lr} 736c: e1a0c001 mov ip, r1 7370: e1a07000 mov r7, r0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7374: e5934000 ldr r4, [r3] _ISR_Disable( level ); 7378: e10f5000 mrs r5, CPSR 737c: e38530c0 orr r3, r5, #192 ; 0xc0 7380: 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 ) { 7384: e5913008 ldr r3, [r1, #8] 7388: e3530000 cmp r3, #0 ; 0x0 738c: 0a000001 beq 7398 <_Watchdog_Insert+0x34> _ISR_Enable( level ); 7390: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 7394: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 7398: e59f30cc ldr r3, [pc, #204] ; 746c <_Watchdog_Insert+0x108> 739c: e5932000 ldr r2, [r3] 73a0: e2822001 add r2, r2, #1 ; 0x1 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 73a4: e59f60c4 ldr r6, [pc, #196] ; 7470 <_Watchdog_Insert+0x10c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 73a8: e5832000 str r2, [r3] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 73ac: e3a03001 mov r3, #1 ; 0x1 73b0: e5813008 str r3, [r1, #8] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 73b4: e1a08006 mov r8, r6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 73b8: e59c000c ldr r0, [ip, #12] * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 73bc: e5971000 ldr r1, [r7] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 73c0: e3500000 cmp r0, #0 ; 0x0 73c4: 0a000014 beq 741c <_Watchdog_Insert+0xb8> 73c8: e5913000 ldr r3, [r1] 73cc: e3530000 cmp r3, #0 ; 0x0 73d0: 0a000011 beq 741c <_Watchdog_Insert+0xb8> break; if ( delta_interval < after->delta_interval ) { 73d4: e5912010 ldr r2, [r1, #16] 73d8: e1500002 cmp r0, r2 after->delta_interval -= delta_interval; 73dc: 30603002 rsbcc r3, r0, r2 73e0: 35813010 strcc r3, [r1, #16] 73e4: 3a00000c bcc 741c <_Watchdog_Insert+0xb8> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 73e8: e10f3000 mrs r3, CPSR 73ec: e129f005 msr CPSR_fc, r5 73f0: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 73f4: e59c3008 ldr r3, [ip, #8] 73f8: e3530001 cmp r3, #1 ; 0x1 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 73fc: e0620000 rsb r0, r2, r0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7400: 1a000010 bne 7448 <_Watchdog_Insert+0xe4> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7404: e5963000 ldr r3, [r6] 7408: e1530004 cmp r3, r4 _Watchdog_Sync_level = insert_isr_nest_level; 740c: 85884000 strhi r4, [r8] 7410: 8affffe8 bhi 73b8 <_Watchdog_Insert+0x54> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 7414: e5911000 ldr r1, [r1] 7418: eaffffe8 b 73c0 <_Watchdog_Insert+0x5c> the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 741c: e59f3050 ldr r3, [pc, #80] ; 7474 <_Watchdog_Insert+0x110> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 7420: e5912004 ldr r2, [r1, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 7424: e5933000 ldr r3, [r3] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 7428: e5921000 ldr r1, [r2] 742c: e58c3014 str r3, [ip, #20] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 7430: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 7434: e582c000 str ip, [r2] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 7438: e98c000c stmib ip, {r2, r3} } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 743c: e58c0010 str r0, [ip, #16] before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 7440: e581c004 str ip, [r1, #4] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 7444: e58c1000 str r1, [ip] _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 7448: e59f3020 ldr r3, [pc, #32] ; 7470 <_Watchdog_Insert+0x10c> _Watchdog_Sync_count--; 744c: e59f2018 ldr r2, [pc, #24] ; 746c <_Watchdog_Insert+0x108> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 7450: e5834000 str r4, [r3] _Watchdog_Sync_count--; 7454: e5923000 ldr r3, [r2] 7458: e2433001 sub r3, r3, #1 ; 0x1 745c: e5823000 str r3, [r2] _ISR_Enable( level ); 7460: e129f005 msr CPSR_fc, r5 7464: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 7468: 000162a0 .word 0x000162a0 746c: 00016360 .word 0x00016360 7470: 000162c0 .word 0x000162c0 7474: 00016364 .word 0x00016364 00007654 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7654: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7658: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 765c: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7660: 0a000001 beq 766c <_Workspace_Handler_initialization+0x18> 7664: e2141003 ands r1, r4, #3 ; 0x3 7668: 0a000003 beq 767c <_Workspace_Handler_initialization+0x28> _Internal_error_Occurred( 766c: e3a00000 mov r0, #0 ; 0x0 7670: e3a01001 mov r1, #1 ; 0x1 7674: e3a02002 mov r2, #2 ; 0x2 7678: ea00000e b 76b8 <_Workspace_Handler_initialization+0x64> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 767c: e59f3038 ldr r3, [pc, #56] ; 76bc <_Workspace_Handler_initialization+0x68> 7680: e5933000 ldr r3, [r3] 7684: e5d33028 ldrb r3, [r3, #40] 7688: e3530000 cmp r3, #0 ; 0x0 memset( starting_address, 0, size ); 768c: 11a02005 movne r2, r5 7690: 1b001149 blne bbbc memory_available = _Heap_Initialize( 7694: e1a01004 mov r1, r4 7698: e1a02005 mov r2, r5 769c: e59f001c ldr r0, [pc, #28] ; 76c0 <_Workspace_Handler_initialization+0x6c> 76a0: e3a03004 mov r3, #4 ; 0x4 76a4: ebfff706 bl 52c4 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 76a8: e3500000 cmp r0, #0 ; 0x0 76ac: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 76b0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 76b4: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 76b8: ebfff786 bl 54d8 <_Internal_error_Occurred> 76bc: 0001629c .word 0x0001629c 76c0: 0001622c .word 0x0001622c 00008508 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 8508: e1a03002 mov r3, r2 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 850c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 8510: eaffffe9 b 84bc <__assert_func> <== NOT EXECUTED 000084bc <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 84bc: e92d4010 push {r4, lr} <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 84c0: e252c000 subs ip, r2, #0 ; 0x0 <== NOT EXECUTED 84c4: 059fc030 ldreq ip, [pc, #48] ; 84fc <__assert_func+0x40> <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 84c8: e1a04001 mov r4, r1 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 84cc: 159fe02c ldrne lr, [pc, #44] ; 8500 <__assert_func+0x44> <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 84d0: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 84d4: e1a01003 mov r1, r3 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 84d8: 01a0e00c moveq lr, ip <== NOT EXECUTED 84dc: e1a02000 mov r2, r0 <== NOT EXECUTED 84e0: e1a03004 mov r3, r4 <== NOT EXECUTED 84e4: e59f0018 ldr r0, [pc, #24] ; 8504 <__assert_func+0x48> <== NOT EXECUTED 84e8: e58de000 str lr, [sp] <== NOT EXECUTED 84ec: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 84f0: ebffe67d bl 1eec <== NOT EXECUTED file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 84f4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 84f8: ebfff140 bl 4a00 <== NOT EXECUTED 84fc: 000159df .word 0x000159df 8500: 00015b51 .word 0x00015b51 8504: 00015b5e .word 0x00015b5e 00013a28 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 13a28: e1a04000 mov r4, r0 13a2c: eb000263 bl 143c0 <___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(); 13a30: ebffffe1 bl 139bc rtems_shutdown_executive(status); 13a34: e1a00004 mov r0, r4 13a38: eb00003a bl 13b28 13a3c: eafffffe b 13a3c <_exit+0x14> <== NOT EXECUTED 00027bcc <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 27bcc: e1a00001 mov r0, r1 <== NOT EXECUTED 27bd0: e1a01002 mov r1, r2 <== NOT EXECUTED 27bd4: e1a02003 mov r2, r3 <== NOT EXECUTED 27bd8: eaffff88 b 27a00 <== NOT EXECUTED 0001e244 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 1e244: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 1e248: e12fff1e bx lr <== NOT EXECUTED 00008914 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 8914: eaffffe6 b 88b4 <== NOT EXECUTED 0001ca70 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 1ca70: e1a00001 mov r0, r1 <== NOT EXECUTED 1ca74: e1a01002 mov r1, r2 <== NOT EXECUTED 1ca78: eaffff73 b 1c84c <== NOT EXECUTED 0001cc30 <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 1cc30: e1a00001 mov r0, r1 <== NOT EXECUTED 1cc34: e1a01002 mov r1, r2 <== NOT EXECUTED 1cc38: eaffffc8 b 1cb60 <== NOT EXECUTED 00013b0c <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 13b0c: e1a00001 mov r0, r1 <== NOT EXECUTED 13b10: e1a01002 mov r1, r2 <== NOT EXECUTED 13b14: ea000011 b 13b60 <== NOT EXECUTED 0003b508 <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3b508: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3b50c: e24dd04c sub sp, sp, #76 ; 0x4c <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3b510: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3b514: e1a04001 mov r4, r1 <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3b518: e1a0100d mov r1, sp <== NOT EXECUTED int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 3b51c: e1a05002 mov r5, r2 <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 3b520: ebff273c bl 5218 <== NOT EXECUTED if ( s < 0 ) 3b524: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3b528: ba00000d blt 3b564 <_rename_r+0x5c> <== NOT EXECUTED return s; s = link( old, new ); 3b52c: e1a01005 mov r1, r5 <== NOT EXECUTED 3b530: e1a00004 mov r0, r4 <== NOT EXECUTED 3b534: ebff84c4 bl 1c84c <== NOT EXECUTED if ( s < 0 ) 3b538: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3b53c: ba000008 blt 3b564 <_rename_r+0x5c> <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 3b540: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 3b544: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 3b548: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED 3b54c: 1a000002 bne 3b55c <_rename_r+0x54> <== NOT EXECUTED 3b550: e1a00004 mov r0, r4 <== NOT EXECUTED 3b554: ebff8782 bl 1d364 <== NOT EXECUTED 3b558: ea000001 b 3b564 <_rename_r+0x5c> <== NOT EXECUTED 3b55c: e1a00004 mov r0, r4 <== NOT EXECUTED 3b560: ebff887b bl 1d754 <== NOT EXECUTED } 3b564: e28dd04c add sp, sp, #76 ; 0x4c <== NOT EXECUTED 3b568: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 000052e8 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 52e8: e1a00001 mov r0, r1 <== NOT EXECUTED 52ec: e1a01002 mov r1, r2 <== NOT EXECUTED 52f0: eaffffc8 b 5218 <== NOT EXECUTED 0001d88c <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 1d88c: e1a00001 mov r0, r1 <== NOT EXECUTED 1d890: eaffffaf b 1d754 <== NOT EXECUTED 00003f54 : int alphasort( const void *d1, const void *d2 ) { return(strcmp((*(struct dirent **)d1)->d_name, 3f54: e5900000 ldr r0, [r0] <== NOT EXECUTED 3f58: e5911000 ldr r1, [r1] <== NOT EXECUTED 3f5c: e280000c add r0, r0, #12 ; 0xc <== NOT EXECUTED 3f60: e281100c add r1, r1, #12 ; 0xc <== NOT EXECUTED 3f64: ea002f44 b fc7c <== NOT EXECUTED 0001b1a4 : #include int chdir( const char *pathname ) { 1b1a4: e92d4010 push {r4, lr} /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1b1a8: e3a01001 mov r1, #1 ; 0x1 #include int chdir( const char *pathname ) { 1b1ac: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1b1b0: e1a0200d mov r2, sp 1b1b4: e1a03001 mov r3, r1 1b1b8: ebffa2a2 bl 3c48 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 1b1bc: e3500000 cmp r0, #0 ; 0x0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1b1c0: e1a0400d mov r4, sp pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 1b1c4: 1a00000b bne 1b1f8 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 1b1c8: e59d2008 ldr r2, [sp, #8] 1b1cc: e5923010 ldr r3, [r2, #16] 1b1d0: e3530000 cmp r3, #0 ; 0x0 1b1d4: 1a000009 bne 1b200 rtems_filesystem_freenode( &loc ); 1b1d8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1b1dc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1b1e0: 11a0000d movne r0, sp <== NOT EXECUTED 1b1e4: 11a0e00f movne lr, pc <== NOT EXECUTED 1b1e8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1b1ec: eb003ba9 bl 2a098 <__errno> <== NOT EXECUTED 1b1f0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1b1f4: e5803000 str r3, [r0] 1b1f8: e3e00000 mvn r0, #0 ; 0x0 1b1fc: ea00001f b 1b280 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1b200: e1a0000d mov r0, sp 1b204: e1a0e00f mov lr, pc 1b208: e12fff13 bx r3 1b20c: e3500001 cmp r0, #1 ; 0x1 1b210: 0a00000a beq 1b240 rtems_filesystem_freenode( &loc ); 1b214: e59d3008 ldr r3, [sp, #8] 1b218: e3530000 cmp r3, #0 ; 0x0 1b21c: 0a000004 beq 1b234 1b220: e593301c ldr r3, [r3, #28] 1b224: e3530000 cmp r3, #0 ; 0x0 1b228: 11a0000d movne r0, sp 1b22c: 11a0e00f movne lr, pc 1b230: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1b234: eb003b97 bl 2a098 <__errno> 1b238: e3a03014 mov r3, #20 ; 0x14 1b23c: eaffffec b 1b1f4 } rtems_filesystem_freenode( &rtems_filesystem_current ); 1b240: e59f3040 ldr r3, [pc, #64] ; 1b288 1b244: e5930000 ldr r0, [r3] 1b248: e590200c ldr r2, [r0, #12] 1b24c: e3520000 cmp r2, #0 ; 0x0 1b250: 0a000004 beq 1b268 1b254: e592201c ldr r2, [r2, #28] 1b258: e3520000 cmp r2, #0 ; 0x0 1b25c: 12800004 addne r0, r0, #4 ; 0x4 1b260: 11a0e00f movne lr, pc 1b264: 112fff12 bxne r2 rtems_filesystem_current = loc; 1b268: e59f3018 ldr r3, [pc, #24] ; 1b288 1b26c: e593c000 ldr ip, [r3] 1b270: e89d000f ldm sp, {r0, r1, r2, r3} 1b274: e28cc004 add ip, ip, #4 ; 0x4 1b278: e88c000f stm ip, {r0, r1, r2, r3} 1b27c: e3a00000 mov r0, #0 ; 0x0 return 0; } 1b280: e28dd010 add sp, sp, #16 ; 0x10 1b284: e8bd8010 pop {r4, pc} 1b288: 0003c648 .word 0x0003c648 00003a24 : int chmod( const char *path, mode_t mode ) { 3a24: e92d4030 push {r4, r5, lr} 3a28: e24dd010 sub sp, sp, #16 ; 0x10 3a2c: e1a04001 mov r4, r1 int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 3a30: e1a0200d mov r2, sp 3a34: e3a01000 mov r1, #0 ; 0x0 3a38: e3a03001 mov r3, #1 ; 0x1 3a3c: eb000081 bl 3c48 if ( status != 0 ) 3a40: e3500000 cmp r0, #0 ; 0x0 { int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 3a44: e1a0500d mov r5, sp if ( status != 0 ) 3a48: 1a00000d bne 3a84 return -1; if ( !loc.handlers ){ 3a4c: e59d3004 ldr r3, [sp, #4] 3a50: e3530000 cmp r3, #0 ; 0x0 3a54: 1a00000c bne 3a8c rtems_filesystem_freenode( &loc ); 3a58: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3a5c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3a60: 0a000004 beq 3a78 <== NOT EXECUTED 3a64: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3a68: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3a6c: 11a0000d movne r0, sp <== NOT EXECUTED 3a70: 11a0e00f movne lr, pc <== NOT EXECUTED 3a74: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 3a78: eb009986 bl 2a098 <__errno> <== NOT EXECUTED 3a7c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 3a80: e5803000 str r3, [r0] <== NOT EXECUTED 3a84: e3e04000 mvn r4, #0 ; 0x0 3a88: ea00001a b 3af8 } if ( !loc.handlers->fchmod_h ){ 3a8c: e593301c ldr r3, [r3, #28] 3a90: e3530000 cmp r3, #0 ; 0x0 3a94: 1a00000a bne 3ac4 rtems_filesystem_freenode( &loc ); 3a98: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3a9c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3aa0: 0a000004 beq 3ab8 <== NOT EXECUTED 3aa4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3aa8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3aac: 11a0000d movne r0, sp <== NOT EXECUTED 3ab0: 11a0e00f movne lr, pc <== NOT EXECUTED 3ab4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3ab8: eb009976 bl 2a098 <__errno> <== NOT EXECUTED 3abc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3ac0: eaffffee b 3a80 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 3ac4: e1a01004 mov r1, r4 3ac8: e1a0000d mov r0, sp 3acc: e1a0e00f mov lr, pc 3ad0: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3ad4: e59d3008 ldr r3, [sp, #8] 3ad8: 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 ); 3adc: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 3ae0: 0a000004 beq 3af8 3ae4: e593301c ldr r3, [r3, #28] 3ae8: e3530000 cmp r3, #0 ; 0x0 3aec: 11a0000d movne r0, sp 3af0: 11a0e00f movne lr, pc 3af4: 112fff13 bxne r3 return result; } 3af8: e1a00004 mov r0, r4 3afc: e28dd010 add sp, sp, #16 ; 0x10 3b00: e8bd8030 pop {r4, r5, pc} 0001b28c : int chown( const char *path, uid_t owner, gid_t group ) { 1b28c: e92d4070 push {r4, r5, r6, lr} 1b290: e24dd010 sub sp, sp, #16 ; 0x10 1b294: e1a0c801 lsl ip, r1, #16 1b298: e1a0e802 lsl lr, r2, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 1b29c: e3a01000 mov r1, #0 ; 0x0 1b2a0: e1a0200d mov r2, sp 1b2a4: e3a03001 mov r3, #1 ; 0x1 int chown( const char *path, uid_t owner, gid_t group ) { 1b2a8: e1a0482c lsr r4, ip, #16 1b2ac: e1a0582e lsr r5, lr, #16 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 1b2b0: ebffa264 bl 3c48 1b2b4: e3500000 cmp r0, #0 ; 0x0 1b2b8: e1a0600d mov r6, sp 1b2bc: 1a00000b bne 1b2f0 return -1; if ( !loc.ops->chown_h ) { 1b2c0: e59d3008 ldr r3, [sp, #8] 1b2c4: e593c018 ldr ip, [r3, #24] 1b2c8: e35c0000 cmp ip, #0 ; 0x0 1b2cc: 1a000009 bne 1b2f8 rtems_filesystem_freenode( &loc ); 1b2d0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1b2d4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1b2d8: 11a0000d movne r0, sp <== NOT EXECUTED 1b2dc: 11a0e00f movne lr, pc <== NOT EXECUTED 1b2e0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1b2e4: eb003b6b bl 2a098 <__errno> <== NOT EXECUTED 1b2e8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1b2ec: e5803000 str r3, [r0] <== NOT EXECUTED 1b2f0: e3e04000 mvn r4, #0 ; 0x0 1b2f4: ea00000d b 1b330 } result = (*loc.ops->chown_h)( &loc, owner, group ); 1b2f8: e1a01004 mov r1, r4 1b2fc: e1a02005 mov r2, r5 1b300: e1a0000d mov r0, sp 1b304: e1a0e00f mov lr, pc 1b308: e12fff1c bx ip rtems_filesystem_freenode( &loc ); 1b30c: e59d3008 ldr r3, [sp, #8] 1b310: 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 ); 1b314: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 1b318: 0a000004 beq 1b330 1b31c: e593301c ldr r3, [r3, #28] 1b320: e3530000 cmp r3, #0 ; 0x0 1b324: 11a0000d movne r0, sp 1b328: 11a0e00f movne lr, pc 1b32c: 112fff13 bxne r3 return result; } 1b330: e1a00004 mov r0, r4 1b334: e28dd010 add sp, sp, #16 ; 0x10 1b338: e8bd8070 pop {r4, r5, r6, pc} 0001b33c : #include int chroot( const char *pathname ) { 1b33c: 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) { 1b340: e59f60c4 ldr r6, [pc, #196] ; 1b40c 1b344: e59f30c4 ldr r3, [pc, #196] ; 1b410 1b348: e5964000 ldr r4, [r6] 1b34c: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 1b350: e24dd010 sub sp, sp, #16 ; 0x10 1b354: 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) { 1b358: 1a000007 bne 1b37c rtems_libio_set_private_env(); /* try to set a new private env*/ 1b35c: eb000702 bl 1cf6c if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 1b360: e5963000 ldr r3, [r6] 1b364: e1530004 cmp r3, r4 1b368: 1a000003 bne 1b37c rtems_set_errno_and_return_minus_one( ENOTSUP ); 1b36c: eb003b49 bl 2a098 <__errno> <== NOT EXECUTED 1b370: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1b374: e5803000 str r3, [r0] <== NOT EXECUTED 1b378: ea000008 b 1b3a0 <== NOT EXECUTED } result = chdir(pathname); 1b37c: e1a00005 mov r0, r5 1b380: ebffff87 bl 1b1a4 if (result) { 1b384: e3500000 cmp r0, #0 ; 0x0 1b388: 0a000006 beq 1b3a8 rtems_set_errno_and_return_minus_one( errno ); 1b38c: eb003b41 bl 2a098 <__errno> <== NOT EXECUTED 1b390: e1a04000 mov r4, r0 <== NOT EXECUTED 1b394: eb003b3f bl 2a098 <__errno> <== NOT EXECUTED 1b398: e5903000 ldr r3, [r0] <== NOT EXECUTED 1b39c: e5843000 str r3, [r4] <== NOT EXECUTED 1b3a0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1b3a4: ea000016 b 1b404 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 1b3a8: e1a01000 mov r1, r0 1b3ac: e1a0200d mov r2, sp 1b3b0: e59f005c ldr r0, [pc, #92] ; 1b414 1b3b4: e1a03001 mov r3, r1 1b3b8: ebffa222 bl 3c48 1b3bc: e3500000 cmp r0, #0 ; 0x0 1b3c0: 1afffff1 bne 1b38c /* 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); 1b3c4: e59f3040 ldr r3, [pc, #64] ; 1b40c 1b3c8: e5930000 ldr r0, [r3] 1b3cc: e590201c ldr r2, [r0, #28] 1b3d0: e3520000 cmp r2, #0 ; 0x0 1b3d4: 0a000004 beq 1b3ec 1b3d8: e592201c ldr r2, [r2, #28] 1b3dc: e3520000 cmp r2, #0 ; 0x0 1b3e0: 12800014 addne r0, r0, #20 ; 0x14 1b3e4: 11a0e00f movne lr, pc 1b3e8: 112fff12 bxne r2 rtems_filesystem_root = loc; 1b3ec: e59f3018 ldr r3, [pc, #24] ; 1b40c 1b3f0: e593c000 ldr ip, [r3] 1b3f4: e89d000f ldm sp, {r0, r1, r2, r3} 1b3f8: e28cc014 add ip, ip, #20 ; 0x14 1b3fc: e88c000f stm ip, {r0, r1, r2, r3} 1b400: e3a00000 mov r0, #0 ; 0x0 return 0; } 1b404: e28dd010 add sp, sp, #16 ; 0x10 1b408: e8bd8070 pop {r4, r5, r6, pc} 1b40c: 0003c648 .word 0x0003c648 1b410: 00056c5c .word 0x00056c5c 1b414: 0003fa7e .word 0x0003fa7e 00027864 : * close a directory. */ int closedir( DIR *dirp ) { 27864: e92d4030 push {r4, r5, lr} int fd; if ( !dirp ) 27868: e2505000 subs r5, r0, #0 ; 0x0 2786c: 1a000004 bne 27884 rtems_set_errno_and_return_minus_one( EBADF ); 27870: eb000a08 bl 2a098 <__errno> <== NOT EXECUTED 27874: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 27878: 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)); } 2787c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 27880: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; 27884: e3a03000 mov r3, #0 ; 0x0 27888: e5853004 str r3, [r5, #4] if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; 2788c: e3e03000 mvn r3, #0 ; 0x0 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 27890: e5954000 ldr r4, [r5] dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 27894: e595000c ldr r0, [r5, #12] if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; 27898: e5853000 str r3, [r5] dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 2789c: ebff713a bl 3d8c (void)free((void *)dirp); 278a0: e1a00005 mov r0, r5 278a4: ebff7138 bl 3d8c return(close(fd)); 278a8: e1a00004 mov r0, r4 } 278ac: 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)); 278b0: eaff7093 b 3b04 0000a6e4 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a6e4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED a6e8: 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; a6ec: e88d0007 stm sp, {r0, r1, r2} <== NOT EXECUTED the_jnode = iop->file_info; a6f0: e590302c ldr r3, [r0, #44] <== NOT EXECUTED status = rtems_io_control( a6f4: e1a0200d mov r2, sp <== NOT EXECUTED a6f8: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED a6fc: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED a700: eb00023f bl b004 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a704: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; a708: 059d000c ldreq r0, [sp, #12] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); a70c: 1bffffe9 blne a6b8 <== NOT EXECUTED return args.ioctl_return; } a710: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED a714: e8bd8000 pop {pc} <== NOT EXECUTED 0000a76c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { a76c: 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; a770: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { a774: 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; a778: e590c00c ldr ip, [r0, #12] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a77c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a780: 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; a784: e58d200c str r2, [sp, #12] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; a788: e58d3014 str r3, [sp, #20] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; a78c: e58d1008 str r1, [sp, #8] <== NOT EXECUTED args.count = count; args.flags = iop->flags; a790: e58dc010 str ip, [sp, #16] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; a794: 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; a798: 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( a79c: e1a0200d mov r2, sp <== NOT EXECUTED a7a0: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED a7a4: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED a7a8: eb00023d bl b0a4 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a7ac: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; a7b0: 059d0014 ldreq r0, [sp, #20] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); a7b4: 1bffffbf blne a6b8 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } a7b8: e28dd018 add sp, sp, #24 ; 0x18 <== NOT EXECUTED a7bc: e8bd8000 pop {pc} <== NOT EXECUTED 00002c10 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2c10: e59030b4 ldr r3, [r0, #180] 2c14: e3530000 cmp r3, #0 ; 0x0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2c18: e92d4030 push {r4, r5, lr} 2c1c: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2c20: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 2c24: e10f1000 mrs r1, CPSR <== NOT EXECUTED 2c28: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 2c2c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2c30: e3a05002 mov r5, #2 ; 0x2 <== NOT EXECUTED 2c34: ea00000a b 2c64 <== NOT EXECUTED 2c38: e5845094 str r5, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 2c3c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2c40: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2c44: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 2c48: e1a02001 mov r2, r1 <== NOT EXECUTED 2c4c: eb0005b1 bl 4318 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2c50: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2c54: 1b000769 blne 4a00 <== NOT EXECUTED rtems_interrupt_disable (level); 2c58: e10f1000 mrs r1, CPSR <== NOT EXECUTED 2c5c: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 2c60: 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) { 2c64: e5942084 ldr r2, [r4, #132] <== NOT EXECUTED 2c68: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 2c6c: e1520003 cmp r2, r3 <== NOT EXECUTED 2c70: 1afffff0 bne 2c38 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 2c74: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 2c78: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00001f90 : int dup2( int fildes, int fildes2 ) { 1f90: e92d4070 push {r4, r5, r6, lr} 1f94: e24dd04c sub sp, sp, #76 ; 0x4c 1f98: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f9c: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 1fa0: e1a05000 mov r5, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1fa4: eb000191 bl 25f0 if ( status == -1 ) 1fa8: e3700001 cmn r0, #1 ; 0x1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1fac: e1a0600d mov r6, sp if ( status == -1 ) 1fb0: 0a000009 beq 1fdc /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 1fb4: e1a0100d mov r1, sp 1fb8: e1a00004 mov r0, r4 1fbc: eb00018b bl 25f0 if ( status == -1 ) 1fc0: e3700001 cmn r0, #1 ; 0x1 1fc4: 0a000004 beq 1fdc /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 1fc8: e1a00005 mov r0, r5 <== NOT EXECUTED 1fcc: e1a02004 mov r2, r4 <== NOT EXECUTED 1fd0: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1fd4: eb00007e bl 21d4 <== NOT EXECUTED 1fd8: ea000000 b 1fe0 <== NOT EXECUTED 1fdc: e3e00000 mvn r0, #0 ; 0x0 } 1fe0: e28dd04c add sp, sp, #76 ; 0x4c 1fe4: e8bd8070 pop {r4, r5, r6, pc} 00002714 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2714: e92d4010 push {r4, lr} <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2718: e591303c ldr r3, [r1, #60] <== NOT EXECUTED 271c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2720: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 2724: e1a04001 mov r4, r1 <== NOT EXECUTED 2728: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 272c: 0a000014 beq 2784 <== NOT EXECUTED 2730: e59f305c ldr r3, [pc, #92] ; 2794 <== NOT EXECUTED 2734: e5933000 ldr r3, [r3] <== NOT EXECUTED 2738: e7d32000 ldrb r2, [r3, r0] <== NOT EXECUTED 273c: e2503009 subs r3, r0, #9 ; 0x9 <== NOT EXECUTED 2740: 13a03001 movne r3, #1 ; 0x1 <== NOT EXECUTED 2744: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 2748: 0a00000d beq 2784 <== NOT EXECUTED 274c: e350000a cmp r0, #10 ; 0xa <== NOT EXECUTED 2750: 0a00000b beq 2784 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2754: 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] = '^'; 2758: e3a0305e mov r3, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 275c: e28d0002 add r0, sp, #2 ; 0x2 <== NOT EXECUTED 2760: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 2764: 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] = '^'; 2768: e5cd3002 strb r3, [sp, #2] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 276c: e5cdc003 strb ip, [sp, #3] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 2770: ebffff4e bl 24b0 <== NOT EXECUTED tty->column += 2; 2774: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2778: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 277c: e5843028 str r3, [r4, #40] <== NOT EXECUTED 2780: ea000001 b 278c <== NOT EXECUTED } else { oproc (c, tty); 2784: e1a01004 mov r1, r4 <== NOT EXECUTED 2788: ebffff8c bl 25c0 <== NOT EXECUTED } } 278c: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 2790: e8bd8010 pop {r4, pc} <== NOT EXECUTED 2794: 00014a4c .word 0x00014a4c 0001bde0 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 1bde0: e59f300c ldr r3, [pc, #12] ; 1bdf4 <== NOT EXECUTED 1bde4: e5930000 ldr r0, [r3] <== NOT EXECUTED 1bde8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1bdec: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 1bdf0: ea0038f9 b 2a1dc <== NOT EXECUTED 1bdf4: 00055ca4 .word 0x00055ca4 0001bdf8 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 1bdf8: e59f300c ldr r3, [pc, #12] ; 1be0c <== NOT EXECUTED 1bdfc: e5930000 ldr r0, [r3] <== NOT EXECUTED 1be00: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1be04: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 1be08: ea0038f3 b 2a1dc <== NOT EXECUTED 1be0c: 00055bbc .word 0x00055bbc 00002798 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 2798: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 279c: 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) { 27a0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 27a4: e1a04000 mov r4, r0 <== NOT EXECUTED 27a8: e1a06001 mov r6, r1 <== NOT EXECUTED if (tty->ccount == 0) 27ac: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return; if (lineFlag) { 27b0: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 27b4: 0a000060 beq 293c <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 27b8: e590303c ldr r3, [r0, #60] <== NOT EXECUTED 27bc: e2132008 ands r2, r3, #8 ; 0x8 <== NOT EXECUTED tty->ccount = 0; 27c0: 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)) { 27c4: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 27c8: e2133010 ands r3, r3, #16 ; 0x10 <== NOT EXECUTED 27cc: 1a00005a bne 293c <== NOT EXECUTED tty->ccount = 0; 27d0: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 27d4: e1a01004 mov r1, r4 <== NOT EXECUTED 27d8: e5d00044 ldrb r0, [r0, #68] <== NOT EXECUTED 27dc: ebffffcc bl 2714 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 27e0: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 27e4: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED echo ('\n', tty); 27e8: 11a01004 movne r1, r4 <== NOT EXECUTED 27ec: 13a0000a movne r0, #10 ; 0xa <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) 27f0: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED 27f4: ea00000c b 282c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 27f8: e2431001 sub r1, r3, #1 ; 0x1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 27fc: e594203c ldr r2, [r4, #60] <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2800: e5841020 str r1, [r4, #32] <== NOT EXECUTED 2804: e594301c ldr r3, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2808: e3120008 tst r2, #8 ; 0x8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 280c: e7d35001 ldrb r5, [r3, r1] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2810: 0a000046 beq 2930 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2814: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 2818: 1a000005 bne 2834 <== NOT EXECUTED 281c: e3120010 tst r2, #16 ; 0x10 <== NOT EXECUTED 2820: 1a000003 bne 2834 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 2824: e5d40043 ldrb r0, [r4, #67] <== NOT EXECUTED 2828: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 282c: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 2830: eaffffb7 b 2714 <== NOT EXECUTED } else if (c == '\t') { 2834: e3550009 cmp r5, #9 ; 0x9 <== NOT EXECUTED 2838: 1a00001f bne 28bc <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 283c: e202cc02 and ip, r2, #512 ; 0x200 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 2840: e594502c ldr r5, [r4, #44] <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 2844: e5970000 ldr r0, [r7] <== NOT EXECUTED 2848: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 284c: ea00000c b 2884 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2850: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 2854: e7d33002 ldrb r3, [r3, r2] <== NOT EXECUTED if (c == '\t') { 2858: e3530009 cmp r3, #9 ; 0x9 <== NOT EXECUTED col = (col | 7) + 1; 285c: 03853007 orreq r3, r5, #7 ; 0x7 <== NOT EXECUTED 2860: 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') { 2864: 0a000005 beq 2880 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2868: e7d03003 ldrb r3, [r0, r3] <== NOT EXECUTED 286c: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 2870: 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)) { 2874: 0a000001 beq 2880 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2878: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED col += 2; 287c: 12855002 addne r5, r5, #2 ; 0x2 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2880: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2884: e1520001 cmp r2, r1 <== NOT EXECUTED 2888: 1afffff0 bne 2850 <== NOT EXECUTED 288c: ea000003 b 28a0 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2890: ebffff06 bl 24b0 <== NOT EXECUTED tty->column--; 2894: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2898: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 289c: e5843028 str r3, [r4, #40] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 28a0: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 28a4: e1530005 cmp r3, r5 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 28a8: e59f00a0 ldr r0, [pc, #160] ; 2950 <== NOT EXECUTED 28ac: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 28b0: e1a02004 mov r2, r4 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 28b4: cafffff5 bgt 2890 <== NOT EXECUTED 28b8: ea00001c b 2930 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 28bc: e5973000 ldr r3, [r7] <== NOT EXECUTED 28c0: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 28c4: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 28c8: 0a000009 beq 28f4 <== NOT EXECUTED 28cc: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 28d0: 0a000007 beq 28f4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 28d4: e59f0078 ldr r0, [pc, #120] ; 2954 <== NOT EXECUTED 28d8: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 28dc: e1a02004 mov r2, r4 <== NOT EXECUTED 28e0: ebfffef2 bl 24b0 <== NOT EXECUTED if (tty->column) 28e4: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 28e8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 28ec: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 28f0: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 28f4: e5973000 ldr r3, [r7] <== NOT EXECUTED 28f8: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 28fc: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 2900: 0a000002 beq 2910 <== NOT EXECUTED 2904: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 2908: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 290c: 0a000007 beq 2930 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2910: e59f003c ldr r0, [pc, #60] ; 2954 <== NOT EXECUTED 2914: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED 2918: e1a02004 mov r2, r4 <== NOT EXECUTED 291c: ebfffee3 bl 24b0 <== NOT EXECUTED if (tty->column) 2920: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2924: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 2928: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED 292c: 15843028 strne r3, [r4, #40] <== NOT EXECUTED } } } if (!lineFlag) 2930: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 2934: 1a000001 bne 2940 <== NOT EXECUTED 2938: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 293c: e59f7014 ldr r7, [pc, #20] ; 2958 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2940: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2944: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2948: 1affffaa bne 27f8 <== NOT EXECUTED 294c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 2950: 000159de .word 0x000159de 2954: 000159dc .word 0x000159dc 2958: 00014a4c .word 0x00014a4c 000278b4 : #include int fchdir( int fd ) { 278b4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 278b8: e59f3130 ldr r3, [pc, #304] ; 279f0 <== NOT EXECUTED 278bc: e5933000 ldr r3, [r3] <== NOT EXECUTED 278c0: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 278c4: e24dd020 sub sp, sp, #32 ; 0x20 <== NOT EXECUTED 278c8: e1a01000 mov r1, r0 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 278cc: 2a000006 bcs 278ec <== NOT EXECUTED iop = rtems_libio_iop( fd ); 278d0: e59f311c ldr r3, [pc, #284] ; 279f4 <== NOT EXECUTED 278d4: e5932000 ldr r2, [r3] <== NOT EXECUTED 278d8: e3a03034 mov r3, #52 ; 0x34 <== NOT EXECUTED 278dc: e0202193 mla r0, r3, r1, r2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 278e0: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 278e4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 278e8: 1a000002 bne 278f8 <== NOT EXECUTED 278ec: eb0009e9 bl 2a098 <__errno> <== NOT EXECUTED 278f0: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 278f4: ea000015 b 27950 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 278f8: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 278fc: 1a000002 bne 2790c <== NOT EXECUTED 27900: eb0009e4 bl 2a098 <__errno> <== NOT EXECUTED 27904: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 27908: ea000010 b 27950 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 2790c: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED 27910: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 27914: 0a000002 beq 27924 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 27918: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 2791c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 27920: 1a000002 bne 27930 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 27924: eb0009db bl 2a098 <__errno> <== NOT EXECUTED 27928: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2792c: ea000007 b 27950 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 27930: e2804010 add r4, r0, #16 ; 0x10 <== NOT EXECUTED 27934: e1a00004 mov r0, r4 <== NOT EXECUTED 27938: e1a0e00f mov lr, pc <== NOT EXECUTED 2793c: e12fff13 bx r3 <== NOT EXECUTED 27940: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 27944: 0a000003 beq 27958 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 27948: eb0009d2 bl 2a098 <__errno> <== NOT EXECUTED 2794c: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED 27950: e5803000 str r3, [r0] <== NOT EXECUTED 27954: ea000012 b 279a4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 27958: e59f6098 ldr r6, [pc, #152] ; 279f8 <== NOT EXECUTED 2795c: e596c000 ldr ip, [r6] <== NOT EXECUTED 27960: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 27964: e89c000f ldm ip, {r0, r1, r2, r3} <== NOT EXECUTED 27968: e88d000f stm sp, {r0, r1, r2, r3} <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 2796c: e894000f ldm r4, {r0, r1, r2, r3} <== NOT EXECUTED 27970: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 27974: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 27978: e59f007c ldr r0, [pc, #124] ; 279fc <== NOT EXECUTED 2797c: e28d2010 add r2, sp, #16 ; 0x10 <== NOT EXECUTED 27980: e1a03001 mov r3, r1 <== NOT EXECUTED 27984: ebff70af bl 3c48 <== NOT EXECUTED 27988: 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; 2798c: e1a0500d mov r5, sp <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 27990: 0a000005 beq 279ac <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 27994: e596c000 ldr ip, [r6] <== NOT EXECUTED 27998: e89d000f ldm sp, {r0, r1, r2, r3} <== NOT EXECUTED 2799c: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 279a0: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED 279a4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 279a8: ea00000e b 279e8 <== NOT EXECUTED return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 279ac: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 279b0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 279b4: 0a000004 beq 279cc <== NOT EXECUTED 279b8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 279bc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 279c0: 11a0000d movne r0, sp <== NOT EXECUTED 279c4: 11a0e00f movne lr, pc <== NOT EXECUTED 279c8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 279cc: e59f3024 ldr r3, [pc, #36] ; 279f8 <== NOT EXECUTED 279d0: e593c000 ldr ip, [r3] <== NOT EXECUTED 279d4: e28d3010 add r3, sp, #16 ; 0x10 <== NOT EXECUTED 279d8: e893000f ldm r3, {r0, r1, r2, r3} <== NOT EXECUTED 279dc: e28cc004 add ip, ip, #4 ; 0x4 <== NOT EXECUTED 279e0: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED 279e4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return 0; } 279e8: e28dd020 add sp, sp, #32 ; 0x20 <== NOT EXECUTED 279ec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 279f0: 0003bb14 .word 0x0003bb14 279f4: 000564ac .word 0x000564ac 279f8: 0003c648 .word 0x0003c648 279fc: 0003fa7e .word 0x0003fa7e 0001b61c : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1b61c: e59f3080 ldr r3, [pc, #128] ; 1b6a4 <== NOT EXECUTED 1b620: e5933000 ldr r3, [r3] <== NOT EXECUTED 1b624: e1500003 cmp r0, r3 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 1b628: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1b62c: 2a000006 bcs 1b64c <== NOT EXECUTED iop = rtems_libio_iop( fd ); 1b630: e59f3070 ldr r3, [pc, #112] ; 1b6a8 <== NOT EXECUTED 1b634: e5932000 ldr r2, [r3] <== NOT EXECUTED 1b638: e3a03034 mov r3, #52 ; 0x34 <== NOT EXECUTED 1b63c: e02c2093 mla ip, r3, r0, r2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 1b640: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED 1b644: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 1b648: 1a000002 bne 1b658 <== NOT EXECUTED 1b64c: eb003a91 bl 2a098 <__errno> <== NOT EXECUTED 1b650: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 1b654: ea00000a b 1b684 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1b658: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 1b65c: 1a000002 bne 1b66c <== NOT EXECUTED 1b660: eb003a8c bl 2a098 <__errno> <== NOT EXECUTED 1b664: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1b668: ea000005 b 1b684 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 1b66c: e59c3030 ldr r3, [ip, #48] <== NOT EXECUTED 1b670: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1b674: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1b678: 1a000004 bne 1b690 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1b67c: eb003a85 bl 2a098 <__errno> <== NOT EXECUTED 1b680: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1b684: e5803000 str r3, [r0] <== NOT EXECUTED 1b688: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1b68c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 1b690: e28c0010 add r0, ip, #16 ; 0x10 <== NOT EXECUTED 1b694: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED 1b698: e1a0e00f mov lr, pc <== NOT EXECUTED 1b69c: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 1b6a0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1b6a4: 0003bb14 .word 0x0003bb14 1b6a8: 000564ac .word 0x000564ac 0001b6ac : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1b6ac: e59f3094 ldr r3, [pc, #148] ; 1b748 <== NOT EXECUTED 1b6b0: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 1b6b4: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 1b6b8: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1b6bc: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 1b6c0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1b6c4: e1a0c000 mov ip, r0 <== NOT EXECUTED 1b6c8: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 1b6cc: e1a0e822 lsr lr, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1b6d0: 2a000006 bcs 1b6f0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 1b6d4: e59f3070 ldr r3, [pc, #112] ; 1b74c <== NOT EXECUTED 1b6d8: e5932000 ldr r2, [r3] <== NOT EXECUTED 1b6dc: e3a03034 mov r3, #52 ; 0x34 <== NOT EXECUTED 1b6e0: e0202c93 mla r0, r3, ip, r2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 1b6e4: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 1b6e8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 1b6ec: 1a000002 bne 1b6fc <== NOT EXECUTED 1b6f0: eb003a68 bl 2a098 <__errno> <== NOT EXECUTED 1b6f4: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 1b6f8: ea00000a b 1b728 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1b6fc: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 1b700: 1a000002 bne 1b710 <== NOT EXECUTED 1b704: eb003a63 bl 2a098 <__errno> <== NOT EXECUTED 1b708: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1b70c: ea000005 b 1b728 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 1b710: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED 1b714: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 1b718: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1b71c: 1a000004 bne 1b734 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1b720: eb003a5c bl 2a098 <__errno> <== NOT EXECUTED 1b724: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1b728: e5803000 str r3, [r0] <== NOT EXECUTED 1b72c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1b730: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 1b734: e1a0200e mov r2, lr <== NOT EXECUTED 1b738: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED 1b73c: e1a0e00f mov lr, pc <== NOT EXECUTED 1b740: e12fff13 bx r3 <== NOT EXECUTED } 1b744: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1b748: 0003bb14 .word 0x0003bb14 1b74c: 000564ac .word 0x000564ac 00027a00 : int fcntl( int fd, int cmd, ... ) { 27a00: e92d000e push {r1, r2, r3} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 27a04: e59f31b0 ldr r3, [pc, #432] ; 27bbc int fcntl( int fd, int cmd, ... ) { 27a08: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 27a0c: e593c000 ldr ip, [r3] 27a10: e150000c cmp r0, ip int fcntl( int fd, int cmd, ... ) { 27a14: e59d9020 ldr r9, [sp, #32] 27a18: e28d2024 add r2, sp, #36 ; 0x24 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 27a1c: 2a000006 bcs 27a3c iop = rtems_libio_iop( fd ); 27a20: e59f3198 ldr r3, [pc, #408] ; 27bc0 27a24: e5931000 ldr r1, [r3] 27a28: e3a03034 mov r3, #52 ; 0x34 27a2c: e02a1093 mla sl, r3, r0, r1 rtems_libio_check_is_open(iop); 27a30: e59a000c ldr r0, [sl, #12] 27a34: e3100c01 tst r0, #256 ; 0x100 27a38: 1a000002 bne 27a48 27a3c: eb000995 bl 2a098 <__errno> <== NOT EXECUTED 27a40: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 27a44: ea000047 b 27b68 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 27a48: e3590009 cmp r9, #9 ; 0x9 27a4c: 979ff109 ldrls pc, [pc, r9, lsl #2] 27a50: ea000042 b 27b60 27a54: 00027a7c .word 0x00027a7c <== NOT EXECUTED 27a58: 00027aec .word 0x00027aec <== NOT EXECUTED 27a5c: 00027af8 .word 0x00027af8 <== NOT EXECUTED 27a60: 00027b1c .word 0x00027b1c <== NOT EXECUTED 27a64: 00027b28 .word 0x00027b28 <== NOT EXECUTED 27a68: 00027b54 .word 0x00027b54 <== NOT EXECUTED 27a6c: 00027b54 .word 0x00027b54 <== NOT EXECUTED 27a70: 00027b54 .word 0x00027b54 <== NOT EXECUTED 27a74: 00027b54 .word 0x00027b54 <== NOT EXECUTED 27a78: 00027b54 .word 0x00027b54 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 27a7c: e5920000 ldr r0, [r2] if ( fd2 ) 27a80: e3500000 cmp r0, #0 ; 0x0 27a84: 0a000004 beq 27a9c diop = rtems_libio_iop( fd2 ); 27a88: e150000c cmp r0, ip <== NOT EXECUTED 27a8c: 33a03034 movcc r3, #52 ; 0x34 <== NOT EXECUTED 27a90: 23a08000 movcs r8, #0 ; 0x0 <== NOT EXECUTED 27a94: 30281093 mlacc r8, r3, r0, r1 <== NOT EXECUTED 27a98: ea000002 b 27aa8 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 27a9c: ebff71a0 bl 4124 if ( diop == 0 ) { 27aa0: e2508000 subs r8, r0, #0 ; 0x0 27aa4: 0a00003f beq 27ba8 diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 27aa8: e59f3110 ldr r3, [pc, #272] ; 27bc0 27aac: e5934000 ldr r4, [r3] } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 27ab0: e28a3010 add r3, sl, #16 ; 0x10 27ab4: e893000f ldm r3, {r0, r1, r2, r3} 27ab8: e288c010 add ip, r8, #16 ; 0x10 ret = -1; break; } } diop->handlers = iop->handlers; 27abc: e59a5030 ldr r5, [sl, #48] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 27ac0: e0644008 rsb r4, r4, r8 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 27ac4: e59a602c ldr r6, [sl, #44] diop->flags = iop->flags; 27ac8: e59a700c ldr r7, [sl, #12] diop->pathinfo = iop->pathinfo; 27acc: e88c000f stm ip, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 27ad0: e59f30ec ldr r3, [pc, #236] ; 27bc4 27ad4: e1a04144 asr r4, r4, #2 ret = -1; break; } } diop->handlers = iop->handlers; 27ad8: e5885030 str r5, [r8, #48] diop->file_info = iop->file_info; 27adc: e588602c str r6, [r8, #44] diop->flags = iop->flags; 27ae0: e588700c str r7, [r8, #12] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 27ae4: e0050493 mul r5, r3, r4 27ae8: ea000020 b 27b70 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 27aec: e1a035a0 lsr r3, r0, #11 27af0: e2035001 and r5, r3, #1 ; 0x1 27af4: ea00001f b 27b78 * 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 ) ) 27af8: e5922000 ldr r2, [r2] 27afc: e3520000 cmp r2, #0 ; 0x0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 27b00: 13803b02 orrne r3, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 27b04: 03c03b02 biceq r3, r0, #2048 ; 0x800 * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 27b08: 158a300c strne r3, [sl, #12] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 27b0c: 058a300c streq r3, [sl, #12] 27b10: 01a05002 moveq r5, r2 * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 27b14: 0a000017 beq 27b78 27b18: ea00000b b 27b4c else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 27b1c: ebff7117 bl 3f80 27b20: e1a05000 mov r5, r0 27b24: ea000011 b 27b70 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 27b28: e5920000 ldr r0, [r2] 27b2c: ebff71af bl 41f0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 27b30: e59a300c ldr r3, [sl, #12] 27b34: e59f208c ldr r2, [pc, #140] ; 27bc8 27b38: e3c33c02 bic r3, r3, #512 ; 0x200 27b3c: e0002002 and r2, r0, r2 27b40: e3c33001 bic r3, r3, #1 ; 0x1 27b44: e1822003 orr r2, r2, r3 27b48: e58a200c str r2, [sl, #12] 27b4c: e3a05000 mov r5, #0 ; 0x0 27b50: ea000008 b 27b78 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 27b54: eb00094f bl 2a098 <__errno> 27b58: e3a03086 mov r3, #134 ; 0x86 27b5c: ea000001 b 27b68 ret = -1; break; default: errno = EINVAL; 27b60: eb00094c bl 2a098 <__errno> 27b64: e3a03016 mov r3, #22 ; 0x16 27b68: e5803000 str r3, [r0] 27b6c: ea00000d b 27ba8 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 27b70: e3550000 cmp r5, #0 ; 0x0 27b74: ba00000c blt 27bac if (iop->handlers->fcntl_h) { 27b78: e59a3030 ldr r3, [sl, #48] 27b7c: e5933030 ldr r3, [r3, #48] 27b80: e3530000 cmp r3, #0 ; 0x0 27b84: 0a000008 beq 27bac int err = (*iop->handlers->fcntl_h)( cmd, iop ); 27b88: e1a00009 mov r0, r9 27b8c: e1a0100a mov r1, sl 27b90: e1a0e00f mov lr, pc 27b94: e12fff13 bx r3 if (err) { 27b98: e2504000 subs r4, r0, #0 ; 0x0 27b9c: 0a000002 beq 27bac errno = err; 27ba0: eb00093c bl 2a098 <__errno> <== NOT EXECUTED 27ba4: e5804000 str r4, [r0] <== NOT EXECUTED 27ba8: e3e05000 mvn r5, #0 ; 0x0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 27bac: e1a00005 mov r0, r5 27bb0: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 27bb4: e28dd00c add sp, sp, #12 ; 0xc 27bb8: e12fff1e bx lr 27bbc: 0003bb14 .word 0x0003bb14 27bc0: 000564ac .word 0x000564ac 27bc4: c4ec4ec5 .word 0xc4ec4ec5 27bc8: 00000201 .word 0x00000201 0001d8ac : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 1d8ac: e59fc030 ldr ip, [pc, #48] ; 1d8e4 <== NOT EXECUTED 1d8b0: e49c0004 ldr r0, [ip], #4 <== NOT EXECUTED 1d8b4: ea000006 b 1d8d4 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 1d8b8: e5902014 ldr r2, [r0, #20] <== NOT EXECUTED 1d8bc: e591300c ldr r3, [r1, #12] <== NOT EXECUTED 1d8c0: e1520003 cmp r2, r3 <== NOT EXECUTED 1d8c4: 1a000001 bne 1d8d0 <== NOT EXECUTED 1d8c8: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 1d8cc: e12fff1e bx lr <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 1d8d0: e5900000 ldr r0, [r0] <== NOT EXECUTED * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 1d8d4: e150000c cmp r0, ip <== NOT EXECUTED 1d8d8: 1afffff6 bne 1d8b8 <== NOT EXECUTED 1d8dc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; } } return false; } 1d8e0: e12fff1e bx lr <== NOT EXECUTED 1d8e4: 00056548 .word 0x00056548 0000243c : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 243c: e59f3104 ldr r3, [pc, #260] ; 2548 2440: e5933000 ldr r3, [r3] 2444: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2448: e52de004 push {lr} ; (str lr, [sp, #-4]!) long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 244c: 2a000006 bcs 246c iop = rtems_libio_iop(fd); 2450: e59f30f4 ldr r3, [pc, #244] ; 254c 2454: e5932000 ldr r2, [r3] 2458: e3a03034 mov r3, #52 ; 0x34 245c: e02c2093 mla ip, r3, r0, r2 rtems_libio_check_is_open(iop); 2460: e59c300c ldr r3, [ip, #12] 2464: e3130c01 tst r3, #256 ; 0x100 2468: 1a000002 bne 2478 246c: eb002cab bl d720 <__errno> 2470: e3a03009 mov r3, #9 ; 0x9 2474: ea000003 b 2488 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2478: e3130002 tst r3, #2 ; 0x2 247c: 1a000004 bne 2494 2480: eb002ca6 bl d720 <__errno> <== NOT EXECUTED 2484: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 2488: e5803000 str r3, [r0] 248c: e3e00000 mvn r0, #0 ; 0x0 2490: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2494: e59c001c ldr r0, [ip, #28] switch ( name ) { 2498: e351000b cmp r1, #11 ; 0xb 249c: 979ff101 ldrls pc, [pc, r1, lsl #2] 24a0: ea000023 b 2534 24a4: 000024d4 .word 0x000024d4 <== NOT EXECUTED 24a8: 000024dc .word 0x000024dc <== NOT EXECUTED 24ac: 000024e4 .word 0x000024e4 <== NOT EXECUTED 24b0: 000024ec .word 0x000024ec <== NOT EXECUTED 24b4: 000024f4 .word 0x000024f4 <== NOT EXECUTED 24b8: 000024fc .word 0x000024fc <== NOT EXECUTED 24bc: 00002504 .word 0x00002504 <== NOT EXECUTED 24c0: 0000250c .word 0x0000250c <== NOT EXECUTED 24c4: 00002514 .word 0x00002514 <== NOT EXECUTED 24c8: 0000251c .word 0x0000251c <== NOT EXECUTED 24cc: 00002524 .word 0x00002524 <== NOT EXECUTED 24d0: 0000252c .word 0x0000252c <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 24d4: e5900030 ldr r0, [r0, #48] 24d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 24dc: e5900034 ldr r0, [r0, #52] 24e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 24e4: e5900038 ldr r0, [r0, #56] 24e8: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_NAME_MAX: return_value = the_limits->name_max; 24ec: e590003c ldr r0, [r0, #60] 24f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PATH_MAX: return_value = the_limits->path_max; 24f4: e5900040 ldr r0, [r0, #64] 24f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 24fc: e5900044 ldr r0, [r0, #68] 2500: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2504: e590004c ldr r0, [r0, #76] 2508: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 250c: e5900050 ldr r0, [r0, #80] 2510: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2514: e590005c ldr r0, [r0, #92] 2518: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 251c: e5900048 ldr r0, [r0, #72] 2520: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2524: e5900054 ldr r0, [r0, #84] 2528: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 252c: e5900058 ldr r0, [r0, #88] 2530: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2534: eb002c79 bl d720 <__errno> 2538: e3a03016 mov r3, #22 ; 0x16 253c: e5803000 str r3, [r0] 2540: e3e00000 mvn r0, #0 ; 0x0 break; } return return_value; } 2544: e49df004 pop {pc} ; (ldr pc, [sp], #4) 2548: 00013074 .word 0x00013074 254c: 00014e90 .word 0x00014e90 00008714 : void free( void *ptr ) { MSBUMP(free_calls, 1); 8714: e59f2084 ldr r2, [pc, #132] ; 87a0 8718: e592300c ldr r3, [r2, #12] 871c: e92d4030 push {r4, r5, lr} 8720: e2833001 add r3, r3, #1 ; 0x1 if ( !ptr ) 8724: e2504000 subs r4, r0, #0 ; 0x0 void free( void *ptr ) { MSBUMP(free_calls, 1); 8728: e582300c str r3, [r2, #12] if ( !ptr ) 872c: 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()) && 8730: e59f306c ldr r3, [pc, #108] ; 87a4 8734: e5933000 ldr r3, [r3] 8738: e3530003 cmp r3, #3 ; 0x3 873c: 1a000005 bne 8758 8740: eb000120 bl 8bc8 8744: e3500000 cmp r0, #0 ; 0x0 8748: 1a000002 bne 8758 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 874c: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 8750: 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); 8754: ea00012e b 8c14 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8758: e59f3048 ldr r3, [pc, #72] ; 87a8 875c: e5933000 ldr r3, [r3] 8760: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 8764: 11a00004 movne r0, r4 8768: 11a0e00f movne lr, pc 876c: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 8770: e59f5034 ldr r5, [pc, #52] ; 87ac 8774: e1a01004 mov r1, r4 8778: e1a00005 mov r0, r5 877c: eb000679 bl a168 <_Protected_heap_Free> 8780: e3500000 cmp r0, #0 ; 0x0 8784: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 8788: e595301c ldr r3, [r5, #28] <== NOT EXECUTED 878c: e59f001c ldr r0, [pc, #28] ; 87b0 <== NOT EXECUTED 8790: e5952018 ldr r2, [r5, #24] <== NOT EXECUTED 8794: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap.begin, RTEMS_Malloc_Heap.end ); } } 8798: 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", 879c: eaffe5d2 b 1eec <== NOT EXECUTED 87a0: 000160f4 .word 0x000160f4 87a4: 000163b4 .word 0x000163b4 87a8: 00015ec4 .word 0x00015ec4 87ac: 0001609c .word 0x0001609c 87b0: 00015b94 .word 0x00015b94 0001ce5c : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 1ce5c: e59f3058 ldr r3, [pc, #88] ; 1cebc <== NOT EXECUTED 1ce60: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 1ce64: e92d4010 push {r4, lr} <== NOT EXECUTED 1ce68: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 1ce6c: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 1ce70: e590300c ldr r3, [r0, #12] <== NOT EXECUTED 1ce74: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ce78: 0a000004 beq 1ce90 <== NOT EXECUTED 1ce7c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1ce80: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ce84: 12800004 addne r0, r0, #4 ; 0x4 <== NOT EXECUTED 1ce88: 11a0e00f movne lr, pc <== NOT EXECUTED 1ce8c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 1ce90: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 1ce94: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ce98: 0a000004 beq 1ceb0 <== NOT EXECUTED 1ce9c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1cea0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1cea4: 12840014 addne r0, r4, #20 ; 0x14 <== NOT EXECUTED 1cea8: 11a0e00f movne lr, pc <== NOT EXECUTED 1ceac: 112fff13 bxne r3 <== NOT EXECUTED free(env); 1ceb0: e1a00004 mov r0, r4 <== NOT EXECUTED } } 1ceb4: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 1ceb8: eaff9bb3 b 3d8c <== NOT EXECUTED 1cebc: 00056c5c .word 0x00056c5c 000137e0 : int fstat( int fd, struct stat *sbuf ) { 137e0: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 137e4: e2515000 subs r5, r1, #0 ; 0x0 137e8: 1a000002 bne 137f8 rtems_set_errno_and_return_minus_one( EFAULT ); 137ec: ebffdee9 bl b398 <__errno> 137f0: e3a0300e mov r3, #14 ; 0xe 137f4: ea00001f b 13878 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 137f8: e59f3084 ldr r3, [pc, #132] ; 13884 137fc: e5933000 ldr r3, [r3] 13800: e1500003 cmp r0, r3 13804: 2a000019 bcs 13870 13808: e59f3078 ldr r3, [pc, #120] ; 13888 1380c: e5932000 ldr r2, [r3] 13810: e3a03034 mov r3, #52 ; 0x34 13814: e0242093 mla r4, r3, r0, r2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 13818: e594300c ldr r3, [r4, #12] 1381c: e3130c01 tst r3, #256 ; 0x100 13820: 0a000012 beq 13870 if ( !iop->handlers ) 13824: e5943030 ldr r3, [r4, #48] 13828: e3530000 cmp r3, #0 ; 0x0 1382c: 0a00000f beq 13870 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 13830: e5933018 ldr r3, [r3, #24] 13834: e3530000 cmp r3, #0 ; 0x0 13838: 1a000002 bne 13848 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1383c: ebffded5 bl b398 <__errno> <== NOT EXECUTED 13840: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 13844: ea00000b b 13878 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 13848: e3a01000 mov r1, #0 ; 0x0 1384c: e3a0204c mov r2, #76 ; 0x4c 13850: e1a00005 mov r0, r5 13854: ebffe0d8 bl bbbc return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 13858: e2840010 add r0, r4, #16 ; 0x10 1385c: e1a01005 mov r1, r5 13860: e5943030 ldr r3, [r4, #48] 13864: e1a0e00f mov lr, pc 13868: e593f018 ldr pc, [r3, #24] } 1386c: e8bd8030 pop {r4, r5, pc} /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 13870: ebffdec8 bl b398 <__errno> 13874: e3a03009 mov r3, #9 ; 0x9 13878: e5803000 str r3, [r0] 1387c: e3e00000 mvn r0, #0 ; 0x0 13880: e8bd8030 pop {r4, r5, pc} 13884: 000143e4 .word 0x000143e4 13888: 00016090 .word 0x00016090 0001b808 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1b808: e59f3084 ldr r3, [pc, #132] ; 1b894 1b80c: e5933000 ldr r3, [r3] 1b810: e1500003 cmp r0, r3 #include int fsync( int fd ) { 1b814: e52de004 push {lr} ; (str lr, [sp, #-4]!) 1b818: e1a01000 mov r1, r0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1b81c: 2a00000e bcs 1b85c iop = rtems_libio_iop( fd ); 1b820: e59f3070 ldr r3, [pc, #112] ; 1b898 1b824: e5932000 ldr r2, [r3] 1b828: e3a03034 mov r3, #52 ; 0x34 1b82c: e0202193 mla r0, r3, r1, r2 rtems_libio_check_is_open(iop); 1b830: e590300c ldr r3, [r0, #12] 1b834: e3130c01 tst r3, #256 ; 0x100 1b838: 0a000007 beq 1b85c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1b83c: e3130004 tst r3, #4 ; 0x4 1b840: 1a000002 bne 1b850 1b844: eb003a13 bl 2a098 <__errno> 1b848: e3a03016 mov r3, #22 ; 0x16 1b84c: ea00000a b 1b87c /* * Now process the fsync(). */ if ( !iop->handlers ) 1b850: e5903030 ldr r3, [r0, #48] 1b854: e3530000 cmp r3, #0 ; 0x0 1b858: 1a000002 bne 1b868 rtems_set_errno_and_return_minus_one( EBADF ); 1b85c: eb003a0d bl 2a098 <__errno> <== NOT EXECUTED 1b860: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 1b864: ea000004 b 1b87c <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 1b868: e5933028 ldr r3, [r3, #40] 1b86c: e3530000 cmp r3, #0 ; 0x0 1b870: 1a000004 bne 1b888 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1b874: eb003a07 bl 2a098 <__errno> 1b878: e3a03086 mov r3, #134 ; 0x86 1b87c: e5803000 str r3, [r0] 1b880: e3e00000 mvn r0, #0 ; 0x0 1b884: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 1b888: e1a0e00f mov lr, pc 1b88c: e12fff13 bx r3 } 1b890: e49df004 pop {pc} ; (ldr pc, [sp], #4) 1b894: 0003bb14 .word 0x0003bb14 1b898: 000564ac .word 0x000564ac 000087b4 : int ftruncate( int fd, off_t length ) { 87b4: e92d4030 push {r4, r5, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 87b8: e59f30c4 ldr r3, [pc, #196] ; 8884 87bc: e5933000 ldr r3, [r3] 87c0: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 87c4: e24dd010 sub sp, sp, #16 ; 0x10 87c8: e1a05001 mov r5, r1 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 87cc: 2a000006 bcs 87ec iop = rtems_libio_iop( fd ); 87d0: e59f30b0 ldr r3, [pc, #176] ; 8888 87d4: e5932000 ldr r2, [r3] 87d8: e3a03034 mov r3, #52 ; 0x34 87dc: e0242093 mla r4, r3, r0, r2 rtems_libio_check_is_open(iop); 87e0: e594300c ldr r3, [r4, #12] 87e4: e3130c01 tst r3, #256 ; 0x100 87e8: 1a000002 bne 87f8 87ec: eb000ae9 bl b398 <__errno> <== NOT EXECUTED 87f0: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 87f4: ea000019 b 8860 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 87f8: e2843010 add r3, r4, #16 ; 0x10 87fc: e893000f ldm r3, {r0, r1, r2, r3} 8800: e88d000f stm sp, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 8804: e5923010 ldr r3, [r2, #16] 8808: e3530000 cmp r3, #0 ; 0x0 880c: 0a000011 beq 8858 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 8810: e1a0000d mov r0, sp 8814: e1a0e00f mov lr, pc 8818: e12fff13 bx r3 881c: e3500001 cmp r0, #1 ; 0x1 8820: 1a000002 bne 8830 rtems_set_errno_and_return_minus_one( EISDIR ); 8824: eb000adb bl b398 <__errno> 8828: e3a03015 mov r3, #21 ; 0x15 882c: ea00000b b 8860 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8830: e594300c ldr r3, [r4, #12] 8834: e3130004 tst r3, #4 ; 0x4 8838: 1a000002 bne 8848 883c: eb000ad5 bl b398 <__errno> <== NOT EXECUTED 8840: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 8844: ea000005 b 8860 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 8848: e5943030 ldr r3, [r4, #48] 884c: e5933020 ldr r3, [r3, #32] 8850: e3530000 cmp r3, #0 ; 0x0 8854: 1a000004 bne 886c rtems_set_errno_and_return_minus_one( ENOTSUP ); 8858: eb000ace bl b398 <__errno> <== NOT EXECUTED 885c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8860: e5803000 str r3, [r0] 8864: e3e00000 mvn r0, #0 ; 0x0 8868: ea000003 b 887c return (*iop->handlers->ftruncate_h)( iop, length ); 886c: e1a00004 mov r0, r4 8870: e1a01005 mov r1, r5 8874: e1a0e00f mov lr, pc 8878: e12fff13 bx r3 } 887c: e28dd010 add sp, sp, #16 ; 0x10 8880: e8bd8030 pop {r4, r5, pc} 8884: 000143e4 .word 0x000143e4 8888: 00016090 .word 0x00016090 0001b974 : char * getcwd ( char *pt, size_t size) { 1b974: 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) 1b978: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED char * getcwd ( char *pt, size_t size) { 1b97c: e24dd07c sub sp, sp, #124 ; 0x7c <== NOT EXECUTED 1b980: 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) 1b984: 0a000008 beq 1b9ac <== NOT EXECUTED { ptsize = 0; if (!size) 1b988: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED { errno = EINVAL; return (char *) NULL; } ept = pt + size; 1b98c: 108a9001 addne r9, sl, r1 <== NOT EXECUTED 1b990: 13a0b000 movne fp, #0 ; 0x0 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 1b994: 1a00000a bne 1b9c4 <== NOT EXECUTED { errno = EINVAL; 1b998: eb0039be bl 2a098 <__errno> <== NOT EXECUTED 1b99c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1b9a0: e5803000 str r3, [r0] <== NOT EXECUTED 1b9a4: e1a0a004 mov sl, r4 <== NOT EXECUTED 1b9a8: ea0000f0 b 1bd70 <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 1b9ac: e3a00fff mov r0, #1020 ; 0x3fc <== NOT EXECUTED 1b9b0: ebffa270 bl 4378 <== NOT EXECUTED 1b9b4: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 1b9b8: 0a0000ec beq 1bd70 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 1b9bc: e28a9fff add r9, sl, #1020 ; 0x3fc <== NOT EXECUTED 1b9c0: e3a0bfff mov fp, #1020 ; 0x3fc <== NOT EXECUTED } bpt = ept - 1; *bpt = '\0'; 1b9c4: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 1b9c8: e5494001 strb r4, [r9, #-1] <== NOT EXECUTED * Allocate bytes (1024 - malloc space) for the string of "../"'s. * Should always be enough (it's 340 levels). If it's not, allocate * as necessary. Special * case the first stat, it's ".", not "..". */ if (!(up = (char *) malloc (upsize = 1024 - 4))) 1b9cc: e3a00fff mov r0, #1020 ; 0x3fc <== NOT EXECUTED 1b9d0: ebffa268 bl 4378 <== NOT EXECUTED 1b9d4: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; 1b9d8: e2498001 sub r8, r9, #1 ; 0x1 <== NOT EXECUTED * Allocate bytes (1024 - malloc space) for the string of "../"'s. * Should always be enough (it's 340 levels). If it's not, allocate * as necessary. Special * case the first stat, it's ".", not "..". */ if (!(up = (char *) malloc (upsize = 1024 - 4))) 1b9dc: 0a0000dd beq 1bd58 <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 1b9e0: e3a0602e mov r6, #46 ; 0x2e <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 1b9e4: e28d5030 add r5, sp, #48 ; 0x30 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 1b9e8: e5c74001 strb r4, [r7, #1] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 1b9ec: e5c76000 strb r6, [r7] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 1b9f0: e59f0390 ldr r0, [pc, #912] ; 1bd88 <== NOT EXECUTED 1b9f4: e1a01005 mov r1, r5 <== NOT EXECUTED 1b9f8: ebffa606 bl 5218 <== NOT EXECUTED 1b9fc: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 1ba00: 1a0000d4 bne 1bd58 <== NOT EXECUTED goto err; root_dev = s.st_dev; 1ba04: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED 1ba08: e891000e ldm r1, {r1, r2, r3} <== NOT EXECUTED 1ba0c: e58d100c str r1, [sp, #12] <== NOT EXECUTED 1ba10: e58d2008 str r2, [sp, #8] <== NOT EXECUTED root_ino = s.st_ino; 1ba14: e58d3020 str r3, [sp, #32] <== NOT EXECUTED errno = 0; /* XXX readdir has no error return. */ 1ba18: eb00399e bl 2a098 <__errno> <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 1ba1c: e2871b01 add r1, r7, #1024 ; 0x400 <== NOT EXECUTED if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; errno = 0; /* XXX readdir has no error return. */ 1ba20: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 1ba24: e3a03fff mov r3, #1020 ; 0x3fc <== NOT EXECUTED 1ba28: e5804000 str r4, [r0] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 1ba2c: e58d1028 str r1, [sp, #40] <== NOT EXECUTED if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; errno = 0; /* XXX readdir has no error return. */ 1ba30: e58d701c str r7, [sp, #28] <== NOT EXECUTED 1ba34: e58d2018 str r2, [sp, #24] <== NOT EXECUTED 1ba38: e58d3024 str r3, [sp, #36] <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 1ba3c: e1a00007 mov r0, r7 <== NOT EXECUTED 1ba40: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED 1ba44: ebffa5f3 bl 5218 <== NOT EXECUTED 1ba48: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1ba4c: 1a0000c1 bne 1bd58 <== NOT EXECUTED goto err; /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; 1ba50: e59d1030 ldr r1, [sp, #48] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 1ba54: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; 1ba58: e58d1004 str r1, [sp, #4] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 1ba5c: e1520001 cmp r2, r1 <== NOT EXECUTED /* Stat the current level. */ if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; 1ba60: e28d1034 add r1, sp, #52 ; 0x34 <== NOT EXECUTED 1ba64: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 1ba68: e58d3014 str r3, [sp, #20] <== NOT EXECUTED dev = s.st_dev; 1ba6c: e58d1000 str r1, [sp] <== NOT EXECUTED /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 1ba70: 1a000002 bne 1ba80 <== NOT EXECUTED 1ba74: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 1ba78: e1520001 cmp r2, r1 <== NOT EXECUTED 1ba7c: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED 1ba80: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED 1ba84: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 1ba88: e1510002 cmp r1, r2 <== NOT EXECUTED 1ba8c: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED 1ba90: 02003001 andeq r3, r0, #1 ; 0x1 <== NOT EXECUTED 1ba94: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1ba98: 0a000008 beq 1bac0 <== NOT EXECUTED { *--bpt = '/'; 1ba9c: e2481001 sub r1, r8, #1 ; 0x1 <== NOT EXECUTED 1baa0: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED 1baa4: e5483001 strb r3, [r8, #-1] <== NOT EXECUTED /* * It's unclear that it's a requirement to copy the * path to the beginning of the buffer, but it's always * been that way and stuff would probably break. */ (void) bcopy (bpt, pt, ept - bpt); 1baa8: e0612009 rsb r2, r1, r9 <== NOT EXECUTED 1baac: e1a0000a mov r0, sl <== NOT EXECUTED 1bab0: eb00432f bl 2c774 <== NOT EXECUTED free (up); 1bab4: e1a00007 mov r0, r7 <== NOT EXECUTED 1bab8: ebffa0b3 bl 3d8c <== NOT EXECUTED 1babc: ea0000ab b 1bd70 <== 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) 1bac0: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED 1bac4: e59d2028 ldr r2, [sp, #40] <== NOT EXECUTED 1bac8: e2813b01 add r3, r1, #1024 ; 0x400 <== NOT EXECUTED 1bacc: e2833004 add r3, r3, #4 ; 0x4 <== NOT EXECUTED 1bad0: e1520003 cmp r2, r3 <== NOT EXECUTED 1bad4: 8a00000b bhi 1bb08 <== NOT EXECUTED { if (!(up = (char *) realloc (up, upsize *= 2))) 1bad8: e59d3024 ldr r3, [sp, #36] <== NOT EXECUTED 1badc: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED 1bae0: e1a00007 mov r0, r7 <== NOT EXECUTED 1bae4: e1a01003 mov r1, r3 <== NOT EXECUTED 1bae8: e58d3024 str r3, [sp, #36] <== NOT EXECUTED 1baec: eb0005d2 bl 1d23c <== NOT EXECUTED 1baf0: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED 1baf4: 0a000097 beq 1bd58 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 1baf8: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED 1bafc: e0871001 add r1, r7, r1 <== NOT EXECUTED 1bb00: e58d1028 str r1, [sp, #40] <== NOT EXECUTED 1bb04: e58d701c str r7, [sp, #28] <== NOT EXECUTED } *bup++ = '.'; 1bb08: e59d401c ldr r4, [sp, #28] <== NOT EXECUTED 1bb0c: e3a0202e mov r2, #46 ; 0x2e <== NOT EXECUTED 1bb10: e4c42001 strb r2, [r4], #1 <== NOT EXECUTED *bup++ = '.'; 1bb14: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED *bup = '\0'; 1bb18: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 1bb1c: e5c32001 strb r2, [r3, #1] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 1bb20: e1a00007 mov r0, r7 <== NOT EXECUTED bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; *bup = '\0'; 1bb24: e5c41001 strb r1, [r4, #1] <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 1bb28: eb0004a6 bl 1cdc8 <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 1bb2c: e2842001 add r2, r4, #1 ; 0x1 <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 1bb30: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1bb34: e58d0010 str r0, [sp, #16] <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 1bb38: e58d202c str r2, [sp, #44] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 1bb3c: 0a000085 beq 1bd58 <== NOT EXECUTED 1bb40: e5900000 ldr r0, [r0] <== NOT EXECUTED 1bb44: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED 1bb48: ebffff00 bl 1b750 <== NOT EXECUTED 1bb4c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1bb50: 1a000089 bne 1bd7c <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 1bb54: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED 1bb58: e5c43001 strb r3, [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) 1bb5c: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED 1bb60: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 1bb64: e59d202c ldr r2, [sp, #44] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 1bb68: e1530001 cmp r3, r1 <== NOT EXECUTED /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 1bb6c: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED 1bb70: e58d201c str r2, [sp, #28] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 1bb74: 1a000003 bne 1bb88 <== NOT EXECUTED 1bb78: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 1bb7c: e59d1000 ldr r1, [sp] <== NOT EXECUTED 1bb80: e1530001 cmp r3, r1 <== NOT EXECUTED 1bb84: 0a000001 beq 1bb90 <== NOT EXECUTED 1bb88: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 1bb8c: ea000008 b 1bbb4 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 1bb90: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 1bb94: eb000540 bl 1d09c <== NOT EXECUTED 1bb98: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 1bb9c: 0a000063 beq 1bd30 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 1bba0: e5953000 ldr r3, [r5] <== NOT EXECUTED 1bba4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 1bba8: e1530002 cmp r3, r2 <== NOT EXECUTED 1bbac: 1afffff7 bne 1bb90 <== NOT EXECUTED 1bbb0: ea00002e b 1bc70 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 1bbb4: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 1bbb8: eb000537 bl 1d09c <== NOT EXECUTED 1bbbc: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 1bbc0: 0a00005b beq 1bd34 <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 1bbc4: e5d5300c ldrb r3, [r5, #12] <== NOT EXECUTED 1bbc8: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED 1bbcc: 1a000007 bne 1bbf0 <== NOT EXECUTED 1bbd0: e5d5300d ldrb r3, [r5, #13] <== NOT EXECUTED 1bbd4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1bbd8: 0afffff5 beq 1bbb4 <== NOT EXECUTED 1bbdc: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED 1bbe0: 1a000002 bne 1bbf0 <== NOT EXECUTED 1bbe4: e5d5300e ldrb r3, [r5, #14] <== NOT EXECUTED 1bbe8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1bbec: 0afffff0 beq 1bbb4 <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 1bbf0: e285400c add r4, r5, #12 ; 0xc <== NOT EXECUTED 1bbf4: e1a00004 mov r0, r4 <== NOT EXECUTED 1bbf8: eb004fbc bl 2faf0 <== NOT EXECUTED 1bbfc: e1a01004 mov r1, r4 <== NOT EXECUTED 1bc00: e2802001 add r2, r0, #1 ; 0x1 <== NOT EXECUTED 1bc04: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED 1bc08: eb0042d9 bl 2c774 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 1bc0c: e1a00007 mov r0, r7 <== NOT EXECUTED 1bc10: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED 1bc14: ebffa57f bl 5218 <== NOT EXECUTED 1bc18: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1bc1c: 0a000007 beq 1bc40 <== NOT EXECUTED { if (!save_errno) 1bc20: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 1bc24: 1a000001 bne 1bc30 <== NOT EXECUTED save_errno = errno; 1bc28: eb00391a bl 2a098 <__errno> <== NOT EXECUTED 1bc2c: e5906000 ldr r6, [r0] <== NOT EXECUTED errno = 0; 1bc30: eb003918 bl 2a098 <__errno> <== NOT EXECUTED 1bc34: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1bc38: e5803000 str r3, [r0] <== NOT EXECUTED 1bc3c: eaffffdc b 1bbb4 <== NOT EXECUTED continue; } if (s.st_dev == dev && s.st_ino == ino) 1bc40: e59d3030 ldr r3, [sp, #48] <== NOT EXECUTED 1bc44: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 1bc48: e1530001 cmp r3, r1 <== NOT EXECUTED 1bc4c: 1affffd8 bne 1bbb4 <== NOT EXECUTED 1bc50: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 1bc54: e59d2000 ldr r2, [sp] <== NOT EXECUTED 1bc58: e1530002 cmp r3, r2 <== NOT EXECUTED 1bc5c: 1affffd4 bne 1bbb4 <== NOT EXECUTED 1bc60: e59d3038 ldr r3, [sp, #56] <== NOT EXECUTED 1bc64: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED 1bc68: e1530001 cmp r3, r1 <== NOT EXECUTED 1bc6c: 1affffd0 bne 1bbb4 <== NOT EXECUTED /* * Check for length of the current name, preceding slash, * leading slash. */ if (bpt - pt <= strlen (dp->d_name) + (first ? 1 : 2)) 1bc70: e285400c add r4, r5, #12 ; 0xc <== NOT EXECUTED 1bc74: e1a00004 mov r0, r4 <== NOT EXECUTED 1bc78: eb004f9c bl 2faf0 <== NOT EXECUTED 1bc7c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 1bc80: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1bc84: 13a03001 movne r3, #1 ; 0x1 <== NOT EXECUTED 1bc88: 03a03002 moveq r3, #2 ; 0x2 <== NOT EXECUTED 1bc8c: e0833000 add r3, r3, r0 <== NOT EXECUTED 1bc90: e06a5008 rsb r5, sl, r8 <== NOT EXECUTED 1bc94: e1550003 cmp r5, r3 <== NOT EXECUTED 1bc98: 8a000011 bhi 1bce4 <== NOT EXECUTED { size_t len, off; if (!ptsize) 1bc9c: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED 1bca0: 1a000003 bne 1bcb4 <== NOT EXECUTED { errno = ERANGE; 1bca4: eb0038fb bl 2a098 <__errno> <== NOT EXECUTED 1bca8: e3a03022 mov r3, #34 ; 0x22 <== NOT EXECUTED 1bcac: e5803000 str r3, [r0] <== NOT EXECUTED 1bcb0: ea000031 b 1bd7c <== NOT EXECUTED goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 1bcb4: e1a0b08b lsl fp, fp, #1 <== NOT EXECUTED 1bcb8: e1a0000a mov r0, sl <== NOT EXECUTED 1bcbc: e1a0100b mov r1, fp <== NOT EXECUTED 1bcc0: eb00055d bl 1d23c <== NOT EXECUTED 1bcc4: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 1bcc8: 0a00002b beq 1bd7c <== NOT EXECUTED { errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; 1bccc: e0682009 rsb r2, r8, r9 <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 1bcd0: e08a900b add r9, sl, fp <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 1bcd4: e0628009 rsb r8, r2, r9 <== NOT EXECUTED 1bcd8: e08a1005 add r1, sl, r5 <== NOT EXECUTED 1bcdc: e1a00008 mov r0, r8 <== NOT EXECUTED 1bce0: eb0042a3 bl 2c774 <== NOT EXECUTED bpt = ept - len; } if (!first) 1bce4: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED 1bce8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED *--bpt = '/'; 1bcec: 03a0102f moveq r1, #47 ; 0x2f <== NOT EXECUTED 1bcf0: 05681001 strbeq r1, [r8, #-1]! <== NOT EXECUTED bpt -= strlen (dp->d_name); 1bcf4: e1a00004 mov r0, r4 <== NOT EXECUTED 1bcf8: eb004f7c bl 2faf0 <== NOT EXECUTED 1bcfc: e0608008 rsb r8, r0, r8 <== NOT EXECUTED 1bd00: e1a02000 mov r2, r0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 1bd04: e1a01004 mov r1, r4 <== NOT EXECUTED 1bd08: e1a00008 mov r0, r8 <== NOT EXECUTED 1bd0c: eb004298 bl 2c774 <== NOT EXECUTED (void) _closedir (dir); 1bd10: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 1bd14: eb002ed2 bl 27864 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 1bd18: e59d202c ldr r2, [sp, #44] <== NOT EXECUTED 1bd1c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1bd20: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1bd24: e5c23001 strb r3, [r2, #1] <== NOT EXECUTED 1bd28: e58d1018 str r1, [sp, #24] <== NOT EXECUTED 1bd2c: eaffff42 b 1ba3c <== NOT EXECUTED } 1bd30: e1a06005 mov r6, r5 <== NOT EXECUTED * If readdir set errno, use it, not any saved error; otherwise, * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) 1bd34: eb0038d7 bl 2a098 <__errno> <== NOT EXECUTED 1bd38: e5903000 ldr r3, [r0] <== NOT EXECUTED 1bd3c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1bd40: 1a00000d bne 1bd7c <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; 1bd44: eb0038d3 bl 2a098 <__errno> <== NOT EXECUTED 1bd48: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 1bd4c: 03a06002 moveq r6, #2 ; 0x2 <== NOT EXECUTED 1bd50: e5806000 str r6, [r0] <== NOT EXECUTED 1bd54: ea000008 b 1bd7c <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 1bd58: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED free (pt); 1bd5c: 11a0000a movne r0, sl <== NOT EXECUTED 1bd60: 1bffa009 blne 3d8c <== NOT EXECUTED free (up); 1bd64: e1a00007 mov r0, r7 <== NOT EXECUTED 1bd68: ebffa007 bl 3d8c <== NOT EXECUTED 1bd6c: e3a0a000 mov sl, #0 ; 0x0 <== NOT EXECUTED return (char *) NULL; } 1bd70: e1a0000a mov r0, sl <== NOT EXECUTED 1bd74: e28dd07c add sp, sp, #124 ; 0x7c <== NOT EXECUTED 1bd78: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 1bd7c: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 1bd80: eb002eb7 bl 27864 <== NOT EXECUTED 1bd84: eafffff3 b 1bd58 <== NOT EXECUTED 1bd88: 00041473 .word 0x00041473 00027bdc : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 27bdc: e59f30a0 ldr r3, [pc, #160] ; 27c84 27be0: e5933000 ldr r3, [r3] 27be4: e1500003 cmp r0, r3 27be8: 359f3098 ldrcc r3, [pc, #152] ; 27c88 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 27bec: e92d4070 push {r4, r5, r6, lr} 27bf0: e1a06002 mov r6, r2 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 27bf4: 35932000 ldrcc r2, [r3] 27bf8: 33a03034 movcc r3, #52 ; 0x34 27bfc: 30242093 mlacc r4, r3, r0, r2 27c00: 23a04000 movcs r4, #0 ; 0x0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 27c04: e2843010 add r3, r4, #16 ; 0x10 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 27c08: e1a05001 mov r5, r1 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 27c0c: e893000f ldm r3, {r0, r1, r2, r3} int getdents( int dd_fd, char *dd_buf, int dd_len ) { 27c10: e24dd010 sub sp, sp, #16 ; 0x10 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 27c14: e88d000f stm sp, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 27c18: e5923010 ldr r3, [r2, #16] 27c1c: e3530000 cmp r3, #0 ; 0x0 27c20: 0a00000d beq 27c5c rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 27c24: e1a0000d mov r0, sp 27c28: e1a0e00f mov lr, pc 27c2c: e12fff13 bx r3 27c30: e3500001 cmp r0, #1 ; 0x1 27c34: 0a000004 beq 27c4c rtems_set_errno_and_return_minus_one( ENOTDIR ); 27c38: eb000916 bl 2a098 <__errno> 27c3c: e3a03014 mov r3, #20 ; 0x14 27c40: e5803000 str r3, [r0] 27c44: e3e00000 mvn r0, #0 ; 0x0 27c48: ea00000b b 27c7c /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 27c4c: e5943030 ldr r3, [r4, #48] 27c50: e5933008 ldr r3, [r3, #8] 27c54: e3530000 cmp r3, #0 ; 0x0 27c58: 1a000002 bne 27c68 rtems_set_errno_and_return_minus_one( ENOTSUP ); 27c5c: eb00090d bl 2a098 <__errno> <== NOT EXECUTED 27c60: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 27c64: eafffff5 b 27c40 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 27c68: e1a00004 mov r0, r4 27c6c: e1a01005 mov r1, r5 27c70: e1a02006 mov r2, r6 27c74: e1a0e00f mov lr, pc 27c78: e12fff13 bx r3 } 27c7c: e28dd010 add sp, sp, #16 ; 0x10 27c80: e8bd8070 pop {r4, r5, r6, pc} 27c84: 0003bb14 .word 0x0003bb14 27c88: 000564ac .word 0x000564ac 0001bdb4 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 1bdb4: e59f3008 ldr r3, [pc, #8] ; 1bdc4 <== NOT EXECUTED 1bdb8: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 1bdbc: e1d302bc ldrh r0, [r3, #44] <== NOT EXECUTED 1bdc0: e12fff1e bx lr <== NOT EXECUTED 1bdc4: 0003c648 .word 0x0003c648 0001c3cc : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 1c3cc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 1c3d0: e59da01c ldr sl, [sp, #28] <== NOT EXECUTED 1c3d4: e1a06000 mov r6, r0 <== NOT EXECUTED 1c3d8: e1a08001 mov r8, r1 <== NOT EXECUTED 1c3dc: e1a04002 mov r4, r2 <== NOT EXECUTED 1c3e0: e1a07003 mov r7, r3 <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 1c3e4: ebffffb7 bl 1c2c8 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 1c3e8: e59f00a4 ldr r0, [pc, #164] ; 1c494 <== NOT EXECUTED 1c3ec: e59f10a4 ldr r1, [pc, #164] ; 1c498 <== NOT EXECUTED 1c3f0: eb00396c bl 2a9a8 <== NOT EXECUTED 1c3f4: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 1c3f8: 1a000003 bne 1c40c <== NOT EXECUTED errno = EINVAL; 1c3fc: eb003725 bl 2a098 <__errno> <== NOT EXECUTED 1c400: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1c404: e5803000 str r3, [r0] <== NOT EXECUTED 1c408: ea00000c b 1c440 <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 1c40c: e1a01004 mov r1, r4 <== NOT EXECUTED 1c410: e1a02007 mov r2, r7 <== NOT EXECUTED 1c414: e1a0300a mov r3, sl <== NOT EXECUTED 1c418: e1a00005 mov r0, r5 <== NOT EXECUTED 1c41c: ebfffeec bl 1bfd4 <== NOT EXECUTED 1c420: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 1c424: e1a01006 mov r1, r6 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 1c428: 1a000006 bne 1c448 <== NOT EXECUTED errno = EINVAL; 1c42c: eb003719 bl 2a098 <__errno> <== NOT EXECUTED 1c430: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1c434: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 1c438: e1a00005 mov r0, r5 <== NOT EXECUTED 1c43c: eb003766 bl 2a1dc <== NOT EXECUTED 1c440: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1c444: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return -1; } if (name) { 1c448: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 1c44c: 0a000004 beq 1c464 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 1c450: e5940000 ldr r0, [r4] <== NOT EXECUTED 1c454: eb004b7e bl 2f254 <== NOT EXECUTED 1c458: e2700001 rsbs r0, r0, #1 ; 0x1 <== NOT EXECUTED 1c45c: 33a00000 movcc r0, #0 ; 0x0 <== NOT EXECUTED 1c460: ea000003 b 1c474 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); 1c464: e1d430b8 ldrh r3, [r4, #8] <== NOT EXECUTED 1c468: e1530008 cmp r3, r8 <== NOT EXECUTED 1c46c: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 1c470: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED } if (match) { 1c474: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c478: 0affffe3 beq 1c40c <== NOT EXECUTED fclose(fp); 1c47c: e1a00005 mov r0, r5 <== NOT EXECUTED 1c480: eb003755 bl 2a1dc <== NOT EXECUTED *result = grp; 1c484: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 1c488: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1c48c: e5834000 str r4, [r3] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 1c490: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 1c494: 00041394 .word 0x00041394 1c498: 0003fb2d .word 0x0003fb2d 0001c114 : return p; } struct group *getgrent() { if (group_fp == NULL) 1c114: e59f3030 ldr r3, [pc, #48] ; 1c14c <== NOT EXECUTED 1c118: e5930000 ldr r0, [r3] <== NOT EXECUTED 1c11c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; } struct group *getgrent() { 1c120: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if (group_fp == NULL) 1c124: 0a000006 beq 1c144 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 1c128: e59f1020 ldr r1, [pc, #32] ; 1c150 <== NOT EXECUTED 1c12c: e59f2020 ldr r2, [pc, #32] ; 1c154 <== NOT EXECUTED 1c130: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1c134: ebffffa6 bl 1bfd4 <== NOT EXECUTED 1c138: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c13c: 159f000c ldrne r0, [pc, #12] ; 1c150 <== NOT EXECUTED 1c140: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED 1c144: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return &grent; } 1c148: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1c14c: 00055ca4 .word 0x00055ca4 1c150: 00055d70 .word 0x00055d70 1c154: 00055ca8 .word 0x00055ca8 0001c4d8 : struct group *getgrgid( gid_t gid ) { 1c4d8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1c4dc: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED 1c4e0: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 1c4e4: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 1c4e8: e59f1024 ldr r1, [pc, #36] ; 1c514 <== NOT EXECUTED 1c4ec: e59f2024 ldr r2, [pc, #36] ; 1c518 <== NOT EXECUTED 1c4f0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1c4f4: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 1c4f8: e58dc000 str ip, [sp] <== NOT EXECUTED 1c4fc: ebffffe6 bl 1c49c <== NOT EXECUTED 1c500: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c504: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 1c508: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 1c50c: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c510: e8bd8000 pop {pc} <== NOT EXECUTED 1c514: 00055d70 .word 0x00055d70 1c518: 00055ca8 .word 0x00055ca8 0001c49c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 1c49c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1c4a0: e1a0c001 mov ip, r1 <== NOT EXECUTED 1c4a4: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c4a8: e1a0e002 mov lr, r2 <== NOT EXECUTED 1c4ac: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 1c4b0: e1a0200c mov r2, ip <== NOT EXECUTED 1c4b4: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 1c4b8: e58d3000 str r3, [sp] <== NOT EXECUTED 1c4bc: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 1c4c0: e1a0300e mov r3, lr <== NOT EXECUTED 1c4c4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1c4c8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 1c4cc: ebffffbe bl 1c3cc <== NOT EXECUTED } 1c4d0: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c4d4: e8bd8000 pop {pc} <== NOT EXECUTED 0001c54c : struct group *getgrnam( const char *name ) { 1c54c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1c550: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 1c554: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 1c558: e59f1020 ldr r1, [pc, #32] ; 1c580 <== NOT EXECUTED 1c55c: e59f2020 ldr r2, [pc, #32] ; 1c584 <== NOT EXECUTED 1c560: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1c564: e58dc000 str ip, [sp] <== NOT EXECUTED 1c568: ebffffeb bl 1c51c <== NOT EXECUTED 1c56c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c570: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 1c574: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 1c578: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c57c: e8bd8000 pop {pc} <== NOT EXECUTED 1c580: 00055d70 .word 0x00055d70 1c584: 00055ca8 .word 0x00055ca8 0001c51c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 1c51c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1c520: e1a0c002 mov ip, r2 <== NOT EXECUTED 1c524: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 1c528: e58d3000 str r3, [sp] <== NOT EXECUTED 1c52c: e1a0300c mov r3, ip <== NOT EXECUTED 1c530: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 1c534: e1a02001 mov r2, r1 <== NOT EXECUTED 1c538: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1c53c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 1c540: ebffffa1 bl 1c3cc <== NOT EXECUTED } 1c544: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c548: e8bd8000 pop {pc} <== NOT EXECUTED 0001c5c4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 1c5c4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 1c5c8: e59da01c ldr sl, [sp, #28] <== NOT EXECUTED 1c5cc: e1a06000 mov r6, r0 <== NOT EXECUTED 1c5d0: e1a08001 mov r8, r1 <== NOT EXECUTED 1c5d4: e1a04002 mov r4, r2 <== NOT EXECUTED 1c5d8: e1a07003 mov r7, r3 <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 1c5dc: ebffff39 bl 1c2c8 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 1c5e0: e59f00a4 ldr r0, [pc, #164] ; 1c68c <== NOT EXECUTED 1c5e4: e59f10a4 ldr r1, [pc, #164] ; 1c690 <== NOT EXECUTED 1c5e8: eb0038ee bl 2a9a8 <== NOT EXECUTED 1c5ec: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 1c5f0: 1a000003 bne 1c604 <== NOT EXECUTED errno = EINVAL; 1c5f4: eb0036a7 bl 2a098 <__errno> <== NOT EXECUTED 1c5f8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1c5fc: e5803000 str r3, [r0] <== NOT EXECUTED 1c600: ea00000c b 1c638 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 1c604: e1a01004 mov r1, r4 <== NOT EXECUTED 1c608: e1a02007 mov r2, r7 <== NOT EXECUTED 1c60c: e1a0300a mov r3, sl <== NOT EXECUTED 1c610: e1a00005 mov r0, r5 <== NOT EXECUTED 1c614: ebfffecf bl 1c158 <== NOT EXECUTED 1c618: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 1c61c: e1a01006 mov r1, r6 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 1c620: 1a000006 bne 1c640 <== NOT EXECUTED errno = EINVAL; 1c624: eb00369b bl 2a098 <__errno> <== NOT EXECUTED 1c628: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 1c62c: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 1c630: e1a00005 mov r0, r5 <== NOT EXECUTED 1c634: eb0036e8 bl 2a1dc <== NOT EXECUTED 1c638: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1c63c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return -1; } if (name) { 1c640: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 1c644: 0a000004 beq 1c65c <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 1c648: e5940000 ldr r0, [r4] <== NOT EXECUTED 1c64c: eb004b00 bl 2f254 <== NOT EXECUTED 1c650: e2700001 rsbs r0, r0, #1 ; 0x1 <== NOT EXECUTED 1c654: 33a00000 movcc r0, #0 ; 0x0 <== NOT EXECUTED 1c658: ea000003 b 1c66c <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); 1c65c: e1d430b8 ldrh r3, [r4, #8] <== NOT EXECUTED 1c660: e1530008 cmp r3, r8 <== NOT EXECUTED 1c664: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 1c668: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED } if (match) { 1c66c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c670: 0affffe3 beq 1c604 <== NOT EXECUTED fclose(fp); 1c674: e1a00005 mov r0, r5 <== NOT EXECUTED 1c678: eb0036d7 bl 2a1dc <== NOT EXECUTED *result = pwd; 1c67c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 1c680: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1c684: e5834000 str r4, [r3] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 1c688: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 1c68c: 00041321 .word 0x00041321 1c690: 0003fb2d .word 0x0003fb2d 0001c284 : return p; } struct passwd *getpwent() { if (passwd_fp == NULL) 1c284: e59f3030 ldr r3, [pc, #48] ; 1c2bc <== NOT EXECUTED 1c288: e5930000 ldr r0, [r3] <== NOT EXECUTED 1c28c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; } struct passwd *getpwent() { 1c290: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if (passwd_fp == NULL) 1c294: 0a000006 beq 1c2b4 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 1c298: e59f1020 ldr r1, [pc, #32] ; 1c2c0 <== NOT EXECUTED 1c29c: e59f2020 ldr r2, [pc, #32] ; 1c2c4 <== NOT EXECUTED 1c2a0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1c2a4: ebffffab bl 1c158 <== NOT EXECUTED 1c2a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c2ac: 159f000c ldrne r0, [pc, #12] ; 1c2c0 <== NOT EXECUTED 1c2b0: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED 1c2b4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return &pwent; } 1c2b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1c2bc: 00055bbc .word 0x00055bbc 1c2c0: 00055c88 .word 0x00055c88 1c2c4: 00055bc0 .word 0x00055bc0 0001c744 : struct passwd *getpwnam( const char *name ) { 1c744: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1c748: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 1c74c: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 1c750: e59f1020 ldr r1, [pc, #32] ; 1c778 <== NOT EXECUTED 1c754: e59f2020 ldr r2, [pc, #32] ; 1c77c <== NOT EXECUTED 1c758: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1c75c: e58dc000 str ip, [sp] <== NOT EXECUTED 1c760: ebffffeb bl 1c714 <== NOT EXECUTED 1c764: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c768: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 1c76c: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 1c770: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c774: e8bd8000 pop {pc} <== NOT EXECUTED 1c778: 00055c88 .word 0x00055c88 1c77c: 00055bc0 .word 0x00055bc0 0001c714 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 1c714: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1c718: e1a0c002 mov ip, r2 <== NOT EXECUTED 1c71c: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 1c720: e58d3000 str r3, [sp] <== NOT EXECUTED 1c724: e1a0300c mov r3, ip <== NOT EXECUTED 1c728: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 1c72c: e1a02001 mov r2, r1 <== NOT EXECUTED 1c730: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1c734: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 1c738: ebffffa1 bl 1c5c4 <== NOT EXECUTED } 1c73c: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c740: e8bd8000 pop {pc} <== NOT EXECUTED 0001c6d0 : struct passwd *getpwuid( uid_t uid ) { 1c6d0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1c6d4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED 1c6d8: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 1c6dc: e28dc004 add ip, sp, #4 ; 0x4 <== NOT EXECUTED 1c6e0: e59f1024 ldr r1, [pc, #36] ; 1c70c <== NOT EXECUTED 1c6e4: e59f2024 ldr r2, [pc, #36] ; 1c710 <== NOT EXECUTED 1c6e8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 1c6ec: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 1c6f0: e58dc000 str ip, [sp] <== NOT EXECUTED 1c6f4: ebffffe6 bl 1c694 <== NOT EXECUTED 1c6f8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c6fc: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED return NULL; return p; 1c700: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 1c704: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c708: e8bd8000 pop {pc} <== NOT EXECUTED 1c70c: 00055c88 .word 0x00055c88 1c710: 00055bc0 .word 0x00055bc0 0001c694 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 1c694: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 1c698: e1a0c001 mov ip, r1 <== NOT EXECUTED 1c69c: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c6a0: e1a0e002 mov lr, r2 <== NOT EXECUTED 1c6a4: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 1c6a8: e1a0200c mov r2, ip <== NOT EXECUTED 1c6ac: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 1c6b0: e58d3000 str r3, [sp] <== NOT EXECUTED 1c6b4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 1c6b8: e1a0300e mov r3, lr <== NOT EXECUTED 1c6bc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1c6c0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 1c6c4: ebffffbe bl 1c5c4 <== NOT EXECUTED } 1c6c8: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1c6cc: e8bd8000 pop {pc} <== NOT EXECUTED 000088b4 : int gettimeofday( struct timeval *tp, void * __tz ) { 88b4: e92d4030 push {r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 88b8: e2505000 subs r5, r0, #0 ; 0x0 int gettimeofday( struct timeval *tp, void * __tz ) { 88bc: e24dd008 sub sp, sp, #8 ; 0x8 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 88c0: 1a000004 bne 88d8 errno = EFAULT; 88c4: eb000ab3 bl b398 <__errno> <== NOT EXECUTED 88c8: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 88cc: e5803000 str r3, [r0] <== NOT EXECUTED 88d0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 88d4: ea00000c b 890c <== NOT EXECUTED ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 88d8: e10f4000 mrs r4, CPSR 88dc: e38430c0 orr r3, r4, #192 ; 0xc0 88e0: e129f003 msr CPSR_fc, r3 _TOD_Get( &now ); 88e4: e1a0000d mov r0, sp 88e8: ebfff226 bl 5188 <_TOD_Get> _ISR_Enable(level); 88ec: e129f004 msr CPSR_fc, r4 time->tv_sec = now.tv_sec; 88f0: e59d3000 ldr r3, [sp] 88f4: e5853000 str r3, [r5] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 88f8: e59d0004 ldr r0, [sp, #4] 88fc: e3a01ffa mov r1, #1000 ; 0x3e8 8900: eb0025cf bl 12044 <__aeabi_uidiv> 8904: e5850004 str r0, [r5, #4] 8908: 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; } 890c: e28dd008 add sp, sp, #8 ; 0x8 8910: e8bd8030 pop {r4, r5, pc} 00003e9c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 3e9c: e59f3008 ldr r3, [pc, #8] ; 3eac <== NOT EXECUTED 3ea0: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 3ea4: e1d302ba ldrh r0, [r3, #42] <== NOT EXECUTED 3ea8: e12fff1e bx lr <== NOT EXECUTED 3eac: 0003c648 .word 0x0003c648 0001c2c8 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 1c2c8: e92d4010 push {r4, lr} <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 1c2cc: e59f2098 ldr r2, [pc, #152] ; 1c36c <== NOT EXECUTED 1c2d0: e5d23000 ldrb r3, [r2] <== NOT EXECUTED 1c2d4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1c2d8: 18bd8010 popne {r4, pc} <== NOT EXECUTED return; etc_passwd_initted = 1; 1c2dc: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED mkdir("/etc", 0777); 1c2e0: e59f1088 ldr r1, [pc, #136] ; 1c370 <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 1c2e4: e5c23000 strb r3, [r2] <== NOT EXECUTED mkdir("/etc", 0777); 1c2e8: e59f0084 ldr r0, [pc, #132] ; 1c374 <== NOT EXECUTED 1c2ec: ebffa093 bl 4540 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 1c2f0: e59f0080 ldr r0, [pc, #128] ; 1c378 <== NOT EXECUTED 1c2f4: e59f1080 ldr r1, [pc, #128] ; 1c37c <== NOT EXECUTED 1c2f8: eb0039aa bl 2a9a8 <== NOT EXECUTED 1c2fc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c300: 1a000008 bne 1c328 <== NOT EXECUTED fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 1c304: e59f006c ldr r0, [pc, #108] ; 1c378 <== NOT EXECUTED 1c308: e59f1070 ldr r1, [pc, #112] ; 1c380 <== NOT EXECUTED 1c30c: eb0039a5 bl 2a9a8 <== NOT EXECUTED 1c310: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 1c314: 0a000004 beq 1c32c <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 1c318: e59f0064 ldr r0, [pc, #100] ; 1c384 <== NOT EXECUTED 1c31c: e1a01004 mov r1, r4 <== NOT EXECUTED 1c320: eb0039f2 bl 2aaf0 <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 1c324: e1a00004 mov r0, r4 <== NOT EXECUTED 1c328: eb0037ab bl 2a1dc <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 1c32c: e59f0054 ldr r0, [pc, #84] ; 1c388 <== NOT EXECUTED 1c330: e59f1044 ldr r1, [pc, #68] ; 1c37c <== NOT EXECUTED 1c334: eb00399b bl 2a9a8 <== NOT EXECUTED 1c338: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1c33c: 1a000008 bne 1c364 <== NOT EXECUTED fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 1c340: e59f0040 ldr r0, [pc, #64] ; 1c388 <== NOT EXECUTED 1c344: e59f1034 ldr r1, [pc, #52] ; 1c380 <== NOT EXECUTED 1c348: eb003996 bl 2a9a8 <== NOT EXECUTED 1c34c: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 1c350: 08bd8010 popeq {r4, pc} <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 1c354: e59f0030 ldr r0, [pc, #48] ; 1c38c <== NOT EXECUTED 1c358: e1a01004 mov r1, r4 <== NOT EXECUTED 1c35c: eb0039e3 bl 2aaf0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 1c360: e1a00004 mov r0, r4 <== NOT EXECUTED } } 1c364: e8bd4010 pop {r4, lr} <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 1c368: ea00379b b 2a1dc <== NOT EXECUTED 1c36c: 00055bb8 .word 0x00055bb8 1c370: 000001ff .word 0x000001ff 1c374: 0004131c .word 0x0004131c 1c378: 00041321 .word 0x00041321 1c37c: 0003fb2d .word 0x0003fb2d 1c380: 0003f7d9 .word 0x0003f7d9 1c384: 0004132d .word 0x0004132d 1c388: 00041394 .word 0x00041394 1c38c: 0004139f .word 0x0004139f 00012ab0 : int ioctl( int fd, ioctl_command_t command, ... ) { 12ab0: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 12ab4: e59f3080 ldr r3, [pc, #128] ; 12b3c 12ab8: e5933000 ldr r3, [r3] 12abc: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 12ac0: e52de004 push {lr} ; (str lr, [sp, #-4]!) 12ac4: e1a01000 mov r1, r0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 12ac8: 2a00000a bcs 12af8 iop = rtems_libio_iop( fd ); 12acc: e59f306c ldr r3, [pc, #108] ; 12b40 12ad0: e5932000 ldr r2, [r3] 12ad4: e3a03034 mov r3, #52 ; 0x34 12ad8: e0202193 mla r0, r3, r1, r2 rtems_libio_check_is_open(iop); 12adc: e590300c ldr r3, [r0, #12] 12ae0: e3130c01 tst r3, #256 ; 0x100 12ae4: 0a000003 beq 12af8 /* * Now process the ioctl(). */ if ( !iop->handlers ) 12ae8: e5903030 ldr r3, [r0, #48] 12aec: e3530000 cmp r3, #0 ; 0x0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 12af0: e59d2008 ldr r2, [sp, #8] /* * Now process the ioctl(). */ if ( !iop->handlers ) 12af4: 1a000002 bne 12b04 rtems_set_errno_and_return_minus_one( EBADF ); 12af8: eb0002e0 bl 13680 <__errno> <== NOT EXECUTED 12afc: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 12b00: ea000004 b 12b18 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) 12b04: e5933010 ldr r3, [r3, #16] 12b08: e3530000 cmp r3, #0 ; 0x0 12b0c: 1a000004 bne 12b24 rtems_set_errno_and_return_minus_one( ENOTSUP ); 12b10: eb0002da bl 13680 <__errno> <== NOT EXECUTED 12b14: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 12b18: e5803000 str r3, [r0] <== NOT EXECUTED 12b1c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 12b20: ea000002 b 12b30 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 12b24: e59d1004 ldr r1, [sp, #4] 12b28: e1a0e00f mov lr, pc 12b2c: e12fff13 bx r3 return rc; } 12b30: e49de004 pop {lr} ; (ldr lr, [sp], #4) 12b34: e28dd00c add sp, sp, #12 ; 0xc 12b38: e12fff1e bx lr 12b3c: 0001eaa4 .word 0x0001eaa4 12b40: 00024210 .word 0x00024210 0000295c : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 295c: e5912030 ldr r2, [r1, #48] <== NOT EXECUTED 2960: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2964: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2968: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 296c: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 2970: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2974: e1a05001 mov r5, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 2978: 0a000006 beq 2998 <== NOT EXECUTED c = tolower (c); 297c: e59f3164 ldr r3, [pc, #356] ; 2ae8 <== NOT EXECUTED 2980: e5933000 ldr r3, [r3] <== NOT EXECUTED 2984: e7d33004 ldrb r3, [r3, r4] <== NOT EXECUTED 2988: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 298c: e1a00004 mov r0, r4 <== NOT EXECUTED 2990: 12840020 addne r0, r4, #32 ; 0x20 <== NOT EXECUTED 2994: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 2998: e354000d cmp r4, #13 ; 0xd <== NOT EXECUTED 299c: 1a000005 bne 29b8 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 29a0: e3120080 tst r2, #128 ; 0x80 <== NOT EXECUTED 29a4: 1a00004d bne 2ae0 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 29a8: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 29ac: 03a0400d moveq r4, #13 ; 0xd <== NOT EXECUTED 29b0: 13a0400a movne r4, #10 ; 0xa <== NOT EXECUTED 29b4: ea000007 b 29d8 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 29b8: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 29bc: 1a000003 bne 29d0 <== 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; 29c0: e3120040 tst r2, #64 ; 0x40 <== NOT EXECUTED 29c4: 03a0400a moveq r4, #10 ; 0xa <== NOT EXECUTED 29c8: 13a0400d movne r4, #13 ; 0xd <== NOT EXECUTED 29cc: ea000001 b 29d8 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 29d0: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 29d4: 0a00002f beq 2a98 <== NOT EXECUTED 29d8: e595203c ldr r2, [r5, #60] <== NOT EXECUTED 29dc: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED 29e0: 0a00002c beq 2a98 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 29e4: e5d53043 ldrb r3, [r5, #67] <== NOT EXECUTED 29e8: e1530004 cmp r3, r4 <== NOT EXECUTED erase (tty, 0); 29ec: 01a00005 moveq r0, r5 <== NOT EXECUTED 29f0: 03a01000 moveq r1, #0 ; 0x0 <== NOT EXECUTED } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { 29f4: 0a000004 beq 2a0c <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 29f8: e5d53044 ldrb r3, [r5, #68] <== NOT EXECUTED 29fc: e1530004 cmp r3, r4 <== NOT EXECUTED 2a00: 1a000003 bne 2a14 <== NOT EXECUTED erase (tty, 1); 2a04: e1a00005 mov r0, r5 <== NOT EXECUTED 2a08: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 2a0c: ebffff61 bl 2798 <== NOT EXECUTED 2a10: ea000030 b 2ad8 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2a14: e5d53045 ldrb r3, [r5, #69] <== NOT EXECUTED 2a18: e1530004 cmp r3, r4 <== NOT EXECUTED 2a1c: 0a00001b beq 2a90 <== NOT EXECUTED return 1; } else if (c == '\n') { 2a20: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED 2a24: 1a00000a bne 2a54 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 2a28: e3120048 tst r2, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 2a2c: 11a00004 movne r0, r4 <== NOT EXECUTED 2a30: 11a01005 movne r1, r5 <== NOT EXECUTED 2a34: 1bffff36 blne 2714 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2a38: e285101c add r1, r5, #28 ; 0x1c <== NOT EXECUTED 2a3c: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 2a40: e2820001 add r0, r2, #1 ; 0x1 <== NOT EXECUTED 2a44: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED 2a48: e7c13002 strb r3, [r1, r2] <== NOT EXECUTED 2a4c: e5850020 str r0, [r5, #32] <== NOT EXECUTED 2a50: ea00000e b 2a90 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 2a54: e5d5304c ldrb r3, [r5, #76] <== NOT EXECUTED 2a58: e1530004 cmp r3, r4 <== NOT EXECUTED 2a5c: 0a000002 beq 2a6c <== NOT EXECUTED 2a60: e5d53051 ldrb r3, [r5, #81] <== NOT EXECUTED 2a64: e1530004 cmp r3, r4 <== NOT EXECUTED 2a68: 1a00000a bne 2a98 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 2a6c: e3120008 tst r2, #8 ; 0x8 <== NOT EXECUTED echo (c, tty); 2a70: 11a00004 movne r0, r4 <== NOT EXECUTED 2a74: 11a01005 movne r1, r5 <== NOT EXECUTED 2a78: 1bffff25 blne 2714 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2a7c: e285201c add r2, r5, #28 ; 0x1c <== NOT EXECUTED 2a80: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 2a84: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED 2a88: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED 2a8c: e5851020 str r1, [r5, #32] <== NOT EXECUTED 2a90: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2a94: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2a98: e59f304c ldr r3, [pc, #76] ; 2aec <== NOT EXECUTED 2a9c: e5933000 ldr r3, [r3] <== NOT EXECUTED 2aa0: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED 2aa4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 2aa8: e1520003 cmp r2, r3 <== NOT EXECUTED 2aac: aa00000b bge 2ae0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2ab0: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 2ab4: e3130008 tst r3, #8 ; 0x8 <== NOT EXECUTED echo (c, tty); 2ab8: 11a00004 movne r0, r4 <== NOT EXECUTED 2abc: 11a01005 movne r1, r5 <== NOT EXECUTED 2ac0: 1bffff13 blne 2714 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2ac4: e285201c add r2, r5, #28 ; 0x1c <== NOT EXECUTED 2ac8: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 2acc: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED 2ad0: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED 2ad4: e5851020 str r1, [r5, #32] <== NOT EXECUTED 2ad8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2adc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2ae0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } return 0; } 2ae4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2ae8: 00014a4c .word 0x00014a4c 2aec: 000149a0 .word 0x000149a0 0001e524 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 1e524: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 1e528: e24dd00c sub sp, sp, #12 ; 0xc 1e52c: e1a04000 mov r4, r0 1e530: e1a06001 mov r6, r1 1e534: e1a05002 mov r5, r2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 1e538: ebffff3f bl 1e23c 1e53c: e1540000 cmp r4, r0 1e540: 0a000002 beq 1e550 rtems_set_errno_and_return_minus_one( ESRCH ); 1e544: ebffd44d bl 13680 <__errno> 1e548: e3a03003 mov r3, #3 ; 0x3 1e54c: ea000003 b 1e560 /* * Validate the signal passed. */ if ( !sig ) 1e550: e3560000 cmp r6, #0 ; 0x0 1e554: 1a000004 bne 1e56c rtems_set_errno_and_return_minus_one( EINVAL ); 1e558: ebffd448 bl 13680 <__errno> 1e55c: e3a03016 mov r3, #22 ; 0x16 1e560: e5803000 str r3, [r0] 1e564: e3e00000 mvn r0, #0 ; 0x0 1e568: ea000089 b 1e794 if ( !is_valid_signo(sig) ) 1e56c: e2460001 sub r0, r6, #1 ; 0x1 1e570: e350001f cmp r0, #31 ; 0x1f 1e574: 8afffff7 bhi 1e558 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1e578: e59f321c ldr r3, [pc, #540] ; 1e79c 1e57c: e3a0200c mov r2, #12 ; 0xc 1e580: e0233692 mla r3, r2, r6, r3 1e584: e5933008 ldr r3, [r3, #8] 1e588: e3530001 cmp r3, #1 ; 0x1 1e58c: 0a00007f beq 1e790 * 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 ) ) 1e590: e3560004 cmp r6, #4 ; 0x4 1e594: 13560008 cmpne r6, #8 ; 0x8 1e598: 0a000001 beq 1e5a4 1e59c: e356000b cmp r6, #11 ; 0xb 1e5a0: 1a000003 bne 1e5b4 return pthread_kill( pthread_self(), sig ); 1e5a4: eb000118 bl 1ea0c 1e5a8: e1a01006 mov r1, r6 1e5ac: eb0000db bl 1e920 1e5b0: ea000077 b 1e794 mask = signo_to_mask( sig ); 1e5b4: e3a03001 mov r3, #1 ; 0x1 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 1e5b8: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 1e5bc: e58d6000 str r6, [sp] siginfo->si_code = SI_USER; if ( !value ) { 1e5c0: e3550000 cmp r5, #0 ; 0x0 */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); mask = signo_to_mask( sig ); 1e5c4: e1a07013 lsl r7, r3, r0 1e5c8: e59f21d0 ldr r2, [pc, #464] ; 1e7a0 siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 1e5cc: 15953000 ldrne r3, [r5] 1e5d0: 158d3008 strne r3, [sp, #8] 1e5d4: e5923000 ldr r3, [r2] 1e5d8: 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; 1e5dc: 058d5008 streq r5, [sp, #8] 1e5e0: 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; 1e5e4: e59f31b8 ldr r3, [pc, #440] ; 1e7a4 1e5e8: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 1e5ec: e5903108 ldr r3, [r0, #264] 1e5f0: e59330c4 ldr r3, [r3, #196] 1e5f4: e1d73003 bics r3, r7, r3 1e5f8: 1a000046 bne 1e718 goto process_it; 1e5fc: e59f11a4 ldr r1, [pc, #420] ; 1e7a8 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 1e600: e281e030 add lr, r1, #48 ; 0x30 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 1e604: e1a0c001 mov ip, r1 1e608: e49c2004 ldr r2, [ip], #4 1e60c: ea000008 b 1e634 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)) { 1e610: e5923030 ldr r3, [r2, #48] 1e614: e1170003 tst r7, r3 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 1e618: e1a00002 mov r0, r2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1e61c: e5923108 ldr r3, [r2, #264] if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 1e620: 1a00003c bne 1e718 1e624: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 1e628: e1d73003 bics r3, r7, r3 <== NOT EXECUTED 1e62c: 1a000039 bne 1e718 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 1e630: 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 ) ; 1e634: e152000c cmp r2, ip 1e638: 1afffff4 bne 1e610 1e63c: e281100c add r1, r1, #12 ; 0xc */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 1e640: e151000e cmp r1, lr 1e644: 1affffee bne 1e604 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 1e648: e59f315c ldr r3, [pc, #348] ; 1e7ac 1e64c: e59f415c ldr r4, [pc, #348] ; 1e7b0 1e650: e5d33000 ldrb r3, [r3] 1e654: e3a00000 mov r0, #0 ; 0x0 1e658: e2835001 add r5, r3, #1 ; 0x1 for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 1e65c: e284900c add r9, r4, #12 ; 0xc the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 1e660: e5943008 ldr r3, [r4, #8] 1e664: e3530000 cmp r3, #0 ; 0x0 1e668: 0a000025 beq 1e704 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 1e66c: 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 ) 1e670: e3530000 cmp r3, #0 ; 0x0 continue; maximum = the_info->maximum; object_table = the_info->local_table; 1e674: 1593a01c ldrne sl, [r3, #28] * structure for a particular manager may not be installed. */ if ( !the_info ) continue; maximum = the_info->maximum; 1e678: 11d381b0 ldrhne r8, [r3, #16] object_table = the_info->local_table; 1e67c: 13a0e001 movne lr, #1 ; 0x1 /* * This cannot happen in the current (as of Dec 2007) implementation * of initialization but at some point, the object information * structure for a particular manager may not be installed. */ if ( !the_info ) 1e680: 1a00001d bne 1e6fc 1e684: ea00001e b 1e704 <== NOT EXECUTED maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 1e688: e79a210e ldr r2, [sl, lr, lsl #2] if ( !the_thread ) 1e68c: e3520000 cmp r2, #0 ; 0x0 1e690: 0a000014 beq 1e6e8 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 1e694: e592c014 ldr ip, [r2, #20] 1e698: e15c0005 cmp ip, r5 1e69c: 8a000011 bhi 1e6e8 /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1e6a0: e5923108 ldr r3, [r2, #264] if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 1e6a4: e3530000 cmp r3, #0 ; 0x0 1e6a8: 0a00000e beq 1e6e8 1e6ac: e59330c4 ldr r3, [r3, #196] 1e6b0: e1d73003 bics r3, r7, r3 1e6b4: 0a00000b beq 1e6e8 * 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 ) { 1e6b8: e15c0005 cmp ip, r5 1e6bc: 3a00000b bcc 1e6f0 * 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 ) ) 1e6c0: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED 1e6c4: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 1e6c8: 0a000006 beq 1e6e8 <== 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 ) ) { 1e6cc: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 1e6d0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1e6d4: 0a000005 beq 1e6f0 <== NOT EXECUTED * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 1e6d8: e3110201 tst r1, #268435456 ; 0x10000000 <== NOT EXECUTED 1e6dc: 1a000001 bne 1e6e8 <== 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 ) { 1e6e0: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED 1e6e4: 1a000001 bne 1e6f0 <== NOT EXECUTED 1e6e8: e1a0c005 mov ip, r5 1e6ec: ea000000 b 1e6f4 1e6f0: e1a00002 mov r0, r2 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 1e6f4: e28ee001 add lr, lr, #1 ; 0x1 1e6f8: e1a0500c mov r5, ip 1e6fc: e15e0008 cmp lr, r8 1e700: 9affffe0 bls 1e688 1e704: e2844004 add r4, r4, #4 ; 0x4 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 1e708: e1540009 cmp r4, r9 1e70c: 1affffd3 bne 1e660 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 1e710: e3500000 cmp r0, #0 ; 0x0 1e714: 0a000006 beq 1e734 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 1e718: e3a03001 mov r3, #1 ; 0x1 1e71c: 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 ) ) { 1e720: e1a01006 mov r1, r6 1e724: e1a0200d mov r2, sp 1e728: eb000035 bl 1e804 <_POSIX_signals_Unblock_thread> 1e72c: e3500000 cmp r0, #0 ; 0x0 1e730: 1a000015 bne 1e78c /* * 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 ); 1e734: e1a00007 mov r0, r7 1e738: eb00001f bl 1e7bc <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 1e73c: e3a0300c mov r3, #12 ; 0xc 1e740: e0040693 mul r4, r3, r6 1e744: e59f3050 ldr r3, [pc, #80] ; 1e79c 1e748: e7933004 ldr r3, [r3, r4] 1e74c: e3530002 cmp r3, #2 ; 0x2 1e750: 1a00000d bne 1e78c psiginfo = (POSIX_signals_Siginfo_node *) 1e754: e59f0058 ldr r0, [pc, #88] ; 1e7b4 1e758: ebffaad6 bl 92b8 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 1e75c: e250c000 subs ip, r0, #0 ; 0x0 1e760: 1a000002 bne 1e770 rtems_set_errno_and_return_minus_one( EAGAIN ); 1e764: ebffd3c5 bl 13680 <__errno> <== NOT EXECUTED 1e768: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED 1e76c: eaffff7b b 1e560 <== NOT EXECUTED } psiginfo->Info = *siginfo; 1e770: e89d0007 ldm sp, {r0, r1, r2} 1e774: e28c3008 add r3, ip, #8 ; 0x8 1e778: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 1e77c: e59f0034 ldr r0, [pc, #52] ; 1e7b8 1e780: e1a0100c mov r1, ip 1e784: e0800004 add r0, r0, r4 1e788: ebffaabf bl 928c <_Chain_Append> } _Thread_Enable_dispatch(); 1e78c: ebffb01a bl a7fc <_Thread_Enable_dispatch> 1e790: e3a00000 mov r0, #0 ; 0x0 return 0; } 1e794: e28dd00c add sp, sp, #12 ; 0xc 1e798: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 1e79c: 0002494c .word 0x0002494c 1e7a0: 0002438c .word 0x0002438c 1e7a4: 00024444 .word 0x00024444 1e7a8: 00024ad8 .word 0x00024ad8 1e7ac: 0001eb50 .word 0x0001eb50 1e7b0: 00024348 .word 0x00024348 1e7b4: 00024acc .word 0x00024acc 1e7b8: 00024b1c .word 0x00024b1c 0001c84c : int link( const char *existing, const char *new ) { 1c84c: e92d4070 push {r4, r5, r6, lr} 1c850: e24dd024 sub sp, sp, #36 ; 0x24 1c854: e1a04001 mov r4, r1 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true ); 1c858: e28d2010 add r2, sp, #16 ; 0x10 1c85c: e3a01000 mov r1, #0 ; 0x0 1c860: e3a03001 mov r3, #1 ; 0x1 1c864: ebff9cf7 bl 3c48 if ( result != 0 ) 1c868: e3500000 cmp r0, #0 ; 0x0 1c86c: 1a000024 bne 1c904 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 1c870: e5d43000 ldrb r3, [r4] 1c874: e353005c cmp r3, #92 ; 0x5c 1c878: 1353002f cmpne r3, #47 ; 0x2f 1c87c: 13a0e000 movne lr, #0 ; 0x0 1c880: 03a0e001 moveq lr, #1 ; 0x1 1c884: 0a000001 beq 1c890 1c888: e3530000 cmp r3, #0 ; 0x0 1c88c: 1a000006 bne 1c8ac 1c890: e59f31d4 ldr r3, [pc, #468] ; 1ca6c 1c894: e5933000 ldr r3, [r3] 1c898: e2833014 add r3, r3, #20 ; 0x14 1c89c: e893000f ldm r3, {r0, r1, r2, r3} 1c8a0: e88d000f stm sp, {r0, r1, r2, r3} 1c8a4: e3a02001 mov r2, #1 ; 0x1 1c8a8: ea000005 b 1c8c4 1c8ac: e59f31b8 ldr r3, [pc, #440] ; 1ca6c 1c8b0: e5933000 ldr r3, [r3] 1c8b4: e2833004 add r3, r3, #4 ; 0x4 1c8b8: e893000f ldm r3, {r0, r1, r2, r3} 1c8bc: e88d000f stm sp, {r0, r1, r2, r3} 1c8c0: e1a0200e mov r2, lr if ( !parent_loc.ops->evalformake_h ) { 1c8c4: e59d3008 ldr r3, [sp, #8] 1c8c8: e5933004 ldr r3, [r3, #4] 1c8cc: e3530000 cmp r3, #0 ; 0x0 1c8d0: 1a00000d bne 1c90c rtems_filesystem_freenode( &existing_loc ); 1c8d4: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED 1c8d8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1c8dc: 0a000005 beq 1c8f8 <== NOT EXECUTED 1c8e0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1c8e4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1c8e8: 0a000002 beq 1c8f8 <== NOT EXECUTED 1c8ec: e28d0010 add r0, sp, #16 ; 0x10 <== NOT EXECUTED 1c8f0: e1a0e00f mov lr, pc <== NOT EXECUTED 1c8f4: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1c8f8: eb0035e6 bl 2a098 <__errno> <== NOT EXECUTED 1c8fc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1c900: e5803000 str r3, [r0] 1c904: e3e04000 mvn r4, #0 ; 0x0 1c908: ea000054 b 1ca60 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 1c90c: e0840002 add r0, r4, r2 1c910: e1a0100d mov r1, sp 1c914: e28d2020 add r2, sp, #32 ; 0x20 1c918: e1a0e00f mov lr, pc 1c91c: e12fff13 bx r3 if ( result != 0 ) { 1c920: e2504000 subs r4, r0, #0 ; 0x0 if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 1c924: e1a0600d mov r6, sp if ( result != 0 ) { 1c928: 0a00000a beq 1c958 rtems_filesystem_freenode( &existing_loc ); 1c92c: e59d3018 ldr r3, [sp, #24] 1c930: e3530000 cmp r3, #0 ; 0x0 1c934: 0a000004 beq 1c94c 1c938: e593301c ldr r3, [r3, #28] 1c93c: e3530000 cmp r3, #0 ; 0x0 1c940: 128d0010 addne r0, sp, #16 ; 0x10 1c944: 11a0e00f movne lr, pc 1c948: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 1c94c: eb0035d1 bl 2a098 <__errno> 1c950: e5804000 str r4, [r0] 1c954: eaffffea b 1c904 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 1c958: e59d201c ldr r2, [sp, #28] 1c95c: e59d300c ldr r3, [sp, #12] 1c960: e1530002 cmp r3, r2 1c964: 0a000012 beq 1c9b4 rtems_filesystem_freenode( &existing_loc ); 1c968: e59d3018 ldr r3, [sp, #24] 1c96c: e3530000 cmp r3, #0 ; 0x0 1c970: 0a000004 beq 1c988 1c974: e593301c ldr r3, [r3, #28] 1c978: e3530000 cmp r3, #0 ; 0x0 1c97c: 128d0010 addne r0, sp, #16 ; 0x10 1c980: 11a0e00f movne lr, pc 1c984: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 1c988: e59d3008 ldr r3, [sp, #8] 1c98c: e3530000 cmp r3, #0 ; 0x0 1c990: 0a000004 beq 1c9a8 1c994: e593301c ldr r3, [r3, #28] 1c998: e3530000 cmp r3, #0 ; 0x0 1c99c: 11a0000d movne r0, sp 1c9a0: 11a0e00f movne lr, pc 1c9a4: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 1c9a8: eb0035ba bl 2a098 <__errno> 1c9ac: e3a03012 mov r3, #18 ; 0x12 1c9b0: eaffffd2 b 1c900 } if ( !parent_loc.ops->link_h ) { 1c9b4: e59d3008 ldr r3, [sp, #8] 1c9b8: e5933008 ldr r3, [r3, #8] 1c9bc: e3530000 cmp r3, #0 ; 0x0 1c9c0: 1a00000f bne 1ca04 rtems_filesystem_freenode( &existing_loc ); 1c9c4: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED 1c9c8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1c9cc: 0a000004 beq 1c9e4 <== NOT EXECUTED 1c9d0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1c9d4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1c9d8: 128d0010 addne r0, sp, #16 ; 0x10 <== NOT EXECUTED 1c9dc: 11a0e00f movne lr, pc <== NOT EXECUTED 1c9e0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 1c9e4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1c9e8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1c9ec: 0affffc1 beq 1c8f8 <== NOT EXECUTED 1c9f0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1c9f4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1c9f8: 11a0000d movne r0, sp <== NOT EXECUTED 1c9fc: 1affffbb bne 1c8f0 <== NOT EXECUTED 1ca00: eaffffbc b 1c8f8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 1ca04: e28d5010 add r5, sp, #16 ; 0x10 1ca08: e1a0100d mov r1, sp 1ca0c: e1a00005 mov r0, r5 1ca10: e59d2020 ldr r2, [sp, #32] 1ca14: e1a0e00f mov lr, pc 1ca18: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 1ca1c: e59d3018 ldr r3, [sp, #24] 1ca20: 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 ); 1ca24: e1a04000 mov r4, r0 rtems_filesystem_freenode( &existing_loc ); 1ca28: 0a000004 beq 1ca40 1ca2c: e593301c ldr r3, [r3, #28] 1ca30: e3530000 cmp r3, #0 ; 0x0 1ca34: 11a00005 movne r0, r5 1ca38: 11a0e00f movne lr, pc 1ca3c: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 1ca40: e59d3008 ldr r3, [sp, #8] 1ca44: e3530000 cmp r3, #0 ; 0x0 1ca48: 0a000004 beq 1ca60 1ca4c: e593301c ldr r3, [r3, #28] 1ca50: e3530000 cmp r3, #0 ; 0x0 1ca54: 11a0000d movne r0, sp 1ca58: 11a0e00f movne lr, pc 1ca5c: 112fff13 bxne r3 return result; } 1ca60: e1a00004 mov r0, r4 1ca64: e28dd024 add sp, sp, #36 ; 0x24 1ca68: e8bd8070 pop {r4, r5, r6, pc} 1ca6c: 0003c648 .word 0x0003c648 000138d0 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 138d0: e59f30c4 ldr r3, [pc, #196] ; 1399c 138d4: e5933000 ldr r3, [r3] 138d8: e1500003 cmp r0, r3 off_t lseek( int fd, off_t offset, int whence ) { 138dc: e92d4030 push {r4, r5, lr} 138e0: e1a0c002 mov ip, r2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 138e4: 2a000006 bcs 13904 iop = rtems_libio_iop( fd ); 138e8: e59f30b0 ldr r3, [pc, #176] ; 139a0 138ec: e5932000 ldr r2, [r3] 138f0: e3a03034 mov r3, #52 ; 0x34 138f4: e0242093 mla r4, r3, r0, r2 rtems_libio_check_is_open(iop); 138f8: e594300c ldr r3, [r4, #12] 138fc: e3130c01 tst r3, #256 ; 0x100 13900: 1a000002 bne 13910 13904: ebffdea3 bl b398 <__errno> <== NOT EXECUTED 13908: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 1390c: ea000017 b 13970 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 13910: e5943030 ldr r3, [r4, #48] 13914: e5933014 ldr r3, [r3, #20] 13918: e3530000 cmp r3, #0 ; 0x0 1391c: 1a000002 bne 1392c rtems_set_errno_and_return_minus_one( ENOTSUP ); 13920: ebffde9c bl b398 <__errno> <== NOT EXECUTED 13924: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 13928: ea000010 b 13970 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 1392c: e35c0001 cmp ip, #1 ; 0x1 /* * Now process the lseek(). */ old_offset = iop->offset; 13930: e5945008 ldr r5, [r4, #8] switch ( whence ) { 13934: 0a000005 beq 13950 13938: e35c0002 cmp ip, #2 ; 0x2 1393c: 0a000005 beq 13958 13940: e35c0000 cmp ip, #0 ; 0x0 case SEEK_SET: iop->offset = offset; 13944: 05841008 streq r1, [r4, #8] /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 13948: 0a00000b beq 1397c 1394c: ea000005 b 13968 case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 13950: e0813005 add r3, r1, r5 13954: ea000001 b 13960 break; case SEEK_END: iop->offset = iop->size + offset; 13958: e5943004 ldr r3, [r4, #4] 1395c: e0813003 add r3, r1, r3 13960: e5843008 str r3, [r4, #8] 13964: ea000004 b 1397c break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 13968: ebffde8a bl b398 <__errno> 1396c: e3a03016 mov r3, #22 ; 0x16 13970: e5803000 str r3, [r0] 13974: e3e00000 mvn r0, #0 ; 0x0 13978: e8bd8030 pop {r4, r5, pc} /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 1397c: e1a0200c mov r2, ip 13980: e5943030 ldr r3, [r4, #48] 13984: e1a00004 mov r0, r4 13988: e1a0e00f mov lr, pc 1398c: e593f014 ldr pc, [r3, #20] if ( status == (off_t) -1 ) 13990: e3700001 cmn r0, #1 ; 0x1 iop->offset = old_offset; 13994: 05845008 streq r5, [r4, #8] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 13998: e8bd8030 pop {r4, r5, pc} 1399c: 000143e4 .word 0x000143e4 139a0: 00016090 .word 0x00016090 0001cb60 : int _STAT_NAME( const char *path, struct stat *buf ) { 1cb60: e92d4030 push {r4, r5, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 1cb64: e2514000 subs r4, r1, #0 ; 0x0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 1cb68: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 1cb6c: 1a000002 bne 1cb7c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 1cb70: eb003548 bl 2a098 <__errno> <== NOT EXECUTED 1cb74: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 1cb78: ea000014 b 1cbd0 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 1cb7c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 1cb80: e1a0200d mov r2, sp <== NOT EXECUTED 1cb84: e1a03001 mov r3, r1 <== NOT EXECUTED 1cb88: ebff9c2e bl 3c48 <== NOT EXECUTED if ( status != 0 ) 1cb8c: 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 ); 1cb90: e1a0500d mov r5, sp <== NOT EXECUTED if ( status != 0 ) 1cb94: 1a00000e bne 1cbd4 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 1cb98: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 1cb9c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 1cba0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1cba4: 1a00000c bne 1cbdc <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1cba8: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1cbac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1cbb0: 0a000004 beq 1cbc8 <== NOT EXECUTED 1cbb4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1cbb8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1cbbc: 11a0000d movne r0, sp <== NOT EXECUTED 1cbc0: 11a0e00f movne lr, pc <== NOT EXECUTED 1cbc4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1cbc8: eb003532 bl 2a098 <__errno> <== NOT EXECUTED 1cbcc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1cbd0: e5803000 str r3, [r0] <== NOT EXECUTED 1cbd4: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 1cbd8: ea000011 b 1cc24 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 1cbdc: e1a01000 mov r1, r0 <== NOT EXECUTED 1cbe0: e3a0204c mov r2, #76 ; 0x4c <== NOT EXECUTED 1cbe4: e1a00004 mov r0, r4 <== NOT EXECUTED 1cbe8: eb003f32 bl 2c8b8 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 1cbec: e1a01004 mov r1, r4 <== NOT EXECUTED 1cbf0: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 1cbf4: e1a0000d mov r0, sp <== NOT EXECUTED 1cbf8: e1a0e00f mov lr, pc <== NOT EXECUTED 1cbfc: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1cc00: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1cc04: 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 ); 1cc08: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1cc0c: 0a000004 beq 1cc24 <== NOT EXECUTED 1cc10: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1cc14: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1cc18: 11a0000d movne r0, sp <== NOT EXECUTED 1cc1c: 11a0e00f movne lr, pc <== NOT EXECUTED 1cc20: 112fff13 bxne r3 <== NOT EXECUTED return status; } 1cc24: e1a00004 mov r0, r4 <== NOT EXECUTED 1cc28: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 1cc2c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00008c48 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8c48: e59f20cc ldr r2, [pc, #204] ; 8d1c 8c4c: e5923004 ldr r3, [r2, #4] 8c50: e2833001 add r3, r3, #1 ; 0x1 8c54: e92d4030 push {r4, r5, lr} 8c58: e5823004 str r3, [r2, #4] 8c5c: e1a05000 mov r5, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 8c60: ebffffef bl 8c24 /* * Validate the parameters */ if ( !size ) 8c64: e3550000 cmp r5, #0 ; 0x0 8c68: 0a000028 beq 8d10 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8c6c: e59f30ac ldr r3, [pc, #172] ; 8d20 8c70: e5933000 ldr r3, [r3] 8c74: e3530003 cmp r3, #3 ; 0x3 8c78: 1a000002 bne 8c88 8c7c: ebffffd1 bl 8bc8 8c80: e3500000 cmp r0, #0 ; 0x0 8c84: 0a000021 beq 8d10 * 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 ); 8c88: e59f0094 ldr r0, [pc, #148] ; 8d24 8c8c: e1a01005 mov r1, r5 8c90: eb000525 bl a12c <_Protected_heap_Allocate> if ( !return_this ) { 8c94: e2504000 subs r4, r0, #0 ; 0x0 8c98: 1a00000d bne 8cd4 if (rtems_malloc_sbrk_helpers) 8c9c: e59f3084 ldr r3, [pc, #132] ; 8d28 8ca0: e5933000 ldr r3, [r3] 8ca4: e3530000 cmp r3, #0 ; 0x0 8ca8: 0a000005 beq 8cc4 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 8cac: e1a00005 mov r0, r5 <== NOT EXECUTED 8cb0: e1a0e00f mov lr, pc <== NOT EXECUTED 8cb4: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 8cb8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED errno = ENOMEM; return (void *) 0; 8cbc: 11a04000 movne r4, r0 <== NOT EXECUTED return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { 8cc0: 1a000003 bne 8cd4 <== NOT EXECUTED errno = ENOMEM; 8cc4: eb0009b3 bl b398 <__errno> 8cc8: e3a0300c mov r3, #12 ; 0xc 8ccc: e5803000 str r3, [r0] 8cd0: ea00000f b 8d14 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 8cd4: e59f3050 ldr r3, [pc, #80] ; 8d2c 8cd8: e5933000 ldr r3, [r3] 8cdc: e3530000 cmp r3, #0 ; 0x0 (*rtems_malloc_dirty_helper)( return_this, size ); 8ce0: 11a01005 movne r1, r5 8ce4: 11a00004 movne r0, r4 8ce8: 11a0e00f movne lr, pc 8cec: 112fff13 bxne r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8cf0: e59f3038 ldr r3, [pc, #56] ; 8d30 8cf4: e5933000 ldr r3, [r3] 8cf8: e3530000 cmp r3, #0 ; 0x0 8cfc: 0a000004 beq 8d14 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 8d00: e1a00004 mov r0, r4 <== NOT EXECUTED 8d04: e1a0e00f mov lr, pc <== NOT EXECUTED 8d08: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED 8d0c: ea000000 b 8d14 <== NOT EXECUTED 8d10: e3a04000 mov r4, #0 ; 0x0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 8d14: e1a00004 mov r0, r4 8d18: e8bd8030 pop {r4, r5, pc} 8d1c: 000160f4 .word 0x000160f4 8d20: 000163b4 .word 0x000163b4 8d24: 0001609c .word 0x0001609c 8d28: 00015ec8 .word 0x00015ec8 8d2c: 00015ecc .word 0x00015ecc 8d30: 00015ec4 .word 0x00015ec4 00008c14 : } void malloc_deferred_free( void *pointer ) { 8c14: 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 ); 8c18: e59f0000 ldr r0, [pc, #0] ; 8c20 <== NOT EXECUTED 8c1c: eafff064 b 4db4 <_Chain_Append> <== NOT EXECUTED 8c20: 00016748 .word 0x00016748 00008c24 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 8c24: e52de004 push {lr} ; (str lr, [sp, #-4]!) 8c28: ea000000 b 8c30 /* * 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); 8c2c: ebfffeb8 bl 8714 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 8c30: e59f000c ldr r0, [pc, #12] ; 8c44 8c34: eb000401 bl 9c40 <_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) 8c38: e3500000 cmp r0, #0 ; 0x0 8c3c: 1afffffa bne 8c2c free(to_be_freed); } 8c40: e49df004 pop {pc} ; (ldr pc, [sp], #4) 8c44: 00016748 .word 0x00016748 000221b8 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 221b8: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 221bc: 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 ) 221c0: e5943050 ldr r3, [r4, #80] 221c4: e1510003 cmp r1, r3 int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 221c8: 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 ) 221cc: da000002 ble 221dc return IMFS_memfile_extend( the_jnode, length ); 221d0: e1a00004 mov r0, r4 <== NOT EXECUTED 221d4: ebffffad bl 22090 <== NOT EXECUTED 221d8: ea000007 b 221fc <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 221dc: e5841050 str r1, [r4, #80] iop->size = the_jnode->info.file.size; 221e0: e5801004 str r1, [r0, #4] IMFS_update_atime( the_jnode ); 221e4: e1a0000d mov r0, sp 221e8: e3a01000 mov r1, #0 ; 0x0 221ec: ebff870e bl 3e2c 221f0: e59d3000 ldr r3, [sp] 221f4: e5843040 str r3, [r4, #64] 221f8: e3a00000 mov r0, #0 ; 0x0 return 0; } 221fc: e28dd008 add sp, sp, #8 ; 0x8 22200: e8bd8010 pop {r4, pc} 00022204 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 22204: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 22208: e590402c ldr r4, [r0, #44] if (the_jnode->type == IMFS_LINEAR_FILE) { 2220c: e594304c ldr r3, [r4, #76] 22210: e3530006 cmp r3, #6 ; 0x6 off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 22214: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 22218: 1a000004 bne 22230 if (iop->offset > the_jnode->info.linearfile.size) 2221c: e5940050 ldr r0, [r4, #80] <== NOT EXECUTED 22220: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 22224: e1530000 cmp r3, r0 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 22228: c5850008 strgt r0, [r5, #8] <== NOT EXECUTED 2222c: ea00000b b 22260 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 22230: e1a00004 mov r0, r4 22234: e5951008 ldr r1, [r5, #8] 22238: ebffff94 bl 22090 2223c: e3500000 cmp r0, #0 ; 0x0 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 22240: 05943050 ldreq r3, [r4, #80] 22244: 05853004 streq r3, [r5, #4] if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 22248: 0a000004 beq 22260 rtems_set_errno_and_return_minus_one( ENOSPC ); 2224c: eb001f91 bl 2a098 <__errno> <== NOT EXECUTED 22250: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED 22254: e5803000 str r3, [r0] <== NOT EXECUTED 22258: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 2225c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED iop->size = the_jnode->info.file.size; } return iop->offset; 22260: e5950008 ldr r0, [r5, #8] } 22264: e8bd8030 pop {r4, r5, pc} 000224b8 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 224b8: e590300c ldr r3, [r0, #12] 224bc: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 224c0: e92d4030 push {r4, r5, lr} 224c4: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 224c8: e590402c ldr r4, [r0, #44] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 224cc: 0a000012 beq 2251c 224d0: e594304c ldr r3, [r4, #76] 224d4: e3530006 cmp r3, #6 ; 0x6 224d8: 1a00000f bne 2251c && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 224dc: 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; 224e0: 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; 224e4: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 224e8: 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; 224ec: e5942054 ldr r2, [r4, #84] <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 224f0: e584304c str r3, [r4, #76] <== NOT EXECUTED the_jnode->info.file.size = 0; 224f4: e5841050 str r1, [r4, #80] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 224f8: e5841058 str r1, [r4, #88] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 224fc: 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; 22500: e5841054 str r1, [r4, #84] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 22504: 0a000004 beq 2251c <== NOT EXECUTED 22508: e1a03000 mov r3, r0 <== NOT EXECUTED 2250c: e1a00004 mov r0, r4 <== NOT EXECUTED 22510: ebffff54 bl 22268 <== NOT EXECUTED 22514: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED 22518: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 2251c: e595300c ldr r3, [r5, #12] 22520: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 22524: 15943050 ldrne r3, [r4, #80] 22528: 15853008 strne r3, [r5, #8] iop->size = the_jnode->info.file.size; 2252c: e5943050 ldr r3, [r4, #80] 22530: e3a00000 mov r0, #0 ; 0x0 22534: e5853004 str r3, [r5, #4] return 0; } 22538: e8bd8030 pop {r4, r5, pc} 000015a4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 15a4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 15a8: e1a04001 mov r4, r1 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 15ac: e2111a0f ands r1, r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 15b0: e24dd018 sub sp, sp, #24 ; 0x18 15b4: e1a06000 mov r6, r0 15b8: e1a07002 mov r7, r2 15bc: 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) ) ) 15c0: 1a000002 bne 15d0 rtems_set_errno_and_return_minus_one( EINVAL ); 15c4: eb002773 bl b398 <__errno> <== NOT EXECUTED 15c8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 15cc: ea000003 b 15e0 <== NOT EXECUTED if ( S_ISFIFO(mode) ) 15d0: e3510a01 cmp r1, #4096 ; 0x1000 15d4: 1a000004 bne 15ec rtems_set_errno_and_return_minus_one( ENOTSUP ); 15d8: eb00276e bl b398 <__errno> 15dc: e3a03086 mov r3, #134 ; 0x86 15e0: e5803000 str r3, [r0] 15e4: e3e04000 mvn r4, #0 ; 0x0 15e8: ea00003d b 16e4 rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 15ec: e5d03000 ldrb r3, [r0] 15f0: e353005c cmp r3, #92 ; 0x5c 15f4: 1353002f cmpne r3, #47 ; 0x2f 15f8: 13a0e000 movne lr, #0 ; 0x0 15fc: 03a0e001 moveq lr, #1 ; 0x1 1600: 0a000001 beq 160c 1604: e3530000 cmp r3, #0 ; 0x0 1608: 1a000007 bne 162c 160c: e59f30dc ldr r3, [pc, #220] ; 16f0 1610: e5933000 ldr r3, [r3] 1614: e2833014 add r3, r3, #20 ; 0x14 1618: e893000f ldm r3, {r0, r1, r2, r3} 161c: e28dc004 add ip, sp, #4 ; 0x4 1620: e88c000f stm ip, {r0, r1, r2, r3} 1624: e3a02001 mov r2, #1 ; 0x1 1628: ea000006 b 1648 162c: e59f30bc ldr r3, [pc, #188] ; 16f0 1630: e5933000 ldr r3, [r3] 1634: e2833004 add r3, r3, #4 ; 0x4 1638: e893000f ldm r3, {r0, r1, r2, r3} 163c: e28dc004 add ip, sp, #4 ; 0x4 1640: e88c000f stm ip, {r0, r1, r2, r3} 1644: e1a0200e mov r2, lr if ( !temp_loc.ops->evalformake_h ) { 1648: e59d300c ldr r3, [sp, #12] 164c: e5933004 ldr r3, [r3, #4] 1650: e3530000 cmp r3, #0 ; 0x0 1654: 0affffdf beq 15d8 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 1658: e28d5004 add r5, sp, #4 ; 0x4 165c: e0860002 add r0, r6, r2 1660: e1a01005 mov r1, r5 1664: e28d2014 add r2, sp, #20 ; 0x14 1668: e1a0e00f mov lr, pc 166c: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 1670: e3500000 cmp r0, #0 ; 0x0 1674: 1affffda bne 15e4 return -1; if ( !temp_loc.ops->mknod_h ) { 1678: e59d300c ldr r3, [sp, #12] 167c: e593c014 ldr ip, [r3, #20] 1680: e35c0000 cmp ip, #0 ; 0x0 1684: 1a000006 bne 16a4 rtems_filesystem_freenode( &temp_loc ); 1688: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 168c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1690: 0affffd0 beq 15d8 <== NOT EXECUTED 1694: e1a00005 mov r0, r5 <== NOT EXECUTED 1698: e1a0e00f mov lr, pc <== NOT EXECUTED 169c: e12fff13 bx r3 <== NOT EXECUTED 16a0: eaffffcc b 15d8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 16a4: e1a01004 mov r1, r4 16a8: e1a03008 mov r3, r8 16ac: e58d5000 str r5, [sp] 16b0: e1a02007 mov r2, r7 16b4: e59d0014 ldr r0, [sp, #20] 16b8: e1a0e00f mov lr, pc 16bc: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 16c0: e59d300c ldr r3, [sp, #12] 16c4: 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 ); 16c8: e1a04000 mov r4, r0 rtems_filesystem_freenode( &temp_loc ); 16cc: 0a000004 beq 16e4 16d0: e593301c ldr r3, [r3, #28] 16d4: e3530000 cmp r3, #0 ; 0x0 16d8: 11a00005 movne r0, r5 16dc: 11a0e00f movne lr, pc 16e0: 112fff13 bxne r3 return result; } 16e4: e1a00004 mov r0, r4 16e8: e28dd018 add sp, sp, #24 ; 0x18 16ec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 16f0: 000149b8 .word 0x000149b8 00008d60 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 8d60: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 8d64: e2519000 subs r9, r1, #0 ; 0x0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 8d68: e24dd010 sub sp, sp, #16 ; 0x10 8d6c: e1a08000 mov r8, r0 8d70: e1a07002 mov r7, r2 8d74: e1a05003 mov r5, r3 8d78: e59d6030 ldr r6, [sp, #48] /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 8d7c: 0a000001 beq 8d88 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 8d80: e3520001 cmp r2, #1 ; 0x1 8d84: 9a000002 bls 8d94 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 8d88: eb000982 bl b398 <__errno> 8d8c: e3a03016 mov r3, #22 ; 0x16 8d90: ea000015 b 8dec return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 8d94: e5994024 ldr r4, [r9, #36] 8d98: e3540000 cmp r4, #0 ; 0x0 8d9c: 1a000005 bne 8db8 errno = ENOTSUP; 8da0: eb00097c bl b398 <__errno> <== NOT EXECUTED 8da4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8da8: e1a0a004 mov sl, r4 <== NOT EXECUTED 8dac: e5803000 str r3, [r0] <== NOT EXECUTED 8db0: e1a05004 mov r5, r4 <== NOT EXECUTED 8db4: ea000064 b 8f4c <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 8db8: e3530000 cmp r3, #0 ; 0x0 8dbc: 03a00064 moveq r0, #100 ; 0x64 8dc0: 0a000002 beq 8dd0 size += strlen( device ) + 1; 8dc4: e1a00003 mov r0, r3 <== NOT EXECUTED 8dc8: eb000ea8 bl c870 <== NOT EXECUTED 8dcc: e2800065 add r0, r0, #101 ; 0x65 <== NOT EXECUTED temp_mt_entry = malloc( size ); 8dd0: ebffff9c bl 8c48 if ( !temp_mt_entry ) { 8dd4: e3500000 cmp r0, #0 ; 0x0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 8dd8: e1a04000 mov r4, r0 8ddc: e1a0a000 mov sl, r0 if ( !temp_mt_entry ) { 8de0: 1a000003 bne 8df4 errno = ENOMEM; 8de4: eb00096b bl b398 <__errno> <== NOT EXECUTED 8de8: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED 8dec: e5803000 str r3, [r0] 8df0: ea000061 b 8f7c return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 8df4: 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; 8df8: e5807028 str r7, [r0, #40] if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 8dfc: 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; 8e00: 05805060 streq r5, [r0, #96] } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 8e04: 12803064 addne r3, r0, #100 ; 0x64 (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 8e08: 11a00003 movne r0, r3 8e0c: 11a01005 movne r1, r5 } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 8e10: 15843060 strne r3, [r4, #96] (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 8e14: 1b000e67 blne c7b8 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 8e18: e3560000 cmp r6, #0 ; 0x0 8e1c: 0a00002c beq 8ed4 if ( rtems_filesystem_evaluate_path( 8e20: e1a00006 mov r0, r6 8e24: e3a01007 mov r1, #7 ; 0x7 8e28: e1a0200d mov r2, sp 8e2c: e3a03001 mov r3, #1 ; 0x1 8e30: ebffe130 bl 12f8 8e34: e3700001 cmn r0, #1 ; 0x1 8e38: 0a000042 beq 8f48 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 8e3c: e59d3008 ldr r3, [sp, #8] 8e40: e5933010 ldr r3, [r3, #16] 8e44: e3530000 cmp r3, #0 ; 0x0 8e48: 0a000017 beq 8eac /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 8e4c: e1a0000d mov r0, sp 8e50: e1a0e00f mov lr, pc 8e54: e12fff13 bx r3 8e58: e3500001 cmp r0, #1 ; 0x1 8e5c: 0a000004 beq 8e74 errno = ENOTDIR; 8e60: eb00094c bl b398 <__errno> 8e64: e3a03014 mov r3, #20 ; 0x14 8e68: e5803000 str r3, [r0] 8e6c: e1a0500d mov r5, sp 8e70: ea000035 b 8f4c /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 8e74: e59f1134 ldr r1, [pc, #308] ; 8fb0 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 8e78: e59d0000 ldr r0, [sp] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 8e7c: e4912004 ldr r2, [r1], #4 8e80: ea000003 b 8e94 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 8e84: e5923018 ldr r3, [r2, #24] 8e88: e1530000 cmp r3, r0 8e8c: 0a000003 beq 8ea0 * 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 ) { 8e90: 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 ); 8e94: e1520001 cmp r2, r1 8e98: 1afffff9 bne 8e84 8e9c: ea000039 b 8f88 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 8ea0: eb00093c bl b398 <__errno> 8ea4: e3a03010 mov r3, #16 ; 0x10 8ea8: eaffffee b 8e68 * 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; 8eac: eb000939 bl b398 <__errno> <== NOT EXECUTED 8eb0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8eb4: eaffffeb b 8e68 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 8eb8: e1a00004 mov r0, r4 8ebc: e1a0e00f mov lr, pc 8ec0: e12fff11 bx r1 8ec4: e3500000 cmp r0, #0 ; 0x0 8ec8: 01a0500d moveq r5, sp 8ecc: 0a000008 beq 8ef4 8ed0: eaffffe5 b 8e6c <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 8ed4: e5846018 str r6, [r4, #24] temp_mt_entry->mt_fs_root.handlers = NULL; 8ed8: e584601c str r6, [r4, #28] temp_mt_entry->mt_fs_root.ops = NULL; 8edc: e5846020 str r6, [r4, #32] temp_mt_entry->mt_point_node.node_access = NULL; 8ee0: e5846008 str r6, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 8ee4: e584600c str r6, [r4, #12] temp_mt_entry->mt_point_node.ops = NULL; 8ee8: e5846010 str r6, [r4, #16] temp_mt_entry->mt_point_node.mt_entry = NULL; 8eec: e5846014 str r6, [r4, #20] 8ef0: e1a05006 mov r5, r6 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 8ef4: e1a00004 mov r0, r4 8ef8: e1a0e00f mov lr, pc 8efc: e599f024 ldr pc, [r9, #36] 8f00: e2506000 subs r6, r0, #0 ; 0x0 8f04: 0a000007 beq 8f28 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 8f08: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 8f0c: e5933028 ldr r3, [r3, #40] <== NOT EXECUTED 8f10: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 8f14: 0a00000c beq 8f4c <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 8f18: e1a00004 mov r0, r4 <== NOT EXECUTED 8f1c: e1a0e00f mov lr, pc <== NOT EXECUTED 8f20: e12fff13 bx r3 <== NOT EXECUTED 8f24: ea000008 b 8f4c <== 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 ); 8f28: e59f0080 ldr r0, [pc, #128] ; 8fb0 8f2c: e1a01004 mov r1, r4 8f30: ebffef9f bl 4db4 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 8f34: e3580000 cmp r8, #0 ; 0x0 8f38: 01a00008 moveq r0, r8 *mt_entry = temp_mt_entry; 8f3c: 15884000 strne r4, [r8] 8f40: 11a00006 movne r0, r6 8f44: ea00000d b 8f80 8f48: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 8f4c: e1a0000a mov r0, sl 8f50: ebfffdef bl 8714 if ( loc_to_free ) 8f54: e3550000 cmp r5, #0 ; 0x0 8f58: 0a000007 beq 8f7c rtems_filesystem_freenode( loc_to_free ); 8f5c: e5953008 ldr r3, [r5, #8] 8f60: e3530000 cmp r3, #0 ; 0x0 8f64: 0a000004 beq 8f7c 8f68: e593301c ldr r3, [r3, #28] 8f6c: e3530000 cmp r3, #0 ; 0x0 8f70: 11a00005 movne r0, r5 8f74: 11a0e00f movne lr, pc 8f78: 112fff13 bxne r3 8f7c: e3e00000 mvn r0, #0 ; 0x0 return -1; } 8f80: e28dd010 add sp, sp, #16 ; 0x10 8f84: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 8f88: e99d000c ldmib sp, {r2, r3} /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 8f8c: e5931020 ldr r1, [r3, #32] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 8f90: 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; 8f94: e59d200c ldr r2, [sp, #12] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 8f98: e3510000 cmp r1, #0 ; 0x0 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 8f9c: e5840008 str r0, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 8fa0: e5842014 str r2, [r4, #20] * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 8fa4: 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 ){ 8fa8: 1affffc2 bne 8eb8 8fac: eaffffbe b 8eac <== NOT EXECUTED 8fb0: 00016754 .word 0x00016754 0000f24c : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { f24c: e92d4070 push {r4, r5, r6, lr} f250: e1a06001 mov r6, r1 f254: e1a04000 mov r4, r0 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) f258: eb0006fa bl 10e48 <_Timespec_Is_valid> f25c: e3500000 cmp r0, #0 ; 0x0 f260: 0a000005 beq f27c * 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 ) f264: e5943000 ldr r3, [r4] f268: e3530000 cmp r3, #0 ; 0x0 f26c: ba000002 blt f27c f270: e5943004 ldr r3, [r4, #4] f274: e3530000 cmp r3, #0 ; 0x0 f278: aa000002 bge f288 rtems_set_errno_and_return_minus_one( EINVAL ); f27c: eb0010ff bl 13680 <__errno> f280: e3a03016 mov r3, #22 ; 0x16 f284: ea000031 b f350 ticks = _Timespec_To_ticks( rqtp ); f288: e1a00004 mov r0, r4 f28c: eb0006fd bl 10e88 <_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 ) { f290: e2505000 subs r5, r0, #0 ; 0x0 f294: e59f20c8 ldr r2, [pc, #200] ; f364 f298: 1a00000a bne f2c8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; f29c: e5923000 ldr r3, [r2] f2a0: e2833001 add r3, r3, #1 ; 0x1 f2a4: e5823000 str r3, [r2] _Thread_Disable_dispatch(); _Thread_Yield_processor(); f2a8: ebfff0b1 bl b574 <_Thread_Yield_processor> _Thread_Enable_dispatch(); f2ac: ebffed52 bl a7fc <_Thread_Enable_dispatch> if ( rmtp ) { f2b0: e3560000 cmp r6, #0 ; 0x0 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; f2b4: 15865004 strne r5, [r6, #4] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; f2b8: 15865000 strne r5, [r6] rmtp->tv_nsec = 0; f2bc: 11a00005 movne r0, r5 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { f2c0: 18bd8070 popne {r4, r5, r6, pc} f2c4: ea000024 b f35c <== NOT EXECUTED f2c8: e5923000 ldr r3, [r2] f2cc: e2833001 add r3, r3, #1 ; 0x1 f2d0: e5823000 str r3, [r2] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( f2d4: e59f408c ldr r4, [pc, #140] ; f368 f2d8: e3a01281 mov r1, #268435464 ; 0x10000008 f2dc: e5940000 ldr r0, [r4] f2e0: ebffefb8 bl b1c8 <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( f2e4: e5943000 ldr r3, [r4] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; f2e8: e59f207c ldr r2, [pc, #124] ; f36c f2ec: e5931008 ldr r1, [r3, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; f2f0: e3a00000 mov r0, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; f2f4: e5831068 str r1, [r3, #104] the_watchdog->user_data = user_data; f2f8: e583006c str r0, [r3, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; f2fc: e5830050 str r0, [r3, #80] the_watchdog->routine = routine; f300: e5832064 str r2, [r3, #100] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); f304: e2831048 add r1, r3, #72 ; 0x48 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; f308: e5835054 str r5, [r3, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); f30c: e59f005c ldr r0, [pc, #92] ; f370 f310: ebfff1a9 bl b9bc <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); f314: ebffed38 bl a7fc <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { f318: e3560000 cmp r6, #0 ; 0x0 f31c: 0a00000e beq f35c ticks -= f320: e5943000 ldr r3, [r4] f324: e283205c add r2, r3, #92 ; 0x5c f328: e8920014 ldm r2, {r2, r4} f32c: e0424004 sub r4, r2, r4 f330: e0844005 add r4, r4, r5 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); f334: e1a01006 mov r1, r6 f338: e1a00004 mov r0, r4 f33c: eb0006af bl 10e00 <_Timespec_From_ticks> /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) f340: e3540000 cmp r4, #0 ; 0x0 f344: 0a000004 beq f35c rtems_set_errno_and_return_minus_one( EINTR ); f348: eb0010cc bl 13680 <__errno> f34c: e3a03004 mov r3, #4 ; 0x4 f350: e5803000 str r3, [r0] f354: e3e00000 mvn r0, #0 ; 0x0 f358: e8bd8070 pop {r4, r5, r6, pc} f35c: e3a00000 mov r0, #0 ; 0x0 } return 0; } f360: e8bd8070 pop {r4, r5, r6, pc} f364: 0002438c .word 0x0002438c f368: 00024444 .word 0x00024444 f36c: 0000a670 .word 0x0000a670 f370: 00024464 .word 0x00024464 00001780 : */ int newlib_free_buffers( FILE *fp ) { 1780: e92d4010 push {r4, lr} 1784: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 1788: eb0027cf bl b6cc 178c: e3500002 cmp r0, #2 ; 0x2 1790: 8a00000b bhi 17c4 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 1794: e1d430bc ldrh r3, [r4, #12] 1798: e3130080 tst r3, #128 ; 0x80 179c: 0a00000a beq 17cc free( fp->_bf._base ); 17a0: e5940010 ldr r0, [r4, #16] 17a4: eb001bda bl 8714 fp->_flags &= ~__SMBF; 17a8: e1d430bc ldrh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 17ac: e3a02000 mov r2, #0 ; 0x0 case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 17b0: e3c33080 bic r3, r3, #128 ; 0x80 fp->_bf._base = fp->_p = (unsigned char *) NULL; 17b4: e5842010 str r2, [r4, #16] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 17b8: e1c430bc strh r3, [r4, #12] fp->_bf._base = fp->_p = (unsigned char *) NULL; 17bc: e5842000 str r2, [r4] 17c0: ea000001 b 17cc } break; default: fclose(fp); 17c4: e1a00004 mov r0, r4 <== NOT EXECUTED 17c8: eb002743 bl b4dc <== NOT EXECUTED } return 0; } 17cc: e3a00000 mov r0, #0 ; 0x0 17d0: e8bd8010 pop {r4, pc} 000019c4 : int open( const char *pathname, int flags, ... ) { 19c4: e92d000e push {r1, r2, r3} 19c8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 19cc: e24dd010 sub sp, sp, #16 ; 0x10 19d0: e59da030 ldr sl, [sp, #48] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 19d4: e28a3001 add r3, sl, #1 ; 0x1 if ( ( status & _FREAD ) == _FREAD ) 19d8: e2132001 ands r2, r3, #1 ; 0x1 19dc: 01a04002 moveq r4, r2 19e0: 13a04004 movne r4, #4 ; 0x4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 19e4: e3130002 tst r3, #2 ; 0x2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 19e8: 13844002 orrne r4, r4, #2 ; 0x2 int open( const char *pathname, int flags, ... ) { 19ec: e1a08000 mov r8, r0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 19f0: e59d9034 ldr r9, [sp, #52] * 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(); 19f4: eb001c33 bl 8ac8 if ( iop == 0 ) { 19f8: e2507000 subs r7, r0, #0 ; 0x0 19fc: 03a06017 moveq r6, #23 ; 0x17 1a00: 0a00006b beq 1bb4 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1a04: e1a01004 mov r1, r4 1a08: e1a00008 mov r0, r8 1a0c: e1a0200d mov r2, sp 1a10: e3a03001 mov r3, #1 ; 0x1 1a14: ebfffe37 bl 12f8 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 1a18: e3700001 cmn r0, #1 ; 0x1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1a1c: e1a0500d mov r5, sp pathname, eval_flags, &loc, true ); if ( status == -1 ) { 1a20: 1a00001a bne 1a90 if ( errno != ENOENT ) { 1a24: eb00265b bl b398 <__errno> 1a28: e5900000 ldr r0, [r0] 1a2c: e3500002 cmp r0, #2 ; 0x2 1a30: 1a00000a bne 1a60 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1a34: e21a3c02 ands r3, sl, #512 ; 0x200 1a38: 01a06000 moveq r6, r0 1a3c: 01a04003 moveq r4, r3 1a40: 0a00004e beq 1b80 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1a44: e1a00008 mov r0, r8 1a48: e3891902 orr r1, r9, #32768 ; 0x8000 1a4c: e3a02000 mov r2, #0 ; 0x0 1a50: e3a03000 mov r3, #0 ; 0x0 1a54: ebfffed2 bl 15a4 if ( rc ) { 1a58: e2504000 subs r4, r0, #0 ; 0x0 1a5c: 0a000002 beq 1a6c rc = errno; 1a60: eb00264c bl b398 <__errno> 1a64: e5906000 ldr r6, [r0] 1a68: ea000041 b 1b74 goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true ); 1a6c: e1a0200d mov r2, sp 1a70: e1a00008 mov r0, r8 1a74: e1a01004 mov r1, r4 1a78: e3a03001 mov r3, #1 ; 0x1 1a7c: ebfffe1d bl 12f8 if ( status != 0 ) { /* The file did not exist */ 1a80: e3500000 cmp r0, #0 ; 0x0 1a84: 13a0600d movne r6, #13 ; 0xd 1a88: 1a00003c bne 1b80 1a8c: ea000004 b 1aa4 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1a90: e20a3c0a and r3, sl, #2560 ; 0xa00 1a94: e3530c0a cmp r3, #2560 ; 0xa00 1a98: 01a0400d moveq r4, sp 1a9c: 03a06011 moveq r6, #17 ; 0x11 1aa0: 0a000036 beq 1b80 * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; 1aa4: e28d5010 add r5, sp, #16 ; 0x10 1aa8: e5353010 ldr r3, [r5, #-16]! 1aac: e587302c str r3, [r7, #44] /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1ab0: e59d3004 ldr r3, [sp, #4] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1ab4: e1a0000a mov r0, sl /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1ab8: e5873030 str r3, [r7, #48] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1abc: e597400c ldr r4, [r7, #12] 1ac0: eb001c33 bl 8b94 iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 1ac4: e5973030 ldr r3, [r7, #48] 1ac8: e5936000 ldr r6, [r3] * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1acc: e1804004 orr r4, r0, r4 iop->pathinfo = loc; 1ad0: e895000f ldm r5, {r0, r1, r2, r3} 1ad4: e287c010 add ip, r7, #16 ; 0x10 if ( !iop->handlers->open_h ) { 1ad8: e3560000 cmp r6, #0 ; 0x0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1adc: 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 ); 1ae0: e587400c str r4, [r7, #12] iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 1ae4: 0a000040 beq 1bec rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 1ae8: e1a01008 mov r1, r8 1aec: e1a03009 mov r3, r9 1af0: e1a00007 mov r0, r7 1af4: e1a0200a mov r2, sl 1af8: e1a0e00f mov lr, pc 1afc: e12fff16 bx r6 if ( rc ) 1b00: e2506000 subs r6, r0, #0 ; 0x0 1b04: 11a0400d movne r4, sp 1b08: 1a00001c bne 1b80 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1b0c: e31a0b01 tst sl, #1024 ; 0x400 1b10: 0a00002b beq 1bc4 rc = ftruncate( iop - rtems_libio_iops, 0 ); 1b14: e59f30dc ldr r3, [pc, #220] ; 1bf8 1b18: e5933000 ldr r3, [r3] 1b1c: e59f20d8 ldr r2, [pc, #216] ; 1bfc 1b20: e0633007 rsb r3, r3, r7 1b24: e1a03143 asr r3, r3, #2 1b28: e1a01006 mov r1, r6 1b2c: e0000392 mul r0, r2, r3 1b30: eb001b1f bl 87b4 if ( rc ) { 1b34: e2506000 subs r6, r0, #0 ; 0x0 1b38: 0a000021 beq 1bc4 if(errno) rc = errno; 1b3c: eb002615 bl b398 <__errno> <== NOT EXECUTED 1b40: e5903000 ldr r3, [r0] <== NOT EXECUTED 1b44: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1b48: 0a000001 beq 1b54 <== NOT EXECUTED 1b4c: eb002611 bl b398 <__errno> <== NOT EXECUTED 1b50: e5906000 ldr r6, [r0] <== NOT EXECUTED close( iop - rtems_libio_iops ); 1b54: e59f309c ldr r3, [pc, #156] ; 1bf8 <== NOT EXECUTED 1b58: e5933000 ldr r3, [r3] <== NOT EXECUTED 1b5c: e59f2098 ldr r2, [pc, #152] ; 1bfc <== NOT EXECUTED 1b60: e0633007 rsb r3, r3, r7 <== NOT EXECUTED 1b64: e1a03143 asr r3, r3, #2 <== NOT EXECUTED 1b68: e0000392 mul r0, r2, r3 <== NOT EXECUTED 1b6c: eb001abe bl 866c <== NOT EXECUTED 1b70: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 1b74: e3560000 cmp r6, #0 ; 0x0 1b78: 0a000011 beq 1bc4 1b7c: e3a04000 mov r4, #0 ; 0x0 if ( iop ) 1b80: e3570000 cmp r7, #0 ; 0x0 rtems_libio_free( iop ); 1b84: 11a00007 movne r0, r7 1b88: 1b001bb7 blne 8a6c if ( loc_to_free ) 1b8c: e3540000 cmp r4, #0 ; 0x0 1b90: 0a000007 beq 1bb4 rtems_filesystem_freenode( loc_to_free ); 1b94: e5943008 ldr r3, [r4, #8] 1b98: e3530000 cmp r3, #0 ; 0x0 1b9c: 0a000004 beq 1bb4 1ba0: e593301c ldr r3, [r3, #28] 1ba4: e3530000 cmp r3, #0 ; 0x0 1ba8: 11a00004 movne r0, r4 1bac: 11a0e00f movne lr, pc 1bb0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 1bb4: eb0025f7 bl b398 <__errno> 1bb8: e5806000 str r6, [r0] 1bbc: e3e00000 mvn r0, #0 ; 0x0 1bc0: ea000005 b 1bdc } return iop - rtems_libio_iops; 1bc4: e59f302c ldr r3, [pc, #44] ; 1bf8 1bc8: e5933000 ldr r3, [r3] 1bcc: e59f2028 ldr r2, [pc, #40] ; 1bfc 1bd0: e0633007 rsb r3, r3, r7 1bd4: e1a03143 asr r3, r3, #2 1bd8: e0000392 mul r0, r2, r3 } 1bdc: e28dd010 add sp, sp, #16 ; 0x10 1be0: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 1be4: e28dd00c add sp, sp, #12 ; 0xc 1be8: e12fff1e bx lr if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1bec: e1a0400d mov r4, sp <== NOT EXECUTED 1bf0: e3a06086 mov r6, #134 ; 0x86 <== NOT EXECUTED 1bf4: eaffffe1 b 1b80 <== NOT EXECUTED 1bf8: 00016090 .word 0x00016090 1bfc: c4ec4ec5 .word 0xc4ec4ec5 00001960 : int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1960: e3a01000 mov r1, #0 ; 0x0 /* * This is a replaceable stub */ void open_dev_console(void) { 1964: 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) { 1968: e59f0048 ldr r0, [pc, #72] ; 19b8 196c: e1a02001 mov r2, r1 1970: eb000013 bl 19c4 1974: e3700001 cmn r0, #1 ; 0x1 1978: 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) 197c: e59f0034 ldr r0, [pc, #52] ; 19b8 1980: e3a01001 mov r1, #1 ; 0x1 1984: e3a02000 mov r2, #0 ; 0x0 1988: eb00000d bl 19c4 198c: e3700001 cmn r0, #1 ; 0x1 rtems_fatal_error_occurred( error_code | '1' ); 1990: 059f0024 ldreq r0, [pc, #36] ; 19bc /* * 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) 1994: 0a000006 beq 19b4 rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1998: e59f0018 ldr r0, [pc, #24] ; 19b8 199c: e3a01001 mov r1, #1 ; 0x1 19a0: e3a02000 mov r2, #0 ; 0x0 19a4: eb000006 bl 19c4 19a8: e3700001 cmn r0, #1 ; 0x1 19ac: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( error_code | '2' ); 19b0: e59f0008 ldr r0, [pc, #8] ; 19c0 <== NOT EXECUTED 19b4: eb000c11 bl 4a00 <== NOT EXECUTED 19b8: 00015985 .word 0x00015985 19bc: 53544431 .word 0x53544431 19c0: 53544432 .word 0x53544432 0001cdc8 : * open a directory. */ DIR * opendir( const char *name ) { 1cdc8: e92d4030 push {r4, r5, lr} register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 1cdcc: e3a01000 mov r1, #0 ; 0x0 1cdd0: ebff9f82 bl 4be0 1cdd4: e3700001 cmn r0, #1 ; 0x1 1cdd8: e1a05000 mov r5, r0 1cddc: 0a00000a beq 1ce0c return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 1cde0: e3a01002 mov r1, #2 ; 0x2 1cde4: e3a02001 mov r2, #1 ; 0x1 1cde8: eb002b04 bl 27a00 1cdec: e3700001 cmn r0, #1 ; 0x1 1cdf0: 0a000003 beq 1ce04 1cdf4: e3a00018 mov r0, #24 ; 0x18 1cdf8: ebff9d5e bl 4378 1cdfc: e2504000 subs r4, r0, #0 ; 0x0 1ce00: 1a000003 bne 1ce14 (dirp = (DIR *)malloc(sizeof(DIR))) == NULL) { close (fd); 1ce04: e1a00005 mov r0, r5 <== NOT EXECUTED 1ce08: ebff9b3d bl 3b04 <== NOT EXECUTED 1ce0c: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED 1ce10: ea00000f b 1ce54 <== NOT EXECUTED * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 1ce14: e3a00c02 mov r0, #512 ; 0x200 1ce18: ebff9d56 bl 4378 dirp->dd_len = 512; 1ce1c: e3a03c02 mov r3, #512 ; 0x200 if (dirp->dd_buf == NULL) { 1ce20: e3500000 cmp r0, #0 ; 0x0 * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 1ce24: e1a02000 mov r2, r0 dirp->dd_len = 512; 1ce28: e5843010 str r3, [r4, #16] * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 1ce2c: e584000c str r0, [r4, #12] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 1ce30: 1a000003 bne 1ce44 close (fd); 1ce34: e1a00005 mov r0, r5 <== NOT EXECUTED 1ce38: e1a04002 mov r4, r2 <== NOT EXECUTED 1ce3c: ebff9b30 bl 3b04 <== NOT EXECUTED 1ce40: ea000003 b 1ce54 <== NOT EXECUTED return NULL; } dirp->dd_fd = fd; dirp->dd_loc = 0; 1ce44: e3a03000 mov r3, #0 ; 0x0 if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; 1ce48: e5845000 str r5, [r4] dirp->dd_loc = 0; dirp->dd_seek = 0; 1ce4c: e5843014 str r3, [r4, #20] if (dirp->dd_buf == NULL) { close (fd); return NULL; } dirp->dd_fd = fd; dirp->dd_loc = 0; 1ce50: e5843004 str r3, [r4, #4] dirp->dd_seek = 0; /* * Set up seek point for rewinddir. */ return dirp; } 1ce54: e1a00004 mov r0, r4 1ce58: e8bd8030 pop {r4, r5, pc} 000025c0 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 25c0: e92d4010 push {r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 25c4: e5912034 ldr r2, [r1, #52] /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 25c8: e24dd004 sub sp, sp, #4 ; 0x4 int i; if (tty->termios.c_oflag & OPOST) { 25cc: e3120001 tst r2, #1 ; 0x1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 25d0: e1a04001 mov r4, r1 25d4: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 25d8: 0a000044 beq 26f0 switch (c) { 25dc: e5dd1000 ldrb r1, [sp] 25e0: e2413008 sub r3, r1, #8 ; 0x8 25e4: e3530005 cmp r3, #5 ; 0x5 25e8: 979ff103 ldrls pc, [pc, r3, lsl #2] 25ec: ea00002d b 26a8 25f0: 00002694 .word 0x00002694 <== NOT EXECUTED 25f4: 00002668 .word 0x00002668 <== NOT EXECUTED 25f8: 00002608 .word 0x00002608 <== NOT EXECUTED 25fc: 000026a8 .word 0x000026a8 <== NOT EXECUTED 2600: 000026a8 .word 0x000026a8 <== NOT EXECUTED 2604: 00002634 .word 0x00002634 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 2608: e3120020 tst r2, #32 ; 0x20 tty->column = 0; 260c: 13a03000 movne r3, #0 ; 0x0 2610: 15843028 strne r3, [r4, #40] if (tty->termios.c_oflag & ONLCR) { 2614: e5943034 ldr r3, [r4, #52] 2618: e3130004 tst r3, #4 ; 0x4 261c: 0a000033 beq 26f0 rtems_termios_puts ("\r", 1, tty); 2620: e59f00e0 ldr r0, [pc, #224] ; 2708 2624: e3a01001 mov r1, #1 ; 0x1 2628: e1a02004 mov r2, r4 262c: ebffff9f bl 24b0 2630: ea00000a b 2660 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 2634: e3120010 tst r2, #16 ; 0x10 <== NOT EXECUTED 2638: 0a000002 beq 2648 <== NOT EXECUTED 263c: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2640: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2644: 0a00002d beq 2700 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2648: e2123008 ands r3, r2, #8 ; 0x8 <== NOT EXECUTED 264c: 0a000026 beq 26ec <== NOT EXECUTED c = '\n'; 2650: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 2654: 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'; 2658: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 265c: 0a000023 beq 26f0 <== NOT EXECUTED tty->column = 0; 2660: e3a03000 mov r3, #0 ; 0x0 2664: ea000020 b 26ec } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 2668: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 266c: e2022b06 and r2, r2, #6144 ; 0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 2670: e2031007 and r1, r3, #7 ; 0x7 <== NOT EXECUTED 2674: e2611008 rsb r1, r1, #8 ; 0x8 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 2678: e3520b06 cmp r2, #6144 ; 0x1800 <== NOT EXECUTED 267c: e0813003 add r3, r1, r3 <== NOT EXECUTED 2680: 1a000019 bne 26ec <== NOT EXECUTED tty->column += i; 2684: e5843028 str r3, [r4, #40] <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 2688: e1a02004 mov r2, r4 <== NOT EXECUTED 268c: e59f0078 ldr r0, [pc, #120] ; 270c <== NOT EXECUTED 2690: ea000019 b 26fc <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 2694: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED 2698: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->column--; 269c: c2433001 subgt r3, r3, #1 ; 0x1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 26a0: ca000011 bgt 26ec <== NOT EXECUTED 26a4: ea000011 b 26f0 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 26a8: e3120002 tst r2, #2 ; 0x2 26ac: 0a000006 beq 26cc c = toupper(c); 26b0: e59f3058 ldr r3, [pc, #88] ; 2710 <== NOT EXECUTED 26b4: e5933000 ldr r3, [r3] <== NOT EXECUTED 26b8: e7d33001 ldrb r3, [r3, r1] <== NOT EXECUTED 26bc: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 26c0: e1a02001 mov r2, r1 <== NOT EXECUTED 26c4: 12412020 subne r2, r1, #32 ; 0x20 <== NOT EXECUTED 26c8: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 26cc: e59f303c ldr r3, [pc, #60] ; 2710 26d0: e5932000 ldr r2, [r3] 26d4: e5dd3000 ldrb r3, [sp] 26d8: e7d23003 ldrb r3, [r2, r3] 26dc: e3130020 tst r3, #32 ; 0x20 26e0: 1a000002 bne 26f0 tty->column++; 26e4: e5943028 ldr r3, [r4, #40] 26e8: e2833001 add r3, r3, #1 ; 0x1 26ec: e5843028 str r3, [r4, #40] break; } } rtems_termios_puts (&c, 1, tty); 26f0: e1a02004 mov r2, r4 26f4: e1a0000d mov r0, sp 26f8: e3a01001 mov r1, #1 ; 0x1 26fc: ebffff6b bl 24b0 } 2700: e28dd004 add sp, sp, #4 ; 0x4 2704: e8bd8010 pop {r4, pc} 2708: 00015af6 .word 0x00015af6 270c: 000159d3 .word 0x000159d3 2710: 00014a4c .word 0x00014a4c 00004c54 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 4c54: e92d4030 push {r4, r5, lr} 4c58: e24dd004 sub sp, sp, #4 ; 0x4 4c5c: e1a04000 mov r4, r0 4c60: 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) ) { 4c64: e1a00002 mov r0, r2 4c68: e1a0100d mov r1, sp 4c6c: eb000125 bl 5108 <_POSIX_Absolute_timeout_to_ticks> 4c70: e3500003 cmp r0, #3 ; 0x3 4c74: 979ff100 ldrls pc, [pc, r0, lsl #2] 4c78: ea000008 b 4ca0 <== NOT EXECUTED 4c7c: 00004c8c .word 0x00004c8c <== NOT EXECUTED 4c80: 00004c94 .word 0x00004c94 <== NOT EXECUTED 4c84: 00004c94 .word 0x00004c94 <== NOT EXECUTED 4c88: 00004c9c .word 0x00004c9c <== NOT EXECUTED 4c8c: e3a00016 mov r0, #22 ; 0x16 4c90: ea000006 b 4cb0 4c94: e3a03001 mov r3, #1 ; 0x1 4c98: ea000000 b 4ca0 4c9c: e3a03000 mov r3, #0 ; 0x0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: already_timedout = FALSE; break; } return _POSIX_Condition_variables_Wait_support( 4ca0: e1a00004 mov r0, r4 4ca4: e1a01005 mov r1, r5 4ca8: e59d2000 ldr r2, [sp] 4cac: eb000004 bl 4cc4 <_POSIX_Condition_variables_Wait_support> cond, mutex, ticks, already_timedout ); } 4cb0: e28dd004 add sp, sp, #4 ; 0x4 4cb4: e8bd8030 pop {r4, r5, pc} 00005070 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 5070: 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 ) 5074: e3520000 cmp r2, #0 ; 0x0 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 5078: e24dd040 sub sp, sp, #64 ; 0x40 507c: e58d0024 str r0, [sp, #36] POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 5080: e58d2020 str r2, [sp, #32] pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 5084: e58d301c str r3, [sp, #28] POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 5088: 03a0000e moveq r0, #14 ; 0xe 508c: 0a0000a1 beq 5318 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 5090: e59f3288 ldr r3, [pc, #648] ; 5320 5094: e3510000 cmp r1, #0 ; 0x0 5098: 11a06001 movne r6, r1 509c: 01a06003 moveq r6, r3 if ( !the_attr->is_initialized ) 50a0: e5963000 ldr r3, [r6] 50a4: e3530000 cmp r3, #0 ; 0x0 50a8: 0a000099 beq 5314 * 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) ) 50ac: e5963004 ldr r3, [r6, #4] 50b0: e3530000 cmp r3, #0 ; 0x0 50b4: 0a000004 beq 50cc 50b8: e59f3264 ldr r3, [pc, #612] ; 5324 50bc: e5932000 ldr r2, [r3] 50c0: e5963008 ldr r3, [r6, #8] 50c4: e1530002 cmp r3, r2 50c8: 3a000091 bcc 5314 * 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 ) { 50cc: e5963010 ldr r3, [r6, #16] 50d0: e3530001 cmp r3, #1 ; 0x1 50d4: 0a000002 beq 50e4 50d8: e3530002 cmp r3, #2 ; 0x2 50dc: 1a00008c bne 5314 50e0: ea000007 b 5104 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 50e4: e59f323c ldr r3, [pc, #572] ; 5328 50e8: e5933000 ldr r3, [r3] 50ec: e5935108 ldr r5, [r3, #264] schedpolicy = api->schedpolicy; schedparam = api->schedparam; 50f0: e2854080 add r4, r5, #128 ; 0x80 50f4: e8b4000f ldm r4!, {r0, r1, r2, r3} 50f8: e28dc028 add ip, sp, #40 ; 0x28 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 50fc: e595807c ldr r8, [r5, #124] 5100: ea000003 b 5114 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 5104: e2864018 add r4, r6, #24 ; 0x18 5108: e8b4000f ldm r4!, {r0, r1, r2, r3} schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 510c: e5968014 ldr r8, [r6, #20] schedparam = the_attr->schedparam; 5110: e28dc028 add ip, sp, #40 ; 0x28 5114: e8ac000f stmia ip!, {r0, r1, r2, r3} 5118: e8940003 ldm r4, {r0, r1} 511c: e88c0003 stm ip, {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 ) 5120: e596300c ldr r3, [r6, #12] 5124: e3530000 cmp r3, #0 ; 0x0 5128: 13a00086 movne r0, #134 ; 0x86 512c: 1a000079 bne 5318 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 5130: e59d9028 ldr r9, [sp, #40] 5134: e2493001 sub r3, r9, #1 ; 0x1 5138: e35300fd cmp r3, #253 ; 0xfd 513c: 8a000074 bhi 5314 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 5140: e3580003 cmp r8, #3 ; 0x3 5144: 979ff108 ldrls pc, [pc, r8, lsl #2] 5148: ea000071 b 5314 514c: 00005168 .word 0x00005168 <== NOT EXECUTED 5150: 0000515c .word 0x0000515c <== NOT EXECUTED 5154: 00005170 .word 0x00005170 <== NOT EXECUTED 5158: 0000517c .word 0x0000517c <== NOT EXECUTED 515c: e3a04000 mov r4, #0 ; 0x0 5160: e1a05004 mov r5, r4 5164: ea000012 b 51b4 5168: e3a04001 mov r4, #1 ; 0x1 516c: ea000000 b 5174 5170: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED 5174: e3a05000 mov r5, #0 ; 0x0 5178: ea00000d b 51b4 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 ) < 517c: e28d4028 add r4, sp, #40 ; 0x28 5180: e2840008 add r0, r4, #8 ; 0x8 5184: eb000fe6 bl 9124 <_Timespec_To_ticks> 5188: e1a05000 mov r5, r0 518c: e2840010 add r0, r4, #16 ; 0x10 5190: eb000fe3 bl 9124 <_Timespec_To_ticks> 5194: e1550000 cmp r5, r0 5198: 3a00005d bcc 5314 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 519c: e59d302c ldr r3, [sp, #44] 51a0: e2433001 sub r3, r3, #1 ; 0x1 51a4: e35300fd cmp r3, #253 ; 0xfd 51a8: 8a000059 bhi 5314 51ac: e59f5178 ldr r5, [pc, #376] ; 532c 51b0: e3a04003 mov r4, #3 ; 0x3 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 51b4: e59fa174 ldr sl, [pc, #372] ; 5330 51b8: e59a0000 ldr r0, [sl] 51bc: eb000695 bl 6c18 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 51c0: e59f016c ldr r0, [pc, #364] ; 5334 51c4: eb0008d8 bl 752c <_Objects_Allocate> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 51c8: e2507000 subs r7, r0, #0 ; 0x0 51cc: 0a000018 beq 5234 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 51d0: e59f314c ldr r3, [pc, #332] ; 5324 51d4: e5933000 ldr r3, [r3] 51d8: e3a0b001 mov fp, #1 ; 0x1 51dc: e1a03b13 lsl r3, r3, fp 51e0: e26920ff rsb r2, r9, #255 ; 0xff /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ 51e4: e3a09000 mov r9, #0 ; 0x0 status = _Thread_Initialize( 51e8: e5961008 ldr r1, [r6, #8] 51ec: e58d2004 str r2, [sp, #4] 51f0: e58d400c str r4, [sp, #12] 51f4: e58d5010 str r5, [sp, #16] 51f8: e58d9000 str r9, [sp] 51fc: e58db008 str fp, [sp, #8] 5200: e58d9014 str r9, [sp, #20] 5204: e58d9018 str r9, [sp, #24] 5208: e1530001 cmp r3, r1 520c: 31a03001 movcc r3, r1 5210: e59f011c ldr r0, [pc, #284] ; 5334 5214: e1a01007 mov r1, r7 5218: e5962004 ldr r2, [r6, #4] 521c: eb000c37 bl 8300 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 5220: e1500009 cmp r0, r9 5224: 1a000006 bne 5244 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 5228: e1a01007 mov r1, r7 522c: e59f0100 ldr r0, [pc, #256] ; 5334 5230: eb00098c bl 7868 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 5234: e59a0000 ldr r0, [sl] 5238: eb000692 bl 6c88 <_API_Mutex_Unlock> 523c: e3a0000b mov r0, #11 ; 0xb 5240: ea000034 b 5318 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5244: e5975108 ldr r5, [r7, #264] api->Attributes = *the_attr; 5248: e1a0c006 mov ip, r6 524c: e8bc000f ldm ip!, {r0, r1, r2, r3} 5250: e1a0e005 mov lr, r5 5254: e8ae000f stmia lr!, {r0, r1, r2, r3} 5258: e8bc000f ldm ip!, {r0, r1, r2, r3} 525c: e8ae000f stmia lr!, {r0, r1, r2, r3} 5260: e8bc000f ldm ip!, {r0, r1, r2, r3} 5264: e8ae000f stmia lr!, {r0, r1, r2, r3} 5268: e89c0003 ldm ip, {r0, r1} 526c: e88e0003 stm lr, {r0, r1} api->detachstate = the_attr->detachstate; 5270: e5963034 ldr r3, [r6, #52] api->schedpolicy = schedpolicy; 5274: e585807c str r8, [r5, #124] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 5278: e5853038 str r3, [r5, #56] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 527c: e28de028 add lr, sp, #40 ; 0x28 5280: e8be000f ldm lr!, {r0, r1, r2, r3} 5284: e285c080 add ip, r5, #128 ; 0x80 5288: e8ac000f stmia ip!, {r0, r1, r2, r3} 528c: 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; 5290: e5c7b075 strb fp, [r7, #117] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 5294: e88c0003 stm ip, {r0, r1} /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 5298: e59d2020 ldr r2, [sp, #32] 529c: e1a0100b mov r1, fp 52a0: e59d301c ldr r3, [sp, #28] 52a4: e1a00007 mov r0, r7 52a8: e58d9000 str r9, [sp] 52ac: eb000ef0 bl 8e74 <_Thread_Start> start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 52b0: e3580003 cmp r8, #3 ; 0x3 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 52b4: e1a04000 mov r4, r0 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 52b8: 1a000005 bne 52d4 _Watchdog_Insert_ticks( 52bc: e2850088 add r0, r5, #136 ; 0x88 52c0: eb000f97 bl 9124 <_Timespec_To_ticks> 52c4: e285109c add r1, r5, #156 ; 0x9c Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 52c8: e58500a8 str r0, [r5, #168] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 52cc: e59f0064 ldr r0, [pc, #100] ; 5338 52d0: eb001082 bl 94e0 <_Watchdog_Insert> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 52d4: e3540000 cmp r4, #0 ; 0x0 52d8: e59f4050 ldr r4, [pc, #80] ; 5330 52dc: 1a000005 bne 52f8 52e0: e1a01007 mov r1, r7 <== NOT EXECUTED 52e4: e59f0048 ldr r0, [pc, #72] ; 5334 <== NOT EXECUTED 52e8: eb00095e bl 7868 <_Objects_Free> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 52ec: e5940000 ldr r0, [r4] <== NOT EXECUTED 52f0: eb000664 bl 6c88 <_API_Mutex_Unlock> <== NOT EXECUTED 52f4: ea000006 b 5314 <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 52f8: e5973008 ldr r3, [r7, #8] 52fc: e59d2024 ldr r2, [sp, #36] _RTEMS_Unlock_allocator(); 5300: e5940000 ldr r0, [r4] /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 5304: e5823000 str r3, [r2] _RTEMS_Unlock_allocator(); 5308: eb00065e bl 6c88 <_API_Mutex_Unlock> 530c: e3a00000 mov r0, #0 ; 0x0 5310: ea000000 b 5318 return 0; 5314: e3a00016 mov r0, #22 ; 0x16 } 5318: e28dd040 add sp, sp, #64 ; 0x40 531c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 5320: 00018888 .word 0x00018888 5324: 00017dac .word 0x00017dac 5328: 0001a4c4 .word 0x0001a4c4 532c: 000056a0 .word 0x000056a0 5330: 0001a4bc .word 0x0001a4bc 5334: 0001a620 .word 0x0001a620 5338: 0001a4e4 .word 0x0001a4e4 000040e4 : 40e4: e59f2100 ldr r2, [pc, #256] ; 41ec 40e8: e5923000 ldr r3, [r2] 40ec: e2833001 add r3, r3, #1 ; 0x1 int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 40f0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 40f4: e5823000 str r3, [r2] 40f8: e1a08000 mov r8, r0 40fc: 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 ); 4100: e59f00e8 ldr r0, [pc, #232] ; 41f0 4104: eb0008e0 bl 648c <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 4108: e2506000 subs r6, r0, #0 ; 0x0 410c: 1a000002 bne 411c _Thread_Enable_dispatch(); 4110: eb000c09 bl 713c <_Thread_Enable_dispatch> 4114: e3a0000b mov r0, #11 ; 0xb 4118: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return EAGAIN; } the_key->destructor = destructor; 411c: e5864014 str r4, [r6, #20] for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 4120: e59fa0cc ldr sl, [pc, #204] ; 41f4 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 4124: e1a07006 mov r7, r6 4128: e3a05001 mov r5, #1 ; 0x1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 412c: e79a3105 ldr r3, [sl, r5, lsl #2] 4130: e3530000 cmp r3, #0 ; 0x0 4134: 0a00001a beq 41a4 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 4138: e5933004 ldr r3, [r3, #4] 413c: e1d341b0 ldrh r4, [r3, #16] 4140: e2844001 add r4, r4, #1 ; 0x1 4144: e1a04104 lsl r4, r4, #2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 4148: e1a00004 mov r0, r4 414c: eb001131 bl 8618 <_Workspace_Allocate> if ( !table ) { 4150: e2503000 subs r3, r0, #0 ; 0x0 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 4154: e1a02004 mov r2, r4 4158: 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 ) { 415c: 1a00000d bne 4198 4160: e2853005 add r3, r5, #5 ; 0x5 4164: e0864103 add r4, r6, r3, lsl #2 4168: ea000001 b 4174 for ( --the_api; the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 416c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 4170: eb001124 bl 8608 <_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; 4174: e2555001 subs r5, r5, #1 ; 0x1 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 4178: e2444004 sub r4, r4, #4 ; 0x4 bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 417c: 1afffffa bne 416c RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 4180: e59f0068 ldr r0, [pc, #104] ; 41f0 4184: e1a01006 mov r1, r6 4188: eb00098e bl 67c8 <_Objects_Free> the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 418c: eb000bea bl 713c <_Thread_Enable_dispatch> 4190: e3a0000c mov r0, #12 ; 0xc 4194: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return ENOMEM; } the_key->Values[ the_api ] = table; 4198: e587301c str r3, [r7, #28] memset( table, '\0', bytes_to_allocate ); 419c: eb00221f bl ca20 41a0: ea000000 b 41a8 } else { the_key->Values[ the_api ] = NULL; 41a4: e587301c str r3, [r7, #28] * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 41a8: 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; 41ac: e3550005 cmp r5, #5 ; 0x5 the_api++ ) { 41b0: e2877004 add r7, r7, #4 ; 0x4 * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 41b4: 1affffdc bne 412c #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 41b8: e59f3030 ldr r3, [pc, #48] ; 41f0 41bc: e593201c ldr r2, [r3, #28] 41c0: e1d630b8 ldrh r3, [r6, #8] 41c4: e5961008 ldr r1, [r6, #8] 41c8: e7826103 str r6, [r2, r3, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 41cc: e3a04000 mov r4, #0 ; 0x0 } } the_key->is_active = TRUE; 41d0: e3a03001 mov r3, #1 ; 0x1 41d4: e586400c str r4, [r6, #12] 41d8: e5c63010 strb r3, [r6, #16] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 41dc: e5881000 str r1, [r8] _Thread_Enable_dispatch(); 41e0: eb000bd5 bl 713c <_Thread_Enable_dispatch> 41e4: e1a00004 mov r0, r4 return 0; } 41e8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 41ec: 0001388c .word 0x0001388c 41f0: 00013c64 .word 0x00013c64 41f4: 00013848 .word 0x00013848 00005750 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 5750: e92d4030 push {r4, r5, lr} 5754: e24dd004 sub sp, sp, #4 ; 0x4 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5758: e1a0100d mov r1, sp 575c: eb000030 bl 5824 <_POSIX_Mutex_Get> switch ( location ) { 5760: e59d5000 ldr r5, [sp] 5764: e3550000 cmp r5, #0 ; 0x0 ) { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5768: e1a04000 mov r4, r0 switch ( location ) { 576c: 13a00016 movne r0, #22 ; 0x16 5770: 1a000011 bne 57bc /* * 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 ) ) { 5774: e5943064 ldr r3, [r4, #100] 5778: e3530000 cmp r3, #0 ; 0x0 577c: 1a000002 bne 578c _Thread_Enable_dispatch(); 5780: eb000d1d bl 8bfc <_Thread_Enable_dispatch> <== NOT EXECUTED 5784: e3a00010 mov r0, #16 ; 0x10 <== NOT EXECUTED 5788: ea00000b b 57bc <== NOT EXECUTED return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 578c: e59f0030 ldr r0, [pc, #48] ; 57c4 5790: e1a01004 mov r1, r4 5794: eb000a0f bl 7fd8 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 5798: e3a02016 mov r2, #22 ; 0x16 579c: e2840014 add r0, r4, #20 ; 0x14 57a0: e1a01005 mov r1, r5 57a4: eb0007f1 bl 7770 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 57a8: e59f0014 ldr r0, [pc, #20] ; 57c4 57ac: e1a01004 mov r1, r4 57b0: eb000ab4 bl 8288 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 57b4: eb000d10 bl 8bfc <_Thread_Enable_dispatch> 57b8: e1a00005 mov r0, r5 case OBJECTS_ERROR: break; } return EINVAL; } 57bc: e28dd004 add sp, sp, #4 ; 0x4 57c0: e8bd8030 pop {r4, r5, pc} 57c4: 000164e0 .word 0x000164e0 00005878 : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 5878: e92d4030 push {r4, r5, lr} <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 587c: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 5880: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 5884: 0a00000a beq 58b4 <== NOT EXECUTED return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5888: e1a0100d mov r1, sp <== NOT EXECUTED 588c: ebffffe4 bl 5824 <_POSIX_Mutex_Get> <== NOT EXECUTED switch ( location ) { 5890: e59d4000 ldr r4, [sp] <== NOT EXECUTED 5894: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 5898: 1a000005 bne 58b4 <== NOT EXECUTED case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 589c: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED 58a0: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED 58a4: e5853000 str r3, [r5] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 58a8: eb000cd3 bl 8bfc <_Thread_Enable_dispatch> <== NOT EXECUTED 58ac: e1a00004 mov r0, r4 <== NOT EXECUTED 58b0: ea000000 b 58b8 <== NOT EXECUTED return 0; 58b4: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 58b8: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 58bc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 000058c0 : #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 58c0: e59f3120 ldr r3, [pc, #288] ; 59e8 58c4: e3510000 cmp r1, #0 ; 0x0 int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 58c8: e92d40f0 push {r4, r5, r6, r7, lr} #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 58cc: 11a04001 movne r4, r1 58d0: 01a04003 moveq r4, r3 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 58d4: e2507000 subs r7, r0, #0 ; 0x0 58d8: 0a000040 beq 59e0 break; } } #endif if ( !the_attr->is_initialized ) 58dc: e5943000 ldr r3, [r4] 58e0: e3530000 cmp r3, #0 ; 0x0 58e4: 0a00003d beq 59e0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 58e8: e5943004 ldr r3, [r4, #4] 58ec: e3530000 cmp r3, #0 ; 0x0 58f0: 159f00f4 ldrne r0, [pc, #244] ; 59ec 58f4: 13a01068 movne r1, #104 ; 0x68 58f8: 159f20f0 ldrne r2, [pc, #240] ; 59f0 58fc: 159f30f0 ldrne r3, [pc, #240] ; 59f4 5900: 1bfff4ca blne 2c30 <__assert_func> /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 5904: e594300c ldr r3, [r4, #12] 5908: e3530001 cmp r3, #1 ; 0x1 590c: 0a000005 beq 5928 5910: e3530002 cmp r3, #2 ; 0x2 5914: 0a000005 beq 5930 5918: e3530000 cmp r3, #0 ; 0x0 591c: 01a06003 moveq r6, r3 5920: 0a000003 beq 5934 5924: ea00002d b 59e0 5928: e3a06002 mov r6, #2 ; 0x2 592c: ea000000 b 5934 5930: e3a06003 mov r6, #3 ; 0x3 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 5934: e5943008 ldr r3, [r4, #8] 5938: e2433001 sub r3, r3, #1 ; 0x1 593c: e35300fd cmp r3, #253 ; 0xfd 5940: 8a000026 bhi 59e0 5944: e59f20ac ldr r2, [pc, #172] ; 59f8 5948: e5923000 ldr r3, [r2] 594c: e2833001 add r3, r3, #1 ; 0x1 5950: 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 ); 5954: e59f00a0 ldr r0, [pc, #160] ; 59fc 5958: eb00097b bl 7f4c <_Objects_Allocate> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 595c: e2505000 subs r5, r0, #0 ; 0x0 5960: 1a000002 bne 5970 _Thread_Enable_dispatch(); 5964: eb000ca4 bl 8bfc <_Thread_Enable_dispatch> <== NOT EXECUTED 5968: e3a0000b mov r0, #11 ; 0xb <== NOT EXECUTED 596c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 5970: e5943004 ldr r3, [r4, #4] 5974: e5853010 str r3, [r5, #16] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 5978: e5943010 ldr r3, [r4, #16] 597c: e3530000 cmp r3, #0 ; 0x0 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 5980: 13a03000 movne r3, #0 ; 0x0 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 5984: 03a03001 moveq r3, #1 ; 0x1 5988: e5853054 str r3, [r5, #84] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 598c: 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; 5990: e3a01001 mov r1, #1 ; 0x1 the_mutex_attr->priority_ceiling = 5994: e26330ff rsb r3, r3, #255 ; 0xff /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 5998: 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 = 599c: 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; 59a0: e5c51058 strb r1, [r5, #88] the_mutex_attr->priority_ceiling = _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 59a4: e585605c str r6, [r5, #92] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 59a8: e2851054 add r1, r5, #84 ; 0x54 59ac: e2850014 add r0, r5, #20 ; 0x14 59b0: eb00076f bl 7774 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 59b4: e59f3040 ldr r3, [pc, #64] ; 59fc 59b8: e5951008 ldr r1, [r5, #8] 59bc: e593201c ldr r2, [r3, #28] 59c0: e1d530b8 ldrh r3, [r5, #8] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 59c4: e3a04000 mov r4, #0 ; 0x0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 59c8: e7825103 str r5, [r2, r3, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 59cc: e585400c str r4, [r5, #12] CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 59d0: e5871000 str r1, [r7] _Thread_Enable_dispatch(); 59d4: eb000c88 bl 8bfc <_Thread_Enable_dispatch> 59d8: e1a00004 mov r0, r4 59dc: e8bd80f0 pop {r4, r5, r6, r7, pc} return 0; 59e0: e3a00016 mov r0, #22 ; 0x16 } 59e4: e8bd80f0 pop {r4, r5, r6, r7, pc} 59e8: 00013f00 .word 0x00013f00 59ec: 00015982 .word 0x00015982 59f0: 00013f14 .word 0x00013f14 59f4: 000159c8 .word 0x000159c8 59f8: 0001618c .word 0x0001618c 59fc: 000164e0 .word 0x000164e0 00005a74 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 5a74: 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 ) 5a78: e2527000 subs r7, r2, #0 ; 0x0 <== NOT EXECUTED int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 5a7c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 5a80: e1a06001 mov r6, r1 <== NOT EXECUTED 5a84: e1a05000 mov r5, r0 <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 5a88: 0a000016 beq 5ae8 <== NOT EXECUTED return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 5a8c: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED 5a90: e35300fd cmp r3, #253 ; 0xfd <== NOT EXECUTED 5a94: 8a000013 bhi 5ae8 <== NOT EXECUTED /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 5a98: ebffffd8 bl 5a00 <== NOT EXECUTED if ( status ) 5a9c: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 5aa0: 1a000011 bne 5aec <== NOT EXECUTED return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 5aa4: e1a00005 mov r0, r5 <== NOT EXECUTED 5aa8: e1a0100d mov r1, sp <== NOT EXECUTED 5aac: ebffff5c bl 5824 <_POSIX_Mutex_Get> <== NOT EXECUTED switch ( location ) { 5ab0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 5ab4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 5ab8: 1a00000a bne 5ae8 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 5abc: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 5ac0: 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( 5ac4: 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( 5ac8: 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( 5acc: e5873000 str r3, [r7] <== NOT EXECUTED the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 5ad0: e5802060 str r2, [r0, #96] <== NOT EXECUTED _CORE_mutex_Surrender( 5ad4: e1a02004 mov r2, r4 <== NOT EXECUTED 5ad8: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 5adc: eb00079c bl 7954 <_CORE_mutex_Surrender> <== NOT EXECUTED &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 5ae0: eb000c45 bl 8bfc <_Thread_Enable_dispatch> <== NOT EXECUTED 5ae4: ea000000 b 5aec <== NOT EXECUTED return 0; 5ae8: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED case OBJECTS_ERROR: break; } return EINVAL; } 5aec: e1a00004 mov r0, r4 <== NOT EXECUTED 5af0: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 5af4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 00005af8 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 5af8: e92d4010 push {r4, lr} <== NOT EXECUTED 5afc: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 5b00: 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 ); 5b04: e1a00001 mov r0, r1 <== NOT EXECUTED 5b08: e1a0100d mov r1, sp <== NOT EXECUTED 5b0c: eb000022 bl 5b9c <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED switch ( status ) { 5b10: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 5b14: 93a01000 movls r1, #0 ; 0x0 <== NOT EXECUTED 5b18: 9a000002 bls 5b28 <== NOT EXECUTED 5b1c: e3500003 cmp r0, #3 ; 0x3 <== NOT EXECUTED 5b20: 13a01000 movne r1, #0 ; 0x0 <== NOT EXECUTED 5b24: 03a01001 moveq r1, #1 ; 0x1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 5b28: e1a00004 mov r0, r4 <== NOT EXECUTED 5b2c: e59d2000 ldr r2, [sp] <== NOT EXECUTED 5b30: ebffffb5 bl 5a0c <_POSIX_Mutex_Lock_support> <== NOT EXECUTED break; } } return lock_status; } 5b34: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 5b38: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00004724 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 4724: e92d40f0 push {r4, r5, r6, r7, lr} const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 4728: e2507000 subs r7, r0, #0 ; 0x0 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 472c: e24dd00c sub sp, sp, #12 ; 0xc const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 4730: 0a000023 beq 47c4 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 4734: e3510000 cmp r1, #0 ; 0x0 4738: 1a000003 bne 474c the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 473c: e1a0000d mov r0, sp <== NOT EXECUTED 4740: eb00028d bl 517c <== NOT EXECUTED 4744: e1a0400d mov r4, sp <== NOT EXECUTED 4748: e1a0100d mov r1, sp <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 474c: e5913000 ldr r3, [r1] 4750: e3530000 cmp r3, #0 ; 0x0 4754: 0a00001a beq 47c4 return EINVAL; switch ( the_attr->process_shared ) { 4758: e5915004 ldr r5, [r1, #4] 475c: e3550000 cmp r5, #0 ; 0x0 4760: 1a000017 bne 47c4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4764: e59f2064 ldr r2, [pc, #100] ; 47d0 4768: e5923000 ldr r3, [r2] 476c: e2833001 add r3, r3, #1 ; 0x1 4770: 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 *) 4774: e59f6058 ldr r6, [pc, #88] ; 47d4 4778: e1a00006 mov r0, r6 477c: eb0009f4 bl 6f54 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 4780: e2504000 subs r4, r0, #0 ; 0x0 4784: 1a000002 bne 4794 _Thread_Enable_dispatch(); 4788: eb000d1d bl 7c04 <_Thread_Enable_dispatch> 478c: e3a0000b mov r0, #11 ; 0xb 4790: ea00000c b 47c8 return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 4794: e2840010 add r0, r4, #16 ; 0x10 4798: e28d1008 add r1, sp, #8 ; 0x8 479c: eb00081b bl 6810 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47a0: e596301c ldr r3, [r6, #28] 47a4: e5941008 ldr r1, [r4, #8] 47a8: e1d420b8 ldrh r2, [r4, #8] 47ac: e7834102 str r4, [r3, r2, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 47b0: e584500c str r5, [r4, #12] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 47b4: e5871000 str r1, [r7] _Thread_Enable_dispatch(); 47b8: eb000d11 bl 7c04 <_Thread_Enable_dispatch> 47bc: e1a00005 mov r0, r5 47c0: ea000000 b 47c8 return 0; 47c4: e3a00016 mov r0, #22 ; 0x16 } 47c8: e28dd00c add sp, sp, #12 ; 0xc 47cc: e8bd80f0 pop {r4, r5, r6, r7, pc} 47d0: 0001854c .word 0x0001854c 47d4: 00018720 .word 0x00018720 00004844 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4844: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4848: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 484c: e24dd00c sub sp, sp, #12 ; 0xc 4850: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4854: 0a000027 beq 48f8 * 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 ); 4858: e28d1004 add r1, sp, #4 ; 0x4 485c: eb00199b bl aed0 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 4860: 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 ); 4864: e1a05000 mov r5, r0 switch (status) { 4868: 93a04000 movls r4, #0 ; 0x0 486c: 9a000002 bls 487c 4870: e3500003 cmp r0, #3 ; 0x3 4874: 13a04000 movne r4, #0 ; 0x0 4878: 03a04001 moveq r4, #1 ; 0x1 487c: e59f0080 ldr r0, [pc, #128] ; 4904 4880: e5961000 ldr r1, [r6] 4884: e28d2008 add r2, sp, #8 ; 0x8 4888: eb000ad9 bl 73f4 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 488c: e59d3008 ldr r3, [sp, #8] 4890: e3530000 cmp r3, #0 ; 0x0 4894: 1a000017 bne 48f8 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 4898: e58d3000 str r3, [sp] 489c: e2800010 add r0, r0, #16 ; 0x10 48a0: e5961000 ldr r1, [r6] 48a4: e1a02004 mov r2, r4 48a8: e59d3004 ldr r3, [sp, #4] 48ac: eb0007df bl 6830 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 48b0: eb000cd3 bl 7c04 <_Thread_Enable_dispatch> if ( !do_wait && 48b4: e3540000 cmp r4, #0 ; 0x0 48b8: 1a000009 bne 48e4 48bc: e59f3044 ldr r3, [pc, #68] ; 4908 <== NOT EXECUTED 48c0: e5933000 ldr r3, [r3] <== NOT EXECUTED 48c4: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED 48c8: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 48cc: 1a000004 bne 48e4 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 48d0: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 48d4: 0a000007 beq 48f8 <== NOT EXECUTED 48d8: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 48dc: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 48e0: 9a000005 bls 48fc <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 48e4: e59f301c ldr r3, [pc, #28] ; 4908 48e8: e5933000 ldr r3, [r3] 48ec: e5930034 ldr r0, [r3, #52] 48f0: eb000037 bl 49d4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 48f4: ea000000 b 48fc 48f8: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 48fc: e28dd00c add sp, sp, #12 ; 0xc 4900: e8bd8070 pop {r4, r5, r6, pc} 4904: 00018720 .word 0x00018720 4908: 00018604 .word 0x00018604 0000490c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 490c: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4910: e2506000 subs r6, r0, #0 ; 0x0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 4914: e24dd00c sub sp, sp, #12 ; 0xc 4918: e1a00001 mov r0, r1 Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 491c: 0a000027 beq 49c0 * 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 ); 4920: e28d1004 add r1, sp, #4 ; 0x4 4924: eb001969 bl aed0 <_POSIX_Absolute_timeout_to_ticks> switch (status) { 4928: 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 ); 492c: e1a05000 mov r5, r0 switch (status) { 4930: 93a04000 movls r4, #0 ; 0x0 4934: 9a000002 bls 4944 4938: e3500003 cmp r0, #3 ; 0x3 493c: 13a04000 movne r4, #0 ; 0x0 4940: 03a04001 moveq r4, #1 ; 0x1 4944: e59f0080 ldr r0, [pc, #128] ; 49cc 4948: e5961000 ldr r1, [r6] 494c: e28d2008 add r2, sp, #8 ; 0x8 4950: eb000aa7 bl 73f4 <_Objects_Get> do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4954: e59d3008 ldr r3, [sp, #8] 4958: e3530000 cmp r3, #0 ; 0x0 495c: 1a000017 bne 49c0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 4960: e58d3000 str r3, [sp] 4964: e2800010 add r0, r0, #16 ; 0x10 4968: e5961000 ldr r1, [r6] 496c: e1a02004 mov r2, r4 4970: e59d3004 ldr r3, [sp, #4] 4974: eb0007e2 bl 6904 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 4978: eb000ca1 bl 7c04 <_Thread_Enable_dispatch> if ( !do_wait && 497c: e3540000 cmp r4, #0 ; 0x0 4980: 1a000009 bne 49ac 4984: e59f3044 ldr r3, [pc, #68] ; 49d0 <== NOT EXECUTED 4988: e5933000 ldr r3, [r3] <== NOT EXECUTED 498c: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED 4990: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 4994: 1a000004 bne 49ac <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4998: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 499c: 0a000007 beq 49c0 <== NOT EXECUTED 49a0: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED 49a4: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED 49a8: 9a000005 bls 49c4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 49ac: e59f301c ldr r3, [pc, #28] ; 49d0 49b0: e5933000 ldr r3, [r3] 49b4: e5930034 ldr r0, [r3, #52] 49b8: eb000005 bl 49d4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 49bc: ea000000 b 49c4 49c0: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return EINVAL; } 49c4: e28dd00c add sp, sp, #12 ; 0xc 49c8: e8bd8070 pop {r4, r5, r6, pc} 49cc: 00018720 .word 0x00018720 49d0: 00018604 .word 0x00018604 000042fc : * 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() ) 42fc: e59f30a4 ldr r3, [pc, #164] ; 43a8 4300: e5933000 ldr r3, [r3] 4304: e3530000 cmp r3, #0 ; 0x0 int pthread_setcancelstate( int state, int *oldstate ) { 4308: e92d4010 push {r4, lr} 430c: 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() ) 4310: 13a00047 movne r0, #71 ; 0x47 4314: 18bd8010 popne {r4, pc} return EPROTO; if ( !oldstate ) 4318: e3510000 cmp r1, #0 ; 0x0 431c: 0a00001f beq 43a0 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 4320: e3500001 cmp r0, #1 ; 0x1 4324: 8a00001d bhi 43a0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4328: e59f107c ldr r1, [pc, #124] ; 43ac return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 432c: e59f207c ldr r2, [pc, #124] ; 43b0 4330: e5913000 ldr r3, [r1] 4334: e5922000 ldr r2, [r2] 4338: e2833001 add r3, r3, #1 ; 0x1 433c: e5813000 str r3, [r1] 4340: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 4344: e59230cc ldr r3, [r2, #204] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4348: e3500000 cmp r0, #0 ; 0x0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 434c: e58c3000 str r3, [ip] thread_support->cancelability_state = state; 4350: e58200cc str r0, [r2, #204] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4354: 1a000006 bne 4374 4358: e59230d0 ldr r3, [r2, #208] 435c: e3530001 cmp r3, #1 ; 0x1 4360: 1a000003 bne 4374 4364: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED 4368: e2534000 subs r4, r3, #0 ; 0x0 <== NOT EXECUTED 436c: 13a04001 movne r4, #1 ; 0x1 <== NOT EXECUTED 4370: ea000000 b 4378 <== NOT EXECUTED 4374: e3a04000 mov r4, #0 ; 0x0 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4378: eb000a22 bl 6c08 <_Thread_Enable_dispatch> if ( cancel ) 437c: e3540000 cmp r4, #0 ; 0x0 4380: 01a00004 moveq r0, r4 4384: 08bd8010 popeq {r4, pc} _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 4388: e59f3020 ldr r3, [pc, #32] ; 43b0 <== NOT EXECUTED 438c: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 4390: e5930000 ldr r0, [r3] <== NOT EXECUTED 4394: ebfffed4 bl 3eec <_POSIX_Thread_Exit> <== NOT EXECUTED 4398: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 439c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 43a0: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED return 0; } 43a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 43a8: 000137e0 .word 0x000137e0 43ac: 0001374c .word 0x0001374c 43b0: 00013804 .word 0x00013804 000043b4 : * 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() ) 43b4: e59f30a4 ldr r3, [pc, #164] ; 4460 43b8: e5933000 ldr r3, [r3] 43bc: e3530000 cmp r3, #0 ; 0x0 int pthread_setcanceltype( int type, int *oldtype ) { 43c0: e92d4010 push {r4, lr} 43c4: 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() ) 43c8: 13a00047 movne r0, #71 ; 0x47 43cc: 18bd8010 popne {r4, pc} return EPROTO; if ( !oldtype ) 43d0: e3510000 cmp r1, #0 ; 0x0 43d4: 0a00001f beq 4458 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 43d8: e3500001 cmp r0, #1 ; 0x1 43dc: 8a00001d bhi 4458 43e0: e59f107c ldr r1, [pc, #124] ; 4464 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 43e4: e59f207c ldr r2, [pc, #124] ; 4468 43e8: e5913000 ldr r3, [r1] 43ec: e5922000 ldr r2, [r2] 43f0: e2833001 add r3, r3, #1 ; 0x1 43f4: e5813000 str r3, [r1] 43f8: e5922108 ldr r2, [r2, #264] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 43fc: e59230d0 ldr r3, [r2, #208] 4400: e58c3000 str r3, [ip] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4404: e59230cc ldr r3, [r2, #204] 4408: e3530000 cmp r3, #0 ; 0x0 thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; 440c: e58200d0 str r0, [r2, #208] if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4410: 1a000005 bne 442c 4414: e3500001 cmp r0, #1 ; 0x1 4418: 1a000003 bne 442c 441c: e59230d4 ldr r3, [r2, #212] 4420: e2534000 subs r4, r3, #0 ; 0x0 4424: 13a04001 movne r4, #1 ; 0x1 4428: ea000000 b 4430 442c: e3a04000 mov r4, #0 ; 0x0 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4430: eb0009f4 bl 6c08 <_Thread_Enable_dispatch> if ( cancel ) 4434: e3540000 cmp r4, #0 ; 0x0 4438: 01a00004 moveq r0, r4 443c: 08bd8010 popeq {r4, pc} _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 4440: e59f3020 ldr r3, [pc, #32] ; 4468 <== NOT EXECUTED 4444: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED 4448: e5930000 ldr r0, [r3] <== NOT EXECUTED 444c: ebfffea6 bl 3eec <_POSIX_Thread_Exit> <== NOT EXECUTED 4450: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 4454: e8bd8010 pop {r4, pc} <== NOT EXECUTED 4458: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED return 0; } 445c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 4460: 000137e0 .word 0x000137e0 4464: 0001374c .word 0x0001374c 4468: 00013804 .word 0x00013804 00006384 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 6384: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Check all the parameters */ if ( !param ) 6388: e2526000 subs r6, r2, #0 ; 0x0 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 638c: e24dd004 sub sp, sp, #4 ; 0x4 6390: e1a05000 mov r5, r0 6394: e1a0a001 mov sl, r1 /* * Check all the parameters */ if ( !param ) 6398: 0a000051 beq 64e4 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 639c: e5963000 ldr r3, [r6] 63a0: e2433001 sub r3, r3, #1 ; 0x1 63a4: e35300fd cmp r3, #253 ; 0xfd 63a8: 8a00004d bhi 64e4 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 63ac: e3510003 cmp r1, #3 ; 0x3 63b0: 979ff101 ldrls pc, [pc, r1, lsl #2] 63b4: ea00004a b 64e4 63b8: 000063d4 .word 0x000063d4 <== NOT EXECUTED 63bc: 000063c8 .word 0x000063c8 <== NOT EXECUTED 63c0: 000063dc .word 0x000063dc <== NOT EXECUTED 63c4: 000063e8 .word 0x000063e8 <== NOT EXECUTED 63c8: e3a07000 mov r7, #0 ; 0x0 63cc: e1a08007 mov r8, r7 63d0: ea000011 b 641c 63d4: e3a07001 mov r7, #1 ; 0x1 63d8: ea000000 b 63e0 63dc: e3a07002 mov r7, #2 ; 0x2 63e0: e3a08000 mov r8, #0 ; 0x0 63e4: ea00000c b 641c 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 ) < 63e8: e2860008 add r0, r6, #8 ; 0x8 63ec: eb000db9 bl 9ad8 <_Timespec_To_ticks> 63f0: e1a04000 mov r4, r0 63f4: e2860010 add r0, r6, #16 ; 0x10 63f8: eb000db6 bl 9ad8 <_Timespec_To_ticks> 63fc: e1540000 cmp r4, r0 6400: 3a000037 bcc 64e4 _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 6404: e5963004 ldr r3, [r6, #4] 6408: e2433001 sub r3, r3, #1 ; 0x1 640c: e35300fd cmp r3, #253 ; 0xfd 6410: 8a000033 bhi 64e4 6414: e59f80d4 ldr r8, [pc, #212] ; 64f0 6418: e3a07003 mov r7, #3 ; 0x3 641c: e1a01005 mov r1, r5 6420: e59f00cc ldr r0, [pc, #204] ; 64f4 6424: e1a0200d mov r2, sp 6428: eb0007ef bl 83ec <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 642c: e59d3000 ldr r3, [sp] 6430: e3530000 cmp r3, #0 ; 0x0 6434: e1a05000 mov r5, r0 6438: 13a00003 movne r0, #3 ; 0x3 643c: 1a000029 bne 64e8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 6440: e5954108 ldr r4, [r5, #264] if ( api->schedpolicy == SCHED_SPORADIC ) 6444: e594307c ldr r3, [r4, #124] 6448: e3530003 cmp r3, #3 ; 0x3 (void) _Watchdog_Remove( &api->Sporadic_timer ); 644c: 0284009c addeq r0, r4, #156 ; 0x9c 6450: 0b000eeb bleq a004 <_Watchdog_Remove> api->schedpolicy = policy; 6454: e584a07c str sl, [r4, #124] api->schedparam = *param; 6458: e1a0e006 mov lr, r6 645c: e8be000f ldm lr!, {r0, r1, r2, r3} 6460: e284c080 add ip, r4, #128 ; 0x80 6464: e8ac000f stmia ip!, {r0, r1, r2, r3} 6468: e89e0003 ldm lr, {r0, r1} the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 646c: e35a0000 cmp sl, #0 ; 0x0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 6470: e88c0003 stm ip, {r0, r1} the_thread->budget_algorithm = budget_algorithm; 6474: e585707c str r7, [r5, #124] the_thread->budget_callout = budget_callout; 6478: e5858080 str r8, [r5, #128] switch ( api->schedpolicy ) { 647c: ba000015 blt 64d8 6480: e35a0002 cmp sl, #2 ; 0x2 6484: da000002 ble 6494 6488: e35a0003 cmp sl, #3 ; 0x3 648c: 1a000011 bne 64d8 6490: ea000009 b 64bc case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 6494: e59f305c ldr r3, [pc, #92] ; 64f8 6498: e5941080 ldr r1, [r4, #128] 649c: e5933000 ldr r3, [r3] 64a0: e26110ff rsb r1, r1, #255 ; 0xff 64a4: e5853078 str r3, [r5, #120] the_thread->real_priority = 64a8: e5851018 str r1, [r5, #24] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 64ac: e1a00005 mov r0, r5 64b0: e3a02001 mov r2, #1 ; 0x1 64b4: eb000868 bl 865c <_Thread_Change_priority> 64b8: ea000006 b 64d8 TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 64bc: e5943080 ldr r3, [r4, #128] _Watchdog_Remove( &api->Sporadic_timer ); 64c0: e284009c add r0, r4, #156 ; 0x9c TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 64c4: e5843098 str r3, [r4, #152] _Watchdog_Remove( &api->Sporadic_timer ); 64c8: eb000ecd bl a004 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 64cc: e1a01005 mov r1, r5 64d0: e3a00000 mov r0, #0 ; 0x0 64d4: ebffff87 bl 62f8 <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); 64d8: eb0009c7 bl 8bfc <_Thread_Enable_dispatch> 64dc: e3a00000 mov r0, #0 ; 0x0 64e0: ea000000 b 64e8 return 0; 64e4: e3a00016 mov r0, #22 ; 0x16 case OBJECTS_ERROR: break; } return ESRCH; } 64e8: e28dd004 add sp, sp, #4 ; 0x4 64ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 64f0: 000062c0 .word 0x000062c0 64f4: 000163a0 .word 0x000163a0 64f8: 00016144 .word 0x00016144 00013a40 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 13a40: e59f30ac ldr r3, [pc, #172] ; 13af4 13a44: e5933000 ldr r3, [r3] 13a48: e1500003 cmp r0, r3 ssize_t read( int fd, void *buffer, size_t count ) { 13a4c: e92d4070 push {r4, r5, r6, lr} 13a50: e1a0c000 mov ip, r0 13a54: e1a06001 mov r6, r1 13a58: e1a05002 mov r5, r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 13a5c: 2a000006 bcs 13a7c iop = rtems_libio_iop( fd ); 13a60: e59f3090 ldr r3, [pc, #144] ; 13af8 13a64: e5930000 ldr r0, [r3] 13a68: e3a03034 mov r3, #52 ; 0x34 13a6c: e0240c93 mla r4, r3, ip, r0 rtems_libio_check_is_open( iop ); 13a70: e594300c ldr r3, [r4, #12] 13a74: e3130c01 tst r3, #256 ; 0x100 13a78: 1a000002 bne 13a88 13a7c: ebffde45 bl b398 <__errno> <== NOT EXECUTED 13a80: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 13a84: ea00000f b 13ac8 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 13a88: e3510000 cmp r1, #0 ; 0x0 13a8c: 0a000004 beq 13aa4 rtems_libio_check_count( count ); 13a90: e3520000 cmp r2, #0 ; 0x0 13a94: 01a00002 moveq r0, r2 13a98: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 13a9c: e3130002 tst r3, #2 ; 0x2 13aa0: 1a000002 bne 13ab0 13aa4: ebffde3b bl b398 <__errno> <== NOT EXECUTED 13aa8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 13aac: ea000005 b 13ac8 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 13ab0: e5943030 ldr r3, [r4, #48] 13ab4: e5933008 ldr r3, [r3, #8] 13ab8: e3530000 cmp r3, #0 ; 0x0 13abc: 1a000004 bne 13ad4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 13ac0: ebffde34 bl b398 <__errno> <== NOT EXECUTED 13ac4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 13ac8: e5803000 str r3, [r0] <== NOT EXECUTED 13acc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13ad0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 13ad4: e1a00004 mov r0, r4 13ad8: e1a0e00f mov lr, pc 13adc: e12fff13 bx r3 if ( rc > 0 ) 13ae0: e3500000 cmp r0, #0 ; 0x0 iop->offset += rc; 13ae4: c5943008 ldrgt r3, [r4, #8] 13ae8: c0833000 addgt r3, r3, r0 13aec: c5843008 strgt r3, [r4, #8] return rc; } 13af0: e8bd8070 pop {r4, r5, r6, pc} 13af4: 000143e4 .word 0x000143e4 13af8: 00016090 .word 0x00016090 0001d134 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 1d134: e92d4070 push {r4, r5, r6, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 1d138: e2514000 subs r4, r1, #0 ; 0x0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 1d13c: e24dd010 sub sp, sp, #16 ; 0x10 1d140: e1a06002 mov r6, r2 rtems_filesystem_location_info_t loc; int result; if (!buf) 1d144: 1a000002 bne 1d154 rtems_set_errno_and_return_minus_one( EFAULT ); 1d148: eb0033d2 bl 2a098 <__errno> <== NOT EXECUTED 1d14c: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED 1d150: ea000025 b 1d1ec <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 1d154: e3a01000 mov r1, #0 ; 0x0 1d158: e1a0200d mov r2, sp 1d15c: e1a03001 mov r3, r1 1d160: ebff9ab8 bl 3c48 if ( result != 0 ) 1d164: 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 ); 1d168: e1a0500d mov r5, sp if ( result != 0 ) 1d16c: 1a00001f bne 1d1f0 return -1; if ( !loc.ops->node_type_h ){ 1d170: e59d2008 ldr r2, [sp, #8] 1d174: e5923010 ldr r3, [r2, #16] 1d178: e3530000 cmp r3, #0 ; 0x0 rtems_filesystem_freenode( &loc ); 1d17c: 0592301c ldreq r3, [r2, #28] result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ 1d180: 0a000013 beq 1d1d4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 1d184: e1a0000d mov r0, sp 1d188: e1a0e00f mov lr, pc 1d18c: e12fff13 bx r3 1d190: e3500004 cmp r0, #4 ; 0x4 1d194: e59d3008 ldr r3, [sp, #8] 1d198: 0a000009 beq 1d1c4 rtems_filesystem_freenode( &loc ); 1d19c: e3530000 cmp r3, #0 ; 0x0 1d1a0: 0a000004 beq 1d1b8 1d1a4: e593301c ldr r3, [r3, #28] 1d1a8: e3530000 cmp r3, #0 ; 0x0 1d1ac: 11a0000d movne r0, sp 1d1b0: 11a0e00f movne lr, pc 1d1b4: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 1d1b8: eb0033b6 bl 2a098 <__errno> 1d1bc: e3a03016 mov r3, #22 ; 0x16 1d1c0: ea000009 b 1d1ec } if ( !loc.ops->readlink_h ){ 1d1c4: e593c03c ldr ip, [r3, #60] 1d1c8: e35c0000 cmp ip, #0 ; 0x0 1d1cc: 1a000009 bne 1d1f8 rtems_filesystem_freenode( &loc ); 1d1d0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1d1d4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d1d8: 11a0000d movne r0, sp <== NOT EXECUTED 1d1dc: 11a0e00f movne lr, pc <== NOT EXECUTED 1d1e0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1d1e4: eb0033ab bl 2a098 <__errno> <== NOT EXECUTED 1d1e8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1d1ec: e5803000 str r3, [r0] 1d1f0: e3e04000 mvn r4, #0 ; 0x0 1d1f4: ea00000d b 1d230 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 1d1f8: e1a01004 mov r1, r4 1d1fc: e1a02006 mov r2, r6 1d200: e1a0000d mov r0, sp 1d204: e1a0e00f mov lr, pc 1d208: e12fff1c bx ip rtems_filesystem_freenode( &loc ); 1d20c: e59d3008 ldr r3, [sp, #8] 1d210: 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 ); 1d214: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 1d218: 0a000004 beq 1d230 1d21c: e593301c ldr r3, [r3, #28] 1d220: e3530000 cmp r3, #0 ; 0x0 1d224: 11a0000d movne r0, sp 1d228: 11a0e00f movne lr, pc 1d22c: 112fff13 bxne r3 return result; } 1d230: e1a00004 mov r0, r4 1d234: e28dd010 add sp, sp, #16 ; 0x10 1d238: e8bd8070 pop {r4, r5, r6, pc} 00013b60 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 13b60: e92d4070 push {r4, r5, r6, lr} 13b64: e59fc108 ldr ip, [pc, #264] ; 13c74 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 13b68: e59f3108 ldr r3, [pc, #264] ; 13c78 13b6c: e5932000 ldr r2, [r3] { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 13b70: e59c3010 ldr r3, [ip, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 13b74: e3520003 cmp r2, #3 ; 0x3 { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 13b78: e2833001 add r3, r3, #1 ; 0x1 13b7c: e24dd004 sub sp, sp, #4 ; 0x4 13b80: e58c3010 str r3, [ip, #16] 13b84: e1a04000 mov r4, r0 13b88: e1a05001 mov r5, r1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 13b8c: 1a000007 bne 13bb0 if (_Thread_Dispatch_disable_level > 0) 13b90: e59f30e4 ldr r3, [pc, #228] ; 13c7c 13b94: e5933000 ldr r3, [r3] 13b98: e3530000 cmp r3, #0 ; 0x0 13b9c: 1a000030 bne 13c64 return (void *) 0; if (_ISR_Nest_level > 0) 13ba0: e59f30d8 ldr r3, [pc, #216] ; 13c80 13ba4: e5933000 ldr r3, [r3] 13ba8: e3530000 cmp r3, #0 ; 0x0 13bac: 1a00002c bne 13c64 } /* * Continue with realloc(). */ if ( !ptr ) 13bb0: e3540000 cmp r4, #0 ; 0x0 13bb4: 1a000003 bne 13bc8 return malloc( size ); 13bb8: e1a00005 mov r0, r5 <== NOT EXECUTED 13bbc: ebffd421 bl 8c48 <== NOT EXECUTED 13bc0: e1a04000 mov r4, r0 <== NOT EXECUTED 13bc4: ea000027 b 13c68 <== NOT EXECUTED if ( !size ) { 13bc8: e3550000 cmp r5, #0 ; 0x0 13bcc: 1a000003 bne 13be0 free( ptr ); 13bd0: e1a00004 mov r0, r4 <== NOT EXECUTED 13bd4: ebffd2ce bl 8714 <== NOT EXECUTED 13bd8: e1a04005 mov r4, r5 <== NOT EXECUTED 13bdc: ea000021 b 13c68 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 13be0: e59f009c ldr r0, [pc, #156] ; 13c84 13be4: e1a01004 mov r1, r4 13be8: e1a0200d mov r2, sp 13bec: eb000054 bl 13d44 <_Protected_heap_Get_block_size> 13bf0: e2506000 subs r6, r0, #0 ; 0x0 13bf4: 1a000003 bne 13c08 errno = EINVAL; 13bf8: ebffdde6 bl b398 <__errno> 13bfc: e3a03016 mov r3, #22 ; 0x16 13c00: e5803000 str r3, [r0] 13c04: ea000014 b 13c5c #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 ) ) { 13c08: e59f0074 ldr r0, [pc, #116] ; 13c84 13c0c: e1a01004 mov r1, r4 13c10: e1a02005 mov r2, r5 13c14: eb00005b bl 13d88 <_Protected_heap_Resize_block> 13c18: e3500000 cmp r0, #0 ; 0x0 13c1c: 1a000011 bne 13c68 * 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 ); 13c20: e1a00005 mov r0, r5 13c24: ebffd407 bl 8c48 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 13c28: e59f2044 ldr r2, [pc, #68] ; 13c74 13c2c: e5923004 ldr r3, [r2, #4] if ( !new_area ) { 13c30: e2506000 subs r6, r0, #0 ; 0x0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 13c34: e2433001 sub r3, r3, #1 ; 0x1 13c38: e5823004 str r3, [r2, #4] if ( !new_area ) { 13c3c: 0a000008 beq 13c64 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 13c40: e59d2000 ldr r2, [sp] 13c44: e1a01004 mov r1, r4 13c48: e1550002 cmp r5, r2 13c4c: 31a02005 movcc r2, r5 13c50: ebffdf9a bl bac0 free( ptr ); 13c54: e1a00004 mov r0, r4 13c58: ebffd2ad bl 8714 13c5c: e1a04006 mov r4, r6 13c60: ea000000 b 13c68 return new_area; 13c64: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED } 13c68: e1a00004 mov r0, r4 13c6c: e28dd004 add sp, sp, #4 ; 0x4 13c70: e8bd8070 pop {r4, r5, r6, pc} 13c74: 000160f4 .word 0x000160f4 13c78: 000163b4 .word 0x000163b4 13c7c: 0001620c .word 0x0001620c 13c80: 000162a0 .word 0x000162a0 13c84: 0001609c .word 0x0001609c 0001d364 : #include int rmdir( const char *pathname ) { 1d364: e92d4030 push {r4, r5, lr} /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 1d368: e3a01000 mov r1, #0 ; 0x0 #include int rmdir( const char *pathname ) { 1d36c: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 1d370: e1a0200d mov r2, sp 1d374: e1a03001 mov r3, r1 1d378: ebff9a32 bl 3c48 if ( result != 0 ) 1d37c: e3500000 cmp r0, #0 ; 0x0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 1d380: e1a0500d mov r5, sp if ( result != 0 ) 1d384: 1a00003f bne 1d488 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 1d388: e2800002 add r0, r0, #2 ; 0x2 1d38c: e1a0100d mov r1, sp 1d390: ebff9a05 bl 3bac if (result != 0) { 1d394: e3500000 cmp r0, #0 ; 0x0 1d398: e59d3008 ldr r3, [sp, #8] 1d39c: 0a000008 beq 1d3c4 rtems_filesystem_freenode( &loc ); 1d3a0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d3a4: 0a000037 beq 1d488 <== NOT EXECUTED 1d3a8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1d3ac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d3b0: 0a000034 beq 1d488 <== NOT EXECUTED 1d3b4: e1a0000d mov r0, sp <== NOT EXECUTED 1d3b8: e1a0e00f mov lr, pc <== NOT EXECUTED 1d3bc: e12fff13 bx r3 <== NOT EXECUTED 1d3c0: ea000030 b 1d488 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 1d3c4: e5932010 ldr r2, [r3, #16] 1d3c8: e3520000 cmp r2, #0 ; 0x0 1d3cc: 0a000016 beq 1d42c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 1d3d0: e1a0000d mov r0, sp 1d3d4: e1a0e00f mov lr, pc 1d3d8: e12fff12 bx r2 1d3dc: e3500001 cmp r0, #1 ; 0x1 1d3e0: 0a00000a beq 1d410 rtems_filesystem_freenode( &loc ); 1d3e4: e59d3008 ldr r3, [sp, #8] 1d3e8: e3530000 cmp r3, #0 ; 0x0 1d3ec: 0a000004 beq 1d404 1d3f0: e593301c ldr r3, [r3, #28] 1d3f4: e3530000 cmp r3, #0 ; 0x0 1d3f8: 11a0000d movne r0, sp 1d3fc: 11a0e00f movne lr, pc 1d400: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1d404: eb003323 bl 2a098 <__errno> 1d408: e3a03014 mov r3, #20 ; 0x14 1d40c: ea00000d b 1d448 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 1d410: e59d3004 ldr r3, [sp, #4] 1d414: e5933034 ldr r3, [r3, #52] 1d418: e3530000 cmp r3, #0 ; 0x0 1d41c: 1a00000b bne 1d450 rtems_filesystem_freenode( &loc ); 1d420: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1d424: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d428: 0a000004 beq 1d440 <== NOT EXECUTED 1d42c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1d430: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d434: 11a0000d movne r0, sp <== NOT EXECUTED 1d438: 11a0e00f movne lr, pc <== NOT EXECUTED 1d43c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1d440: eb003314 bl 2a098 <__errno> <== NOT EXECUTED 1d444: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1d448: e5803000 str r3, [r0] 1d44c: ea00000d b 1d488 } result = (*loc.handlers->rmnod_h)( &loc ); 1d450: e1a0000d mov r0, sp 1d454: e1a0e00f mov lr, pc 1d458: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 1d45c: e59d3008 ldr r3, [sp, #8] 1d460: 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 ); 1d464: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 1d468: 0a000007 beq 1d48c 1d46c: e593301c ldr r3, [r3, #28] 1d470: e3530000 cmp r3, #0 ; 0x0 1d474: 0a000004 beq 1d48c 1d478: e1a0000d mov r0, sp 1d47c: e1a0e00f mov lr, pc 1d480: e12fff13 bx r3 1d484: ea000000 b 1d48c 1d488: e3e04000 mvn r4, #0 ; 0x0 return result; } 1d48c: e1a00004 mov r0, r4 1d490: e28dd010 add sp, sp, #16 ; 0x10 1d494: e8bd8030 pop {r4, r5, pc} 00012a30 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 12a30: e59f0000 ldr r0, [pc, #0] ; 12a38 <== NOT EXECUTED 12a34: e12fff1e bx lr <== NOT EXECUTED 12a38: 0001fb1c .word 0x0001fb1c 0000e67c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { e67c: e92d4010 push {r4, lr} e680: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); e684: eb000006 bl e6a4 if (nap) e688: e3500000 cmp r0, #0 ; 0x0 e68c: 0a000001 beq e698 return nap->name; return rtems_assoc_name_bad(local_value); } e690: e5900000 ldr r0, [r0] e694: e8bd8010 pop {r4, pc} nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); e698: e1a00004 mov r0, r4 <== NOT EXECUTED } e69c: 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); e6a0: ea0010e2 b 12a30 <== NOT EXECUTED 0000aae8 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { aae8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); aaec: eb0001fc bl b2e4 <== NOT EXECUTED if (nap) aaf0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED return nap->remote_value; aaf4: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } aaf8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00003aa0 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 3aa0: e92d4010 push {r4, lr} if ( !time_buffer ) 3aa4: e2514000 subs r4, r1, #0 ; 0x0 3aa8: 03a00009 moveq r0, #9 ; 0x9 3aac: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 3ab0: e3500004 cmp r0, #4 ; 0x4 3ab4: 979ff100 ldrls pc, [pc, r0, lsl #2] 3ab8: ea000004 b 3ad0 3abc: 00003ad8 .word 0x00003ad8 <== NOT EXECUTED 3ac0: 00003ae4 .word 0x00003ae4 <== NOT EXECUTED 3ac4: 00003af0 .word 0x00003af0 <== NOT EXECUTED 3ac8: 00003af8 .word 0x00003af8 <== NOT EXECUTED 3acc: 00003b08 .word 0x00003b08 <== NOT EXECUTED 3ad0: e3a0000a mov r0, #10 ; 0xa 3ad4: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 3ad8: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3adc: 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 ); 3ae0: ea000025 b 3b7c case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 3ae4: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3ae8: 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); 3aec: ea000008 b 3b14 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 3af0: eb00001d bl 3b6c 3af4: ea000000 b 3afc return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 3af8: eb000013 bl 3b4c 3afc: e5840000 str r0, [r4] 3b00: e3a00000 mov r0, #0 ; 0x0 3b04: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 3b08: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3b0c: 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 ); 3b10: ea00004b b 3c44 00001f8c : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1f8c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1f90: e251a000 subs sl, r1, #0 ; 0x0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1f94: e24dd040 sub sp, sp, #64 ; 0x40 1f98: e1a08000 mov r8, r0 struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1f9c: 0a000058 beq 2104 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _TOD_Get_uptime( &uptime ); 1fa0: e28d4030 add r4, sp, #48 ; 0x30 1fa4: e1a00004 mov r0, r4 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1fa8: e28d5028 add r5, sp, #40 ; 0x28 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _TOD_Get_uptime( &uptime ); 1fac: eb00125f bl 6930 <_TOD_Get_uptime> _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1fb0: e1a01004 mov r1, r4 1fb4: e1a02005 mov r2, r5 1fb8: e59f014c ldr r0, [pc, #332] ; 210c 1fbc: eb001b4d bl 8cf8 <_Timespec_Subtract> } } } #endif (*print)( context, "CPU Usage by thread\n" 1fc0: e1a00008 mov r0, r8 1fc4: e59f1144 ldr r1, [pc, #324] ; 2110 1fc8: e1a0e00f mov lr, pc 1fcc: e12fff1a bx sl 1fd0: e59f613c ldr r6, [pc, #316] ; 2114 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 1fd4: e28db020 add fp, sp, #32 ; 0x20 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 1fd8: e5963004 ldr r3, [r6, #4] 1fdc: e3530000 cmp r3, #0 ; 0x0 1fe0: 0a00003a beq 20d0 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 1fe4: e5937004 ldr r7, [r3, #4] if ( information ) { 1fe8: e3570000 cmp r7, #0 ; 0x0 1fec: 13a05001 movne r5, #1 ; 0x1 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { struct timespec used; _Timespec_Subtract( 1ff0: 128d9018 addne r9, sp, #24 ; 0x18 api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 1ff4: 1a000030 bne 20bc 1ff8: ea000034 b 20d0 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 1ffc: e597301c ldr r3, [r7, #28] 2000: e7934105 ldr r4, [r3, r5, lsl #2] if ( !the_thread ) 2004: e3540000 cmp r4, #0 ; 0x0 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 2008: e2855001 add r5, r5, #1 ; 0x1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 200c: 0a00002a beq 20bc continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2010: e5940008 ldr r0, [r4, #8] 2014: eb000d59 bl 5580 (*print)( 2018: e28d300b add r3, sp, #11 ; 0xb 201c: e5942008 ldr r2, [r4, #8] 2020: e1a00008 mov r0, r8 2024: e59f10ec ldr r1, [pc, #236] ; 2118 2028: e1a0e00f mov lr, pc 202c: e12fff1a bx sl #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 2030: e5942088 ldr r2, [r4, #136] 2034: e5943084 ldr r3, [r4, #132] 2038: e58d2024 str r2, [sp, #36] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 203c: e59f20d8 ldr r2, [pc, #216] ; 211c #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 2040: e58d3020 str r3, [sp, #32] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2044: e5923000 ldr r3, [r2] 2048: e5942008 ldr r2, [r4, #8] 204c: e5933008 ldr r3, [r3, #8] 2050: e1530002 cmp r3, r2 2054: 1a000006 bne 2074 struct timespec used; _Timespec_Subtract( 2058: e59f00c0 ldr r0, [pc, #192] ; 2120 205c: e28d1030 add r1, sp, #48 ; 0x30 2060: e1a02009 mov r2, r9 2064: eb001b23 bl 8cf8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 2068: e1a0000b mov r0, fp 206c: e1a01009 mov r1, r9 2070: eb001ae1 bl 8bfc <_Timespec_Add_to> }; _Timespec_Divide( &ran, &total, &ival, &fval ); 2074: e28d203c add r2, sp, #60 ; 0x3c 2078: e28d3038 add r3, sp, #56 ; 0x38 207c: e1a0000b mov r0, fp 2080: e28d1028 add r1, sp, #40 ; 0x28 2084: eb001af5 bl 8c60 <_Timespec_Divide> /* * Print the information */ (*print)( context, 2088: e3a01ffa mov r1, #1000 ; 0x3e8 208c: e59d0024 ldr r0, [sp, #36] 2090: eb004d3e bl 15590 <__aeabi_uidiv> 2094: e59d203c ldr r2, [sp, #60] 2098: e58d2000 str r2, [sp] 209c: e59d2038 ldr r2, [sp, #56] 20a0: e1a03000 mov r3, r0 20a4: e58d2004 str r2, [sp, #4] 20a8: e1a00008 mov r0, r8 20ac: e59f1070 ldr r1, [pc, #112] ; 2124 20b0: e59d2020 ldr r2, [sp, #32] 20b4: e1a0e00f mov lr, pc 20b8: e12fff1a bx sl api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 20bc: e1d731b0 ldrh r3, [r7, #16] 20c0: e1550003 cmp r5, r3 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 20c4: e3a0100d mov r1, #13 ; 0xd 20c8: e28d200b add r2, sp, #11 ; 0xb api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 20cc: 9affffca bls 1ffc " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 20d0: e59f3050 ldr r3, [pc, #80] ; 2128 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 20d4: e2866004 add r6, r6, #4 ; 0x4 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 20d8: e1560003 cmp r6, r3 20dc: 1affffbd bne 1fd8 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 20e0: e3a01ffa mov r1, #1000 ; 0x3e8 20e4: e59d002c ldr r0, [sp, #44] 20e8: eb004d28 bl 15590 <__aeabi_uidiv> 20ec: e59f1038 ldr r1, [pc, #56] ; 212c 20f0: e1a03000 mov r3, r0 20f4: e59d2028 ldr r2, [sp, #40] 20f8: e1a00008 mov r0, r8 20fc: e1a0e00f mov lr, pc 2100: e12fff1a bx sl "Ticks since last reset = %" PRId32 "\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset ); (*print)( context, "Total Units = %" PRId32 "\n", total_units ); #endif } 2104: e28dd040 add sp, sp, #64 ; 0x40 2108: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 210c: 00022d08 .word 0x00022d08 2110: 000196e0 .word 0x000196e0 2114: 00022788 .word 0x00022788 2118: 00019725 .word 0x00019725 211c: 00022884 .word 0x00022884 2120: 0002288c .word 0x0002288c 2124: 00019738 .word 0x00019738 2128: 00022798 .word 0x00022798 212c: 00019750 .word 0x00019750 0000a6b8 : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { a6b8: e92d4010 push {r4, lr} <== NOT EXECUTED a6bc: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) a6c0: e59f0018 ldr r0, [pc, #24] ; a6e0 <== NOT EXECUTED a6c4: eb000107 bl aae8 <== NOT EXECUTED a6c8: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED a6cc: 0a000001 beq a6d8 <== NOT EXECUTED { errno = rc; a6d0: eb000330 bl b398 <__errno> <== NOT EXECUTED a6d4: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } a6d8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED a6dc: e8bd8010 pop {r4, pc} <== NOT EXECUTED a6e0: 00015404 .word 0x00015404 00005108 : int rtems_error( int error_flag, const char *printf_format, ... ) { 5108: e92d000e push {r1, r2, r3} <== NOT EXECUTED 510c: 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); 5110: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 5114: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 5118: ebffff85 bl 4f34 <== NOT EXECUTED va_end(arglist); return chars_written; } 511c: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 5120: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 5124: e12fff1e bx lr <== NOT EXECUTED 0000125c : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 125c: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 1260: e3510000 cmp r1, #0 ; 0x0 int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 1264: e24dd010 sub sp, sp, #16 ; 0x10 1268: e1a0e000 mov lr, r0 rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 126c: 1a000002 bne 127c rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1270: eb002848 bl b398 <__errno> <== NOT EXECUTED 1274: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 1278: ea000005 b 1294 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 127c: e5913008 ldr r3, [r1, #8] 1280: e593c000 ldr ip, [r3] 1284: e35c0000 cmp ip, #0 ; 0x0 1288: 1a000004 bne 12a0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 128c: eb002841 bl b398 <__errno> <== NOT EXECUTED 1290: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1294: e5803000 str r3, [r0] <== NOT EXECUTED 1298: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED 129c: ea000011 b 12e8 <== NOT EXECUTED parent = *pathloc; 12a0: e891000f ldm r1, {r0, r1, r2, r3} 12a4: e88d000f stm sp, {r0, r1, r2, r3} result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 12a8: e1a0100e mov r1, lr 12ac: e59f0040 ldr r0, [pc, #64] ; 12f4 12b0: e1a0200d mov r2, sp 12b4: e1a0e00f mov lr, pc 12b8: e12fff1c bx ip if (result != 0){ 12bc: e2504000 subs r4, r0, #0 ; 0x0 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 12c0: e1a0500d mov r5, sp result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); if (result != 0){ 12c4: 1afffff3 bne 1298 return -1; } rtems_filesystem_freenode( &parent ); 12c8: e59d3008 ldr r3, [sp, #8] 12cc: e3530000 cmp r3, #0 ; 0x0 12d0: 0a000004 beq 12e8 12d4: e593301c ldr r3, [r3, #28] 12d8: e3530000 cmp r3, #0 ; 0x0 12dc: 11a0000d movne r0, sp 12e0: 11a0e00f movne lr, pc 12e4: 112fff13 bxne r3 return result; } 12e8: e1a00004 mov r0, r4 12ec: e28dd010 add sp, sp, #16 ; 0x10 12f0: e8bd8030 pop {r4, r5, pc} 12f4: 000159bd .word 0x000159bd 000012f8 : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 12f8: e92d4070 push {r4, r5, r6, lr} /* * Verify Input parameters. */ if ( !pathname ) 12fc: e250e000 subs lr, r0, #0 ; 0x0 const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1300: e1a06001 mov r6, r1 1304: e1a04002 mov r4, r2 1308: e1a05003 mov r5, r3 /* * Verify Input parameters. */ if ( !pathname ) 130c: 1a000002 bne 131c rtems_set_errno_and_return_minus_one( EFAULT ); 1310: eb002820 bl b398 <__errno> 1314: e3a0300e mov r3, #14 ; 0xe 1318: ea00003e b 1418 if ( !pathloc ) 131c: e3520000 cmp r2, #0 ; 0x0 1320: 1a000002 bne 1330 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1324: eb00281b bl b398 <__errno> <== NOT EXECUTED 1328: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED 132c: ea000039 b 1418 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 1330: e5de3000 ldrb r3, [lr] 1334: e353005c cmp r3, #92 ; 0x5c 1338: 1353002f cmpne r3, #47 ; 0x2f 133c: 13a0c000 movne ip, #0 ; 0x0 1340: 03a0c001 moveq ip, #1 ; 0x1 1344: 0a000001 beq 1350 1348: e3530000 cmp r3, #0 ; 0x0 134c: 1a000006 bne 136c 1350: e59f30e0 ldr r3, [pc, #224] ; 1438 1354: e5933000 ldr r3, [r3] 1358: e2833014 add r3, r3, #20 ; 0x14 135c: e893000f ldm r3, {r0, r1, r2, r3} 1360: e884000f stm r4, {r0, r1, r2, r3} 1364: e3a02001 mov r2, #1 ; 0x1 1368: ea000005 b 1384 136c: e59f30c4 ldr r3, [pc, #196] ; 1438 1370: e5933000 ldr r3, [r3] 1374: e2833004 add r3, r3, #4 ; 0x4 1378: e893000f ldm r3, {r0, r1, r2, r3} 137c: e884000f stm r4, {r0, r1, r2, r3} 1380: e1a0200c mov r2, ip if ( !pathloc->ops->evalpath_h ) 1384: e5943008 ldr r3, [r4, #8] 1388: e5933000 ldr r3, [r3] 138c: e3530000 cmp r3, #0 ; 0x0 1390: 0a00001e beq 1410 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 1394: e08e0002 add r0, lr, r2 1398: e1a01006 mov r1, r6 139c: e1a02004 mov r2, r4 13a0: e1a0e00f mov lr, pc 13a4: e12fff13 bx r3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 13a8: e2703001 rsbs r3, r0, #1 ; 0x1 13ac: 33a03000 movcc r3, #0 ; 0x0 13b0: e3550000 cmp r5, #0 ; 0x0 13b4: 03a03000 moveq r3, #0 ; 0x0 13b8: e3530000 cmp r3, #0 ; 0x0 13bc: 08bd8070 popeq {r4, r5, r6, pc} if ( !pathloc->ops->node_type_h ){ 13c0: e5943008 ldr r3, [r4, #8] 13c4: e5932010 ldr r2, [r3, #16] 13c8: e3520000 cmp r2, #0 ; 0x0 13cc: 0a00000a beq 13fc rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 13d0: e1a00004 mov r0, r4 13d4: e1a0e00f mov lr, pc 13d8: e12fff12 bx r2 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 13dc: e2400003 sub r0, r0, #3 ; 0x3 13e0: e3500001 cmp r0, #1 ; 0x1 13e4: 83a00000 movhi r0, #0 ; 0x0 13e8: 88bd8070 pophi {r4, r5, r6, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 13ec: e5943008 ldr r3, [r4, #8] 13f0: e5932034 ldr r2, [r3, #52] 13f4: e3520000 cmp r2, #0 ; 0x0 13f8: 1a000009 bne 1424 rtems_filesystem_freenode( pathloc ); 13fc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1400: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1404: 11a00004 movne r0, r4 <== NOT EXECUTED 1408: 11a0e00f movne lr, pc <== NOT EXECUTED 140c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1410: eb0027e0 bl b398 <__errno> <== NOT EXECUTED 1414: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1418: e5803000 str r3, [r0] 141c: e3e00000 mvn r0, #0 ; 0x0 1420: e8bd8070 pop {r4, r5, r6, pc} * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 1424: e1a00004 mov r0, r4 1428: e1a01006 mov r1, r6 142c: e1a0e00f mov lr, pc 1430: e12fff12 bx r2 } } return result; } 1434: e8bd8070 pop {r4, r5, r6, pc} 1438: 000149b8 .word 0x000149b8 00008514 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 8514: e92d4030 push {r4, r5, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8518: e59f50dc ldr r5, [pc, #220] ; 85fc 851c: e5952000 ldr r2, [r5] 8520: e3a03012 mov r3, #18 ; 0x12 8524: 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 ) { 8528: e24dd018 sub sp, sp, #24 ; 0x18 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 852c: eb000204 bl 8d44 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8530: e59f30c8 ldr r3, [pc, #200] ; 8600 8534: e5933000 ldr r3, [r3] 8538: e3530000 cmp r3, #0 ; 0x0 rtems_fatal_error_occurred( 0xABCD0001 ); 853c: 059f00c0 ldreq r0, [pc, #192] ; 8604 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8540: 0a000009 beq 856c rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 8544: e59f30bc ldr r3, [pc, #188] ; 8608 8548: e5932000 ldr r2, [r3] status = mount( 854c: e592300c ldr r3, [r2, #12] 8550: e58d3000 str r3, [sp] 8554: e28d0014 add r0, sp, #20 ; 0x14 8558: e892000e ldm r2, {r1, r2, r3} 855c: eb0001ff bl 8d60 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 8560: e3700001 cmn r0, #1 ; 0x1 8564: 1a000001 bne 8570 rtems_fatal_error_occurred( 0xABCD0002 ); 8568: e59f009c ldr r0, [pc, #156] ; 860c <== NOT EXECUTED 856c: ebfff123 bl 4a00 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8570: e59d3014 ldr r3, [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; 8574: e595e000 ldr lr, [r5] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8578: e2833018 add r3, r3, #24 ; 0x18 857c: e893000f ldm r3, {r0, r1, r2, r3} 8580: e28ec014 add ip, lr, #20 ; 0x14 8584: e88c000f stm ip, {r0, r1, r2, r3} /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 8588: e28d4004 add r4, sp, #4 ; 0x4 858c: 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; 8590: e3a03000 mov r3, #0 ; 0x0 8594: e1ce32b8 strh r3, [lr, #40] * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 8598: e1a02004 mov r2, r4 859c: e1a03001 mov r3, r1 85a0: e59f0068 ldr r0, [pc, #104] ; 8610 85a4: ebffe353 bl 12f8 rtems_filesystem_root = loc; 85a8: e595c000 ldr ip, [r5] 85ac: e894000f ldm r4, {r0, r1, r2, r3} 85b0: e28cc014 add ip, ip, #20 ; 0x14 85b4: e88c000f stm ip, {r0, r1, r2, r3} /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 85b8: e3a01000 mov r1, #0 ; 0x0 85bc: e1a02004 mov r2, r4 85c0: e1a03001 mov r3, r1 85c4: e59f0044 ldr r0, [pc, #68] ; 8610 85c8: ebffe34a bl 12f8 rtems_filesystem_current = loc; 85cc: e595c000 ldr ip, [r5] 85d0: e894000f ldm r4, {r0, r1, r2, r3} 85d4: e28cc004 add ip, ip, #4 ; 0x4 85d8: 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); 85dc: e59f0030 ldr r0, [pc, #48] ; 8614 85e0: e59f1030 ldr r1, [pc, #48] ; 8618 85e4: eb0001d2 bl 8d34 if ( status != 0 ) 85e8: e3500000 cmp r0, #0 ; 0x0 rtems_fatal_error_occurred( 0xABCD0003 ); 85ec: 159f0028 ldrne r0, [pc, #40] ; 861c * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) 85f0: 1affffdd bne 856c * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ #endif } 85f4: e28dd018 add sp, sp, #24 ; 0x18 85f8: e8bd8030 pop {r4, r5, pc} 85fc: 000149b8 .word 0x000149b8 8600: 00014f48 .word 0x00014f48 8604: abcd0001 .word 0xabcd0001 8608: 000143ec .word 0x000143ec 860c: abcd0002 .word 0xabcd0002 8610: 00015b8d .word 0x00015b8d 8614: 00015b8f .word 0x00015b8f 8618: 000001ff .word 0x000001ff 861c: abcd0003 .word 0xabcd0003 0001d894 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 1d894: e5903000 ldr r3, [r0] <== NOT EXECUTED 1d898: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 1d89c: e1530000 cmp r3, r0 <== NOT EXECUTED 1d8a0: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 1d8a4: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED 1d8a8: e12fff1e bx lr <== NOT EXECUTED 0000112c : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 112c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 1130: 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 ); 1134: e1a0200d mov r2, sp <== NOT EXECUTED 1138: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 113c: 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 ); 1140: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 1144: 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 ); 1148: eb00006a bl 12f8 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 114c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 1150: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 1154: 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 ); 1158: e1a0800d mov r8, sp <== NOT EXECUTED 115c: e1a04000 mov r4, r0 <== NOT EXECUTED the_jnode = loc.node_access; 1160: e59d6000 ldr r6, [sp] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 1164: 1a000009 bne 1190 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1168: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 116c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1170: 11a0000d movne r0, sp <== NOT EXECUTED 1174: 11a0e00f movne lr, pc <== NOT EXECUTED 1178: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 117c: eb002885 bl b398 <__errno> <== NOT EXECUTED 1180: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1184: e5803000 str r3, [r0] <== NOT EXECUTED 1188: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 118c: ea000026 b 122c <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 1190: e1a0000d mov r0, sp <== NOT EXECUTED 1194: e1a0e00f mov lr, pc <== NOT EXECUTED 1198: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 119c: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED 11a0: 03540000 cmpeq r4, #0 ; 0x0 <== NOT EXECUTED 11a4: 03a0a000 moveq sl, #0 ; 0x0 <== NOT EXECUTED 11a8: 13a0a001 movne sl, #1 ; 0x1 <== NOT EXECUTED 11ac: e59d4008 ldr r4, [sp, #8] <== NOT EXECUTED 11b0: 0a000008 beq 11d8 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 11b4: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 11b8: 0a000018 beq 1220 <== NOT EXECUTED 11bc: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 11c0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 11c4: 0a000015 beq 1220 <== NOT EXECUTED 11c8: e1a0000d mov r0, sp <== NOT EXECUTED 11cc: e1a0e00f mov lr, pc <== NOT EXECUTED 11d0: e12fff13 bx r3 <== NOT EXECUTED 11d4: ea000011 b 1220 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 11d8: e5857000 str r7, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 11dc: e1a00007 mov r0, r7 <== NOT EXECUTED 11e0: eb002da2 bl c870 <== NOT EXECUTED 11e4: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 11e8: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED 11ec: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 11f0: e5963054 ldr r3, [r6, #84] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 11f4: e3540000 cmp r4, #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; 11f8: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 11fc: 0a000009 beq 1228 <== NOT EXECUTED 1200: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 1204: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1208: 0a000006 beq 1228 <== NOT EXECUTED 120c: e1a0000d mov r0, sp <== NOT EXECUTED 1210: e1a0e00f mov lr, pc <== NOT EXECUTED 1214: e12fff13 bx r3 <== NOT EXECUTED 1218: e1a0000a mov r0, sl <== NOT EXECUTED 121c: ea000002 b 122c <== NOT EXECUTED 1220: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED 1224: ea000000 b 122c <== NOT EXECUTED 1228: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 122c: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 1230: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 00006d64 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 6d64: e92d41f0 push {r4, r5, r6, r7, r8, lr} uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 6d68: e2507000 subs r7, r0, #0 ; 0x0 6d6c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; 6d70: e59f6054 ldr r6, [pc, #84] ; 6dcc for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 6d74: e2868010 add r8, r6, #16 ; 0x10 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 6d78: e5963004 ldr r3, [r6, #4] 6d7c: e3530000 cmp r3, #0 ; 0x0 6d80: 0a00000d beq 6dbc continue; information = _Objects_Information_table[ api_index ][ 1 ]; 6d84: e5935004 ldr r5, [r3, #4] if ( information ) { 6d88: e3550000 cmp r5, #0 ; 0x0 6d8c: 13a04001 movne r4, #1 ; 0x1 6d90: 1a000006 bne 6db0 6d94: ea000008 b 6dbc <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 6d98: e595301c ldr r3, [r5, #28] 6d9c: e7933104 ldr r3, [r3, r4, lsl #2] if ( !the_thread ) 6da0: e2530000 subs r0, r3, #0 ; 0x0 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 6da4: e2844001 add r4, r4, #1 ; 0x1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; (*routine)(the_thread); 6da8: 11a0e00f movne lr, pc 6dac: 112fff17 bxne r7 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 6db0: e1d531b0 ldrh r3, [r5, #16] 6db4: e1540003 cmp r4, r3 6db8: 9afffff6 bls 6d98 6dbc: e2866004 add r6, r6, #4 ; 0x4 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 6dc0: e1560008 cmp r6, r8 6dc4: 1affffeb bne 6d78 6dc8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 6dcc: 00022788 .word 0x00022788 0000143c : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 143c: e92d4010 push {r4, lr} rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1440: e59f4098 ldr r4, [pc, #152] ; 14e0 1444: e5940000 ldr r0, [r4] 1448: e3500000 cmp r0, #0 ; 0x0 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 144c: e24dd004 sub sp, sp, #4 ; 0x4 rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1450: 0a000015 beq 14ac { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1454: e3a01034 mov r1, #52 ; 0x34 1458: eb001c70 bl 8620 145c: e59f3080 ldr r3, [pc, #128] ; 14e4 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1460: 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, 1464: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1468: 0280001a addeq r0, r0, #26 ; 0x1a if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 146c: 0a000017 beq 14d0 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1470: e59f3070 ldr r3, [pc, #112] ; 14e8 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 1474: e5942000 ldr r2, [r4] rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1478: e5830000 str r0, [r3] for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 147c: e3a01000 mov r1, #0 ; 0x0 1480: e1a03000 mov r3, r0 1484: ea000000 b 148c iop->data1 = iop + 1; 1488: e503300c str r3, [r3, #-12] 148c: e2811001 add r1, r1, #1 ; 0x1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 1490: e1510002 cmp r1, r2 iop->data1 = iop + 1; 1494: 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++) 1498: 1afffffa bne 1488 iop->data1 = iop + 1; iop->data1 = NULL; 149c: e3a03034 mov r3, #52 ; 0x34 14a0: e0220193 mla r2, r3, r1, r0 14a4: e3a03000 mov r3, #0 ; 0x0 14a8: e502300c str r3, [r2, #-12] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 14ac: e59fc038 ldr ip, [pc, #56] ; 14ec 14b0: e59f0038 ldr r0, [pc, #56] ; 14f0 14b4: e3a01001 mov r1, #1 ; 0x1 14b8: e3a02054 mov r2, #84 ; 0x54 14bc: e3a03000 mov r3, #0 ; 0x0 14c0: e58dc000 str ip, [sp] 14c4: eb000afa bl 40b4 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 14c8: e3500000 cmp r0, #0 ; 0x0 14cc: 0a000000 beq 14d4 rtems_fatal_error_occurred( rc ); 14d0: eb000d4a bl 4a00 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); } 14d4: e28dd004 add sp, sp, #4 ; 0x4 14d8: e8bd4010 pop {r4, lr} /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 14dc: ea001c0c b 8514 14e0: 000143e4 .word 0x000143e4 14e4: 00016090 .word 0x00016090 14e8: 00016094 .word 0x00016094 14ec: 00016098 .word 0x00016098 14f0: 4c42494f .word 0x4c42494f 0001cf6c : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 1cf6c: e92d40f0 push {r4, r5, r6, r7, lr} rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 1cf70: e3a00000 mov r0, #0 ; 0x0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 1cf74: 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); 1cf78: e1a01000 mov r1, r0 1cf7c: e28d2010 add r2, sp, #16 ; 0x10 1cf80: eb000671 bl 1e94c if (sc != RTEMS_SUCCESSFUL) return sc; 1cf84: e2507000 subs r7, r0, #0 ; 0x0 1cf88: 1a00003b bne 1d07c /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 1cf8c: e59f60f4 ldr r6, [pc, #244] ; 1d088 1cf90: e59f30f4 ldr r3, [pc, #244] ; 1d08c 1cf94: e5962000 ldr r2, [r6] 1cf98: e1520003 cmp r2, r3 1cf9c: 1a00000f bne 1cfe0 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 1cfa0: e2800040 add r0, r0, #64 ; 0x40 1cfa4: ebff9cf3 bl 4378 if (!tmp) 1cfa8: e2505000 subs r5, r0, #0 ; 0x0 1cfac: 03a0701a moveq r7, #26 ; 0x1a 1cfb0: 0a000031 beq 1d07c #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); 1cfb4: e1a00007 mov r0, r7 1cfb8: e1a01006 mov r1, r6 1cfbc: e59f20cc ldr r2, [pc, #204] ; 1d090 1cfc0: eb000764 bl 1ed58 if (sc != RTEMS_SUCCESSFUL) { 1cfc4: e2504000 subs r4, r0, #0 ; 0x0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 1cfc8: 05865000 streq r5, [r6] #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { 1cfcc: 0a000003 beq 1cfe0 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 1cfd0: e1a00005 mov r0, r5 <== NOT EXECUTED 1cfd4: ebff9b6c bl 3d8c <== NOT EXECUTED 1cfd8: e1a07004 mov r7, r4 <== NOT EXECUTED 1cfdc: ea000026 b 1d07c <== NOT EXECUTED return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 1cfe0: e59f50a0 ldr r5, [pc, #160] ; 1d088 1cfe4: e59f30a0 ldr r3, [pc, #160] ; 1d08c 1cfe8: e5954000 ldr r4, [r5] 1cfec: e1a0c003 mov ip, r3 1cff0: e8bc000f ldm ip!, {r0, r1, r2, r3} 1cff4: e1a0e004 mov lr, r4 1cff8: e8ae000f stmia lr!, {r0, r1, r2, r3} 1cffc: e8bc000f ldm ip!, {r0, r1, r2, r3} 1d000: e8ae000f stmia lr!, {r0, r1, r2, r3} 1d004: e8bc000f ldm ip!, {r0, r1, r2, r3} 1d008: e8ae000f stmia lr!, {r0, r1, r2, r3} 1d00c: e89c000f ldm ip, {r0, r1, r2, r3} 1d010: e88e000f stm lr, {r0, r1, r2, r3} rtems_current_user_env->task_id=task_id; /* mark the local values*/ 1d014: e59d3010 ldr r3, [sp, #16] 1d018: e4843014 str r3, [r4], #20 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 1d01c: e59f3070 ldr r3, [pc, #112] ; 1d094 1d020: e5933000 ldr r3, [r3] 1d024: e2833018 add r3, r3, #24 ; 0x18 1d028: e893000f ldm r3, {r0, r1, r2, r3} 1d02c: 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); 1d030: e3a01000 mov r1, #0 ; 0x0 1d034: e1a0200d mov r2, sp 1d038: e1a03001 mov r3, r1 1d03c: e59f0054 ldr r0, [pc, #84] ; 1d098 1d040: ebff9b00 bl 3c48 rtems_filesystem_root = loc; 1d044: e595c000 ldr ip, [r5] 1d048: e89d000f ldm sp, {r0, r1, r2, r3} 1d04c: e28cc014 add ip, ip, #20 ; 0x14 1d050: e88c000f stm ip, {r0, r1, r2, r3} rtems_filesystem_evaluate_path("/", 0, &loc, 0); 1d054: e3a01000 mov r1, #0 ; 0x0 1d058: e1a0200d mov r2, sp 1d05c: e1a03001 mov r3, r1 1d060: e59f0030 ldr r0, [pc, #48] ; 1d098 1d064: ebff9af7 bl 3c48 rtems_filesystem_current = loc; 1d068: e595c000 ldr ip, [r5] 1d06c: e89d000f ldm sp, {r0, r1, r2, r3} 1d070: e28cc004 add ip, ip, #4 ; 0x4 1d074: 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); 1d078: e1a0400d mov r4, sp rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 1d07c: e1a00007 mov r0, r7 1d080: e28dd014 add sp, sp, #20 ; 0x14 1d084: e8bd80f0 pop {r4, r5, r6, r7, pc} 1d088: 0003c648 .word 0x0003c648 1d08c: 00056c5c .word 0x00056c5c 1d090: 0001ce5c .word 0x0001ce5c 1d094: 00056548 .word 0x00056548 1d098: 00041473 .word 0x00041473 0001cec0 : * 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) { 1cec0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 1cec4: e1a05000 mov r5, r0 <== NOT EXECUTED 1cec8: 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); 1cecc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1ced0: e1a01000 mov r1, r0 <== NOT EXECUTED 1ced4: e1a0200d mov r2, sp <== NOT EXECUTED 1ced8: eb00069b bl 1e94c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 1cedc: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 1cee0: 1a00001b bne 1cf54 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 1cee4: e59f1074 ldr r1, [pc, #116] ; 1cf60 <== NOT EXECUTED 1cee8: e5914000 ldr r4, [r1] <== NOT EXECUTED 1ceec: e59d3000 ldr r3, [sp] <== NOT EXECUTED 1cef0: e5942000 ldr r2, [r4] <== NOT EXECUTED 1cef4: e1520003 cmp r2, r3 <== NOT EXECUTED 1cef8: 1a000004 bne 1cf10 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 1cefc: eb0007c0 bl 1ee04 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 1cf00: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 1cf04: 1a000012 bne 1cf54 <== NOT EXECUTED free_user_env(tmp); 1cf08: e1a00004 mov r0, r4 <== NOT EXECUTED 1cf0c: ebffffd2 bl 1ce5c <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 1cf10: e59f4048 ldr r4, [pc, #72] ; 1cf60 <== NOT EXECUTED 1cf14: e1a00005 mov r0, r5 <== NOT EXECUTED 1cf18: e1a01004 mov r1, r4 <== NOT EXECUTED 1cf1c: e28d2004 add r2, sp, #4 ; 0x4 <== NOT EXECUTED 1cf20: eb0007d7 bl 1ee84 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 1cf24: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED 1cf28: 1a000006 bne 1cf48 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 1cf2c: e1a01004 mov r1, r4 <== NOT EXECUTED 1cf30: e59f202c ldr r2, [pc, #44] ; 1cf64 <== NOT EXECUTED 1cf34: eb000787 bl 1ed58 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 1cf38: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 1cf3c: 059d3004 ldreq r3, [sp, #4] <== NOT EXECUTED 1cf40: 05843000 streq r3, [r4] <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 1cf44: 0a000002 beq 1cf54 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 1cf48: e59f2018 ldr r2, [pc, #24] ; 1cf68 <== NOT EXECUTED 1cf4c: e59f300c ldr r3, [pc, #12] ; 1cf60 <== NOT EXECUTED 1cf50: e5832000 str r2, [r3] <== NOT EXECUTED return sc; } 1cf54: e1a00001 mov r0, r1 <== NOT EXECUTED 1cf58: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED 1cf5c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 1cf60: 0003c648 .word 0x0003c648 1cf64: 0001ce5c .word 0x0001ce5c 1cf68: 00056c5c .word 0x00056c5c 00004464 : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 4464: e92d4010 push {r4, lr} <== NOT EXECUTED 4468: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 446c: e1a01000 mov r1, r0 <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 4470: e1a0200d mov r2, sp <== NOT EXECUTED 4474: e59f0030 ldr r0, [pc, #48] ; 44ac <== NOT EXECUTED 4478: eb00137d bl 9274 <_Protected_heap_Get_block_size> <== NOT EXECUTED 447c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 4480: 0a000007 beq 44a4 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 4484: e59f1024 ldr r1, [pc, #36] ; 44b0 <== NOT EXECUTED 4488: e59d2000 ldr r2, [sp] <== NOT EXECUTED 448c: e2813024 add r3, r1, #36 ; 0x24 <== NOT EXECUTED 4490: e8930018 ldm r3, {r3, r4} <== NOT EXECUTED 4494: e0933002 adds r3, r3, r2 <== NOT EXECUTED 4498: e2a44000 adc r4, r4, #0 ; 0x0 <== NOT EXECUTED 449c: e5813024 str r3, [r1, #36] <== NOT EXECUTED 44a0: e5814028 str r4, [r1, #40] <== NOT EXECUTED } } 44a4: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 44a8: e8bd8010 pop {r4, pc} <== NOT EXECUTED 44ac: 000564c4 .word 0x000564c4 44b0: 0005651c .word 0x0005651c 000044b4 : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 44b4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED size_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 44b8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED } void rtems_malloc_statistics_at_malloc( void *pointer ) { 44bc: 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 ) 44c0: 0a000015 beq 451c <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 44c4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 44c8: e28d2004 add r2, sp, #4 ; 0x4 <== NOT EXECUTED 44cc: 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); 44d0: e1a01000 mov r1, r0 <== NOT EXECUTED 44d4: e1a0200d mov r2, sp <== NOT EXECUTED 44d8: e59f0044 ldr r0, [pc, #68] ; 4524 <== NOT EXECUTED 44dc: eb001364 bl 9274 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 44e0: e59fc040 ldr ip, [pc, #64] ; 4528 <== NOT EXECUTED 44e4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 44e8: e28c101c add r1, ip, #28 ; 0x1c <== NOT EXECUTED 44ec: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 44f0: e59c0024 ldr r0, [ip, #36] <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 44f4: e0915003 adds r5, r1, r3 <== NOT EXECUTED 44f8: e2a26000 adc r6, r2, #0 ; 0x0 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; if (current_depth > s->max_depth) 44fc: e59c2018 ldr r2, [ip, #24] <== NOT EXECUTED _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); current_depth = s->lifetime_allocated - s->lifetime_freed; 4500: e0601005 rsb r1, r0, r5 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 4504: e1a03005 mov r3, r5 <== NOT EXECUTED 4508: e1a04006 mov r4, r6 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; if (current_depth > s->max_depth) 450c: e1510002 cmp r1, r2 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 4510: e58c301c str r3, [ip, #28] <== NOT EXECUTED 4514: e58c4020 str r4, [ip, #32] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; if (current_depth > s->max_depth) s->max_depth = current_depth; 4518: 858c1018 strhi r1, [ip, #24] <== NOT EXECUTED } 451c: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 4520: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 4524: 000564c4 .word 0x000564c4 4528: 0005651c .word 0x0005651c 0000452c : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 452c: e59f0008 ldr r0, [pc, #8] ; 453c <== NOT EXECUTED 4530: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 4534: e3a0202c mov r2, #44 ; 0x2c <== NOT EXECUTED 4538: ea00a0de b 2c8b8 <== NOT EXECUTED 453c: 0005651c .word 0x0005651c 000050e4 : void rtems_panic( const char *printf_format, ... ) { 50e4: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 50e8: 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); 50ec: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 50f0: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED 50f4: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED 50f8: ebffff8d bl 4f34 <== NOT EXECUTED va_end(arglist); } 50fc: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 5100: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED 5104: e12fff1e bx lr <== NOT EXECUTED 000281a4 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 281a4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 281a8: e2514000 subs r4, r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 281ac: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 281b0: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED 281b4: 0a000013 beq 28208 <== NOT EXECUTED 281b8: e1a01000 mov r1, r0 <== NOT EXECUTED 281bc: e1a0200d mov r2, sp <== NOT EXECUTED 281c0: e59f0048 ldr r0, [pc, #72] ; 28210 <== NOT EXECUTED 281c4: ebff8383 bl 8fd8 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 281c8: e59d5000 ldr r5, [sp] <== NOT EXECUTED 281cc: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 281d0: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 281d4: 1a00000b bne 28208 <== NOT EXECUTED case OBJECTS_LOCAL: *statistics = the_period->Statistics; 281d8: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED 281dc: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 281e0: e1a0e004 mov lr, r4 <== NOT EXECUTED 281e4: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 281e8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 281ec: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 281f0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 281f4: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 281f8: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED 281fc: e88e0003 stm lr, {r0, r1} <== NOT EXECUTED _Thread_Enable_dispatch(); 28200: ebff85b5 bl 98dc <_Thread_Enable_dispatch> <== NOT EXECUTED 28204: e1a00005 mov r0, r5 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 28208: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 2820c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 28210: 0005717c .word 0x0005717c 00028214 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 28214: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 28218: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 2821c: e24dd00c sub sp, sp, #12 ; 0xc Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 28220: 03a00009 moveq r0, #9 ; 0x9 28224: 0a000021 beq 282b0 28228: e1a01000 mov r1, r0 2822c: e28d2008 add r2, sp, #8 ; 0x8 28230: e59f0080 ldr r0, [pc, #128] ; 282b8 28234: ebff8367 bl 8fd8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 28238: e59d3008 ldr r3, [sp, #8] 2823c: e3530000 cmp r3, #0 ; 0x0 28240: e1a06000 mov r6, r0 28244: 13a00004 movne r0, #4 ; 0x4 28248: 1a000018 bne 282b0 case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 2824c: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED 28250: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 28254: 01a02003 moveq r2, r3 <== NOT EXECUTED 28258: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED status->state = the_period->state; 2825c: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED if ( status->state == RATE_MONOTONIC_INACTIVE ) { 28260: 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); 28264: e885000c stm r5, {r2, r3} <== 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; 28268: 05853014 streq 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; 2826c: 05853008 streq r3, [r5, #8] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 28270: 0585300c streq 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; 28274: 05853010 streq r3, [r5, #16] <== NOT EXECUTED 28278: 0a00000a beq 282a8 <== 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 ); 2827c: e1a0000d mov r0, sp <== NOT EXECUTED 28280: ebffdbdc bl 1f1f8 <_TOD_Get_uptime> <== NOT EXECUTED #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 28284: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED 28288: e1a0100d mov r1, sp <== NOT EXECUTED 2828c: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED 28290: ebff891a bl a700 <_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( 28294: e1a0100d mov r1, sp <== NOT EXECUTED 28298: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED 2829c: e59f0018 ldr r0, [pc, #24] ; 282bc <== 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 ); 282a0: 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( 282a4: ebff8915 bl a700 <_Timespec_Subtract> <== NOT EXECUTED the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 282a8: ebff858b bl 98dc <_Thread_Enable_dispatch> <== NOT EXECUTED 282ac: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 282b0: e28dd00c add sp, sp, #12 ; 0xc 282b4: e8bd8070 pop {r4, r5, r6, pc} 282b8: 0005717c .word 0x0005717c 282bc: 000566ec .word 0x000566ec 0001e750 : void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 1e750: e59f1004 ldr r1, [pc, #4] ; 1e75c <== NOT EXECUTED 1e754: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1e758: eaffff79 b 1e544 <== NOT EXECUTED 1e75c: 00005128 .word 0x00005128 0001e544 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 1e544: 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 ) 1e548: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 1e54c: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED 1e550: e1a06000 mov r6, 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 ) 1e554: 0a000071 beq 1e720 <== NOT EXECUTED return; (*print)( context, "Period information by period\n" ); 1e558: e59f11c8 ldr r1, [pc, #456] ; 1e728 <== NOT EXECUTED 1e55c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e560: e12fff15 bx r5 <== NOT EXECUTED #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 1e564: e59f11c0 ldr r1, [pc, #448] ; 1e72c <== NOT EXECUTED 1e568: e1a00006 mov r0, r6 <== NOT EXECUTED 1e56c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e570: e12fff15 bx r5 <== NOT EXECUTED #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 1e574: e59f11b4 ldr r1, [pc, #436] ; 1e730 <== NOT EXECUTED 1e578: e1a00006 mov r0, r6 <== NOT EXECUTED 1e57c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e580: e12fff15 bx r5 <== NOT EXECUTED Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 1e584: e59f11a8 ldr r1, [pc, #424] ; 1e734 <== NOT EXECUTED 1e588: e1a00006 mov r0, r6 <== NOT EXECUTED 1e58c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e590: e12fff15 bx r5 <== NOT EXECUTED #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 1e594: e1a00006 mov r0, r6 <== NOT EXECUTED 1e598: e59f1198 ldr r1, [pc, #408] ; 1e738 <== NOT EXECUTED 1e59c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e5a0: e12fff15 bx r5 <== 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 ; 1e5a4: e59f3190 ldr r3, [pc, #400] ; 1e73c <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1e5a8: e28d8010 add r8, sp, #16 ; 0x10 <== 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 ; 1e5ac: e5937008 ldr r7, [r3, #8] <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 1e5b0: e2889018 add r9, r8, #24 ; 0x18 <== NOT EXECUTED 1e5b4: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 1e5b8: e288a030 add sl, r8, #48 ; 0x30 <== NOT EXECUTED 1e5bc: ea000051 b 1e708 <== NOT EXECUTED * 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 ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1e5c0: eb0026f7 bl 281a4 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) 1e5c4: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 1e5c8: 1a00004d bne 1e704 <== NOT EXECUTED continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 1e5cc: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED 1e5d0: e1a00007 mov r0, r7 <== NOT EXECUTED 1e5d4: eb00270e bl 28214 <== NOT EXECUTED continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 1e5d8: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED 1e5dc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 1e5e0: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 1e5e4: 128d206b addne r2, sp, #107 ; 0x6b <== NOT EXECUTED 1e5e8: 13a01005 movne r1, #5 ; 0x5 <== NOT EXECUTED 1e5ec: 1bffa3d9 blne 7558 <== NOT EXECUTED /* * Print part of report line that is not dependent on granularity */ (*print)( context, 1e5f0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1e5f4: e58d3000 str r3, [sp] <== NOT EXECUTED 1e5f8: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 1e5fc: e1a02007 mov r2, r7 <== NOT EXECUTED 1e600: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 1e604: e59f1134 ldr r1, [pc, #308] ; 1e740 <== NOT EXECUTED 1e608: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED 1e60c: e1a00006 mov r0, r6 <== NOT EXECUTED 1e610: e1a0e00f mov lr, pc <== NOT EXECUTED 1e614: e12fff15 bx r5 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 1e618: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1e61c: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 1e620: e1a0200b mov r2, fp <== NOT EXECUTED 1e624: e1a00009 mov r0, r9 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 1e628: 1a000004 bne 1e640 <== NOT EXECUTED (*print)( context, "\n" ); 1e62c: e1a00006 mov r0, r6 <== NOT EXECUTED 1e630: e59f110c ldr r1, [pc, #268] ; 1e744 <== NOT EXECUTED 1e634: e1a0e00f mov lr, pc <== NOT EXECUTED 1e638: e12fff15 bx r5 <== NOT EXECUTED 1e63c: ea000030 b 1e704 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 1e640: eb000584 bl 1fc58 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 1e644: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED 1e648: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e64c: eb006f57 bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e650: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 1e654: e1a04000 mov r4, r0 <== NOT EXECUTED 1e658: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e65c: e59d0024 ldr r0, [sp, #36] <== NOT EXECUTED 1e660: e58d3000 str r3, [sp] <== NOT EXECUTED 1e664: eb006f51 bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e668: e59d3060 ldr r3, [sp, #96] <== NOT EXECUTED 1e66c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED 1e670: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e674: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 1e678: e58d3008 str r3, [sp, #8] <== NOT EXECUTED 1e67c: eb006f4b bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e680: e1a03004 mov r3, r4 <== NOT EXECUTED 1e684: e58d000c str r0, [sp, #12] <== NOT EXECUTED 1e688: e59f10b8 ldr r1, [pc, #184] ; 1e748 <== NOT EXECUTED 1e68c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 1e690: e1a00006 mov r0, r6 <== NOT EXECUTED 1e694: e1a0e00f mov lr, pc <== NOT EXECUTED 1e698: e12fff15 bx r5 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 1e69c: e1a0200b mov r2, fp <== NOT EXECUTED 1e6a0: e1a0000a mov r0, sl <== NOT EXECUTED 1e6a4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 1e6a8: eb00056a bl 1fc58 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 1e6ac: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e6b0: e59d0034 ldr r0, [sp, #52] <== NOT EXECUTED 1e6b4: eb006f3d bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e6b8: e59d3038 ldr r3, [sp, #56] <== NOT EXECUTED 1e6bc: e1a04000 mov r4, r0 <== NOT EXECUTED 1e6c0: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e6c4: e59d003c ldr r0, [sp, #60] <== NOT EXECUTED 1e6c8: e58d3000 str r3, [sp] <== NOT EXECUTED 1e6cc: eb006f37 bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e6d0: e59d3060 ldr r3, [sp, #96] <== NOT EXECUTED 1e6d4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED 1e6d8: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1e6dc: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 1e6e0: e58d3008 str r3, [sp, #8] <== NOT EXECUTED 1e6e4: eb006f31 bl 3a3b0 <__aeabi_idiv> <== NOT EXECUTED 1e6e8: e1a03004 mov r3, r4 <== NOT EXECUTED 1e6ec: e58d000c str r0, [sp, #12] <== NOT EXECUTED 1e6f0: e59f1054 ldr r1, [pc, #84] ; 1e74c <== NOT EXECUTED 1e6f4: e1a00006 mov r0, r6 <== NOT EXECUTED 1e6f8: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED 1e6fc: e1a0e00f mov lr, pc <== NOT EXECUTED 1e700: e12fff15 bx r5 <== 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 ; id++ ) { 1e704: e2877001 add r7, r7, #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 ; 1e708: e59f202c ldr r2, [pc, #44] ; 1e73c <== NOT EXECUTED 1e70c: e592300c ldr r3, [r2, #12] <== NOT EXECUTED 1e710: e1570003 cmp r7, r3 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1e714: e1a00007 mov r0, r7 <== NOT EXECUTED 1e718: e1a01008 mov r1, r8 <== 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 ; 1e71c: 9affffa7 bls 1e5c0 <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 1e720: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED 1e724: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 1e728: 00041475 .word 0x00041475 1e72c: 00041493 .word 0x00041493 1e730: 000414b5 .word 0x000414b5 1e734: 000414d8 .word 0x000414d8 1e738: 00041523 .word 0x00041523 1e73c: 0005717c .word 0x0005717c 1e740: 0004156f .word 0x0004156f 1e744: 000417e0 .word 0x000417e0 1e748: 00041586 .word 0x00041586 1e74c: 000415a5 .word 0x000415a5 0001e760 : 1e760: e59f303c ldr r3, [pc, #60] ; 1e7a4 <== NOT EXECUTED 1e764: e5932000 ldr r2, [r3] <== NOT EXECUTED 1e768: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 1e76c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 1e770: 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 ; 1e774: e59f302c ldr r3, [pc, #44] ; 1e7a8 <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 1e778: e1a05003 mov r5, 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 ; 1e77c: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED 1e780: ea000000 b 1e788 <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 1e784: eb000008 bl 1e7ac <== 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 ; 1e788: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 1e78c: e1540003 cmp r4, r3 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 1e790: e1a00004 mov r0, r4 <== 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 ; id++ ) { 1e794: 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 ; 1e798: 9afffff9 bls 1e784 <== NOT EXECUTED /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 1e79c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 1e7a0: eaffac4d b 98dc <_Thread_Enable_dispatch> <== NOT EXECUTED 1e7a4: 0005662c .word 0x0005662c 1e7a8: 0005717c .word 0x0005717c 0001e7ac : */ rtems_status_code rtems_rate_monotonic_reset_statistics( Objects_Id id ) { 1e7ac: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 1e7b0: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 1e7b4: 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 *) 1e7b8: e1a0200d mov r2, sp <== NOT EXECUTED 1e7bc: e59f0048 ldr r0, [pc, #72] ; 1e80c <== NOT EXECUTED 1e7c0: ebffaa04 bl 8fd8 <_Objects_Get> <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1e7c4: e59d5000 ldr r5, [sp] <== NOT EXECUTED 1e7c8: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 1e7cc: e1a04000 mov r4, r0 <== NOT EXECUTED 1e7d0: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 1e7d4: 1a00000a bne 1e804 <== NOT EXECUTED case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 1e7d8: e1a01005 mov r1, r5 <== NOT EXECUTED 1e7dc: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 1e7e0: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 1e7e4: eb003833 bl 2c8b8 <== NOT EXECUTED 1e7e8: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED 1e7ec: e5843078 str r3, [r4, #120] <== NOT EXECUTED 1e7f0: e584305c str r3, [r4, #92] <== NOT EXECUTED 1e7f4: e5843060 str r3, [r4, #96] <== NOT EXECUTED 1e7f8: e5843074 str r3, [r4, #116] <== NOT EXECUTED _Thread_Enable_dispatch(); 1e7fc: ebffac36 bl 98dc <_Thread_Enable_dispatch> <== NOT EXECUTED 1e800: e1a00005 mov r0, r5 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1e804: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 1e808: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 1e80c: 0005717c .word 0x0005717c 0000f614 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { f614: e92d40f0 push {r4, r5, r6, r7, lr} Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) f618: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { f61c: e1a04000 mov r4, r0 f620: e24dd008 sub sp, sp, #8 ; 0x8 f624: 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 ) f628: 03a04009 moveq r4, #9 ; 0x9 f62c: 0a000029 beq f6d8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ f630: e59f30ac ldr r3, [pc, #172] ; f6e4 f634: e5930000 ldr r0, [r3] f638: eb0008ec bl 119f0 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) f63c: e1a01004 mov r1, r4 f640: e59f00a0 ldr r0, [pc, #160] ; f6e8 f644: e1a0200d mov r2, sp f648: eb000f65 bl 133e4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { f64c: e59d5000 ldr r5, [sp] f650: e3550000 cmp r5, #0 ; 0x0 f654: e1a04000 mov r4, r0 f658: 0a000003 beq f66c f65c: e3550001 cmp r5, #1 ; 0x1 f660: 03a04004 moveq r4, #4 ; 0x4 f664: 1a000017 bne f6c8 f668: ea000017 b f6cc case OBJECTS_LOCAL: heap_status = _Heap_Extend( f66c: e1a01007 mov r1, r7 f670: e1a02006 mov r2, r6 f674: e2800068 add r0, r0, #104 ; 0x68 f678: e28d3004 add r3, sp, #4 ; 0x4 f67c: eb000bd5 bl 125d8 <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { f680: e3500001 cmp r0, #1 ; 0x1 f684: 03a04009 moveq r4, #9 ; 0x9 f688: 0a00000f beq f6cc f68c: 3a000002 bcc f69c f690: e3500002 cmp r0, #2 ; 0x2 f694: 1a00000b bne f6c8 f698: ea000008 b f6c0 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; f69c: e59d1004 ldr r1, [sp, #4] f6a0: e5942054 ldr r2, [r4, #84] the_region->maximum_segment_size += amount_extended; f6a4: e594305c ldr r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; f6a8: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; f6ac: e0833001 add r3, r3, r1 f6b0: e584305c str r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; f6b4: e5842054 str r2, [r4, #84] the_region->maximum_segment_size += amount_extended; f6b8: e1a04005 mov r4, r5 f6bc: ea000002 b f6cc return_status = RTEMS_SUCCESSFUL; break; f6c0: e3a04018 mov r4, #24 ; 0x18 f6c4: ea000000 b f6cc f6c8: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); f6cc: e59f3010 ldr r3, [pc, #16] ; f6e4 f6d0: e5930000 ldr r0, [r3] f6d4: eb0008e1 bl 11a60 <_API_Mutex_Unlock> return return_status; } f6d8: e1a00004 mov r0, r4 f6dc: e28dd008 add sp, sp, #8 ; 0x8 f6e0: e8bd80f0 pop {r4, r5, r6, r7, pc} f6e4: 000300bc .word 0x000300bc f6e8: 0002fe94 .word 0x0002fe94 0000fa10 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { fa10: 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 ) fa14: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { fa18: e24dd010 sub sp, sp, #16 ; 0x10 fa1c: e1a04000 mov r4, r0 fa20: e1a06001 mov r6, r1 fa24: e1a07002 mov r7, r2 uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) fa28: 0a000029 beq fad4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); fa2c: e59f80b0 ldr r8, [pc, #176] ; fae4 fa30: e5980000 ldr r0, [r8] fa34: eb0007ed bl 119f0 <_API_Mutex_Lock> fa38: e1a01004 mov r1, r4 fa3c: e59f00a4 ldr r0, [pc, #164] ; fae8 fa40: e28d2008 add r2, sp, #8 ; 0x8 fa44: eb000e66 bl 133e4 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { fa48: e59d3008 ldr r3, [sp, #8] fa4c: e3530000 cmp r3, #0 ; 0x0 fa50: e1a05000 mov r5, r0 fa54: 0a000005 beq fa70 fa58: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); fa5c: e5980000 ldr r0, [r8] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { fa60: 03a04004 moveq r4, #4 ; 0x4 fa64: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); fa68: eb0007fc bl 11a60 <_API_Mutex_Unlock> fa6c: ea000019 b fad8 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( fa70: e28d3004 add r3, sp, #4 ; 0x4 fa74: e28dc00c add ip, sp, #12 ; 0xc fa78: e1a01006 mov r1, r6 fa7c: e1a02007 mov r2, r7 fa80: e2800068 add r0, r0, #104 ; 0x68 fa84: e58dc000 str ip, [sp] fa88: eb000c50 bl 12bd0 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; fa8c: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) fa90: e2504000 subs r4, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; fa94: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) fa98: 1a000005 bne fab4 fa9c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED faa0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED faa4: 0a000002 beq fab4 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ faa8: e1a00005 mov r0, r5 <== NOT EXECUTED faac: eb001f4f bl 177f0 <_Region_Process_queue> <== NOT EXECUTED fab0: ea000008 b fad8 <== NOT EXECUTED else _RTEMS_Unlock_allocator(); fab4: e59f3028 ldr r3, [pc, #40] ; fae4 fab8: e5930000 ldr r0, [r3] fabc: eb0007e7 bl 11a60 <_API_Mutex_Unlock> return fac0: e3540000 cmp r4, #0 ; 0x0 fac4: 0a000003 beq fad8 fac8: e3540001 cmp r4, #1 ; 0x1 facc: 0284400c addeq r4, r4, #12 ; 0xc fad0: 0a000000 beq fad8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; fad4: e3a04009 mov r4, #9 ; 0x9 } fad8: e1a00004 mov r0, r4 fadc: e28dd010 add sp, sp, #16 ; 0x10 fae0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} fae4: 000300bc .word 0x000300bc fae8: 0002fe94 .word 0x0002fe94 000040b4 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40b4: 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 ) ) 40b8: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40bc: e24dd018 sub sp, sp, #24 ; 0x18 40c0: e1a07001 mov r7, r1 40c4: e1a04002 mov r4, r2 40c8: e1a08003 mov r8, r3 40cc: e59d9038 ldr r9, [sp, #56] register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 40d0: 02800003 addeq r0, r0, #3 ; 0x3 40d4: 0a000062 beq 4264 return RTEMS_INVALID_NAME; if ( !id ) 40d8: e3590000 cmp r9, #0 ; 0x0 40dc: 03a00009 moveq r0, #9 ; 0x9 40e0: 0a00005f beq 4264 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 40e4: e21220c0 ands r2, r2, #192 ; 0xc0 40e8: 0a000008 beq 4110 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 40ec: e2043030 and r3, r4, #48 ; 0x30 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40f0: e3530010 cmp r3, #16 ; 0x10 40f4: 0a000001 beq 4100 40f8: e3530020 cmp r3, #32 ; 0x20 40fc: 1a000057 bne 4260 4100: e3140004 tst r4, #4 ; 0x4 4104: 0a000055 beq 4260 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4108: e35200c0 cmp r2, #192 ; 0xc0 410c: 0a000053 beq 4260 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 4110: e2146030 ands r6, r4, #48 ; 0x30 4114: 0a000002 beq 4124 4118: e3570001 cmp r7, #1 ; 0x1 411c: 83a0000a movhi r0, #10 ; 0xa 4120: 8a00004f bhi 4264 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4124: e59f2140 ldr r2, [pc, #320] ; 426c 4128: e5923000 ldr r3, [r2] 412c: e2833001 add r3, r3, #1 ; 0x1 4130: 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 ); 4134: e59f0134 ldr r0, [pc, #308] ; 4270 4138: eb000500 bl 5540 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 413c: e2505000 subs r5, r0, #0 ; 0x0 4140: 1a000002 bne 4150 _Thread_Enable_dispatch(); 4144: eb00084b bl 6278 <_Thread_Enable_dispatch> 4148: e3a00005 mov r0, #5 ; 0x5 414c: ea000044 b 4264 * 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 ) ) { 4150: e3560000 cmp r6, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 4154: e5854010 str r4, [r5, #16] * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 4158: 0a000029 beq 4204 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 415c: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4160: 13a03002 movne r3, #2 ; 0x2 */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 4164: 1a000004 bne 417c the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4168: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 416c: 13a03003 movne r3, #3 ; 0x3 if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4170: 1a000001 bne 417c the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 4174: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 4178: 13a03001 movne r3, #1 ; 0x1 else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 417c: e3560010 cmp r6, #16 ; 0x10 else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 4180: e58d3008 str r3, [sp, #8] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 4184: 13a03002 movne r3, #2 ; 0x2 4188: 158d3000 strne r3, [sp] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 418c: 1a00000b bne 41c0 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 4190: 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; 4194: e3a03000 mov r3, #0 ; 0x0 4198: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 419c: e3520003 cmp r2, #3 ; 0x3 41a0: 979ff102 ldrls pc, [pc, r2, lsl #2] 41a4: ea000007 b 41c8 <== NOT EXECUTED 41a8: 000041c0 .word 0x000041c0 <== NOT EXECUTED 41ac: 000041c0 .word 0x000041c0 <== NOT EXECUTED 41b0: 000041b8 .word 0x000041b8 <== NOT EXECUTED 41b4: 000041b8 .word 0x000041b8 <== 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; 41b8: e3a03001 mov r3, #1 ; 0x1 41bc: ea000000 b 41c4 break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 41c0: e3a03000 mov r3, #0 ; 0x0 41c4: e5cd3004 strb r3, [sp, #4] } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 41c8: e3570001 cmp r7, #1 ; 0x1 41cc: 13a02000 movne r2, #0 ; 0x0 41d0: 03a02001 moveq r2, #1 ; 0x1 41d4: e2850014 add r0, r5, #20 ; 0x14 41d8: 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; 41dc: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 41e0: eb0002ff bl 4de4 <_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 ) { 41e4: e3500006 cmp r0, #6 ; 0x6 41e8: 1a000012 bne 4238 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 41ec: e59f007c ldr r0, [pc, #124] ; 4270 <== NOT EXECUTED 41f0: e1a01005 mov r1, r5 <== NOT EXECUTED 41f4: eb0005a0 bl 587c <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 41f8: eb00081e bl 6278 <_Thread_Enable_dispatch> <== NOT EXECUTED 41fc: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 4200: ea000017 b 4264 <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 4204: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 4208: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 420c: 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; 4210: 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( 4214: e1a02007 mov r2, r7 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4218: 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( 421c: e2850014 add r0, r5, #20 ; 0x14 4220: 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; 4224: 058d6014 streq r6, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4228: 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; 422c: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 4230: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 4234: eb0003b7 bl 5118 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4238: e59f3030 ldr r3, [pc, #48] ; 4270 423c: e5952008 ldr r2, [r5, #8] 4240: e593101c ldr r1, [r3, #28] 4244: e1d530b8 ldrh r3, [r5, #8] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4248: e585a00c str sl, [r5, #12] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 424c: e7815103 str r5, [r1, r3, lsl #2] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 4250: e5892000 str r2, [r9] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 4254: eb000807 bl 6278 <_Thread_Enable_dispatch> 4258: e3a00000 mov r0, #0 ; 0x0 425c: ea000000 b 4264 return RTEMS_SUCCESSFUL; 4260: e3a0000b mov r0, #11 ; 0xb } 4264: e28dd018 add sp, sp, #24 ; 0x18 4268: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 426c: 0001620c .word 0x0001620c 4270: 0001612c .word 0x0001612c 0001e8a4 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 1e8a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) 1e8a8: e24dd004 sub sp, sp, #4 ; 0x4 1e8ac: e1a01000 mov r1, r0 1e8b0: e1a0200d mov r2, sp 1e8b4: e59f0048 ldr r0, [pc, #72] ; 1e904 1e8b8: ebffa9c6 bl 8fd8 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 1e8bc: e59d2000 ldr r2, [sp] 1e8c0: e3520000 cmp r2, #0 ; 0x0 1e8c4: 13a00004 movne r0, #4 ; 0x4 1e8c8: 1a00000b bne 1e8fc case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 1e8cc: e5903010 ldr r3, [r0, #16] 1e8d0: e2131030 ands r1, r3, #48 ; 0x30 1e8d4: e2800014 add r0, r0, #20 ; 0x14 1e8d8: 0a000003 beq 1e8ec _CORE_mutex_Flush( 1e8dc: e1a01002 mov r1, r2 1e8e0: e3a02001 mov r2, #1 ; 0x1 1e8e4: ebffa65e bl 8264 <_CORE_mutex_Flush> 1e8e8: ea000001 b 1e8f4 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 1e8ec: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 1e8f0: ebffa728 bl 8598 <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 1e8f4: ebffabf8 bl 98dc <_Thread_Enable_dispatch> 1e8f8: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1e8fc: e28dd004 add sp, sp, #4 ; 0x4 1e900: e8bd8000 pop {pc} 1e904: 00056560 .word 0x00056560 00013b28 : */ void rtems_shutdown_executive( uint32_t result ) { 13b28: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 13b2c: e59f2024 ldr r2, [pc, #36] ; 13b58 13b30: e5923000 ldr r3, [r2] 13b34: e3530004 cmp r3, #4 ; 0x4 */ void rtems_shutdown_executive( uint32_t result ) { 13b38: e24dd030 sub sp, sp, #48 ; 0x30 13b3c: 13a03004 movne r3, #4 ; 0x4 Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 13b40: 11a0000d movne r0, sp 13b44: 159f1010 ldrne r1, [pc, #16] ; 13b5c 13b48: 15823000 strne r3, [r2] 13b4c: 1bffcedc blne 76c4 <_CPU_Context_switch> if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 13b50: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 13b54: e8bd8000 pop {pc} <== NOT EXECUTED 13b58: 000163b4 .word 0x000163b4 13b5c: 000161dc .word 0x000161dc 00002a84 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 2a84: e59f3084 ldr r3, [pc, #132] ; 2b10 <== NOT EXECUTED 2a88: e5933000 ldr r3, [r3] <== NOT EXECUTED /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 2a8c: e1a0c00d mov ip, sp <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 2a90: e59300c8 ldr r0, [r3, #200] <== NOT EXECUTED /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 2a94: e92dd810 push {r4, fp, ip, lr, pc} <== NOT EXECUTED 2a98: e24cb004 sub fp, ip, #4 ; 0x4 <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 2a9c: e15b0000 cmp fp, r0 <== NOT EXECUTED 2aa0: 33a04000 movcc r4, #0 ; 0x0 <== NOT EXECUTED 2aa4: 3a000004 bcc 2abc <== NOT EXECUTED 2aa8: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED 2aac: e0803003 add r3, r0, r3 <== NOT EXECUTED 2ab0: e15b0003 cmp fp, r3 <== NOT EXECUTED 2ab4: 83a04000 movhi r4, #0 ; 0x0 <== NOT EXECUTED 2ab8: 93a04001 movls r4, #1 ; 0x1 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 2abc: e59f3050 ldr r3, [pc, #80] ; 2b14 <== NOT EXECUTED 2ac0: e5933000 ldr r3, [r3] <== NOT EXECUTED 2ac4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2ac8: 03a01001 moveq r1, #1 ; 0x1 <== NOT EXECUTED 2acc: 0a000005 beq 2ae8 <== NOT EXECUTED pattern_ok = (!memcmp( 2ad0: e59f1040 ldr r1, [pc, #64] ; 2b18 <== NOT EXECUTED 2ad4: e2800008 add r0, r0, #8 ; 0x8 <== NOT EXECUTED 2ad8: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED 2adc: eb00a6ba bl 2c5cc <== NOT EXECUTED 2ae0: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED 2ae4: 33a01000 movcc r1, #0 ; 0x0 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 2ae8: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 2aec: 0a000002 beq 2afc <== NOT EXECUTED 2af0: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED 2af4: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 2af8: 189da810 ldmne sp, {r4, fp, sp, pc} <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 2afc: e59f300c ldr r3, [pc, #12] ; 2b10 <== NOT EXECUTED 2b00: e5930000 ldr r0, [r3] <== NOT EXECUTED 2b04: ebffffc4 bl 2a1c <== NOT EXECUTED 2b08: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return true; } 2b0c: e89da810 ldm sp, {r4, fp, sp, pc} <== NOT EXECUTED 2b10: 000566e4 .word 0x000566e4 2b14: 00043448 .word 0x00043448 2b18: 00056494 .word 0x00056494 00002a0c : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 2a0c: e59f1004 ldr r1, [pc, #4] ; 2a18 <== NOT EXECUTED 2a10: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 2a14: eaffffe1 b 29a0 <== NOT EXECUTED 2a18: 00005128 .word 0x00005128 000029a0 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 29a0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED print_context = context; 29a4: e59f704c ldr r7, [pc, #76] ; 29f8 <== NOT EXECUTED print_handler = print; 29a8: e59f604c ldr r6, [pc, #76] ; 29fc <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 29ac: e1a04001 mov r4, r1 <== NOT EXECUTED 29b0: e1a05000 mov r5, r0 <== NOT EXECUTED print_context = context; print_handler = print; 29b4: e5861000 str r1, [r6] <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 29b8: e5870000 str r0, [r7] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 29bc: e59f103c ldr r1, [pc, #60] ; 2a00 <== NOT EXECUTED 29c0: e1a0e00f mov lr, pc <== NOT EXECUTED 29c4: e12fff14 bx r4 <== NOT EXECUTED (*print)( context, 29c8: e59f1034 ldr r1, [pc, #52] ; 2a04 <== NOT EXECUTED 29cc: e1a00005 mov r0, r5 <== NOT EXECUTED 29d0: e1a0e00f mov lr, pc <== NOT EXECUTED 29d4: 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 ); 29d8: e59f0028 ldr r0, [pc, #40] ; 2a08 <== NOT EXECUTED 29dc: eb0017f8 bl 89c4 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 29e0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 29e4: ebffff96 bl 2844 <== NOT EXECUTED print_context = NULL; 29e8: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED print_handler = NULL; 29ec: 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; 29f0: e5873000 str r3, [r7] <== NOT EXECUTED print_handler = NULL; } 29f4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 29f8: 4c .byte 0x4c 29f9: 34 .byte 0x34 29fa: 0004 .short 0x0004 29fc: 00043450 .word 0x00043450 2a00: 0003f458 .word 0x0003f458 2a04: 0003f46f .word 0x0003f46f 2a08: 00002844 .word 0x00002844 0001ed58 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 1ed58: e92d40f0 push {r4, r5, r6, r7, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 1ed5c: e2516000 subs r6, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 1ed60: e24dd004 sub sp, sp, #4 ; 0x4 1ed64: e1a07002 mov r7, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 1ed68: 03a00009 moveq r0, #9 ; 0x9 1ed6c: 0a000022 beq 1edfc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1ed70: e1a0100d mov r1, sp 1ed74: ebffaae1 bl 9900 <_Thread_Get> switch (location) { 1ed78: e59d3000 ldr r3, [sp] rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1ed7c: e1a05000 mov r5, r0 switch (location) { 1ed80: e3530000 cmp r3, #0 ; 0x0 1ed84: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 1ed88: 05954114 ldreq r4, [r5, #276] if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 1ed8c: 0a000008 beq 1edb4 1ed90: ea000019 b 1edfc <== NOT EXECUTED /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 1ed94: e5943004 ldr r3, [r4, #4] 1ed98: e1530006 cmp r3, r6 1ed9c: 1a000003 bne 1edb0 tvp->dtor = dtor; 1eda0: e5847010 str r7, [r4, #16] _Thread_Enable_dispatch(); 1eda4: ebffaacc bl 98dc <_Thread_Enable_dispatch> 1eda8: e3a00000 mov r0, #0 ; 0x0 1edac: ea000012 b 1edfc return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 1edb0: e5944000 ldr r4, [r4] case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 1edb4: e3540000 cmp r4, #0 ; 0x0 1edb8: 1afffff5 bne 1ed94 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 1edbc: e3a00014 mov r0, #20 ; 0x14 1edc0: ebffafae bl ac80 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 1edc4: e3500000 cmp r0, #0 ; 0x0 1edc8: 1a000002 bne 1edd8 _Thread_Enable_dispatch(); 1edcc: ebffaac2 bl 98dc <_Thread_Enable_dispatch> 1edd0: e3a0001a mov r0, #26 ; 0x1a 1edd4: ea000008 b 1edfc } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 1edd8: e5952114 ldr r2, [r5, #276] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 1eddc: e5963000 ldr r3, [r6] new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 1ede0: e5850114 str r0, [r5, #276] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 1ede4: e5803008 str r3, [r0, #8] new->ptr = ptr; 1ede8: e5806004 str r6, [r0, #4] new->dtor = dtor; 1edec: e5807010 str r7, [r0, #16] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 1edf0: e5802000 str r2, [r0] the_thread->task_variables = new; _Thread_Enable_dispatch(); 1edf4: ebffaab8 bl 98dc <_Thread_Enable_dispatch> 1edf8: e1a00004 mov r0, r4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1edfc: e28dd004 add sp, sp, #4 ; 0x4 1ee00: e8bd80f0 pop {r4, r5, r6, r7, pc} 0001ee04 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 1ee04: e92d4010 push {r4, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 1ee08: e2514000 subs r4, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 1ee0c: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 1ee10: 0a000018 beq 1ee78 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 1ee14: e1a0100d mov r1, sp 1ee18: ebffaab8 bl 9900 <_Thread_Get> switch (location) { 1ee1c: e59d3000 ldr r3, [sp] 1ee20: e3530000 cmp r3, #0 ; 0x0 1ee24: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 1ee28: 01a02003 moveq r2, r3 1ee2c: 05901114 ldreq r1, [r0, #276] return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 1ee30: 0a00000d beq 1ee6c 1ee34: ea000010 b 1ee7c <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 1ee38: e5913004 ldr r3, [r1, #4] 1ee3c: e1530004 cmp r3, r4 1ee40: 1a000007 bne 1ee64 1ee44: e5913000 ldr r3, [r1] if (prev) 1ee48: e3520000 cmp r2, #0 ; 0x0 prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 1ee4c: 05803114 streq r3, [r0, #276] case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 1ee50: 15823000 strne r3, [r2] else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 1ee54: eb000028 bl 1eefc <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 1ee58: ebffaa9f bl 98dc <_Thread_Enable_dispatch> 1ee5c: e3a00000 mov r0, #0 ; 0x0 1ee60: ea000005 b 1ee7c return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 1ee64: e1a02001 mov r2, r1 1ee68: e5911000 ldr r1, [r1] the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 1ee6c: e3510000 cmp r1, #0 ; 0x0 1ee70: 1afffff0 bne 1ee38 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1ee74: ebffaa98 bl 98dc <_Thread_Enable_dispatch> 1ee78: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1ee7c: e28dd004 add sp, sp, #4 ; 0x4 1ee80: e8bd8010 pop {r4, pc} 0001ee84 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1ee84: e92d4030 push {r4, r5, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1ee88: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1ee8c: e24dd004 sub sp, sp, #4 ; 0x4 1ee90: e1a04002 mov r4, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1ee94: 0a000015 beq 1eef0 return RTEMS_INVALID_ADDRESS; if ( !result ) 1ee98: e3520000 cmp r2, #0 ; 0x0 1ee9c: 0a000013 beq 1eef0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1eea0: e1a0100d mov r1, sp 1eea4: ebffaa95 bl 9900 <_Thread_Get> switch (location) { 1eea8: e59d3000 ldr r3, [sp] 1eeac: e3530000 cmp r3, #0 ; 0x0 1eeb0: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 1eeb4: 05900114 ldreq r0, [r0, #276] if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 1eeb8: 0a000009 beq 1eee4 1eebc: ea00000c b 1eef4 <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 1eec0: e5903004 ldr r3, [r0, #4] 1eec4: e1530005 cmp r3, r5 1eec8: 1a000004 bne 1eee0 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 1eecc: e590300c ldr r3, [r0, #12] 1eed0: e5843000 str r3, [r4] _Thread_Enable_dispatch(); 1eed4: ebffaa80 bl 98dc <_Thread_Enable_dispatch> 1eed8: e3a00000 mov r0, #0 ; 0x0 1eedc: ea000004 b 1eef4 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 1eee0: e5900000 ldr r0, [r0] case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 1eee4: e3500000 cmp r0, #0 ; 0x0 1eee8: 1afffff4 bne 1eec0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1eeec: ebffaa7a bl 98dc <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 1eef0: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1eef4: e28dd004 add sp, sp, #4 ; 0x4 1eef8: e8bd8030 pop {r4, r5, pc} 00001f50 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 1f50: e59f3018 ldr r3, [pc, #24] ; 1f70 <== NOT EXECUTED 1f54: e5830000 str r0, [r3] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 1f58: e59f3014 ldr r3, [pc, #20] ; 1f74 <== NOT EXECUTED 1f5c: e5831000 str r1, [r3] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 1f60: e59f3010 ldr r3, [pc, #16] ; 1f78 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 1f64: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; 1f68: e5832000 str r2, [r3] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 1f6c: e12fff1e bx lr <== NOT EXECUTED 1f70: 000149a0 .word 0x000149a0 1f74: 000149a4 .word 0x000149a4 1f78: 000149a8 .word 0x000149a8 000033e4 : { 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); 33e4: e59f316c ldr r3, [pc, #364] ; 3558 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 33e8: e590c000 ldr ip, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 33ec: e3a01000 mov r1, #0 ; 0x0 } } rtems_status_code rtems_termios_close (void *arg) { 33f0: e92d4030 push {r4, r5, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 33f4: e1a02001 mov r2, r1 } } rtems_status_code rtems_termios_close (void *arg) { 33f8: 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); 33fc: e5930000 ldr r0, [r3] rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3400: e59c4028 ldr r4, [ip, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3404: eb0003c3 bl 4318 if (sc != RTEMS_SUCCESSFUL) 3408: e3500000 cmp r0, #0 ; 0x0 340c: 1a00001d bne 3488 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 3410: e5943008 ldr r3, [r4, #8] 3414: e2433001 sub r3, r3, #1 ; 0x1 3418: e3530000 cmp r3, #0 ; 0x0 341c: e5843008 str r3, [r4, #8] 3420: 1a000047 bne 3544 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3424: e59420cc ldr r2, [r4, #204] 3428: e59f312c ldr r3, [pc, #300] ; 355c 342c: e0833282 add r3, r3, r2, lsl #5 3430: e5933004 ldr r3, [r3, #4] 3434: e3530000 cmp r3, #0 ; 0x0 3438: 0a000003 beq 344c /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 343c: e1a00004 mov r0, r4 <== NOT EXECUTED 3440: e1a0e00f mov lr, pc <== NOT EXECUTED 3444: e12fff13 bx r3 <== NOT EXECUTED 3448: ea000001 b 3454 <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 344c: e1a00004 mov r0, r4 3450: ebfffdee bl 2c10 } if (tty->device.outputUsesInterrupts 3454: e59430b4 ldr r3, [r4, #180] 3458: e3530002 cmp r3, #2 ; 0x2 345c: 1a00000a bne 348c == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 3460: e59400c4 ldr r0, [r4, #196] <== NOT EXECUTED 3464: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3468: eb000280 bl 3e70 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 346c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3470: 1a000004 bne 3488 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 3474: e59400c8 ldr r0, [r4, #200] <== NOT EXECUTED 3478: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 347c: eb00027b bl 3e70 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3480: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3484: 0a000000 beq 348c <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3488: eb00055c bl 4a00 <== NOT EXECUTED } if (tty->device.lastClose) 348c: e594309c ldr r3, [r4, #156] 3490: e3530000 cmp r3, #0 ; 0x0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 3494: 11a02005 movne r2, r5 3498: 1284000c addne r0, r4, #12 ; 0xc 349c: 18900003 ldmne r0, {r0, r1} 34a0: 11a0e00f movne lr, pc 34a4: 112fff13 bxne r3 if (tty->forw == NULL) { 34a8: e8940006 ldm r4, {r1, r2} 34ac: e3510000 cmp r1, #0 ; 0x0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 34b0: 15812004 strne r2, [r1, #4] if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { 34b4: 1a000003 bne 34c8 rtems_termios_ttyTail = tty->back; 34b8: e59f30a0 ldr r3, [pc, #160] ; 3560 if ( rtems_termios_ttyTail != NULL ) { 34bc: 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; 34c0: e5832000 str r2, [r3] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 34c4: 15821000 strne r1, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 34c8: e5941004 ldr r1, [r4, #4] 34cc: e5942000 ldr r2, [r4] 34d0: e3510000 cmp r1, #0 ; 0x0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 34d4: 15812000 strne r2, [r1] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 34d8: 1a000003 bne 34ec rtems_termios_ttyHead = tty->forw; 34dc: e59f3080 ldr r3, [pc, #128] ; 3564 if ( rtems_termios_ttyHead != NULL ) { 34e0: e3520000 cmp r2, #0 ; 0x0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 34e4: e5832000 str r2, [r3] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 34e8: 15821004 strne r1, [r2, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 34ec: e5940014 ldr r0, [r4, #20] 34f0: eb00035f bl 4274 rtems_semaphore_delete (tty->osem); 34f4: e5940018 ldr r0, [r4, #24] 34f8: eb00035d bl 4274 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 34fc: e594008c ldr r0, [r4, #140] 3500: eb00035b bl 4274 if ((tty->device.pollRead == NULL) || 3504: e59430a0 ldr r3, [r4, #160] 3508: e3530000 cmp r3, #0 ; 0x0 350c: 0a000002 beq 351c 3510: e59430b4 ldr r3, [r4, #180] 3514: e3530002 cmp r3, #2 ; 0x2 3518: 1a000001 bne 3524 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 351c: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED 3520: eb000353 bl 4274 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 3524: e5940058 ldr r0, [r4, #88] 3528: eb001479 bl 8714 free (tty->rawOutBuf.theBuf); 352c: e594007c ldr r0, [r4, #124] 3530: eb001477 bl 8714 free (tty->cbuf); 3534: e594001c ldr r0, [r4, #28] 3538: eb001475 bl 8714 free (tty); 353c: e1a00004 mov r0, r4 3540: eb001473 bl 8714 } rtems_semaphore_release (rtems_termios_ttyMutex); 3544: e59f300c ldr r3, [pc, #12] ; 3558 3548: e5930000 ldr r0, [r3] 354c: eb0003b7 bl 4430 return RTEMS_SUCCESSFUL; } 3550: e3a00000 mov r0, #0 ; 0x0 3554: e8bd8030 pop {r4, r5, pc} 3558: 00016120 .word 0x00016120 355c: 00015f0c .word 0x00015f0c 3560: 00016124 .word 0x00016124 3564: 00016128 .word 0x00016128 00002174 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2174: e5903090 ldr r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2178: e590c0b4 ldr ip, [r0, #180] <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 217c: e0833001 add r3, r3, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2180: 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) { 2184: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2188: e5803090 str r3, [r0, #144] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 218c: 1a000005 bne 21a8 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 2190: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 2194: e1a0100c mov r1, ip <== NOT EXECUTED 2198: eb000734 bl 3e70 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 219c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 21a0: 0a00000c beq 21d8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 21a4: eb000a15 bl 4a00 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 21a8: e59030cc ldr r3, [r0, #204] <== NOT EXECUTED 21ac: e3530005 cmp r3, #5 ; 0x5 <== NOT EXECUTED 21b0: 1a000006 bne 21d0 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 21b4: e59f3024 ldr r3, [pc, #36] ; 21e0 <== NOT EXECUTED 21b8: e59330b4 ldr r3, [r3, #180] <== NOT EXECUTED 21bc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 21c0: 0a000004 beq 21d8 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 21c4: e1a0e00f mov lr, pc <== NOT EXECUTED 21c8: e12fff13 bx r3 <== NOT EXECUTED 21cc: ea000001 b 21d8 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 21d0: 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); 21d4: eaffff6b b 1f88 <== NOT EXECUTED } } 21d8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 21dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 21e0: 00015f0c .word 0x00015f0c 000021e4 : * 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) { 21e4: 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) { 21e8: e59fc2b8 ldr ip, [pc, #696] ; 24a8 <== NOT EXECUTED 21ec: e59030cc ldr r3, [r0, #204] <== NOT EXECUTED 21f0: e08c3283 add r3, ip, r3, lsl #5 <== 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) { 21f4: e1a04000 mov r4, r0 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 21f8: e5930010 ldr r0, [r3, #16] <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 21fc: e24dd00c sub sp, sp, #12 ; 0xc <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 2200: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 2204: e58d1000 str r1, [sp] <== NOT EXECUTED 2208: e1a08002 mov r8, r2 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 220c: 11a0600c movne r6, ip <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 2210: 13a05000 movne r5, #0 ; 0x0 <== NOT EXECUTED 2214: 1a00000d bne 2250 <== 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, 2218: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 221c: e2843030 add r3, r4, #48 ; 0x30 <== NOT EXECUTED 2220: e1a05000 mov r5, r0 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 2224: e98d000c stmib sp, {r2, r3} <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2228: e1a0a000 mov sl, r0 <== NOT EXECUTED 222c: e1a09000 mov r9, r0 <== NOT EXECUTED 2230: ea000090 b 2478 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2234: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 2238: e59d2000 ldr r2, [sp] <== NOT EXECUTED 223c: e0863283 add r3, r6, r3, lsl #5 <== NOT EXECUTED 2240: e7d20005 ldrb r0, [r2, r5] <== NOT EXECUTED 2244: e1a0e00f mov lr, pc <== NOT EXECUTED 2248: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 224c: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 2250: e2588001 subs r8, r8, #1 ; 0x1 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2254: e1a01004 mov r1, r4 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 2258: 2afffff5 bcs 2234 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 225c: e59450e4 ldr r5, [r4, #228] <== NOT EXECUTED 2260: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 2264: 1a00008b bne 2498 <== NOT EXECUTED 2268: e59430dc ldr r3, [r4, #220] <== NOT EXECUTED 226c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2270: 0a000088 beq 2498 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2274: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2278: e59410e0 ldr r1, [r4, #224] <== NOT EXECUTED 227c: e1a0e00f mov lr, pc <== NOT EXECUTED 2280: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 2284: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 2288: e58430e4 str r3, [r4, #228] <== NOT EXECUTED 228c: ea000082 b 249c <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 2290: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 2294: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 2298: e59d3000 ldr r3, [sp] <== NOT EXECUTED 229c: e7d37009 ldrb r7, [r3, r9] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 22a0: 0a00000f beq 22e4 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 22a4: e5d4204a ldrb r2, [r4, #74] <== NOT EXECUTED 22a8: e1520007 cmp r2, r7 <== NOT EXECUTED 22ac: e5d43049 ldrb r3, [r4, #73] <== NOT EXECUTED 22b0: 1a000005 bne 22cc <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 22b4: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 22b8: 059430b8 ldreq r3, [r4, #184] <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 22bc: 159430b8 ldrne r3, [r4, #184] <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 22c0: 02233010 eoreq r3, r3, #16 ; 0x10 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 22c4: 13833010 orrne r3, r3, #16 ; 0x10 <== NOT EXECUTED 22c8: ea000003 b 22dc <== NOT EXECUTED } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 22cc: e1530007 cmp r3, r7 <== NOT EXECUTED 22d0: 1a000003 bne 22e4 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 22d4: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 22d8: e3c33010 bic r3, r3, #16 ; 0x10 <== NOT EXECUTED 22dc: e58430b8 str r3, [r4, #184] <== NOT EXECUTED 22e0: ea000001 b 22ec <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 22e4: e35a0000 cmp sl, #0 ; 0x0 <== NOT EXECUTED 22e8: 0a000016 beq 2348 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 22ec: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 22f0: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 22f4: e3530020 cmp r3, #32 ; 0x20 <== NOT EXECUTED 22f8: 1a000010 bne 2340 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 22fc: e10f6000 mrs r6, CPSR <== NOT EXECUTED 2300: e38630c0 orr r3, r6, #192 ; 0xc0 <== NOT EXECUTED 2304: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 2308: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 230c: e5942094 ldr r2, [r4, #148] <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2310: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2314: 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; 2318: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 231c: 0a000006 beq 233c <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 2320: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 2324: e594107c ldr r1, [r4, #124] <== NOT EXECUTED 2328: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 232c: e0811003 add r1, r1, r3 <== NOT EXECUTED 2330: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2334: e1a0e00f mov lr, pc <== NOT EXECUTED 2338: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 233c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 2340: e3a0a001 mov sl, #1 ; 0x1 <== NOT EXECUTED 2344: ea00004a b 2474 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 2348: e5940060 ldr r0, [r4, #96] <== NOT EXECUTED 234c: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 2350: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 2354: eb003f7e bl 12154 <__umodsi3> <== NOT EXECUTED 2358: e1a06000 mov r6, r0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 235c: e10fb000 mrs fp, CPSR <== NOT EXECUTED 2360: e38b30c0 orr r3, fp, #192 ; 0xc0 <== NOT EXECUTED 2364: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 2368: e594305c ldr r3, [r4, #92] <== NOT EXECUTED 236c: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 2370: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 2374: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 2378: e0800006 add r0, r0, r6 <== NOT EXECUTED 237c: eb003f74 bl 12154 <__umodsi3> <== NOT EXECUTED 2380: e59430c0 ldr r3, [r4, #192] <== NOT EXECUTED 2384: e1500003 cmp r0, r3 <== NOT EXECUTED 2388: 9a000025 bls 2424 <== NOT EXECUTED 238c: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 2390: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 2394: 1a000022 bne 2424 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 2398: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 239c: e3833001 orr r3, r3, #1 ; 0x1 <== NOT EXECUTED 23a0: e58430b8 str r3, [r4, #184] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 23a4: e59f3100 ldr r3, [pc, #256] ; 24ac <== NOT EXECUTED 23a8: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED 23ac: e0023003 and r3, r2, r3 <== NOT EXECUTED 23b0: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 23b4: 1a00000e bne 23f4 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 23b8: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 23bc: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 23c0: 1a000002 bne 23d0 <== NOT EXECUTED 23c4: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 23c8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 23cc: 1a000014 bne 2424 <== 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; 23d0: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 23d4: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 23d8: e58430b8 str r3, [r4, #184] <== NOT EXECUTED (*tty->device.write)(tty->minor, 23dc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 23e0: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 23e4: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 23e8: e1a0e00f mov lr, pc <== NOT EXECUTED 23ec: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 23f0: ea00000b b 2424 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 23f4: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 23f8: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 23fc: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2400: 1a000007 bne 2424 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2404: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2408: e59420ac ldr r2, [r4, #172] <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 240c: e3833004 orr r3, r3, #4 ; 0x4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2410: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2414: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor); 2418: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 241c: 11a0e00f movne lr, pc <== NOT EXECUTED 2420: 112fff12 bxne r2 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 2424: e129f00b msr CPSR_fc, fp <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 2428: e594305c ldr r3, [r4, #92] <== NOT EXECUTED 242c: e1560003 cmp r6, r3 <== NOT EXECUTED dropped++; 2430: 02855001 addeq r5, r5, #1 ; 0x1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2434: 0a00000e beq 2474 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 2438: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED 243c: e7c37006 strb r7, [r3, r6] <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2440: e59430e4 ldr r3, [r4, #228] <== NOT EXECUTED 2444: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 2448: e5846060 str r6, [r4, #96] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 244c: 1a000008 bne 2474 <== NOT EXECUTED 2450: e59430dc ldr r3, [r4, #220] <== NOT EXECUTED 2454: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2458: 0a000005 beq 2474 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 245c: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 2460: e59410e0 ldr r1, [r4, #224] <== NOT EXECUTED 2464: e1a0e00f mov lr, pc <== NOT EXECUTED 2468: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 246c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2470: e58420e4 str r2, [r4, #228] <== NOT EXECUTED 2474: e2899001 add r9, r9, #1 ; 0x1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2478: e2588001 subs r8, r8, #1 ; 0x1 <== NOT EXECUTED 247c: 2affff83 bcs 2290 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 2480: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED 2484: e0833005 add r3, r3, r5 <== NOT EXECUTED 2488: e5843078 str r3, [r4, #120] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 248c: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED 2490: eb0007e6 bl 4430 <== NOT EXECUTED 2494: ea000000 b 249c <== NOT EXECUTED return dropped; 2498: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED } 249c: e1a00005 mov r0, r5 <== NOT EXECUTED 24a0: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 24a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 24a8: 00015f0c .word 0x00015f0c 24ac: 00000402 .word 0x00000402 00003020 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 3020: 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; 3024: e5903000 ldr r3, [r0] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3028: 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; 302c: e5935028 ldr r5, [r3, #40] <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3030: e580100c str r1, [r0, #12] <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 3034: e1a06000 mov r6, r0 <== NOT EXECUTED 3038: 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); 303c: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 3040: 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; 3044: 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); 3048: eb0004b2 bl 4318 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 304c: e2508000 subs r8, r0, #0 ; 0x0 <== NOT EXECUTED 3050: 1a0000dc bne 33c8 <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 3054: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED 3058: e3520004 cmp r2, #4 ; 0x4 <== NOT EXECUTED 305c: 0a0000ad beq 3318 <== NOT EXECUTED 3060: 8a000005 bhi 307c <== NOT EXECUTED 3064: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED 3068: 0a000026 beq 3108 <== NOT EXECUTED 306c: 8a0000a2 bhi 32fc <== NOT EXECUTED 3070: e3520001 cmp r2, #1 ; 0x1 <== NOT EXECUTED 3074: 1a00000d bne 30b0 <== NOT EXECUTED 3078: ea000018 b 30e0 <== NOT EXECUTED 307c: e59f3354 ldr r3, [pc, #852] ; 33d8 <== NOT EXECUTED 3080: e1520003 cmp r2, r3 <== NOT EXECUTED 3084: 0a0000c2 beq 3394 <== NOT EXECUTED 3088: 8a000002 bhi 3098 <== NOT EXECUTED 308c: e3520005 cmp r2, #5 ; 0x5 <== NOT EXECUTED 3090: 1a000006 bne 30b0 <== NOT EXECUTED 3094: ea00009b b 3308 <== NOT EXECUTED 3098: e59f333c ldr r3, [pc, #828] ; 33dc <== NOT EXECUTED 309c: e1520003 cmp r2, r3 <== NOT EXECUTED 30a0: 0a0000b8 beq 3388 <== NOT EXECUTED 30a4: e2833105 add r3, r3, #1073741825 ; 0x40000001 <== NOT EXECUTED 30a8: e1520003 cmp r2, r3 <== NOT EXECUTED 30ac: 0a00009d beq 3328 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 30b0: e59520cc ldr r2, [r5, #204] <== NOT EXECUTED 30b4: e59f3324 ldr r3, [pc, #804] ; 33e0 <== NOT EXECUTED 30b8: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 30bc: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 30c0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30c4: 03a0800a moveq r8, #10 ; 0xa <== NOT EXECUTED 30c8: 0a0000bc beq 33c0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 30cc: e1a00005 mov r0, r5 <== NOT EXECUTED 30d0: e1a01006 mov r1, r6 <== NOT EXECUTED 30d4: e1a0e00f mov lr, pc <== NOT EXECUTED 30d8: e12fff13 bx r3 <== NOT EXECUTED 30dc: ea0000a7 b 3380 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 30e0: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED 30e4: e285c030 add ip, r5, #48 ; 0x30 <== NOT EXECUTED 30e8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30ec: e1a0e004 mov lr, r4 <== NOT EXECUTED 30f0: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 30f4: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30f8: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 30fc: e59c3000 ldr r3, [ip] <== NOT EXECUTED 3100: e58e3000 str r3, [lr] <== NOT EXECUTED 3104: ea0000ad b 33c0 <== NOT EXECUTED break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3108: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED 310c: e1a0e003 mov lr, r3 <== NOT EXECUTED 3110: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 3114: e285c030 add ip, r5, #48 ; 0x30 <== NOT EXECUTED 3118: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 311c: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 3120: 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) && 3124: 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; 3128: 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) && 312c: 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; 3130: 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) && 3134: 0a000019 beq 31a0 <== NOT EXECUTED 3138: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 313c: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 3140: 1a000016 bne 31a0 <== NOT EXECUTED !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 3144: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3148: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 314c: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3150: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3154: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 3158: 0a000010 beq 31a0 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 315c: e10f4000 mrs r4, CPSR <== NOT EXECUTED 3160: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED 3164: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 3168: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 316c: 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; 3170: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3174: 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; 3178: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 317c: 0a000006 beq 319c <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 3180: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED 3184: e595107c ldr r1, [r5, #124] <== NOT EXECUTED 3188: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 318c: e0811003 add r1, r1, r3 <== NOT EXECUTED 3190: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3194: e1a0e00f mov lr, pc <== NOT EXECUTED 3198: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 319c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 31a0: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 31a4: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED 31a8: 0a000008 beq 31d0 <== NOT EXECUTED 31ac: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 31b0: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 31b4: 1a000005 bne 31d0 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 31b8: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 31bc: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 31c0: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 31c4: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 31c8: e3c33002 bic r3, r3, #2 ; 0x2 <== NOT EXECUTED 31cc: e58530b8 str r3, [r5, #184] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 31d0: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 31d4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 31d8: 0a000010 beq 3220 <== NOT EXECUTED 31dc: e5953038 ldr r3, [r5, #56] <== NOT EXECUTED 31e0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 31e4: ba00000d blt 3220 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 31e8: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 31ec: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 31f0: e58530b8 str r3, [r5, #184] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 31f4: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 31f8: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 31fc: 0a000004 beq 3214 <== NOT EXECUTED 3200: e59530b0 ldr r3, [r5, #176] <== NOT EXECUTED 3204: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 3208: 15950010 ldrne r0, [r5, #16] <== NOT EXECUTED 320c: 11a0e00f movne lr, pc <== NOT EXECUTED 3210: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 3214: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED 3218: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED 321c: 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) { 3220: e5953038 ldr r3, [r5, #56] <== NOT EXECUTED 3224: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; 3228: b59530b8 ldrlt r3, [r5, #184] <== NOT EXECUTED 322c: b3833c01 orrlt r3, r3, #256 ; 0x100 <== NOT EXECUTED 3230: b58530b8 strlt r3, [r5, #184] <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 3234: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 3238: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 323c: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 3240: 13833b01 orrne r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3244: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 3248: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED 324c: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 3250: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED 3254: 13833c02 orrne r3, r3, #512 ; 0x200 <== NOT EXECUTED 3258: 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) { 325c: e595303c ldr r3, [r5, #60] <== NOT EXECUTED 3260: e2137002 ands r7, r3, #2 ; 0x2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3264: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3268: 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; 326c: 1585306c strne r3, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3270: 15853070 strne r3, [r5, #112] <== NOT EXECUTED 3274: 1a000018 bne 32dc <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); 3278: e1a0100d mov r1, sp <== NOT EXECUTED 327c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3280: eb000206 bl 3aa0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 3284: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3288: e5d54046 ldrb r4, [r5, #70] <== NOT EXECUTED 328c: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 3290: e0000493 mul r0, r3, r4 <== NOT EXECUTED 3294: eb003b6a bl 12044 <__aeabi_uidiv> <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 3298: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 329c: e5850054 str r0, [r5, #84] <== NOT EXECUTED 32a0: e5d53047 ldrb r3, [r5, #71] <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 32a4: 0a000006 beq 32c4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 32a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 32ac: 01a03000 moveq r3, r0 <== NOT EXECUTED 32b0: 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; 32b4: e585706c str r7, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 32b8: 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; 32bc: e5850070 str r0, [r5, #112] <== NOT EXECUTED 32c0: ea000005 b 32dc <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 32c4: 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; 32c8: 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; 32cc: 15854074 strne r4, [r5, #116] <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 32d0: 1585406c strne r4, [r5, #108] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 32d4: 15854070 strne r4, [r5, #112] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 32d8: 0585306c streq r3, [r5, #108] <== NOT EXECUTED } } } if (tty->device.setAttributes) 32dc: e59530a8 ldr r3, [r5, #168] <== NOT EXECUTED 32e0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 32e4: 0a000035 beq 33c0 <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 32e8: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 32ec: e2851030 add r1, r5, #48 ; 0x30 <== NOT EXECUTED 32f0: e1a0e00f mov lr, pc <== NOT EXECUTED 32f4: e12fff13 bx r3 <== NOT EXECUTED 32f8: ea000030 b 33c0 <== NOT EXECUTED break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 32fc: e1a00005 mov r0, r5 <== NOT EXECUTED 3300: ebfffe42 bl 2c10 <== NOT EXECUTED 3304: ea00002d b 33c0 <== NOT EXECUTED break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 3308: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 330c: e58530d8 str r3, [r5, #216] <== NOT EXECUTED 3310: e58520d4 str r2, [r5, #212] <== NOT EXECUTED 3314: ea000029 b 33c0 <== NOT EXECUTED break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3318: e894000c ldm r4, {r2, r3} <== NOT EXECUTED 331c: e58530e0 str r3, [r5, #224] <== NOT EXECUTED 3320: e58520dc str r2, [r5, #220] <== NOT EXECUTED 3324: ea000025 b 33c0 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3328: e59520cc ldr r2, [r5, #204] <== NOT EXECUTED 332c: e59f30ac ldr r3, [pc, #172] ; 33e0 <== NOT EXECUTED 3330: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3334: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3338: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 333c: 0a000003 beq 3350 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3340: e1a00005 mov r0, r5 <== NOT EXECUTED 3344: e1a0e00f mov lr, pc <== NOT EXECUTED 3348: e12fff13 bx r3 <== NOT EXECUTED 334c: e1a08000 mov r8, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 3350: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED 3354: 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) { 3358: e59f3080 ldr r3, [pc, #128] ; 33e0 <== NOT EXECUTED 335c: e7931282 ldr r1, [r3, r2, lsl #5] <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3360: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3364: 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 */ 3368: 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); 336c: 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) { 3370: 0a000012 beq 33c0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3374: e1a00005 mov r0, r5 <== NOT EXECUTED 3378: e1a0e00f mov lr, pc <== NOT EXECUTED 337c: e12fff11 bx r1 <== NOT EXECUTED 3380: e1a08000 mov r8, r0 <== NOT EXECUTED 3384: ea00000d b 33c0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 3388: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED 338c: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED 3390: ea000009 b 33bc <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 3394: e5952060 ldr r2, [r5, #96] <== NOT EXECUTED 3398: e595305c ldr r3, [r5, #92] <== NOT EXECUTED if ( rawnc < 0 ) 339c: e0521003 subs r1, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 33a0: 45953064 ldrmi r3, [r5, #100] <== NOT EXECUTED 33a4: 40811003 addmi r1, r1, r3 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 33a8: e2852020 add r2, r5, #32 ; 0x20 <== NOT EXECUTED 33ac: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 33b0: e0423003 sub r3, r2, r3 <== NOT EXECUTED 33b4: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED 33b8: e0833001 add r3, r3, r1 <== NOT EXECUTED 33bc: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 33c0: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 33c4: eb000419 bl 4430 <== NOT EXECUTED args->ioctl_return = sc; 33c8: e586800c str r8, [r6, #12] <== NOT EXECUTED return sc; } 33cc: e1a00008 mov r0, r8 <== NOT EXECUTED 33d0: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 33d4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 33d8: 4004667f .word 0x4004667f 33dc: 4004741a .word 0x4004741a 33e0: 00015f0c .word 0x00015f0c 00003568 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3568: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 356c: e24dd00c sub sp, sp, #12 ; 0xc 3570: e58d2008 str r2, [sp, #8] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3574: e59f23f4 ldr r2, [pc, #1012] ; 3970 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3578: e1a0b001 mov fp, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 357c: e3a01000 mov r1, #0 ; 0x0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3580: e1a09000 mov r9, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3584: e5920000 ldr r0, [r2] 3588: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 358c: e1a07003 mov r7, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3590: eb000360 bl 4318 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3594: e250a000 subs sl, r0, #0 ; 0x0 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 3598: 059f33d4 ldreq r3, [pc, #980] ; 3974 359c: 05935000 ldreq r5, [r3] /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 35a0: 0a000007 beq 35c4 35a4: ea0000e6 b 3944 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 35a8: e595300c ldr r3, [r5, #12] 35ac: e1530009 cmp r3, r9 35b0: 1a000002 bne 35c0 35b4: e5953010 ldr r3, [r5, #16] 35b8: e153000b cmp r3, fp 35bc: 0a0000be beq 38bc */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 35c0: e5955000 ldr r5, [r5] <== NOT EXECUTED 35c4: e3550000 cmp r5, #0 ; 0x0 35c8: 1afffff6 bne 35a8 35cc: ea0000df b 3950 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 35d0: e59f33a0 ldr r3, [pc, #928] ; 3978 35d4: e5933000 ldr r3, [r3] 35d8: e5853064 str r3, [r5, #100] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 35dc: e5950064 ldr r0, [r5, #100] 35e0: eb001598 bl 8c48 if (tty->rawInBuf.theBuf == NULL) { 35e4: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 35e8: e5850058 str r0, [r5, #88] if (tty->rawInBuf.theBuf == NULL) { 35ec: 1a000006 bne 360c free(tty); 35f0: e1a00005 mov r0, r5 <== NOT EXECUTED 35f4: eb001446 bl 8714 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 35f8: e59f3370 ldr r3, [pc, #880] ; 3970 <== NOT EXECUTED 35fc: e5930000 ldr r0, [r3] <== NOT EXECUTED 3600: eb00038a bl 4430 <== NOT EXECUTED 3604: e3a0a01a mov sl, #26 ; 0x1a <== NOT EXECUTED 3608: ea0000cd b 3944 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 360c: e59f3368 ldr r3, [pc, #872] ; 397c 3610: e5933000 ldr r3, [r3] 3614: e5853088 str r3, [r5, #136] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3618: e5950088 ldr r0, [r5, #136] 361c: eb001589 bl 8c48 if (tty->rawOutBuf.theBuf == NULL) { 3620: e3500000 cmp r0, #0 ; 0x0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3624: e585007c str r0, [r5, #124] if (tty->rawOutBuf.theBuf == NULL) { 3628: 0a000007 beq 364c return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 362c: e59f334c ldr r3, [pc, #844] ; 3980 3630: e5930000 ldr r0, [r3] 3634: eb001583 bl 8c48 if (tty->cbuf == NULL) { 3638: e3500000 cmp r0, #0 ; 0x0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 363c: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 3640: 1a000004 bne 3658 free((void *)(tty->rawOutBuf.theBuf)); 3644: e595007c ldr r0, [r5, #124] <== NOT EXECUTED 3648: eb001431 bl 8714 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 364c: e5950058 ldr r0, [r5, #88] <== NOT EXECUTED 3650: eb00142f bl 8714 <== NOT EXECUTED 3654: eaffffe5 b 35f0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3658: e59f3314 ldr r3, [pc, #788] ; 3974 365c: e5932000 ldr r2, [r3] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3660: e3a03000 mov r3, #0 ; 0x0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 3664: e3520000 cmp r2, #0 ; 0x0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 3668: e885000c stm r5, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 366c: 15825004 strne r5, [r2, #4] rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3670: e59f230c ldr r2, [pc, #780] ; 3984 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3674: e58530d4 str r3, [r5, #212] tty->tty_snd.sw_arg = NULL; 3678: e58530d8 str r3, [r5, #216] tty->tty_rcv.sw_pfn = NULL; 367c: e58530dc str r3, [r5, #220] tty->tty_rcv.sw_arg = NULL; 3680: e58530e0 str r3, [r5, #224] tty->tty_rcvwakeup = 0; 3684: e58530e4 str r3, [r5, #228] tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3688: e5923000 ldr r3, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 368c: e59f82f4 ldr r8, [pc, #756] ; 3988 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) 3690: e3530000 cmp r3, #0 ; 0x0 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3694: e59f32d8 ldr r3, [pc, #728] ; 3974 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3698: e59f02ec ldr r0, [pc, #748] ; 398c */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 369c: e5834000 str r4, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 36a0: e5d83000 ldrb r3, [r8] 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; 36a4: 05824000 streq r4, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 36a8: e1830000 orr r0, r3, r0 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 36ac: e584b010 str fp, [r4, #16] tty->major = major; 36b0: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 36b4: e284c014 add ip, r4, #20 ; 0x14 36b8: e3a02054 mov r2, #84 ; 0x54 36bc: e3a01001 mov r1, #1 ; 0x1 36c0: e3a03000 mov r3, #0 ; 0x0 36c4: e58dc000 str ip, [sp] 36c8: eb000279 bl 40b4 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) 36cc: e2502000 subs r2, r0, #0 ; 0x0 36d0: 1a000097 bne 3934 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 36d4: e5d83000 ldrb r3, [r8] 36d8: e59f02b0 ldr r0, [pc, #688] ; 3990 36dc: e284c018 add ip, r4, #24 ; 0x18 36e0: e1830000 orr r0, r3, r0 36e4: e3a01001 mov r1, #1 ; 0x1 36e8: e1a03002 mov r3, r2 36ec: e3a02054 mov r2, #84 ; 0x54 36f0: e58dc000 str ip, [sp] 36f4: eb00026e bl 40b4 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) 36f8: e2501000 subs r1, r0, #0 ; 0x0 36fc: 1a00008c bne 3934 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 3700: e5d83000 ldrb r3, [r8] 3704: e59f0288 ldr r0, [pc, #648] ; 3994 3708: e284c08c add ip, r4, #140 ; 0x8c 370c: e1830000 orr r0, r3, r0 3710: e3a02020 mov r2, #32 ; 0x20 3714: e1a03001 mov r3, r1 3718: e58dc000 str ip, [sp] 371c: eb000264 bl 40b4 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3720: e2506000 subs r6, r0, #0 ; 0x0 3724: 1a000082 bne 3934 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3728: e1a0c007 mov ip, r7 372c: e8bc000f ldm ip!, {r0, r1, r2, r3} 3730: e284e098 add lr, r4, #152 ; 0x98 3734: e8ae000f stmia lr!, {r0, r1, r2, r3} 3738: e89c000f ldm ip, {r0, r1, r2, r3} 373c: e88e000f stm lr, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3740: e59430b4 ldr r3, [r4, #180] 3744: 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; 3748: e5846094 str r6, [r4, #148] tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 374c: 1a000016 bne 37ac sc = rtems_task_create ( 3750: e5d83000 ldrb r3, [r8] <== NOT EXECUTED 3754: e59f023c ldr r0, [pc, #572] ; 3998 <== NOT EXECUTED 3758: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 375c: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3760: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 3764: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3768: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 376c: e88d1040 stm sp, {r6, ip} <== NOT EXECUTED 3770: eb000356 bl 44d0 <== 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) 3774: e250e000 subs lr, r0, #0 ; 0x0 <== NOT EXECUTED 3778: 1a00006d bne 3934 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 377c: e5d83000 ldrb r3, [r8] <== NOT EXECUTED 3780: e59f0214 ldr r0, [pc, #532] ; 399c <== NOT EXECUTED 3784: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 3788: e1830000 orr r0, r3, r0 <== NOT EXECUTED 378c: e3a01009 mov r1, #9 ; 0x9 <== NOT EXECUTED 3790: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3794: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3798: e58de000 str lr, [sp] <== NOT EXECUTED 379c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 37a0: eb00034a bl 44d0 <== 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) 37a4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 37a8: 1a000061 bne 3934 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 37ac: e59430a0 ldr r3, [r4, #160] 37b0: e3530000 cmp r3, #0 ; 0x0 37b4: 0a000002 beq 37c4 37b8: e59430b4 ldr r3, [r4, #180] 37bc: e3530002 cmp r3, #2 ; 0x2 37c0: 1a00000b bne 37f4 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 37c4: e59f31bc ldr r3, [pc, #444] ; 3988 <== NOT EXECUTED 37c8: e59f01d0 ldr r0, [pc, #464] ; 39a0 <== NOT EXECUTED 37cc: e5d33000 ldrb r3, [r3] <== NOT EXECUTED 37d0: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 37d4: e1830000 orr r0, r3, r0 <== NOT EXECUTED 37d8: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 37dc: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 37e0: e1a03001 mov r3, r1 <== NOT EXECUTED 37e4: e58dc000 str ip, [sp] <== NOT EXECUTED 37e8: eb000231 bl 40b4 <== 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) 37ec: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 37f0: 1a00004f bne 3934 <== NOT EXECUTED tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 37f4: e3a02000 mov r2, #0 ; 0x0 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 37f8: e58420b8 str r2, [r4, #184] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 37fc: e5940064 ldr r0, [r4, #100] tty->highwater = tty->rawInBuf.Size * 3/4; 3800: e5943064 ldr r3, [r4, #100] tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 3804: e3a0c003 mov ip, #3 ; 0x3 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 3808: e001039c mul r1, ip, r3 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 380c: e3a0301c mov r3, #28 ; 0x1c 3810: e5c43042 strb r3, [r4, #66] tty->termios.c_cc[VERASE] = '\177'; 3814: e2833063 add r3, r3, #99 ; 0x63 3818: e5c43043 strb r3, [r4, #67] tty->termios.c_cc[VKILL] = '\025'; 381c: e3a03015 mov r3, #21 ; 0x15 3820: e5c43044 strb r3, [r4, #68] tty->termios.c_cc[VEOF] = '\004'; 3824: e3a03004 mov r3, #4 ; 0x4 3828: e5c43045 strb r3, [r4, #69] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 382c: e283300d add r3, r3, #13 ; 0xd 3830: e5c43049 strb r3, [r4, #73] tty->termios.c_cc[VSTOP] = '\023'; 3834: e2833002 add r3, r3, #2 ; 0x2 3838: e5c4304a strb r3, [r4, #74] tty->termios.c_cc[VSUSP] = '\032'; 383c: e2833007 add r3, r3, #7 ; 0x7 3840: e5c4304b strb r3, [r4, #75] tty->termios.c_cc[VREPRINT] = '\022'; 3844: e3a03012 mov r3, #18 ; 0x12 3848: e5c4304d strb r3, [r4, #77] tty->termios.c_cc[VDISCARD] = '\017'; 384c: e3a0300f mov r3, #15 ; 0xf 3850: e5c4304e strb r3, [r4, #78] tty->termios.c_cc[VWERASE] = '\027'; 3854: e2833008 add r3, r3, #8 ; 0x8 3858: e5c4304f strb r3, [r4, #79] tty->termios.c_cc[VLNEXT] = '\026'; 385c: e3a03016 mov r3, #22 ; 0x16 3860: e5c43050 strb r3, [r4, #80] tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 3864: e5c4c041 strb ip, [r4, #65] tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 3868: e5c4204c strb r2, [r4, #76] tty->termios.c_cc[VEOL2] = '\000'; 386c: e5c42051 strb r2, [r4, #81] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3870: e59fc110 ldr ip, [pc, #272] ; 3988 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3874: e59f3128 ldr r3, [pc, #296] ; 39a4 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3878: e5dc2000 ldrb r2, [ip] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 387c: e5843030 str r3, [r4, #48] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3880: e59f3120 ldr r3, [pc, #288] ; 39a8 3884: e5843034 str r3, [r4, #52] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3888: e59f311c ldr r3, [pc, #284] ; 39ac 388c: e5843038 str r3, [r4, #56] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3890: e59f3118 ldr r3, [pc, #280] ; 39b0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3894: e352007a cmp r2, #122 ; 0x7a * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3898: e584303c str r3, [r4, #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; 389c: e1a000a0 lsr r0, r0, #1 tty->highwater = tty->rawInBuf.Size * 3/4; 38a0: e1a01121 lsr r1, r1, #2 /* * Bump name characer */ if (c++ == 'z') 38a4: e2822001 add r2, r2, #1 ; 0x1 c = 'a'; 38a8: 03a03061 moveq r3, #97 ; 0x61 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 38ac: e58410c0 str r1, [r4, #192] /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 38b0: e58400bc str r0, [r4, #188] tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 38b4: e5cc2000 strb r2, [ip] c = 'a'; 38b8: 05cc3000 strbeq r3, [ip] } args->iop->data1 = tty; 38bc: e59d1008 ldr r1, [sp, #8] if (!tty->refcount++) { 38c0: e5953008 ldr r3, [r5, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 38c4: e5912000 ldr r2, [r1] if (!tty->refcount++) { 38c8: e3530000 cmp r3, #0 ; 0x0 38cc: e2833001 add r3, r3, #1 ; 0x1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 38d0: e5825028 str r5, [r2, #40] if (!tty->refcount++) { 38d4: e5853008 str r3, [r5, #8] 38d8: 1a000016 bne 3938 if (tty->device.firstOpen) 38dc: e5953098 ldr r3, [r5, #152] 38e0: e3530000 cmp r3, #0 ; 0x0 (*tty->device.firstOpen)(major, minor, arg); 38e4: 11a00009 movne r0, r9 38e8: 11a0100b movne r1, fp 38ec: 159d2008 ldrne r2, [sp, #8] 38f0: 11a0e00f movne lr, pc 38f4: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 38f8: e59530b4 ldr r3, [r5, #180] 38fc: e3530002 cmp r3, #2 ; 0x2 3900: 1a00000c bne 3938 sc = rtems_task_start(tty->rxTaskId, 3904: e59500c4 ldr r0, [r5, #196] <== NOT EXECUTED 3908: e59f10a4 ldr r1, [pc, #164] ; 39b4 <== NOT EXECUTED 390c: e1a02005 mov r2, r5 <== NOT EXECUTED 3910: eb00039c bl 4788 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3914: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3918: 1a000005 bne 3934 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 391c: e1a02005 mov r2, r5 <== NOT EXECUTED 3920: e59500c8 ldr r0, [r5, #200] <== NOT EXECUTED 3924: e59f108c ldr r1, [pc, #140] ; 39b8 <== NOT EXECUTED 3928: eb000396 bl 4788 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 392c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 3930: 0a000000 beq 3938 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3934: eb000431 bl 4a00 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 3938: e59f3030 ldr r3, [pc, #48] ; 3970 393c: e5930000 ldr r0, [r3] 3940: eb0002ba bl 4430 return RTEMS_SUCCESSFUL; } 3944: e1a0000a mov r0, sl 3948: e28dd00c add sp, sp, #12 ; 0xc 394c: 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)); 3950: e3a00001 mov r0, #1 ; 0x1 3954: e3a010e8 mov r1, #232 ; 0xe8 3958: eb001330 bl 8620 if (tty == NULL) { 395c: e3500000 cmp r0, #0 ; 0x0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3960: e1a05000 mov r5, r0 3964: e1a04000 mov r4, r0 if (tty == NULL) { 3968: 1affff18 bne 35d0 396c: eaffff21 b 35f8 <== NOT EXECUTED 3970: 00016120 .word 0x00016120 3974: 00016128 .word 0x00016128 3978: 000149a4 .word 0x000149a4 397c: 000149a8 .word 0x000149a8 3980: 000149a0 .word 0x000149a0 3984: 00016124 .word 0x00016124 3988: 000149ac .word 0x000149ac 398c: 54526900 .word 0x54526900 3990: 54526f00 .word 0x54526f00 3994: 54527800 .word 0x54527800 3998: 54785400 .word 0x54785400 399c: 52785400 .word 0x52785400 39a0: 54527200 .word 0x54527200 39a4: 00002502 .word 0x00002502 39a8: 00001805 .word 0x00001805 39ac: 000008bd .word 0x000008bd 39b0: 0000823b .word 0x0000823b 39b4: 00003a2c .word 0x00003a2c 39b8: 000039bc .word 0x000039bc 000024b0 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 24b0: e59230b4 ldr r3, [r2, #180] 24b4: 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) { 24b8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 24bc: e1a04002 mov r4, r2 24c0: e1a0a000 mov sl, r0 24c4: e1a07001 mov r7, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 24c8: 1a000005 bne 24e4 (*tty->device.write)(tty->minor, (void *)buf, len); 24cc: e1a01000 mov r1, r0 24d0: e1a02007 mov r2, r7 24d4: e5940010 ldr r0, [r4, #16] 24d8: e1a0e00f mov lr, pc 24dc: e594f0a4 ldr pc, [r4, #164] 24e0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return; } newHead = tty->rawOutBuf.Head; 24e4: e5926080 ldr r6, [r2, #128] <== NOT EXECUTED 24e8: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 24ec: e3a0b002 mov fp, #2 ; 0x2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 24f0: e3a09001 mov r9, #1 ; 0x1 <== NOT EXECUTED 24f4: ea00002e b 25b4 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 24f8: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 24fc: e2860001 add r0, r6, #1 ; 0x1 <== NOT EXECUTED 2500: eb003f13 bl 12154 <__umodsi3> <== NOT EXECUTED 2504: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_interrupt_disable (level); 2508: e10f5000 mrs r5, CPSR <== NOT EXECUTED 250c: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 2510: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2514: ea00000a b 2544 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 2518: e584b094 str fp, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable (level); 251c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2520: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2524: e594008c ldr r0, [r4, #140] <== NOT EXECUTED 2528: e1a02001 mov r2, r1 <== NOT EXECUTED 252c: eb000779 bl 4318 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2530: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2534: 1b000931 blne 4a00 <== NOT EXECUTED rtems_interrupt_disable (level); 2538: e10f5000 mrs r5, CPSR <== NOT EXECUTED 253c: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED 2540: 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) { 2544: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 2548: e1560003 cmp r6, r3 <== NOT EXECUTED 254c: 0afffff1 beq 2518 <== 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++; 2550: e5941080 ldr r1, [r4, #128] <== NOT EXECUTED 2554: e7da2008 ldrb r2, [sl, r8] <== NOT EXECUTED 2558: e594307c ldr r3, [r4, #124] <== NOT EXECUTED 255c: e7c32001 strb r2, [r3, r1] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 2560: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 2564: e3530000 cmp r3, #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; 2568: e5846080 str r6, [r4, #128] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 256c: 1a00000d bne 25a8 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 2570: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 2574: 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; 2578: 159430b8 ldrne r3, [r4, #184] <== NOT EXECUTED 257c: 13833020 orrne r3, r3, #32 ; 0x20 <== NOT EXECUTED 2580: 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)) { 2584: 1a000006 bne 25a4 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2588: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED 258c: e594107c ldr r1, [r4, #124] <== NOT EXECUTED 2590: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2594: e0811003 add r1, r1, r3 <== NOT EXECUTED 2598: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 259c: e1a0e00f mov lr, pc <== NOT EXECUTED 25a0: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 25a4: e5849094 str r9, [r4, #148] <== NOT EXECUTED } rtems_interrupt_enable (level); 25a8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED len--; 25ac: e2477001 sub r7, r7, #1 ; 0x1 <== NOT EXECUTED 25b0: e2888001 add r8, r8, #1 ; 0x1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 25b4: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 25b8: 1affffce bne 24f8 <== NOT EXECUTED 25bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00002c7c : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2c7c: 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; 2c80: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2c84: e1a07000 mov r7, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2c88: 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); 2c8c: 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; 2c90: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2c94: e24dd00c sub sp, sp, #12 ; 0xc <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2c98: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2c9c: 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; 2ca0: e597800c ldr r8, [r7, #12] <== NOT EXECUTED char *buffer = args->buffer; 2ca4: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2ca8: eb00059a bl 4318 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2cac: e250a000 subs sl, r0, #0 ; 0x0 <== NOT EXECUTED 2cb0: 1a0000d4 bne 3008 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 2cb4: e59420cc ldr r2, [r4, #204] <== NOT EXECUTED 2cb8: e59f3354 ldr r3, [pc, #852] ; 3014 <== NOT EXECUTED 2cbc: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2cc0: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 2cc4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2cc8: 0a000005 beq 2ce4 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2ccc: e1a01007 mov r1, r7 <== NOT EXECUTED 2cd0: e1a00004 mov r0, r4 <== NOT EXECUTED 2cd4: e1a0e00f mov lr, pc <== NOT EXECUTED 2cd8: e12fff13 bx r3 <== NOT EXECUTED 2cdc: e1a0a000 mov sl, r0 <== NOT EXECUTED 2ce0: ea0000c4 b 2ff8 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 2ce4: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 2ce8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2cec: e1520003 cmp r2, r3 <== NOT EXECUTED 2cf0: 1a0000ad bne 2fac <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2cf4: e59430a0 ldr r3, [r4, #160] <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 2cf8: e5942028 ldr r2, [r4, #40] <== NOT EXECUTED if (tty->device.pollRead != NULL 2cfc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 2d00: e584202c str r2, [r4, #44] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 2d04: e584a020 str sl, [r4, #32] <== NOT EXECUTED 2d08: e584a024 str sl, [r4, #36] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2d0c: 0a00004a beq 2e3c <== NOT EXECUTED 2d10: e59430b4 ldr r3, [r4, #180] <== NOT EXECUTED 2d14: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2d18: 1a000047 bne 2e3c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 2d1c: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 2d20: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 2d24: 0a00000d beq 2d60 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2d28: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2d2c: e1a0e00f mov lr, pc <== NOT EXECUTED 2d30: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED if (n < 0) { 2d34: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 2d38: e1a01004 mov r1, r4 <== NOT EXECUTED 2d3c: 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) { 2d40: aa000002 bge 2d50 <== NOT EXECUTED rtems_task_wake_after (1); 2d44: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2d48: eb0006a8 bl 47f0 <== NOT EXECUTED 2d4c: eafffff5 b 2d28 <== NOT EXECUTED } else { if (siproc (n, tty)) 2d50: ebffff66 bl 2af0 <== NOT EXECUTED 2d54: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 2d58: 0afffff2 beq 2d28 <== NOT EXECUTED 2d5c: ea000092 b 2fac <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 2d60: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 2d64: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2d68: 1a000004 bne 2d80 <== NOT EXECUTED 2d6c: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 2d70: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 2d74: 13a00002 movne r0, #2 ; 0x2 <== NOT EXECUTED 2d78: 128d1008 addne r1, sp, #8 ; 0x8 <== NOT EXECUTED 2d7c: 1b000347 blne 3aa0 <== 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); 2d80: e28d6008 add r6, sp, #8 ; 0x8 <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 2d84: e28d5004 add r5, sp, #4 ; 0x4 <== NOT EXECUTED else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); for (;;) { n = (*tty->device.pollRead)(tty->minor); 2d88: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2d8c: e1a0e00f mov lr, pc <== NOT EXECUTED 2d90: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED if (n < 0) { 2d94: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 2d98: aa000017 bge 2dfc <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 2d9c: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED 2da0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2da4: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 2da8: 0a000005 beq 2dc4 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 2dac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2db0: 0a00000e beq 2df0 <== NOT EXECUTED 2db4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2db8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2dbc: 0a00000b beq 2df0 <== NOT EXECUTED 2dc0: ea000001 b 2dcc <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 2dc4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2dc8: 0a000077 beq 2fac <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 2dcc: e1a01005 mov r1, r5 <== NOT EXECUTED 2dd0: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 2dd4: eb000331 bl 3aa0 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 2dd8: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 2ddc: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 2de0: e5941054 ldr r1, [r4, #84] <== NOT EXECUTED 2de4: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 2de8: e1530001 cmp r3, r1 <== NOT EXECUTED 2dec: 8a00006e bhi 2fac <== NOT EXECUTED break; } } rtems_task_wake_after (1); 2df0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2df4: eb00067d bl 47f0 <== NOT EXECUTED 2df8: eaffffe2 b 2d88 <== NOT EXECUTED } else { siproc (n, tty); 2dfc: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 2e00: e1a01004 mov r1, r4 <== NOT EXECUTED 2e04: ebffff39 bl 2af0 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2e08: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 2e0c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2e10: e1530002 cmp r3, r2 <== NOT EXECUTED 2e14: aa000064 bge 2fac <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 2e18: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 2e1c: 0affffd9 beq 2d88 <== NOT EXECUTED 2e20: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED 2e24: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2e28: 0affffd6 beq 2d88 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 2e2c: e1a01006 mov r1, r6 <== NOT EXECUTED 2e30: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED 2e34: eb000319 bl 3aa0 <== NOT EXECUTED 2e38: eaffffd2 b 2d88 <== 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; 2e3c: 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, 2e40: e2849049 add r9, r4, #73 ; 0x49 <== NOT EXECUTED 2e44: e3a06001 mov r6, #1 ; 0x1 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2e48: e59fb1c8 ldr fp, [pc, #456] ; 3018 <== NOT EXECUTED 2e4c: ea000054 b 2fa4 <== 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; 2e50: e594005c ldr r0, [r4, #92] <== NOT EXECUTED 2e54: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 2e58: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 2e5c: eb003cbc bl 12154 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2e60: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED 2e64: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 2e68: 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; 2e6c: e1a02000 mov r2, r0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 2e70: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 2e74: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 2e78: e0800003 add r0, r0, r3 <== NOT EXECUTED 2e7c: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED 2e80: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 2e84: eb003cb2 bl 12154 <__umodsi3> <== NOT EXECUTED 2e88: e59430bc ldr r3, [r4, #188] <== NOT EXECUTED 2e8c: e1500003 cmp r0, r3 <== NOT EXECUTED 2e90: 2a00001e bcs 2f10 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 2e94: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 2e98: e3c33001 bic r3, r3, #1 ; 0x1 <== NOT EXECUTED 2e9c: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2ea0: e59f3170 ldr r3, [pc, #368] ; 3018 <== NOT EXECUTED 2ea4: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED 2ea8: e0023003 and r3, r2, r3 <== NOT EXECUTED 2eac: e153000b cmp r3, fp <== NOT EXECUTED 2eb0: 1a00000b bne 2ee4 <== NOT EXECUTED 2eb4: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 2eb8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2ebc: 0a000002 beq 2ecc <== NOT EXECUTED 2ec0: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 2ec4: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED 2ec8: 0a000005 beq 2ee4 <== 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, 2ecc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2ed0: e1a01009 mov r1, r9 <== NOT EXECUTED 2ed4: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2ed8: e1a0e00f mov lr, pc <== NOT EXECUTED 2edc: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED 2ee0: ea00000a b 2f10 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 2ee4: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 2ee8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 2eec: 0a000007 beq 2f10 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 2ef0: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2ef4: 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; 2ef8: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2efc: 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; 2f00: e58430b8 str r3, [r4, #184] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 2f04: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2f08: 11a0e00f movne lr, pc <== NOT EXECUTED 2f0c: 112fff12 bxne r2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 2f10: e594303c ldr r3, [r4, #60] <== NOT EXECUTED 2f14: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED 2f18: 0a000005 beq 2f34 <== NOT EXECUTED if (siproc (c, tty)) 2f1c: e1a00005 mov r0, r5 <== NOT EXECUTED 2f20: e1a01004 mov r1, r4 <== NOT EXECUTED 2f24: ebfffef1 bl 2af0 <== NOT EXECUTED 2f28: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 2f2c: 1a000007 bne 2f50 <== NOT EXECUTED 2f30: ea000007 b 2f54 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 2f34: e1a00005 mov r0, r5 <== NOT EXECUTED 2f38: e1a01004 mov r1, r4 <== NOT EXECUTED 2f3c: ebfffeeb bl 2af0 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2f40: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED 2f44: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2f48: e1530002 cmp r3, r2 <== NOT EXECUTED 2f4c: ba000000 blt 2f54 <== NOT EXECUTED 2f50: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 2f54: e5941070 ldr r1, [r4, #112] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2f58: e594205c ldr r2, [r4, #92] <== NOT EXECUTED 2f5c: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED 2f60: e1520003 cmp r2, r3 <== NOT EXECUTED 2f64: 0a000005 beq 2f80 <== NOT EXECUTED 2f68: e59f20ac ldr r2, [pc, #172] ; 301c <== NOT EXECUTED 2f6c: e5923000 ldr r3, [r2] <== NOT EXECUTED 2f70: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2f74: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 2f78: e1520003 cmp r2, r3 <== NOT EXECUTED 2f7c: baffffb3 blt 2e50 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 2f80: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2f84: e1a05001 mov r5, r1 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 2f88: 0a000007 beq 2fac <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 2f8c: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 2f90: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2f94: e1a02005 mov r2, r5 <== NOT EXECUTED 2f98: eb0004de bl 4318 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 2f9c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 2fa0: 1a000001 bne 2fac <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 2fa4: e1a01005 mov r1, r5 <== NOT EXECUTED 2fa8: eaffffea b 2f58 <== NOT EXECUTED 2fac: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2fb0: ea000006 b 2fd0 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 2fb4: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 2fb8: e7d33002 ldrb r3, [r3, r2] <== NOT EXECUTED 2fbc: e59d2000 ldr r2, [sp] <== NOT EXECUTED 2fc0: e7c23001 strb r3, [r2, r1] <== NOT EXECUTED 2fc4: e5840024 str r0, [r4, #36] <== NOT EXECUTED count--; 2fc8: e2488001 sub r8, r8, #1 ; 0x1 <== NOT EXECUTED 2fcc: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 2fd0: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 2fd4: 0a000004 beq 2fec <== NOT EXECUTED 2fd8: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED 2fdc: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2fe0: e1520003 cmp r2, r3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 2fe4: e2820001 add r0, r2, #1 ; 0x1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 2fe8: bafffff1 blt 2fb4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 2fec: e597300c ldr r3, [r7, #12] <== NOT EXECUTED 2ff0: e0683003 rsb r3, r8, r3 <== NOT EXECUTED 2ff4: e5873014 str r3, [r7, #20] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2ff8: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 2ffc: e58430e4 str r3, [r4, #228] <== NOT EXECUTED rtems_semaphore_release (tty->isem); 3000: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 3004: eb000509 bl 4430 <== NOT EXECUTED return sc; } 3008: e1a0000a mov r0, sl <== NOT EXECUTED 300c: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED 3010: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 3014: 00015f0c .word 0x00015f0c 3018: 00000202 .word 0x00000202 301c: 000149a0 .word 0x000149a0 00001f88 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 1f88: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 1f8c: e59f21d8 ldr r2, [pc, #472] ; 216c <== NOT EXECUTED 1f90: e0032002 and r2, r3, r2 <== NOT EXECUTED 1f94: e59f31d4 ldr r3, [pc, #468] ; 2170 <== NOT EXECUTED 1f98: e1520003 cmp r2, r3 <== 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) { 1f9c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 1fa0: 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)) 1fa4: 1a00000f bne 1fe8 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 1fa8: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 1fac: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 1fb0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 1fb4: e1a0e00f mov lr, pc <== NOT EXECUTED 1fb8: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 1fbc: e10f1000 mrs r1, CPSR <== NOT EXECUTED 1fc0: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 1fc4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 1fc8: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1fcc: 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--; 1fd0: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1fd4: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED 1fd8: 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--; 1fdc: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 1fe0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 1fe4: ea000012 b 2034 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 1fe8: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED 1fec: e2033003 and r3, r3, #3 ; 0x3 <== NOT EXECUTED 1ff0: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 1ff4: 1a000010 bne 203c <== 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, 1ff8: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 1ffc: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2000: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2004: e1a0e00f mov lr, pc <== NOT EXECUTED 2008: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 200c: e10f1000 mrs r1, CPSR <== NOT EXECUTED 2010: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 2014: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->t_dqlen--; 2018: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 201c: 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--; 2020: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2024: e3c33002 bic r3, r3, #2 ; 0x2 <== NOT EXECUTED 2028: 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--; 202c: e5842090 str r2, [r4, #144] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 2030: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 2034: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED 2038: ea000049 b 2164 <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 203c: e5902080 ldr r2, [r0, #128] <== NOT EXECUTED 2040: e5903084 ldr r3, [r0, #132] <== NOT EXECUTED 2044: e1520003 cmp r2, r3 <== NOT EXECUTED 2048: 1a000006 bne 2068 <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 204c: e5903094 ldr r3, [r0, #148] <== NOT EXECUTED 2050: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 2054: 1a000001 bne 2060 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2058: e590008c ldr r0, [r0, #140] <== NOT EXECUTED 205c: eb0008f3 bl 4430 <== NOT EXECUTED 2060: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 2064: ea00003e b 2164 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 2068: e10f2000 mrs r2, CPSR <== NOT EXECUTED 206c: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 2070: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; 2074: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 2078: e590c090 ldr ip, [r0, #144] <== NOT EXECUTED tty->t_dqlen = 0; 207c: e5803090 str r3, [r0, #144] <== NOT EXECUTED rtems_interrupt_enable(level); 2080: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 2084: e5900084 ldr r0, [r0, #132] <== NOT EXECUTED 2088: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED 208c: e08c0000 add r0, ip, r0 <== NOT EXECUTED 2090: eb00402f bl 12154 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 2094: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED 2098: 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; 209c: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 20a0: e5840084 str r0, [r4, #132] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 20a4: 0594008c ldreq r0, [r4, #140] <== NOT EXECUTED 20a8: 0b0008e0 bleq 4430 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 20ac: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 20b0: e1560003 cmp r6, r3 <== NOT EXECUTED 20b4: 1a00000a bne 20e4 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 20b8: e59420d4 ldr r2, [r4, #212] <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 20bc: 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) { 20c0: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 20c4: 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) { 20c8: 01a05002 moveq r5, r2 <== NOT EXECUTED 20cc: 0a000023 beq 2160 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 20d0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 20d4: e59410d8 ldr r1, [r4, #216] <== NOT EXECUTED 20d8: e1a0e00f mov lr, pc <== NOT EXECUTED 20dc: e12fff12 bx r2 <== NOT EXECUTED 20e0: ea00001e b 2160 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 20e4: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED 20e8: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 20ec: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 20f0: 1a00000a bne 2120 <== NOT EXECUTED == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 20f4: e10f3000 mrs r3, CPSR <== NOT EXECUTED 20f8: e38320c0 orr r2, r3, #192 ; 0xc0 <== NOT EXECUTED 20fc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 2100: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED 2104: e3822020 orr r2, r2, #32 ; 0x20 <== NOT EXECUTED 2108: e58420b8 str r2, [r4, #184] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 210c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 2110: e5842094 str r2, [r4, #148] <== NOT EXECUTED rtems_interrupt_enable(level); 2114: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2118: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 211c: ea00000f b 2160 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 2120: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED 2124: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 2128: 85943088 ldrhi r3, [r4, #136] <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 212c: 95943080 ldrls r3, [r4, #128] <== NOT EXECUTED 2130: e0665003 rsb r5, r6, r3 <== NOT EXECUTED /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 2134: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 2138: 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)) { 213c: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 2140: 13a05001 movne r5, #1 ; 0x1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 2144: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 2148: e5843094 str r3, [r4, #148] <== NOT EXECUTED (*tty->device.write)(tty->minor, 214c: e0811006 add r1, r1, r6 <== NOT EXECUTED 2150: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2154: e1a02005 mov r2, r5 <== NOT EXECUTED 2158: e1a0e00f mov lr, pc <== NOT EXECUTED 215c: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 2160: e5846084 str r6, [r4, #132] <== NOT EXECUTED } return nToSend; } 2164: e1a00005 mov r0, r5 <== NOT EXECUTED 2168: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 216c: 00000403 .word 0x00000403 2170: 00000401 .word 0x00000401 00003a2c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 3a2c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3a30: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED 3a34: e1a04000 mov r4, r0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3a38: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 3a3c: e28d6007 add r6, sp, #7 ; 0x7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3a40: e1a0300d mov r3, sp <== NOT EXECUTED 3a44: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 3a48: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3a4c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 3a50: eb0000a7 bl 3cf4 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3a54: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3a58: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED 3a5c: 0a000003 beq 3a70 <== NOT EXECUTED tty->rxTaskId = 0; 3a60: e58450c4 str r5, [r4, #196] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3a64: e1a00005 mov r0, r5 <== NOT EXECUTED 3a68: eb0002e8 bl 4610 <== NOT EXECUTED 3a6c: eafffff3 b 3a40 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 3a70: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3a74: e1a0e00f mov lr, pc <== NOT EXECUTED 3a78: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED 3a7c: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 3a80: e3730001 cmn r3, #1 ; 0x1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 3a84: e1a01006 mov r1, r6 <== NOT EXECUTED 3a88: e1a00004 mov r0, r4 <== NOT EXECUTED 3a8c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 3a90: 0affffea beq 3a40 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 3a94: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 3a98: ebfff9d1 bl 21e4 <== NOT EXECUTED 3a9c: eaffffe7 b 3a40 <== NOT EXECUTED 00001f7c : 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); 1f7c: e59000c4 ldr r0, [r0, #196] <== NOT EXECUTED 1f80: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 1f84: ea0007b9 b 3e70 <== NOT EXECUTED 000039bc : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 39bc: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 39c0: e59f7060 ldr r7, [pc, #96] ; 3a28 <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 39c4: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 39c8: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 39cc: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 39d0: e1a0300d mov r3, sp <== NOT EXECUTED 39d4: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED 39d8: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 39dc: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED 39e0: eb0000c3 bl 3cf4 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 39e4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39e8: 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); 39ec: 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) { 39f0: 0a000003 beq 3a04 <== NOT EXECUTED tty->txTaskId = 0; 39f4: e58450c8 str r5, [r4, #200] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 39f8: e1a00005 mov r0, r5 <== NOT EXECUTED 39fc: eb000303 bl 4610 <== NOT EXECUTED 3a00: eafffff2 b 39d0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 3a04: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED 3a08: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 3a0c: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 3a10: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 3a14: 11a0e00f movne lr, pc <== NOT EXECUTED 3a18: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 3a1c: e1a00004 mov r0, r4 <== NOT EXECUTED 3a20: ebfff958 bl 1f88 <== NOT EXECUTED 3a24: eaffffe9 b 39d0 <== NOT EXECUTED 3a28: 00015f0c .word 0x00015f0c 00002b50 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2b50: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2b54: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2b58: e5937028 ldr r7, [r3, #40] rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2b5c: e3a01000 mov r1, #0 ; 0x0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2b60: e1a04000 mov r4, r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2b64: e1a02001 mov r2, r1 2b68: e5970018 ldr r0, [r7, #24] 2b6c: eb0005e9 bl 4318 if (sc != RTEMS_SUCCESSFUL) 2b70: e2508000 subs r8, r0, #0 ; 0x0 2b74: 1a000022 bne 2c04 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2b78: e59720cc ldr r2, [r7, #204] 2b7c: e59f3088 ldr r3, [pc, #136] ; 2c0c 2b80: e0833282 add r3, r3, r2, lsl #5 2b84: e593300c ldr r3, [r3, #12] 2b88: e3530000 cmp r3, #0 ; 0x0 2b8c: 0a000005 beq 2ba8 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2b90: e1a01004 mov r1, r4 <== NOT EXECUTED 2b94: e1a00007 mov r0, r7 <== NOT EXECUTED 2b98: e1a0e00f mov lr, pc <== NOT EXECUTED 2b9c: e12fff13 bx r3 <== NOT EXECUTED 2ba0: e1a08000 mov r8, r0 <== NOT EXECUTED 2ba4: ea000014 b 2bfc <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2ba8: e5973034 ldr r3, [r7, #52] 2bac: e3130001 tst r3, #1 ; 0x1 uint32_t count = args->count; 2bb0: 1594600c ldrne r6, [r4, #12] char *buffer = args->buffer; 2bb4: 1594a008 ldrne sl, [r4, #8] 2bb8: 11a05008 movne r5, r8 if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2bbc: 1a000003 bne 2bd0 2bc0: ea000007 b 2be4 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 2bc4: e7da0005 ldrb r0, [sl, r5] 2bc8: ebfffe7c bl 25c0 2bcc: e2855001 add r5, r5, #1 ; 0x1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2bd0: e3560000 cmp r6, #0 ; 0x0 oproc (*buffer++, tty); 2bd4: e1a01007 mov r1, r7 2bd8: e2466001 sub r6, r6, #1 ; 0x1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2bdc: 1afffff8 bne 2bc4 2be0: ea000003 b 2bf4 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 2be4: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED 2be8: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2bec: e1a02007 mov r2, r7 <== NOT EXECUTED 2bf0: ebfffe2e bl 24b0 <== NOT EXECUTED args->bytes_moved = args->count; 2bf4: e594300c ldr r3, [r4, #12] 2bf8: e5843014 str r3, [r4, #20] } rtems_semaphore_release (tty->osem); 2bfc: e5970018 ldr r0, [r7, #24] 2c00: eb00060a bl 4430 return sc; } 2c04: e1a00008 mov r0, r8 2c08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2c0c: 00015f0c .word 0x00015f0c 00005434 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 5434: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 5438: e251a000 subs sl, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 543c: e1a07000 mov r7, r0 5440: e24dd004 sub sp, sp, #4 ; 0x4 5444: e1a06002 mov r6, r2 5448: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 544c: 03a0000a moveq r0, #10 ; 0xa 5450: 0a000022 beq 54e0 return RTEMS_INVALID_NUMBER; if ( !routine ) 5454: e3520000 cmp r2, #0 ; 0x0 5458: 03a00009 moveq r0, #9 ; 0x9 545c: 0a00001f beq 54e0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 5460: e59f0080 ldr r0, [pc, #128] ; 54e8 5464: e1a01007 mov r1, r7 5468: e1a0200d mov r2, sp 546c: eb0004a9 bl 6718 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5470: e59d3000 ldr r3, [sp] 5474: e3530000 cmp r3, #0 ; 0x0 5478: e1a04000 mov r4, r0 547c: 13a00004 movne r0, #4 ; 0x4 5480: 1a000016 bne 54e0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5484: e2845010 add r5, r4, #16 ; 0x10 5488: e1a00005 mov r0, r5 548c: eb000b63 bl 8220 <_Watchdog_Remove> _ISR_Disable( level ); 5490: e10f2000 mrs r2, CPSR 5494: e38230c0 orr r3, r2, #192 ; 0xc0 5498: 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 ) { 549c: e5943018 ldr r3, [r4, #24] 54a0: e3530000 cmp r3, #0 ; 0x0 54a4: 0a000001 beq 54b0 _ISR_Enable( level ); 54a8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 54ac: ea000009 b 54d8 <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 54b0: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 54b4: e584602c str r6, [r4, #44] the_watchdog->id = id; 54b8: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 54bc: e5848034 str r8, [r4, #52] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 54c0: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 54c4: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 54c8: e59f001c ldr r0, [pc, #28] ; 54ec Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 54cc: e584a01c str sl, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 54d0: e1a01005 mov r1, r5 54d4: eb000af5 bl 80b0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 54d8: eb000692 bl 6f28 <_Thread_Enable_dispatch> 54dc: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 54e0: e28dd004 add sp, sp, #4 ; 0x4 54e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 54e8: 000148a4 .word 0x000148a4 54ec: 00014424 .word 0x00014424 00010c14 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 10c14: e92d4030 push {r4, r5, lr} 10c18: e24dd004 sub sp, sp, #4 ; 0x4 10c1c: e1a01000 mov r1, r0 10c20: e1a0200d mov r2, sp 10c24: e59f00a4 ldr r0, [pc, #164] ; 10cd0 10c28: eb0009fe bl 13428 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10c2c: e59d3000 ldr r3, [sp] 10c30: e3530000 cmp r3, #0 ; 0x0 10c34: e1a04000 mov r4, r0 10c38: 13a00004 movne r0, #4 ; 0x4 10c3c: 1a000021 bne 10cc8 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 10c40: e5943038 ldr r3, [r4, #56] 10c44: e3530004 cmp r3, #4 ; 0x4 10c48: 979ff103 ldrls pc, [pc, r3, lsl #2] 10c4c: ea00001b b 10cc0 <== NOT EXECUTED 10c50: 00010c64 .word 0x00010c64 <== NOT EXECUTED 10c54: 00010c80 .word 0x00010c80 <== NOT EXECUTED 10c58: 00010cb4 .word 0x00010cb4 <== NOT EXECUTED 10c5c: 00010cb4 .word 0x00010cb4 <== NOT EXECUTED 10c60: 00010cb4 .word 0x00010cb4 <== NOT EXECUTED case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 10c64: e2844010 add r4, r4, #16 ; 0x10 10c68: e1a00004 mov r0, r4 10c6c: eb0011dd bl 153e8 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 10c70: e1a01004 mov r1, r4 10c74: e59f0058 ldr r0, [pc, #88] ; 10cd4 10c78: eb00117e bl 15278 <_Watchdog_Insert> 10c7c: ea00000f b 10cc0 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 10c80: e59f5050 ldr r5, [pc, #80] ; 10cd8 10c84: e5953000 ldr r3, [r5] 10c88: e3530000 cmp r3, #0 ; 0x0 10c8c: 1a000002 bne 10c9c _Thread_Enable_dispatch(); 10c90: eb000c0a bl 13cc0 <_Thread_Enable_dispatch> <== NOT EXECUTED 10c94: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED 10c98: ea00000a b 10cc8 <== NOT EXECUTED return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 10c9c: e2840010 add r0, r4, #16 ; 0x10 10ca0: eb0011d0 bl 153e8 <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 10ca4: e1a00004 mov r0, r4 10ca8: e1a0e00f mov lr, pc 10cac: e595f000 ldr pc, [r5] 10cb0: ea000002 b 10cc0 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 10cb4: eb000c01 bl 13cc0 <_Thread_Enable_dispatch> 10cb8: e3a0000b mov r0, #11 ; 0xb 10cbc: ea000001 b 10cc8 return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 10cc0: eb000bfe bl 13cc0 <_Thread_Enable_dispatch> 10cc4: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc8: e28dd004 add sp, sp, #4 ; 0x4 10ccc: e8bd8030 pop {r4, r5, pc} 10cd0: 000308fc .word 0x000308fc 10cd4: 000300e4 .word 0x000300e4 10cd8: 0003093c .word 0x0003093c 00010cdc : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10cdc: e92d41f0 push {r4, r5, r6, r7, r8, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 10ce0: e59fc0c4 ldr ip, [pc, #196] ; 10dac 10ce4: e59cc000 ldr ip, [ip] 10ce8: e35c0000 cmp ip, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10cec: e1a06000 mov r6, r0 10cf0: e24dd004 sub sp, sp, #4 ; 0x4 10cf4: e1a07001 mov r7, r1 10cf8: e1a05002 mov r5, r2 10cfc: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 10d00: 03a0000e moveq r0, #14 ; 0xe 10d04: 0a000026 beq 10da4 return RTEMS_INCORRECT_STATE; if ( !routine ) 10d08: e3520000 cmp r2, #0 ; 0x0 10d0c: 03a00009 moveq r0, #9 ; 0x9 10d10: 0a000023 beq 10da4 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 10d14: e3510000 cmp r1, #0 ; 0x0 10d18: 03a0000a moveq r0, #10 ; 0xa 10d1c: 0a000020 beq 10da4 10d20: e59f0088 ldr r0, [pc, #136] ; 10db0 10d24: e1a01006 mov r1, r6 10d28: e1a0200d mov r2, sp 10d2c: eb0009bd bl 13428 <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10d30: e59d3000 ldr r3, [sp] 10d34: e3530000 cmp r3, #0 ; 0x0 10d38: e1a04000 mov r4, r0 10d3c: 13a00004 movne r0, #4 ; 0x4 10d40: 1a000017 bne 10da4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10d44: e2840010 add r0, r4, #16 ; 0x10 10d48: eb0011a6 bl 153e8 <_Watchdog_Remove> _ISR_Disable( level ); 10d4c: e10f1000 mrs r1, CPSR 10d50: e38130c0 orr r3, r1, #192 ; 0xc0 10d54: 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 ) { 10d58: e5942018 ldr r2, [r4, #24] 10d5c: e3520000 cmp r2, #0 ; 0x0 10d60: 0a000001 beq 10d6c _ISR_Enable( level ); 10d64: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 10d68: ea00000b b 10d9c <== NOT EXECUTED /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 10d6c: e3a03001 mov r3, #1 ; 0x1 10d70: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d74: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 10d78: e584502c str r5, [r4, #44] the_watchdog->id = id; 10d7c: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 10d80: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 10d84: e584701c str r7, [r4, #28] _ISR_Enable( level ); 10d88: 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 ); 10d8c: e59f3020 ldr r3, [pc, #32] ; 10db4 10d90: e1a00004 mov r0, r4 10d94: e1a0e00f mov lr, pc 10d98: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 10d9c: eb000bc7 bl 13cc0 <_Thread_Enable_dispatch> 10da0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10da4: e28dd004 add sp, sp, #4 ; 0x4 10da8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 10dac: 00030940 .word 0x00030940 10db0: 000308fc .word 0x000308fc 10db4: 0003093c .word 0x0003093c 00004f34 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 4f34: 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) 4f38: e2109202 ands r9, r0, #536870912 ; 0x20000000 <== NOT EXECUTED static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 4f3c: e1a08000 mov r8, r0 <== NOT EXECUTED 4f40: e1a05001 mov r5, r1 <== NOT EXECUTED 4f44: e1a0a002 mov sl, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 4f48: 0a00000d beq 4f84 <== NOT EXECUTED { if (rtems_panic_in_progress++) 4f4c: e59f2168 ldr r2, [pc, #360] ; 50bc <== NOT EXECUTED 4f50: e5923000 ldr r3, [r2] <== NOT EXECUTED 4f54: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 4f58: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 4f5c: e5823000 str r3, [r2] <== NOT EXECUTED 4f60: 0a000003 beq 4f74 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4f64: e59f2154 ldr r2, [pc, #340] ; 50c0 <== NOT EXECUTED 4f68: e5923000 ldr r3, [r2] <== NOT EXECUTED 4f6c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 4f70: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 4f74: e59f3140 ldr r3, [pc, #320] ; 50bc <== NOT EXECUTED 4f78: e5933000 ldr r3, [r3] <== NOT EXECUTED 4f7c: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 4f80: ca00004b bgt 50b4 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 4f84: e59f3138 ldr r3, [pc, #312] ; 50c4 <== NOT EXECUTED 4f88: e5933000 ldr r3, [r3] <== NOT EXECUTED 4f8c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 4f90: eb003a7a bl 13980 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 4f94: e2180101 ands r0, r8, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 4f98: e3c84207 bic r4, r8, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 4f9c: 01a07000 moveq r7, r0 <== NOT EXECUTED 4fa0: 0a000001 beq 4fac <== NOT EXECUTED local_errno = errno; 4fa4: eb0039b5 bl 13680 <__errno> <== NOT EXECUTED 4fa8: 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); 4fac: e59f6110 ldr r6, [pc, #272] ; 50c4 <== NOT EXECUTED 4fb0: e5963000 ldr r3, [r6] <== NOT EXECUTED 4fb4: e1a01005 mov r1, r5 <== NOT EXECUTED 4fb8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 4fbc: e1a0200a mov r2, sl <== NOT EXECUTED 4fc0: eb005360 bl 19d48 <== NOT EXECUTED if (status) 4fc4: 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); 4fc8: e1a05000 mov r5, r0 <== NOT EXECUTED if (status) 4fcc: 0a000009 beq 4ff8 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 4fd0: e5963000 ldr r3, [r6] <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 4fd4: e1a01004 mov r1, r4 <== NOT EXECUTED 4fd8: e59f00e8 ldr r0, [pc, #232] ; 50c8 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 4fdc: e593400c ldr r4, [r3, #12] <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 4fe0: eb0025a5 bl e67c <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 4fe4: e59f10e0 ldr r1, [pc, #224] ; 50cc <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 4fe8: 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)); 4fec: e1a00004 mov r0, r4 <== NOT EXECUTED 4ff0: eb003bb5 bl 13ecc <== NOT EXECUTED 4ff4: e0855000 add r5, r5, r0 <== NOT EXECUTED if (local_errno) 4ff8: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 4ffc: 0a000015 beq 5058 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 5000: da00000d ble 503c <== NOT EXECUTED 5004: e1a00007 mov r0, r7 <== NOT EXECUTED 5008: eb004739 bl 16cf4 <== NOT EXECUTED 500c: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 5010: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 5014: 0a000008 beq 503c <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 5018: e59f30a4 ldr r3, [pc, #164] ; 50c4 <== NOT EXECUTED 501c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5020: e1a00007 mov r0, r7 <== NOT EXECUTED 5024: e593400c ldr r4, [r3, #12] <== NOT EXECUTED 5028: eb004731 bl 16cf4 <== NOT EXECUTED 502c: e59f109c ldr r1, [pc, #156] ; 50d0 <== NOT EXECUTED 5030: e1a02000 mov r2, r0 <== NOT EXECUTED 5034: e1a00004 mov r0, r4 <== NOT EXECUTED 5038: ea000004 b 5050 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 503c: e59f3080 ldr r3, [pc, #128] ; 50c4 <== NOT EXECUTED 5040: e5933000 ldr r3, [r3] <== NOT EXECUTED 5044: e59f1088 ldr r1, [pc, #136] ; 50d4 <== NOT EXECUTED 5048: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 504c: e1a02007 mov r2, r7 <== NOT EXECUTED 5050: eb003b9d bl 13ecc <== NOT EXECUTED 5054: e0855000 add r5, r5, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 5058: e59f4064 ldr r4, [pc, #100] ; 50c4 <== NOT EXECUTED 505c: e5943000 ldr r3, [r4] <== NOT EXECUTED 5060: e59f1070 ldr r1, [pc, #112] ; 50d8 <== NOT EXECUTED 5064: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5068: eb003b97 bl 13ecc <== NOT EXECUTED (void) fflush(stderr); 506c: e5943000 ldr r3, [r4] <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 5070: e1a06000 mov r6, r0 <== NOT EXECUTED (void) fflush(stderr); 5074: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5078: eb003a40 bl 13980 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 507c: e3180203 tst r8, #805306368 ; 0x30000000 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 5080: 00860005 addeq r0, r6, r5 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 5084: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 5088: e3590000 cmp r9, #0 ; 0x0 <== NOT EXECUTED 508c: 0a000004 beq 50a4 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 5090: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 5094: e59f1040 ldr r1, [pc, #64] ; 50dc <== NOT EXECUTED 5098: eb00001a bl 5108 <== NOT EXECUTED _exit(local_errno); 509c: e1a00007 mov r0, r7 <== NOT EXECUTED 50a0: eb0001e4 bl 5838 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 50a4: e59f1034 ldr r1, [pc, #52] ; 50e0 <== NOT EXECUTED 50a8: e1a00009 mov r0, r9 <== NOT EXECUTED 50ac: eb000015 bl 5108 <== NOT EXECUTED abort(); 50b0: eb003969 bl 1365c <== NOT EXECUTED 50b4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } } return chars_written; } 50b8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 50bc: 0002420c .word 0x0002420c 50c0: 0002438c .word 0x0002438c 50c4: 0001fb48 .word 0x0001fb48 50c8: 000200f4 .word 0x000200f4 50cc: 00021928 .word 0x00021928 50d0: 00021936 .word 0x00021936 50d4: 00021943 .word 0x00021943 50d8: 00021e08 .word 0x00021e08 50dc: 00021957 .word 0x00021957 50e0: 0002196c .word 0x0002196c 00005114 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 5114: e92d4010 push {r4, lr} void *ptr; /* * check the arguments */ if ( !pointer ) 5118: e2514000 subs r4, r1, #0 ; 0x0 511c: 0a000008 beq 5144 return false; if ( !bytes ) 5120: e3500000 cmp r0, #0 ; 0x0 5124: 0a000006 beq 5144 return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 5128: e1a01000 mov r1, r0 512c: e59f0018 ldr r0, [pc, #24] ; 514c 5130: eb00051c bl 65a8 <_Protected_heap_Allocate> if (!ptr) 5134: e3500000 cmp r0, #0 ; 0x0 return false; *pointer = ptr; 5138: 15840000 strne r0, [r4] 513c: 13a00001 movne r0, #1 ; 0x1 /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 5140: 18bd8010 popne {r4, pc} return false; *pointer = ptr; return true; 5144: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 5148: e8bd8010 pop {r4, pc} <== NOT EXECUTED 514c: 0001ab8c .word 0x0001ab8c 00005104 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 5104: e1a01000 mov r1, r0 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 5108: e59f0000 ldr r0, [pc, #0] ; 5110 <== NOT EXECUTED 510c: ea000534 b 65e4 <_Protected_heap_Free> <== NOT EXECUTED 5110: 0001ab8c .word 0x0001ab8c 0001be10 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 1be10: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 1be14: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 1be18: e59fb0cc ldr fp, [pc, #204] ; 1beec <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 1be1c: e1a06000 mov r6, r0 <== NOT EXECUTED 1be20: e1a0a001 mov sl, r1 <== NOT EXECUTED 1be24: e3e08102 mvn r8, #-2147483648 ; 0x80000000 <== NOT EXECUTED 1be28: e1a05007 mov r5, r7 <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 1be2c: e3a0900a mov r9, #10 ; 0xa <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1be30: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED 1be34: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 1be38: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1be3c: e5863004 str r3, [r6, #4] <== NOT EXECUTED 1be40: a5963000 ldrge r3, [r6] <== NOT EXECUTED 1be44: a4d34001 ldrbge r4, [r3], #1 <== NOT EXECUTED 1be48: a5863000 strge r3, [r6] <== NOT EXECUTED 1be4c: aa000004 bge 1be64 <== NOT EXECUTED 1be50: e59f3098 ldr r3, [pc, #152] ; 1bef0 <== NOT EXECUTED 1be54: e1a01006 mov r1, r6 <== NOT EXECUTED 1be58: e5930000 ldr r0, [r3] <== NOT EXECUTED 1be5c: eb004af3 bl 2ea30 <__srget_r> <== NOT EXECUTED 1be60: e1a04000 mov r4, r0 <== NOT EXECUTED if (c == ':') 1be64: e354003a cmp r4, #58 ; 0x3a <== NOT EXECUTED 1be68: 0a000018 beq 1bed0 <== NOT EXECUTED break; if (sign == 0) { 1be6c: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 1be70: 1a000004 bne 1be88 <== NOT EXECUTED if (c == '-') { 1be74: e354002d cmp r4, #45 ; 0x2d <== NOT EXECUTED sign = -1; limit++; 1be78: 02888001 addeq r8, r8, #1 ; 0x1 <== NOT EXECUTED 1be7c: 03e05000 mvneq r5, #0 ; 0x0 <== NOT EXECUTED for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 1be80: 0affffea beq 1be30 <== NOT EXECUTED sign = -1; limit++; continue; 1be84: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 1be88: e59b3000 ldr r3, [fp] <== NOT EXECUTED 1be8c: e7d33004 ldrb r3, [r3, r4] <== NOT EXECUTED 1be90: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED 1be94: 0a000012 beq 1bee4 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 1be98: e1a00008 mov r0, r8 <== NOT EXECUTED 1be9c: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 1bea0: eb0078fe bl 3a2a0 <__aeabi_uidiv> <== NOT EXECUTED 1bea4: e1570000 cmp r7, r0 <== NOT EXECUTED 1bea8: 8a00000d bhi 1bee4 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 1beac: e2444030 sub r4, r4, #48 ; 0x30 <== NOT EXECUTED if ((i > (limit / 10)) 1beb0: 1a000004 bne 1bec8 <== NOT EXECUTED 1beb4: e1a00008 mov r0, r8 <== NOT EXECUTED 1beb8: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED 1bebc: eb00798b bl 3a4f0 <__umodsi3> <== NOT EXECUTED 1bec0: e1540000 cmp r4, r0 <== NOT EXECUTED 1bec4: 8a000006 bhi 1bee4 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 1bec8: e0274799 mla r7, r9, r7, r4 <== NOT EXECUTED 1becc: eaffffd7 b 1be30 <== NOT EXECUTED } if (sign == 0) 1bed0: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED return 0; *val = i * sign; 1bed4: 10030597 mulne r3, r7, r5 <== NOT EXECUTED 1bed8: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 1bedc: 158a3000 strne r3, [sl] <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 1bee0: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED return 0; *val = i * sign; return 1; 1bee4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 1bee8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 1beec: 0003d580 .word 0x0003d580 1bef0: 0003d58c .word 0x0003d58c 0001bef4 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 1bef4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 1bef8: e1a04002 mov r4, r2 <== NOT EXECUTED int c; *name = *bufp; 1befc: e5922000 ldr r2, [r2] <== NOT EXECUTED /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 1bf00: e59d7018 ldr r7, [sp, #24] <== NOT EXECUTED int c; *name = *bufp; 1bf04: e5812000 str r2, [r1] <== NOT EXECUTED for (;;) { c = getc(fp); 1bf08: e59f80c0 ldr r8, [pc, #192] ; 1bfd0 <== NOT EXECUTED /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 1bf0c: e1a05000 mov r5, r0 <== NOT EXECUTED 1bf10: e1a06003 mov r6, r3 <== NOT EXECUTED int c; *name = *bufp; for (;;) { c = getc(fp); 1bf14: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 1bf18: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 1bf1c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1bf20: e5853004 str r3, [r5, #4] <== NOT EXECUTED 1bf24: a5953000 ldrge r3, [r5] <== NOT EXECUTED 1bf28: a4d30001 ldrbge r0, [r3], #1 <== NOT EXECUTED 1bf2c: a5853000 strge r3, [r5] <== NOT EXECUTED 1bf30: b5980000 ldrlt r0, [r8] <== NOT EXECUTED 1bf34: b1a01005 movlt r1, r5 <== NOT EXECUTED 1bf38: bb004abc bllt 2ea30 <__srget_r> <== NOT EXECUTED if (c == ':') { 1bf3c: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 1bf40: 1a000002 bne 1bf50 <== NOT EXECUTED if (nlFlag) 1bf44: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 1bf48: 0a000013 beq 1bf9c <== NOT EXECUTED 1bf4c: ea00001d b 1bfc8 <== NOT EXECUTED return 0; break; } if (c == '\n') { 1bf50: e350000a cmp r0, #10 ; 0xa <== NOT EXECUTED 1bf54: 1a000002 bne 1bf64 <== NOT EXECUTED if (!nlFlag) 1bf58: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 1bf5c: 1a00000e bne 1bf9c <== NOT EXECUTED 1bf60: ea000018 b 1bfc8 <== NOT EXECUTED return 0; break; } if (c == EOF) 1bf64: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED 1bf68: 0a000016 beq 1bfc8 <== NOT EXECUTED return 0; if (*nleft < 2) 1bf6c: e5963000 ldr r3, [r6] <== NOT EXECUTED 1bf70: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 1bf74: 9a000013 bls 1bfc8 <== NOT EXECUTED return 0; **bufp = c; 1bf78: e5943000 ldr r3, [r4] <== NOT EXECUTED 1bf7c: e5c30000 strb r0, [r3] <== NOT EXECUTED ++(*bufp); 1bf80: e5943000 ldr r3, [r4] <== NOT EXECUTED --(*nleft); 1bf84: e5962000 ldr r2, [r6] <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 1bf88: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --(*nleft); 1bf8c: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 1bf90: e5843000 str r3, [r4] <== NOT EXECUTED --(*nleft); 1bf94: e5862000 str r2, [r6] <== NOT EXECUTED 1bf98: eaffffdd b 1bf14 <== NOT EXECUTED } **bufp = '\0'; 1bf9c: e5942000 ldr r2, [r4] <== NOT EXECUTED 1bfa0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1bfa4: e5c23000 strb r3, [r2] <== NOT EXECUTED ++(*bufp); 1bfa8: e5943000 ldr r3, [r4] <== NOT EXECUTED --(*nleft); 1bfac: e5962000 ldr r2, [r6] <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 1bfb0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --(*nleft); 1bfb4: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 1bfb8: e5843000 str r3, [r4] <== NOT EXECUTED --(*nleft); 1bfbc: e5862000 str r2, [r6] <== NOT EXECUTED 1bfc0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 1bfc4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return 1; 1bfc8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 1bfcc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 1bfd0: 0003d58c .word 0x0003d58c 00003f68 : scandir( const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)) { 3f68: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3f6c: e24dd050 sub sp, sp, #80 ; 0x50 3f70: e58d1000 str r1, [sp] 3f74: e1a09002 mov r9, r2 3f78: e1a0b003 mov fp, r3 struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 3f7c: ebfffdff bl 3780 3f80: e250a000 subs sl, r0, #0 ; 0x0 3f84: 0a00005b beq 40f8 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 3f88: e28d4004 add r4, sp, #4 ; 0x4 3f8c: e59a0000 ldr r0, [sl] 3f90: e1a01004 mov r1, r4 3f94: eb001a43 bl a8a8 3f98: e3500000 cmp r0, #0 ; 0x0 3f9c: ba000046 blt 40bc /* * 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); 3fa0: e59d0024 ldr r0, [sp, #36] 3fa4: e3a01018 mov r1, #24 ; 0x18 3fa8: eb0037a9 bl 11e54 <__aeabi_idiv> 3fac: e1a08000 mov r8, r0 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); 3fb0: e1a00100 lsl r0, r0, #2 3fb4: ebfffc0e bl 2ff4 if (names == NULL) 3fb8: e2505000 subs r5, r0, #0 ; 0x0 3fbc: 13a06000 movne r6, #0 ; 0x0 3fc0: 1a00002c bne 4078 3fc4: ea00003d b 40c0 goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { if (select != NULL && !(*select)(d)) 3fc8: e3590000 cmp r9, #0 ; 0x0 3fcc: 0a000003 beq 3fe0 3fd0: e1a0e00f mov lr, pc 3fd4: e12fff19 bx r9 3fd8: e3500000 cmp r0, #0 ; 0x0 3fdc: 0a000025 beq 4078 continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 3fe0: e1d400ba ldrh r0, [r4, #10] 3fe4: e2800004 add r0, r0, #4 ; 0x4 3fe8: e3c00003 bic r0, r0, #3 ; 0x3 3fec: e280000c add r0, r0, #12 ; 0xc 3ff0: ebfffbff bl 2ff4 if (p == NULL) 3ff4: e2507000 subs r7, r0, #0 ; 0x0 goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 3ff8: e284100c add r1, r4, #12 ; 0xc 3ffc: e287000c add r0, r7, #12 ; 0xc continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) 4000: 0a00002f beq 40c4 goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; 4004: 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; 4008: e5943000 ldr r3, [r4] p->d_reclen = d->d_reclen; 400c: 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; 4010: e5873000 str r3, [r7] p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 4014: e28c2001 add r2, ip, #1 ; 0x1 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 4018: 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; 401c: e1c740b8 strh r4, [r7, #8] p->d_namlen = d->d_namlen; 4020: e1c7c0ba strh ip, [r7, #10] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 4024: eb002fb7 bl ff08 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 4028: e1560008 cmp r6, r8 402c: 3a00000d bcc 4068 if (fstat(dirp->dd_fd, &stb) < 0) 4030: e28d1004 add r1, sp, #4 ; 0x4 <== NOT EXECUTED 4034: e59a0000 ldr r0, [sl] <== NOT EXECUTED 4038: eb001a1a bl a8a8 <== NOT EXECUTED 403c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 4040: e3a0100c mov r1, #12 ; 0xc <== NOT EXECUTED /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { if (fstat(dirp->dd_fd, &stb) < 0) 4044: ba00001e blt 40c4 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 4048: e59d0024 ldr r0, [sp, #36] <== NOT EXECUTED 404c: eb003780 bl 11e54 <__aeabi_idiv> <== NOT EXECUTED 4050: e1a08000 mov r8, r0 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 4054: e1a01108 lsl r1, r8, #2 <== NOT EXECUTED 4058: e1a00005 mov r0, r5 <== NOT EXECUTED 405c: eb001aab bl ab10 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 4060: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 4064: 0a000016 beq 40c4 <== NOT EXECUTED goto cleanup_and_bail; } names[nitems-1] = p; 4068: e2663001 rsb r3, r6, #1 ; 0x1 406c: e3e02003 mvn r2, #3 ; 0x3 4070: e0030392 mul r3, r2, r3 4074: e7857003 str r7, [r5, r3] arraysz = (stb.st_size / 24); names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 4078: e1a0000a mov r0, sl 407c: ebffff36 bl 3d5c 4080: e2504000 subs r4, r0, #0 ; 0x0 4084: 1affffcf bne 3fc8 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 4088: e1a0000a mov r0, sl 408c: ebfff90b bl 24c0 if (nitems && dcomp != NULL){ 4090: e3560000 cmp r6, #0 ; 0x0 4094: 135b0000 cmpne fp, #0 ; 0x0 qsort(names, nitems, sizeof(struct dirent *), 4098: 11a0300b movne r3, fp 409c: 11a00005 movne r0, r5 40a0: 11a01006 movne r1, r6 40a4: 13a02004 movne r2, #4 ; 0x4 40a8: 1b002c55 blne f204 (int (*)(const void *, const void *)) dcomp); } *namelist = names; 40ac: e59d3000 ldr r3, [sp] return(nitems); 40b0: e1a00006 mov r0, r6 closedir(dirp); if (nitems && dcomp != NULL){ qsort(names, nitems, sizeof(struct dirent *), (int (*)(const void *, const void *)) dcomp); } *namelist = names; 40b4: e5835000 str r5, [r3] 40b8: ea00000f b 40fc return(nitems); 40bc: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED 40c0: e1a06005 mov r6, r5 cleanup_and_bail: if ( dirp ) closedir( dirp ); 40c4: e1a0000a mov r0, sl 40c8: ebfff8fc bl 24c0 if ( names ) { 40cc: e3550000 cmp r5, #0 ; 0x0 40d0: 13a04000 movne r4, #0 ; 0x0 40d4: 0a000007 beq 40f8 40d8: ea000002 b 40e8 <== NOT EXECUTED for (i=0; i < nitems; i++ ) free( names[i] ); 40dc: e7950104 ldr r0, [r5, r4, lsl #2] <== NOT EXECUTED 40e0: ebfffa23 bl 2974 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 40e4: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED 40e8: e1540006 cmp r4, r6 <== NOT EXECUTED 40ec: 3afffffa bcc 40dc <== NOT EXECUTED free( names[i] ); free( names ); 40f0: e1a00005 mov r0, r5 <== NOT EXECUTED 40f4: ebfffa1e bl 2974 <== NOT EXECUTED 40f8: e3e00000 mvn r0, #0 ; 0x0 } return(-1); } 40fc: e28dd050 add sp, sp, #80 ; 0x50 4100: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0001bfd4 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1bfd4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 1bfd8: e24dd014 sub sp, sp, #20 ; 0x14 <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1bfdc: e28d6008 add r6, sp, #8 ; 0x8 <== NOT EXECUTED 1bfe0: e28d7004 add r7, sp, #4 ; 0x4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1bfe4: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 1bfe8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1bfec: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED 1bff0: e1a02006 mov r2, r6 <== NOT EXECUTED 1bff4: e1a03007 mov r3, r7 <== NOT EXECUTED 1bff8: e58d8000 str r8, [sp] <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1bffc: e1a04000 mov r4, r0 <== NOT EXECUTED 1c000: e1a05001 mov r5, r1 <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1c004: ebffffba bl 1bef4 <== NOT EXECUTED 1c008: e1500008 cmp r0, r8 <== NOT EXECUTED 1c00c: 0a00003d beq 1c108 <== NOT EXECUTED 1c010: e1a00004 mov r0, r4 <== NOT EXECUTED 1c014: e2851004 add r1, r5, #4 ; 0x4 <== NOT EXECUTED 1c018: e1a02006 mov r2, r6 <== NOT EXECUTED 1c01c: e1a03007 mov r3, r7 <== NOT EXECUTED 1c020: e58d8000 str r8, [sp] <== NOT EXECUTED 1c024: ebffffb2 bl 1bef4 <== NOT EXECUTED 1c028: e1500008 cmp r0, r8 <== NOT EXECUTED 1c02c: 0a000035 beq 1c108 <== NOT EXECUTED 1c030: e1a00004 mov r0, r4 <== NOT EXECUTED 1c034: e28d1010 add r1, sp, #16 ; 0x10 <== NOT EXECUTED 1c038: ebffff74 bl 1be10 <== NOT EXECUTED 1c03c: e1500008 cmp r0, r8 <== NOT EXECUTED 1c040: 0a000030 beq 1c108 <== NOT EXECUTED 1c044: e1a00004 mov r0, r4 <== NOT EXECUTED 1c048: e1a02006 mov r2, r6 <== NOT EXECUTED 1c04c: e1a03007 mov r3, r7 <== NOT EXECUTED 1c050: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 1c054: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 1c058: e58d4000 str r4, [sp] <== NOT EXECUTED 1c05c: ebffffa4 bl 1bef4 <== NOT EXECUTED 1c060: e1500008 cmp r0, r8 <== NOT EXECUTED 1c064: 0a000027 beq 1c108 <== 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; 1c068: e1dd31b0 ldrh r3, [sp, #16] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1c06c: e1a02008 mov r2, r8 <== NOT EXECUTED if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 1c070: e1c530b8 strh r3, [r5, #8] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1c074: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED 1c078: e1a03004 mov r3, r4 <== NOT EXECUTED 1c07c: ea000001 b 1c088 <== NOT EXECUTED if(*cp == ',') 1c080: e350002c cmp r0, #44 ; 0x2c <== NOT EXECUTED memcount++; 1c084: 02833001 addeq r3, r3, #1 ; 0x1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1c088: e7d10002 ldrb r0, [r1, r2] <== NOT EXECUTED 1c08c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED if(*cp == ',') memcount++; 1c090: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1c094: 1afffff9 bne 1c080 <== NOT EXECUTED } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 1c098: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED 1c09c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 1c0a0: e2833013 add r3, r3, #19 ; 0x13 <== NOT EXECUTED 1c0a4: e1520003 cmp r2, r3 <== NOT EXECUTED 1c0a8: 3a000016 bcc 1c108 <== NOT EXECUTED return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 1c0ac: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1c0b0: e283300f add r3, r3, #15 ; 0xf <== NOT EXECUTED 1c0b4: e3c3300f bic r3, r3, #15 ; 0xf <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 1c0b8: e5831000 str r1, [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); 1c0bc: e585300c str r3, [r5, #12] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 1c0c0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 1c0c4: e1a0c000 mov ip, r0 <== NOT EXECUTED grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 1c0c8: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED 1c0cc: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED 1c0d0: ea000005 b 1c0ec <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 1c0d4: e352002c cmp r2, #44 ; 0x2c <== NOT EXECUTED *cp = '\0'; 1c0d8: 0541c001 strbeq ip, [r1, #-1] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 1c0dc: 0595300c ldreq r3, [r5, #12] <== NOT EXECUTED 1c0e0: 07831100 streq r1, [r3, r0, lsl #2] <== NOT EXECUTED 1c0e4: 02800001 addeq r0, r0, #1 ; 0x1 <== NOT EXECUTED 1c0e8: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1c0ec: e5512001 ldrb r2, [r1, #-1] <== NOT EXECUTED 1c0f0: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 1c0f4: 1afffff6 bne 1c0d4 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 1c0f8: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 1c0fc: e7832100 str r2, [r3, r0, lsl #2] <== NOT EXECUTED 1c100: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 1c104: ea000000 b 1c10c <== NOT EXECUTED return 1; 1c108: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 1c10c: e28dd014 add sp, sp, #20 ; 0x14 <== NOT EXECUTED 1c110: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 0001c158 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 1c158: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 1c15c: e24dd014 sub sp, sp, #20 ; 0x14 <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1c160: e28d7008 add r7, sp, #8 ; 0x8 <== NOT EXECUTED 1c164: e28d8004 add r8, sp, #4 ; 0x4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 1c168: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 1c16c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1c170: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 1c174: e1a02007 mov r2, r7 <== NOT EXECUTED 1c178: e1a03008 mov r3, r8 <== NOT EXECUTED 1c17c: e58d6000 str r6, [sp] <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 1c180: e1a04000 mov r4, r0 <== NOT EXECUTED 1c184: e1a05001 mov r5, r1 <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1c188: ebffff59 bl 1bef4 <== NOT EXECUTED 1c18c: e1500006 cmp r0, r6 <== NOT EXECUTED 1c190: 0a000038 beq 1c278 <== NOT EXECUTED 1c194: e1a00004 mov r0, r4 <== NOT EXECUTED 1c198: e2851004 add r1, r5, #4 ; 0x4 <== NOT EXECUTED 1c19c: e1a02007 mov r2, r7 <== NOT EXECUTED 1c1a0: e1a03008 mov r3, r8 <== NOT EXECUTED 1c1a4: e58d6000 str r6, [sp] <== NOT EXECUTED 1c1a8: ebffff51 bl 1bef4 <== NOT EXECUTED 1c1ac: e1500006 cmp r0, r6 <== NOT EXECUTED 1c1b0: 0a000030 beq 1c278 <== NOT EXECUTED 1c1b4: e1a00004 mov r0, r4 <== NOT EXECUTED 1c1b8: e28d1010 add r1, sp, #16 ; 0x10 <== NOT EXECUTED 1c1bc: ebffff13 bl 1be10 <== NOT EXECUTED 1c1c0: e1500006 cmp r0, r6 <== NOT EXECUTED 1c1c4: 0a00002b beq 1c278 <== NOT EXECUTED 1c1c8: e1a00004 mov r0, r4 <== NOT EXECUTED 1c1cc: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED 1c1d0: ebffff0e bl 1be10 <== NOT EXECUTED 1c1d4: e1500006 cmp r0, r6 <== NOT EXECUTED 1c1d8: 0a000026 beq 1c278 <== NOT EXECUTED 1c1dc: e1a00004 mov r0, r4 <== NOT EXECUTED 1c1e0: e285100c add r1, r5, #12 ; 0xc <== NOT EXECUTED 1c1e4: e1a02007 mov r2, r7 <== NOT EXECUTED 1c1e8: e1a03008 mov r3, r8 <== NOT EXECUTED 1c1ec: e58d6000 str r6, [sp] <== NOT EXECUTED 1c1f0: ebffff3f bl 1bef4 <== NOT EXECUTED 1c1f4: e1500006 cmp r0, r6 <== NOT EXECUTED 1c1f8: 0a00001e beq 1c278 <== NOT EXECUTED 1c1fc: e1a00004 mov r0, r4 <== NOT EXECUTED 1c200: e2851010 add r1, r5, #16 ; 0x10 <== NOT EXECUTED 1c204: e1a02007 mov r2, r7 <== NOT EXECUTED 1c208: e1a03008 mov r3, r8 <== NOT EXECUTED 1c20c: e58d6000 str r6, [sp] <== NOT EXECUTED 1c210: ebffff37 bl 1bef4 <== NOT EXECUTED 1c214: e1500006 cmp r0, r6 <== NOT EXECUTED 1c218: 0a000016 beq 1c278 <== NOT EXECUTED 1c21c: e1a00004 mov r0, r4 <== NOT EXECUTED 1c220: e2851014 add r1, r5, #20 ; 0x14 <== NOT EXECUTED 1c224: e1a02007 mov r2, r7 <== NOT EXECUTED 1c228: e1a03008 mov r3, r8 <== NOT EXECUTED 1c22c: e58d6000 str r6, [sp] <== NOT EXECUTED 1c230: ebffff2f bl 1bef4 <== NOT EXECUTED 1c234: e1500006 cmp r0, r6 <== NOT EXECUTED 1c238: 0a00000e beq 1c278 <== NOT EXECUTED 1c23c: e1a00004 mov r0, r4 <== NOT EXECUTED 1c240: e1a02007 mov r2, r7 <== NOT EXECUTED 1c244: e1a03008 mov r3, r8 <== NOT EXECUTED 1c248: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 1c24c: e2851018 add r1, r5, #24 ; 0x18 <== NOT EXECUTED 1c250: e58d4000 str r4, [sp] <== NOT EXECUTED 1c254: ebffff26 bl 1bef4 <== NOT EXECUTED 1c258: e1500006 cmp r0, r6 <== NOT EXECUTED 1c25c: 0a000005 beq 1c278 <== 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; 1c260: e1dd30bc ldrh r3, [sp, #12] <== NOT EXECUTED 1c264: 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; 1c268: e1dd31b0 ldrh r3, [sp, #16] <== NOT EXECUTED pwd->pw_gid = pwgid; 1c26c: 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; 1c270: e1c530b8 strh r3, [r5, #8] <== NOT EXECUTED 1c274: ea000000 b 1c27c <== NOT EXECUTED pwd->pw_gid = pwgid; return 1; 1c278: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED } 1c27c: e28dd014 add sp, sp, #20 ; 0x14 <== NOT EXECUTED 1c280: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 00006884 : */ int sem_destroy( sem_t *sem ) { 6884: e92d4010 push {r4, lr} 6888: e24dd004 sub sp, sp, #4 ; 0x4 688c: e5901000 ldr r1, [r0] 6890: e1a0200d mov r2, sp 6894: e59f0048 ldr r0, [pc, #72] ; 68e4 6898: eb000858 bl 8a00 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 689c: e59d3000 ldr r3, [sp] 68a0: e3530000 cmp r3, #0 ; 0x0 68a4: 1a000008 bne 68cc case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 68a8: e5d04014 ldrb r4, [r0, #20] 68ac: e3540000 cmp r4, #0 ; 0x0 68b0: 0a000001 beq 68bc _Thread_Enable_dispatch(); 68b4: eb000a55 bl 9210 <_Thread_Enable_dispatch> <== NOT EXECUTED 68b8: ea000003 b 68cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 68bc: eb00186f bl ca80 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 68c0: eb000a52 bl 9210 <_Thread_Enable_dispatch> 68c4: e1a00004 mov r0, r4 68c8: ea000003 b 68dc #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 68cc: eb00206f bl ea90 <__errno> 68d0: e3a03016 mov r3, #22 ; 0x16 68d4: e5803000 str r3, [r0] 68d8: e3e00000 mvn r0, #0 ; 0x0 } 68dc: e28dd004 add sp, sp, #4 ; 0x4 68e0: e8bd8010 pop {r4, pc} 68e4: 0001c6e0 .word 0x0001c6e0 00006940 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 6940: e92d4010 push {r4, lr} int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 6944: e2504000 subs r4, r0, #0 ; 0x0 int sem_init( sem_t *sem, int pshared, unsigned int value ) { 6948: e24dd004 sub sp, sp, #4 ; 0x4 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 694c: 1a000004 bne 6964 rtems_set_errno_and_return_minus_one( EINVAL ); 6950: eb00204e bl ea90 <__errno> <== NOT EXECUTED 6954: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 6958: e5803000 str r3, [r0] <== NOT EXECUTED 695c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 6960: ea000006 b 6980 <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 6964: e1a0300d mov r3, sp 6968: e3a00000 mov r0, #0 ; 0x0 696c: eb001805 bl c988 <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 6970: e3700001 cmn r0, #1 ; 0x1 *sem = the_semaphore->Object.id; 6974: 159d3000 ldrne r3, [sp] 6978: 15933008 ldrne r3, [r3, #8] 697c: 15843000 strne r3, [r4] return status; } 6980: e28dd004 add sp, sp, #4 ; 0x4 6984: e8bd8010 pop {r4, pc} 0001bdc8 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 1bdc8: e59f300c ldr r3, [pc, #12] ; 1bddc <== NOT EXECUTED 1bdcc: e5933000 ldr r3, [r3] <== NOT EXECUTED 1bdd0: e1c302bc strh r0, [r3, #44] <== NOT EXECUTED return 0; } 1bdd4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1bdd8: e12fff1e bx lr <== NOT EXECUTED 1bddc: 0003c648 .word 0x0003c648 0001c390 : return NULL; return &grent; } void setgrent(void) { 1c390: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 1c394: ebffffcb bl 1c2c8 <== NOT EXECUTED if (group_fp != NULL) 1c398: e59f3020 ldr r3, [pc, #32] ; 1c3c0 <== NOT EXECUTED 1c39c: e5930000 ldr r0, [r3] <== NOT EXECUTED 1c3a0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED fclose(group_fp); 1c3a4: 1b00378c blne 2a1dc <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 1c3a8: e59f0014 ldr r0, [pc, #20] ; 1c3c4 <== NOT EXECUTED 1c3ac: e59f1014 ldr r1, [pc, #20] ; 1c3c8 <== NOT EXECUTED 1c3b0: eb00397c bl 2a9a8 <== NOT EXECUTED 1c3b4: e59f3004 ldr r3, [pc, #4] ; 1c3c0 <== NOT EXECUTED 1c3b8: e5830000 str r0, [r3] <== NOT EXECUTED } 1c3bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1c3c0: 00055ca4 .word 0x00055ca4 1c3c4: 00041394 .word 0x00041394 1c3c8: 0003fb2d .word 0x0003fb2d 0001c588 : return NULL; return &pwent; } void setpwent(void) { 1c588: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 1c58c: ebffff4d bl 1c2c8 <== NOT EXECUTED if (passwd_fp != NULL) 1c590: e59f3020 ldr r3, [pc, #32] ; 1c5b8 <== NOT EXECUTED 1c594: e5930000 ldr r0, [r3] <== NOT EXECUTED 1c598: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED fclose(passwd_fp); 1c59c: 1b00370e blne 2a1dc <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 1c5a0: e59f0014 ldr r0, [pc, #20] ; 1c5bc <== NOT EXECUTED 1c5a4: e59f1014 ldr r1, [pc, #20] ; 1c5c0 <== NOT EXECUTED 1c5a8: eb0038fe bl 2a9a8 <== NOT EXECUTED 1c5ac: e59f3004 ldr r3, [pc, #4] ; 1c5b8 <== NOT EXECUTED 1c5b0: e5830000 str r0, [r3] <== NOT EXECUTED } 1c5b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1c5b8: 00055bbc .word 0x00055bbc 1c5bc: 00041321 .word 0x00041321 1c5c0: 0003fb2d .word 0x0003fb2d 00003eb0 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 3eb0: e59f300c ldr r3, [pc, #12] ; 3ec4 <== NOT EXECUTED 3eb4: e5933000 ldr r3, [r3] <== NOT EXECUTED 3eb8: e1c302ba strh r0, [r3, #42] <== NOT EXECUTED return 0; } 3ebc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3ec0: e12fff1e bx lr <== NOT EXECUTED 3ec4: 0003c648 .word 0x0003c648 00006524 : int sigwait( const sigset_t *set, int *sig ) { 6524: e92d4010 push {r4, lr} 6528: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 652c: e3a01000 mov r1, #0 ; 0x0 6530: e1a02001 mov r2, r1 6534: ebffff8d bl 6370 if ( status != -1 ) { 6538: e3700001 cmn r0, #1 ; 0x1 653c: 0a000004 beq 6554 if ( sig ) 6540: e3540000 cmp r4, #0 ; 0x0 *sig = status; 6544: 15840000 strne r0, [r4] int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 6548: 01a00004 moveq r0, r4 *sig = status; 654c: 13a00000 movne r0, #0 ; 0x0 6550: e8bd8010 pop {r4, pc} return 0; } return errno; 6554: eb001ed0 bl e09c <__errno> <== NOT EXECUTED 6558: e5900000 ldr r0, [r0] <== NOT EXECUTED } 655c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00002af0 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2af0: e591303c ldr r3, [r1, #60] <== NOT EXECUTED 2af4: e59f2050 ldr r2, [pc, #80] ; 2b4c <== NOT EXECUTED 2af8: e0032002 and r2, r3, r2 <== NOT EXECUTED 2afc: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2b00: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2b04: e1a05001 mov r5, r1 <== NOT EXECUTED 2b08: 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)) { 2b0c: 0a00000b beq 2b40 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2b10: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 2b14: e1a02001 mov r2, r1 <== NOT EXECUTED 2b18: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 2b1c: eb0005fd bl 4318 <== NOT EXECUTED i = iproc (c, tty); 2b20: e1a01005 mov r1, r5 <== NOT EXECUTED 2b24: e1a00004 mov r0, r4 <== NOT EXECUTED 2b28: ebffff8b bl 295c <== NOT EXECUTED 2b2c: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2b30: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED 2b34: eb00063d bl 4430 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2b38: e1a00004 mov r0, r4 <== NOT EXECUTED 2b3c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 2b40: e1a00004 mov r0, r4 <== NOT EXECUTED } return i; } 2b44: 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); 2b48: eaffff83 b 295c <== NOT EXECUTED 2b4c: 00000e78 .word 0x00000e78 00005218 : int _STAT_NAME( const char *path, struct stat *buf ) { 5218: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 521c: e2514000 subs r4, r1, #0 ; 0x0 int _STAT_NAME( const char *path, struct stat *buf ) { 5220: e24dd010 sub sp, sp, #16 ; 0x10 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 5224: 1a000002 bne 5234 rtems_set_errno_and_return_minus_one( EFAULT ); 5228: eb00939a bl 2a098 <__errno> 522c: e3a0300e mov r3, #14 ; 0xe 5230: ea000014 b 5288 status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 5234: e3a01000 mov r1, #0 ; 0x0 5238: e1a0200d mov r2, sp 523c: e3a03001 mov r3, #1 ; 0x1 5240: ebfffa80 bl 3c48 if ( status != 0 ) 5244: 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 ); 5248: e1a0500d mov r5, sp if ( status != 0 ) 524c: 1a00000e bne 528c return -1; if ( !loc.handlers->fstat_h ){ 5250: e59d3004 ldr r3, [sp, #4] 5254: e5933018 ldr r3, [r3, #24] 5258: e3530000 cmp r3, #0 ; 0x0 525c: 1a00000c bne 5294 rtems_filesystem_freenode( &loc ); 5260: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 5264: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 5268: 0a000004 beq 5280 <== NOT EXECUTED 526c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5270: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 5274: 11a0000d movne r0, sp <== NOT EXECUTED 5278: 11a0e00f movne lr, pc <== NOT EXECUTED 527c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 5280: eb009384 bl 2a098 <__errno> <== NOT EXECUTED 5284: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5288: e5803000 str r3, [r0] 528c: e3e04000 mvn r4, #0 ; 0x0 5290: ea000011 b 52dc /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 5294: e1a01000 mov r1, r0 5298: e3a0204c mov r2, #76 ; 0x4c 529c: e1a00004 mov r0, r4 52a0: eb009d84 bl 2c8b8 status = (*loc.handlers->fstat_h)( &loc, buf ); 52a4: e1a01004 mov r1, r4 52a8: e59d3004 ldr r3, [sp, #4] 52ac: e1a0000d mov r0, sp 52b0: e1a0e00f mov lr, pc 52b4: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 52b8: e59d3008 ldr r3, [sp, #8] 52bc: 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 ); 52c0: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 52c4: 0a000004 beq 52dc 52c8: e593301c ldr r3, [r3, #28] 52cc: e3530000 cmp r3, #0 ; 0x0 52d0: 11a0000d movne r0, sp 52d4: 11a0e00f movne lr, pc 52d8: 112fff13 bxne r3 return status; } 52dc: e1a00004 mov r0, r4 52e0: e28dd010 add sp, sp, #16 ; 0x10 52e4: e8bd8030 pop {r4, r5, pc} 0001d498 : int symlink( const char *actualpath, const char *sympath ) { 1d498: 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 ); 1d49c: e5d13000 ldrb r3, [r1] 1d4a0: e353005c cmp r3, #92 ; 0x5c 1d4a4: 1353002f cmpne r3, #47 ; 0x2f int symlink( const char *actualpath, const char *sympath ) { 1d4a8: e24dd014 sub sp, sp, #20 ; 0x14 1d4ac: e1a04001 mov r4, r1 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 1d4b0: 13a0e000 movne lr, #0 ; 0x0 1d4b4: 03a0e001 moveq lr, #1 ; 0x1 int symlink( const char *actualpath, const char *sympath ) { 1d4b8: 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 ); 1d4bc: 0a000001 beq 1d4c8 1d4c0: e3530000 cmp r3, #0 ; 0x0 1d4c4: 1a000006 bne 1d4e4 1d4c8: e59f30cc ldr r3, [pc, #204] ; 1d59c 1d4cc: e5933000 ldr r3, [r3] 1d4d0: e2833014 add r3, r3, #20 ; 0x14 1d4d4: e893000f ldm r3, {r0, r1, r2, r3} 1d4d8: e88d000f stm sp, {r0, r1, r2, r3} 1d4dc: e3a03001 mov r3, #1 ; 0x1 1d4e0: ea000005 b 1d4fc 1d4e4: e59f30b0 ldr r3, [pc, #176] ; 1d59c 1d4e8: e5933000 ldr r3, [r3] 1d4ec: e2833004 add r3, r3, #4 ; 0x4 1d4f0: e893000f ldm r3, {r0, r1, r2, r3} 1d4f4: e88d000f stm sp, {r0, r1, r2, r3} 1d4f8: e1a0300e mov r3, lr result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 1d4fc: e0840003 add r0, r4, r3 1d500: e1a0100d mov r1, sp 1d504: e28d2010 add r2, sp, #16 ; 0x10 1d508: e59d3008 ldr r3, [sp, #8] 1d50c: e1a0e00f mov lr, pc 1d510: e593f004 ldr pc, [r3, #4] if ( result != 0 ) 1d514: e3500000 cmp r0, #0 ; 0x0 int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 1d518: e1a0500d mov r5, sp if ( result != 0 ) 1d51c: 1a00000b bne 1d550 return -1; if ( !loc.ops->symlink_h ) { 1d520: e59d3008 ldr r3, [sp, #8] 1d524: e593c038 ldr ip, [r3, #56] 1d528: e35c0000 cmp ip, #0 ; 0x0 1d52c: 1a000009 bne 1d558 rtems_filesystem_freenode( &loc ); 1d530: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1d534: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d538: 11a0000d movne r0, sp <== NOT EXECUTED 1d53c: 11a0e00f movne lr, pc <== NOT EXECUTED 1d540: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1d544: eb0032d3 bl 2a098 <__errno> <== NOT EXECUTED 1d548: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1d54c: e5803000 str r3, [r0] <== NOT EXECUTED 1d550: e3e04000 mvn r4, #0 ; 0x0 1d554: ea00000d b 1d590 } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 1d558: e1a01006 mov r1, r6 1d55c: e1a0000d mov r0, sp 1d560: e59d2010 ldr r2, [sp, #16] 1d564: e1a0e00f mov lr, pc 1d568: e12fff1c bx ip rtems_filesystem_freenode( &loc ); 1d56c: e59d3008 ldr r3, [sp, #8] 1d570: 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); 1d574: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 1d578: 0a000004 beq 1d590 1d57c: e593301c ldr r3, [r3, #28] 1d580: e3530000 cmp r3, #0 ; 0x0 1d584: 11a0000d movne r0, sp 1d588: 11a0e00f movne lr, pc 1d58c: 112fff13 bxne r3 return result; } 1d590: e1a00004 mov r0, r4 1d594: e28dd014 add sp, sp, #20 ; 0x14 1d598: e8bd8070 pop {r4, r5, r6, pc} 1d59c: 0003c648 .word 0x0003c648 0000f0c0 : int tcgetattr( int fd, struct termios *tp ) { f0c0: e1a02001 mov r2, r1 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); f0c4: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED f0c8: ea000e78 b 12ab0 <== NOT EXECUTED 0000f0cc : int fd, int opt, struct termios *tp ) { switch (opt) { f0cc: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED int tcsetattr( int fd, int opt, struct termios *tp ) { f0d0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED f0d4: e1a05002 mov r5, r2 <== NOT EXECUTED f0d8: e1a04000 mov r4, r0 <== NOT EXECUTED switch (opt) { f0dc: 0a00000a beq f10c <== NOT EXECUTED f0e0: e3510001 cmp r1, #1 ; 0x1 <== NOT EXECUTED f0e4: 0a000003 beq f0f8 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); f0e8: eb001164 bl 13680 <__errno> <== NOT EXECUTED f0ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED f0f0: e5803000 str r3, [r0] <== NOT EXECUTED f0f4: ea000009 b f120 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) f0f8: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED f0fc: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED f100: eb000e6a bl 12ab0 <== NOT EXECUTED f104: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED f108: ba000004 blt f120 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f10c: e1a00004 mov r0, r4 <== NOT EXECUTED f110: e1a02005 mov r2, r5 <== NOT EXECUTED f114: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED } } f118: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f11c: ea000e63 b 12ab0 <== NOT EXECUTED } } f120: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED f124: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00004208 : DIR *dirp ) { rtems_libio_t *iop; if ( !dirp ) 4208: e3500000 cmp r0, #0 ; 0x0 #include long telldir( DIR *dirp ) { 420c: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; if ( !dirp ) 4210: 1a000004 bne 4228 rtems_set_errno_and_return_minus_one( EBADF ); 4214: eb00277e bl e014 <__errno> <== NOT EXECUTED 4218: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 421c: e5803000 str r3, [r0] <== NOT EXECUTED 4220: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 4224: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 4228: e59f3040 ldr r3, [pc, #64] ; 4270 422c: e5901000 ldr r1, [r0] 4230: e5933000 ldr r3, [r3] 4234: e1510003 cmp r1, r3 4238: 2a000005 bcs 4254 423c: e59f3030 ldr r3, [pc, #48] ; 4274 4240: e5932000 ldr r2, [r3] 4244: e3a03034 mov r3, #52 ; 0x34 4248: e0202193 mla r0, r3, r1, r2 if (iop == NULL) 424c: e3500000 cmp r0, #0 ; 0x0 4250: 1a000004 bne 4268 assert(0); 4254: e59f001c ldr r0, [pc, #28] ; 4278 <== NOT EXECUTED 4258: e3a0102c mov r1, #44 ; 0x2c <== NOT EXECUTED 425c: e59f2018 ldr r2, [pc, #24] ; 427c <== NOT EXECUTED 4260: e59f3018 ldr r3, [pc, #24] ; 4280 <== NOT EXECUTED 4264: ebfff832 bl 2334 <__assert_func> <== NOT EXECUTED return (long)( iop->offset ); 4268: e5900008 ldr r0, [r0, #8] } 426c: e49df004 pop {pc} ; (ldr pc, [sp], #4) 4270: 000131b4 .word 0x000131b4 4274: 00015954 .word 0x00015954 4278: 00015263 .word 0x00015263 427c: 00013e88 .word 0x00013e88 4280: 000148ba .word 0x000148ba 00005520 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 5520: e92d40f0 push {r4, r5, r6, r7, lr} Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 5524: e2525000 subs r5, r2, #0 ; 0x0 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 5528: e24dd018 sub sp, sp, #24 ; 0x18 552c: e1a07000 mov r7, r0 5530: e1a0c001 mov ip, r1 5534: e1a06003 mov r6, r3 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 5538: 0a000054 beq 5690 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 ) || 553c: e59f2164 ldr r2, [pc, #356] ; 56a8 5540: e595300c ldr r3, [r5, #12] 5544: e1530002 cmp r3, r2 5548: 8a000050 bhi 5690 554c: e5953004 ldr r3, [r5, #4] 5550: e1530002 cmp r3, r2 5554: 8a00004d bhi 5690 5558: e3530000 cmp r3, #0 ; 0x0 555c: ba00004b blt 5690 ( 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 ) { 5560: e3510004 cmp r1, #4 ; 0x4 5564: 13510000 cmpne r1, #0 ; 0x0 5568: 1a000048 bne 5690 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 556c: e895000f ldm r5, {r0, r1, r2, r3} /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 5570: e35c0004 cmp ip, #4 ; 0x4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 5574: e28dc004 add ip, sp, #4 ; 0x4 5578: e88c000f stm ip, {r0, r1, r2, r3} /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 557c: 1a000009 bne 55a8 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 5580: e28c4008 add r4, ip, #8 ; 0x8 5584: e59f0120 ldr r0, [pc, #288] ; 56ac 5588: e1a01004 mov r1, r4 558c: eb000d9b bl 8c00 <_Timespec_Greater_than> 5590: e3500000 cmp r0, #0 ; 0x0 5594: 1a00003d bne 5690 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 5598: e1a01004 mov r1, r4 559c: e59f0108 ldr r0, [pc, #264] ; 56ac 55a0: e1a02004 mov r2, r4 55a4: eb000da2 bl 8c34 <_Timespec_Subtract> 55a8: e1a01007 mov r1, r7 55ac: e59f00fc ldr r0, [pc, #252] ; 56b0 55b0: e28d2014 add r2, sp, #20 ; 0x14 55b4: eb0007f2 bl 7584 <_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 ) { 55b8: e59d3014 ldr r3, [sp, #20] 55bc: e3530000 cmp r3, #0 ; 0x0 55c0: e1a04000 mov r4, r0 55c4: 1a000031 bne 5690 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 ) { 55c8: e59d300c ldr r3, [sp, #12] 55cc: e3530000 cmp r3, #0 ; 0x0 55d0: 1a00000f bne 5614 55d4: e59d3010 ldr r3, [sp, #16] 55d8: e3530000 cmp r3, #0 ; 0x0 55dc: 1a00000c bne 5614 /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 55e0: e2800010 add r0, r0, #16 ; 0x10 55e4: eb000ec7 bl 9108 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 55e8: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 55ec: 12843054 addne r3, r4, #84 ; 0x54 55f0: 1893000f ldmne r3, {r0, r1, r2, r3} 55f4: 1886000f stmne r6, {r0, r1, r2, r3} /* The new data are set */ ptimer->timer_data = normalize; 55f8: e28d3004 add r3, sp, #4 ; 0x4 55fc: e893000f ldm r3, {r0, r1, r2, r3} 5600: e284c054 add ip, r4, #84 ; 0x54 5604: e88c000f stm ip, {r0, r1, r2, r3} /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 5608: e3a03004 mov r3, #4 ; 0x4 560c: e5c4303c strb r3, [r4, #60] 5610: ea00001b b 5684 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 5614: e1a00005 mov r0, r5 5618: eb000d96 bl 8c78 <_Timespec_To_ticks> 561c: e5840064 str r0, [r4, #100] initial_period = _Timespec_To_ticks( &normalize.it_value ); 5620: e28d000c add r0, sp, #12 ; 0xc 5624: eb000d93 bl 8c78 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 5628: e58d4000 str r4, [sp] return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); initial_period = _Timespec_To_ticks( &normalize.it_value ); 562c: e1a01000 mov r1, r0 activated = _POSIX_Timer_Insert_helper( 5630: e5942008 ldr r2, [r4, #8] 5634: e2840010 add r0, r4, #16 ; 0x10 5638: e59f3074 ldr r3, [pc, #116] ; 56b4 563c: eb0017d0 bl b584 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 5640: e2505000 subs r5, r0, #0 ; 0x0 5644: 1a000002 bne 5654 _Thread_Enable_dispatch(); 5648: eb0009d1 bl 7d94 <_Thread_Enable_dispatch> <== NOT EXECUTED 564c: e1a00005 mov r0, r5 <== NOT EXECUTED 5650: ea000012 b 56a0 <== NOT EXECUTED /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 5654: e3560000 cmp r6, #0 ; 0x0 *ovalue = ptimer->timer_data; 5658: 12843054 addne r3, r4, #84 ; 0x54 565c: 1893000f ldmne r3, {r0, r1, r2, r3} 5660: 1886000f stmne r6, {r0, r1, r2, r3} ptimer->timer_data = normalize; 5664: e28d3004 add r3, sp, #4 ; 0x4 5668: e893000f ldm r3, {r0, r1, r2, r3} 566c: e284c054 add ip, r4, #84 ; 0x54 5670: e88c000f stm ip, {r0, r1, r2, r3} /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 5674: e3a03003 mov r3, #3 ; 0x3 5678: e5c4303c strb r3, [r4, #60] _TOD_Get( &ptimer->time ); 567c: e284006c add r0, r4, #108 ; 0x6c 5680: eb0005a9 bl 6d2c <_TOD_Get> _Thread_Enable_dispatch(); 5684: eb0009c2 bl 7d94 <_Thread_Enable_dispatch> 5688: e3a00000 mov r0, #0 ; 0x0 568c: ea000003 b 56a0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 5690: eb001ee1 bl d21c <__errno> 5694: e3a03016 mov r3, #22 ; 0x16 5698: e5803000 str r3, [r0] 569c: e3e00000 mvn r0, #0 ; 0x0 } 56a0: e28dd018 add sp, sp, #24 ; 0x18 56a4: e8bd80f0 pop {r4, r5, r6, r7, pc} 56a8: 3b9ac9ff .word 0x3b9ac9ff 56ac: 0001a9f4 .word 0x0001a9f4 56b0: 0001ac40 .word 0x0001ac40 56b4: 000056b8 .word 0x000056b8 0001d70c : */ char *ttyname( int fd ) { 1d70c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 1d710: e59f1018 ldr r1, [pc, #24] ; 1d730 <== NOT EXECUTED 1d714: e59f2018 ldr r2, [pc, #24] ; 1d734 <== NOT EXECUTED 1d718: ebffffbd bl 1d614 <== NOT EXECUTED 1d71c: e59f300c ldr r3, [pc, #12] ; 1d730 <== NOT EXECUTED return ttyname_buf; return NULL; } 1d720: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1d724: 01a00003 moveq r0, r3 <== NOT EXECUTED 1d728: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED 1d72c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 1d730: 0003c64c .word 0x0003c64c 1d734: 00000406 .word 0x00000406 0001d614 : int ttyname_r( int fd, char *name, size_t namesize ) { 1d614: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 1d618: e24dd0bc sub sp, sp, #188 ; 0xbc <== NOT EXECUTED 1d61c: e1a06001 mov r6, r1 <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 1d620: e28d1098 add r1, sp, #152 ; 0x98 <== NOT EXECUTED int ttyname_r( int fd, char *name, size_t namesize ) { 1d624: e1a04000 mov r4, r0 <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 1d628: ebffffdf bl 1d5ac <== NOT EXECUTED 1d62c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1d630: ba00000e blt 1d670 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 1d634: e1a00004 mov r0, r4 <== NOT EXECUTED 1d638: e28d104c add r1, sp, #76 ; 0x4c <== NOT EXECUTED 1d63c: ebfff843 bl 1b750 <== NOT EXECUTED 1d640: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1d644: 1a000009 bne 1d670 <== NOT EXECUTED 1d648: e59d3058 ldr r3, [sp, #88] <== NOT EXECUTED 1d64c: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 1d650: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED 1d654: 1a000005 bne 1d670 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) 1d658: e59f00a8 ldr r0, [pc, #168] ; 1d708 <== NOT EXECUTED 1d65c: ebfffdd9 bl 1cdc8 <== NOT EXECUTED 1d660: 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); 1d664: 12865005 addne r5, r6, #5 ; 0x5 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 1d668: 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) 1d66c: 1a00001c bne 1d6e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); 1d670: eb003288 bl 2a098 <__errno> <== NOT EXECUTED 1d674: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 1d678: e5803000 str r3, [r0] <== NOT EXECUTED 1d67c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 1d680: ea00001e b 1d700 <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) 1d684: e5902000 ldr r2, [r0] <== NOT EXECUTED 1d688: e59d3054 ldr r3, [sp, #84] <== NOT EXECUTED 1d68c: e1520003 cmp r2, r3 <== NOT EXECUTED 1d690: 1a000013 bne 1d6e4 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 1d694: e280100c add r1, r0, #12 ; 0xc <== NOT EXECUTED 1d698: e1a00005 mov r0, r5 <== NOT EXECUTED 1d69c: eb004726 bl 2f33c <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 1d6a0: e1a00006 mov r0, r6 <== NOT EXECUTED 1d6a4: e1a0100d mov r1, sp <== NOT EXECUTED 1d6a8: ebff9eda bl 5218 <== NOT EXECUTED 1d6ac: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1d6b0: 1a00000b bne 1d6e4 <== NOT EXECUTED 1d6b4: e59d2000 ldr r2, [sp] <== NOT EXECUTED 1d6b8: e59d304c ldr r3, [sp, #76] <== NOT EXECUTED 1d6bc: e1530002 cmp r3, r2 <== NOT EXECUTED 1d6c0: 1a000007 bne 1d6e4 <== NOT EXECUTED 1d6c4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 1d6c8: e59d3050 ldr r3, [sp, #80] <== NOT EXECUTED 1d6cc: e1530002 cmp r3, r2 <== NOT EXECUTED 1d6d0: 1a000003 bne 1d6e4 <== NOT EXECUTED 1d6d4: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 1d6d8: e59d3054 ldr r3, [sp, #84] <== NOT EXECUTED 1d6dc: e1530002 cmp r3, r2 <== NOT EXECUTED 1d6e0: 0a000003 beq 1d6f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) rtems_set_errno_and_return_minus_one(EBADF); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 1d6e4: e1a00004 mov r0, r4 <== NOT EXECUTED 1d6e8: ebfffe6b bl 1d09c <== NOT EXECUTED 1d6ec: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1d6f0: 1affffe3 bne 1d684 <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 1d6f4: e1a00004 mov r0, r4 <== NOT EXECUTED 1d6f8: eb002859 bl 27864 <== NOT EXECUTED 1d6fc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return 0; } 1d700: e28dd0bc add sp, sp, #188 ; 0xbc <== NOT EXECUTED 1d704: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 1d708: 0004146f .word 0x0004146f 00003fc4 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 3fc4: e92d4070 push {r4, r5, r6, lr} /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 3fc8: e59f40dc ldr r4, [pc, #220] ; 40ac 3fcc: e594201c ldr r2, [r4, #28] 3fd0: e3520000 cmp r2, #0 ; 0x0 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 3fd4: e24dd008 sub sp, sp, #8 ; 0x8 3fd8: e1a06000 mov r6, r0 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 3fdc: 1a000006 bne 3ffc Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3fe0: e59f30c8 ldr r3, [pc, #200] ; 40b0 the_watchdog->id = id; the_watchdog->user_data = user_data; 3fe4: e5842024 str r2, [r4, #36] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3fe8: e584301c str r3, [r4, #28] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3fec: e5842008 str r2, [r4, #8] the_watchdog->routine = routine; the_watchdog->id = id; 3ff0: e5842020 str r2, [r4, #32] the_watchdog->user_data = user_data; 3ff4: e1a05002 mov r5, r2 3ff8: ea000013 b 404c _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 3ffc: e1a00004 mov r0, r4 <== NOT EXECUTED 4000: eb000ed7 bl 7b64 <_Watchdog_Remove> <== NOT EXECUTED 4004: e2400002 sub r0, r0, #2 ; 0x2 <== NOT EXECUTED 4008: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED 400c: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED 4010: 8a00000d bhi 404c <== NOT EXECUTED * 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); 4014: e594300c ldr r3, [r4, #12] <== NOT EXECUTED 4018: e2840014 add r0, r4, #20 ; 0x14 <== NOT EXECUTED 401c: e8900005 ldm r0, {r0, r2} <== NOT EXECUTED 4020: e0800003 add r0, r0, r3 <== NOT EXECUTED /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 4024: e0620000 rsb r0, r2, r0 <== NOT EXECUTED 4028: e1a0100d mov r1, sp <== NOT EXECUTED 402c: eb000d6d bl 75e8 <_Timespec_From_ticks> <== NOT EXECUTED remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4030: e59d2000 ldr r2, [sp] <== NOT EXECUTED 4034: e59f3078 ldr r3, [pc, #120] ; 40b4 <== NOT EXECUTED remaining += tp.tv_nsec / 1000; 4038: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 403c: e3a01ffa mov r1, #1000 ; 0x3e8 <== 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; 4040: e0040392 mul r4, r2, r3 <== NOT EXECUTED remaining += tp.tv_nsec / 1000; 4044: eb00303b bl 10138 <__aeabi_idiv> <== NOT EXECUTED 4048: e0805004 add r5, r0, r4 <== 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 ) { 404c: e3560000 cmp r6, #0 ; 0x0 4050: 0a000012 beq 40a0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4054: e59f1058 ldr r1, [pc, #88] ; 40b4 4058: e1a00006 mov r0, r6 405c: eb002ff1 bl 10028 <__aeabi_uidiv> tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4060: e59f104c ldr r1, [pc, #76] ; 40b4 * 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; 4064: e58d0000 str r0, [sp] tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4068: e1a00006 mov r0, r6 406c: eb003081 bl 10278 <__umodsi3> 4070: e3a03ffa mov r3, #1000 ; 0x3e8 4074: e0030390 mul r3, r0, r3 ticks = _Timespec_To_ticks( &tp ); 4078: e1a0000d mov r0, sp */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 407c: e58d3004 str r3, [sp, #4] ticks = _Timespec_To_ticks( &tp ); 4080: eb000d7b bl 7674 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 4084: e1a0000d mov r0, sp 4088: eb000d79 bl 7674 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 408c: e59f1018 ldr r1, [pc, #24] ; 40ac 4090: e581000c str r0, [r1, #12] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4094: e59f001c ldr r0, [pc, #28] ; 40b8 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 ); 4098: e1a0400d mov r4, sp 409c: eb000e54 bl 79f4 <_Watchdog_Insert> _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 40a0: e1a00005 mov r0, r5 40a4: e28dd008 add sp, sp, #8 ; 0x8 40a8: e8bd8070 pop {r4, r5, r6, pc} 40ac: 0001374c .word 0x0001374c 40b0: 000040bc .word 0x000040bc 40b4: 000f4240 .word 0x000f4240 40b8: 00013924 .word 0x00013924 0001d754 : #include int unlink( const char *path ) { 1d754: e92d4030 push {r4, r5, lr} /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 1d758: e3a01000 mov r1, #0 ; 0x0 #include int unlink( const char *path ) { 1d75c: e24dd010 sub sp, sp, #16 ; 0x10 /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 1d760: e1a0200d mov r2, sp 1d764: e1a03001 mov r3, r1 1d768: ebff9936 bl 3c48 if ( result != 0 ) 1d76c: e3500000 cmp r0, #0 ; 0x0 1d770: 1a000041 bne 1d87c return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 1d774: e2800002 add r0, r0, #2 ; 0x2 1d778: e1a0100d mov r1, sp 1d77c: ebff990a bl 3bac if (result != 0 && errno != ENOTSUP) { 1d780: e3500000 cmp r0, #0 ; 0x0 1d784: 0a00000d beq 1d7c0 1d788: eb003242 bl 2a098 <__errno> <== NOT EXECUTED 1d78c: e5903000 ldr r3, [r0] <== NOT EXECUTED 1d790: e3530086 cmp r3, #134 ; 0x86 <== NOT EXECUTED 1d794: 0a000009 beq 1d7c0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1d798: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 1d79c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d7a0: 0a000035 beq 1d87c <== NOT EXECUTED 1d7a4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1d7a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d7ac: 0a000032 beq 1d87c <== NOT EXECUTED 1d7b0: e1a0000d mov r0, sp <== NOT EXECUTED 1d7b4: e1a0e00f mov lr, pc <== NOT EXECUTED 1d7b8: e12fff13 bx r3 <== NOT EXECUTED 1d7bc: ea00002e b 1d87c <== NOT EXECUTED return -1; } if ( !loc.ops->node_type_h ) { 1d7c0: e59d3008 ldr r3, [sp, #8] 1d7c4: e5932010 ldr r2, [r3, #16] 1d7c8: e3520000 cmp r2, #0 ; 0x0 1d7cc: 0a000013 beq 1d820 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 1d7d0: e1a0000d mov r0, sp 1d7d4: e1a0e00f mov lr, pc 1d7d8: e12fff12 bx r2 1d7dc: e3500001 cmp r0, #1 ; 0x1 1d7e0: e1a0500d mov r5, sp 1d7e4: e59d3008 ldr r3, [sp, #8] 1d7e8: 1a000009 bne 1d814 rtems_filesystem_freenode( &loc ); 1d7ec: e3530000 cmp r3, #0 ; 0x0 1d7f0: 0a000004 beq 1d808 1d7f4: e593301c ldr r3, [r3, #28] 1d7f8: e3530000 cmp r3, #0 ; 0x0 1d7fc: 11a0000d movne r0, sp 1d800: 11a0e00f movne lr, pc 1d804: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EISDIR ); 1d808: eb003222 bl 2a098 <__errno> 1d80c: e3a03015 mov r3, #21 ; 0x15 1d810: ea000009 b 1d83c } if ( !loc.ops->unlink_h ) { 1d814: e593200c ldr r2, [r3, #12] 1d818: e3520000 cmp r2, #0 ; 0x0 1d81c: 1a000008 bne 1d844 rtems_filesystem_freenode( &loc ); 1d820: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1d824: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1d828: 11a0000d movne r0, sp <== NOT EXECUTED 1d82c: 11a0e00f movne lr, pc <== NOT EXECUTED 1d830: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1d834: eb003217 bl 2a098 <__errno> <== NOT EXECUTED 1d838: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1d83c: e5803000 str r3, [r0] 1d840: ea00000d b 1d87c } result = (*loc.ops->unlink_h)( &loc ); 1d844: e1a0000d mov r0, sp 1d848: e1a0e00f mov lr, pc 1d84c: e12fff12 bx r2 rtems_filesystem_freenode( &loc ); 1d850: e59d3008 ldr r3, [sp, #8] 1d854: 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 ); 1d858: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 1d85c: 0a000007 beq 1d880 1d860: e593301c ldr r3, [r3, #28] 1d864: e3530000 cmp r3, #0 ; 0x0 1d868: 0a000004 beq 1d880 1d86c: e1a0000d mov r0, sp 1d870: e1a0e00f mov lr, pc 1d874: e12fff13 bx r3 1d878: ea000000 b 1d880 1d87c: e3e04000 mvn r4, #0 ; 0x0 return result; } 1d880: e1a00004 mov r0, r4 1d884: e28dd010 add sp, sp, #16 ; 0x10 1d888: e8bd8030 pop {r4, r5, pc} 0001d8e8 : */ int unmount( const char *path ) { 1d8e8: e92d4030 push {r4, r5, lr} 1d8ec: 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 ) ) 1d8f0: e3a01000 mov r1, #0 ; 0x0 1d8f4: e1a0200d mov r2, sp 1d8f8: e3a03001 mov r3, #1 ; 0x1 1d8fc: ebff98d1 bl 3c48 1d900: e3500000 cmp r0, #0 ; 0x0 1d904: e1a0500d mov r5, sp 1d908: 1a000057 bne 1da6c return -1; mt_entry = loc.mt_entry; 1d90c: 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) ){ 1d910: e59d3000 ldr r3, [sp] 1d914: e5942018 ldr r2, [r4, #24] 1d918: e1520003 cmp r2, r3 1d91c: e59d3008 ldr r3, [sp, #8] 1d920: 0a000009 beq 1d94c rtems_filesystem_freenode( &loc ); 1d924: e3530000 cmp r3, #0 ; 0x0 1d928: 0a000004 beq 1d940 1d92c: e593301c ldr r3, [r3, #28] 1d930: e3530000 cmp r3, #0 ; 0x0 1d934: 11a0000d movne r0, sp 1d938: 11a0e00f movne lr, pc 1d93c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 1d940: eb0031d4 bl 2a098 <__errno> 1d944: e3a0300d mov r3, #13 ; 0xd 1d948: ea000023 b 1d9dc /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 1d94c: e3530000 cmp r3, #0 ; 0x0 1d950: 0a000004 beq 1d968 1d954: e593301c ldr r3, [r3, #28] 1d958: e3530000 cmp r3, #0 ; 0x0 1d95c: 11a0000d movne r0, sp 1d960: 11a0e00f movne lr, pc 1d964: 112fff13 bxne r3 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 1d968: e5943010 ldr r3, [r4, #16] 1d96c: e5933028 ldr r3, [r3, #40] 1d970: e3530000 cmp r3, #0 ; 0x0 1d974: 0a000003 beq 1d988 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 1d978: e5943020 ldr r3, [r4, #32] 1d97c: e593302c ldr r3, [r3, #44] 1d980: e3530000 cmp r3, #0 ; 0x0 1d984: 1a000002 bne 1d994 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1d988: eb0031c2 bl 2a098 <__errno> <== NOT EXECUTED 1d98c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1d990: ea000011 b 1d9dc <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 1d994: e59f30f0 ldr r3, [pc, #240] ; 1da8c 1d998: e5933000 ldr r3, [r3] 1d99c: e5933010 ldr r3, [r3, #16] 1d9a0: e1530004 cmp r3, r4 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 1d9a4: 159f00e4 ldrne r0, [pc, #228] ; 1da90 1d9a8: 14901004 ldrne r1, [r0], #4 * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 1d9ac: 1a000005 bne 1d9c8 1d9b0: ea000007 b 1d9d4 for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 1d9b4: e5912014 ldr r2, [r1, #20] 1d9b8: e5943024 ldr r3, [r4, #36] 1d9bc: e1520003 cmp r2, r3 1d9c0: 0a000003 beq 1d9d4 * 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 ) { 1d9c4: e5911000 ldr r1, [r1] * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 1d9c8: e1510000 cmp r1, r0 1d9cc: 1afffff8 bne 1d9b4 1d9d0: ea000028 b 1da78 * 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 ); 1d9d4: eb0031af bl 2a098 <__errno> 1d9d8: e3a03010 mov r3, #16 ; 0x10 1d9dc: e5803000 str r3, [r0] 1d9e0: ea000021 b 1da6c * 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 ) 1d9e4: e5943010 ldr r3, [r4, #16] 1d9e8: e1a00004 mov r0, r4 1d9ec: e1a0e00f mov lr, pc 1d9f0: e593f028 ldr pc, [r3, #40] 1d9f4: e2505000 subs r5, r0, #0 ; 0x0 1d9f8: 1a00001b bne 1da6c * 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){ 1d9fc: e5943020 ldr r3, [r4, #32] 1da00: e1a00004 mov r0, r4 1da04: e1a0e00f mov lr, pc 1da08: e593f02c ldr pc, [r3, #44] 1da0c: e3500000 cmp r0, #0 ; 0x0 1da10: 0a000007 beq 1da34 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 1da14: e1a00004 mov r0, r4 <== NOT EXECUTED 1da18: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 1da1c: e1a0e00f mov lr, pc <== NOT EXECUTED 1da20: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 1da24: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1da28: 0a00000f beq 1da6c <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 1da2c: e1a00005 mov r0, r5 <== NOT EXECUTED 1da30: ebffa906 bl 7e50 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1da34: e1a00004 mov r0, r4 1da38: eb00057b bl 1f02c <_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 ); 1da3c: e5943010 ldr r3, [r4, #16] 1da40: e3530000 cmp r3, #0 ; 0x0 1da44: 0a000004 beq 1da5c 1da48: e593301c ldr r3, [r3, #28] 1da4c: e3530000 cmp r3, #0 ; 0x0 1da50: 12840008 addne r0, r4, #8 ; 0x8 1da54: 11a0e00f movne lr, pc 1da58: 112fff13 bxne r3 free( mt_entry ); 1da5c: e1a00004 mov r0, r4 1da60: ebff98c9 bl 3d8c 1da64: e3a00000 mov r0, #0 ; 0x0 1da68: ea000000 b 1da70 return 0; 1da6c: e3e00000 mvn r0, #0 ; 0x0 } 1da70: e28dd010 add sp, sp, #16 ; 0x10 1da74: e8bd8030 pop {r4, r5, pc} * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 1da78: e1a00004 mov r0, r4 1da7c: ebff9970 bl 4044 1da80: e3500001 cmp r0, #1 ; 0x1 1da84: 1affffd6 bne 1d9e4 1da88: eaffffd1 b 1d9d4 1da8c: 0003c648 .word 0x0003c648 1da90: 00056548 .word 0x00056548 0001da94 : int utime( const char *path, const struct utimbuf *times ) { 1da94: e92d4030 push {r4, r5, lr} 1da98: e24dd010 sub sp, sp, #16 ; 0x10 1da9c: e1a04001 mov r4, r1 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) ) 1daa0: e1a0200d mov r2, sp 1daa4: e3a01000 mov r1, #0 ; 0x0 1daa8: e3a03001 mov r3, #1 ; 0x1 1daac: ebff9865 bl 3c48 1dab0: e3500000 cmp r0, #0 ; 0x0 1dab4: e1a0500d mov r5, sp 1dab8: 1a00000b bne 1daec return -1; if ( !temp_loc.ops->utime_h ){ 1dabc: e59d3008 ldr r3, [sp, #8] 1dac0: e593c030 ldr ip, [r3, #48] 1dac4: e35c0000 cmp ip, #0 ; 0x0 1dac8: 1a000009 bne 1daf4 rtems_filesystem_freenode( &temp_loc ); 1dacc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1dad0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 1dad4: 11a0000d movne r0, sp <== NOT EXECUTED 1dad8: 11a0e00f movne lr, pc <== NOT EXECUTED 1dadc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1dae0: eb00316c bl 2a098 <__errno> <== NOT EXECUTED 1dae4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1dae8: e5803000 str r3, [r0] <== NOT EXECUTED 1daec: e3e04000 mvn r4, #0 ; 0x0 1daf0: ea00000c b 1db28 } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 1daf4: e8940006 ldm r4, {r1, r2} 1daf8: e1a0000d mov r0, sp 1dafc: e1a0e00f mov lr, pc 1db00: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 1db04: e59d3008 ldr r3, [sp, #8] 1db08: 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 ); 1db0c: e1a04000 mov r4, r0 rtems_filesystem_freenode( &temp_loc ); 1db10: 0a000004 beq 1db28 1db14: e593301c ldr r3, [r3, #28] 1db18: e3530000 cmp r3, #0 ; 0x0 1db1c: 11a0000d movne r0, sp 1db20: 11a0e00f movne lr, pc 1db24: 112fff13 bxne r3 return result; } 1db28: e1a00004 mov r0, r4 1db2c: e28dd010 add sp, sp, #16 ; 0x10 1db30: e8bd8030 pop {r4, r5, pc} 00001c10 : */ void vprintk( const char *fmt, va_list ap ) { 1c10: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1c14: e1a08000 mov r8, r0 1c18: e24dd018 sub sp, sp, #24 ; 0x18 1c1c: e1a09001 mov r9, r1 if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 1c20: e59fb2bc ldr fp, [pc, #700] ; 1ee4 1c24: ea0000a9 b 1ed0 base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 1c28: e3500025 cmp r0, #37 ; 0x25 1c2c: 1a0000a4 bne 1ec4 fmt++; if (*fmt == '0' ) { 1c30: e5f83001 ldrb r3, [r8, #1]! 1c34: e3530030 cmp r3, #48 ; 0x30 1c38: 13a02020 movne r2, #32 ; 0x20 1c3c: 158d2000 strne r2, [sp] lead = '0'; fmt++; 1c40: 058d3000 streq r3, [sp] 1c44: 02888001 addeq r8, r8, #1 ; 0x1 } if (*fmt == '-' ) { 1c48: e5d83000 ldrb r3, [r8] 1c4c: e353002d cmp r3, #45 ; 0x2d 1c50: 13a06000 movne r6, #0 ; 0x0 minus = 1; fmt++; 1c54: 02888001 addeq r8, r8, #1 ; 0x1 1c58: 03a06001 moveq r6, #1 ; 0x1 1c5c: e3a0a000 mov sl, #0 ; 0x0 1c60: ea000002 b 1c70 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); 1c64: e3a0300a mov r3, #10 ; 0xa 1c68: e02a2a93 mla sl, r3, sl, r2 fmt++; 1c6c: e2888001 add r8, r8, #1 ; 0x1 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 1c70: e5d80000 ldrb r0, [r8] 1c74: e2402030 sub r2, r0, #48 ; 0x30 1c78: e20230ff and r3, r2, #255 ; 0xff 1c7c: e3530009 cmp r3, #9 ; 0x9 1c80: 9afffff7 bls 1c64 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 1c84: e350006c cmp r0, #108 ; 0x6c lflag = 1; c = *++fmt; 1c88: 05f80001 ldrbeq r0, [r8, #1]! } switch (c) { 1c8c: e3500064 cmp r0, #100 ; 0x64 1c90: 0a00001e beq 1d10 1c94: 8a00000e bhi 1cd4 1c98: e350004f cmp r0, #79 ; 0x4f 1c9c: 0a00004f beq 1de0 1ca0: 8a000004 bhi 1cb8 1ca4: e3500044 cmp r0, #68 ; 0x44 1ca8: 0a000018 beq 1d10 1cac: e3500049 cmp r0, #73 ; 0x49 1cb0: 1a000083 bne 1ec4 1cb4: ea000015 b 1d10 <== NOT EXECUTED 1cb8: e3500058 cmp r0, #88 ; 0x58 <== NOT EXECUTED 1cbc: 0a00004a beq 1dec <== NOT EXECUTED 1cc0: e3500063 cmp r0, #99 ; 0x63 <== NOT EXECUTED 1cc4: 0a00003f beq 1dc8 <== NOT EXECUTED 1cc8: e3500055 cmp r0, #85 ; 0x55 <== NOT EXECUTED 1ccc: 1a00007c bne 1ec4 <== NOT EXECUTED 1cd0: ea000010 b 1d18 <== NOT EXECUTED 1cd4: e3500070 cmp r0, #112 ; 0x70 1cd8: 0a000043 beq 1dec 1cdc: 8a000004 bhi 1cf4 1ce0: e3500069 cmp r0, #105 ; 0x69 <== NOT EXECUTED 1ce4: 0a000009 beq 1d10 <== NOT EXECUTED 1ce8: e350006f cmp r0, #111 ; 0x6f <== NOT EXECUTED 1cec: 1a000074 bne 1ec4 <== NOT EXECUTED 1cf0: ea00003a b 1de0 <== NOT EXECUTED 1cf4: e3500075 cmp r0, #117 ; 0x75 1cf8: 0a000006 beq 1d18 1cfc: e3500078 cmp r0, #120 ; 0x78 1d00: 0a000039 beq 1dec 1d04: e3500073 cmp r0, #115 ; 0x73 1d08: 1a00006d bne 1ec4 1d0c: ea000004 b 1d24 1d10: e3a03001 mov r3, #1 ; 0x1 1d14: ea000000 b 1d1c 1d18: e3a03000 mov r3, #0 ; 0x0 1d1c: e3a0700a mov r7, #10 ; 0xa 1d20: ea000033 b 1df4 case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 1d24: e5997000 ldr r7, [r9] 1d28: e3a05000 mov r5, #0 ; 0x0 1d2c: e2899004 add r9, r9, #4 ; 0x4 1d30: ea000000 b 1d38 /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 1d34: e2855001 add r5, r5, #1 ; 0x1 1d38: e7d73005 ldrb r3, [r7, r5] 1d3c: e3530000 cmp r3, #0 ; 0x0 1d40: 1afffffb bne 1d34 ; /* leading spaces */ if ( !minus ) 1d44: e3560000 cmp r6, #0 ; 0x0 1d48: 01a04005 moveq r4, r5 1d4c: 0a000002 beq 1d5c 1d50: ea000005 b 1d6c for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { 1d6c: e35a0000 cmp sl, #0 ; 0x0 1d70: 01a0a005 moveq sl, r5 width = len; } /* output the string */ for ( i=0 ; i 1d80: ea000001 b 1d8c BSP_output_char(*str); 1d84: e1a0e00f mov lr, pc 1d88: e59bf000 ldr pc, [fp] if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 1d9c: e3560000 cmp r6, #0 ; 0x0 1da0: 11a04005 movne r4, r5 1da4: 1a000002 bne 1db4 1da8: ea000047 b 1ecc for ( i=len ; i 1dc4: ea000040 b 1ecc BSP_output_char(' '); } break; case 'c': BSP_output_char(va_arg(ap, int)); 1dc8: e5d90000 ldrb r0, [r9] <== NOT EXECUTED 1dcc: e2894004 add r4, r9, #4 ; 0x4 <== NOT EXECUTED 1dd0: e1a0e00f mov lr, pc <== NOT EXECUTED 1dd4: e59bf000 ldr pc, [fp] <== NOT EXECUTED 1dd8: e1a09004 mov r9, r4 <== NOT EXECUTED 1ddc: ea00003a b 1ecc <== NOT EXECUTED break; default: BSP_output_char(c); 1de0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1de4: e3a07008 mov r7, #8 ; 0x8 <== NOT EXECUTED 1de8: ea000001 b 1df4 <== NOT EXECUTED 1dec: e3a03000 mov r3, #0 ; 0x0 1df0: e3a07010 mov r7, #16 ; 0x10 break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 1df4: e5994000 ldr r4, [r9] 1df8: e2892004 add r2, r9, #4 ; 0x4 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 1dfc: e0133fa4 ands r3, r3, r4, lsr #31 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 1e00: e1a09002 mov r9, r2 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 1e04: 0a000005 beq 1e20 BSP_output_char('-'); 1e08: e3a0002d mov r0, #45 ; 0x2d <== NOT EXECUTED 1e0c: e1a0e00f mov lr, pc <== NOT EXECUTED 1e10: e59bf000 ldr pc, [fp] <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 1e14: e35a0000 cmp sl, #0 ; 0x0 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 1e18: e2644000 rsb r4, r4, #0 ; 0x0 <== NOT EXECUTED if (maxwidth) maxwidth--; 1e1c: 124aa001 subne sl, sl, #1 ; 0x1 <== NOT EXECUTED 1e20: e3a05000 mov r5, #0 ; 0x0 1e24: ea000005 b 1e40 } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 1e28: e0030097 mul r3, r7, r0 1e2c: e28d2004 add r2, sp, #4 ; 0x4 1e30: e0633004 rsb r3, r3, r4 1e34: e7c23005 strb r3, [r2, r5] 1e38: e1a04000 mov r4, r0 1e3c: e1a05006 mov r5, r6 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 1e40: e1a00004 mov r0, r4 1e44: e1a01007 mov r1, r7 1e48: eb00407d bl 12044 <__aeabi_uidiv> 1e4c: e3500000 cmp r0, #0 ; 0x0 1e50: e2856001 add r6, r5, #1 ; 0x1 1e54: 1afffff3 bne 1e28 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 1e58: e28d2018 add r2, sp, #24 ; 0x18 1e5c: e0823005 add r3, r2, r5 1e60: e5434014 strb r4, [r3, #-20] for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 1e64: e59d3000 ldr r3, [sp] toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 1e68: e1a0400a mov r4, sl BSP_output_char(lead); 1e6c: e20350ff and r5, r3, #255 ; 0xff 1e70: ea000001 b 1e7c 1e74: e1a0e00f mov lr, pc 1e78: e59bf000 ldr pc, [fp] toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 1e7c: e1540006 cmp r4, r6 BSP_output_char(lead); 1e80: e1a00005 mov r0, r5 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 1e84: e2444001 sub r4, r4, #1 ; 0x1 1e88: 8afffff9 bhi 1e74 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 1e8c: e28d2018 add r2, sp, #24 ; 0x18 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 1e90: e3a04000 mov r4, #0 ; 0x0 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 1e94: e0825006 add r5, r2, r6 1e98: ea000004 b 1eb0 1e9c: e5533015 ldrb r3, [r3, #-21] 1ea0: e59f2040 ldr r2, [pc, #64] ; 1ee8 1ea4: e7d20003 ldrb r0, [r2, r3] 1ea8: e1a0e00f mov lr, pc 1eac: e59bf000 ldr pc, [fp] toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 1eb0: e1540006 cmp r4, r6 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 1eb4: e0643005 rsb r3, r4, r5 toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 1eb8: e2844001 add r4, r4, #1 ; 0x1 1ebc: 3afffff6 bcc 1e9c 1ec0: ea000001 b 1ecc if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 1ec4: e1a0e00f mov lr, pc 1ec8: e59bf000 ldr pc, [fp] ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 1ecc: e2888001 add r8, r8, #1 ; 0x1 1ed0: e5d80000 ldrb r0, [r8] 1ed4: e3500000 cmp r0, #0 ; 0x0 1ed8: 1affff52 bne 1c28 base, sign, width, lead); } else { BSP_output_char(*fmt); } } } 1edc: e28dd018 add sp, sp, #24 ; 0x18 1ee0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 1ee4: 00014598 .word 0x00014598 1ee8: 000159c2 .word 0x000159c2 00013c88 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 13c88: e59f30ac ldr r3, [pc, #172] ; 13d3c 13c8c: e5933000 ldr r3, [r3] 13c90: e1500003 cmp r0, r3 ssize_t write( int fd, const void *buffer, size_t count ) { 13c94: e92d4070 push {r4, r5, r6, lr} 13c98: e1a0c000 mov ip, r0 13c9c: e1a06001 mov r6, r1 13ca0: e1a05002 mov r5, r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 13ca4: 2a000006 bcs 13cc4 iop = rtems_libio_iop( fd ); 13ca8: e59f3090 ldr r3, [pc, #144] ; 13d40 13cac: e5930000 ldr r0, [r3] 13cb0: e3a03034 mov r3, #52 ; 0x34 13cb4: e0240c93 mla r4, r3, ip, r0 rtems_libio_check_is_open( iop ); 13cb8: e594300c ldr r3, [r4, #12] 13cbc: e3130c01 tst r3, #256 ; 0x100 13cc0: 1a000002 bne 13cd0 13cc4: ebffddb3 bl b398 <__errno> <== NOT EXECUTED 13cc8: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED 13ccc: ea00000f b 13d10 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 13cd0: e3510000 cmp r1, #0 ; 0x0 13cd4: 0a000004 beq 13cec rtems_libio_check_count( count ); 13cd8: e3520000 cmp r2, #0 ; 0x0 13cdc: 01a00002 moveq r0, r2 13ce0: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 13ce4: e3130004 tst r3, #4 ; 0x4 13ce8: 1a000002 bne 13cf8 13cec: ebffdda9 bl b398 <__errno> <== NOT EXECUTED 13cf0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED 13cf4: ea000005 b 13d10 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 13cf8: e5943030 ldr r3, [r4, #48] 13cfc: e593300c ldr r3, [r3, #12] 13d00: e3530000 cmp r3, #0 ; 0x0 13d04: 1a000004 bne 13d1c rtems_set_errno_and_return_minus_one( ENOTSUP ); 13d08: ebffdda2 bl b398 <__errno> <== NOT EXECUTED 13d0c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 13d10: e5803000 str r3, [r0] <== NOT EXECUTED 13d14: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED 13d18: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 13d1c: e1a00004 mov r0, r4 13d20: e1a0e00f mov lr, pc 13d24: e12fff13 bx r3 if ( rc > 0 ) 13d28: e3500000 cmp r0, #0 ; 0x0 iop->offset += rc; 13d2c: c5943008 ldrgt r3, [r4, #8] 13d30: c0833000 addgt r3, r3, r0 13d34: c5843008 strgt r3, [r4, #8] return rc; } 13d38: e8bd8070 pop {r4, r5, r6, pc} 13d3c: 000143e4 .word 0x000143e4 13d40: 00016090 .word 0x00016090