=============================================================================== 0004b020 : int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { 4b020: 4e56 ffe8 linkw %fp,#-24 4b024: 206e 0008 moveal %fp@(8),%a0 4b028: 48d7 041c moveml %d2-%d4/%a2,%sp@ IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) loc->node_access; 4b02c: 2468 0008 moveal %a0@(8),%a2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4b030: 4282 clrl %d2 int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { 4b032: 382e 000e movew %fp@(14),%d4 4b036: 362e 0012 movew %fp@(18),%d3 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4b03a: 4eb9 0004 bad8 jsr 4bad8 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4b040: 4281 clrl %d1 4b042: 342a 003a movew %a2@(58),%d2 4b046: 3200 movew %d0,%d1 4b048: b282 cmpl %d2,%d1 4b04a: 6704 beqs 4b050 4b04c: 4a40 tstw %d0 4b04e: 6628 bnes 4b078 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 4b050: 3544 003a movew %d4,%a2@(58) jnode->st_gid = group; 4b054: 3543 003c movew %d3,%a2@(60) IMFS_update_ctime( jnode ); 4b058: 42a7 clrl %sp@- 4b05a: 486e fff8 pea %fp@(-8) 4b05e: 4eb9 0004 315c jsr 4315c 4b064: 256e fff8 0046 movel %fp@(-8),%a2@(70) return 0; 4b06a: 508f addql #8,%sp 4b06c: 4280 clrl %d0 } 4b06e: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b074: 4e5e unlk %fp 4b076: 4e75 rts #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4b078: 4eb9 0004 f024 jsr 4f024 <__errno> 4b07e: 7201 moveq #1,%d1 4b080: 2040 moveal %d0,%a0 4b082: 70ff moveq #-1,%d0 jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; } 4b084: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4b08a: 2081 movel %d1,%a0@ jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; } 4b08c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000450e0 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 450e0: 4e56 ffd8 linkw %fp,#-40 450e4: 206e 0008 moveal %fp@(8),%a0 450e8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 450ec: 2608 movel %a0,%d3 450ee: 49f9 0005 3386 lea 53386 ,%a4 450f4: 0683 0000 0052 addil #82,%d3 450fa: 242e 000c movel %fp@(12),%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 450fe: 2668 004e moveal %a0@(78),%a3 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 45102: b68b cmpl %a3,%d3 45104: 6700 008e beqw 45194 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); 45108: 2c02 movel %d2,%d6 4510a: 45f9 0005 3ed6 lea 53ed6 ,%a2 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 45110: 283c 0005 3232 movel #340530,%d4 return; } puts(""); 45116: 4bf9 0005 4c40 lea 54c40 ,%a5 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); 4511c: 5286 addql #1,%d6 4511e: 2a3c 0004 50e0 movel #282848,%d5 !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++ ) 45124: 4287 clrl %d7 45126: 4a82 tstl %d2 45128: 6d24 blts 4514e <== NEVER TAKEN fprintf(stdout, "...." ); 4512a: 2079 0006 558c moveal 6558c <_impure_ptr>,%a0 !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++ ) 45130: 5287 addql #1,%d7 fprintf(stdout, "...." ); 45132: 2f28 0008 movel %a0@(8),%sp@- 45136: 4878 0004 pea 4 4513a: 4878 0001 pea 1 4513e: 4879 0006 3aa9 pea 63aa9 45144: 4e92 jsr %a2@ !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++ ) 45146: 4fef 0010 lea %sp@(16),%sp 4514a: be82 cmpl %d2,%d7 4514c: 6fdc bles 4512a IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4514e: 2079 0006 558c moveal 6558c <_impure_ptr>,%a0 45154: 2f28 0008 movel %a0@(8),%sp@- 45158: 486b 000c pea %a3@(12) 4515c: 4e94 jsr %a4@ rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 4515e: 206b 004a moveal %a3@(74),%a0 switch( IMFS_type( the_jnode ) ) { 45162: 508f addql #8,%sp 45164: 7206 moveq #6,%d1 45166: 2010 movel %a0@,%d0 45168: b280 cmpl %d0,%d1 4516a: 6446 bccs 451b2 <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 4516c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4516e: 4879 0006 3b03 pea 63b03 <== NOT EXECUTED 45174: 2079 0006 558c moveal 6558c <_impure_ptr>,%a0 <== NOT EXECUTED 4517a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4517e: 2044 moveal %d4,%a0 <== NOT EXECUTED 45180: 4e90 jsr %a0@ <== NOT EXECUTED } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 45182: 206b 004a moveal %a3@(74),%a0 <== NOT EXECUTED 45186: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) 4518a: 4a90 tstl %a0@ <== NOT EXECUTED 4518c: 6710 beqs 4519e <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 4518e: 2653 moveal %a3@,%a3 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 45190: b68b cmpl %a3,%d3 45192: 6690 bnes 45124 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); } } 45194: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4519a: 4e5e unlk %fp 4519c: 4e75 rts for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); 4519e: 2f06 movel %d6,%sp@- 451a0: 2045 moveal %d5,%a0 451a2: 2f0b movel %a3,%sp@- 451a4: 4e90 jsr %a0@ the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 451a6: 2653 moveal %a3@,%a3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); 451a8: 508f addql #8,%sp IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 451aa: b68b cmpl %a3,%d3 451ac: 6600 ff76 bnew 45124 451b0: 60e2 bras 45194 ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { 451b2: 303b 0a08 movew %pc@(451bc ,%d0:l:2),%d0 451b6: 48c0 extl %d0 451b8: 4efb 0802 jmp %pc@(451bc ,%d0:l) 451bc: 0090 006e 000e oril #7208974,%d0 <== NOT EXECUTED 451c2: 000e .short 0x000e <== NOT EXECUTED 451c4: 00de .short 0x00de <== NOT EXECUTED 451c6: 0036 .short 0x0036 <== NOT EXECUTED 451c8: 00b2 2079 0006 oril #544800774,%d2 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 451ce: 558c subql #2,%a4 451d0: 2f28 0008 movel %a0@(8),%sp@- 451d4: 4878 0013 pea 13 451d8: 4878 0001 pea 1 451dc: 4879 0006 3adc pea 63adc 451e2: 4e92 jsr %a2@ 451e4: 206b 004a moveal %a3@(74),%a0 451e8: 4fef 0010 lea %sp@(16),%sp the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) 451ec: 4a90 tstl %a0@ 451ee: 669e bnes 4518e <== ALWAYS TAKEN 451f0: 60ac bras 4519e <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 451f2: 2f2b 0056 movel %a3@(86),%sp@- 451f6: 2f2b 0052 movel %a3@(82),%sp@- 451fa: 2079 0006 558c moveal 6558c <_impure_ptr>,%a0 45200: 4879 0006 3ac1 pea 63ac1 45206: 2f28 0008 movel %a0@(8),%sp@- 4520a: 2044 moveal %d4,%a0 4520c: 4e90 jsr %a0@ 4520e: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); 45212: 4879 0006 42ea pea 642ea 45218: 4e95 jsr %a5@ 4521a: 588f addql #4,%sp 4521c: 206b 004a moveal %a3@(74),%a0 the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) 45220: 4a90 tstl %a0@ 45222: 6600 ff6a bnew 4518e 45226: 6000 ff76 braw 4519e case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4522a: 2f2b 0052 movel %a3@(82),%sp@- 4522e: 2f2b 004e movel %a3@(78),%sp@- the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 45232: 2079 0006 558c moveal 6558c <_impure_ptr>,%a0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 45238: 4879 0006 3aae pea 63aae the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4523e: 2f28 0008 movel %a0@(8),%sp@- 45242: 2044 moveal %d4,%a0 45244: 4e90 jsr %a0@ 45246: 4fef 0010 lea %sp@(16),%sp 4524a: 60c6 bras 45212 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 4524c: 2079 0006 558c moveal 6558c <_impure_ptr>,%a0 45252: 2f28 0008 movel %a0@(8),%sp@- 45256: 4878 002f pea 2f 4525a: 4eb9 0005 32b0 jsr 532b0 45260: 508f addql #8,%sp default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); 45262: 4879 0006 42ea pea 642ea 45268: 4e95 jsr %a5@ 4526a: 588f addql #4,%sp 4526c: 60ae bras 4521c case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 4526e: 2079 0006 558c moveal 6558c <_impure_ptr>,%a0 45274: 2f28 0008 movel %a0@(8),%sp@- 45278: 4878 0012 pea 12 4527c: 4878 0001 pea 1 45280: 4879 0006 3af0 pea 63af0 45286: 4e92 jsr %a2@ 45288: 206b 004a moveal %a3@(74),%a0 4528c: 4fef 0010 lea %sp@(16),%sp the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) 45290: 4a90 tstl %a0@ 45292: 6600 fefa bnew 4518e 45296: 6000 ff06 braw 4519e <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 4529a: 2f2b 0052 movel %a3@(82),%sp@- 4529e: 2079 0006 558c moveal 6558c <_impure_ptr>,%a0 452a4: 4879 0006 3ad0 pea 63ad0 452aa: 2f28 0008 movel %a0@(8),%sp@- 452ae: 2044 moveal %d4,%a0 452b0: 4e90 jsr %a0@ 452b2: 4fef 000c lea %sp@(12),%sp default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); 452b6: 4879 0006 42ea pea 642ea 452bc: 4e95 jsr %a5@ 452be: 588f addql #4,%sp 452c0: 6000 ff5a braw 4521c =============================================================================== 0004b1f2 : rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( 4b1f2: 4280 clrl %d0 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 4b1f4: 4e56 ffe0 linkw %fp,#-32 4b1f8: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4b1fc: 286e 0008 moveal %fp@(8),%a4 rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( 4b200: 263c 0004 bf88 movel #311176,%d3 4b206: 2043 moveal %d3,%a0 { rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; 4b208: 266c 0020 moveal %a4@(32),%a3 bool access_ok = rtems_filesystem_eval_path_check_access( 4b20c: 302b 003c movew %a3@(60),%d0 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 4b210: 282e 0010 movel %fp@(16),%d4 rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( 4b214: 2f00 movel %d0,%sp@- rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 4b216: 242e 0014 movel %fp@(20),%d2 rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( 4b21a: 302b 003a movew %a3@(58),%d0 4b21e: 2f00 movel %d0,%sp@- 4b220: 2f2b 002e movel %a3@(46),%sp@- 4b224: 4878 0001 pea 1 4b228: 2f0c movel %a4,%sp@- 4b22a: 4e90 jsr %a0@ dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 4b22c: 4fef 0014 lea %sp@(20),%sp 4b230: 4a00 tstb %d0 4b232: 660c bnes 4b240 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b234: 7001 moveq #1,%d0 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 4b236: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4b23c: 4e5e unlk %fp 4b23e: 4e75 rts static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 4b240: 7001 moveq #1,%d0 4b242: b082 cmpl %d2,%d0 4b244: 6700 012c beqw 4b372 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 4b248: 7002 moveq #2,%d0 4b24a: b082 cmpl %d2,%d0 4b24c: 6700 00bc beqw 4b30a if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); 4b250: 2a0b movel %a3,%d5 4b252: 0685 0000 0052 addil #82,%d5 4b258: 4bf9 0005 0384 lea 50384 ,%a5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4b25e: 246b 004e moveal %a3@(78),%a2 while ( current != tail ) { 4b262: ba8a cmpl %a2,%d5 4b264: 6700 0098 beqw 4b2fe IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 4b268: 2f02 movel %d2,%sp@- 4b26a: 2f04 movel %d4,%sp@- 4b26c: 486a 000c pea %a2@(12) 4b270: 4e95 jsr %a5@ 4b272: 4fef 000c lea %sp@(12),%sp && entry->name [tokenlen] == '\0'; 4b276: 4a80 tstl %d0 4b278: 667c bnes 4b2f6 4b27a: 4a32 280c tstb %a2@(0000000c,%d2:l) 4b27e: 6676 bnes 4b2f6 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 4b280: 206a 004a moveal %a2@(74),%a0 bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { 4b284: 7802 moveq #2,%d4 if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 4b286: 4aac 0004 tstl %a4@(4) 4b28a: 57c0 seq %d0 4b28c: 2210 movel %a0@,%d1 4b28e: 4480 negl %d0 }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } 4b290: 242c 0010 movel %a4@(16),%d2 static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 4b294: 42ac 000c clrl %a4@(12) bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { 4b298: b881 cmpl %d1,%d4 4b29a: 6700 00ea beqw 4b386 entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 4b29e: 7803 moveq #3,%d4 4b2a0: b881 cmpl %d1,%d4 4b2a2: 6700 008e beqw 4b332 IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 4b2a6: 4a81 tstl %d1 4b2a8: 6600 0096 bnew 4b340 if ( node->info.directory.mt_fs != NULL ) { 4b2ac: 2a6a 005a moveal %a2@(90),%a5 4b2b0: 4a8d tstl %a5 4b2b2: 6700 008c beqw 4b340 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 4b2b6: 4280 clrl %d0 4b2b8: 2043 moveal %d3,%a0 4b2ba: 302a 003c movew %a2@(60),%d0 4b2be: 2f00 movel %d0,%sp@- 4b2c0: 302a 003a movew %a2@(58),%d0 4b2c4: 2f00 movel %d0,%sp@- 4b2c6: 2f2a 002e movel %a2@(46),%sp@- 4b2ca: 4878 0001 pea 1 4b2ce: 2f0c movel %a4,%sp@- 4b2d0: 4e90 jsr %a0@ RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 4b2d2: 4fef 0014 lea %sp@(20),%sp 4b2d6: 4a00 tstb %d0 4b2d8: 6700 ff5a beqw 4b234 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 4b2dc: 486d 0024 pea %a5@(36) 4b2e0: 2f0c movel %a4,%sp@- 4b2e2: 4eb9 0004 4540 jsr 44540 4b2e8: 508f addql #8,%sp void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b2ea: 7001 moveq #1,%d0 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 4b2ec: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4b2f2: 4e5e unlk %fp 4b2f4: 4e75 rts }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } 4b2f6: 2452 moveal %a2@,%a2 } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); while ( current != tail ) { 4b2f8: b5c5 cmpal %d5,%a2 4b2fa: 6600 ff6c bnew 4b268 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 4b2fe: 7002 moveq #2,%d0 } } return status; } 4b300: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4b306: 4e5e unlk %fp 4b308: 4e75 rts static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 4b30a: 2044 moveal %d4,%a0 4b30c: 722e moveq #46,%d1 4b30e: 1010 moveb %a0@,%d0 4b310: 49c0 extbl %d0 4b312: b280 cmpl %d0,%d1 4b314: 6600 ff3a bnew 4b250 4b318: 1028 0001 moveb %a0@(1),%d0 4b31c: 49c0 extbl %d0 4b31e: b280 cmpl %d0,%d1 4b320: 6600 ff2e bnew 4b250 { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; 4b324: 246b 0008 moveal %a3@(8),%a2 ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { 4b328: 4a8a tstl %a2 4b32a: 6600 ff54 bnew 4b280 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 4b32e: 7002 moveq #2,%d0 4b330: 60ce bras 4b300 if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 4b332: 0802 0004 btst #4,%d2 4b336: 6600 008a bnew 4b3c2 4b33a: 4a00 tstb %d0 4b33c: 6700 0084 beqw 4b3c2 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 4b340: 206a 004a moveal %a2@(74),%a0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 4b344: 322b 0032 movew %a3@(50),%d1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b348: 0280 0000 00ff andil #255,%d0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 4b34e: 5381 subql #1,%d1 4b350: 3741 0032 movew %d1,%a3@(50) ++entry->reference_count; 4b354: 322a 0032 movew %a2@(50),%d1 4b358: 5281 addql #1,%d1 4b35a: 3541 0032 movew %d1,%a2@(50) currentloc->node_access = entry; 4b35e: 294a 0020 movel %a2,%a4@(32) 4b362: 2968 0004 0028 movel %a0@(4),%a4@(40) status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 4b368: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4b36e: 4e5e unlk %fp 4b370: 4e75 rts static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 4b372: 2044 moveal %d4,%a0 4b374: 722e moveq #46,%d1 4b376: 1010 moveb %a0@,%d0 4b378: 49c0 extbl %d0 4b37a: b280 cmpl %d0,%d1 4b37c: 6600 fed2 bnew 4b250 4b380: 244b moveal %a3,%a2 4b382: 6000 fefc braw 4b280 bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { 4b386: 44c2 movew %d2,%ccr 4b388: 6a2e bpls 4b3b8 entry = entry->info.hard_link.link_node; 4b38a: 246a 004e moveal %a2@(78),%a2 4b38e: 206a 004a moveal %a2@(74),%a0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 4b392: 322b 0032 movew %a3@(50),%d1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b396: 0280 0000 00ff andil #255,%d0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 4b39c: 5381 subql #1,%d1 4b39e: 3741 0032 movew %d1,%a3@(50) ++entry->reference_count; 4b3a2: 322a 0032 movew %a2@(50),%d1 4b3a6: 5281 addql #1,%d1 4b3a8: 3541 0032 movew %d1,%a2@(50) 4b3ac: 2968 0004 0028 movel %a0@(4),%a4@(40) currentloc->node_access = entry; 4b3b2: 294a 0020 movel %a2,%a4@(32) 4b3b6: 60b0 bras 4b368 bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { 4b3b8: 4a00 tstb %d0 4b3ba: 6684 bnes 4b340 <== ALWAYS TAKEN entry = entry->info.hard_link.link_node; 4b3bc: 246a 004e moveal %a2@(78),%a2 <== NOT EXECUTED 4b3c0: 60cc bras 4b38e <== NOT EXECUTED } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { const char *target = entry->info.sym_link.name; 4b3c2: 242a 004e movel %a2@(78),%d2 rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 4b3c6: 2f02 movel %d2,%sp@- 4b3c8: 4eb9 0005 0368 jsr 50368 4b3ce: 2e80 movel %d0,%sp@ 4b3d0: 2f02 movel %d2,%sp@- 4b3d2: 2f0c movel %a4,%sp@- 4b3d4: 4eb9 0004 45b4 jsr 445b4 if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 4b3da: 4fef 000c lea %sp@(12),%sp void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b3de: 7001 moveq #1,%d0 4b3e0: 6000 fe54 braw 4b236 =============================================================================== 0004b404 : int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { 4b404: 4e56 fff8 linkw %fp,#-8 4b408: 206e 0008 moveal %fp@(8),%a0 4b40c: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4b40e: 2468 0008 moveal %a0@(8),%a2 int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { 4b412: 2f02 movel %d2,%sp@- * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4b414: 4282 clrl %d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4b416: 4eb9 0004 bad8 jsr 4bad8 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4b41c: 4281 clrl %d1 4b41e: 342a 003a movew %a2@(58),%d2 4b422: 3200 movew %d0,%d1 4b424: b282 cmpl %d2,%d1 4b426: 6704 beqs 4b42c 4b428: 4a40 tstw %d0 4b42a: 663c bnes 4b468 <== ALWAYS TAKEN /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4b42c: 202a 002e movel %a2@(46),%d0 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4b430: 222e 000c movel %fp@(12),%d1 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4b434: 0280 ffff f000 andil #-4096,%d0 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4b43a: 0281 0000 0fff andil #4095,%d1 4b440: 8280 orl %d0,%d1 4b442: 2541 002e movel %d1,%a2@(46) IMFS_update_ctime( jnode ); 4b446: 42a7 clrl %sp@- 4b448: 486e fff8 pea %fp@(-8) 4b44c: 4eb9 0004 315c jsr 4315c 4b452: 256e fff8 0046 movel %fp@(-8),%a2@(70) return 0; 4b458: 508f addql #8,%sp 4b45a: 4280 clrl %d0 } 4b45c: 242e fff0 movel %fp@(-16),%d2 4b460: 246e fff4 moveal %fp@(-12),%a2 4b464: 4e5e unlk %fp 4b466: 4e75 rts */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4b468: 4eb9 0004 f024 jsr 4f024 <__errno> jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } 4b46e: 242e fff0 movel %fp@(-16),%d2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4b472: 2040 moveal %d0,%a0 4b474: 7201 moveq #1,%d1 4b476: 70ff moveq #-1,%d0 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } 4b478: 246e fff4 moveal %fp@(-12),%a2 4b47c: 4e5e unlk %fp */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4b47e: 2081 movel %d1,%a0@ jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } ... =============================================================================== 000434e2 : static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { 434e2: 4e56 0000 linkw %fp,#0 434e6: 206e 0008 moveal %fp@(8),%a0 434ea: 202e 000c movel %fp@(12),%d0 434ee: 226e 0010 moveal %fp@(16),%a1 434f2: 2f02 movel %d2,%sp@- int err; if (command == FIONBIO) { 434f4: 0c80 8004 667e cmpil #-2147195266,%d0 434fa: 6724 beqs 43520 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 434fc: 2f08 movel %a0,%sp@- 434fe: 2068 0018 moveal %a0@(24),%a0 43502: 2f09 movel %a1,%sp@- 43504: 2f00 movel %d0,%sp@- 43506: 2f28 004e movel %a0@(78),%sp@- 4350a: 4eb9 0004 e206 jsr 4e206 IMFS_FIFO_RETURN(err); 43510: 4fef 0010 lea %sp@(16),%sp 43514: 4a80 tstl %d0 43516: 6d44 blts 4355c } 43518: 242e fffc movel %fp@(-4),%d2 4351c: 4e5e unlk %fp 4351e: 4e75 rts ) { int err; if (command == FIONBIO) { if (buffer == NULL) 43520: 4a89 tstl %a1 43522: 6722 beqs 43546 err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 43524: 4280 clrl %d0 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) 43526: 4a91 tstl %a1@ 43528: 670e beqs 43538 iop->flags |= LIBIO_FLAGS_NO_DELAY; 4352a: 7201 moveq #1,%d1 } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 4352c: 242e fffc movel %fp@(-4),%d2 43530: 4e5e unlk %fp if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 43532: 83a8 000c orl %d1,%a0@(12) } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43536: 4e75 rts err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 43538: 72fe moveq #-2,%d1 } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 4353a: 242e fffc movel %fp@(-4),%d2 4353e: 4e5e unlk %fp err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 43540: c3a8 000c andl %d1,%a0@(12) } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43544: 4e75 rts } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43546: 4eb9 0005 1234 jsr 51234 <__errno> ) { int err; if (command == FIONBIO) { if (buffer == NULL) 4354c: 740e moveq #14,%d2 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4354e: 2040 moveal %d0,%a0 43550: 70ff moveq #-1,%d0 43552: 2082 movel %d2,%a0@ } 43554: 242e fffc movel %fp@(-4),%d2 43558: 4e5e unlk %fp 4355a: 4e75 rts 4355c: 2400 movel %d0,%d2 4355e: 4482 negl %d2 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43560: 4eb9 0005 1234 jsr 51234 <__errno> 43566: 2040 moveal %d0,%a0 43568: 70ff moveq #-1,%d0 4356a: 2082 movel %d2,%a0@ 4356c: 60e6 bras 43554 ... =============================================================================== 0004339c : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4339c: 4e56 fff8 linkw %fp,#-8 433a0: 206e 0008 moveal %fp@(8),%a0 433a4: 2f0a movel %a2,%sp@- 433a6: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 433a8: 2f08 movel %a0,%sp@- 433aa: 2f2e 0010 movel %fp@(16),%sp@- rtems_libio_t *iop, const void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; 433ae: 2468 0018 moveal %a0@(24),%a2 int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 433b2: 2f2e 000c movel %fp@(12),%sp@- 433b6: 2f2a 004e movel %a2@(78),%sp@- 433ba: 4eb9 0004 e010 jsr 4e010 if (err > 0) { 433c0: 4fef 0010 lea %sp@(16),%sp size_t count ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 433c4: 2400 movel %d0,%d2 if (err > 0) { 433c6: 6f28 bles 433f0 IMFS_mtime_ctime_update(jnode); 433c8: 42a7 clrl %sp@- 433ca: 486e fff8 pea %fp@(-8) 433ce: 4eb9 0004 4554 jsr 44554 433d4: 202e fff8 movel %fp@(-8),%d0 433d8: 508f addql #8,%sp 433da: 2540 0042 movel %d0,%a2@(66) 433de: 2540 0046 movel %d0,%a2@(70) } IMFS_FIFO_RETURN(err); } 433e2: 2002 movel %d2,%d0 433e4: 242e fff0 movel %fp@(-16),%d2 433e8: 246e fff4 moveal %fp@(-12),%a2 433ec: 4e5e unlk %fp 433ee: 4e75 rts int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 433f0: 4a80 tstl %d0 433f2: 67ee beqs 433e2 <== NEVER TAKEN 433f4: 4eb9 0005 1234 jsr 51234 <__errno> 433fa: 4482 negl %d2 433fc: 2040 moveal %d0,%a0 433fe: 2082 movel %d2,%a0@ 43400: 74ff moveq #-1,%d2 } 43402: 2002 movel %d2,%d0 43404: 242e fff0 movel %fp@(-16),%d2 43408: 246e fff4 moveal %fp@(-12),%a2 4340c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b484 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4b484: 4e56 ffd4 linkw %fp,#-44 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 4b488: 206e 0008 moveal %fp@(8),%a0 4b48c: 2268 0024 moveal %a0@(36),%a1 4b490: 2049 moveal %a1,%a0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4b492: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 4b496: 49ee ffe8 lea %fp@(-24),%a4 next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { result = IMFS_rmnod( NULL, &loc ); 4b49a: 243c 0004 2bb0 movel #273328,%d2 if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); 4b4a0: 4bf9 0004 2834 lea 42834 ,%a5 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 4b4a6: 2898 movel %a0@+,%a4@ 4b4a8: 2d58 ffec movel %a0@+,%fp@(-20) 4b4ac: 2d58 fff0 movel %a0@+,%fp@(-16) 4b4b0: 2d58 fff4 movel %a0@+,%fp@(-12) 4b4b4: 2d58 fff8 movel %a0@+,%fp@(-8) jnode = (IMFS_jnode_t *)loc.node_access; 4b4b8: 246e fff0 moveal %fp@(-16),%a2 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 4b4bc: 2d50 fffc movel %a0@,%fp@(-4) 4b4c0: 206a 004a moveal %a2@(74),%a0 4b4c4: 2010 movel %a0@,%d0 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 4b4c6: 42a9 0008 clrl %a1@(8) do { next = jnode->Parent; 4b4ca: 266a 0008 moveal %a2@(8),%a3 4b4ce: 2d68 0004 fff8 movel %a0@(4),%fp@(-8) loc.node_access = (void *)jnode; 4b4d4: 2d4a fff0 movel %a2,%fp@(-16) IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 4b4d8: 4a80 tstl %d0 4b4da: 662e bnes 4b50a <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4b4dc: 200a movel %a2,%d0 4b4de: 0680 0000 0052 addil #82,%d0 4b4e4: b0aa 004e cmpl %a2@(78),%d0 4b4e8: 6720 beqs 4b50a */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b4ea: 246a 004e moveal %a2@(78),%a2 if ( IMFS_is_directory( jnode ) ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4b4ee: 4a8a tstl %a2 4b4f0: 674e beqs 4b540 <== NEVER TAKEN 4b4f2: 206a 004a moveal %a2@(74),%a0 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; 4b4f6: 266a 0008 moveal %a2@(8),%a3 4b4fa: 2010 movel %a0@,%d0 4b4fc: 2d68 0004 fff8 movel %a0@(4),%fp@(-8) loc.node_access = (void *)jnode; 4b502: 2d4a fff0 movel %a2,%fp@(-16) IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 4b506: 4a80 tstl %d0 4b508: 67d2 beqs 4b4dc result = IMFS_rmnod( NULL, &loc ); 4b50a: 2f0c movel %a4,%sp@- 4b50c: 2042 moveal %d2,%a0 4b50e: 42a7 clrl %sp@- 4b510: 4e90 jsr %a0@ if ( result != 0 ) 4b512: 508f addql #8,%sp 4b514: 4a80 tstl %d0 4b516: 6632 bnes 4b54a <== NEVER TAKEN rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); 4b518: 2f0a movel %a2,%sp@- 4b51a: 4e95 jsr %a5@ jnode = next; } if ( jnode != NULL ) { 4b51c: 588f addql #4,%sp 4b51e: 4a8b tstl %a3 4b520: 671e beqs 4b540 4b522: 206b 004a moveal %a3@(74),%a0 if ( IMFS_is_directory( jnode ) ) { 4b526: 244b moveal %a3,%a2 4b528: 2010 movel %a0@,%d0 4b52a: 669e bnes 4b4ca <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4b52c: 220b movel %a3,%d1 4b52e: 0681 0000 0052 addil #82,%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b534: 246b 004e moveal %a3@(78),%a2 if ( jnode_has_children( jnode ) ) 4b538: b28a cmpl %a2,%d1 4b53a: 66b2 bnes 4b4ee 4b53c: 244b moveal %a3,%a2 4b53e: 608a bras 4b4ca jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); } 4b540: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 4b546: 4e5e unlk %fp 4b548: 4e75 rts IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { result = IMFS_rmnod( NULL, &loc ); if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); 4b54a: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 4b550: 4eb9 0004 7c50 jsr 47c50 <== NOT EXECUTED ... =============================================================================== 0004270c : int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { 4270c: 4e56 fff4 linkw %fp,#-12 42710: 48d7 1c00 moveml %a2-%a4,%sp@ static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 42714: 4878 0024 pea 24 42718: 4878 0001 pea 1 int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { 4271c: 266e 0008 moveal %fp@(8),%a3 static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 42720: 4eb9 0004 2e28 jsr 42e28 if ( fs_info != NULL ) { 42726: 508f addql #8,%sp ) { static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 42728: 2440 moveal %d0,%a2 if ( fs_info != NULL ) { 4272a: 4a80 tstl %d0 4272c: 6700 00c2 beqw 427f0 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 42730: 2039 0006 06d0 movel 606d0 ,%d0 42736: 2200 movel %d0,%d1 42738: 5281 addql #1,%d1 memcpy( 4273a: 206e 0010 moveal %fp@(16),%a0 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 4273e: 23c1 0006 06d0 movel %d1,606d0 memcpy( 42744: 2558 0008 movel %a0@+,%a2@(8) 42748: 2558 000c movel %a0@+,%a2@(12) 4274c: 2558 0010 movel %a0@+,%a2@(16) 42750: 2558 0014 movel %a0@+,%a2@(20) 42754: 2558 0018 movel %a0@+,%a2@(24) 42758: 2558 001c movel %a0@+,%a2@(28) 4275c: 2550 0020 movel %a0@,%a2@(32) fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 42760: 42a7 clrl %sp@- 42762: 4878 41ed pea 41ed 42766: 42a7 clrl %sp@- 42768: 4879 0005 e78e pea 5e78e 4276e: 2f2a 0008 movel %a2@(8),%sp@- IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 42772: 2480 movel %d0,%a2@ fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 42774: 2f0a movel %a2,%sp@- 42776: 4eb9 0004 b090 jsr 4b090 "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 4277c: 4fef 0018 lea %sp@(24),%sp 42780: 4a80 tstl %d0 42782: 6700 0084 beqw 42808 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 42786: 2840 moveal %d0,%a4 mt_entry->fs_info = fs_info; mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; 42788: 223c 0005 e9ca movel #387530,%d1 4278e: 226c 004a moveal %a4@(74),%a1 mt_entry->mt_fs_root->location.node_access = root_node; 42792: 206b 0024 moveal %a3@(36),%a0 (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; mt_entry->ops = op_table; 42796: 276e 000c 000c movel %fp@(12),%a3@(12) mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; 4279c: 2741 002a movel %d1,%a3@(42) errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 427a0: 2239 0005 f7ac movel 5f7ac ,%d1 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; 427a6: 274a 0008 movel %a2,%a3@(8) 427aa: 2169 0004 0010 movel %a1@(4),%a0@(16) mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; 427b0: 2140 0008 movel %d0,%a0@(8) /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 427b4: 7010 moveq #16,%d0 427b6: b081 cmpl %d1,%d0 427b8: 6724 beqs 427de is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 427ba: 103c 000f moveb #15,%d0 427be: b081 cmpl %d1,%d0 427c0: 6c16 bges 427d8 427c2: 307c 0005 moveaw #5,%a0 427c6: 103c 0020 moveb #32,%d0 427ca: 5388 subql #1,%a0 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 427cc: b081 cmpl %d1,%d0 427ce: 670e beqs 427de is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 427d0: 6e06 bgts 427d8 <== NEVER TAKEN int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 427d2: d080 addl %d0,%d0 427d4: 4a88 tstl %a0 427d6: 66f2 bnes 427ca <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 427d8: 223c 0000 0080 movel #128,%d1 const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { static int imfs_instance; int rv = 0; 427de: 4280 clrl %d0 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 427e0: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 427e6: 23c1 0006 06cc movel %d1,606cc IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 427ec: 4e5e unlk %fp 427ee: 4e75 rts } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 427f0: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED 427f6: 2840 moveal %d0,%a4 <== NOT EXECUTED 427f8: 700c moveq #12,%d0 <== NOT EXECUTED 427fa: 2880 movel %d0,%a4@ <== NOT EXECUTED if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 427fc: 70ff moveq #-1,%d0 <== NOT EXECUTED IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 427fe: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 <== NOT EXECUTED 42804: 4e5e unlk %fp <== NOT EXECUTED 42806: 4e75 rts <== NOT EXECUTED mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; IMFS_Set_handlers( &mt_entry->mt_fs_root->location ); } else { errno = ENOMEM; 42808: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED 4280e: 720c moveq #12,%d1 <== NOT EXECUTED 42810: 2040 moveal %d0,%a0 <== NOT EXECUTED if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 42812: 70ff moveq #-1,%d0 <== NOT EXECUTED mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; IMFS_Set_handlers( &mt_entry->mt_fs_root->location ); } else { errno = ENOMEM; 42814: 2081 movel %d1,%a0@ <== NOT EXECUTED 42816: 60e6 bras 427fe <== NOT EXECUTED =============================================================================== 000445ac : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 445ac: 4e56 ff98 linkw %fp,#-104 int rv = 0; mode &= ~rtems_filesystem_umask; 445b0: 2079 0006 43c8 moveal 643c8 ,%a0 const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 445b6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int rv = 0; mode &= ~rtems_filesystem_umask; 445ba: 2428 0008 movel %a0@(8),%d2 445be: 4682 notl %d2 445c0: c4ae 000c andl %fp@(12),%d2 switch (mode & S_IFMT) { 445c4: 2002 movel %d2,%d0 445c6: 0280 0000 f000 andil #61440,%d0 445cc: 0c80 0000 2000 cmpil #8192,%d0 445d2: 6734 beqs 44608 445d4: 632a blss 44600 <== NEVER TAKEN 445d6: 0c80 0000 6000 cmpil #24576,%d0 445dc: 672a beqs 44608 445de: 0c80 0000 8000 cmpil #32768,%d0 445e4: 6722 beqs 44608 <== NEVER TAKEN rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); } else { errno = EINVAL; 445e6: 4eb9 0005 3f94 jsr 53f94 <__errno> rv = -1; 445ec: 74ff moveq #-1,%d2 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); } else { errno = EINVAL; 445ee: 2040 moveal %d0,%a0 445f0: 7016 moveq #22,%d0 445f2: 2080 movel %d0,%a0@ rv = -1; } } return rv; } 445f4: 2002 movel %d2,%d0 445f6: 4cee 0c1c ff98 moveml %fp@(-104),%d2-%d4/%a2-%a3 445fc: 4e5e unlk %fp 445fe: 4e75 rts { int rv = 0; mode &= ~rtems_filesystem_umask; switch (mode & S_IFMT) { 44600: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED 44606: 66de bnes 445e6 <== NOT EXECUTED rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 44608: 206e 0010 moveal %fp@(16),%a0 4460c: 7007 moveq #7,%d0 4460e: b090 cmpl %a0@,%d0 44610: 66d4 bnes 445e6 rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = 44612: 4878 0078 pea 78 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); 44616: 260e movel %fp,%d3 44618: 0683 ffff ffc8 addil #-56,%d3 if ( node_control->imfs_type == IMFS_GENERIC ) { rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = 4461e: 2f2e 0008 movel %fp@(8),%sp@- 44622: 2f03 movel %d3,%sp@- 44624: 4eb9 0004 6772 jsr 46772 4462a: 2440 moveal %d0,%a2 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 4462c: 2f00 movel %d0,%sp@- 4462e: 4eb9 0004 4556 jsr 44556 44634: 4fef 0010 lea %sp@(16),%sp 44638: 4a00 tstb %d0 4463a: 676e beqs 446aa IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; new_node = IMFS_create_node_with_control( 4463c: 486e ffb4 pea %fp@(-76) if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; 44640: 2d6e 0014 ffb4 movel %fp@(20),%fp@(-76) new_node = IMFS_create_node_with_control( 44646: 2f02 movel %d2,%sp@- 44648: 2f2e ffd4 movel %fp@(-44),%sp@- 4464c: 2f2e ffd0 movel %fp@(-48),%sp@- 44650: 2f2e 0010 movel %fp@(16),%sp@- 44654: 2f0a movel %a2,%sp@- 44656: 4eb9 0004 ff2a jsr 4ff2a rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 4465c: 4fef 0018 lea %sp@(24),%sp 44660: 4a80 tstl %d0 44662: 6762 beqs 446c6 IMFS_jnode_t *parent = currentloc->node_access; 44664: 246a 0008 moveal %a2@(8),%a2 IMFS_update_ctime( parent ); 44668: 280e movel %fp,%d4 4466a: 0684 ffff ffac addil #-84,%d4 44670: 47f9 0004 5084 lea 45084 ,%a3 44676: 4282 clrl %d2 44678: 42a7 clrl %sp@- 4467a: 2f04 movel %d4,%sp@- 4467c: 4e93 jsr %a3@ 4467e: 256e ffac 0046 movel %fp@(-84),%a2@(70) IMFS_update_mtime( parent ); 44684: 42a7 clrl %sp@- 44686: 2f04 movel %d4,%sp@- 44688: 4e93 jsr %a3@ 4468a: 256e ffac 0042 movel %fp@(-84),%a2@(66) 44690: 4fef 0010 lea %sp@(16),%sp } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 44694: 2f03 movel %d3,%sp@- 44696: 4eb9 0004 68c6 jsr 468c6 4469c: 588f addql #4,%sp rv = -1; } } return rv; } 4469e: 2002 movel %d2,%d0 446a0: 4cee 0c1c ff98 moveml %fp@(-104),%d2-%d4/%a2-%a3 446a6: 4e5e unlk %fp 446a8: 4e75 rts IMFS_update_mtime( parent ); } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 446aa: 4878 0086 pea 86 rv = -1; 446ae: 74ff moveq #-1,%d2 IMFS_update_mtime( parent ); } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 446b0: 2f03 movel %d3,%sp@- 446b2: 4eb9 0004 641a jsr 4641a 446b8: 508f addql #8,%sp rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 446ba: 2f03 movel %d3,%sp@- 446bc: 4eb9 0004 68c6 jsr 468c6 446c2: 588f addql #4,%sp 446c4: 60d8 bras 4469e 446c6: 2f03 movel %d3,%sp@- IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; 446c8: 74ff moveq #-1,%d2 } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 446ca: 4eb9 0004 68c6 jsr 468c6 446d0: 588f addql #4,%sp 446d2: 60ca bras 4469e =============================================================================== 0004db1e : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4db1e: 4e56 0000 linkw %fp,#0 4db22: 2f0a movel %a2,%sp@- 4db24: 2f02 movel %d2,%sp@- IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4db26: 4878 0001 pea 1 if ( *block_entry_ptr ) return 0; 4db2a: 4282 clrl %d2 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4db2c: 2f2e 000c movel %fp@(12),%sp@- 4db30: 2f2e 0008 movel %fp@(8),%sp@- 4db34: 4eb9 0004 d6e8 jsr 4d6e8 if ( *block_entry_ptr ) 4db3a: 4fef 000c lea %sp@(12),%sp IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4db3e: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4db40: 4a92 tstl %a2@ 4db42: 670e beqs 4db52 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 4db44: 2002 movel %d2,%d0 4db46: 242e fff8 movel %fp@(-8),%d2 4db4a: 246e fffc moveal %fp@(-4),%a2 4db4e: 4e5e unlk %fp 4db50: 4e75 rts return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); 4db52: 4eb9 0004 d6c4 jsr 4d6c4 if ( !memory ) 4db58: 4a80 tstl %d0 4db5a: 6710 beqs 4db6c <== NEVER TAKEN return 1; *block_entry_ptr = memory; 4db5c: 2480 movel %d0,%a2@ return 0; } 4db5e: 2002 movel %d2,%d0 4db60: 242e fff8 movel %fp@(-8),%d2 4db64: 246e fffc moveal %fp@(-4),%a2 4db68: 4e5e unlk %fp 4db6a: 4e75 rts /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; 4db6c: 7401 moveq #1,%d2 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } 4db6e: 2002 movel %d2,%d0 <== NOT EXECUTED 4db70: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4db74: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4db78: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004dd20 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 4dd20: 4e56 ffd0 linkw %fp,#-48 4dd24: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4dd28: 2679 0006 06cc moveal 606cc ,%a3 4dd2e: 260b movel %a3,%d3 4dd30: e48b lsrl #2,%d3 4dd32: 2403 movel %d3,%d2 4dd34: 5282 addql #1,%d2 4dd36: 4c03 2800 mulsl %d3,%d2 4dd3a: 200b movel %a3,%d0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 4dd3c: 246e 0008 moveal %fp@(8),%a2 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4dd40: 5282 addql #1,%d2 4dd42: 4c03 2800 mulsl %d3,%d2 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 4dd46: 1a2e 000f moveb %fp@(15),%d5 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4dd4a: 5382 subql #1,%d2 4dd4c: 4c00 2800 mulsl %d0,%d2 4dd50: 4280 clrl %d0 4dd52: 2202 movel %d2,%d1 4dd54: 242e 0010 movel %fp@(16),%d2 4dd58: 262e 0014 movel %fp@(20),%d3 4dd5c: 9681 subl %d1,%d3 4dd5e: 9580 subxl %d0,%d2 4dd60: 6c00 012e bgew 4de90 rtems_set_errno_and_return_minus_one( EFBIG ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 4dd64: 242a 004e movel %a2@(78),%d2 4dd68: 262a 0052 movel %a2@(82),%d3 4dd6c: 202e 0010 movel %fp@(16),%d0 4dd70: 222e 0014 movel %fp@(20),%d1 4dd74: 9283 subl %d3,%d1 4dd76: 9182 subxl %d2,%d0 4dd78: 6f00 00da blew 4de54 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4dd7c: 49f9 0005 b67c lea 5b67c <__divdi3>,%a4 4dd82: 2e0b movel %a3,%d7 4dd84: 5bc6 smi %d6 4dd86: 49c6 extbl %d6 4dd88: 2f07 movel %d7,%sp@- 4dd8a: 2f06 movel %d6,%sp@- 4dd8c: 2f2e 0014 movel %fp@(20),%sp@- 4dd90: 2f2e 0010 movel %fp@(16),%sp@- 4dd94: 4e94 jsr %a4@ 4dd96: 4fef 0010 lea %sp@(16),%sp 4dd9a: 2801 movel %d1,%d4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4dd9c: 2f07 movel %d7,%sp@- 4dd9e: 2f06 movel %d6,%sp@- 4dda0: 2f03 movel %d3,%sp@- 4dda2: 2f02 movel %d2,%sp@- offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 4dda4: 2403 movel %d3,%d2 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4dda6: 4e94 jsr %a4@ 4dda8: 4fef 0010 lea %sp@(16),%sp offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 4ddac: 200b movel %a3,%d0 4ddae: 4c01 0800 mulsl %d1,%d0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4ddb2: 2c01 movel %d1,%d6 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 4ddb4: 9480 subl %d0,%d2 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4ddb6: b284 cmpl %d4,%d1 4ddb8: 622c bhis 4dde6 <== NEVER TAKEN 4ddba: 2e01 movel %d1,%d7 4ddbc: 47f9 0004 db1e lea 4db1e ,%a3 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = 4ddc2: 4bf9 0004 d6e8 lea 4d6e8 ,%a5 IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 4ddc8: 49f9 0004 f8b4 lea 4f8b4 ,%a4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { 4ddce: 2f07 movel %d7,%sp@- 4ddd0: 2f0a movel %a2,%sp@- 4ddd2: 4e93 jsr %a3@ 4ddd4: 508f addql #8,%sp 4ddd6: 4a80 tstl %d0 4ddd8: 6600 0086 bnew 4de60 if ( zero_fill ) { 4dddc: 4a05 tstb %d5 4ddde: 6648 bnes 4de28 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4dde0: 5287 addql #1,%d7 4dde2: be84 cmpl %d4,%d7 4dde4: 63e8 blss 4ddce /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 4dde6: 42a7 clrl %sp@- 4dde8: 240e movel %fp,%d2 4ddea: 5182 subql #8,%d2 4ddec: 47f9 0004 315c lea 4315c ,%a3 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4ddf2: 202e 0010 movel %fp@(16),%d0 4ddf6: 222e 0014 movel %fp@(20),%d1 4ddfa: 2540 004e movel %d0,%a2@(78) 4ddfe: 2541 0052 movel %d1,%a2@(82) IMFS_update_ctime(the_jnode); 4de02: 2f02 movel %d2,%sp@- 4de04: 4e93 jsr %a3@ 4de06: 256e fff8 0046 movel %fp@(-8),%a2@(70) IMFS_update_mtime(the_jnode); 4de0c: 42a7 clrl %sp@- 4de0e: 2f02 movel %d2,%sp@- 4de10: 4e93 jsr %a3@ 4de12: 256e fff8 0042 movel %fp@(-8),%a2@(66) return 0; 4de18: 4fef 0010 lea %sp@(16),%sp 4de1c: 4280 clrl %d0 } 4de1e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4de24: 4e5e unlk %fp 4de26: 4e75 rts */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = 4de28: 42a7 clrl %sp@- * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; 4de2a: 2639 0006 06cc movel 606cc ,%d3 4de30: 9682 subl %d2,%d3 block_p *block_ptr = 4de32: 2f07 movel %d7,%sp@- offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4de34: 5287 addql #1,%d7 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = 4de36: 2f0a movel %a2,%sp@- 4de38: 4e95 jsr %a5@ IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 4de3a: 2040 moveal %d0,%a0 4de3c: 2f03 movel %d3,%sp@- 4de3e: 42a7 clrl %sp@- 4de40: d490 addl %a0@,%d2 4de42: 2f02 movel %d2,%sp@- offset = 0; 4de44: 4282 clrl %d2 if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 4de46: 4e94 jsr %a4@ 4de48: 4fef 0018 lea %sp@(24),%sp offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4de4c: be84 cmpl %d4,%d7 4de4e: 6300 ff7e blsw 4ddce 4de52: 6092 bras 4dde6 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; 4de54: 4280 clrl %d0 <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4de56: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4de5c: 4e5e unlk %fp <== NOT EXECUTED 4de5e: 4e75 rts <== NOT EXECUTED 4de60: 47f9 0004 dcf8 lea 4dcf8 ,%a3 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 4de66: bc87 cmpl %d7,%d6 <== NOT EXECUTED 4de68: 620e bhis 4de78 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4de6a: 2f07 movel %d7,%sp@- <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 4de6c: 5387 subql #1,%d7 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4de6e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4de70: 4e93 jsr %a3@ <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 4de72: 508f addql #8,%sp <== NOT EXECUTED 4de74: be86 cmpl %d6,%d7 <== NOT EXECUTED 4de76: 64f2 bccs 4de6a <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4de78: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED 4de7e: 721c moveq #28,%d1 <== NOT EXECUTED 4de80: 2040 moveal %d0,%a0 <== NOT EXECUTED 4de82: 70ff moveq #-1,%d0 <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4de84: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4de8a: 2081 movel %d1,%a0@ <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4de8c: 4e5e unlk %fp <== NOT EXECUTED 4de8e: 4e75 rts <== NOT EXECUTED /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EFBIG ); 4de90: 4eb9 0004 f024 jsr 4f024 <__errno> 4de96: 741b moveq #27,%d2 4de98: 2040 moveal %d0,%a0 4de9a: 70ff moveq #-1,%d0 4de9c: 2082 movel %d2,%a0@ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4de9e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dea4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d6e8 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4d6e8: 4e56 fff0 linkw %fp,#-16 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4d6ec: 2239 0006 06cc movel 606cc ,%d1 4d6f2: e489 lsrl #2,%d1 4d6f4: 2001 movel %d1,%d0 4d6f6: 5380 subql #1,%d0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4d6f8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4d6fc: 246e 0008 moveal %fp@(8),%a2 4d700: 242e 000c movel %fp@(12),%d2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4d704: b082 cmpl %d2,%d0 4d706: 6522 bcss 4d72a p = info->indirect; 4d708: 206a 0056 moveal %a2@(86),%a0 if ( malloc_it ) { 4d70c: 4aae 0010 tstl %fp@(16) 4d710: 6700 00a8 beqw 4d7ba if ( !p ) { 4d714: 4a88 tstl %a0 4d716: 6700 010a beqw 4d822 } if ( !p ) return 0; return &info->indirect[ my_block ]; 4d71a: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4d71e: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4d720: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d726: 4e5e unlk %fp 4d728: 4e75 rts /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4d72a: 2001 movel %d1,%d0 4d72c: 5280 addql #1,%d0 4d72e: 4c01 0800 mulsl %d1,%d0 4d732: 2040 moveal %d0,%a0 4d734: 5388 subql #1,%a0 4d736: b1c2 cmpal %d2,%a0 4d738: 6450 bccs 4d78a } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4d73a: 2600 movel %d0,%d3 4d73c: 5283 addql #1,%d3 4d73e: 4c01 3800 mulsl %d1,%d3 4d742: 5383 subql #1,%d3 4d744: b682 cmpl %d2,%d3 4d746: 6578 bcss 4d7c0 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 4d748: 9480 subl %d0,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4d74a: 4c41 2004 remul %d1,%d4,%d2 4d74e: 4c41 2002 remul %d1,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4d752: 206a 005e moveal %a2@(94),%a0 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; 4d756: 4c41 2003 remul %d1,%d3,%d2 4d75a: 4c41 2002 remul %d1,%d2,%d2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4d75e: 4aae 0010 tstl %fp@(16) 4d762: 6600 008c bnew 4d7f0 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 4d766: 4a88 tstl %a0 4d768: 6756 beqs 4d7c0 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 4d76a: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 if ( !p1 ) 4d76e: 4a88 tstl %a0 4d770: 674e beqs 4d7c0 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 4d772: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 if ( !p2 ) 4d776: 4a88 tstl %a0 4d778: 6746 beqs 4d7c0 <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; 4d77a: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4d77e: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4d780: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d786: 4e5e unlk %fp 4d788: 4e75 rts /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; 4d78a: 9481 subl %d1,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4d78c: 206a 005a moveal %a2@(90),%a0 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4d790: 4c41 2003 remul %d1,%d3,%d2 4d794: 4c41 2002 remul %d1,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4d798: 4aae 0010 tstl %fp@(16) 4d79c: 662e bnes 4d7cc } return (block_p *)&p1[ singly ]; } if ( !p ) 4d79e: 4a88 tstl %a0 4d7a0: 671e beqs 4d7c0 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 4d7a2: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 if ( !p ) 4d7a6: 4a88 tstl %a0 4d7a8: 6716 beqs 4d7c0 <== NEVER TAKEN return 0; return (block_p *)&p[ singly ]; 4d7aa: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4d7ae: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4d7b0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d7b6: 4e5e unlk %fp 4d7b8: 4e75 rts info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 4d7ba: 4a88 tstl %a0 4d7bc: 6600 ff5c bnew 4d71a if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) return 0; 4d7c0: 4280 clrl %d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4d7c2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4d7c8: 4e5e unlk %fp <== NOT EXECUTED 4d7ca: 4e75 rts <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { 4d7cc: 4a88 tstl %a0 4d7ce: 676c beqs 4d83c if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 4d7d0: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4d7d4: 2052 moveal %a2@,%a0 if ( !p1 ) { 4d7d6: 4a88 tstl %a0 4d7d8: 66d0 bnes 4d7aa p1 = memfile_alloc_block(); 4d7da: 4eb9 0004 d6c4 jsr 4d6c4 4d7e0: 2040 moveal %d0,%a0 if ( !p1 ) 4d7e2: 4a80 tstl %d0 4d7e4: 67da beqs 4d7c0 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 4d7e6: 2480 movel %d0,%a2@ p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 4d7e8: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4d7ec: 2008 movel %a0,%d0 4d7ee: 60c0 bras 4d7b0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { 4d7f0: 4a88 tstl %a0 4d7f2: 676a beqs 4d85e <== NEVER TAKEN if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 4d7f4: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4d7f8: 2052 moveal %a2@,%a0 if ( !p1 ) { 4d7fa: 4a88 tstl %a0 4d7fc: 677c beqs 4d87a <== NEVER TAKEN if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 4d7fe: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4d802: 2052 moveal %a2@,%a0 if ( !p2 ) { 4d804: 4a88 tstl %a0 4d806: 6600 ff72 bnew 4d77a p2 = memfile_alloc_block(); 4d80a: 4eb9 0004 d6c4 jsr 4d6c4 4d810: 2040 moveal %d0,%a0 if ( !p2 ) 4d812: 4a80 tstl %d0 4d814: 67aa beqs 4d7c0 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 4d816: 2480 movel %d0,%a2@ p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 4d818: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4d81c: 2008 movel %a0,%d0 4d81e: 6000 ff60 braw 4d780 p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4d822: 4eb9 0004 d6c4 jsr 4d6c4 4d828: 2040 moveal %d0,%a0 if ( !p ) 4d82a: 4a80 tstl %d0 4d82c: 6792 beqs 4d7c0 <== NEVER TAKEN return 0; info->indirect = p; 4d82e: 2540 0056 movel %d0,%a2@(86) } if ( !p ) return 0; return &info->indirect[ my_block ]; 4d832: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4d836: 2008 movel %a0,%d0 4d838: 6000 fee6 braw 4d720 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4d83c: 4eb9 0004 d6c4 jsr 4d6c4 4d842: 2040 moveal %d0,%a0 if ( !p ) 4d844: 4a80 tstl %d0 4d846: 6700 ff78 beqw 4d7c0 return 0; info->doubly_indirect = p; 4d84a: 2540 005a movel %d0,%a2@(90) } p1 = (block_p *)p[ doubly ]; 4d84e: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4d852: 2052 moveal %a2@,%a0 if ( !p1 ) { 4d854: 4a88 tstl %a0 4d856: 6600 ff52 bnew 4d7aa 4d85a: 6000 ff7e braw 4d7da p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4d85e: 4eb9 0004 d6c4 jsr 4d6c4 4d864: 2040 moveal %d0,%a0 if ( !p ) 4d866: 4a80 tstl %d0 4d868: 6700 ff56 beqw 4d7c0 return 0; info->triply_indirect = p; 4d86c: 2540 005e movel %d0,%a2@(94) } p1 = (block_p *) p[ triply ]; 4d870: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4d874: 2052 moveal %a2@,%a0 if ( !p1 ) { 4d876: 4a88 tstl %a0 4d878: 6684 bnes 4d7fe <== NEVER TAKEN p1 = memfile_alloc_block(); 4d87a: 4eb9 0004 d6c4 jsr 4d6c4 4d880: 2040 moveal %d0,%a0 if ( !p1 ) 4d882: 4a80 tstl %d0 4d884: 6700 ff3a beqw 4d7c0 return 0; p[ triply ] = (block_p) p1; 4d888: 2480 movel %d0,%a2@ } p2 = (block_p *)p1[ doubly ]; 4d88a: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4d88e: 2052 moveal %a2@,%a0 if ( !p2 ) { 4d890: 4a88 tstl %a0 4d892: 6600 fee6 bnew 4d77a 4d896: 6000 ff72 braw 4d80a =============================================================================== 0004d89a : * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { 4d89a: 7005 moveq #5,%d0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4d89c: 4e56 ffd0 linkw %fp,#-48 4d8a0: 226e 0018 moveal %fp@(24),%a1 4d8a4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4d8a8: 246e 0008 moveal %fp@(8),%a2 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 4d8ac: 206a 004a moveal %a2@(74),%a0 4d8b0: 242e 000c movel %fp@(12),%d2 4d8b4: 262e 0010 movel %fp@(16),%d3 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { 4d8b8: b090 cmpl %a0@,%d0 4d8ba: 6700 0180 beqw 4da3c /* * 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; 4d8be: 2009 movel %a1,%d0 4d8c0: d083 addl %d3,%d0 if ( last_byte > the_jnode->info.file.size ) 4d8c2: 2a00 movel %d0,%d5 4d8c4: 4284 clrl %d4 4d8c6: 202a 004e movel %a2@(78),%d0 4d8ca: 222a 0052 movel %a2@(82),%d1 4d8ce: 2c04 movel %d4,%d6 4d8d0: 2e05 movel %d5,%d7 4d8d2: 9e81 subl %d1,%d7 4d8d4: 9d80 subxl %d0,%d6 4d8d6: 6f00 0112 blew 4d9ea */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d8da: 2c39 0006 06cc movel 606cc ,%d6 * 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 ) my_length = the_jnode->info.file.size - start; 4d8e0: 2e01 movel %d1,%d7 4d8e2: 9e83 subl %d3,%d7 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d8e4: 2a06 movel %d6,%d5 4d8e6: 5bc4 smi %d4 4d8e8: 49c4 extbl %d4 4d8ea: 2f05 movel %d5,%sp@- 4d8ec: 2f04 movel %d4,%sp@- 4d8ee: 2f03 movel %d3,%sp@- 4d8f0: 2f02 movel %d2,%sp@- 4d8f2: 4eb9 0005 badc jsr 5badc <__moddi3> 4d8f8: 4fef 0010 lea %sp@(16),%sp 4d8fc: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d8fe: 2f05 movel %d5,%sp@- 4d900: 2f04 movel %d4,%sp@- 4d902: 2f03 movel %d3,%sp@- 4d904: 2f02 movel %d2,%sp@- 4d906: 4eb9 0005 b67c jsr 5b67c <__divdi3> 4d90c: 4fef 0010 lea %sp@(16),%sp 4d910: 2401 movel %d1,%d2 if ( start_offset ) { 4d912: 4a8b tstl %a3 4d914: 6700 0110 beqw 4da26 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4d918: 9c8b subl %a3,%d6 4d91a: 2807 movel %d7,%d4 4d91c: bc87 cmpl %d7,%d6 4d91e: 6500 0174 bcsw 4da94 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d922: 42a7 clrl %sp@- 4d924: 2f02 movel %d2,%sp@- 4d926: 2f0a movel %a2,%sp@- 4d928: 4eb9 0004 d6e8 jsr 4d6e8 if ( !block_ptr ) 4d92e: 4fef 000c lea %sp@(12),%sp 4d932: 4a80 tstl %d0 4d934: 6700 0190 beqw 4dac6 return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4d938: 2f04 movel %d4,%sp@- 4d93a: 2040 moveal %d0,%a0 4d93c: d7d0 addal %a0@,%a3 dest += to_copy; block++; 4d93e: 5282 addql #1,%d2 my_length -= to_copy; 4d940: 9e84 subl %d4,%d7 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4d942: 2f0b movel %a3,%sp@- 4d944: 2f2e 0014 movel %fp@(20),%sp@- dest += to_copy; 4d948: 262e 0014 movel %fp@(20),%d3 4d94c: d684 addl %d4,%d3 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4d94e: 4eb9 0004 f844 jsr 4f844 4d954: 2c39 0006 06cc movel 606cc ,%d6 4d95a: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4d95e: bc87 cmpl %d7,%d6 4d960: 623c bhis 4d99e 4d962: 47f9 0004 d6e8 lea 4d6e8 ,%a3 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4d968: 49f9 0004 f844 lea 4f844 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d96e: 42a7 clrl %sp@- if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 4d970: 9e86 subl %d6,%d7 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d972: 2f02 movel %d2,%sp@- if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 4d974: 5282 addql #1,%d2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d976: 2f0a movel %a2,%sp@- 4d978: 4e93 jsr %a3@ if ( !block_ptr ) 4d97a: 4fef 000c lea %sp@(12),%sp 4d97e: 4a80 tstl %d0 4d980: 6700 00ae beqw 4da30 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4d984: 2040 moveal %d0,%a0 dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4d986: d886 addl %d6,%d4 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4d988: 2f06 movel %d6,%sp@- 4d98a: 2f10 movel %a0@,%sp@- 4d98c: 2f03 movel %d3,%sp@- dest += to_copy; 4d98e: d686 addl %d6,%d3 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4d990: 4e94 jsr %a4@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4d992: 4fef 000c lea %sp@(12),%sp 4d996: beb9 0006 06cc cmpl 606cc ,%d7 4d99c: 64d0 bccs 4d96e /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4d99e: 4a87 tstl %d7 4d9a0: 6728 beqs 4d9ca block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d9a2: 42a7 clrl %sp@- 4d9a4: 2f02 movel %d2,%sp@- 4d9a6: 2f0a movel %a2,%sp@- 4d9a8: 4eb9 0004 d6e8 jsr 4d6e8 if ( !block_ptr ) 4d9ae: 4fef 000c lea %sp@(12),%sp 4d9b2: 4a80 tstl %d0 4d9b4: 677a beqs 4da30 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4d9b6: 2040 moveal %d0,%a0 copied += my_length; 4d9b8: d887 addl %d7,%d4 if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4d9ba: 2f07 movel %d7,%sp@- 4d9bc: 2f10 movel %a0@,%sp@- 4d9be: 2f03 movel %d3,%sp@- 4d9c0: 4eb9 0004 f844 jsr 4f844 copied += my_length; 4d9c6: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4d9ca: 42a7 clrl %sp@- 4d9cc: 486e fff8 pea %fp@(-8) 4d9d0: 4eb9 0004 315c jsr 4315c 4d9d6: 256e fff8 003e movel %fp@(-8),%a2@(62) return copied; 4d9dc: 2004 movel %d4,%d0 4d9de: 508f addql #8,%sp } 4d9e0: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d9e6: 4e5e unlk %fp 4d9e8: 4e75 rts */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d9ea: 2c39 0006 06cc movel 606cc ,%d6 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4d9f0: 2e09 movel %a1,%d7 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d9f2: 2a06 movel %d6,%d5 4d9f4: 5bc4 smi %d4 4d9f6: 49c4 extbl %d4 4d9f8: 2f05 movel %d5,%sp@- 4d9fa: 2f04 movel %d4,%sp@- 4d9fc: 2f03 movel %d3,%sp@- 4d9fe: 2f02 movel %d2,%sp@- 4da00: 4eb9 0005 badc jsr 5badc <__moddi3> 4da06: 4fef 0010 lea %sp@(16),%sp 4da0a: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4da0c: 2f05 movel %d5,%sp@- 4da0e: 2f04 movel %d4,%sp@- 4da10: 2f03 movel %d3,%sp@- 4da12: 2f02 movel %d2,%sp@- 4da14: 4eb9 0005 b67c jsr 5b67c <__divdi3> 4da1a: 4fef 0010 lea %sp@(16),%sp 4da1e: 2401 movel %d1,%d2 if ( start_offset ) { 4da20: 4a8b tstl %a3 4da22: 6600 fef4 bnew 4d918 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 4da26: 262e 0014 movel %fp@(20),%d3 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 4da2a: 4284 clrl %d4 4da2c: 6000 ff30 braw 4d95e IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 4da30: 2004 movel %d4,%d0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4da32: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4da38: 4e5e unlk %fp <== NOT EXECUTED 4da3a: 4e75 rts <== NOT EXECUTED if ( IMFS_type( the_jnode ) == 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)) 4da3c: 2a49 moveal %a1,%a5 4da3e: 99cc subal %a4,%a4 4da40: 282a 004e movel %a2@(78),%d4 4da44: 2a2a 0052 movel %a2@(82),%d5 my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4da48: 206a 0056 moveal %a2@(86),%a0 if (my_length > (the_jnode->info.linearfile.size - start)) 4da4c: 2c04 movel %d4,%d6 4da4e: 2e05 movel %d5,%d7 4da50: 200c movel %a4,%d0 4da52: 220d movel %a5,%d1 4da54: 9e83 subl %d3,%d7 4da56: 9d82 subxl %d2,%d6 4da58: 9287 subl %d7,%d1 4da5a: 9186 subxl %d6,%d0 4da5c: 6f3c bles 4da9a <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 4da5e: 2805 movel %d5,%d4 4da60: 9883 subl %d3,%d4 memcpy(dest, &file_ptr[start], my_length); 4da62: 2f04 movel %d4,%sp@- 4da64: 4870 3800 pea %a0@(00000000,%d3:l) 4da68: 2f2e 0014 movel %fp@(20),%sp@- 4da6c: 4eb9 0004 f844 jsr 4f844 IMFS_update_atime( the_jnode ); 4da72: 42a7 clrl %sp@- 4da74: 486e fff8 pea %fp@(-8) 4da78: 4eb9 0004 315c jsr 4315c 4da7e: 256e fff8 003e movel %fp@(-8),%a2@(62) return my_length; 4da84: 2004 movel %d4,%d0 4da86: 4fef 0014 lea %sp@(20),%sp } IMFS_update_atime( the_jnode ); return copied; } 4da8a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4da90: 4e5e unlk %fp 4da92: 4e75 rts 4da94: 2806 movel %d6,%d4 4da96: 6000 fe8a braw 4d922 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4da9a: 2809 movel %a1,%d4 <== NOT EXECUTED file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 4da9c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4da9e: 4870 3800 pea %a0@(00000000,%d3:l) <== NOT EXECUTED 4daa2: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 4daa6: 4eb9 0004 f844 jsr 4f844 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4daac: 42a7 clrl %sp@- <== NOT EXECUTED 4daae: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4dab2: 4eb9 0004 315c jsr 4315c <== NOT EXECUTED 4dab8: 256e fff8 003e movel %fp@(-8),%a2@(62) <== NOT EXECUTED return my_length; 4dabe: 2004 movel %d4,%d0 <== NOT EXECUTED 4dac0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4dac4: 60c4 bras 4da8a <== NOT EXECUTED 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 ); if ( !block_ptr ) return copied; 4dac6: 4280 clrl %d0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4dac8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4dace: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004dbe2 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4dbe2: 4e56 ffe0 linkw %fp,#-32 4dbe6: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ /* * 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; 4dbea: 2839 0006 06cc movel 606cc ,%d4 4dbf0: e48c lsrl #2,%d4 * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4dbf2: 286e 0008 moveal %fp@(8),%a4 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4dbf6: 4aac 0056 tstl %a4@(86) 4dbfa: 670c beqs 4dc08 memfile_free_blocks_in_table( &info->indirect, to_free ); 4dbfc: 2f04 movel %d4,%sp@- 4dbfe: 486c 0056 pea %a4@(86) 4dc02: 4eba ff92 jsr %pc@(4db96 ) 4dc06: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4dc08: 206c 005a moveal %a4@(90),%a0 4dc0c: 4a88 tstl %a0 4dc0e: 674a beqs 4dc5a for ( i=0 ; i,%d3 4dc16: 2003 movel %d3,%d0 4dc18: e488 lsrl #2,%d0 4dc1a: 47fa ff7a lea %pc@(4db96 ),%a3 4dc1e: 6730 beqs 4dc50 <== NEVER TAKEN 4dc20: 4280 clrl %d0 4dc22: 4282 clrl %d2 4dc24: 47fa ff70 lea %pc@(4db96 ),%a3 4dc28: 5282 addql #1,%d2 if ( info->doubly_indirect[i] ) { 4dc2a: 41f0 0c00 lea %a0@(00000000,%d0:l:4),%a0 4dc2e: 4a90 tstl %a0@ 4dc30: 670e beqs 4dc40 <== NEVER TAKEN memfile_free_blocks_in_table( 4dc32: 2f04 movel %d4,%sp@- 4dc34: 2f08 movel %a0,%sp@- 4dc36: 4e93 jsr %a3@ 4dc38: 2639 0006 06cc movel 606cc ,%d3 4dc3e: 508f addql #8,%sp if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 4dc4a: 206c 005a moveal %a4@(90),%a0 4dc4e: 60d8 bras 4dc28 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 ); 4dc50: 2f04 movel %d4,%sp@- 4dc52: 486c 005a pea %a4@(90) 4dc56: 4e93 jsr %a3@ 4dc58: 508f addql #8,%sp } if ( info->triply_indirect ) { 4dc5a: 206c 005e moveal %a4@(94),%a0 4dc5e: 4a88 tstl %a0 4dc60: 677a beqs 4dcdc for ( i=0 ; i,%d3 4dc68: 2003 movel %d3,%d0 4dc6a: e488 lsrl #2,%d0 4dc6c: 677a beqs 4dce8 <== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; 4dc6e: 2450 moveal %a0@,%a2 if ( !p ) /* ensure we have a valid pointer */ 4dc70: 4a8a tstl %a2 4dc72: 6774 beqs 4dce8 <== NEVER TAKEN } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4dc74: 4286 clrl %d6 if ( !p ) /* ensure we have a valid pointer */ 4dc76: 4285 clrl %d5 4dc78: 47fa ff1c lea %pc@(4db96 ),%a3 break; for ( j=0 ; j <== NEVER TAKEN 4dc80: 4281 clrl %d1 4dc82: 4282 clrl %d2 4dc84: 5282 addql #1,%d2 if ( p[j] ) { 4dc86: 41f2 1c00 lea %a2@(00000000,%d1:l:4),%a0 4dc8a: 4a90 tstl %a0@ 4dc8c: 670e beqs 4dc9c <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4dc8e: 2f04 movel %d4,%sp@- 4dc90: 2f08 movel %a0,%sp@- 4dc92: 4e93 jsr %a3@ 4dc94: 2639 0006 06cc movel 606cc ,%d3 4dc9a: 508f addql #8,%sp if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4dca6: 2f04 movel %d4,%sp@- 4dca8: dcac 005e addl %a4@(94),%d6 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; idoubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i,%d3 4dcb8: 2003 movel %d3,%d0 4dcba: 508f addql #8,%sp 4dcbc: e488 lsrl #2,%d0 4dcbe: b085 cmpl %d5,%d0 4dcc0: 6310 blss 4dcd2 * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( 4dcc2: 2c05 movel %d5,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4dcc4: 206c 005e moveal %a4@(94),%a0 * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( 4dcc8: e58e lsll #2,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4dcca: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 if ( !p ) /* ensure we have a valid pointer */ 4dcce: 4a8a tstl %a2 4dcd0: 66aa bnes 4dc7c <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4dcd2: 2f04 movel %d4,%sp@- 4dcd4: 486c 005e pea %a4@(94) 4dcd8: 4e93 jsr %a3@ 4dcda: 508f addql #8,%sp (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 4dcdc: 200c movel %a4,%d0 4dcde: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 4dce4: 4e5e unlk %fp 4dce6: 4e75 rts } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4dce8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4dcea: 486c 005e pea %a4@(94) <== NOT EXECUTED 4dcee: 47fa fea6 lea %pc@(4db96 ),%a3<== NOT EXECUTED 4dcf2: 4e93 jsr %a3@ <== NOT EXECUTED 4dcf4: 508f addql #8,%sp <== NOT EXECUTED 4dcf6: 60e4 bras 4dcdc <== NOT EXECUTED =============================================================================== 0004dcf8 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4dcf8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4dcfc: 42a7 clrl %sp@- <== NOT EXECUTED 4dcfe: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4dd02: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4dd06: 4eb9 0004 d6e8 jsr 4d6e8 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 4dd0c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4dd0e: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4dd10: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4dd12: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4dd14: 4eb9 0004 db7c jsr 4db7c <== NOT EXECUTED return 1; } 4dd1a: 7001 moveq #1,%d0 <== NOT EXECUTED 4dd1c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004dea8 : * 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 + my_length; if ( last_byte > the_jnode->info.file.size ) { 4dea8: 4280 clrl %d0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4deaa: 4e56 ffd4 linkw %fp,#-44 4deae: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4deb2: 242e 000c movel %fp@(12),%d2 4deb6: 262e 0010 movel %fp@(16),%d3 4deba: 286e 0018 moveal %fp@(24),%a4 /* * 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 + my_length; 4debe: 41f4 3800 lea %a4@(00000000,%d3:l),%a0 if ( last_byte > the_jnode->info.file.size ) { 4dec2: 2208 movel %a0,%d1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4dec4: 246e 0008 moveal %fp@(8),%a2 * 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 + my_length; if ( last_byte > the_jnode->info.file.size ) { 4dec8: 2c00 movel %d0,%d6 4deca: 2e01 movel %d1,%d7 4decc: 282a 004e movel %a2@(78),%d4 4ded0: 2a2a 0052 movel %a2@(82),%d5 4ded4: 9e85 subl %d5,%d7 4ded6: 9d84 subxl %d4,%d6 4ded8: 6e00 0124 bgtw 4dffe */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4dedc: 2e39 0006 06cc movel 606cc ,%d7 4dee2: 2a07 movel %d7,%d5 4dee4: 5bc4 smi %d4 4dee6: 49c4 extbl %d4 4dee8: 2f05 movel %d5,%sp@- 4deea: 2f04 movel %d4,%sp@- 4deec: 2f03 movel %d3,%sp@- 4deee: 2f02 movel %d2,%sp@- 4def0: 4eb9 0005 badc jsr 5badc <__moddi3> 4def6: 4fef 0010 lea %sp@(16),%sp 4defa: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4defc: 2f05 movel %d5,%sp@- 4defe: 2f04 movel %d4,%sp@- 4df00: 2f03 movel %d3,%sp@- 4df02: 2f02 movel %d2,%sp@- 4df04: 4eb9 0005 b67c jsr 5b67c <__divdi3> 4df0a: 4fef 0010 lea %sp@(16),%sp 4df0e: 2401 movel %d1,%d2 if ( start_offset ) { 4df10: 4a8b tstl %a3 4df12: 6700 00de beqw 4dff2 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4df16: 9e8b subl %a3,%d7 4df18: b9c7 cmpal %d7,%a4 4df1a: 6402 bccs 4df1e 4df1c: 2e0c movel %a4,%d7 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4df1e: 42a7 clrl %sp@- 4df20: 2f02 movel %d2,%sp@- 4df22: 2f0a movel %a2,%sp@- 4df24: 4eb9 0004 d6e8 jsr 4d6e8 if ( !block_ptr ) 4df2a: 4fef 000c lea %sp@(12),%sp 4df2e: 4a80 tstl %d0 4df30: 6700 013a beqw 4e06c block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4df34: 2f07 movel %d7,%sp@- 4df36: 2f2e 0014 movel %fp@(20),%sp@- 4df3a: 2040 moveal %d0,%a0 4df3c: d7d0 addal %a0@,%a3 src += to_copy; block++; my_length -= to_copy; 4df3e: 2c0c movel %a4,%d6 4df40: 9c87 subl %d7,%d6 copied += to_copy; 4df42: 2807 movel %d7,%d4 src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 4df44: 5282 addql #1,%d2 to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; 4df46: 262e 0014 movel %fp@(20),%d3 4df4a: d687 addl %d7,%d3 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4df4c: 2f0b movel %a3,%sp@- 4df4e: 4eb9 0004 f844 jsr 4f844 4df54: 2e39 0006 06cc movel 606cc ,%d7 4df5a: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4df5e: be86 cmpl %d6,%d7 4df60: 623c bhis 4df9e 4df62: 47f9 0004 d6e8 lea 4d6e8 ,%a3 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 ); 4df68: 49f9 0004 f844 lea 4f844 ,%a4 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4df6e: 42a7 clrl %sp@- fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 4df70: 9c87 subl %d7,%d6 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4df72: 2f02 movel %d2,%sp@- #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; 4df74: 5282 addql #1,%d2 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4df76: 2f0a movel %a2,%sp@- 4df78: 4e93 jsr %a3@ if ( !block_ptr ) 4df7a: 4fef 000c lea %sp@(12),%sp 4df7e: 4a80 tstl %d0 4df80: 6700 00de beqw 4e060 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 ); 4df84: 2f07 movel %d7,%sp@- 4df86: 2040 moveal %d0,%a0 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 4df88: d887 addl %d7,%d4 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 ); 4df8a: 2f03 movel %d3,%sp@- 4df8c: 2f10 movel %a0@,%sp@- src += to_copy; 4df8e: d687 addl %d7,%d3 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 ); 4df90: 4e94 jsr %a4@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4df92: 4fef 000c lea %sp@(12),%sp 4df96: bcb9 0006 06cc cmpl 606cc ,%d6 4df9c: 64d0 bccs 4df6e * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4df9e: 4a86 tstl %d6 4dfa0: 672a beqs 4dfcc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4dfa2: 42a7 clrl %sp@- 4dfa4: 2f02 movel %d2,%sp@- 4dfa6: 2f0a movel %a2,%sp@- 4dfa8: 4eb9 0004 d6e8 jsr 4d6e8 if ( !block_ptr ) 4dfae: 4fef 000c lea %sp@(12),%sp 4dfb2: 4a80 tstl %d0 4dfb4: 6700 00aa beqw 4e060 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 ); 4dfb8: 2f06 movel %d6,%sp@- 4dfba: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4dfbc: d886 addl %d6,%d4 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 ); 4dfbe: 2f03 movel %d3,%sp@- 4dfc0: 2f10 movel %a0@,%sp@- 4dfc2: 4eb9 0004 f844 jsr 4f844 my_length = 0; copied += to_copy; 4dfc8: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4dfcc: 42a7 clrl %sp@- 4dfce: 486e fff8 pea %fp@(-8) 4dfd2: 4eb9 0004 315c jsr 4315c 4dfd8: 222e fff8 movel %fp@(-8),%d1 return copied; 4dfdc: 508f addql #8,%sp 4dfde: 2004 movel %d4,%d0 memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4dfe0: 2541 0042 movel %d1,%a2@(66) 4dfe4: 2541 0046 movel %d1,%a2@(70) return copied; } 4dfe8: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 4dfee: 4e5e unlk %fp 4dff0: 4e75 rts unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 4dff2: 262e 0014 movel %fp@(20),%d3 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 4dff6: 2c0c movel %a4,%d6 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); if ( status ) return status; } copied = 0; 4dff8: 4284 clrl %d4 4dffa: 6000 ff62 braw 4df5e last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 4dffe: 2f08 movel %a0,%sp@- * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; 4e000: b484 cmpl %d4,%d2 4e002: 6606 bnes 4e00a <== NEVER TAKEN 4e004: b685 cmpl %d5,%d3 4e006: 52c4 shi %d4 4e008: 6002 bras 4e00c 4e00a: 5ec4 sgt %d4 <== NOT EXECUTED status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 4e00c: 2f00 movel %d0,%sp@- * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; 4e00e: 49c4 extbl %d4 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 4e010: 4484 negl %d4 4e012: 2f04 movel %d4,%sp@- 4e014: 2f0a movel %a2,%sp@- 4e016: 4eb9 0004 dd20 jsr 4dd20 if ( status ) 4e01c: 4fef 0010 lea %sp@(16),%sp 4e020: 4a80 tstl %d0 4e022: 66c4 bnes 4dfe8 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4e024: 2e39 0006 06cc movel 606cc ,%d7 4e02a: 2a07 movel %d7,%d5 4e02c: 5bc4 smi %d4 4e02e: 49c4 extbl %d4 4e030: 2f05 movel %d5,%sp@- 4e032: 2f04 movel %d4,%sp@- 4e034: 2f03 movel %d3,%sp@- 4e036: 2f02 movel %d2,%sp@- 4e038: 4eb9 0005 badc jsr 5badc <__moddi3> 4e03e: 4fef 0010 lea %sp@(16),%sp 4e042: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4e044: 2f05 movel %d5,%sp@- 4e046: 2f04 movel %d4,%sp@- 4e048: 2f03 movel %d3,%sp@- 4e04a: 2f02 movel %d2,%sp@- 4e04c: 4eb9 0005 b67c jsr 5b67c <__divdi3> 4e052: 4fef 0010 lea %sp@(16),%sp 4e056: 2401 movel %d1,%d2 if ( start_offset ) { 4e058: 4a8b tstl %a3 4e05a: 6600 feba bnew 4df16 4e05e: 6092 bras 4dff2 IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 4e060: 2004 movel %d4,%d0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4e062: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4e068: 4e5e unlk %fp <== NOT EXECUTED 4e06a: 4e75 rts <== NOT EXECUTED 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 ); if ( !block_ptr ) return copied; 4e06c: 4280 clrl %d0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4e06e: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4e074: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004293c : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 4293c: 4e56 ffd8 linkw %fp,#-40 42940: 222e 0014 movel %fp@(20),%d1 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 42944: 2001 movel %d1,%d0 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 42946: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 4294a: 0280 0000 f000 andil #61440,%d0 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 42950: 246e 0008 moveal %fp@(8),%a2 42954: 242e 0018 movel %fp@(24),%d2 42958: 206e 001c moveal %fp@(28),%a0 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 4295c: 0c80 0000 4000 cmpil #16384,%d0 42962: 6700 009c beqw 42a00 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { 42966: 0c80 0000 8000 cmpil #32768,%d0 4296c: 6700 0096 beqw 42a04 *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 42970: 0c80 0000 6000 cmpil #24576,%d0 42976: 6774 beqs 429ec 42978: 0c80 0000 2000 cmpil #8192,%d0 4297e: 676c beqs 429ec rtems_filesystem_split_dev_t( dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { 42980: 0c80 0000 1000 cmpil #4096,%d0 42986: 6772 beqs 429fa <== ALWAYS TAKEN 42988: 486e ffec pea %fp@(-20) size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 4298c: 206a 0014 moveal %a2@(20),%a0 (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 42990: 2f01 movel %d1,%sp@- 42992: 2f2e 0010 movel %fp@(16),%sp@- 42996: 2f2e 000c movel %fp@(12),%sp@- 4299a: 2068 0008 moveal %a0@(8),%a0 4299e: 2f30 9c08 movel %a0@(00000008,%a1:l:4),%sp@- 429a2: 2f0a movel %a2,%sp@- 429a4: 4eb9 0004 b17a jsr 4b17a IMFS_jnode_t *new_node; get_type_and_info_by_mode_and_dev( mode, dev, &type, &info ); new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { 429aa: 4fef 0018 lea %sp@(24),%sp 429ae: 4a80 tstl %d0 429b0: 675a beqs 42a0c IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); 429b2: 42a7 clrl %sp@- get_type_and_info_by_mode_and_dev( mode, dev, &type, &info ); new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = parentloc->node_access; 429b4: 246a 0008 moveal %a2@(8),%a2 IMFS_update_ctime( parent ); 429b8: 240e movel %fp,%d2 429ba: 0682 ffff ffe4 addil #-28,%d2 429c0: 47f9 0004 315c lea 4315c ,%a3 429c6: 2f02 movel %d2,%sp@- 429c8: 4e93 jsr %a3@ 429ca: 256e ffe4 0046 movel %fp@(-28),%a2@(70) IMFS_update_mtime( parent ); 429d0: 42a7 clrl %sp@- 429d2: 2f02 movel %d2,%sp@- 429d4: 4e93 jsr %a3@ 429d6: 256e ffe4 0042 movel %fp@(-28),%a2@(66) 429dc: 4fef 0010 lea %sp@(16),%sp size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 429e0: 4280 clrl %d0 } else { rv = -1; } return rv; } 429e2: 4cee 0c04 ffd8 moveml %fp@(-40),%d2/%a2-%a3 429e8: 4e5e unlk %fp 429ea: 4e75 rts *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( 429ec: 2d42 ffec movel %d2,%fp@(-20) if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { *type = IMFS_DEVICE; 429f0: 327c 0001 moveaw #1,%a1 rtems_filesystem_split_dev_t( 429f4: 2d48 fff0 movel %a0,%fp@(-16) 429f8: 608e bras 42988 dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { *type = IMFS_FIFO; 429fa: 327c 0006 moveaw #6,%a1 429fe: 6088 bras 42988 IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; 42a00: 93c9 subal %a1,%a1 42a02: 6084 bras 42988 } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; 42a04: 327c 0004 moveaw #4,%a1 42a08: 6000 ff7e braw 42988 IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; 42a0c: 70ff moveq #-1,%d0 } return rv; } 42a0e: 4cee 0c04 ffd8 moveml %fp@(-40),%d2/%a2-%a3 42a14: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a18 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42a18: 4e56 0000 linkw %fp,#0 42a1c: 226e 0008 moveal %fp@(8),%a1 int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 42a20: 2069 0020 moveal %a1@(32),%a0 42a24: 2068 0008 moveal %a0@(8),%a0 #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42a28: 2f0a movel %a2,%sp@- int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { 42a2a: 2468 004a moveal %a0@(74),%a2 42a2e: 4a92 tstl %a2@ 42a30: 662a bnes 42a5c if ( node->info.directory.mt_fs == NULL ) { 42a32: 4aa8 005a tstl %a0@(90) 42a36: 660e bnes 42a46 <== NEVER TAKEN node->info.directory.mt_fs = mt_entry; 42a38: 2149 005a movel %a1,%a0@(90) errno = ENOTDIR; rv = -1; } return rv; } 42a3c: 246e fffc moveal %fp@(-4),%a2 #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 42a40: 4280 clrl %d0 errno = ENOTDIR; rv = -1; } return rv; } 42a42: 4e5e unlk %fp 42a44: 4e75 rts if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 42a46: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42a4c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 42a50: 2040 moveal %d0,%a0 <== NOT EXECUTED 42a52: 7210 moveq #16,%d1 <== NOT EXECUTED rv = -1; 42a54: 70ff moveq #-1,%d0 <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42a56: 4e5e unlk %fp <== NOT EXECUTED if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 42a58: 2081 movel %d1,%a0@ <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42a5a: 4e75 rts <== NOT EXECUTED } else { errno = EBUSY; rv = -1; } } else { errno = ENOTDIR; 42a5c: 4eb9 0004 f024 jsr 4f024 <__errno> rv = -1; } return rv; } 42a62: 246e fffc moveal %fp@(-4),%a2 } else { errno = EBUSY; rv = -1; } } else { errno = ENOTDIR; 42a66: 2040 moveal %d0,%a0 42a68: 7214 moveq #20,%d1 rv = -1; 42a6a: 70ff moveq #-1,%d0 } return rv; } 42a6c: 4e5e unlk %fp } else { errno = EBUSY; rv = -1; } } else { errno = ENOTDIR; 42a6e: 2081 movel %d1,%a0@ rv = -1; } return rv; } ... =============================================================================== 0004b632 : } static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { 4b632: 4e56 0000 linkw %fp,#0 4b636: 206e 0008 moveal %fp@(8),%a0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4b63a: 2008 movel %a0,%d0 4b63c: 0680 0000 0052 addil #82,%d0 if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 4b642: b0a8 004e cmpl %a0@(78),%d0 4b646: 660c bnes 4b654 errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { 4b648: 4aa8 005a tstl %a0@(90) 4b64c: 661a bnes 4b668 <== NEVER TAKEN errno = EBUSY; node = NULL; } return node; } 4b64e: 2008 movel %a0,%d0 4b650: 4e5e unlk %fp 4b652: 4e75 rts static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; 4b654: 4eb9 0004 f024 jsr 4f024 <__errno> 4b65a: 725a moveq #90,%d1 4b65c: 2240 moveal %d0,%a1 node = NULL; 4b65e: 91c8 subal %a0,%a0 errno = EBUSY; node = NULL; } return node; } 4b660: 2008 movel %a0,%d0 4b662: 4e5e unlk %fp static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; 4b664: 2281 movel %d1,%a1@ errno = EBUSY; node = NULL; } return node; } 4b666: 4e75 rts { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { errno = EBUSY; 4b668: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED 4b66e: 91c8 subal %a0,%a0 <== NOT EXECUTED 4b670: 2240 moveal %d0,%a1 <== NOT EXECUTED 4b672: 7010 moveq #16,%d0 <== NOT EXECUTED node = NULL; } return node; } 4b674: 4e5e unlk %fp <== NOT EXECUTED { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { errno = EBUSY; 4b676: 2280 movel %d0,%a1@ <== NOT EXECUTED node = NULL; } return node; } 4b678: 2008 movel %a0,%d0 <== NOT EXECUTED =============================================================================== 00042a74 : { const IMFS_jnode_t *node = loc->node_access; IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { 42a74: 7202 moveq #2,%d1 #include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ) { 42a76: 4e56 0000 linkw %fp,#0 42a7a: 206e 0008 moveal %fp@(8),%a0 const IMFS_jnode_t *node = loc->node_access; 42a7e: 2068 0008 moveal %a0@(8),%a0 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 42a82: 2268 004a moveal %a0@(74),%a1 42a86: 2011 movel %a1@,%d0 IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { 42a88: b280 cmpl %d0,%d1 42a8a: 6712 beqs 42a9e 42a8c: 123c 0005 moveb #5,%d1 42a90: b280 cmpl %d0,%d1 42a92: 6704 beqs 42a98 <== NEVER TAKEN type = imfs_type; break; } return type; } 42a94: 4e5e unlk %fp 42a96: 4e75 rts switch ( imfs_type ) { case IMFS_HARD_LINK: type = IMFS_type( node->info.hard_link.link_node ); break; case IMFS_LINEAR_FILE: type = RTEMS_FILESYSTEM_MEMORY_FILE; 42a98: 7004 moveq #4,%d0 <== NOT EXECUTED type = imfs_type; break; } return type; } 42a9a: 4e5e unlk %fp <== NOT EXECUTED 42a9c: 4e75 rts <== NOT EXECUTED 42a9e: 2068 004e moveal %a0@(78),%a0 42aa2: 4e5e unlk %fp 42aa4: 2068 004a moveal %a0@(74),%a0 42aa8: 2010 movel %a0@,%d0 <== NOT EXECUTED =============================================================================== 00042aac : ssize_t IMFS_readlink( const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize ) { 42aac: 4e56 fff4 linkw %fp,#-12 IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 42ab0: 206e 0008 moveal %fp@(8),%a0 ssize_t IMFS_readlink( const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize ) { 42ab4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42ab8: 266e 000c moveal %fp@(12),%a3 42abc: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 42ac0: 2468 0008 moveal %a0@(8),%a2 IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42ac4: 672a beqs 42af0 <== NEVER TAKEN 42ac6: 206a 004e moveal %a2@(78),%a0 42aca: 1210 moveb %a0@,%d1 42acc: 6722 beqs 42af0 <== NEVER TAKEN 42ace: 91c8 subal %a0,%a0 42ad0: 4280 clrl %d0 42ad2: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 42ad4: 1781 8800 moveb %d1,%a3@(00000000,%a0:l) node = loc->node_access; IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42ad8: 2040 moveal %d0,%a0 42ada: b480 cmpl %d0,%d2 42adc: 670a beqs 42ae8 42ade: 226a 004e moveal %a2@(78),%a1 42ae2: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 42ae6: 66ea bnes 42ad2 buf[i] = node->info.sym_link.name[i]; return i; } 42ae8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 42aec: 4e5e unlk %fp 42aee: 4e75 rts node = loc->node_access; IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42af0: 4280 clrl %d0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 42af2: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 <== NOT EXECUTED 42af6: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042afc : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 42afc: 4e56 ffe8 linkw %fp,#-24 int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 42b00: 206e 000c moveal %fp@(12),%a0 const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 42b04: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 42b08: 2468 0008 moveal %a0@(8),%a2 IMFS_jnode_t *new_parent = newparentloc->node_access; 42b0c: 206e 0010 moveal %fp@(16),%a0 const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 42b10: 242e 0018 movel %fp@(24),%d2 int rv = 0; IMFS_jnode_t *node = oldloc->node_access; IMFS_jnode_t *new_parent = newparentloc->node_access; 42b14: 2668 0008 moveal %a0@(8),%a3 /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 42b18: 4aaa 0008 tstl %a2@(8) 42b1c: 677a beqs 42b98 <== NEVER TAKEN if ( namelen < IMFS_NAME_MAX ) { 42b1e: 701f moveq #31,%d0 42b20: b082 cmpl %d2,%d0 42b22: 655c bcss 42b80 <== NEVER TAKEN memcpy( node->name, name, namelen ); 42b24: 2f02 movel %d2,%sp@- 42b26: 2f2e 0014 movel %fp@(20),%sp@- 42b2a: 486a 000c pea %a2@(12) 42b2e: 4eb9 0004 f844 jsr 4f844 node->name [namelen] = '\0'; 42b34: 4200 clrb %d0 42b36: 1580 280c moveb %d0,%a2@(0000000c,%d2:l) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 42b3a: 226a 0004 moveal %a2@(4),%a1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 42b3e: 2852 moveal %a2@,%a4 previous = the_node->previous; next->previous = previous; 42b40: 2949 0004 movel %a1,%a4@(4) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 42b44: 206b 0056 moveal %a3@(86),%a0 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 42b48: 228c movel %a4,%a1@ RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 42b4a: 43eb 0052 lea %a3@(82),%a1 static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; 42b4e: 254b 0008 movel %a3,%a2@(8) 42b52: 2489 movel %a1,%a2@ Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 42b54: 274a 0056 movel %a2,%a3@(86) old_last->next = the_node; 42b58: 208a movel %a2,%a0@ the_node->previous = old_last; 42b5a: 2548 0004 movel %a0,%a2@(4) IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 42b5e: 42a7 clrl %sp@- 42b60: 486e fff8 pea %fp@(-8) 42b64: 4eb9 0004 315c jsr 4315c 42b6a: 256e fff8 0046 movel %fp@(-8),%a2@(70) 42b70: 4fef 0014 lea %sp@(20),%sp const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 42b74: 4280 clrl %d0 errno = EINVAL; rv = -1; } return rv; } 42b76: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4 42b7c: 4e5e unlk %fp 42b7e: 4e75 rts IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; 42b80: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED 42b86: 745b moveq #91,%d2 <== NOT EXECUTED 42b88: 2040 moveal %d0,%a0 <== NOT EXECUTED rv = -1; 42b8a: 70ff moveq #-1,%d0 <== NOT EXECUTED IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; 42b8c: 2082 movel %d2,%a0@ <== NOT EXECUTED errno = EINVAL; rv = -1; } return rv; } 42b8e: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4 <== NOT EXECUTED 42b94: 4e5e unlk %fp <== NOT EXECUTED 42b96: 4e75 rts <== NOT EXECUTED } else { errno = ENAMETOOLONG; rv = -1; } } else { errno = EINVAL; 42b98: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED 42b9e: 7216 moveq #22,%d1 <== NOT EXECUTED 42ba0: 2040 moveal %d0,%a0 <== NOT EXECUTED rv = -1; 42ba2: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 42ba4: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4 <== NOT EXECUTED } else { errno = ENAMETOOLONG; rv = -1; } } else { errno = EINVAL; 42baa: 2081 movel %d1,%a0@ <== NOT EXECUTED rv = -1; } return rv; } 42bac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b574 : static int IMFS_stat_device( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b574: 4e56 0000 linkw %fp,#0 4b578: 226e 0008 moveal %fp@(8),%a1 4b57c: 2f0a movel %a2,%sp@- const IMFS_jnode_t *node = loc->node_access; 4b57e: 2469 0008 moveal %a1@(8),%a2 static int IMFS_stat_device( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b582: 206e 000c moveal %fp@(12),%a0 const IMFS_jnode_t *node = loc->node_access; const IMFS_device_t *io = &node->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b586: 202a 0052 movel %a2@(82),%d0 4b58a: 216a 004e 0016 movel %a2@(78),%a0@(22) return IMFS_stat( loc, buf ); } 4b590: 245f moveal %sp@+,%a2 4b592: 4e5e unlk %fp ) { const IMFS_jnode_t *node = loc->node_access; const IMFS_device_t *io = &node->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b594: 2140 001a movel %d0,%a0@(26) return IMFS_stat( loc, buf ); 4b598: 4ef9 0004 b7f4 jmp 4b7f4 ... =============================================================================== 0004b7bc : static int IMFS_stat_file( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b7bc: 4e56 0000 linkw %fp,#0 4b7c0: 226e 0008 moveal %fp@(8),%a1 4b7c4: 2f0a movel %a2,%sp@- const IMFS_jnode_t *node = loc->node_access; buf->st_size = node->info.file.size; 4b7c6: 2469 0008 moveal %a1@(8),%a2 static int IMFS_stat_file( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b7ca: 206e 000c moveal %fp@(12),%a0 const IMFS_jnode_t *node = loc->node_access; buf->st_size = node->info.file.size; 4b7ce: 202a 004e movel %a2@(78),%d0 4b7d2: 222a 0052 movel %a2@(82),%d1 buf->st_blksize = imfs_rq_memfile_bytes_per_block; 4b7d6: 45f9 0005 f7ac lea 5f7ac ,%a2 4b7dc: 2152 003e movel %a2@,%a0@(62) return IMFS_stat( loc, buf ); } 4b7e0: 245f moveal %sp@+,%a2 4b7e2: 4e5e unlk %fp struct stat *buf ) { const IMFS_jnode_t *node = loc->node_access; buf->st_size = node->info.file.size; 4b7e4: 2140 001e movel %d0,%a0@(30) 4b7e8: 2141 0022 movel %d1,%a0@(34) buf->st_blksize = imfs_rq_memfile_bytes_per_block; return IMFS_stat( loc, buf ); 4b7ec: 4ef9 0004 b7f4 jmp 4b7f4 ... =============================================================================== 00042ca0 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42ca0: 4e56 0000 linkw %fp,#0 42ca4: 226e 0008 moveal %fp@(8),%a1 int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 42ca8: 2069 0020 moveal %a1@(32),%a0 42cac: 2068 0008 moveal %a0@(8),%a0 #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42cb0: 2f0a movel %a2,%sp@- int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { 42cb2: 2468 004a moveal %a0@(74),%a2 42cb6: 4a92 tstl %a2@ 42cb8: 662a bnes 42ce4 <== NEVER TAKEN if ( node->info.directory.mt_fs == mt_entry ) { 42cba: b3e8 005a cmpal %a0@(90),%a1 42cbe: 660e bnes 42cce <== NEVER TAKEN node->info.directory.mt_fs = NULL; 42cc0: 42a8 005a clrl %a0@(90) errno = ENOTDIR; rv = -1; } return rv; } 42cc4: 246e fffc moveal %fp@(-4),%a2 #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 42cc8: 4280 clrl %d0 errno = ENOTDIR; rv = -1; } return rv; } 42cca: 4e5e unlk %fp 42ccc: 4e75 rts if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 42cce: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42cd4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 42cd8: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cda: 7216 moveq #22,%d1 <== NOT EXECUTED rv = -1; 42cdc: 70ff moveq #-1,%d0 <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42cde: 4e5e unlk %fp <== NOT EXECUTED if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 42ce0: 2081 movel %d1,%a0@ <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42ce2: 4e75 rts <== NOT EXECUTED } else { errno = EINVAL; rv = -1; } } else { errno = ENOTDIR; 42ce4: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED rv = -1; } return rv; } 42cea: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED } else { errno = EINVAL; rv = -1; } } else { errno = ENOTDIR; 42cee: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cf0: 7214 moveq #20,%d1 <== NOT EXECUTED rv = -1; 42cf2: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 42cf4: 4e5e unlk %fp <== NOT EXECUTED } else { errno = EINVAL; rv = -1; } } else { errno = ENOTDIR; 42cf6: 2081 movel %d1,%a0@ <== NOT EXECUTED rv = -1; } return rv; } ... =============================================================================== 00043334 : void RTEMS_Malloc_Initialize( const Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { 43334: 4e56 ffe8 linkw %fp,#-24 43338: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4333c: 282e 000c movel %fp@(12),%d4 43340: 2a2e 0010 movel %fp@(16),%d5 Heap_Control *heap = RTEMS_Malloc_Heap; 43344: 2639 0005 f76c movel 5f76c ,%d3 if ( !rtems_configuration_get_unified_work_area() ) { 4334a: 4a39 0005 d985 tstb 5d985 43350: 6638 bnes 4338a Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t page_size = CPU_HEAP_ALIGNMENT; size_t i; for (i = 0; i < area_count; ++i) { 43352: 4a84 tstl %d4 43354: 6764 beqs 433ba 43356: 246e 0008 moveal %fp@(8),%a2 4335a: 4282 clrl %d2 4335c: 47f9 0004 8708 lea 48708 <_Heap_Initialize>,%a3 const Heap_Area *area = &areas [i]; uintptr_t space_available = (*init_or_extend)( 43362: 4878 0004 pea 4 43366: 2f2a 0004 movel %a2@(4),%sp@- 4336a: 2f12 movel %a2@,%sp@- 4336c: 2f03 movel %d3,%sp@- 4336e: 4e93 jsr %a3@ area->begin, area->size, page_size ); if ( space_available > 0 ) { 43370: 4fef 0010 lea %sp@(16),%sp 43374: 4a80 tstl %d0 43376: 6702 beqs 4337a <== NEVER TAKEN init_or_extend = extend; 43378: 2645 moveal %d5,%a3 if ( !rtems_configuration_get_unified_work_area() ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t page_size = CPU_HEAP_ALIGNMENT; size_t i; for (i = 0; i < area_count; ++i) { 4337a: 5282 addql #1,%d2 4337c: 508a addql #8,%a2 4337e: b882 cmpl %d2,%d4 43380: 66e0 bnes 43362 <== NEVER TAKEN if ( space_available > 0 ) { init_or_extend = extend; } } if ( init_or_extend == _Heap_Initialize ) { 43382: b7fc 0004 8708 cmpal #296712,%a3 43388: 6730 beqs 433ba <== NEVER TAKEN } /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 4338a: 2079 0005 fea0 moveal 5fea0 ,%a0 43390: 4a88 tstl %a0 43392: 6704 beqs 43398 (*rtems_malloc_statistics_helpers->initialize)(); 43394: 2050 moveal %a0@,%a0 43396: 4e90 jsr %a0@ } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); 43398: 2439 0006 0edc movel 60edc ,%d2 4339e: 2f03 movel %d3,%sp@- 433a0: 4eb9 0004 9278 jsr 49278 <_Protected_heap_Get_size> 433a6: 588f addql #4,%sp 433a8: d082 addl %d2,%d0 } 433aa: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); 433b0: 23c0 0006 0edc movel %d0,60edc } 433b6: 4e5e unlk %fp 433b8: 4e75 rts init_or_extend = extend; } } if ( init_or_extend == _Heap_Initialize ) { _Internal_error_Occurred( 433ba: 4878 0017 pea 17 433be: 4878 0001 pea 1 433c2: 42a7 clrl %sp@- 433c4: 4eb9 0004 8974 jsr 48974 <_Internal_error_Occurred> ... =============================================================================== 00063560 : /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 63560: 70ff moveq #-1,%d0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 63562: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 63566: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 6356a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 6356e: b08a cmpl %a2,%d0 <== NOT EXECUTED 63570: 6700 014c beqw 636be <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 63574: 262a 00ee movel %a2@(238),%d3 <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 63578: 47ea 00ae lea %a2@(174),%a3 <== NOT EXECUTED 6357c: 226a 00b2 moveal %a2@(178),%a1 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 63580: 2413 movel %a3@,%d2 <== 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++) 63582: 70fc moveq #-4,%d0 <== NOT EXECUTED stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 63584: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 6358a: 41e9 0020 lea %a1@(32),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 6358e: c082 andl %d2,%d0 <== NOT EXECUTED 63590: d088 addl %a0,%d0 <== NOT EXECUTED 63592: b088 cmpl %a0,%d0 <== NOT EXECUTED 63594: 6300 00ae blsw 63644 <== NOT EXECUTED if (*base != U32_PATTERN) 63598: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 6359e: b2a9 0020 cmpl %a1@(32),%d1 <== NOT EXECUTED 635a2: 6612 bnes 635b6 <== 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++) 635a4: 5888 addql #4,%a0 <== NOT EXECUTED 635a6: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 635a8: 6400 009a bccw 63644 <== NOT EXECUTED if (*base != U32_PATTERN) 635ac: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 635b2: b290 cmpl %a0@,%d1 <== NOT EXECUTED 635b4: 67ee beqs 635a4 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); 635b6: 49f1 2810 lea %a1@(00000010,%d2:l),%a4 <== NOT EXECUTED 635ba: 99c8 subal %a0,%a4 <== NOT EXECUTED else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 635bc: 4a8a tstl %a2 <== NOT EXECUTED 635be: 6700 008c beqw 6364c <== NOT EXECUTED #endif { (*print_handler)( 635c2: 486e fffb pea %fp@(-5) <== NOT EXECUTED 635c6: 4878 0005 pea 5 <== NOT EXECUTED 635ca: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 635ce: 2a79 000a 0864 moveal a0864 ,%a5 <== NOT EXECUTED 635d4: 4eb9 0004 ef4c jsr 4ef4c <== NOT EXECUTED 635da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 635dc: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 635e0: 4879 0009 8020 pea 98020 <== NOT EXECUTED 635e6: 2f39 000a 0860 movel a0860 ,%sp@- <== NOT EXECUTED 635ec: 4e95 jsr %a5@ <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 635ee: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( 635f2: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 635f6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 635f8: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 635fa: 2013 movel %a3@,%d0 <== NOT EXECUTED 635fc: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 635fe: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 63602: 2f08 movel %a0,%sp@- <== NOT EXECUTED 63604: 4879 0009 803b pea 9803b <== NOT EXECUTED 6360a: 2f39 000a 0860 movel a0860 ,%sp@- <== NOT EXECUTED 63610: 2079 000a 0864 moveal a0864 ,%a0 <== NOT EXECUTED 63616: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 63618: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 6361c: 4ab9 000a 085c tstl a085c <== NOT EXECUTED 63622: 6676 bnes 6369a <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 63624: 4879 0009 8059 pea 98059 <== NOT EXECUTED 6362a: 2f39 000a 0860 movel a0860 ,%sp@- <== NOT EXECUTED 63630: 2079 000a 0864 moveal a0864 ,%a0 <== NOT EXECUTED 63636: 4e90 jsr %a0@ <== NOT EXECUTED 63638: 508f addql #8,%sp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 6363a: 4cee 3c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a5 <== NOT EXECUTED 63640: 4e5e unlk %fp <== NOT EXECUTED 63642: 4e75 rts <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; 63644: 99cc subal %a4,%a4 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 63646: 4a8a tstl %a2 <== NOT EXECUTED 63648: 6600 ff78 bnew 635c2 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 6364c: 4878 ffff pea ffffffff <== NOT EXECUTED 63650: 4879 0009 802d pea 9802d <== NOT EXECUTED 63656: 2f39 000a 0860 movel a0860 ,%sp@- <== NOT EXECUTED 6365c: 2079 000a 0864 moveal a0864 ,%a0 <== NOT EXECUTED 63662: 4e90 jsr %a0@ <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 63664: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 63668: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } #endif (*print_handler)( 6366c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6366e: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 63670: 2013 movel %a3@,%d0 <== NOT EXECUTED 63672: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 63674: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 63678: 2f08 movel %a0,%sp@- <== NOT EXECUTED 6367a: 4879 0009 803b pea 9803b <== NOT EXECUTED 63680: 2f39 000a 0860 movel a0860 ,%sp@- <== NOT EXECUTED 63686: 2079 000a 0864 moveal a0864 ,%a0 <== NOT EXECUTED 6368c: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 6368e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 63692: 4ab9 000a 085c tstl a085c <== NOT EXECUTED 63698: 678a beqs 63624 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 6369a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 6369c: 4879 0009 8066 pea 98066 <== NOT EXECUTED 636a2: 2f39 000a 0860 movel a0860 ,%sp@- <== NOT EXECUTED 636a8: 2079 000a 0864 moveal a0864 ,%a0 <== NOT EXECUTED 636ae: 4e90 jsr %a0@ <== NOT EXECUTED 636b0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 636b4: 4cee 3c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a5 <== NOT EXECUTED 636ba: 4e5e unlk %fp <== NOT EXECUTED 636bc: 4e75 rts <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 636be: 2279 000a 1e24 moveal a1e24 ,%a1<== NOT EXECUTED 636c4: 4a89 tstl %a1 <== NOT EXECUTED 636c6: 6700 ff72 beqw 6363a <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 636ca: 47f9 000a 1e20 lea a1e20 ,%a3 <== NOT EXECUTED the_thread = 0; current = 0; 636d0: 4283 clrl %d3 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 636d2: 95ca subal %a2,%a2 <== NOT EXECUTED 636d4: 6000 feaa braw 63580 <== NOT EXECUTED =============================================================================== 000637b6 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 637b6: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 637ba: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 637be: 4879 0009 806c pea 9806c <== NOT EXECUTED 637c4: 47f9 0004 3cc0 lea 43cc0 ,%a3 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 637ca: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); 637ce: 286a 00b2 moveal %a2@(178),%a4 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 637d2: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 637d6: 4e93 jsr %a3@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 637d8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 637da: 4879 0009 807c pea 9807c <== NOT EXECUTED 637e0: 4e93 jsr %a3@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 637e2: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 637e6: 4879 0009 8099 pea 98099 <== NOT EXECUTED 637ec: 4e93 jsr %a3@ <== NOT EXECUTED printk( 637ee: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 637f2: 4879 0009 80ab pea 980ab <== NOT EXECUTED 637f8: 4e93 jsr %a3@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 637fa: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 637fe: 4878 0020 pea 20 <== NOT EXECUTED 63802: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 63806: 4eb9 0004 ef4c jsr 4ef4c <== NOT EXECUTED 6380c: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 63810: 2e80 movel %d0,%sp@ <== NOT EXECUTED 63812: 4879 0009 80bf pea 980bf <== NOT EXECUTED 63818: 4e93 jsr %a3@ <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 6381a: 206a 00b2 moveal %a2@(178),%a0 <== NOT EXECUTED 6381e: 202a 00ae movel %a2@(174),%d0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 63822: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 63826: 2f08 movel %a0,%sp@- <== NOT EXECUTED 63828: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6382a: 4879 0009 80d5 pea 980d5 <== NOT EXECUTED 63830: 4e93 jsr %a3@ <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 63832: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 63836: 4a02 tstb %d2 <== NOT EXECUTED 63838: 670e beqs 63848 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal( 6383a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 6383e: 4878 0009 pea 9 <== NOT EXECUTED 63842: 4eb9 0004 7960 jsr 47960 <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 63848: 486c 0018 pea %a4@(24) <== NOT EXECUTED 6384c: 486c 0008 pea %a4@(8) <== NOT EXECUTED 63850: 4878 0010 pea 10 <== NOT EXECUTED 63854: 4879 0009 8106 pea 98106 <== NOT EXECUTED 6385a: 4e93 jsr %a3@ <== NOT EXECUTED 6385c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal( 63860: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 63864: 4878 0009 pea 9 <== NOT EXECUTED 63868: 4eb9 0004 7960 jsr 47960 <== NOT EXECUTED =============================================================================== 0004d254 : * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; 4d254: 41f9 0006 2da4 lea 62da4 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4d25a: 4e56 0000 linkw %fp,#0 * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; 4d25e: 202e 0008 movel %fp@(8),%d0 4d262: 4c50 0001 remul %a0@,%d1,%d0 4d266: 4c50 0000 remul %a0@,%d0,%d0 if ( (microseconds % microseconds_per_tick) != 0 ) 4d26a: 4a81 tstl %d1 4d26c: 6702 beqs 4d270 <== ALWAYS TAKEN ticks += 1; 4d26e: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 4d270: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048d34 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 48d34: 4e56 0000 linkw %fp,#0 /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); 48d38: 2039 0005 ea54 movel 5ea54 ,%d0 #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 48d3e: 2f02 movel %d2,%sp@- /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); 48d40: 243c 0000 03e8 movel #1000,%d2 48d46: 4c42 0000 remul %d2,%d0,%d0 ticks = milliseconds / milliseconds_per_tick; 48d4a: 242e 0008 movel %fp@(8),%d2 48d4e: 4c40 2001 remul %d0,%d1,%d2 48d52: 4c40 2002 remul %d0,%d2,%d2 48d56: 2002 movel %d2,%d0 if ( (milliseconds % milliseconds_per_tick) != 0 ) 48d58: 4a81 tstl %d1 48d5a: 6702 beqs 48d5e <== ALWAYS TAKEN ticks += 1; 48d5c: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 48d5e: 241f movel %sp@+,%d2 48d60: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047f60 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 47f60: 4e56 0000 linkw %fp,#0 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 47f64: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 ++level; 47f6a: 5280 addql #1,%d0 47f6c: 206e 0008 moveal %fp@(8),%a0 _Thread_Dispatch_disable_level = level; 47f70: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> /* Dispatch is already disabled in SMP while lock is held. */ #if !defined(RTEMS_SMP) _Thread_Disable_dispatch(); #endif _CORE_mutex_Surrender( 47f76: 42a7 clrl %sp@- 47f78: 2f28 0008 movel %a0@(8),%sp@- 47f7c: 4868 0010 pea %a0@(16) 47f80: 4eb9 0004 82f0 jsr 482f0 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 47f86: 4fef 000c lea %sp@(12),%sp } 47f8a: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 47f8c: 4ef9 0004 9cd0 jmp 49cd0 <_Thread_Enable_dispatch> ... =============================================================================== 00047e3a <_API_extensions_Add_post_switch>: void _API_extensions_Add_post_switch( API_extensions_Post_switch_control *post_switch ) { 47e3a: 4e56 0000 linkw %fp,#0 47e3e: 206e 0008 moveal %fp@(8),%a0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); 47e42: 4a90 tstl %a0@ 47e44: 6704 beqs 47e4a <_API_extensions_Add_post_switch+0x10> _Chain_Append_if_is_off_chain_unprotected( &_API_extensions_Post_switch_list, &post_switch->Node ); } 47e46: 4e5e unlk %fp 47e48: 4e75 rts 47e4a: 4aa8 0004 tstl %a0@(4) 47e4e: 66f6 bnes 47e46 <_API_extensions_Add_post_switch+0xc><== NEVER TAKEN Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 47e50: 2279 0006 1062 moveal 61062 <_API_extensions_Post_switch_list+0x8>,%a1 47e56: 4e5e unlk %fp the_node->next = tail; 47e58: 20bc 0006 105e movel #397406,%a0@ tail->previous = the_node; 47e5e: 23c8 0006 1062 movel %a0,61062 <_API_extensions_Post_switch_list+0x8> old_last->next = the_node; 47e64: 2288 movel %a0,%a1@ the_node->previous = old_last; 47e66: 2149 0004 movel %a1,%a0@(4) =============================================================================== 00047e6c <_API_extensions_Run_postdriver>: } } #endif void _API_extensions_Run_postdriver( void ) { 47e6c: 4e56 0000 linkw %fp,#0 47e70: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 47e72: 2479 0006 110e moveal 6110e <_API_extensions_List>,%a2 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 47e78: b5fc 0006 1112 cmpal #397586,%a2 47e7e: 6710 beqs 47e90 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 47e80: 206a 0008 moveal %a2@(8),%a0 47e84: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 47e86: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 47e88: b5fc 0006 1112 cmpal #397586,%a2 47e8e: 66f0 bnes 47e80 <_API_extensions_Run_postdriver+0x14> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 47e90: 246e fffc moveal %fp@(-4),%a2 47e94: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a3cc <_CORE_RWLock_Obtain_for_writing>: * 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 ); 4a3cc: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 4a3d2: 4e56 fff4 linkw %fp,#-12 4a3d6: 206e 0008 moveal %fp@(8),%a0 4a3da: 48d7 001c moveml %d2-%d4,%sp@ 4a3de: 282e 000c movel %fp@(12),%d4 4a3e2: 262e 0014 movel %fp@(20),%d3 ISR_Level level; Thread_Control *executing = _Thread_Executing; 4a3e6: 2279 0006 4182 moveal 64182 <_Per_CPU_Information+0xe>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 4a3ec: 142e 0013 moveb %fp@(19),%d2 * 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 ); 4a3f0: 40c1 movew %sr,%d1 4a3f2: 8081 orl %d1,%d0 4a3f4: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 4a3f6: 4aa8 0044 tstl %a0@(68) 4a3fa: 6614 bnes 4a410 <_CORE_RWLock_Obtain_for_writing+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 4a3fc: 7002 moveq #2,%d0 4a3fe: 2140 0044 movel %d0,%a0@(68) _ISR_Enable( level ); 4a402: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4a404: 42a9 0034 clrl %a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4a408: 4cd7 001c moveml %sp@,%d2-%d4 4a40c: 4e5e unlk %fp 4a40e: 4e75 rts /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 4a410: 4a02 tstb %d2 4a412: 6610 bnes 4a424 <_CORE_RWLock_Obtain_for_writing+0x58> _ISR_Enable( level ); 4a414: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4a416: 7002 moveq #2,%d0 _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4a418: 4cd7 001c moveml %sp@,%d2-%d4 * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4a41c: 2340 0034 movel %d0,%a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4a420: 4e5e unlk %fp 4a422: 4e75 rts 4a424: 7001 moveq #1,%d0 4a426: 2140 0030 movel %d0,%a0@(48) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 4a42a: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 4a42e: 2344 0020 movel %d4,%a1@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 4a432: 2340 0030 movel %d0,%a1@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4a436: 42a9 0034 clrl %a1@(52) _ISR_Enable( level ); 4a43a: 46c1 movew %d1,%sr _Thread_queue_Enqueue_with_handler( 4a43c: 2d43 000c movel %d3,%fp@(12) 4a440: 203c 0004 a538 movel #304440,%d0 4a446: 2d48 0008 movel %a0,%fp@(8) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4a44a: 4cd7 001c moveml %sp@,%d2-%d4 executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 4a44e: 2d40 0010 movel %d0,%fp@(16) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4a452: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 4a454: 4ef9 0004 c340 jmp 4c340 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 0004a45c <_CORE_RWLock_Release>: * 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 ); 4a45c: 203c 0000 0700 movel #1792,%d0 #include CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 4a462: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 4a466: 2079 0006 4182 moveal 64182 <_Per_CPU_Information+0xe>,%a0 #include CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 4a46c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4a470: 246e 0008 moveal %fp@(8),%a2 * 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 ); 4a474: 40c1 movew %sr,%d1 4a476: 8081 orl %d1,%d0 4a478: 46c0 movew %d0,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 4a47a: 202a 0044 movel %a2@(68),%d0 4a47e: 6700 0090 beqw 4a510 <_CORE_RWLock_Release+0xb4> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 4a482: 7401 moveq #1,%d2 4a484: b480 cmpl %d0,%d2 4a486: 676e beqs 4a4f6 <_CORE_RWLock_Release+0x9a> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4a488: 42a8 0034 clrl %a0@(52) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 4a48c: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 4a490: 46c1 movew %d1,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 4a492: 2f0a movel %a2,%sp@- 4a494: 4eb9 0004 c1d0 jsr 4c1d0 <_Thread_queue_Dequeue> if ( next ) { 4a49a: 588f addql #4,%sp 4a49c: 4a80 tstl %d0 4a49e: 674a beqs 4a4ea <_CORE_RWLock_Release+0x8e> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 4a4a0: 7201 moveq #1,%d1 4a4a2: 2040 moveal %d0,%a0 4a4a4: b2a8 0030 cmpl %a0@(48),%d1 4a4a8: 677c beqs 4a526 <_CORE_RWLock_Release+0xca> /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 4a4aa: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 4a4ac: 52aa 0048 addql #1,%a2@(72) 4a4b0: 47f9 0004 c6f0 lea 4c6f0 <_Thread_queue_First>,%a3 next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 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 ); 4a4b6: 49f9 0004 c5a4 lea 4c5a4 <_Thread_queue_Extract>,%a4 /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 4a4bc: 2541 0044 movel %d1,%a2@(68) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 4a4c0: 2f0a movel %a2,%sp@- 4a4c2: 4e93 jsr %a3@ if ( !next || 4a4c4: 588f addql #4,%sp 4a4c6: 4a80 tstl %d0 4a4c8: 6720 beqs 4a4ea <_CORE_RWLock_Release+0x8e> 4a4ca: 7401 moveq #1,%d2 4a4cc: 2040 moveal %d0,%a0 4a4ce: b4a8 0030 cmpl %a0@(48),%d2 4a4d2: 6716 beqs 4a4ea <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 4a4d4: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 4a4d8: 2f00 movel %d0,%sp@- 4a4da: 2f0a movel %a2,%sp@- 4a4dc: 4e94 jsr %a4@ } 4a4de: 508f addql #8,%sp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 4a4e0: 2f0a movel %a2,%sp@- 4a4e2: 4e93 jsr %a3@ if ( !next || 4a4e4: 588f addql #4,%sp 4a4e6: 4a80 tstl %d0 4a4e8: 66e0 bnes 4a4ca <_CORE_RWLock_Release+0x6e> <== NEVER TAKEN } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4a4ea: 4280 clrl %d0 4a4ec: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4a4f2: 4e5e unlk %fp 4a4f4: 4e75 rts _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; 4a4f6: 202a 0048 movel %a2@(72),%d0 4a4fa: 5380 subql #1,%d0 4a4fc: 2540 0048 movel %d0,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 4a500: 6786 beqs 4a488 <_CORE_RWLock_Release+0x2c> /* must be unlocked again */ _ISR_Enable( level ); 4a502: 46c1 movew %d1,%sr } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4a504: 4280 clrl %d0 4a506: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4a50c: 4e5e unlk %fp 4a50e: 4e75 rts * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 4a510: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4a512: 103c 0002 moveb #2,%d0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4a516: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4a51c: 2140 0034 movel %d0,%a0@(52) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4a520: 4280 clrl %d0 4a522: 4e5e unlk %fp 4a524: 4e75 rts next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 4a526: 7002 moveq #2,%d0 4a528: 2540 0044 movel %d0,%a2@(68) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4a52c: 4280 clrl %d0 4a52e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4a534: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a538 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 4a538: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4a53c: 486e fffc pea %fp@(-4) 4a540: 2f2e 0008 movel %fp@(8),%sp@- 4a544: 4eb9 0004 be50 jsr 4be50 <_Thread_Get> switch ( location ) { 4a54a: 508f addql #8,%sp 4a54c: 4aae fffc tstl %fp@(-4) 4a550: 6618 bnes 4a56a <_CORE_RWLock_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4a552: 2f00 movel %d0,%sp@- 4a554: 4eb9 0004 c810 jsr 4c810 <_Thread_queue_Process_timeout> RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; --level; _Thread_Dispatch_disable_level = level; 4a55a: 588f addql #4,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4a55c: 2039 0006 3d3a movel 63d3a <_Thread_Dispatch_disable_level>,%d0 --level; 4a562: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 4a564: 23c0 0006 3d3a movel %d0,63d3a <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 4a56a: 4e5e unlk %fp ... =============================================================================== 00049004 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 49004: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4900a: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4900e: 2279 0006 2922 moveal 62922 <_Per_CPU_Information+0xe>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 49014: 48d7 001c moveml %d2-%d4,%sp@ 49018: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4901c: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 49020: 242e 000c movel %fp@(12),%d2 49024: 262e 0014 movel %fp@(20),%d3 49028: 282e 0018 movel %fp@(24),%d4 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4902c: 40c1 movew %sr,%d1 4902e: 8081 orl %d1,%d0 49030: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 49032: 2028 0048 movel %a0@(72),%d0 49036: 5280 addql #1,%d0 49038: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4903c: 4aa8 0040 tstl %a0@(64) 49040: 6606 bnes 49048 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == 49042: b0a8 0044 cmpl %a0@(68),%d0 49046: 672e beqs 49076 <_CORE_barrier_Wait+0x72> 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; 49048: 7001 moveq #1,%d0 4904a: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4904e: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 49052: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 49056: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 49058: 2d43 000c movel %d3,%fp@(12) 4905c: 203c 0004 b558 movel #308568,%d0 49062: 2d48 0008 movel %a0,%fp@(8) } 49066: 4cd7 001c moveml %sp@,%d2-%d4 _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4906a: 2d40 0010 movel %d0,%fp@(16) } 4906e: 4e5e unlk %fp _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 49070: 4ef9 0004 b188 jmp 4b188 <_Thread_queue_Enqueue_with_handler> _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 49076: 7001 moveq #1,%d0 49078: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4907c: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4907e: 2d44 0010 movel %d4,%fp@(16) 49082: 2d42 000c movel %d2,%fp@(12) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 49086: 4cd7 001c moveml %sp@,%d2-%d4 if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4908a: 2d48 0008 movel %a0,%fp@(8) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 4908e: 4e5e unlk %fp if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 49090: 4ef9 0004 df18 jmp 4df18 <_CORE_barrier_Release> ... =============================================================================== 00055c28 <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 55c28: 4e56 0000 linkw %fp,#0 55c2c: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 55c2e: 2f2e 0010 movel %fp@(16),%sp@- 55c32: 2f2e 000c movel %fp@(12),%sp@- void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 55c36: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 55c3a: 2f0a movel %a2,%sp@- 55c3c: 4eb9 0005 01e0 jsr 501e0 <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 55c42: 4fef 000c lea %sp@(12),%sp 55c46: 4aaa 0048 tstl %a2@(72) 55c4a: 6612 bnes 55c5e <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 55c4c: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 55c52: 246e fffc moveal %fp@(-4),%a2 55c56: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 55c58: 4ef9 0005 0ac0 jmp 50ac0 <_Workspace_Free> * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 55c5e: 2f0a movel %a2,%sp@- 55c60: 4eb9 0005 5c7c jsr 55c7c <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 55c66: 2d6a 005c 0008 movel %a2@(92),%fp@(8) * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 55c6c: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 55c6e: 246e fffc moveal %fp@(-4),%a2 55c72: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 55c74: 4ef9 0005 0ac0 jmp 50ac0 <_Workspace_Free> ... =============================================================================== 00055b90 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 55b90: 4e56 fff4 linkw %fp,#-12 55b94: 226e 000c moveal %fp@(12),%a1 55b98: 202e 0010 movel %fp@(16),%d0 55b9c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 55ba0: 206e 0008 moveal %fp@(8),%a0 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 55ba4: 2340 0008 movel %d0,%a1@(8) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { 55ba8: 0c80 7fff ffff cmpil #2147483647,%d0 55bae: 6700 0082 beqw 55c32 <_CORE_message_queue_Insert_message+0xa2> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 55bb2: 0c80 8000 0000 cmpil #-2147483648,%d0 55bb8: 6700 00ae beqw 55c68 <_CORE_message_queue_Insert_message+0xd8> RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 55bbc: 2208 movel %a0,%d1 55bbe: 0681 0000 0054 addil #84,%d1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 55bc4: 2468 0050 moveal %a0@(80),%a2 int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = _Chain_First( the_header ); while ( !_Chain_Is_tail( the_header, the_node ) ) { 55bc8: b5c1 cmpal %d1,%a2 55bca: 6712 beqs 55bde <_CORE_message_queue_Insert_message+0x4e> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 55bcc: b0aa 0008 cmpl %a2@(8),%d0 55bd0: 6d0c blts 55bde <_CORE_message_queue_Insert_message+0x4e> the_node = the_node->next; 55bd2: 2452 moveal %a2@,%a2 int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = _Chain_First( the_header ); while ( !_Chain_Is_tail( the_header, the_node ) ) { 55bd4: b5c1 cmpal %d1,%a2 55bd6: 6706 beqs 55bde <_CORE_message_queue_Insert_message+0x4e> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 55bd8: b0aa 0008 cmpl %a2@(8),%d0 55bdc: 6cf4 bges 55bd2 <_CORE_message_queue_Insert_message+0x42> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 55bde: 203c 0000 0700 movel #1792,%d0 55be4: 40c1 movew %sr,%d1 55be6: 8081 orl %d1,%d0 55be8: 46c0 movew %d0,%sr SET_NOTIFY(); 55bea: 2028 0048 movel %a0@(72),%d0 the_message_queue->number_of_pending_messages++; 55bee: 2400 movel %d0,%d2 55bf0: 5282 addql #1,%d2 continue; } break; } _ISR_Disable( level ); SET_NOTIFY(); 55bf2: 4a80 tstl %d0 55bf4: 57c0 seq %d0 the_message_queue->number_of_pending_messages++; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 55bf6: 246a 0004 moveal %a2@(4),%a2 continue; } break; } _ISR_Disable( level ); SET_NOTIFY(); 55bfa: 4480 negl %d0 the_message_queue->number_of_pending_messages++; 55bfc: 2142 0048 movel %d2,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55c00: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 55c02: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 55c06: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 55c08: 2749 0004 movel %a1,%a3@(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; 55c0c: 228b movel %a3,%a1@ _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 55c0e: 46c1 movew %d1,%sr /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 55c10: 4a00 tstb %d0 55c12: 6716 beqs 55c2a <_CORE_message_queue_Insert_message+0x9a> 55c14: 2268 0060 moveal %a0@(96),%a1 55c18: 4a89 tstl %a1 55c1a: 670e beqs 55c2a <_CORE_message_queue_Insert_message+0x9a> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 55c1c: 2d68 0064 0008 movel %a0@(100),%fp@(8) #endif } 55c22: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 55c26: 4e5e unlk %fp * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 55c28: 4ed1 jmp %a1@ #endif } 55c2a: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 55c2e: 4e5e unlk %fp 55c30: 4e75 rts else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); 55c32: 203c 0000 0700 movel #1792,%d0 55c38: 40c1 movew %sr,%d1 55c3a: 8081 orl %d1,%d0 55c3c: 46c0 movew %d0,%sr SET_NOTIFY(); 55c3e: 2028 0048 movel %a0@(72),%d0 the_message_queue->number_of_pending_messages++; 55c42: 2400 movel %d0,%d2 55c44: 5282 addql #1,%d2 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 55c46: 47e8 0054 lea %a0@(84),%a3 _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); 55c4a: 4a80 tstl %d0 55c4c: 57c0 seq %d0 the_message_queue->number_of_pending_messages++; 55c4e: 2142 0048 movel %d2,%a0@(72) Chain_Node *old_last = tail->previous; 55c52: 2468 0058 moveal %a0@(88),%a2 _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); 55c56: 4480 negl %d0 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 55c58: 228b movel %a3,%a1@ Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 55c5a: 2149 0058 movel %a1,%a0@(88) old_last->next = the_node; 55c5e: 2489 movel %a1,%a2@ the_node->previous = old_last; 55c60: 234a 0004 movel %a2,%a1@(4) the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55c64: 46c1 movew %d1,%sr 55c66: 60a8 bras 55c10 <_CORE_message_queue_Insert_message+0x80> } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 55c68: 203c 0000 0700 movel #1792,%d0 55c6e: 40c1 movew %sr,%d1 55c70: 8081 orl %d1,%d0 55c72: 46c0 movew %d0,%sr SET_NOTIFY(); 55c74: 2028 0048 movel %a0@(72),%d0 the_message_queue->number_of_pending_messages++; 55c78: 2400 movel %d0,%d2 55c7a: 5282 addql #1,%d2 RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); 55c7c: 47e8 0050 lea %a0@(80),%a3 the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); 55c80: 4a80 tstl %d0 55c82: 57c0 seq %d0 the_message_queue->number_of_pending_messages++; 55c84: 2142 0048 movel %d2,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55c88: 2468 0050 moveal %a0@(80),%a2 the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); 55c8c: 4480 negl %d0 RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); 55c8e: 234b 0004 movel %a3,%a1@(4) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; 55c92: 2149 0050 movel %a1,%a0@(80) the_node->next = before_node; before_node->previous = the_node; 55c96: 2549 0004 movel %a1,%a2@(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; 55c9a: 228a movel %a2,%a1@ the_message_queue->number_of_pending_messages++; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55c9c: 46c1 movew %d1,%sr 55c9e: 6000 ff70 braw 55c10 <_CORE_message_queue_Insert_message+0x80> ... =============================================================================== 000508f0 <_CORE_message_queue_Seize>: CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 508f0: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 508f6: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 508fa: 2279 0006 abc6 moveal 6abc6 <_Per_CPU_Information+0xe>,%a1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 50900: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 50904: 246e 0008 moveal %fp@(8),%a2 50908: 286e 000c moveal %fp@(12),%a4 5090c: 262e 0010 movel %fp@(16),%d3 50910: 206e 0014 moveal %fp@(20),%a0 50914: 2a2e 001c movel %fp@(28),%d5 50918: 182e 001b moveb %fp@(27),%d4 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5091c: 42a9 0034 clrl %a1@(52) _ISR_Disable( level ); 50920: 40c1 movew %sr,%d1 50922: 8081 orl %d1,%d0 50924: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 50926: 240a movel %a2,%d2 50928: 200a movel %a2,%d0 5092a: 0682 0000 0050 addil #80,%d2 50930: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 50936: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 5093a: b08b cmpl %a3,%d0 5093c: 6700 0084 beqw 509c2 <_CORE_message_queue_Seize+0xd2> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 50940: 2253 moveal %a3@,%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 50942: 2342 0004 movel %d2,%a1@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 50946: 53aa 0048 subql #1,%a2@(72) Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 5094a: 2549 0050 movel %a1,%a2@(80) _ISR_Enable( level ); 5094e: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 50950: 2279 0006 abc6 moveal 6abc6 <_Per_CPU_Information+0xe>,%a1 _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 50956: 240b movel %a3,%d2 50958: 0682 0000 0010 addil #16,%d2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5095e: 49f9 0005 871c lea 5871c ,%a4 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 50964: 20ab 000c movel %a3@(12),%a0@ _Thread_Executing->Wait.count = 50968: 236b 0008 0024 movel %a3@(8),%a1@(36) 5096e: 2f10 movel %a0@,%sp@- 50970: 2f02 movel %d2,%sp@- 50972: 2f03 movel %d3,%sp@- 50974: 4e94 jsr %a4@ * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50976: 2f0a movel %a2,%sp@- 50978: 4eb9 0005 2bec jsr 52bec <_Thread_queue_Dequeue> if ( !the_thread ) { 5097e: 4fef 0010 lea %sp@(16),%sp * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50982: 2040 moveal %d0,%a0 if ( !the_thread ) { 50984: 4a80 tstl %d0 50986: 6700 0088 beqw 50a10 <_CORE_message_queue_Seize+0x120> */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 5098a: 2028 0030 movel %a0@(48),%d0 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 5098e: 2768 0024 0008 movel %a0@(36),%a3@(8) 50994: 2740 000c movel %d0,%a3@(12) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50998: 2f00 movel %d0,%sp@- 5099a: 2f28 002c movel %a0@(44),%sp@- 5099e: 2f02 movel %d2,%sp@- 509a0: 4e94 jsr %a4@ the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 509a2: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 509a8: 4fef 000c lea %sp@(12),%sp 509ac: 2d4b 000c movel %a3,%fp@(12) 509b0: 2d4a 0008 movel %a2,%fp@(8) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 509b4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 509ba: 4e5e unlk %fp the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 509bc: 4ef9 0005 5b90 jmp 55b90 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 509c2: 4a04 tstb %d4 509c4: 6612 bnes 509d8 <_CORE_message_queue_Seize+0xe8> _ISR_Enable( level ); 509c6: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 509c8: 7004 moveq #4,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 509ca: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 509d0: 2340 0034 movel %d0,%a1@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 509d4: 4e5e unlk %fp 509d6: 4e75 rts 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; 509d8: 7001 moveq #1,%d0 509da: 2540 0030 movel %d0,%a2@(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.mutable_object = buffer; 509de: 2343 002c movel %d3,%a1@(44) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 509e2: 234a 0044 movel %a2,%a1@(68) executing->Wait.id = id; 509e6: 234c 0020 movel %a4,%a1@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 509ea: 2348 0028 movel %a0,%a1@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 509ee: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 509f0: 2d45 000c movel %d5,%fp@(12) 509f4: 203c 0005 312c movel #340268,%d0 509fa: 2d4a 0008 movel %a2,%fp@(8) } 509fe: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50a04: 2d40 0010 movel %d0,%fp@(16) } 50a08: 4e5e unlk %fp executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50a0a: 4ef9 0005 2d5c jmp 52d5c <_Thread_queue_Enqueue_with_handler> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 50a10: 45ea 0068 lea %a2@(104),%a2 50a14: 2d4b 000c movel %a3,%fp@(12) 50a18: 2d4a 0008 movel %a2,%fp@(8) } 50a1c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 50a22: 4e5e unlk %fp 50a24: 4ef9 0005 073c jmp 5073c <_Chain_Append> ... =============================================================================== 00048204 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 48204: 4e56 0000 linkw %fp,#0 * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) 48208: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 4820e: 2f0a movel %a2,%sp@- 48210: 246e 0008 moveal %fp@(8),%a2 48214: 2f02 movel %d2,%sp@- 48216: 142e 0013 moveb %fp@(19),%d2 4821a: 4a80 tstl %d0 4821c: 6768 beqs 48286 <_CORE_mutex_Seize+0x82> _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 4821e: 4a02 tstb %d2 48220: 6700 0098 beqw 482ba <_CORE_mutex_Seize+0xb6> 48224: 7001 moveq #1,%d0 48226: b0b9 0006 141a cmpl 6141a <_System_state_Current>,%d0 4822c: 6500 00b2 bcsw 482e0 <_CORE_mutex_Seize+0xdc> 48230: 486e 0018 pea %fp@(24) 48234: 2f0a movel %a2,%sp@- 48236: 4eb9 0004 ced8 jsr 4ced8 <_CORE_mutex_Seize_interrupt_trylock> 4823c: 508f addql #8,%sp 4823e: 4a80 tstl %d0 48240: 6738 beqs 4827a <_CORE_mutex_Seize+0x76> <== ALWAYS TAKEN 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; 48242: 7001 moveq #1,%d0 48244: 2079 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a0 4824a: 2540 0030 movel %d0,%a2@(48) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4824e: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 ++level; 48254: 5280 addql #1,%d0 48256: 216e 000c 0020 movel %fp@(12),%a0@(32) 4825c: 214a 0044 movel %a2,%a0@(68) _Thread_Dispatch_disable_level = level; 48260: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> 48266: 202e 0018 movel %fp@(24),%d0 4826a: 46c0 movew %d0,%sr 4826c: 2f2e 0014 movel %fp@(20),%sp@- 48270: 2f0a movel %a2,%sp@- 48272: 4eb9 0004 816c jsr 4816c <_CORE_mutex_Seize_interrupt_blocking> 48278: 508f addql #8,%sp } 4827a: 242e fff8 movel %fp@(-8),%d2 4827e: 246e fffc moveal %fp@(-4),%a2 48282: 4e5e unlk %fp 48284: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 48286: 486e 0018 pea %fp@(24) 4828a: 2f0a movel %a2,%sp@- 4828c: 4eb9 0004 ced8 jsr 4ced8 <_CORE_mutex_Seize_interrupt_trylock> 48292: 508f addql #8,%sp 48294: 4a80 tstl %d0 48296: 67e2 beqs 4827a <_CORE_mutex_Seize+0x76> 48298: 4a02 tstb %d2 4829a: 66a6 bnes 48242 <_CORE_mutex_Seize+0x3e> 4829c: 202e 0018 movel %fp@(24),%d0 482a0: 46c0 movew %d0,%sr 482a2: 2079 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a0 482a8: 7001 moveq #1,%d0 482aa: 2140 0034 movel %d0,%a0@(52) } 482ae: 242e fff8 movel %fp@(-8),%d2 482b2: 246e fffc moveal %fp@(-4),%a2 482b6: 4e5e unlk %fp 482b8: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 482ba: 486e 0018 pea %fp@(24) 482be: 2f0a movel %a2,%sp@- 482c0: 4eb9 0004 ced8 jsr 4ced8 <_CORE_mutex_Seize_interrupt_trylock> 482c6: 508f addql #8,%sp 482c8: 4a80 tstl %d0 482ca: 67ae beqs 4827a <_CORE_mutex_Seize+0x76> <== ALWAYS TAKEN 482cc: 202e 0018 movel %fp@(24),%d0 <== NOT EXECUTED 482d0: 46c0 movew %d0,%sr <== NOT EXECUTED 482d2: 2079 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a0 <== NOT EXECUTED 482d8: 7001 moveq #1,%d0 <== NOT EXECUTED 482da: 2140 0034 movel %d0,%a0@(52) <== NOT EXECUTED 482de: 60ce bras 482ae <_CORE_mutex_Seize+0xaa> <== NOT EXECUTED 482e0: 4878 0012 pea 12 482e4: 42a7 clrl %sp@- 482e6: 42a7 clrl %sp@- 482e8: 4eb9 0004 8974 jsr 48974 <_Internal_error_Occurred> ... =============================================================================== 00048444 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 48444: 4e56 0000 linkw %fp,#0 48448: 2f0a movel %a2,%sp@- 4844a: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 4844e: 2f0a movel %a2,%sp@- 48450: 4eb9 0004 a070 jsr 4a070 <_Thread_queue_Dequeue> 48456: 588f addql #4,%sp 48458: 4a80 tstl %d0 4845a: 670a beqs 48466 <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 4845c: 246e fffc moveal %fp@(-4),%a2 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 48460: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 48462: 4e5e unlk %fp 48464: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 48466: 303c 0700 movew #1792,%d0 4846a: 40c1 movew %sr,%d1 4846c: 8081 orl %d1,%d0 4846e: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 48470: 202a 0048 movel %a2@(72),%d0 48474: b0aa 0040 cmpl %a2@(64),%d0 48478: 6412 bccs 4848c <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN the_semaphore->count += 1; 4847a: 5280 addql #1,%d0 4847c: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 48480: 4280 clrl %d0 _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 48482: 46c1 movew %d1,%sr } return status; } 48484: 246e fffc moveal %fp@(-4),%a2 48488: 4e5e unlk %fp 4848a: 4e75 rts } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 4848c: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 4848e: 46c1 movew %d1,%sr <== NOT EXECUTED 48490: 60f2 bras 48484 <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED ... =============================================================================== 00048008 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 48008: 4e56 ffec linkw %fp,#-20 4800c: 202e 0010 movel %fp@(16),%d0 48010: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48014: 246e 0008 moveal %fp@(8),%a2 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 48018: 2600 movel %d0,%d3 size_t node_size ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4801a: 280a movel %a2,%d4 4801c: 5884 addql #4,%d4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4801e: 5383 subql #1,%d3 Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 48020: 242e 000c movel %fp@(12),%d2 48024: 222e 0014 movel %fp@(20),%d1 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 48028: 42aa 0004 clrl %a2@(4) while ( count-- ) { 4802c: 4a80 tstl %d0 4802e: 672e beqs 4805e <_Chain_Initialize+0x56> <== NEVER TAKEN 48030: 2003 movel %d3,%d0 48032: 2042 moveal %d2,%a0 48034: 224a moveal %a2,%a1 current->next = next; 48036: 2288 movel %a0,%a1@ Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 48038: 5380 subql #1,%d0 4803a: 7aff moveq #-1,%d5 current->next = next; next->previous = current; 4803c: 2149 0004 movel %a1,%a0@(4) 48040: 2248 moveal %a0,%a1 current = next; next = (Chain_Node *) 48042: d1c1 addal %d1,%a0 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 48044: ba80 cmpl %d0,%d5 48046: 66ee bnes 48036 <_Chain_Initialize+0x2e> #include #include #include #include void _Chain_Initialize( 48048: 4c03 1800 mulsl %d3,%d1 4804c: 2042 moveal %d2,%a0 4804e: d1c1 addal %d1,%a0 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 48050: 2084 movel %d4,%a0@ tail->previous = current; 48052: 2548 0008 movel %a0,%a2@(8) } 48056: 4cd7 043c moveml %sp@,%d2-%d5/%a2 4805a: 4e5e unlk %fp 4805c: 4e75 rts ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 4805e: 204a moveal %a2,%a0 <== NOT EXECUTED current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 48060: 2084 movel %d4,%a0@ <== NOT EXECUTED tail->previous = current; 48062: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED } 48066: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED 4806a: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00046fa8 <_Event_Surrender>: rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; _ISR_Disable( level ); 46fa8: 223c 0000 0700 movel #1792,%d1 rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { 46fae: 4e56 ffe4 linkw %fp,#-28 46fb2: 202e 000c movel %fp@(12),%d0 46fb6: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 46fba: 246e 0008 moveal %fp@(8),%a2 46fbe: 206e 0010 moveal %fp@(16),%a0 rtems_event_set pending_events; rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; 46fc2: 2a2a 0030 movel %a2@(48),%d5 rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { 46fc6: 226e 0014 moveal %fp@(20),%a1 46fca: 282e 0018 movel %fp@(24),%d4 rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; _ISR_Disable( level ); 46fce: 40c3 movew %sr,%d3 46fd0: 8283 orl %d3,%d1 46fd2: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Event_sets_Post( rtems_event_set the_new_events, rtems_event_set *the_event_set ) { *the_event_set |= the_new_events; 46fd4: 8090 orl %a0@,%d0 46fd6: 2080 movel %d0,%a0@ _Event_sets_Post( event_in, &event->pending_events ); pending_events = event->pending_events; event_condition = the_thread->Wait.count; 46fd8: 242a 0024 movel %a2@(36),%d2 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 46fdc: 2200 movel %d0,%d1 46fde: c282 andl %d2,%d1 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 46fe0: 6700 0090 beqw 47072 <_Event_Surrender+0xca> /* * 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() && 46fe4: 4ab9 0006 1428 tstl 61428 <_Per_CPU_Information+0x8> 46fea: 6708 beqs 46ff4 <_Event_Surrender+0x4c> 46fec: b5f9 0006 142e cmpal 6142e <_Per_CPU_Information+0xe>,%a2 46ff2: 6754 beqs 47048 <_Event_Surrender+0xa0> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 46ff4: c8aa 0010 andl %a2@(16),%d4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { 46ff8: 6778 beqs 47072 <_Event_Surrender+0xca> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 46ffa: b282 cmpl %d2,%d1 46ffc: 6706 beqs 47004 <_Event_Surrender+0x5c> 46ffe: 0805 0001 btst #1,%d5 47002: 676e beqs 47072 <_Event_Surrender+0xca> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 47004: 2401 movel %d1,%d2 47006: 4682 notl %d2 47008: c480 andl %d0,%d2 4700a: 2082 movel %d2,%a0@ event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4700c: 206a 0028 moveal %a2@(40),%a0 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 47010: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 47014: 2081 movel %d1,%a0@ _ISR_Flash( level ); 47016: 203c 0000 0700 movel #1792,%d0 4701c: 46c3 movew %d3,%sr 4701e: 8083 orl %d3,%d0 47020: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 47022: 7002 moveq #2,%d0 47024: b0aa 0050 cmpl %a2@(80),%d0 47028: 6754 beqs 4707e <_Event_Surrender+0xd6> _ISR_Enable( level ); 4702a: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4702c: 2d4a 0008 movel %a2,%fp@(8) 47030: 2e3c 1007 fff8 movel #268959736,%d7 47036: 2d47 000c movel %d7,%fp@(12) } return; } } _ISR_Enable( level ); } 4703a: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 47040: 4e5e unlk %fp 47042: 4ef9 0004 98d0 jmp 498d0 <_Thread_Clear_state> * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 47048: 2c11 movel %a1@,%d6 /* * 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() && _Thread_Is_executing( the_thread ) && 4704a: 7e01 moveq #1,%d7 ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 4704c: 5386 subql #1,%d6 /* * 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() && _Thread_Is_executing( the_thread ) && 4704e: be86 cmpl %d6,%d7 47050: 65a2 bcss 46ff4 <_Event_Surrender+0x4c> <== NEVER TAKEN ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 47052: b282 cmpl %d2,%d1 47054: 6706 beqs 4705c <_Event_Surrender+0xb4> 47056: 0805 0001 btst #1,%d5 4705a: 6716 beqs 47072 <_Event_Surrender+0xca> <== NEVER TAKEN 4705c: 2401 movel %d1,%d2 4705e: 4682 notl %d2 47060: c480 andl %d0,%d2 pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 47062: 7003 moveq #3,%d0 47064: 2082 movel %d2,%a0@ event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 47066: 206a 0028 moveal %a2@(40),%a0 if ( seized_events == event_condition || _Options_Is_any(option_set) ) { event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 4706a: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4706e: 2081 movel %d1,%a0@ *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 47070: 2280 movel %d0,%a1@ _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 47072: 46c3 movew %d3,%sr } 47074: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 4707a: 4e5e unlk %fp 4707c: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4707e: 7003 moveq #3,%d0 47080: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 47084: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 47086: 486a 0048 pea %a2@(72) 4708a: 2e3c 1007 fff8 movel #268959736,%d7 47090: 4eb9 0004 aaa0 jsr 4aaa0 <_Watchdog_Remove> 47096: 588f addql #4,%sp 47098: 2d47 000c movel %d7,%fp@(12) 4709c: 2d4a 0008 movel %a2,%fp@(8) } return; } } _ISR_Enable( level ); } 470a0: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 470a6: 4e5e unlk %fp 470a8: 4ef9 0004 98d0 jmp 498d0 <_Thread_Clear_state> ... =============================================================================== 000470b0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *arg ) { 470b0: 4e56 fffc linkw %fp,#-4 470b4: 2f02 movel %d2,%sp@- ISR_Level level; Thread_blocking_operation_States *sync_state; sync_state = arg; the_thread = _Thread_Get( id, &location ); 470b6: 486e fffc pea %fp@(-4) 470ba: 2f2e 0008 movel %fp@(8),%sp@- 470be: 4eb9 0004 9cf0 jsr 49cf0 <_Thread_Get> switch ( location ) { 470c4: 508f addql #8,%sp 470c6: 4aae fffc tstl %fp@(-4) 470ca: 6642 bnes 4710e <_Event_Timeout+0x5e> <== NEVER TAKEN * * 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. */ _ISR_Disable( level ); 470cc: 223c 0000 0700 movel #1792,%d1 470d2: 40c2 movew %sr,%d2 470d4: 8282 orl %d2,%d1 470d6: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 470d8: 2040 moveal %d0,%a0 470da: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 470de: b0b9 0006 142e cmpl 6142e <_Per_CPU_Information+0xe>,%d0 470e4: 6730 beqs 47116 <_Event_Timeout+0x66> if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 470e6: 7206 moveq #6,%d1 470e8: 2040 moveal %d0,%a0 470ea: 2141 0034 movel %d1,%a0@(52) _ISR_Enable( level ); 470ee: 46c2 movew %d2,%sr 470f0: 2f3c 1007 fff8 movel #268959736,%sp@- 470f6: 2f00 movel %d0,%sp@- 470f8: 4eb9 0004 98d0 jsr 498d0 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; --level; _Thread_Dispatch_disable_level = level; 470fe: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 47100: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 --level; 47106: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 47108: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4710e: 242e fff8 movel %fp@(-8),%d2 47112: 4e5e unlk %fp 47114: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 47116: 206e 000c moveal %fp@(12),%a0 4711a: 7201 moveq #1,%d1 4711c: b290 cmpl %a0@,%d1 4711e: 66c6 bnes 470e6 <_Event_Timeout+0x36> *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 47120: 7202 moveq #2,%d1 47122: 2081 movel %d1,%a0@ } the_thread->Wait.return_code = RTEMS_TIMEOUT; 47124: 7206 moveq #6,%d1 47126: 2040 moveal %d0,%a0 47128: 2141 0034 movel %d1,%a0@(52) _ISR_Enable( level ); 4712c: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4712e: 2f3c 1007 fff8 movel #268959736,%sp@- 47134: 2f00 movel %d0,%sp@- 47136: 4eb9 0004 98d0 jsr 498d0 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; --level; _Thread_Dispatch_disable_level = level; 4713c: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4713e: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 --level; 47144: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 47146: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> 4714c: 60c0 bras 4710e <_Event_Timeout+0x5e> ... =============================================================================== 0004cff0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4cff0: 4e56 ffc4 linkw %fp,#-60 4cff4: 226e 000c moveal %fp@(12),%a1 4cff8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cffc: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 4d000: 2c09 movel %a1,%d6 4d002: 5886 addql #4,%d6 - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4d004: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4d008: 262e 0010 movel %fp@(16),%d3 4d00c: 2a2e 0014 movel %fp@(20),%d5 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4d010: 2d40 fffc movel %d0,%fp@(-4) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 4d014: bc89 cmpl %a1,%d6 4d016: 6500 0164 bcsw 4d17c <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4d01a: 4a85 tstl %d5 4d01c: 670c beqs 4d02a <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 4d01e: ba89 cmpl %a1,%d5 4d020: 6500 015a bcsw 4d17c <_Heap_Allocate_aligned_with_boundary+0x18c> return NULL; } if ( alignment == 0 ) { 4d024: 4a83 tstl %d3 4d026: 6602 bnes 4d02a <_Heap_Allocate_aligned_with_boundary+0x3a> alignment = page_size; 4d028: 2600 movel %d0,%d3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4d02a: 206a 0008 moveal %a2@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4d02e: 4284 clrl %d4 4d030: b1ca cmpal %a2,%a0 4d032: 6732 beqs 4d066 <_Heap_Allocate_aligned_with_boundary+0x76> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4d034: 222e fffc movel %fp@(-4),%d1 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4d038: 7404 moveq #4,%d2 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4d03a: 5e81 addql #7,%d1 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4d03c: 9489 subl %a1,%d2 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4d03e: 2d41 fff8 movel %d1,%fp@(-8) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4d042: 2d42 fff4 movel %d2,%fp@(-12) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4d046: 2028 0004 movel %a0@(4),%d0 4d04a: b086 cmpl %d6,%d0 4d04c: 632e blss 4d07c <_Heap_Allocate_aligned_with_boundary+0x8c> if ( alignment == 0 ) { 4d04e: 4a83 tstl %d3 4d050: 6636 bnes 4d088 <_Heap_Allocate_aligned_with_boundary+0x98> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4d052: 2408 movel %a0,%d2 4d054: 5082 addql #8,%d2 ); } } /* Statistics */ ++search_count; 4d056: 5284 addql #1,%d4 if ( alloc_begin != 0 ) { 4d058: 4a82 tstl %d2 4d05a: 6600 00f4 bnew 4d150 <_Heap_Allocate_aligned_with_boundary+0x160> break; } block = block->next; 4d05e: 2068 0008 moveal %a0@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4d062: b1ca cmpal %a2,%a0 4d064: 66e0 bnes 4d046 <_Heap_Allocate_aligned_with_boundary+0x56> ); } } /* Statistics */ ++search_count; 4d066: 4280 clrl %d0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 4d068: b8aa 0044 cmpl %a2@(68),%d4 4d06c: 6304 blss 4d072 <_Heap_Allocate_aligned_with_boundary+0x82> stats->max_search = search_count; 4d06e: 2544 0044 movel %d4,%a2@(68) } return (void *) alloc_begin; } 4d072: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4d078: 4e5e unlk %fp 4d07a: 4e75 rts if ( alloc_begin != 0 ) { break; } block = block->next; 4d07c: 2068 0008 moveal %a0@(8),%a0 ); } } /* Statistics */ ++search_count; 4d080: 5284 addql #1,%d4 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4d082: b1ca cmpal %a2,%a0 4d084: 66c0 bnes 4d046 <_Heap_Allocate_aligned_with_boundary+0x56> 4d086: 60de bras 4d066 <_Heap_Allocate_aligned_with_boundary+0x76> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d088: 7efe moveq #-2,%d7 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4d08a: 49e8 0008 lea %a0@(8),%a4 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d08e: c087 andl %d7,%d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4d090: 266a 0014 moveal %a2@(20),%a3 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4d094: d088 addl %a0,%d0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4d096: 222e fff8 movel %fp@(-8),%d1 4d09a: 928b subl %a3,%d1 uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 4d09c: 242e fff4 movel %fp@(-12),%d2 4d0a0: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4d0a2: 2e02 movel %d2,%d7 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4d0a4: d081 addl %d1,%d0 4d0a6: 4c43 7001 remul %d3,%d1,%d7 4d0aa: 9481 subl %d1,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4d0ac: b480 cmpl %d0,%d2 4d0ae: 630a blss 4d0ba <_Heap_Allocate_aligned_with_boundary+0xca> 4d0b0: 2400 movel %d0,%d2 4d0b2: 4c43 2001 remul %d3,%d1,%d2 4d0b6: 2400 movel %d0,%d2 4d0b8: 9481 subl %d1,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4d0ba: 4a85 tstl %d5 4d0bc: 6766 beqs 4d124 <_Heap_Allocate_aligned_with_boundary+0x134> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4d0be: 2202 movel %d2,%d1 4d0c0: d289 addl %a1,%d1 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4d0c2: 4bf4 9800 lea %a4@(00000000,%a1:l),%a5 4d0c6: 2001 movel %d1,%d0 4d0c8: 4c45 0007 remul %d5,%d7,%d0 4d0cc: 2d4d ffec movel %a5,%fp@(-20) 4d0d0: 2a41 moveal %d1,%a5 4d0d2: 9bc7 subal %d7,%a5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4d0d4: bbc2 cmpal %d2,%a5 4d0d6: 634c blss 4d124 <_Heap_Allocate_aligned_with_boundary+0x134> 4d0d8: bbc1 cmpal %d1,%a5 4d0da: 6448 bccs 4d124 <_Heap_Allocate_aligned_with_boundary+0x134> if ( boundary_line < boundary_floor ) { 4d0dc: bbee ffec cmpal %fp@(-20),%a5 4d0e0: 6500 008e bcsw 4d170 <_Heap_Allocate_aligned_with_boundary+0x180> 4d0e4: 200d movel %a5,%d0 4d0e6: 2a44 moveal %d4,%a5 4d0e8: 2e2e ffec movel %fp@(-20),%d7 return 0; } alloc_begin = boundary_line - alloc_size; 4d0ec: 9089 subl %a1,%d0 4d0ee: 2400 movel %d0,%d2 4d0f0: 4c43 2001 remul %d3,%d1,%d2 4d0f4: 2400 movel %d0,%d2 4d0f6: 9481 subl %d1,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4d0f8: 2202 movel %d2,%d1 4d0fa: d289 addl %a1,%d1 4d0fc: 2801 movel %d1,%d4 4d0fe: 4c45 4000 remul %d5,%d0,%d4 4d102: 2801 movel %d1,%d4 4d104: 9880 subl %d0,%d4 4d106: 2004 movel %d4,%d0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4d108: b882 cmpl %d2,%d4 4d10a: 6316 blss 4d122 <_Heap_Allocate_aligned_with_boundary+0x132> 4d10c: b881 cmpl %d1,%d4 4d10e: 6412 bccs 4d122 <_Heap_Allocate_aligned_with_boundary+0x132> if ( boundary_line < boundary_floor ) { 4d110: b087 cmpl %d7,%d0 4d112: 64d8 bccs 4d0ec <_Heap_Allocate_aligned_with_boundary+0xfc><== ALWAYS TAKEN 4d114: 280d movel %a5,%d4 <== NOT EXECUTED return 0; 4d116: 4282 clrl %d2 <== NOT EXECUTED ); } } /* Statistics */ ++search_count; 4d118: 5284 addql #1,%d4 <== NOT EXECUTED if ( alloc_begin != 0 ) { 4d11a: 4a82 tstl %d2 <== NOT EXECUTED 4d11c: 6700 ff40 beqw 4d05e <_Heap_Allocate_aligned_with_boundary+0x6e><== NOT EXECUTED 4d120: 602e bras 4d150 <_Heap_Allocate_aligned_with_boundary+0x160><== NOT EXECUTED 4d122: 280d movel %a5,%d4 boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4d124: b48c cmpl %a4,%d2 4d126: 6548 bcss 4d170 <_Heap_Allocate_aligned_with_boundary+0x180> 4d128: 70f8 moveq #-8,%d0 4d12a: 9088 subl %a0,%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4d12c: 2a40 moveal %d0,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4d12e: 2e02 movel %d2,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4d130: dbc2 addal %d2,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4d132: 202e fffc movel %fp@(-4),%d0 4d136: 4c40 7001 remul %d0,%d1,%d7 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4d13a: 9bc1 subal %d1,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4d13c: bbcb cmpal %a3,%a5 4d13e: 6400 ff16 bccw 4d056 <_Heap_Allocate_aligned_with_boundary+0x66> uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; 4d142: 4a8d tstl %a5 4d144: 57c0 seq %d0 ); } } /* Statistics */ ++search_count; 4d146: 5284 addql #1,%d4 uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; 4d148: 49c0 extbl %d0 4d14a: c480 andl %d0,%d2 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 4d14c: 6700 ff10 beqw 4d05e <_Heap_Allocate_aligned_with_boundary+0x6e> if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4d150: 2f09 movel %a1,%sp@- search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 4d152: 52aa 0048 addql #1,%a2@(72) stats->searches += search_count; 4d156: d9aa 004c addl %d4,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4d15a: 2f02 movel %d2,%sp@- 4d15c: 2f08 movel %a0,%sp@- 4d15e: 2f0a movel %a2,%sp@- 4d160: 4eb9 0004 8858 jsr 48858 <_Heap_Block_allocate> 4d166: 4fef 0010 lea %sp@(16),%sp 4d16a: 2002 movel %d2,%d0 4d16c: 6000 fefa braw 4d068 <_Heap_Allocate_aligned_with_boundary+0x78> uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; 4d170: 4282 clrl %d2 ); } } /* Statistics */ ++search_count; 4d172: 5284 addql #1,%d4 if ( alloc_begin != 0 ) { 4d174: 4a82 tstl %d2 4d176: 6700 fee6 beqw 4d05e <_Heap_Allocate_aligned_with_boundary+0x6e> 4d17a: 60d4 bras 4d150 <_Heap_Allocate_aligned_with_boundary+0x160><== NOT EXECUTED uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; 4d17c: 4280 clrl %d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4d17e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4d184: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d188 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4d188: 4e56 ffe8 linkw %fp,#-24 4d18c: 206e 0008 moveal %fp@(8),%a0 4d190: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4d194: 202e 000c movel %fp@(12),%d0 /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 4d198: 6700 00ba beqw 4d254 <_Heap_Free+0xcc> 4d19c: 2240 moveal %d0,%a1 4d19e: 5189 subql #8,%a1 4d1a0: 4c68 0001 0010 remul %a0@(16),%d1,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4d1a6: 2028 0020 movel %a0@(32),%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4d1aa: 93c1 subal %d1,%a1 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4d1ac: b089 cmpl %a1,%d0 4d1ae: 6200 009a bhiw 4d24a <_Heap_Free+0xc2> 4d1b2: 2228 0024 movel %a0@(36),%d1 4d1b6: b289 cmpl %a1,%d1 4d1b8: 6500 0090 bcsw 4d24a <_Heap_Free+0xc2> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d1bc: 2829 0004 movel %a1@(4),%d4 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d1c0: 74fe moveq #-2,%d2 4d1c2: c484 andl %d4,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4d1c4: 45f1 2800 lea %a1@(00000000,%d2:l),%a2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4d1c8: b5c0 cmpal %d0,%a2 4d1ca: 657e bcss 4d24a <_Heap_Free+0xc2> <== NEVER TAKEN 4d1cc: b5c1 cmpal %d1,%a2 4d1ce: 627a bhis 4d24a <_Heap_Free+0xc2> <== NEVER TAKEN 4d1d0: 262a 0004 movel %a2@(4),%d3 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4d1d4: 0803 0000 btst #0,%d3 4d1d8: 6770 beqs 4d24a <_Heap_Free+0xc2> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d1da: 7afe moveq #-2,%d5 4d1dc: c685 andl %d5,%d3 return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4d1de: b5c1 cmpal %d1,%a2 4d1e0: 6700 00b2 beqw 4d294 <_Heap_Free+0x10c> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4d1e4: 7a01 moveq #1,%d5 4d1e6: cab2 3804 andl %a2@(00000004,%d3:l),%d5 4d1ea: 6600 00a8 bnew 4d294 <_Heap_Free+0x10c> if ( !_Heap_Is_prev_used( block ) ) { 4d1ee: 0804 0000 btst #0,%d4 4d1f2: 666a bnes 4d25e <_Heap_Free+0xd6> if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4d1f4: 7a01 moveq #1,%d5 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; 4d1f6: 2811 movel %a1@,%d4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4d1f8: 93c4 subal %d4,%a1 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4d1fa: b3c0 cmpal %d0,%a1 4d1fc: 654c bcss 4d24a <_Heap_Free+0xc2> <== NEVER TAKEN 4d1fe: b3c1 cmpal %d1,%a1 4d200: 6248 bhis 4d24a <_Heap_Free+0xc2> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4d202: 7001 moveq #1,%d0 4d204: c0a9 0004 andl %a1@(4),%d0 return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 4d208: 6740 beqs 4d24a <_Heap_Free+0xc2> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4d20a: 4a05 tstb %d5 4d20c: 6700 00de beqw 4d2ec <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d210: 266a 0008 moveal %a2@(8),%a3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4d214: d882 addl %d2,%d4 4d216: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d218: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d21a: 246a 000c moveal %a2@(12),%a2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4d21e: 254b 0008 movel %a3,%a2@(8) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d222: 8083 orl %d3,%d0 next->prev = prev; 4d224: 274a 000c movel %a2,%a3@(12) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4d228: 53a8 0038 subql #1,%a0@(56) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4d22c: 2383 3800 movel %d3,%a1@(00000000,%d3:l) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d230: 2340 0004 movel %d0,%a1@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4d234: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4d238: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4d23c: d5a8 0030 addl %d2,%a0@(48) return( true ); 4d240: 7001 moveq #1,%d0 } 4d242: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4d246: 4e5e unlk %fp 4d248: 4e75 rts 4d24a: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 4d24e: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d250: 4e5e unlk %fp 4d252: 4e75 rts 4d254: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 4d258: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d25a: 4e5e unlk %fp 4d25c: 4e75 rts 4d25e: 266a 0008 moveal %a2@(8),%a3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; 4d262: d682 addl %d2,%d3 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d264: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4d266: 246a 000c moveal %a2@(12),%a2 next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d26a: 8083 orl %d3,%d0 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4d26c: 234b 0008 movel %a3,%a1@(8) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4d270: 2383 3800 movel %d3,%a1@(00000000,%d3:l) new_block->prev = prev; 4d274: 234a 000c movel %a2,%a1@(12) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d278: 2340 0004 movel %d0,%a1@(4) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4d27c: 7001 moveq #1,%d0 next->prev = new_block; prev->next = new_block; 4d27e: 2549 0008 movel %a1,%a2@(8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 4d282: 2749 000c movel %a1,%a3@(12) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4d286: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4d28a: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4d28e: d5a8 0030 addl %d2,%a0@(48) 4d292: 60ae bras 4d242 <_Heap_Free+0xba> next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4d294: 0804 0000 btst #0,%d4 4d298: 6606 bnes 4d2a0 <_Heap_Free+0x118> if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4d29a: 4205 clrb %d5 4d29c: 6000 ff58 braw 4d1f6 <_Heap_Free+0x6e> block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4d2a0: 2028 0038 movel %a0@(56),%d0 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4d2a4: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4d2a6: 7afe moveq #-2,%d5 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4d2a8: 5280 addql #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4d2aa: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4d2ae: 2348 000c movel %a0,%a1@(12) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4d2b2: 8282 orl %d2,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4d2b4: 234b 0008 movel %a3,%a1@(8) 4d2b8: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4d2bc: cbaa 0004 andl %d5,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4d2c0: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4d2c4: 2482 movel %d2,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4d2c6: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4d2ca: 2140 0038 movel %d0,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4d2ce: b0a8 003c cmpl %a0@(60),%d0 4d2d2: 6300 ff60 blsw 4d234 <_Heap_Free+0xac> stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4d2d6: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4d2da: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4d2de: d5a8 0030 addl %d2,%a0@(48) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4d2e2: 2140 003c movel %d0,%a0@(60) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4d2e6: 7001 moveq #1,%d0 4d2e8: 6000 ff58 braw 4d242 <_Heap_Free+0xba> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 4d2ec: d882 addl %d2,%d4 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d2ee: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4d2f0: 7afe moveq #-2,%d5 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d2f2: 8284 orl %d4,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4d2f4: 2484 movel %d4,%a2@ /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4d2f6: 7001 moveq #1,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4d2f8: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4d2fc: cbaa 0004 andl %d5,%a2@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4d300: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4d304: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4d308: d5a8 0030 addl %d2,%a0@(48) 4d30c: 6000 ff34 braw 4d242 <_Heap_Free+0xba> =============================================================================== 00052448 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 52448: 4e56 fff0 linkw %fp,#-16 5244c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 52450: 266e 0008 moveal %fp@(8),%a3 52454: 246e 000c moveal %fp@(12),%a2 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 52458: 206b 0008 moveal %a3@(8),%a0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 5245c: 4292 clrl %a2@ info->largest = 0; 5245e: 42aa 0004 clrl %a2@(4) info->total = 0; 52462: 42aa 0008 clrl %a2@(8) for(the_block = _Heap_Free_list_first(the_heap); 52466: b1cb cmpal %a3,%a0 52468: 6732 beqs 5249c <_Heap_Get_free_information+0x54><== NEVER TAKEN 5246a: 327c 0001 moveaw #1,%a1 5246e: 4282 clrl %d2 52470: 4281 clrl %d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 52472: 70fe moveq #-2,%d0 52474: 2609 movel %a1,%d3 52476: 5283 addql #1,%d3 52478: c0a8 0004 andl %a0@(4),%d0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 5247c: d280 addl %d0,%d1 if ( info->largest < the_size ) 5247e: b480 cmpl %d0,%d2 52480: 6404 bccs 52486 <_Heap_Get_free_information+0x3e> info->largest = the_size; 52482: 2540 0004 movel %d0,%a2@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 52486: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 5248a: b1cb cmpal %a3,%a0 5248c: 6708 beqs 52496 <_Heap_Get_free_information+0x4e> 5248e: 242a 0004 movel %a2@(4),%d2 52492: 2243 moveal %d3,%a1 52494: 60dc bras 52472 <_Heap_Get_free_information+0x2a> 52496: 2489 movel %a1,%a2@ 52498: 2541 0008 movel %d1,%a2@(8) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 5249c: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3 524a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aaa0 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { 4aaa0: 4e56 ffe8 linkw %fp,#-24 4aaa4: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4aaa8: 246e 0008 moveal %fp@(8),%a2 4aaac: 242e 0010 movel %fp@(16),%d2 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 4aab0: 6700 00ca beqw 4ab7c <_Heap_Greedy_allocate+0xdc> 4aab4: 2a6e 000c moveal %fp@(12),%a5 4aab8: 97cb subal %a3,%a3 const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; 4aaba: 99cc subal %a4,%a4 4aabc: 263c 0005 1f50 movel #335696,%d3 * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4aac2: 42a7 clrl %sp@- 4aac4: 2043 moveal %d3,%a0 Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 4aac6: 528b addql #1,%a3 4aac8: 42a7 clrl %sp@- 4aaca: 2f1d movel %a5@+,%sp@- 4aacc: 2f0a movel %a2,%sp@- 4aace: 4e90 jsr %a0@ void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { 4aad0: 4fef 0010 lea %sp@(16),%sp RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4aad4: 2040 moveal %d0,%a0 4aad6: 5188 subql #8,%a0 4aad8: 4a80 tstl %d0 4aada: 670e beqs 4aaea <_Heap_Greedy_allocate+0x4a> <== NEVER TAKEN 4aadc: 4c6a 0001 0010 remul %a2@(16),%d1,%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4aae2: 91c1 subal %d1,%a0 Heap_Block *next_block = _Heap_Block_of_alloc_area( (uintptr_t) next, heap->page_size ); next_block->next = allocated_blocks; 4aae4: 214c 0008 movel %a4,%a0@(8) 4aae8: 2848 moveal %a0,%a4 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 4aaea: b48b cmpl %a3,%d2 4aaec: 66d4 bnes 4aac2 <_Heap_Greedy_allocate+0x22> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4aaee: 266a 0008 moveal %a2@(8),%a3 next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4aaf2: b7ca cmpal %a2,%a3 4aaf4: 6700 008c beqw 4ab82 <_Heap_Greedy_allocate+0xe2> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4aaf8: 70fe moveq #-2,%d0 4aafa: 4bf9 0004 ae78 lea 4ae78 <_Heap_Block_allocate>,%a5 4ab00: 4282 clrl %d2 4ab02: c0ab 0004 andl %a3@(4),%d0 _Heap_Block_allocate( 4ab06: 2040 moveal %d0,%a0 4ab08: 4868 fff8 pea %a0@(-8) 4ab0c: 486b 0008 pea %a3@(8) 4ab10: 2f0b movel %a3,%sp@- 4ab12: 2f0a movel %a2,%sp@- 4ab14: 4e95 jsr %a5@ next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4ab16: 4fef 0010 lea %sp@(16),%sp current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; 4ab1a: 2742 0008 movel %d2,%a3@(8) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4ab1e: 202a 0008 movel %a2@(8),%d0 4ab22: 240b movel %a3,%d2 next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4ab24: b08a cmpl %a2,%d0 4ab26: 672a beqs 4ab52 <_Heap_Greedy_allocate+0xb2> 4ab28: 2640 moveal %d0,%a3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4ab2a: 70fe moveq #-2,%d0 4ab2c: c0ab 0004 andl %a3@(4),%d0 _Heap_Block_allocate( 4ab30: 2040 moveal %d0,%a0 4ab32: 4868 fff8 pea %a0@(-8) 4ab36: 486b 0008 pea %a3@(8) 4ab3a: 2f0b movel %a3,%sp@- 4ab3c: 2f0a movel %a2,%sp@- 4ab3e: 4e95 jsr %a5@ next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4ab40: 4fef 0010 lea %sp@(16),%sp current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; 4ab44: 2742 0008 movel %d2,%a3@(8) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4ab48: 202a 0008 movel %a2@(8),%d0 4ab4c: 240b movel %a3,%d2 next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4ab4e: b08a cmpl %a2,%d0 4ab50: 66d6 bnes 4ab28 <_Heap_Greedy_allocate+0x88> 4ab52: 4bf9 0005 20e8 lea 520e8 <_Heap_Free>,%a5 current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 4ab58: 4a8c tstl %a4 4ab5a: 6714 beqs 4ab70 <_Heap_Greedy_allocate+0xd0> current = allocated_blocks; allocated_blocks = allocated_blocks->next; 4ab5c: 222c 0008 movel %a4@(8),%d1 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 4ab60: 486c 0008 pea %a4@(8) blocks = current; } while ( allocated_blocks != NULL ) { current = allocated_blocks; allocated_blocks = allocated_blocks->next; 4ab64: 2841 moveal %d1,%a4 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 4ab66: 2f0a movel %a2,%sp@- 4ab68: 4e95 jsr %a5@ current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 4ab6a: 508f addql #8,%sp 4ab6c: 4a8c tstl %a4 4ab6e: 66ec bnes 4ab5c <_Heap_Greedy_allocate+0xbc> allocated_blocks = allocated_blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } return blocks; } 4ab70: 200b movel %a3,%d0 4ab72: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4ab78: 4e5e unlk %fp 4ab7a: 4e75 rts const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; 4ab7c: 99cc subal %a4,%a4 4ab7e: 6000 ff6e braw 4aaee <_Heap_Greedy_allocate+0x4e> next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4ab82: 97cb subal %a3,%a3 <== NOT EXECUTED 4ab84: 4bf9 0005 20e8 lea 520e8 <_Heap_Free>,%a5 <== NOT EXECUTED current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 4ab8a: 4a8c tstl %a4 <== NOT EXECUTED 4ab8c: 66ce bnes 4ab5c <_Heap_Greedy_allocate+0xbc> <== NOT EXECUTED 4ab8e: 60e0 bras 4ab70 <_Heap_Greedy_allocate+0xd0> <== NOT EXECUTED =============================================================================== 0004ab90 <_Heap_Greedy_free>: void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { 4ab90: 4e56 fff4 linkw %fp,#-12 4ab94: 206e 000c moveal %fp@(12),%a0 4ab98: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4ab9c: 262e 0008 movel %fp@(8),%d3 4aba0: 45f9 0005 20e8 lea 520e8 <_Heap_Free>,%a2 while ( blocks != NULL ) { 4aba6: 4a88 tstl %a0 4aba8: 6714 beqs 4abbe <_Heap_Greedy_free+0x2e> <== NEVER TAKEN Heap_Block *current = blocks; blocks = blocks->next; 4abaa: 2428 0008 movel %a0@(8),%d2 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 4abae: 4868 0008 pea %a0@(8) 4abb2: 2f03 movel %d3,%sp@- 4abb4: 4e92 jsr %a2@ void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { 4abb6: 508f addql #8,%sp Heap_Block *current = blocks; blocks = blocks->next; 4abb8: 2042 moveal %d2,%a0 void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { 4abba: 4a82 tstl %d2 4abbc: 66ec bnes 4abaa <_Heap_Greedy_free+0x1a> Heap_Block *current = blocks; blocks = blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } } 4abbe: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4abc4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052500 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 52500: 4e56 fff0 linkw %fp,#-16 52504: 226e 0008 moveal %fp@(8),%a1 52508: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 5250c: 266e 000c moveal %fp@(12),%a3 52510: 262e 0010 movel %fp@(16),%d3 Heap_Block *current = heap->first_block; 52514: 2069 0020 moveal %a1@(32),%a0 Heap_Block *end = heap->last_block; 52518: 2429 0024 movel %a1@(36),%d2 bool stop = false; while ( !stop && current != end ) { 5251c: b488 cmpl %a0,%d2 5251e: 6728 beqs 52548 <_Heap_Iterate+0x48> <== NEVER TAKEN 52520: 70fe moveq #-2,%d0 uintptr_t size = _Heap_Block_size( current ); Heap_Block *next = _Heap_Block_at( current, size ); bool used = _Heap_Is_prev_used( next ); stop = (*visitor)( current, size, used, visitor_arg ); 52522: 7201 moveq #1,%d1 52524: c0a8 0004 andl %a0@(4),%d0 52528: 2f03 movel %d3,%sp@- RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5252a: 45f0 0800 lea %a0@(00000000,%d0:l),%a2 5252e: c2aa 0004 andl %a2@(4),%d1 52532: 2f01 movel %d1,%sp@- 52534: 2f00 movel %d0,%sp@- 52536: 2f08 movel %a0,%sp@- 52538: 4e93 jsr %a3@ { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { 5253a: 4fef 0010 lea %sp@(16),%sp 5253e: 204a moveal %a2,%a0 52540: 4a00 tstb %d0 52542: 6604 bnes 52548 <_Heap_Iterate+0x48> <== NEVER TAKEN 52544: b5c2 cmpal %d2,%a2 52546: 66d8 bnes 52520 <_Heap_Iterate+0x20> stop = (*visitor)( current, size, used, visitor_arg ); current = next; } } 52548: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 5254e: 4e5e unlk %fp ... =============================================================================== 0005d634 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5d634: 4e56 0000 linkw %fp,#0 5d638: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5d63c: 2040 moveal %d0,%a0 5d63e: 5188 subql #8,%a0 5d640: 226e 0008 moveal %fp@(8),%a1 5d644: 2f02 movel %d2,%sp@- 5d646: 2400 movel %d0,%d2 5d648: 4c69 2001 0010 remul %a1@(16),%d1,%d2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 5d64e: 91c1 subal %d1,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5d650: 2229 0020 movel %a1@(32),%d1 && (uintptr_t) block <= (uintptr_t) heap->last_block; 5d654: b288 cmpl %a0,%d1 5d656: 6238 bhis 5d690 <_Heap_Size_of_alloc_area+0x5c> 5d658: 2269 0024 moveal %a1@(36),%a1 5d65c: b3c8 cmpal %a0,%a1 5d65e: 6530 bcss 5d690 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 5d660: 74fe moveq #-2,%d2 5d662: c4a8 0004 andl %a0@(4),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5d666: 41f0 2800 lea %a0@(00000000,%d2:l),%a0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 5d66a: b1c1 cmpal %d1,%a0 5d66c: 6522 bcss 5d690 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN 5d66e: b1c9 cmpal %a1,%a0 5d670: 621e bhis 5d690 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 5d672: 7201 moveq #1,%d1 5d674: c2a8 0004 andl %a0@(4),%d1 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 5d678: 6716 beqs 5d690 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5d67a: 7204 moveq #4,%d1 5d67c: 9280 subl %d0,%d1 5d67e: 2001 movel %d1,%d0 5d680: d088 addl %a0,%d0 5d682: 226e 0010 moveal %fp@(16),%a1 return true; } 5d686: 241f movel %sp@+,%d2 5d688: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5d68a: 2280 movel %d0,%a1@ return true; 5d68c: 7001 moveq #1,%d0 } 5d68e: 4e75 rts 5d690: 241f movel %sp@+,%d2 5d692: 4e5e unlk %fp Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 5d694: 4200 clrb %d0 <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } =============================================================================== 00049126 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 49126: 4e56 ffc8 linkw %fp,#-56 4912a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4912e: 246e 0008 moveal %fp@(8),%a2 uintptr_t const page_size = heap->page_size; 49132: 242a 0010 movel %a2@(16),%d2 uintptr_t const min_block_size = heap->min_block_size; 49136: 262a 0014 movel %a2@(20),%d3 Heap_Block *const first_block = heap->first_block; 4913a: 266a 0020 moveal %a2@(32),%a3 Heap_Block *const last_block = heap->last_block; 4913e: 2a6a 0024 moveal %a2@(36),%a5 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 49142: 4a2e 0013 tstb %fp@(19) 49146: 671a beqs 49162 <_Heap_Walk+0x3c> 49148: 49fa ff86 lea %pc@(490d0 <_Heap_Walk_print>),%a4 if ( !_System_state_Is_up( _System_state_Get() ) ) { 4914c: 7003 moveq #3,%d0 4914e: b0b9 0006 35e2 cmpl 635e2 <_System_state_Current>,%d0 49154: 671a beqs 49170 <_Heap_Walk+0x4a> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } 49156: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 } block = next_block; } while ( block != first_block ); return true; 4915c: 7001 moveq #1,%d0 } 4915e: 4e5e unlk %fp 49160: 4e75 rts uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 49162: 49fa ff64 lea %pc@(490c8 <_Heap_Walk_print_nothing>),%a4 if ( !_System_state_Is_up( _System_state_Get() ) ) { 49166: 7003 moveq #3,%d0 49168: b0b9 0006 35e2 cmpl 635e2 <_System_state_Current>,%d0 4916e: 66e6 bnes 49156 <_Heap_Walk+0x30> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 49170: 2f2a 000c movel %a2@(12),%sp@- 49174: 2f2a 0008 movel %a2@(8),%sp@- 49178: 2f0d movel %a5,%sp@- 4917a: 2f0b movel %a3,%sp@- 4917c: 2f2a 001c movel %a2@(28),%sp@- 49180: 2f2a 0018 movel %a2@(24),%sp@- 49184: 2f03 movel %d3,%sp@- 49186: 2f02 movel %d2,%sp@- 49188: 4879 0005 f616 pea 5f616 <_Copyright_Notice+0x94> 4918e: 42a7 clrl %sp@- 49190: 2f2e 000c movel %fp@(12),%sp@- 49194: 4e94 jsr %a4@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 49196: 4fef 002c lea %sp@(44),%sp 4919a: 4a82 tstl %d2 4919c: 677e beqs 4921c <_Heap_Walk+0xf6> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 4919e: 7003 moveq #3,%d0 491a0: c082 andl %d2,%d0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 491a2: 6600 0090 bnew 49234 <_Heap_Walk+0x10e> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 491a6: 2203 movel %d3,%d1 491a8: 4c42 1000 remul %d2,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 491ac: 4a80 tstl %d0 491ae: 6600 009e bnew 4924e <_Heap_Walk+0x128> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 491b2: 200b movel %a3,%d0 491b4: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 491b6: 4c42 0001 remul %d2,%d1,%d0 ); return false; } if ( 491ba: 4a81 tstl %d1 491bc: 6600 00aa bnew 49268 <_Heap_Walk+0x142> block = next_block; } while ( block != first_block ); return true; } 491c0: 202b 0004 movel %a3@(4),%d0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 491c4: 7801 moveq #1,%d4 491c6: c880 andl %d0,%d4 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 491c8: 6700 00ba beqw 49284 <_Heap_Walk+0x15e> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 491cc: 72fe moveq #-2,%d1 491ce: c2ad 0004 andl %a5@(4),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 491d2: 41f5 1800 lea %a5@(00000000,%d1:l),%a0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 491d6: 7201 moveq #1,%d1 491d8: c2a8 0004 andl %a0@(4),%d1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 491dc: 6726 beqs 49204 <_Heap_Walk+0xde> ); return false; } if ( 491de: b1cb cmpal %a3,%a0 491e0: 6700 00bc beqw 4929e <_Heap_Walk+0x178> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 491e4: 4879 0005 f770 pea 5f770 <_Copyright_Notice+0x1ee> 491ea: 4878 0001 pea 1 491ee: 2f2e 000c movel %fp@(12),%sp@- 491f2: 4e94 jsr %a4@ 491f4: 4fef 000c lea %sp@(12),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 491f8: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 491fa: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 49200: 4e5e unlk %fp 49202: 4e75 rts return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 49204: 4879 0005 f75b pea 5f75b <_Copyright_Notice+0x1d9> 4920a: 4878 0001 pea 1 4920e: 2f2e 000c movel %fp@(12),%sp@- 49212: 4e94 jsr %a4@ 49214: 4fef 000c lea %sp@(12),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49218: 4200 clrb %d0 4921a: 60de bras 491fa <_Heap_Walk+0xd4> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 4921c: 4879 0005 f6a7 pea 5f6a7 <_Copyright_Notice+0x125> 49222: 4878 0001 pea 1 49226: 2f2e 000c movel %fp@(12),%sp@- 4922a: 4e94 jsr %a4@ 4922c: 4fef 000c lea %sp@(12),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49230: 4200 clrb %d0 49232: 60c6 bras 491fa <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 49234: 2f02 movel %d2,%sp@- 49236: 4879 0005 f6ba pea 5f6ba <_Copyright_Notice+0x138> 4923c: 4878 0001 pea 1 49240: 2f2e 000c movel %fp@(12),%sp@- 49244: 4e94 jsr %a4@ 49246: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4924a: 4200 clrb %d0 4924c: 60ac bras 491fa <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 4924e: 2f03 movel %d3,%sp@- 49250: 4879 0005 f6d8 pea 5f6d8 <_Copyright_Notice+0x156> 49256: 4878 0001 pea 1 4925a: 2f2e 000c movel %fp@(12),%sp@- 4925e: 4e94 jsr %a4@ 49260: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49264: 4200 clrb %d0 49266: 6092 bras 491fa <_Heap_Walk+0xd4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 49268: 2f0b movel %a3,%sp@- 4926a: 4879 0005 f6fc pea 5f6fc <_Copyright_Notice+0x17a> 49270: 4878 0001 pea 1 49274: 2f2e 000c movel %fp@(12),%sp@- 49278: 4e94 jsr %a4@ 4927a: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4927e: 4200 clrb %d0 49280: 6000 ff78 braw 491fa <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 49284: 4879 0005 f72d pea 5f72d <_Copyright_Notice+0x1ab> 4928a: 4878 0001 pea 1 4928e: 2f2e 000c movel %fp@(12),%sp@- 49292: 4e94 jsr %a4@ 49294: 4fef 000c lea %sp@(12),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49298: 4200 clrb %d0 4929a: 6000 ff5e braw 491fa <_Heap_Walk+0xd4> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 4929e: 222a 0010 movel %a2@(16),%d1 492a2: 2d41 fffc movel %d1,%fp@(-4) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 492a6: 206a 0008 moveal %a2@(8),%a0 block = next_block; } while ( block != first_block ); return true; } 492aa: 222a 0020 movel %a2@(32),%d1 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 492ae: b1ca cmpal %a2,%a0 492b0: 6700 00c6 beqw 49378 <_Heap_Walk+0x252> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 492b4: b1c1 cmpal %d1,%a0 492b6: 6500 009c bcsw 49354 <_Heap_Walk+0x22e> 492ba: 2a2a 0024 movel %a2@(36),%d5 492be: 2d45 fff0 movel %d5,%fp@(-16) 492c2: b1c5 cmpal %d5,%a0 492c4: 6200 008e bhiw 49354 <_Heap_Walk+0x22e> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 492c8: 43e8 0008 lea %a0@(8),%a1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 492cc: 2c09 movel %a1,%d6 492ce: 2e2e fffc movel %fp@(-4),%d7 492d2: 4c47 6005 remul %d7,%d5,%d6 ); return false; } if ( 492d6: 4a85 tstl %d5 492d8: 6600 02b8 bnew 49592 <_Heap_Walk+0x46c> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 492dc: 7afe moveq #-2,%d5 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 492de: 7c01 moveq #1,%d6 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 492e0: caa8 0004 andl %a0@(4),%d5 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 492e4: ccb0 5804 andl %a0@(00000004,%d5:l),%d6 ); return false; } if ( _Heap_Is_used( free_block ) ) { 492e8: 664e bnes 49338 <_Heap_Walk+0x212> <== NEVER TAKEN 492ea: 2e2e fff0 movel %fp@(-16),%d7 492ee: 224a moveal %a2,%a1 492f0: 2c08 movel %a0,%d6 492f2: 2d42 fff8 movel %d2,%fp@(-8) 492f6: 2d40 fff4 movel %d0,%fp@(-12) ); return false; } if ( free_block->prev != prev_block ) { 492fa: 2a28 000c movel %a0@(12),%d5 492fe: b3c5 cmpal %d5,%a1 49300: 6600 02ac bnew 495ae <_Heap_Walk+0x488> return false; } prev_block = free_block; free_block = free_block->next; 49304: 2068 0008 moveal %a0@(8),%a0 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 49308: b1ca cmpal %a2,%a0 4930a: 6764 beqs 49370 <_Heap_Walk+0x24a> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4930c: b288 cmpl %a0,%d1 4930e: 6244 bhis 49354 <_Heap_Walk+0x22e> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 49310: 2408 movel %a0,%d2 49312: 5082 addql #8,%d2 49314: 2246 moveal %d6,%a1 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 49316: be88 cmpl %a0,%d7 49318: 653a bcss 49354 <_Heap_Walk+0x22e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4931a: 202e fffc movel %fp@(-4),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 4931e: 2c08 movel %a0,%d6 49320: 4c40 2005 remul %d0,%d5,%d2 ); return false; } if ( 49324: 4a85 tstl %d5 49326: 6600 026a bnew 49592 <_Heap_Walk+0x46c> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4932a: 74fe moveq #-2,%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4932c: 7001 moveq #1,%d0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4932e: c4a8 0004 andl %a0@(4),%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 49332: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 49336: 67c2 beqs 492fa <_Heap_Walk+0x1d4> (*printer)( 49338: 2f08 movel %a0,%sp@- 4933a: 4879 0005 f7ef pea 5f7ef <_Copyright_Notice+0x26d> 49340: 4878 0001 pea 1 49344: 2f2e 000c movel %fp@(12),%sp@- 49348: 4e94 jsr %a4@ 4934a: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4934e: 4200 clrb %d0 49350: 6000 fea8 braw 491fa <_Heap_Walk+0xd4> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 49354: 2f08 movel %a0,%sp@- 49356: 4879 0005 f79f pea 5f79f <_Copyright_Notice+0x21d> 4935c: 4878 0001 pea 1 49360: 2f2e 000c movel %fp@(12),%sp@- 49364: 4e94 jsr %a4@ 49366: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4936a: 4200 clrb %d0 4936c: 6000 fe8c braw 491fa <_Heap_Walk+0xd4> 49370: 242e fff8 movel %fp@(-8),%d2 49374: 202e fff4 movel %fp@(-12),%d0 49378: 2d42 fffc movel %d2,%fp@(-4) 4937c: 2e00 movel %d0,%d7 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4937e: 74fe moveq #-2,%d2 49380: 204d moveal %a5,%a0 49382: 2a4b moveal %a3,%a5 49384: 2a0b movel %a3,%d5 49386: 264a moveal %a2,%a3 49388: ce82 andl %d2,%d7 4938a: 2d48 fff8 movel %a0,%fp@(-8) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4938e: 45f5 7800 lea %a5@(00000000,%d7:l),%a2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 49392: b5c1 cmpal %d1,%a2 49394: 6568 bcss 493fe <_Heap_Walk+0x2d8> <== NEVER TAKEN 49396: b5eb 0024 cmpal %a3@(36),%a2 4939a: 6262 bhis 493fe <_Heap_Walk+0x2d8> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 4939c: bbee fff8 cmpal %fp@(-8),%a5 493a0: 56c0 sne %d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 493a2: 2c2e fffc movel %fp@(-4),%d6 493a6: 2407 movel %d7,%d2 493a8: 4480 negl %d0 493aa: 4c46 2001 remul %d6,%d1,%d2 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 493ae: 4a81 tstl %d1 493b0: 6700 0084 beqw 49436 <_Heap_Walk+0x310> 493b4: 4a00 tstb %d0 493b6: 6664 bnes 4941c <_Heap_Walk+0x2f6> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 493b8: 7001 moveq #1,%d0 493ba: c0aa 0004 andl %a2@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 493be: 6700 00e8 beqw 494a8 <_Heap_Walk+0x382> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 493c2: 4a84 tstl %d4 493c4: 6700 00c6 beqw 4948c <_Heap_Walk+0x366> (*printer)( 493c8: 2f07 movel %d7,%sp@- 493ca: 2f0d movel %a5,%sp@- 493cc: 4879 0005 f994 pea 5f994 <_Copyright_Notice+0x412> 493d2: 42a7 clrl %sp@- 493d4: 2f2e 000c movel %fp@(12),%sp@- 493d8: 4e94 jsr %a4@ 493da: 4fef 0014 lea %sp@(20),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 493de: b5c5 cmpal %d5,%a2 493e0: 6700 fd74 beqw 49156 <_Heap_Walk+0x30> 493e4: 2e2a 0004 movel %a2@(4),%d7 493e8: 7801 moveq #1,%d4 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 493ea: 74fe moveq #-2,%d2 493ec: 2a4a moveal %a2,%a5 493ee: c887 andl %d7,%d4 493f0: ce82 andl %d2,%d7 493f2: 222b 0020 movel %a3@(32),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 493f6: 45f5 7800 lea %a5@(00000000,%d7:l),%a2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 493fa: b5c1 cmpal %d1,%a2 493fc: 6498 bccs 49396 <_Heap_Walk+0x270> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 493fe: 2f0a movel %a2,%sp@- 49400: 2f0d movel %a5,%sp@- 49402: 4879 0005 f83d pea 5f83d <_Copyright_Notice+0x2bb> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 49408: 4878 0001 pea 1 4940c: 2f2e 000c movel %fp@(12),%sp@- 49410: 4e94 jsr %a4@ "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49412: 4fef 0014 lea %sp@(20),%sp 49416: 4200 clrb %d0 49418: 6000 fde0 braw 491fa <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 4941c: 2f07 movel %d7,%sp@- 4941e: 2f0d movel %a5,%sp@- 49420: 4879 0005 f86a pea 5f86a <_Copyright_Notice+0x2e8> 49426: 4878 0001 pea 1 4942a: 2f2e 000c movel %fp@(12),%sp@- 4942e: 4e94 jsr %a4@ "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49430: 4fef 0014 lea %sp@(20),%sp 49434: 60e0 bras 49416 <_Heap_Walk+0x2f0> } if ( block_size < min_block_size && is_not_last_block ) { 49436: be83 cmpl %d3,%d7 49438: 642c bccs 49466 <_Heap_Walk+0x340> 4943a: 4a00 tstb %d0 4943c: 6700 ff7a beqw 493b8 <_Heap_Walk+0x292> (*printer)( 49440: 2f03 movel %d3,%sp@- 49442: 2f07 movel %d7,%sp@- 49444: 2f0d movel %a5,%sp@- 49446: 4879 0005 f898 pea 5f898 <_Copyright_Notice+0x316> 4944c: 4878 0001 pea 1 49450: 2f2e 000c movel %fp@(12),%sp@- 49454: 4e94 jsr %a4@ block, block_size, min_block_size ); return false; 49456: 4fef 0018 lea %sp@(24),%sp block = next_block; } while ( block != first_block ); return true; } 4945a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 block, block_size, min_block_size ); return false; 49460: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 49462: 4e5e unlk %fp 49464: 4e75 rts ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 49466: b5cd cmpal %a5,%a2 49468: 6200 ff4e bhiw 493b8 <_Heap_Walk+0x292> 4946c: 4a00 tstb %d0 4946e: 6700 ff48 beqw 493b8 <_Heap_Walk+0x292> (*printer)( 49472: 2f0a movel %a2,%sp@- 49474: 2f0d movel %a5,%sp@- 49476: 4879 0005 f8c3 pea 5f8c3 <_Copyright_Notice+0x341> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 4947c: 4878 0001 pea 1 49480: 2f2e 000c movel %fp@(12),%sp@- 49484: 4e94 jsr %a4@ "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49486: 4fef 0014 lea %sp@(20),%sp 4948a: 608a bras 49416 <_Heap_Walk+0x2f0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 4948c: 2f15 movel %a5@,%sp@- 4948e: 2f07 movel %d7,%sp@- 49490: 2f0d movel %a5,%sp@- 49492: 4879 0005 f9ab pea 5f9ab <_Copyright_Notice+0x429> 49498: 42a7 clrl %sp@- 4949a: 2f2e 000c movel %fp@(12),%sp@- 4949e: 4e94 jsr %a4@ 494a0: 4fef 0018 lea %sp@(24),%sp 494a4: 6000 ff38 braw 493de <_Heap_Walk+0x2b8> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 494a8: 206b 0008 moveal %a3@(8),%a0 block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 494ac: 222d 0008 movel %a5@(8),%d1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 494b0: b2ab 000c cmpl %a3@(12),%d1 494b4: 6700 00b6 beqw 4956c <_Heap_Walk+0x446> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 494b8: 43f9 0005 f4be lea 5f4be ,%a1 494be: b28b cmpl %a3,%d1 494c0: 676e beqs 49530 <_Heap_Walk+0x40a> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 494c2: 202d 000c movel %a5@(12),%d0 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 494c6: b088 cmpl %a0,%d0 494c8: 6700 0098 beqw 49562 <_Heap_Walk+0x43c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 494cc: 41f9 0005 f4be lea 5f4be ,%a0 494d2: b08b cmpl %a3,%d0 494d4: 6762 beqs 49538 <_Heap_Walk+0x412> Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 494d6: 2f09 movel %a1,%sp@- 494d8: 2f01 movel %d1,%sp@- 494da: 2f08 movel %a0,%sp@- 494dc: 2f00 movel %d0,%sp@- 494de: 2f07 movel %d7,%sp@- 494e0: 2f0d movel %a5,%sp@- 494e2: 4879 0005 f8f7 pea 5f8f7 <_Copyright_Notice+0x375> 494e8: 42a7 clrl %sp@- 494ea: 2f2e 000c movel %fp@(12),%sp@- 494ee: 4e94 jsr %a4@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 494f0: 2012 movel %a2@,%d0 494f2: 4fef 0024 lea %sp@(36),%sp 494f6: b087 cmpl %d7,%d0 494f8: 6646 bnes 49540 <_Heap_Walk+0x41a> ); return false; } if ( !prev_used ) { 494fa: 4a84 tstl %d4 494fc: 6778 beqs 49576 <_Heap_Walk+0x450> 494fe: 206b 0008 moveal %a3@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 49502: b1cb cmpal %a3,%a0 49504: 670e beqs 49514 <_Heap_Walk+0x3ee> <== NEVER TAKEN if ( free_block == block ) { 49506: b1cd cmpal %a5,%a0 49508: 6700 fed4 beqw 493de <_Heap_Walk+0x2b8> return true; } free_block = free_block->next; 4950c: 2068 0008 moveal %a0@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 49510: b1cb cmpal %a3,%a0 49512: 66f2 bnes 49506 <_Heap_Walk+0x3e0> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 49514: 2f0d movel %a5,%sp@- 49516: 4879 0005 f9d0 pea 5f9d0 <_Copyright_Notice+0x44e> 4951c: 4878 0001 pea 1 49520: 2f2e 000c movel %fp@(12),%sp@- 49524: 4e94 jsr %a4@ 49526: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4952a: 4200 clrb %d0 4952c: 6000 fccc braw 491fa <_Heap_Walk+0xd4> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 49530: 43f9 0005 f5f2 lea 5f5f2 <_Copyright_Notice+0x70>,%a1 49536: 608a bras 494c2 <_Heap_Walk+0x39c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 49538: 41f9 0005 f60c lea 5f60c <_Copyright_Notice+0x8a>,%a0 4953e: 6096 bras 494d6 <_Heap_Walk+0x3b0> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 49540: 2f0a movel %a2,%sp@- 49542: 2f00 movel %d0,%sp@- 49544: 2f07 movel %d7,%sp@- 49546: 2f0d movel %a5,%sp@- 49548: 4879 0005 f92c pea 5f92c <_Copyright_Notice+0x3aa> 4954e: 4878 0001 pea 1 49552: 2f2e 000c movel %fp@(12),%sp@- 49556: 4e94 jsr %a4@ 49558: 4fef 001c lea %sp@(28),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4955c: 4200 clrb %d0 4955e: 6000 fc9a braw 491fa <_Heap_Walk+0xd4> Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 49562: 41f9 0005 f5fc lea 5f5fc <_Copyright_Notice+0x7a>,%a0 49568: 6000 ff6c braw 494d6 <_Heap_Walk+0x3b0> 4956c: 43f9 0005 f5e3 lea 5f5e3 <_Copyright_Notice+0x61>,%a1 49572: 6000 ff4e braw 494c2 <_Heap_Walk+0x39c> return false; } if ( !prev_used ) { (*printer)( 49576: 2f0d movel %a5,%sp@- 49578: 4879 0005 f965 pea 5f965 <_Copyright_Notice+0x3e3> 4957e: 4878 0001 pea 1 49582: 2f2e 000c movel %fp@(12),%sp@- 49586: 4e94 jsr %a4@ 49588: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4958c: 4200 clrb %d0 4958e: 6000 fc6a braw 491fa <_Heap_Walk+0xd4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 49592: 2f08 movel %a0,%sp@- 49594: 4879 0005 f7bf pea 5f7bf <_Copyright_Notice+0x23d> 4959a: 4878 0001 pea 1 4959e: 2f2e 000c movel %fp@(12),%sp@- 495a2: 4e94 jsr %a4@ 495a4: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 495a8: 4200 clrb %d0 495aa: 6000 fc4e braw 491fa <_Heap_Walk+0xd4> return false; } if ( free_block->prev != prev_block ) { (*printer)( 495ae: 2f05 movel %d5,%sp@- 495b0: 2f08 movel %a0,%sp@- 495b2: 4879 0005 f80b pea 5f80b <_Copyright_Notice+0x289> 495b8: 4878 0001 pea 1 495bc: 2f2e 000c movel %fp@(12),%sp@- 495c0: 4e94 jsr %a4@ 495c2: 4fef 0014 lea %sp@(20),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 495c6: 4200 clrb %d0 495c8: 6000 fc30 braw 491fa <_Heap_Walk+0xd4> =============================================================================== 00047d04 <_IO_Initialize_all_drivers>: void _IO_Initialize_all_drivers( void ) { 47d04: 4e56 0000 linkw %fp,#0 47d08: 2f0a movel %a2,%sp@- 47d0a: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47d0c: 4ab9 0006 184a tstl 6184a <_IO_Number_of_drivers> 47d12: 671e beqs 47d32 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 47d14: 4282 clrl %d2 47d16: 45f9 0004 ce68 lea 4ce68 ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 47d1c: 42a7 clrl %sp@- 47d1e: 42a7 clrl %sp@- 47d20: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47d22: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 47d24: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47d26: 4fef 000c lea %sp@(12),%sp 47d2a: b4b9 0006 184a cmpl 6184a <_IO_Number_of_drivers>,%d2 47d30: 65ea bcss 47d1c <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 47d32: 242e fff8 movel %fp@(-8),%d2 47d36: 246e fffc moveal %fp@(-4),%a2 47d3a: 4e5e unlk %fp ... =============================================================================== 00047c64 <_IO_Manager_initialization>: #include #include void _IO_Manager_initialization(void) { 47c64: 4e56 fff0 linkw %fp,#-16 47c68: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); 47c6c: 2439 0005 d990 movel 5d990 ,%d2 drivers_in_table = rtems_configuration_get_number_of_device_drivers(); 47c72: 2839 0005 d98c movel 5d98c ,%d4 number_of_drivers = rtems_configuration_get_maximum_drivers(); 47c78: 2639 0005 d988 movel 5d988 ,%d3 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 47c7e: b684 cmpl %d4,%d3 47c80: 636c blss 47cee <_IO_Manager_initialization+0x8a> * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 47c82: 2003 movel %d3,%d0 47c84: 2a03 movel %d3,%d5 47c86: e788 lsll #3,%d0 47c88: eb8d lsll #5,%d5 47c8a: 9a80 subl %d0,%d5 47c8c: 2f05 movel %d5,%sp@- 47c8e: 4eb9 0004 acf6 jsr 4acf6 <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 47c94: 2f05 movel %d5,%sp@- 47c96: 42a7 clrl %sp@- /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 47c98: 23c0 0006 184e movel %d0,6184e <_IO_Driver_address_table> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 47c9e: 2f00 movel %d0,%sp@- _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 47ca0: 23c3 0006 184a movel %d3,6184a <_IO_Number_of_drivers> memset( 47ca6: 4eb9 0004 f8b4 jsr 4f8b4 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 47cac: 4fef 0010 lea %sp@(16),%sp 47cb0: 4a84 tstl %d4 47cb2: 6730 beqs 47ce4 <_IO_Manager_initialization+0x80><== NEVER TAKEN #include #include #include void _IO_Manager_initialization(void) 47cb4: 2a04 movel %d4,%d5 47cb6: 2204 movel %d4,%d1 47cb8: 4280 clrl %d0 47cba: e78d lsll #3,%d5 47cbc: eb89 lsll #5,%d1 47cbe: 2639 0006 184e movel 6184e <_IO_Driver_address_table>,%d3 47cc4: 9285 subl %d5,%d1 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 47cc6: 2242 moveal %d2,%a1 47cc8: 2043 moveal %d3,%a0 47cca: d3c0 addal %d0,%a1 47ccc: d1c0 addal %d0,%a0 47cce: 0680 0000 0018 addil #24,%d0 47cd4: 20d9 movel %a1@+,%a0@+ 47cd6: 20d9 movel %a1@+,%a0@+ 47cd8: 20d9 movel %a1@+,%a0@+ 47cda: 20d9 movel %a1@+,%a0@+ 47cdc: 20d9 movel %a1@+,%a0@+ 47cde: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 47ce0: b280 cmpl %d0,%d1 47ce2: 66e2 bnes 47cc6 <_IO_Manager_initialization+0x62> _IO_Driver_address_table[index] = driver_table[index]; } 47ce4: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 47cea: 4e5e unlk %fp 47cec: 4e75 rts * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 47cee: 23c2 0006 184e movel %d2,6184e <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 47cf4: 23c4 0006 184a movel %d4,6184a <_IO_Number_of_drivers> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } 47cfa: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 47d00: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048974 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48974: 4e56 ffe8 linkw %fp,#-24 48978: 48d7 001c moveml %d2-%d4,%sp@ Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); 4897c: 4879 0004 a854 pea 4a854 <_User_extensions_Fatal_visitor> 48982: 262e 0010 movel %fp@(16),%d3 48986: 486e fff6 pea %fp@(-10) 4898a: 282e 0008 movel %fp@(8),%d4 4898e: 242e 000c movel %fp@(12),%d2 Internal_errors_Source source, bool is_internal, Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; 48992: 2d44 fff6 movel %d4,%fp@(-10) 48996: 1d42 fffa moveb %d2,%fp@(-6) 4899a: 2d43 fffc movel %d3,%fp@(-4) _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); 4899e: 4eb9 0004 a884 jsr 4a884 <_User_extensions_Iterate> _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 489a4: 13c2 0006 1414 moveb %d2,61414 <_Internal_errors_What_happened+0x4><== NOT EXECUTED _Internal_errors_What_happened.the_error = the_error; _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 489aa: 2043 moveal %d3,%a0 <== NOT EXECUTED 489ac: 243c 0000 0700 movel #1792,%d2 <== NOT EXECUTED Internal_errors_t the_error ) { _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; 489b2: 23c4 0006 1410 movel %d4,61410 <_Internal_errors_What_happened><== NOT EXECUTED _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 489b8: 23c3 0006 1416 movel %d3,61416 <_Internal_errors_What_happened+0x6><== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 489be: 40c0 movew %sr,%d0 <== NOT EXECUTED 489c0: 8082 orl %d2,%d0 <== NOT EXECUTED 489c2: 46c0 movew %d0,%sr <== NOT EXECUTED 489c4: 2008 movel %a0,%d0 <== NOT EXECUTED 489c6: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 489cc: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 489ce: 7005 moveq #5,%d0 <== NOT EXECUTED 489d0: 508f addql #8,%sp <== NOT EXECUTED 489d2: 23c0 0006 141a movel %d0,6141a <_System_state_Current> <== NOT EXECUTED 489d8: 60fe bras 489d8 <_Internal_error_Occurred+0x64> <== NOT EXECUTED ... =============================================================================== 00048a3c <_Objects_Allocate>: #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { 48a3c: 4e56 fff0 linkw %fp,#-16 48a40: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 48a44: 246e 0008 moveal %fp@(8),%a2 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 48a48: 4aaa 0014 tstl %a2@(20) 48a4c: 6770 beqs 48abe <_Objects_Allocate+0x82> <== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 48a4e: 240a movel %a2,%d2 48a50: 0682 0000 001c addil #28,%d2 48a56: 47f9 0004 7fcc lea 47fcc <_Chain_Get>,%a3 48a5c: 2f02 movel %d2,%sp@- 48a5e: 4e93 jsr %a3@ if ( information->auto_extend ) { 48a60: 588f addql #4,%sp 48a62: 4a2a 0010 tstb %a2@(16) 48a66: 673a beqs 48aa2 <_Objects_Allocate+0x66> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 48a68: 4a80 tstl %d0 48a6a: 6740 beqs 48aac <_Objects_Allocate+0x70> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 48a6c: 2040 moveal %d0,%a0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 48a6e: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 48a70: 2228 0008 movel %a0@(8),%d1 48a74: 262a 0006 movel %a2@(6),%d3 48a78: 0281 0000 ffff andil #65535,%d1 48a7e: 0283 0000 ffff andil #65535,%d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 48a84: 342a 0012 movew %a2@(18),%d2 information->inactive_per_block[ block ]--; 48a88: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 48a8c: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 48a8e: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; information->inactive--; 48a92: 326a 0028 moveaw %a2@(40),%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 48a96: e589 lsll #2,%d1 information->inactive--; 48a98: 5389 subql #1,%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 48a9a: d1c1 addal %d1,%a0 48a9c: 5390 subql #1,%a0@ information->inactive--; 48a9e: 3549 0028 movew %a1,%a2@(40) ); } #endif return the_object; } 48aa2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 48aa8: 4e5e unlk %fp 48aaa: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 48aac: 2f0a movel %a2,%sp@- 48aae: 4eb9 0004 8af8 jsr 48af8 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 48ab4: 2f02 movel %d2,%sp@- 48ab6: 4e93 jsr %a3@ } if ( the_object ) { 48ab8: 508f addql #8,%sp 48aba: 4a80 tstl %d0 48abc: 66ae bnes 48a6c <_Objects_Allocate+0x30> * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) return NULL; 48abe: 4280 clrl %d0 ); } #endif return the_object; } 48ac0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 48ac6: 4e5e unlk %fp ... =============================================================================== 00048acc <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 48acc: 4e56 0000 linkw %fp,#0 48ad0: 226e 000c moveal %fp@(12),%a1 48ad4: 206e 0008 moveal %fp@(8),%a0 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 48ad8: 2029 0008 movel %a1@(8),%d0 48adc: 2f0a movel %a2,%sp@- #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48ade: 2468 0018 moveal %a0@(24),%a2 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 48ae2: 0280 0000 ffff andil #65535,%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48ae8: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 48aec: 245f moveal %sp@+,%a2 48aee: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 48af0: 4ef9 0004 9080 jmp 49080 <_Objects_Namespace_remove> ... =============================================================================== 00048af8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 48af8: 4e56 ffc8 linkw %fp,#-56 48afc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48b00: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 48b04: 2a2a 0006 movel %a2@(6),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48b08: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 48b0c: 0285 0000 ffff andil #65535,%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48b12: 4a88 tstl %a0 48b14: 6700 020c beqw 48d22 <_Objects_Extend_information+0x22a> block_count = 0; else { block_count = information->maximum / information->allocation_size; 48b18: 3e2a 000e movew %a2@(14),%d7 48b1c: 302a 0012 movew %a2@(18),%d0 48b20: 3807 movew %d7,%d4 48b22: 0284 0000 ffff andil #65535,%d4 48b28: 88c0 divuw %d0,%d4 48b2a: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 48b30: 6700 0260 beqw 48d92 <_Objects_Extend_information+0x29a> if ( information->object_blocks[ block ] == NULL ) { 48b34: 4a90 tstl %a0@ 48b36: 6700 026c beqw 48da4 <_Objects_Extend_information+0x2ac> * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 48b3a: 5888 addql #4,%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 48b3c: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 48b3e: 4282 clrl %d2 48b40: 0280 0000 ffff andil #65535,%d0 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 48b46: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 48b48: 5282 addql #1,%d2 48b4a: b484 cmpl %d4,%d2 48b4c: 6400 01ac bccw 48cfa <_Objects_Extend_information+0x202> if ( information->object_blocks[ block ] == NULL ) { 48b50: 4a98 tstl %a0@+ 48b52: 66f2 bnes 48b46 <_Objects_Extend_information+0x4e> do_extend = false; 48b54: 97cb subal %a3,%a3 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 48b56: 0287 0000 ffff andil #65535,%d7 48b5c: de80 addl %d0,%d7 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 48b5e: 0c87 0000 ffff cmpil #65535,%d7 48b64: 6200 018a bhiw 48cf0 <_Objects_Extend_information+0x1f8> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 48b68: 41ea 0014 lea %a2@(20),%a0 48b6c: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 48b70: 4a2a 0010 tstb %a2@(16) 48b74: 6700 018c beqw 48d02 <_Objects_Extend_information+0x20a> new_object_block = _Workspace_Allocate( block_size ); 48b78: 2f00 movel %d0,%sp@- 48b7a: 4eb9 0004 acc0 jsr 4acc0 <_Workspace_Allocate> if ( !new_object_block ) 48b80: 588f addql #4,%sp * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 48b82: 2c00 movel %d0,%d6 if ( !new_object_block ) 48b84: 6700 016a beqw 48cf0 <_Objects_Extend_information+0x1f8> } /* * Do we need to grow the tables? */ if ( do_extend ) { 48b88: 300b movew %a3,%d0 48b8a: 4a00 tstb %d0 48b8c: 6700 00c4 beqw 48c52 <_Objects_Extend_information+0x15a> */ /* * Up the block count and maximum */ block_count++; 48b90: 2844 moveal %d4,%a4 48b92: 528c addql #1,%a4 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); 48b94: 2007 movel %d7,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 48b96: 41f4 ca00 lea %a4@(00000000,%a4:l:2),%a0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 48b9a: d088 addl %a0,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 48b9c: d085 addl %d5,%d0 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 48b9e: e588 lsll #2,%d0 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { 48ba0: 4a2a 0010 tstb %a2@(16) 48ba4: 6700 016c beqw 48d12 <_Objects_Extend_information+0x21a> object_blocks = _Workspace_Allocate( block_size ); 48ba8: 2f00 movel %d0,%sp@- 48baa: 4eb9 0004 acc0 jsr 4acc0 <_Workspace_Allocate> if ( !object_blocks ) { 48bb0: 588f addql #4,%sp */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { object_blocks = _Workspace_Allocate( block_size ); 48bb2: 2640 moveal %d0,%a3 if ( !object_blocks ) { 48bb4: 4a80 tstl %d0 48bb6: 6700 01c6 beqw 48d7e <_Objects_Extend_information+0x286> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 48bba: 220c movel %a4,%d1 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 48bbc: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 48bbe: e589 lsll #2,%d1 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 48bc0: 302a 000e movew %a2@(14),%d0 48bc4: 43f3 1800 lea %a3@(00000000,%d1:l),%a1 48bc8: 49f1 1800 lea %a1@(00000000,%d1:l),%a4 48bcc: b085 cmpl %d5,%d0 48bce: 6200 016a bhiw 48d3a <_Objects_Extend_information+0x242> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 48bd2: 4a85 tstl %d5 48bd4: 670c beqs 48be2 <_Objects_Extend_information+0xea><== NEVER TAKEN * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 48bd6: 204c moveal %a4,%a0 48bd8: 4bf4 5c00 lea %a4@(00000000,%d5:l:4),%a5 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 48bdc: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 48bde: bbc8 cmpal %a0,%a5 48be0: 66fa bnes 48bdc <_Objects_Extend_information+0xe4><== NEVER TAKEN 48be2: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 48be4: 4280 clrl %d0 48be6: 2203 movel %d3,%d1 48be8: 302a 0012 movew %a2@(18),%d0 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 48bec: 42b3 4800 clrl %a3@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 48bf0: d280 addl %d0,%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 48bf2: 42b1 4800 clrl %a1@(00000000,%d4:l) for ( index=index_base ; 48bf6: b283 cmpl %d3,%d1 48bf8: 630e blss 48c08 <_Objects_Extend_information+0x110><== NEVER TAKEN * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 48bfa: 4281 clrl %d1 48bfc: 41f4 3c00 lea %a4@(00000000,%d3:l:4),%a0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 48c00: 4298 clrl %a0@+ 48c02: 5281 addql #1,%d1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 48c04: b081 cmpl %d1,%d0 48c06: 66f8 bnes 48c00 <_Objects_Extend_information+0x108> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 48c08: 203c 0000 0700 movel #1792,%d0 48c0e: 40c4 movew %sr,%d4 48c10: 8084 orl %d4,%d0 48c12: 46c0 movew %d0,%sr uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48c14: 2012 movel %a2@,%d0 48c16: 7a18 moveq #24,%d5 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 48c18: 4281 clrl %d1 48c1a: eba8 lsll %d5,%d0 48c1c: 322a 0004 movew %a2@(4),%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48c20: 1a3c 001b moveb #27,%d5 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48c24: 08c0 0010 bset #16,%d0 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48c28: eba9 lsll %d5,%d1 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 48c2a: 206a 002e moveal %a2@(46),%a0 48c2e: 8081 orl %d1,%d0 information->object_blocks = object_blocks; 48c30: 254b 002e movel %a3,%a2@(46) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48c34: 8087 orl %d7,%d0 information->inactive_per_block = inactive_per_block; 48c36: 2549 002a movel %a1,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 48c3a: 3547 000e movew %d7,%a2@(14) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 48c3e: 254c 0018 movel %a4,%a2@(24) 48c42: 2540 000a movel %d0,%a2@(10) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 48c46: 46c4 movew %d4,%sr _Workspace_Free( old_tables ); 48c48: 2f08 movel %a0,%sp@- 48c4a: 4eb9 0004 acdc jsr 4acdc <_Workspace_Free> 48c50: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 48c52: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48c56: 4280 clrl %d0 48c58: 280e movel %fp,%d4 48c5a: 0684 ffff fff4 addil #-12,%d4 48c60: 47f9 0004 7fcc lea 47fcc <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 48c66: 2a0a movel %a2,%d5 48c68: 0685 0000 001c addil #28,%d5 48c6e: 49f9 0004 7f94 lea 47f94 <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 48c74: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48c76: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 48c7a: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48c7e: 2f2a 0014 movel %a2@(20),%sp@- 48c82: 206a 002e moveal %a2@(46),%a0 48c86: 2f00 movel %d0,%sp@- 48c88: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 48c8c: 2f04 movel %d4,%sp@- 48c8e: 4eb9 0004 8008 jsr 48008 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 48c94: 4fef 0010 lea %sp@(16),%sp 48c98: 2f04 movel %d4,%sp@- 48c9a: 4e93 jsr %a3@ 48c9c: 588f addql #4,%sp 48c9e: 4a80 tstl %d0 48ca0: 6734 beqs 48cd6 <_Objects_Extend_information+0x1de><== NEVER TAKEN 48ca2: 2212 movel %a2@,%d1 48ca4: 7e18 moveq #24,%d7 the_object->id = _Objects_Build_id( 48ca6: 4286 clrl %d6 48ca8: 2040 moveal %d0,%a0 48caa: 3c2a 0004 movew %a2@(4),%d6 48cae: efa9 lsll %d7,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48cb0: 1e3c 001b moveb #27,%d7 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48cb4: 08c1 0010 bset #16,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48cb8: efae lsll %d7,%d6 48cba: 8286 orl %d6,%d1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48cbc: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 48cbe: 5283 addql #1,%d3 48cc0: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 48cc4: 2f00 movel %d0,%sp@- 48cc6: 2f05 movel %d5,%sp@- 48cc8: 4e94 jsr %a4@ index++; 48cca: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 48ccc: 2f04 movel %d4,%sp@- 48cce: 4e93 jsr %a3@ 48cd0: 588f addql #4,%sp 48cd2: 4a80 tstl %d0 48cd4: 66cc bnes 48ca2 <_Objects_Extend_information+0x1aa> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 48cd6: 4281 clrl %d1 48cd8: 302a 0012 movew %a2@(18),%d0 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 48cdc: 326a 0028 moveaw %a2@(40),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 48ce0: 206a 002a moveal %a2@(42),%a0 48ce4: 3200 movew %d0,%d1 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 48ce6: d089 addl %a1,%d0 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 48ce8: 2181 2800 movel %d1,%a0@(00000000,%d2:l) information->inactive = 48cec: 3540 0028 movew %d0,%a2@(40) (Objects_Maximum)(information->inactive + information->allocation_size); } 48cf0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 48cf6: 4e5e unlk %fp 48cf8: 4e75 rts /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 48cfa: 367c 0001 moveaw #1,%a3 48cfe: 6000 fe56 braw 48b56 <_Objects_Extend_information+0x5e> if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 48d02: 2f00 movel %d0,%sp@- 48d04: 4eb9 0004 acf6 jsr 4acf6 <_Workspace_Allocate_or_fatal_error> 48d0a: 588f addql #4,%sp 48d0c: 2c00 movel %d0,%d6 48d0e: 6000 fe78 braw 48b88 <_Objects_Extend_information+0x90> if ( !object_blocks ) { _Workspace_Free( new_object_block ); return; } } else { object_blocks = _Workspace_Allocate_or_fatal_error( block_size ); 48d12: 2f00 movel %d0,%sp@- 48d14: 4eb9 0004 acf6 jsr 4acf6 <_Workspace_Allocate_or_fatal_error> 48d1a: 588f addql #4,%sp 48d1c: 2640 moveal %d0,%a3 48d1e: 6000 fe9a braw 48bba <_Objects_Extend_information+0xc2> 48d22: 4280 clrl %d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 48d24: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 48d26: 4282 clrl %d2 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 48d28: 4284 clrl %d4 48d2a: 3e2a 000e movew %a2@(14),%d7 48d2e: 302a 0012 movew %a2@(18),%d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 48d32: 367c 0001 moveaw #1,%a3 48d36: 6000 fe1e braw 48b56 <_Objects_Extend_information+0x5e> /* * 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, 48d3a: 4bf9 0004 f844 lea 4f844 ,%a5 48d40: e58c lsll #2,%d4 48d42: 2f04 movel %d4,%sp@- 48d44: 2f2a 002e movel %a2@(46),%sp@- 48d48: 2d49 fff0 movel %a1,%fp@(-16) 48d4c: 2f0b movel %a3,%sp@- 48d4e: 4e95 jsr %a5@ information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 48d50: 226e fff0 moveal %fp@(-16),%a1 48d54: 2f04 movel %d4,%sp@- 48d56: 2f2a 002a movel %a2@(42),%sp@- 48d5a: 2f09 movel %a1,%sp@- 48d5c: 4e95 jsr %a5@ information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 48d5e: 4280 clrl %d0 48d60: 302a 000e movew %a2@(14),%d0 48d64: da80 addl %d0,%d5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 48d66: e58d lsll #2,%d5 48d68: 2f05 movel %d5,%sp@- 48d6a: 2f2a 0018 movel %a2@(24),%sp@- 48d6e: 2f0c movel %a4,%sp@- 48d70: 4e95 jsr %a5@ 48d72: 226e fff0 moveal %fp@(-16),%a1 48d76: 4fef 0024 lea %sp@(36),%sp 48d7a: 6000 fe68 braw 48be4 <_Objects_Extend_information+0xec> (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { object_blocks = _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 48d7e: 2f06 movel %d6,%sp@- 48d80: 4eb9 0004 acdc jsr 4acdc <_Workspace_Free> 48d86: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 48d88: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 48d8e: 4e5e unlk %fp 48d90: 4e75 rts /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 48d92: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 48d94: 4282 clrl %d2 <== NOT EXECUTED 48d96: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 48d9c: 367c 0001 moveaw #1,%a3 <== NOT EXECUTED 48da0: 6000 fdb4 braw 48b56 <_Objects_Extend_information+0x5e><== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); 48da4: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 48da6: 4282 clrl %d2 <== NOT EXECUTED 48da8: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 48dae: 97cb subal %a3,%a3 <== NOT EXECUTED 48db0: 6000 fda4 braw 48b56 <_Objects_Extend_information+0x5e><== NOT EXECUTED =============================================================================== 00048e6c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 48e6c: 4e56 0000 linkw %fp,#0 48e70: 2f03 movel %d3,%sp@- 48e72: 262e 0008 movel %fp@(8),%d3 48e76: 2f02 movel %d2,%sp@- 48e78: 342e 000e movew %fp@(14),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 48e7c: 6740 beqs 48ebe <_Objects_Get_information+0x52> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 48e7e: 2f03 movel %d3,%sp@- 48e80: 4eb9 0004 d310 jsr 4d310 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 48e86: 588f addql #4,%sp 48e88: 4a80 tstl %d0 48e8a: 6732 beqs 48ebe <_Objects_Get_information+0x52> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 48e8c: 0282 0000 ffff andil #65535,%d2 48e92: b480 cmpl %d0,%d2 48e94: 6228 bhis 48ebe <_Objects_Get_information+0x52> return NULL; if ( !_Objects_Information_table[ the_api ] ) 48e96: 41f9 0006 0fa2 lea 60fa2 <_Objects_Information_table>,%a0 48e9c: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 48ea0: 4a88 tstl %a0 48ea2: 671a beqs 48ebe <_Objects_Get_information+0x52> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 48ea4: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 48ea8: 6714 beqs 48ebe <_Objects_Get_information+0x52> <== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 48eaa: 2040 moveal %d0,%a0 48eac: 4a68 000e tstw %a0@(14) 48eb0: 670c beqs 48ebe <_Objects_Get_information+0x52> return NULL; #endif return info; } 48eb2: 242e fff8 movel %fp@(-8),%d2 48eb6: 262e fffc movel %fp@(-4),%d3 48eba: 4e5e unlk %fp 48ebc: 4e75 rts 48ebe: 242e fff8 movel %fp@(-8),%d2 { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; 48ec2: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 48ec4: 262e fffc movel %fp@(-4),%d3 48ec8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000563a8 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 563a8: 4e56 ffe0 linkw %fp,#-32 563ac: 48d7 043c moveml %d2-%d5/%a2,%sp@ 563b0: 262e 000c movel %fp@(12),%d3 563b4: 282e 0010 movel %fp@(16),%d4 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 563b8: 4a83 tstl %d3 563ba: 6700 00a8 beqw 56464 <_Objects_Get_name_as_string+0xbc> return NULL; if ( name == NULL ) 563be: 4a84 tstl %d4 563c0: 6700 00a2 beqw 56464 <_Objects_Get_name_as_string+0xbc> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 563c4: 4aae 0008 tstl %fp@(8) 563c8: 6600 0092 bnew 5645c <_Objects_Get_name_as_string+0xb4> 563cc: 2079 0006 fa12 moveal 6fa12 <_Per_CPU_Information+0xe>,%a0 563d2: 2428 0008 movel %a0@(8),%d2 information = _Objects_Get_information_id( tmpId ); 563d6: 2f02 movel %d2,%sp@- 563d8: 4eb9 0004 eb1c jsr 4eb1c <_Objects_Get_information_id> if ( !information ) 563de: 588f addql #4,%sp if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId ); 563e0: 2440 moveal %d0,%a2 if ( !information ) 563e2: 4a80 tstl %d0 563e4: 677e beqs 56464 <_Objects_Get_name_as_string+0xbc> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 563e6: 486e fff6 pea %fp@(-10) 563ea: 2f02 movel %d2,%sp@- 563ec: 2f00 movel %d0,%sp@- 563ee: 4eb9 0004 ec10 jsr 4ec10 <_Objects_Get> switch ( location ) { 563f4: 4fef 000c lea %sp@(12),%sp 563f8: 4aae fff6 tstl %fp@(-10) 563fc: 6666 bnes 56464 <_Objects_Get_name_as_string+0xbc> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 563fe: 4a2a 0032 tstb %a2@(50) 56402: 676e beqs 56472 <_Objects_Get_name_as_string+0xca> s = the_object->name.name_p; 56404: 2040 moveal %d0,%a0 56406: 2268 000c moveal %a0@(12),%a1 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 5640a: 4a89 tstl %a1 5640c: 6700 0098 beqw 564a6 <_Objects_Get_name_as_string+0xfe> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 56410: 5383 subql #1,%d3 56412: 6700 0092 beqw 564a6 <_Objects_Get_name_as_string+0xfe> 56416: 1211 moveb %a1@,%d1 56418: 6700 008c beqw 564a6 <_Objects_Get_name_as_string+0xfe> * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( 5641c: d689 addl %a1,%d3 5641e: 5289 addql #1,%a1 56420: 2044 moveal %d4,%a0 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; 56422: 4282 clrl %d2 56424: 1401 moveb %d1,%d2 56426: 2479 0006 d820 moveal 6d820 <__ctype_ptr__>,%a2 5642c: 1432 2801 moveb %a2@(00000001,%d2:l),%d2 56430: 49c2 extbl %d2 56432: 0282 0000 0097 andil #151,%d2 56438: 6602 bnes 5643c <_Objects_Get_name_as_string+0x94> 5643a: 722a moveq #42,%d1 5643c: 10c1 moveb %d1,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 5643e: 2448 moveal %a0,%a2 56440: b689 cmpl %a1,%d3 56442: 6704 beqs 56448 <_Objects_Get_name_as_string+0xa0> 56444: 1219 moveb %a1@+,%d1 56446: 66da bnes 56422 <_Objects_Get_name_as_string+0x7a> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 56448: 4212 clrb %a2@ _Thread_Enable_dispatch(); 5644a: 4eb9 0004 fa3c jsr 4fa3c <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 56450: 2004 movel %d4,%d0 56452: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 56458: 4e5e unlk %fp 5645a: 4e75 rts return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 5645c: 242e 0008 movel %fp@(8),%d2 56460: 6000 ff74 braw 563d6 <_Objects_Get_name_as_string+0x2e> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 56464: 4284 clrl %d4 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 56466: 2004 movel %d4,%d0 56468: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 5646e: 4e5e unlk %fp 56470: 4e75 rts if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 56472: 2440 moveal %d0,%a2 lname[ 0 ] = (u32_name >> 24) & 0xff; 56474: 7218 moveq #24,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; 56476: 43ee fffb lea %fp@(-5),%a1 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 5647a: 202a 000c movel %a2@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 5647e: 2a00 movel %d0,%d5 56480: e2ad lsrl %d1,%d5 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 56482: 2200 movel %d0,%d1 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 56484: 2400 movel %d0,%d2 lname[ 2 ] = (u32_name >> 8) & 0xff; 56486: e089 lsrl #8,%d1 lname[ 3 ] = (u32_name >> 0) & 0xff; 56488: 1d40 fffe moveb %d0,%fp@(-2) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 5648c: 4242 clrw %d2 5648e: 4842 swap %d2 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 56490: 4200 clrb %d0 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 56492: 1d45 fffb moveb %d5,%fp@(-5) lname[ 1 ] = (u32_name >> 16) & 0xff; 56496: 1d42 fffc moveb %d2,%fp@(-4) lname[ 2 ] = (u32_name >> 8) & 0xff; 5649a: 1d41 fffd moveb %d1,%fp@(-3) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 5649e: 1d40 ffff moveb %d0,%fp@(-1) 564a2: 6000 ff6c braw 56410 <_Objects_Get_name_as_string+0x68> } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; 564a6: 2444 moveal %d4,%a2 } } *d = '\0'; 564a8: 4212 clrb %a2@ _Thread_Enable_dispatch(); 564aa: 4eb9 0004 fa3c jsr 4fa3c <_Thread_Enable_dispatch> 564b0: 609e bras 56450 <_Objects_Get_name_as_string+0xa8> ... =============================================================================== 0005a574 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5a574: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5a576: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5a578: 4e56 0000 linkw %fp,#0 5a57c: 206e 0008 moveal %fp@(8),%a0 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5a580: 90a8 0006 subl %a0@(6),%d0 5a584: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5a588: 3228 000e movew %a0@(14),%d1 5a58c: b280 cmpl %d0,%d1 5a58e: 6514 bcss 5a5a4 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5a590: 2068 0018 moveal %a0@(24),%a0 5a594: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5a598: 670a beqs 5a5a4 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 5a59a: 206e 0010 moveal %fp@(16),%a0 * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5a59e: 4e5e unlk %fp */ index = id - information->minimum_id + 1; if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; 5a5a0: 4290 clrl %a0@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5a5a2: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5a5a4: 226e 0010 moveal %fp@(16),%a1 5a5a8: 7001 moveq #1,%d0 return NULL; } 5a5aa: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5a5ac: 2280 movel %d0,%a1@ return NULL; 5a5ae: 4280 clrl %d0 } ... =============================================================================== 0004ec78 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 4ec78: 4e56 fffc linkw %fp,#-4 4ec7c: 202e 0008 movel %fp@(8),%d0 4ec80: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4ec82: 4a80 tstl %d0 4ec84: 664e bnes 4ecd4 <_Objects_Id_to_name+0x5c> 4ec86: 2079 0006 fa12 moveal 6fa12 <_Per_CPU_Information+0xe>,%a0 4ec8c: 2228 0008 movel %a0@(8),%d1 4ec90: 7418 moveq #24,%d2 4ec92: 2001 movel %d1,%d0 4ec94: e4a8 lsrl %d2,%d0 4ec96: 143c 0007 moveb #7,%d2 4ec9a: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 4ec9c: 143c 0002 moveb #2,%d2 4eca0: 2040 moveal %d0,%a0 4eca2: 5388 subql #1,%a0 4eca4: b488 cmpl %a0,%d2 4eca6: 6522 bcss 4ecca <_Objects_Id_to_name+0x52> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 4eca8: 41f9 0006 f54e lea 6f54e <_Objects_Information_table>,%a0 4ecae: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 4ecb2: 4a88 tstl %a0 4ecb4: 6714 beqs 4ecca <_Objects_Id_to_name+0x52> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 4ecb6: 2001 movel %d1,%d0 4ecb8: 741b moveq #27,%d2 4ecba: e4a8 lsrl %d2,%d0 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 4ecbc: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 4ecc0: 4a88 tstl %a0 4ecc2: 6706 beqs 4ecca <_Objects_Id_to_name+0x52> <== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 4ecc4: 4a28 0032 tstb %a0@(50) 4ecc8: 670e beqs 4ecd8 <_Objects_Id_to_name+0x60> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4ecca: 242e fff8 movel %fp@(-8),%d2 tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; 4ecce: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4ecd0: 4e5e unlk %fp 4ecd2: 4e75 rts /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4ecd4: 2200 movel %d0,%d1 4ecd6: 60b8 bras 4ec90 <_Objects_Id_to_name+0x18> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 4ecd8: 486e fffc pea %fp@(-4) 4ecdc: 2f01 movel %d1,%sp@- 4ecde: 2f08 movel %a0,%sp@- 4ece0: 4eb9 0004 ec10 jsr 4ec10 <_Objects_Get> if ( !the_object ) 4ece6: 4fef 000c lea %sp@(12),%sp 4ecea: 4a80 tstl %d0 4ecec: 67dc beqs 4ecca <_Objects_Id_to_name+0x52> return OBJECTS_INVALID_ID; *name = the_object->name; 4ecee: 206e 000c moveal %fp@(12),%a0 4ecf2: 2240 moveal %d0,%a1 4ecf4: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 4ecf8: 4eb9 0004 fa3c jsr 4fa3c <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4ecfe: 242e fff8 movel %fp@(-8),%d2 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 4ed02: 4280 clrl %d0 } 4ed04: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049260 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 49260: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 49262: 4e56 fff0 linkw %fp,#-16 49266: 48d7 3c00 moveml %a2-%a5,%sp@ 4926a: 2a6e 0008 moveal %fp@(8),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4926e: 302d 0034 movew %a5@(52),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 49272: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 49276: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 49278: 286e 000c moveal %fp@(12),%a4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4927c: 2f0a movel %a2,%sp@- 4927e: 4eb9 0005 0b30 jsr 50b30 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 49284: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 49286: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 49288: 4a2d 0032 tstb %a5@(50) 4928c: 6662 bnes 492f0 <_Objects_Set_name+0x90> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 4928e: 7218 moveq #24,%d1 49290: 1012 moveb %a2@,%d0 49292: 49c0 extbl %d0 49294: e3a8 lsll %d1,%d0 49296: 123c 0001 moveb #1,%d1 4929a: b28b cmpl %a3,%d1 4929c: 643c bccs 492da <_Objects_Set_name+0x7a> 4929e: 122a 0001 moveb %a2@(1),%d1 492a2: 49c1 extbl %d1 492a4: 4841 swap %d1 492a6: 4241 clrw %d1 492a8: 8280 orl %d0,%d1 492aa: 7002 moveq #2,%d0 492ac: b08b cmpl %a3,%d0 492ae: 6730 beqs 492e0 <_Objects_Set_name+0x80> 492b0: 102a 0002 moveb %a2@(2),%d0 492b4: 49c0 extbl %d0 492b6: e188 lsll #8,%d0 492b8: 8280 orl %d0,%d1 492ba: 7003 moveq #3,%d0 492bc: b08b cmpl %a3,%d0 492be: 6700 0082 beqw 49342 <_Objects_Set_name+0xe2> 492c2: 102a 0003 moveb %a2@(3),%d0 492c6: 49c0 extbl %d0 492c8: 8280 orl %d0,%d1 ((3 < length) ? s[ 3 ] : ' ') ); } return true; 492ca: 7001 moveq #1,%d0 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 492cc: 2941 000c movel %d1,%a4@(12) ); } return true; } 492d0: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 492d6: 4e5e unlk %fp 492d8: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 492da: 2200 movel %d0,%d1 492dc: 08c1 0015 bset #21,%d1 492e0: 7020 moveq #32,%d0 492e2: 08c1 000d bset #13,%d1 492e6: 8280 orl %d0,%d1 ((3 < length) ? s[ 3 ] : ' ') ); } return true; 492e8: 7001 moveq #1,%d0 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 492ea: 2941 000c movel %d1,%a4@(12) 492ee: 60e0 bras 492d0 <_Objects_Set_name+0x70> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 492f0: 486b 0001 pea %a3@(1) 492f4: 4eb9 0004 aed8 jsr 4aed8 <_Workspace_Allocate> if ( !d ) 492fa: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 492fc: 2a40 moveal %d0,%a5 if ( !d ) 492fe: 4a80 tstl %d0 49300: 6734 beqs 49336 <_Objects_Set_name+0xd6> return false; _Workspace_Free( (void *)the_object->name.name_p ); 49302: 2f2c 000c movel %a4@(12),%sp@- 49306: 4eb9 0004 aef4 jsr 4aef4 <_Workspace_Free> the_object->name.name_p = NULL; strncpy( d, name, length ); 4930c: 2f0b movel %a3,%sp@- 4930e: 2f0a movel %a2,%sp@- d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; 49310: 42ac 000c clrl %a4@(12) strncpy( d, name, length ); 49314: 2f0d movel %a5,%sp@- 49316: 4eb9 0005 0a94 jsr 50a94 d[length] = '\0'; the_object->name.name_p = d; 4931c: 4fef 0010 lea %sp@(16),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; strncpy( d, name, length ); d[length] = '\0'; 49320: 4200 clrb %d0 49322: 1b80 b800 moveb %d0,%a5@(00000000,%a3:l) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 49326: 7001 moveq #1,%d0 _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; strncpy( d, name, length ); d[length] = '\0'; the_object->name.name_p = d; 49328: 294d 000c movel %a5,%a4@(12) ); } return true; } 4932c: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 49332: 4e5e unlk %fp 49334: 4e75 rts 49336: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 4933c: 4200 clrb %d0 ); } return true; } 4933e: 4e5e unlk %fp 49340: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 49342: 7020 moveq #32,%d0 49344: 8280 orl %d0,%d1 ((3 < length) ? s[ 3 ] : ' ') ); } return true; 49346: 7001 moveq #1,%d0 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 49348: 2941 000c movel %d1,%a4@(12) 4934c: 6082 bras 492d0 <_Objects_Set_name+0x70> ... =============================================================================== 00049138 <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 49138: 4281 clrl %d1 #include void _Objects_Shrink_information( Objects_Information *information ) { 4913a: 4e56 ffec linkw %fp,#-20 4913e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49142: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 49146: 4283 clrl %d3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 49148: 242a 0006 movel %a2@(6),%d2 block_count = (information->maximum - index_base) / 4914c: 362a 000e movew %a2@(14),%d3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 49150: 0282 0000 ffff andil #65535,%d2 block_count = (information->maximum - index_base) / 49156: 322a 0012 movew %a2@(18),%d1 4915a: 9682 subl %d2,%d3 4915c: 4c41 3003 remul %d1,%d3,%d3 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 49160: 6778 beqs 491da <_Objects_Shrink_information+0xa2><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 49162: 206a 002a moveal %a2@(42),%a0 49166: b290 cmpl %a0@,%d1 49168: 6700 0088 beqw 491f2 <_Objects_Shrink_information+0xba> #include #include #include #include void _Objects_Shrink_information( 4916c: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 4916e: 4280 clrl %d0 49170: 5280 addql #1,%d0 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 49172: d481 addl %d1,%d2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 49174: b680 cmpl %d0,%d3 49176: 6762 beqs 491da <_Objects_Shrink_information+0xa2> #include #include #include #include void _Objects_Shrink_information( 49178: 2800 movel %d0,%d4 4917a: e58c lsll #2,%d4 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 4917c: b298 cmpl %a0@+,%d1 4917e: 66f0 bnes 49170 <_Objects_Shrink_information+0x38> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49180: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 49184: 47f9 0004 ceb0 lea 4ceb0 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 4918a: 2028 0008 movel %a0@(8),%d0 4918e: 0280 0000 ffff andil #65535,%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 49194: 2610 movel %a0@,%d3 if ((index >= index_base) && 49196: b480 cmpl %d0,%d2 49198: 620c bhis 491a6 <_Objects_Shrink_information+0x6e> (index < (index_base + information->allocation_size))) { 4919a: 4281 clrl %d1 4919c: 322a 0012 movew %a2@(18),%d1 491a0: d282 addl %d2,%d1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 491a2: b280 cmpl %d0,%d1 491a4: 623e bhis 491e4 <_Objects_Shrink_information+0xac> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 491a6: 2043 moveal %d3,%a0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 491a8: 4a83 tstl %d3 491aa: 66de bnes 4918a <_Objects_Shrink_information+0x52> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 491ac: 206a 002e moveal %a2@(46),%a0 491b0: 2f30 4800 movel %a0@(00000000,%d4:l),%sp@- 491b4: 4eb9 0004 acdc jsr 4acdc <_Workspace_Free> information->object_blocks[ block ] = NULL; 491ba: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 491be: 588f addql #4,%sp /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 491c0: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive_per_block[ block ] = 0; 491c4: 206a 002a moveal %a2@(42),%a0 information->inactive -= information->allocation_size; 491c8: 302a 0028 movew %a2@(40),%d0 491cc: 322a 0012 movew %a2@(18),%d1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 491d0: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive -= information->allocation_size; 491d4: 9081 subl %d1,%d0 491d6: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 491da: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 491e0: 4e5e unlk %fp 491e2: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 491e4: 2f08 movel %a0,%sp@- 491e6: 4e93 jsr %a3@ 491e8: 588f addql #4,%sp index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 491ea: 2043 moveal %d3,%a0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 491ec: 4a83 tstl %d3 491ee: 669a bnes 4918a <_Objects_Shrink_information+0x52> 491f0: 60ba bras 491ac <_Objects_Shrink_information+0x74> 491f2: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 491f6: 4284 clrl %d4 <== NOT EXECUTED */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 491f8: 47f9 0004 ceb0 lea 4ceb0 <_Chain_Extract>,%a3 <== NOT EXECUTED 491fe: 608a bras 4918a <_Objects_Shrink_information+0x52><== NOT EXECUTED =============================================================================== 000480d8 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 480d8: 4e56 ffec linkw %fp,#-20 480dc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 480e0: 240e movel %fp,%d2 480e2: 5982 subql #4,%d2 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 480e4: 246e 000c moveal %fp@(12),%a2 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 480e8: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 480ea: 162e 0017 moveb %fp@(23),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 480ee: 2f0a movel %a2,%sp@- 480f0: 4eb9 0004 825c jsr 4825c <_POSIX_Mutex_Get> 480f6: 508f addql #8,%sp 480f8: 4a80 tstl %d0 480fa: 6766 beqs 48162 <_POSIX_Condition_variables_Wait_support+0x8a> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 480fc: 2039 0006 37b6 movel 637b6 <_Thread_Dispatch_disable_level>,%d0 --level; 48102: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 48104: 2f02 movel %d2,%sp@- 48106: 2f2e 0008 movel %fp@(8),%sp@- _Thread_Dispatch_disable_level = level; 4810a: 23c0 0006 37b6 movel %d0,637b6 <_Thread_Dispatch_disable_level> 48110: 4eb9 0004 7ec4 jsr 47ec4 <_POSIX_Condition_variables_Get> switch ( location ) { 48116: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 48118: 2640 moveal %d0,%a3 switch ( location ) { 4811a: 4aae fffc tstl %fp@(-4) 4811e: 6642 bnes 48162 <_POSIX_Condition_variables_Wait_support+0x8a> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 48120: 202b 0014 movel %a3@(20),%d0 48124: 6718 beqs 4813e <_POSIX_Condition_variables_Wait_support+0x66> 48126: b092 cmpl %a2@,%d0 48128: 6714 beqs 4813e <_POSIX_Condition_variables_Wait_support+0x66> _Thread_Enable_dispatch(); 4812a: 4eb9 0004 bcd0 jsr 4bcd0 <_Thread_Enable_dispatch> return EINVAL; 48130: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 48132: 2002 movel %d2,%d0 48134: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4813a: 4e5e unlk %fp 4813c: 4e75 rts if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 4813e: 2f0a movel %a2,%sp@- 48140: 4eb9 0004 8514 jsr 48514 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 48146: 588f addql #4,%sp 48148: 4a03 tstb %d3 4814a: 6724 beqs 48170 <_POSIX_Condition_variables_Wait_support+0x98> status = _Thread_Executing->Wait.return_code; if ( status == EINTR ) status = 0; } else { _Thread_Enable_dispatch(); 4814c: 4eb9 0004 bcd0 jsr 4bcd0 <_Thread_Enable_dispatch> status = ETIMEDOUT; 48152: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 48154: 2f0a movel %a2,%sp@- 48156: 4eb9 0004 8478 jsr 48478 if ( mutex_status ) 4815c: 588f addql #4,%sp 4815e: 4a80 tstl %d0 48160: 67d0 beqs 48132 <_POSIX_Condition_variables_Wait_support+0x5a><== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } return EINVAL; 48162: 7416 moveq #22,%d2 } 48164: 2002 movel %d2,%d0 48166: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4816c: 4e5e unlk %fp 4816e: 4e75 rts return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 48170: 2752 0014 movel %a2@,%a3@(20) 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; 48174: 7201 moveq #1,%d1 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 48176: 200b movel %a3,%d0 48178: 0680 0000 0018 addil #24,%d0 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4817e: 2079 0006 3bfe moveal 63bfe <_Per_CPU_Information+0xe>,%a0 48184: 2741 0048 movel %d1,%a3@(72) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 48188: 226e 0008 moveal %fp@(8),%a1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4818c: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 48190: 2151 0020 movel %a1@,%a0@(32) 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; 48194: 2140 0044 movel %d0,%a0@(68) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 48198: 4879 0004 c60c pea 4c60c <_Thread_queue_Timeout> 4819e: 2f2e 0010 movel %fp@(16),%sp@- 481a2: 2f00 movel %d0,%sp@- 481a4: 4eb9 0004 c1e0 jsr 4c1e0 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 481aa: 4eb9 0004 bcd0 jsr 4bcd0 <_Thread_Enable_dispatch> * a POSIX signal, then pthread_cond_wait returns spuriously, * according to the POSIX standard. It means that pthread_cond_wait * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; 481b0: 2079 0006 3bfe moveal 63bfe <_Per_CPU_Information+0xe>,%a0 if ( status == EINTR ) status = 0; 481b6: 7004 moveq #4,%d0 * according to the POSIX standard. It means that pthread_cond_wait * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; if ( status == EINTR ) 481b8: 4fef 000c lea %sp@(12),%sp * a POSIX signal, then pthread_cond_wait returns spuriously, * according to the POSIX standard. It means that pthread_cond_wait * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; 481bc: 2428 0034 movel %a0@(52),%d2 if ( status == EINTR ) status = 0; 481c0: b082 cmpl %d2,%d0 481c2: 56c0 sne %d0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 481c4: 2f0a movel %a2,%sp@- * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; if ( status == EINTR ) status = 0; 481c6: 49c0 extbl %d0 481c8: c480 andl %d0,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 481ca: 4eb9 0004 8478 jsr 48478 if ( mutex_status ) 481d0: 588f addql #4,%sp 481d2: 4a80 tstl %d0 481d4: 668c bnes 48162 <_POSIX_Condition_variables_Wait_support+0x8a> 481d6: 6000 ff5a braw 48132 <_POSIX_Condition_variables_Wait_support+0x5a> ... =============================================================================== 000472b8 <_POSIX_Keys_Free_memory>: #include void _POSIX_Keys_Free_memory( POSIX_Keys_Control *the_key ) { 472b8: 4e56 0000 linkw %fp,#0 472bc: 2f0b movel %a3,%sp@- uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 472be: 47f9 0004 bc14 lea 4bc14 <_Workspace_Free>,%a3 #include void _POSIX_Keys_Free_memory( POSIX_Keys_Control *the_key ) { 472c4: 2f0a movel %a2,%sp@- 472c6: 246e 0008 moveal %fp@(8),%a2 uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 472ca: 2f2a 0018 movel %a2@(24),%sp@- 472ce: 4e93 jsr %a3@ 472d0: 2f2a 001c movel %a2@(28),%sp@- 472d4: 4e93 jsr %a3@ 472d6: 2d6a 0020 0008 movel %a2@(32),%fp@(8) 472dc: 508f addql #8,%sp } 472de: 246e fff8 moveal %fp@(-8),%a2 472e2: 266e fffc moveal %fp@(-4),%a3 472e6: 4e5e unlk %fp ) { uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 472e8: 4ef9 0004 bc14 jmp 4bc14 <_Workspace_Free> ... =============================================================================== 0004e7d4 <_POSIX_Keys_Run_destructors>: 4e7d4: 7218 moveq #24,%d1 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4e7d6: 4e56 ffec linkw %fp,#-20 4e7da: 206e 0008 moveal %fp@(8),%a0 4e7de: 48d7 007c moveml %d2-%d6,%sp@ Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 4e7e2: 2628 0008 movel %a0@(8),%d3 4e7e6: 2003 movel %d3,%d0 4e7e8: e2a8 lsrl %d1,%d0 4e7ea: 123c 0007 moveb #7,%d1 4e7ee: c081 andl %d1,%d0 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 4e7f0: 0283 0000 ffff andil #65535,%d3 4e7f6: 2c00 movel %d0,%d6 4e7f8: 5a86 addql #5,%d6 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 4e7fa: 3039 0006 1310 movew 61310 <_POSIX_Keys_Information+0xe>,%d0 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 4e800: e58b lsll #2,%d3 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e802: 4a40 tstw %d0 4e804: 660a bnes 4e810 <_POSIX_Keys_Run_destructors+0x3c> done = false; } } } } } 4e806: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 4e80c: 4e5e unlk %fp 4e80e: 4e75 rts 4e810: 4285 clrl %d5 4e812: 7201 moveq #1,%d1 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e814: 7401 moveq #1,%d2 4e816: 7801 moveq #1,%d4 4e818: 3a00 movew %d0,%d5 POSIX_Keys_Control *key = (POSIX_Keys_Control *) 4e81a: 2079 0006 131a moveal 6131a <_POSIX_Keys_Information+0x18>,%a0 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e820: 5282 addql #1,%d2 POSIX_Keys_Control *key = (POSIX_Keys_Control *) 4e822: 2070 1c00 moveal %a0@(00000000,%d1:l:4),%a0 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 4e826: 4a88 tstl %a0 4e828: 671e beqs 4e848 <_POSIX_Keys_Run_destructors+0x74> 4e82a: 4aa8 0010 tstl %a0@(16) 4e82e: 6718 beqs 4e848 <_POSIX_Keys_Run_destructors+0x74> void *value = key->Values [ thread_api ][ thread_index ]; 4e830: 2270 6c00 moveal %a0@(00000000,%d6:l:4),%a1 4e834: d3c3 addal %d3,%a1 4e836: 2211 movel %a1@,%d1 if ( value != NULL ) { 4e838: 670e beqs 4e848 <_POSIX_Keys_Run_destructors+0x74><== ALWAYS TAKEN key->Values [ thread_api ][ thread_index ] = NULL; 4e83a: 4291 clrl %a1@ <== NOT EXECUTED (*key->destructor)( value ); done = false; 4e83c: 4204 clrb %d4 <== NOT EXECUTED if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; if ( value != NULL ) { key->Values [ thread_api ][ thread_index ] = NULL; (*key->destructor)( value ); 4e83e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4e840: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED 4e844: 4e90 jsr %a0@ <== NOT EXECUTED 4e846: 588f addql #4,%sp <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e848: 4281 clrl %d1 4e84a: 3202 movew %d2,%d1 4e84c: b285 cmpl %d5,%d1 4e84e: 63ca blss 4e81a <_POSIX_Keys_Run_destructors+0x46> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 4e850: 4a04 tstb %d4 4e852: 66b2 bnes 4e806 <_POSIX_Keys_Run_destructors+0x32><== ALWAYS TAKEN Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 4e854: 3039 0006 1310 movew 61310 <_POSIX_Keys_Information+0xe>,%d0<== NOT EXECUTED done = true; for ( index = 1 ; index <= max ; ++index ) { 4e85a: 67aa beqs 4e806 <_POSIX_Keys_Run_destructors+0x32><== NOT EXECUTED 4e85c: 60b2 bras 4e810 <_POSIX_Keys_Run_destructors+0x3c><== NOT EXECUTED ... =============================================================================== 0004cac4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4cac4: 4e56 ffe4 linkw %fp,#-28 4cac8: 48d7 043c moveml %d2-%d5/%a2,%sp@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 4cacc: 486e fff8 pea %fp@(-8) 4cad0: 242e 0008 movel %fp@(8),%d2 4cad4: 2f02 movel %d2,%sp@- 4cad6: 4879 0006 a7da pea 6a7da <_POSIX_Message_queue_Information_fds> 4cadc: 246e 0014 moveal %fp@(20),%a2 4cae0: 182e 001b moveb %fp@(27),%d4 4cae4: 4eb9 0005 01a8 jsr 501a8 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4caea: 4fef 000c lea %sp@(12),%sp 4caee: 4aae fff8 tstl %fp@(-8) 4caf2: 671a beqs 4cb0e <_POSIX_Message_queue_Receive_support+0x4a> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4caf4: 4eb9 0005 68c0 jsr 568c0 <__errno> 4cafa: 72ff moveq #-1,%d1 4cafc: 2040 moveal %d0,%a0 4cafe: 7009 moveq #9,%d0 } 4cb00: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4cb06: 2080 movel %d0,%a0@ } 4cb08: 2001 movel %d1,%d0 4cb0a: 4e5e unlk %fp 4cb0c: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4cb0e: 2040 moveal %d0,%a0 4cb10: 7603 moveq #3,%d3 4cb12: 7a01 moveq #1,%d5 4cb14: 2228 0014 movel %a0@(20),%d1 4cb18: c681 andl %d1,%d3 4cb1a: ba83 cmpl %d3,%d5 4cb1c: 6700 00c4 beqw 4cbe2 <_POSIX_Message_queue_Receive_support+0x11e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4cb20: 2068 0010 moveal %a0@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4cb24: 202e 0010 movel %fp@(16),%d0 4cb28: b0a8 0066 cmpl %a0@(102),%d0 4cb2c: 656a bcss 4cb98 <_POSIX_Message_queue_Receive_support+0xd4> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4cb2e: 70ff moveq #-1,%d0 4cb30: 2d40 fffc movel %d0,%fp@(-4) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4cb34: 4a04 tstb %d4 4cb36: 6756 beqs 4cb8e <_POSIX_Message_queue_Receive_support+0xca> do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 4cb38: 0801 000e btst #14,%d1 4cb3c: 57c0 seq %d0 4cb3e: 49c0 extbl %d0 4cb40: 4480 negl %d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4cb42: 2f2e 001c movel %fp@(28),%sp@- 4cb46: 2f00 movel %d0,%sp@- 4cb48: 486e fffc pea %fp@(-4) 4cb4c: 2f2e 000c movel %fp@(12),%sp@- 4cb50: 2f02 movel %d2,%sp@- 4cb52: 4868 001a pea %a0@(26) 4cb56: 4eb9 0004 f010 jsr 4f010 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4cb5c: 4eb9 0005 0f4c jsr 50f4c <_Thread_Enable_dispatch> if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 4cb62: 2079 0006 a85e moveal 6a85e <_Per_CPU_Information+0xe>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); if (msg_prio) { 4cb68: 4fef 0018 lea %sp@(24),%sp 4cb6c: 4a8a tstl %a2 4cb6e: 6708 beqs 4cb78 <_POSIX_Message_queue_Receive_support+0xb4><== NEVER TAKEN RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return (unsigned int) ((priority >= 0) ? priority : -priority); 4cb70: 2028 0024 movel %a0@(36),%d0 4cb74: 6d1c blts 4cb92 <_POSIX_Message_queue_Receive_support+0xce> *msg_prio = _POSIX_Message_queue_Priority_from_core( 4cb76: 2480 movel %d0,%a2@ _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 4cb78: 4aa8 0034 tstl %a0@(52) 4cb7c: 663a bnes 4cbb8 <_POSIX_Message_queue_Receive_support+0xf4> return length_out; 4cb7e: 222e fffc movel %fp@(-4),%d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cb82: 2001 movel %d1,%d0 4cb84: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4cb8a: 4e5e unlk %fp 4cb8c: 4e75 rts length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4cb8e: 4280 clrl %d0 4cb90: 60b0 bras 4cb42 <_POSIX_Message_queue_Receive_support+0x7e> 4cb92: 4480 negl %d0 timeout ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( 4cb94: 2480 movel %d0,%a2@ 4cb96: 60e0 bras 4cb78 <_POSIX_Message_queue_Receive_support+0xb4> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 4cb98: 4eb9 0005 0f4c jsr 50f4c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4cb9e: 747a moveq #122,%d2 4cba0: 4eb9 0005 68c0 jsr 568c0 <__errno> 4cba6: 72ff moveq #-1,%d1 4cba8: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cbaa: 2001 movel %d1,%d0 the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4cbac: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cbae: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4cbb4: 4e5e unlk %fp 4cbb6: 4e75 rts } if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 4cbb8: 4eb9 0005 68c0 jsr 568c0 <__errno> 4cbbe: 2079 0006 a85e moveal 6a85e <_Per_CPU_Information+0xe>,%a0 4cbc4: 2440 moveal %d0,%a2 4cbc6: 2f28 0034 movel %a0@(52),%sp@- 4cbca: 4eb9 0004 ce9c jsr 4ce9c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4cbd0: 588f addql #4,%sp 4cbd2: 72ff moveq #-1,%d1 4cbd4: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cbd6: 2001 movel %d1,%d0 4cbd8: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4cbde: 4e5e unlk %fp 4cbe0: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 4cbe2: 4eb9 0005 0f4c jsr 50f4c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4cbe8: 7609 moveq #9,%d3 4cbea: 4eb9 0005 68c0 jsr 568c0 <__errno> 4cbf0: 72ff moveq #-1,%d1 4cbf2: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cbf4: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4cbf6: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cbf8: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4cbfe: 4e5e unlk %fp ... =============================================================================== 0004cc28 <_POSIX_Message_queue_Send_support>: /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4cc28: 7020 moveq #32,%d0 size_t msg_len, unsigned int msg_prio, bool wait, Watchdog_Interval timeout ) { 4cc2a: 4e56 ffe8 linkw %fp,#-24 4cc2e: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4cc32: 262e 0008 movel %fp@(8),%d3 4cc36: 242e 0014 movel %fp@(20),%d2 4cc3a: 182e 001b moveb %fp@(27),%d4 /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4cc3e: b082 cmpl %d2,%d0 4cc40: 6500 0106 bcsw 4cd48 <_POSIX_Message_queue_Send_support+0x120> RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 4cc44: 486e fffc pea %fp@(-4) 4cc48: 2f03 movel %d3,%sp@- 4cc4a: 4879 0006 a7da pea 6a7da <_POSIX_Message_queue_Information_fds> 4cc50: 4eb9 0005 01a8 jsr 501a8 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4cc56: 4fef 000c lea %sp@(12),%sp 4cc5a: 4aae fffc tstl %fp@(-4) 4cc5e: 6600 00ac bnew 4cd0c <_POSIX_Message_queue_Send_support+0xe4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4cc62: 2240 moveal %d0,%a1 4cc64: 7a03 moveq #3,%d5 4cc66: 2229 0014 movel %a1@(20),%d1 4cc6a: ca81 andl %d1,%d5 4cc6c: 6700 00f4 beqw 4cd62 <_POSIX_Message_queue_Send_support+0x13a> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4cc70: 2240 moveal %d0,%a1 4cc72: 2069 0010 moveal %a1@(16),%a0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4cc76: 4a04 tstb %d4 4cc78: 674e beqs 4ccc8 <_POSIX_Message_queue_Send_support+0xa0> do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4cc7a: 2f2e 001c movel %fp@(28),%sp@- 4cc7e: 4482 negl %d2 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 4cc80: 0801 000e btst #14,%d1 4cc84: 57c0 seq %d0 4cc86: 49c0 extbl %d0 4cc88: 4480 negl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4cc8a: 2f00 movel %d0,%sp@- 4cc8c: 2f02 movel %d2,%sp@- 4cc8e: 42a7 clrl %sp@- 4cc90: 2f03 movel %d3,%sp@- 4cc92: 2f2e 0010 movel %fp@(16),%sp@- 4cc96: 2f2e 000c movel %fp@(12),%sp@- 4cc9a: 4868 001a pea %a0@(26) 4cc9e: 4eb9 0004 f14c jsr 4f14c <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4cca4: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4cca8: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4ccaa: 4eb9 0005 0f4c jsr 50f4c <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4ccb0: 7007 moveq #7,%d0 4ccb2: b082 cmpl %d2,%d0 4ccb4: 6746 beqs 4ccfc <_POSIX_Message_queue_Send_support+0xd4> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; 4ccb6: 4281 clrl %d1 */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4ccb8: 4a82 tstl %d2 4ccba: 666a bnes 4cd26 <_POSIX_Message_queue_Send_support+0xfe> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4ccbc: 2001 movel %d1,%d0 4ccbe: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4ccc4: 4e5e unlk %fp 4ccc6: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4ccc8: 2f2e 001c movel %fp@(28),%sp@- the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4cccc: 4280 clrl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4ccce: 4482 negl %d2 4ccd0: 2f00 movel %d0,%sp@- 4ccd2: 2f02 movel %d2,%sp@- 4ccd4: 42a7 clrl %sp@- 4ccd6: 2f03 movel %d3,%sp@- 4ccd8: 2f2e 0010 movel %fp@(16),%sp@- 4ccdc: 2f2e 000c movel %fp@(12),%sp@- 4cce0: 4868 001a pea %a0@(26) 4cce4: 4eb9 0004 f14c jsr 4f14c <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4ccea: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4ccee: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4ccf0: 4eb9 0005 0f4c jsr 50f4c <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4ccf6: 7007 moveq #7,%d0 4ccf8: b082 cmpl %d2,%d0 4ccfa: 66ba bnes 4ccb6 <_POSIX_Message_queue_Send_support+0x8e><== ALWAYS TAKEN msg_status = _Thread_Executing->Wait.return_code; 4ccfc: 2079 0006 a85e moveal 6a85e <_Per_CPU_Information+0xe>,%a0 if ( !msg_status ) return msg_status; 4cd02: 4281 clrl %d1 * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) msg_status = _Thread_Executing->Wait.return_code; 4cd04: 2428 0034 movel %a0@(52),%d2 if ( !msg_status ) 4cd08: 67b2 beqs 4ccbc <_POSIX_Message_queue_Send_support+0x94> 4cd0a: 601a bras 4cd26 <_POSIX_Message_queue_Send_support+0xfe> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4cd0c: 4eb9 0005 68c0 jsr 568c0 <__errno> 4cd12: 72ff moveq #-1,%d1 4cd14: 2040 moveal %d0,%a0 4cd16: 7009 moveq #9,%d0 } 4cd18: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4cd1e: 2080 movel %d0,%a0@ } 4cd20: 2001 movel %d1,%d0 4cd22: 4e5e unlk %fp 4cd24: 4e75 rts msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 4cd26: 4eb9 0005 68c0 jsr 568c0 <__errno> 4cd2c: 2440 moveal %d0,%a2 4cd2e: 2f02 movel %d2,%sp@- 4cd30: 4eb9 0004 ce9c jsr 4ce9c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4cd36: 588f addql #4,%sp 4cd38: 72ff moveq #-1,%d1 4cd3a: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cd3c: 2001 movel %d1,%d0 4cd3e: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4cd44: 4e5e unlk %fp 4cd46: 4e75 rts * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4cd48: 4eb9 0005 68c0 jsr 568c0 <__errno> 4cd4e: 7616 moveq #22,%d3 4cd50: 72ff moveq #-1,%d1 4cd52: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cd54: 2001 movel %d1,%d0 * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4cd56: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cd58: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4cd5e: 4e5e unlk %fp 4cd60: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 4cd62: 4eb9 0005 0f4c jsr 50f4c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4cd68: 7409 moveq #9,%d2 4cd6a: 4eb9 0005 68c0 jsr 568c0 <__errno> 4cd70: 72ff moveq #-1,%d1 4cd72: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cd74: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4cd76: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4cd78: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4cd7e: 4e5e unlk %fp ... =============================================================================== 0004ea10 <_POSIX_Semaphore_Create_support>: size_t name_len, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4ea10: 4e56 0000 linkw %fp,#0 4ea14: 2f0a movel %a2,%sp@- 4ea16: 2f02 movel %d2,%sp@- 4ea18: 242e 0008 movel %fp@(8),%d2 POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 4ea1c: 4aae 0010 tstl %fp@(16) 4ea20: 6600 00fe bnew 4eb20 <_POSIX_Semaphore_Create_support+0x110> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4ea24: 2039 0006 5a90 movel 65a90 <_Thread_Dispatch_disable_level>,%d0 ++level; 4ea2a: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 4ea2c: 23c0 0006 5a90 movel %d0,65a90 <_Thread_Dispatch_disable_level> * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4ea32: 4879 0006 5cac pea 65cac <_POSIX_Semaphore_Information> 4ea38: 4eb9 0004 a7bc jsr 4a7bc <_Objects_Allocate> rtems_set_errno_and_return_minus_one( ENOSYS ); _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4ea3e: 588f addql #4,%sp 4ea40: 2440 moveal %d0,%a2 4ea42: 4a80 tstl %d0 4ea44: 6700 00f4 beqw 4eb3a <_POSIX_Semaphore_Create_support+0x12a> /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ if ( name_arg != NULL ) { 4ea48: 4a82 tstl %d2 4ea4a: 6778 beqs 4eac4 <_POSIX_Semaphore_Create_support+0xb4> name = _Workspace_String_duplicate( name_arg, name_len ); 4ea4c: 2f2e 000c movel %fp@(12),%sp@- 4ea50: 2f02 movel %d2,%sp@- 4ea52: 4eb9 0004 f910 jsr 4f910 <_Workspace_String_duplicate> if ( !name ) { 4ea58: 508f addql #8,%sp /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ if ( name_arg != NULL ) { name = _Workspace_String_duplicate( name_arg, name_len ); 4ea5a: 2400 movel %d0,%d2 if ( !name ) { 4ea5c: 6700 00fc beqw 4eb5a <_POSIX_Semaphore_Create_support+0x14a> the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; 4ea60: 7001 moveq #1,%d0 4ea62: 2540 0016 movel %d0,%a2@(22) } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = true; 4ea66: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 1; the_semaphore->linked = true; 4ea6a: 1540 0015 moveb %d0,%a2@(21) the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4ea6e: 70ff moveq #-1,%d0 } } else { name = NULL; } the_semaphore->process_shared = pshared; 4ea70: 42aa 0010 clrl %a2@(16) the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4ea74: 2540 005a movel %d0,%a2@(90) * blocking tasks on this semaphore should be. It could somehow * 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; 4ea78: 42aa 005e clrl %a2@(94) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4ea7c: 2f2e 0014 movel %fp@(20),%sp@- 4ea80: 486a 005a pea %a2@(90) 4ea84: 486a 001a pea %a2@(26) 4ea88: 4eb9 0004 a15c jsr 4a15c <_CORE_semaphore_Initialize> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 4ea8e: 202a 0008 movel %a2@(8),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4ea92: 2079 0006 5cc4 moveal 65cc4 <_POSIX_Semaphore_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 4ea98: 0280 0000 ffff andil #65535,%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4ea9e: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) &_POSIX_Semaphore_Information, &the_semaphore->Object, name ); *the_sem = the_semaphore; 4eaa2: 206e 0018 moveal %fp@(24),%a0 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4eaa6: 2542 000c movel %d2,%a2@(12) 4eaaa: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4eaac: 4eb9 0004 bab0 jsr 4bab0 <_Thread_Enable_dispatch> return 0; 4eab2: 4fef 000c lea %sp@(12),%sp 4eab6: 4280 clrl %d0 } 4eab8: 242e fff8 movel %fp@(-8),%d2 4eabc: 246e fffc moveal %fp@(-4),%a2 4eac0: 4e5e unlk %fp 4eac2: 4e75 rts } } else { name = NULL; } the_semaphore->process_shared = pshared; 4eac4: 42aa 0010 clrl %a2@(16) _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } } else { name = NULL; 4eac8: 4282 clrl %d2 if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 4eaca: 4200 clrb %d0 the_semaphore->open_count = 0; 4eacc: 42aa 0016 clrl %a2@(22) if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 4ead0: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 0; the_semaphore->linked = false; 4ead4: 1540 0015 moveb %d0,%a2@(21) the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4ead8: 70ff moveq #-1,%d0 * blocking tasks on this semaphore should be. It could somehow * 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; 4eada: 42aa 005e clrl %a2@(94) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4eade: 2540 005a movel %d0,%a2@(90) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4eae2: 2f2e 0014 movel %fp@(20),%sp@- 4eae6: 486a 005a pea %a2@(90) 4eaea: 486a 001a pea %a2@(26) 4eaee: 4eb9 0004 a15c jsr 4a15c <_CORE_semaphore_Initialize> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 4eaf4: 202a 0008 movel %a2@(8),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4eaf8: 2079 0006 5cc4 moveal 65cc4 <_POSIX_Semaphore_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 4eafe: 0280 0000 ffff andil #65535,%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4eb04: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) &_POSIX_Semaphore_Information, &the_semaphore->Object, name ); *the_sem = the_semaphore; 4eb08: 206e 0018 moveal %fp@(24),%a0 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4eb0c: 2542 000c movel %d2,%a2@(12) 4eb10: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4eb12: 4eb9 0004 bab0 jsr 4bab0 <_Thread_Enable_dispatch> return 0; 4eb18: 4fef 000c lea %sp@(12),%sp 4eb1c: 4280 clrl %d0 4eb1e: 6098 bras 4eab8 <_POSIX_Semaphore_Create_support+0xa8> CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4eb20: 4eb9 0005 1060 jsr 51060 <__errno> *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4eb26: 242e fff8 movel %fp@(-8),%d2 CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4eb2a: 2040 moveal %d0,%a0 4eb2c: 7258 moveq #88,%d1 4eb2e: 70ff moveq #-1,%d0 *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4eb30: 246e fffc moveal %fp@(-4),%a2 4eb34: 4e5e unlk %fp CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4eb36: 2081 movel %d1,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4eb38: 4e75 rts _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 4eb3a: 4eb9 0004 bab0 jsr 4bab0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 4eb40: 741c moveq #28,%d2 4eb42: 4eb9 0005 1060 jsr 51060 <__errno> *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4eb48: 246e fffc moveal %fp@(-4),%a2 _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 4eb4c: 2040 moveal %d0,%a0 4eb4e: 70ff moveq #-1,%d0 4eb50: 2082 movel %d2,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4eb52: 242e fff8 movel %fp@(-8),%d2 4eb56: 4e5e unlk %fp 4eb58: 4e75 rts RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 4eb5a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4eb5c: 4879 0006 5cac pea 65cac <_POSIX_Semaphore_Information> <== NOT EXECUTED 4eb62: 4eb9 0004 ab34 jsr 4ab34 <_Objects_Free> <== NOT EXECUTED */ if ( name_arg != NULL ) { name = _Workspace_String_duplicate( name_arg, name_len ); if ( !name ) { _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 4eb68: 4eb9 0004 bab0 jsr 4bab0 <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 4eb6e: 4eb9 0005 1060 jsr 51060 <__errno> <== NOT EXECUTED *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4eb74: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED if ( name_arg != NULL ) { name = _Workspace_String_duplicate( name_arg, name_len ); if ( !name ) { _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); 4eb78: 2040 moveal %d0,%a0 <== NOT EXECUTED 4eb7a: 720c moveq #12,%d1 <== NOT EXECUTED 4eb7c: 508f addql #8,%sp <== NOT EXECUTED 4eb7e: 70ff moveq #-1,%d0 <== NOT EXECUTED *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4eb80: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4eb84: 4e5e unlk %fp <== NOT EXECUTED if ( name_arg != NULL ) { name = _Workspace_String_duplicate( name_arg, name_len ); if ( !name ) { _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); 4eb86: 2081 movel %d1,%a0@ <== NOT EXECUTED *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } ... =============================================================================== 0004c3c8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 4c3c8: 4e56 0000 linkw %fp,#0 4c3cc: 226e 0008 moveal %fp@(8),%a1 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c3d0: 2069 00fe moveal %a1@(254),%a0 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4c3d4: 4aa8 00d8 tstl %a0@(216) 4c3d8: 6608 bnes 4c3e2 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a><== NEVER TAKEN 4c3da: 7001 moveq #1,%d0 4c3dc: b0a8 00dc cmpl %a0@(220),%d0 4c3e0: 6708 beqs 4c3ea <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 4c3e2: 4e5e unlk %fp thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 4c3e4: 4ef9 0004 9da8 jmp 49da8 <_Thread_Enable_dispatch> POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 4c3ea: 4aa8 00e0 tstl %a0@(224) 4c3ee: 67f2 beqs 4c3e2 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 4c3f0: 4878 ffff pea ffffffff * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4c3f4: 2039 0006 144a movel 6144a <_Thread_Dispatch_disable_level>,%d0 --level; 4c3fa: 5380 subql #1,%d0 4c3fc: 2f09 movel %a1,%sp@- _Thread_Dispatch_disable_level = level; 4c3fe: 23c0 0006 144a movel %d0,6144a <_Thread_Dispatch_disable_level> 4c404: 4eb9 0004 caf0 jsr 4caf0 <_POSIX_Thread_Exit> 4c40a: 508f addql #8,%sp } else _Thread_Enable_dispatch(); } 4c40c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004eaf0 <_POSIX_Thread_Exit>: void _POSIX_Thread_Exit( Thread_Control *the_thread, void *value_ptr ) { 4eaf0: 4e56 ffe8 linkw %fp,#-24 4eaf4: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4eaf8: 246e 0008 moveal %fp@(8),%a2 * are ready to be switched out. Otherwise, an ISR could * occur and preempt us out while we still hold the * allocator mutex. */ _RTEMS_Lock_allocator(); 4eafc: 49f9 0004 7f00 lea 47f00 <_API_Mutex_Lock>,%a4 { Objects_Information *the_information; Thread_Control *unblocked; POSIX_API_Control *api; the_information = _Objects_Get_information_id( the_thread->Object.id ); 4eb02: 2f2a 0008 movel %a2@(8),%sp@- void _POSIX_Thread_Exit( Thread_Control *the_thread, void *value_ptr ) { 4eb06: 242e 000c movel %fp@(12),%d2 Objects_Information *the_information; Thread_Control *unblocked; POSIX_API_Control *api; the_information = _Objects_Get_information_id( the_thread->Object.id ); 4eb0a: 4eb9 0004 8e40 jsr 48e40 <_Objects_Get_information_id> * are ready to be switched out. Otherwise, an ISR could * occur and preempt us out while we still hold the * allocator mutex. */ _RTEMS_Lock_allocator(); 4eb10: 2f39 0006 106a movel 6106a <_RTEMS_Allocator_Mutex>,%sp@- { Objects_Information *the_information; Thread_Control *unblocked; POSIX_API_Control *api; the_information = _Objects_Get_information_id( the_thread->Object.id ); 4eb16: 2600 movel %d0,%d3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4eb18: 266a 00fe moveal %a2@(254),%a3 * are ready to be switched out. Otherwise, an ISR could * occur and preempt us out while we still hold the * allocator mutex. */ _RTEMS_Lock_allocator(); 4eb1c: 4e94 jsr %a4@ * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4eb1e: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 ++level; 4eb24: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 4eb26: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> the_thread->Wait.return_argument = value_ptr; /* * Process join */ if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) { 4eb2c: 7001 moveq #1,%d0 4eb2e: 508f addql #8,%sp */ _RTEMS_Lock_allocator(); _Thread_Disable_dispatch(); the_thread->Wait.return_argument = value_ptr; 4eb30: 2542 0028 movel %d2,%a2@(40) /* * Process join */ if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) { 4eb34: b0ab 0040 cmpl %a3@(64),%d0 4eb38: 6738 beqs 4eb72 <_POSIX_Thread_Exit+0x82> } /* * Now shut down the thread */ _Thread_Close( the_information, the_thread ); 4eb3a: 2f0a movel %a2,%sp@- 4eb3c: 47f9 0004 7f60 lea 47f60 <_API_Mutex_Unlock>,%a3 4eb42: 2f03 movel %d3,%sp@- 4eb44: 4eb9 0004 992c jsr 4992c <_Thread_Close> RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 4eb4a: 2f0a movel %a2,%sp@- 4eb4c: 4879 0006 1154 pea 61154 <_POSIX_Threads_Information> 4eb52: 4eb9 0004 8db4 jsr 48db4 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 4eb58: 2f39 0006 106a movel 6106a <_RTEMS_Allocator_Mutex>,%sp@- 4eb5e: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 4eb60: 4fef 0014 lea %sp@(20),%sp } 4eb64: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4eb6a: 4e5e unlk %fp _Thread_Close( the_information, the_thread ); _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); 4eb6c: 4ef9 0004 9cd0 jmp 49cd0 <_Thread_Enable_dispatch> /* * Process join */ if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) { unblocked = _Thread_queue_Dequeue( &api->Join_List ); 4eb72: 47eb 0044 lea %a3@(68),%a3 4eb76: 4bf9 0004 a070 lea 4a070 <_Thread_queue_Dequeue>,%a5 4eb7c: 2f0b movel %a3,%sp@- 4eb7e: 4e95 jsr %a5@ if ( unblocked ) { 4eb80: 588f addql #4,%sp 4eb82: 4a80 tstl %d0 4eb84: 6726 beqs 4ebac <_POSIX_Thread_Exit+0xbc> do { *(void **)unblocked->Wait.return_argument = value_ptr; 4eb86: 2240 moveal %d0,%a1 4eb88: 2069 0028 moveal %a1@(40),%a0 4eb8c: 2082 movel %d2,%a0@ } while ( (unblocked = _Thread_queue_Dequeue( &api->Join_List )) ); 4eb8e: 2f0b movel %a3,%sp@- 4eb90: 4e95 jsr %a5@ 4eb92: 588f addql #4,%sp 4eb94: 4a80 tstl %d0 4eb96: 67a2 beqs 4eb3a <_POSIX_Thread_Exit+0x4a> */ if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) { unblocked = _Thread_queue_Dequeue( &api->Join_List ); if ( unblocked ) { do { *(void **)unblocked->Wait.return_argument = value_ptr; 4eb98: 2240 moveal %d0,%a1 4eb9a: 2069 0028 moveal %a1@(40),%a0 4eb9e: 2082 movel %d2,%a0@ } while ( (unblocked = _Thread_queue_Dequeue( &api->Join_List )) ); 4eba0: 2f0b movel %a3,%sp@- 4eba2: 4e95 jsr %a5@ 4eba4: 588f addql #4,%sp 4eba6: 4a80 tstl %d0 4eba8: 66dc bnes 4eb86 <_POSIX_Thread_Exit+0x96> <== NEVER TAKEN 4ebaa: 608e bras 4eb3a <_POSIX_Thread_Exit+0x4a> } else { _Thread_Set_state( 4ebac: 4878 1004 pea 1004 the_thread, STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT ); _RTEMS_Unlock_allocator(); 4ebb0: 47f9 0004 7f60 lea 47f60 <_API_Mutex_Unlock>,%a3 if ( unblocked ) { do { *(void **)unblocked->Wait.return_argument = value_ptr; } while ( (unblocked = _Thread_queue_Dequeue( &api->Join_List )) ); } else { _Thread_Set_state( 4ebb6: 2f0a movel %a2,%sp@- 4ebb8: 4eb9 0004 a600 jsr 4a600 <_Thread_Set_state> the_thread, STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT ); _RTEMS_Unlock_allocator(); 4ebbe: 2f39 0006 106a movel 6106a <_RTEMS_Allocator_Mutex>,%sp@- 4ebc4: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 4ebc6: 4eb9 0004 9cd0 jsr 49cd0 <_Thread_Enable_dispatch> /* now waiting for thread to arrive */ _RTEMS_Lock_allocator(); 4ebcc: 2f39 0006 106a movel 6106a <_RTEMS_Allocator_Mutex>,%sp@- 4ebd2: 4e94 jsr %a4@ * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4ebd4: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 ++level; 4ebda: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 4ebdc: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> void _Thread_Disable_dispatch( void ); #else RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) { _Thread_Dispatch_increment_disable_level(); RTEMS_COMPILER_MEMORY_BARRIER(); 4ebe2: 4fef 0010 lea %sp@(16),%sp } /* * Now shut down the thread */ _Thread_Close( the_information, the_thread ); 4ebe6: 2f0a movel %a2,%sp@- 4ebe8: 2f03 movel %d3,%sp@- 4ebea: 4eb9 0004 992c jsr 4992c <_Thread_Close> 4ebf0: 2f0a movel %a2,%sp@- 4ebf2: 4879 0006 1154 pea 61154 <_POSIX_Threads_Information> 4ebf8: 4eb9 0004 8db4 jsr 48db4 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 4ebfe: 2f39 0006 106a movel 6106a <_RTEMS_Allocator_Mutex>,%sp@- 4ec04: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 4ec06: 4fef 0014 lea %sp@(20),%sp } 4ec0a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4ec10: 4e5e unlk %fp _Thread_Close( the_information, the_thread ); _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); 4ec12: 4ef9 0004 9cd0 jmp 49cd0 <_Thread_Enable_dispatch> =============================================================================== 0004d9bc <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4d9bc: 4e56 fff0 linkw %fp,#-16 4d9c0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4d9c4: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4d9c8: 47f9 0004 d998 lea 4d998 <_POSIX_Priority_Is_valid>,%a3 4d9ce: 2f12 movel %a2@,%sp@- 4d9d0: 4e93 jsr %a3@ 4d9d2: 588f addql #4,%sp 4d9d4: 4a00 tstb %d0 4d9d6: 660c bnes 4d9e4 <_POSIX_Thread_Translate_sched_param+0x28><== ALWAYS TAKEN return EINVAL; 4d9d8: 7016 moveq #22,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d9da: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4d9e0: 4e5e unlk %fp 4d9e2: 4e75 rts ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4d9e4: 206e 0010 moveal %fp@(16),%a0 4d9e8: 4290 clrl %a0@ *budget_callout = NULL; 4d9ea: 206e 0014 moveal %fp@(20),%a0 4d9ee: 4290 clrl %a0@ if ( policy == SCHED_OTHER ) { 4d9f0: 4aae 0008 tstl %fp@(8) 4d9f4: 677a beqs 4da70 <_POSIX_Thread_Translate_sched_param+0xb4> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 4d9f6: 7001 moveq #1,%d0 4d9f8: b0ae 0008 cmpl %fp@(8),%d0 4d9fc: 6700 0086 beqw 4da84 <_POSIX_Thread_Translate_sched_param+0xc8> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 4da00: 103c 0002 moveb #2,%d0 4da04: b0ae 0008 cmpl %fp@(8),%d0 4da08: 6700 0086 beqw 4da90 <_POSIX_Thread_Translate_sched_param+0xd4> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 4da0c: 7004 moveq #4,%d0 4da0e: b0ae 0008 cmpl %fp@(8),%d0 4da12: 66c4 bnes 4d9d8 <_POSIX_Thread_Translate_sched_param+0x1c> if ( (param->sched_ss_repl_period.tv_sec == 0) && 4da14: 4aaa 0008 tstl %a2@(8) 4da18: 6606 bnes 4da20 <_POSIX_Thread_Translate_sched_param+0x64> 4da1a: 4aaa 000c tstl %a2@(12) 4da1e: 67b8 beqs 4d9d8 <_POSIX_Thread_Translate_sched_param+0x1c> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 4da20: 4aaa 0010 tstl %a2@(16) 4da24: 6606 bnes 4da2c <_POSIX_Thread_Translate_sched_param+0x70> 4da26: 4aaa 0014 tstl %a2@(20) 4da2a: 67ac beqs 4d9d8 <_POSIX_Thread_Translate_sched_param+0x1c> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4da2c: 486a 0008 pea %a2@(8) 4da30: 49f9 0004 b8f4 lea 4b8f4 <_Timespec_To_ticks>,%a4 4da36: 4e94 jsr %a4@ _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4da38: 486a 0010 pea %a2@(16) if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4da3c: 2400 movel %d0,%d2 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4da3e: 4e94 jsr %a4@ if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4da40: 508f addql #8,%sp 4da42: b082 cmpl %d2,%d0 4da44: 6292 bhis 4d9d8 <_POSIX_Thread_Translate_sched_param+0x1c> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 4da46: 2f2a 0004 movel %a2@(4),%sp@- 4da4a: 4e93 jsr %a3@ 4da4c: 588f addql #4,%sp 4da4e: 4a00 tstb %d0 4da50: 6786 beqs 4d9d8 <_POSIX_Thread_Translate_sched_param+0x1c> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4da52: 206e 0010 moveal %fp@(16),%a0 4da56: 7003 moveq #3,%d0 4da58: 2080 movel %d0,%a0@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4da5a: 206e 0014 moveal %fp@(20),%a0 return 0; 4da5e: 4280 clrl %d0 } return EINVAL; } 4da60: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4da66: 20bc 0004 7be0 movel #293856,%a0@ return 0; } return EINVAL; } 4da6c: 4e5e unlk %fp 4da6e: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4da70: 206e 0010 moveal %fp@(16),%a0 4da74: 7401 moveq #1,%d2 return 0; 4da76: 4280 clrl %d0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4da78: 2082 movel %d2,%a0@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4da7a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4da80: 4e5e unlk %fp 4da82: 4e75 rts return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 4da84: 4280 clrl %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4da86: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4da8c: 4e5e unlk %fp 4da8e: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4da90: 206e 0010 moveal %fp@(16),%a0 4da94: 7202 moveq #2,%d1 return 0; 4da96: 4200 clrb %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4da98: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4da9e: 2081 movel %d1,%a0@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4daa0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c6fe <_POSIX_Threads_Delete_extension>: */ static void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 4c6fe: 4e56 ffec linkw %fp,#-20 4c702: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4c706: 266e 000c moveal %fp@(12),%a3 4c70a: 45f9 0004 a070 lea 4a070 <_Thread_queue_Dequeue>,%a2 api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 4c710: 2f0b movel %a3,%sp@- { Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 4c712: 286b 00fe moveal %a3@(254),%a4 4c716: 240c movel %a4,%d2 4c718: 0682 0000 0044 addil #68,%d2 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 4c71e: 4eb9 0004 e768 jsr 4e768 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 4c724: 2f0b movel %a3,%sp@- 4c726: 4eb9 0004 e7d4 jsr 4e7d4 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 4c72c: 262b 0028 movel %a3@(40),%d3 while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 4c730: 508f addql #8,%sp 4c732: 2f02 movel %d2,%sp@- 4c734: 4e92 jsr %a2@ 4c736: 588f addql #4,%sp 4c738: 4a80 tstl %d0 4c73a: 6712 beqs 4c74e <_POSIX_Threads_Delete_extension+0x50><== ALWAYS TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; 4c73c: 2240 moveal %d0,%a1 <== NOT EXECUTED 4c73e: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 4c742: 2083 movel %d3,%a0@ <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 4c744: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c746: 4e92 jsr %a2@ <== NOT EXECUTED 4c748: 588f addql #4,%sp <== NOT EXECUTED 4c74a: 4a80 tstl %d0 <== NOT EXECUTED 4c74c: 66ee bnes 4c73c <_POSIX_Threads_Delete_extension+0x3e><== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 4c74e: 103c 0004 moveb #4,%d0 4c752: b0ac 0084 cmpl %a4@(132),%d0 4c756: 6716 beqs 4c76e <_POSIX_Threads_Delete_extension+0x70> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 4c758: 42ab 00fe clrl %a3@(254) _Workspace_Free( api ); 4c75c: 2d4c 0008 movel %a4,%fp@(8) } 4c760: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4c766: 4e5e unlk %fp if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); 4c768: 4ef9 0004 acdc jmp 4acdc <_Workspace_Free> while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 4c76e: 486c 00a8 pea %a4@(168) 4c772: 4eb9 0004 aaa0 jsr 4aaa0 <_Watchdog_Remove> 4c778: 588f addql #4,%sp deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 4c77a: 42ab 00fe clrl %a3@(254) _Workspace_Free( api ); 4c77e: 2d4c 0008 movel %a4,%fp@(8) } 4c782: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4c788: 4e5e unlk %fp if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); 4c78a: 4ef9 0004 acdc jmp 4acdc <_Workspace_Free> =============================================================================== 0004787c <_POSIX_Threads_Initialize_user_threads_body>: #include #include #include void _POSIX_Threads_Initialize_user_threads_body(void) { 4787c: 4e56 ff98 linkw %fp,#-104 47880: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 47884: 2479 0006 0966 moveal 60966 ,%a2 maximum = Configuration_POSIX_API.number_of_initialization_threads; 4788a: 2839 0006 0962 movel 60962 ,%d4 if ( !user_threads || maximum == 0 ) 47890: 4a8a tstl %a2 47892: 6704 beqs 47898 <_POSIX_Threads_Initialize_user_threads_body+0x1c><== NEVER TAKEN 47894: 4a84 tstl %d4 47896: 660a bnes 478a2 <_POSIX_Threads_Initialize_user_threads_body+0x26><== ALWAYS TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 47898: 4cee 3c7c ff98 moveml %fp@(-104),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4789e: 4e5e unlk %fp <== NOT EXECUTED 478a0: 4e75 rts <== NOT EXECUTED 478a2: 240e movel %fp,%d2 478a4: 2a0e movel %fp,%d5 pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads || maximum == 0 ) 478a6: 4283 clrl %d3 478a8: 0682 ffff ffc0 addil #-64,%d2 478ae: 2c3c 0004 daa4 movel #318116,%d6 478b4: 4bf9 0004 dad0 lea 4dad0 ,%a5 478ba: 49f9 0004 db0c lea 4db0c ,%a4 478c0: 0685 ffff ffbc addil #-68,%d5 478c6: 47f9 0004 74a8 lea 474a8 ,%a3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 478cc: 2f02 movel %d2,%sp@- 478ce: 2046 moveal %d6,%a0 478d0: 4e90 jsr %a0@ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 478d2: 4878 0002 pea 2 478d6: 2f02 movel %d2,%sp@- 478d8: 4e95 jsr %a5@ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 478da: 2f2a 0004 movel %a2@(4),%sp@- 478de: 2f02 movel %d2,%sp@- 478e0: 4e94 jsr %a4@ status = pthread_create( 478e2: 42a7 clrl %sp@- 478e4: 2f12 movel %a2@,%sp@- 478e6: 2f02 movel %d2,%sp@- 478e8: 2f05 movel %d5,%sp@- 478ea: 4e93 jsr %a3@ &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 478ec: 4fef 0024 lea %sp@(36),%sp 478f0: 4a80 tstl %d0 478f2: 6612 bnes 47906 <_POSIX_Threads_Initialize_user_threads_body+0x8a> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 478f4: 5283 addql #1,%d3 478f6: 508a addql #8,%a2 478f8: b883 cmpl %d3,%d4 478fa: 66d0 bnes 478cc <_POSIX_Threads_Initialize_user_threads_body+0x50><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 478fc: 4cee 3c7c ff98 moveml %fp@(-104),%d2-%d6/%a2-%a5 47902: 4e5e unlk %fp 47904: 4e75 rts &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 47906: 2f00 movel %d0,%sp@- 47908: 4878 0001 pea 1 4790c: 4878 0002 pea 2 47910: 4eb9 0004 9b08 jsr 49b08 <_Internal_error_Occurred> ... =============================================================================== 0004c8dc <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 4c8dc: 4e56 fff4 linkw %fp,#-12 4c8e0: 48d7 1c00 moveml %a2-%a4,%sp@ 4c8e4: 266e 000c moveal %fp@(12),%a3 the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4c8e8: 49f9 0004 d630 lea 4d630 <_Timespec_To_ticks>,%a4 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c8ee: 246b 00fe moveal %a3@(254),%a2 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4c8f2: 486a 0098 pea %a2@(152) 4c8f6: 4e94 jsr %a4@ */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4c8f8: 588f addql #4,%sp RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4c8fa: 4281 clrl %d1 4c8fc: 1239 0005 f6ec moveb 5f6ec ,%d1 4c902: 92aa 0088 subl %a2@(136),%d1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; 4c906: 2740 0072 movel %d0,%a3@(114) new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 4c90a: 2741 0018 movel %d1,%a3@(24) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4c90e: 4aab 001c tstl %a3@(28) 4c912: 6606 bnes 4c91a <_POSIX_Threads_Sporadic_budget_TSR+0x3e><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 4c914: b2ab 0014 cmpl %a3@(20),%d1 4c918: 652c bcss 4c946 <_POSIX_Threads_Sporadic_budget_TSR+0x6a> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 4c91a: 486a 0090 pea %a2@(144) 4c91e: 4e94 jsr %a4@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4c920: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4c922: 2540 00b4 movel %d0,%a2@(180) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 4c926: 45ea 00a8 lea %a2@(168),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4c92a: 203c 0006 1082 movel #397442,%d0 4c930: 2d4a 000c movel %a2,%fp@(12) } 4c934: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4c93a: 2d40 0008 movel %d0,%fp@(8) 4c93e: 4e5e unlk %fp 4c940: 4ef9 0004 a970 jmp 4a970 <_Watchdog_Insert> if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4c946: 4878 0001 pea 1 4c94a: 2f01 movel %d1,%sp@- 4c94c: 2f0b movel %a3,%sp@- 4c94e: 4eb9 0004 97ec jsr 497ec <_Thread_Change_priority> 4c954: 4fef 000c lea %sp@(12),%sp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 4c958: 486a 0090 pea %a2@(144) 4c95c: 4e94 jsr %a4@ 4c95e: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4c960: 2540 00b4 movel %d0,%a2@(180) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 4c964: 45ea 00a8 lea %a2@(168),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4c968: 203c 0006 1082 movel #397442,%d0 4c96e: 2d4a 000c movel %a2,%fp@(12) } 4c972: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4c978: 2d40 0008 movel %d0,%fp@(8) 4c97c: 4e5e unlk %fp 4c97e: 4ef9 0004 a970 jmp 4a970 <_Watchdog_Insert> =============================================================================== 0004c984 <_POSIX_Threads_Sporadic_budget_callout>: 4c984: 4280 clrl %d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4c986: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 4c988: 4e56 0000 linkw %fp,#0 4c98c: 206e 0008 moveal %fp@(8),%a0 4c990: 1039 0005 f6ec moveb 5f6ec ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c996: 2268 00fe moveal %a0@(254),%a1 4c99a: 90a9 008c subl %a1@(140),%d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4c99e: 2141 0072 movel %d1,%a0@(114) new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4c9a2: 2140 0018 movel %d0,%a0@(24) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4c9a6: 4aa8 001c tstl %a0@(28) 4c9aa: 6606 bnes 4c9b2 <_POSIX_Threads_Sporadic_budget_callout+0x2e><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 4c9ac: b0a8 0014 cmpl %a0@(20),%d0 4c9b0: 6204 bhis 4c9b6 <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 4c9b2: 4e5e unlk %fp <== NOT EXECUTED 4c9b4: 4e75 rts <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4c9b6: 4878 0001 pea 1 4c9ba: 2f00 movel %d0,%sp@- 4c9bc: 2f08 movel %a0,%sp@- 4c9be: 4eb9 0004 97ec jsr 497ec <_Thread_Change_priority> 4c9c4: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 4c9c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e768 <_POSIX_Threads_cancel_run>: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4e768: 7001 moveq #1,%d0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4e76a: 4e56 ffec linkw %fp,#-20 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 ]; 4e76e: 206e 0008 moveal %fp@(8),%a0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4e772: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 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 ]; 4e776: 2668 00fe moveal %a0@(254),%a3 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4e77a: 240b movel %a3,%d2 4e77c: 49f9 0004 acdc lea 4acdc <_Workspace_Free>,%a4 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4e782: 263c 0000 0700 movel #1792,%d3 4e788: 0682 0000 00e8 addil #232,%d2 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4e78e: 2740 00d8 movel %d0,%a3@(216) while ( !_Chain_Is_empty( handler_stack ) ) { 4e792: b4ab 00e4 cmpl %a3@(228),%d2 4e796: 6730 beqs 4e7c8 <_POSIX_Threads_cancel_run+0x60> _ISR_Disable( level ); 4e798: 2003 movel %d3,%d0 4e79a: 40c1 movew %sr,%d1 4e79c: 8081 orl %d1,%d0 4e79e: 46c0 movew %d0,%sr handler = (POSIX_Cancel_Handler_control *) 4e7a0: 246b 00ec moveal %a3@(236),%a2 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4e7a4: 2252 moveal %a2@,%a1 previous = the_node->previous; 4e7a6: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4e7aa: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4e7ae: 2089 movel %a1,%a0@ _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4e7b0: 46c1 movew %d1,%sr (*handler->routine)( handler->arg ); 4e7b2: 2f2a 000c movel %a2@(12),%sp@- 4e7b6: 206a 0008 moveal %a2@(8),%a0 4e7ba: 4e90 jsr %a0@ _Workspace_Free( handler ); 4e7bc: 2f0a movel %a2,%sp@- 4e7be: 4e94 jsr %a4@ handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 4e7c0: 508f addql #8,%sp 4e7c2: b4ab 00e4 cmpl %a3@(228),%d2 4e7c6: 66d0 bnes 4e798 <_POSIX_Threads_cancel_run+0x30> <== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4e7c8: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4e7ce: 4e5e unlk %fp ... =============================================================================== 00047240 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 47240: 4e56 ffec linkw %fp,#-20 47244: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47248: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 4724c: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 47250: 4aaa 0052 tstl %a2@(82) 47254: 6606 bnes 4725c <_POSIX_Timer_TSR+0x1c> 47256: 4aaa 0056 tstl %a2@(86) 4725a: 672c beqs 47288 <_POSIX_Timer_TSR+0x48> <== NEVER TAKEN ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 4725c: 2f0a movel %a2,%sp@- 4725e: 4879 0004 7240 pea 47240 <_POSIX_Timer_TSR> 47264: 2f2a 0008 movel %a2@(8),%sp@- 47268: 2f2a 0062 movel %a2@(98),%sp@- 4726c: 486a 0010 pea %a2@(16) 47270: 4eb9 0004 d33c jsr 4d33c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 47276: 4fef 0014 lea %sp@(20),%sp 4727a: 4a00 tstb %d0 4727c: 662e bnes 472ac <_POSIX_Timer_TSR+0x6c> /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 4727e: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 47284: 4e5e unlk %fp <== NOT EXECUTED 47286: 4e75 rts <== 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; 47288: 7004 moveq #4,%d0 <== NOT EXECUTED 4728a: 1540 003c moveb %d0,%a2@(60) <== NOT EXECUTED /* * 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 ) ) { 4728e: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 47292: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 47296: 4eb9 0004 ce74 jsr 4ce74 <== NOT EXECUTED } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 4729c: 508f addql #8,%sp <== NOT EXECUTED 4729e: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED } 472a2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 472a8: 4e5e unlk %fp 472aa: 4e75 rts 472ac: 4879 0006 1b48 pea 61b48 <_TOD> 472b2: 486e fff8 pea %fp@(-8) 472b6: 4eb9 0004 8bc8 jsr 48bc8 <_TOD_Get_with_nanoseconds> 472bc: 2040 moveal %d0,%a0 472be: 2410 movel %a0@,%d2 472c0: 2628 0004 movel %a0@(4),%d3 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 472c4: 2f3c 3b9a ca00 movel #1000000000,%sp@- 472ca: 42a7 clrl %sp@- 472cc: 2f03 movel %d3,%sp@- 472ce: 2f02 movel %d2,%sp@- 472d0: 4eb9 0005 c398 jsr 5c398 <__divdi3> _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 472d6: 4fef 000c lea %sp@(12),%sp 472da: 2ebc 3b9a ca00 movel #1000000000,%sp@ 472e0: 42a7 clrl %sp@- static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 472e2: 2541 006a movel %d1,%a2@(106) _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 472e6: 2f03 movel %d3,%sp@- 472e8: 2f02 movel %d2,%sp@- 472ea: 4eb9 0005 c7f8 jsr 5c7f8 <__moddi3> /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 472f0: 4fef 0018 lea %sp@(24),%sp 472f4: 7003 moveq #3,%d0 472f6: 2541 006e movel %d1,%a2@(110) 472fa: 1540 003c moveb %d0,%a2@(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 ) ) { 472fe: 2f2a 0042 movel %a2@(66),%sp@- 47302: 2f2a 0038 movel %a2@(56),%sp@- 47306: 4eb9 0004 ce74 jsr 4ce74 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 4730c: 508f addql #8,%sp 4730e: 42aa 0066 clrl %a2@(102) 47312: 608e bras 472a2 <_POSIX_Timer_TSR+0x62> =============================================================================== 0004ef90 <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4ef90: 223c 0000 0700 movel #1792,%d1 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4ef96: 4e56 0000 linkw %fp,#0 4ef9a: 202e 0008 movel %fp@(8),%d0 4ef9e: 2f03 movel %d3,%sp@- 4efa0: 2600 movel %d0,%d3 4efa2: 5383 subql #1,%d3 4efa4: 2f02 movel %d2,%sp@- 4efa6: 7401 moveq #1,%d2 4efa8: e7aa lsll %d3,%d2 clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4efaa: 40c3 movew %sr,%d3 4efac: 8283 orl %d3,%d1 4efae: 46c1 movew %d1,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4efb0: 2200 movel %d0,%d1 4efb2: 41f9 0006 1468 lea 61468 <_POSIX_signals_Vectors>,%a0 4efb8: e589 lsll #2,%d1 4efba: e988 lsll #4,%d0 4efbc: 9081 subl %d1,%d0 4efbe: 7202 moveq #2,%d1 4efc0: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1 4efc4: 6712 beqs 4efd8 <_POSIX_signals_Clear_process_signals+0x48> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4efc6: 4682 notl %d2 4efc8: c5b9 0006 165c andl %d2,6165c <_POSIX_signals_Pending> } _ISR_Enable( level ); 4efce: 46c3 movew %d3,%sr } 4efd0: 241f movel %sp@+,%d2 4efd2: 261f movel %sp@+,%d3 4efd4: 4e5e unlk %fp 4efd6: 4e75 rts ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4efd8: 2040 moveal %d0,%a0 4efda: d1fc 0006 1660 addal #398944,%a0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4efe0: 2008 movel %a0,%d0 4efe2: 5880 addql #4,%d0 4efe4: b090 cmpl %a0@,%d0 4efe6: 67de beqs 4efc6 <_POSIX_signals_Clear_process_signals+0x36><== ALWAYS TAKEN clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); 4efe8: 46c3 movew %d3,%sr <== NOT EXECUTED } 4efea: 241f movel %sp@+,%d2 <== NOT EXECUTED 4efec: 261f movel %sp@+,%d3 <== NOT EXECUTED 4efee: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00048000 <_POSIX_signals_Get_lowest>: sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 48000: 701b moveq #27,%d0 #include static int _POSIX_signals_Get_lowest( sigset_t set ) { 48002: 4e56 fff4 linkw %fp,#-12 48006: 48d7 001c moveml %d2-%d4,%sp@ 4800a: 242e 0008 movel %fp@(8),%d2 4800e: 7601 moveq #1,%d3 #include #include #include #include static int _POSIX_signals_Get_lowest( 48010: 2200 movel %d0,%d1 48012: 5381 subql #1,%d1 48014: 2803 movel %d3,%d4 48016: e3ac lsll %d1,%d4 48018: 2204 movel %d4,%d1 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 4801a: c282 andl %d2,%d1 4801c: 6626 bnes 48044 <_POSIX_signals_Get_lowest+0x44> <== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4801e: 5280 addql #1,%d0 48020: 123c 0020 moveb #32,%d1 48024: b280 cmpl %d0,%d1 48026: 66e8 bnes 48010 <_POSIX_signals_Get_lowest+0x10> 48028: 7001 moveq #1,%d0 4802a: 7601 moveq #1,%d3 #include #include #include #include static int _POSIX_signals_Get_lowest( 4802c: 2200 movel %d0,%d1 4802e: 5381 subql #1,%d1 48030: 2803 movel %d3,%d4 48032: e3ac lsll %d1,%d4 48034: 2204 movel %d4,%d1 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 48036: c282 andl %d2,%d1 48038: 660a bnes 48044 <_POSIX_signals_Get_lowest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4803a: 5280 addql #1,%d0 4803c: 123c 001b moveb #27,%d1 48040: b280 cmpl %d0,%d1 48042: 66e8 bnes 4802c <_POSIX_signals_Get_lowest+0x2c> <== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 48044: 4cd7 001c moveml %sp@,%d2-%d4 48048: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c480 <_POSIX_signals_Post_switch_hook>: */ static void _POSIX_signals_Post_switch_hook( Thread_Control *the_thread ) { 4c480: 4e56 ffec linkw %fp,#-20 4c484: 206e 0008 moveal %fp@(8),%a0 4c488: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c48c: 2468 00fe moveal %a0@(254),%a2 /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; 4c490: 2079 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a0 4c496: 2828 0034 movel %a0@(52),%d4 /* * api may be NULL in case of a thread close in progress */ if ( !api ) 4c49a: 4a8a tstl %a2 4c49c: 6700 0098 beqw 4c536 <_POSIX_signals_Post_switch_hook+0xb6> * * 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) { _ISR_Disable( level ); 4c4a0: 263c 0000 0700 movel #1792,%d3 4c4a6: 47f9 0004 e860 lea 4e860 <_POSIX_signals_Check_signal>,%a3 4c4ac: 2003 movel %d3,%d0 4c4ae: 40c1 movew %sr,%d1 4c4b0: 8081 orl %d1,%d0 4c4b2: 46c0 movew %d0,%sr if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 4c4b4: 2039 0006 165c movel 6165c <_POSIX_signals_Pending>,%d0 * 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) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4c4ba: 242a 00d0 movel %a2@(208),%d2 4c4be: 4682 notl %d2 (api->signals_pending | _POSIX_signals_Pending)) ) { 4c4c0: 80aa 00d4 orl %a2@(212),%d0 * 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) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4c4c4: c082 andl %d2,%d0 (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4c4c6: 46c1 movew %d1,%sr * 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) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4c4c8: 4a80 tstl %d0 4c4ca: 6760 beqs 4c52c <_POSIX_signals_Post_switch_hook+0xac> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4c4cc: 741b moveq #27,%d2 _POSIX_signals_Check_signal( api, signo, false ); 4c4ce: 42a7 clrl %sp@- 4c4d0: 2f02 movel %d2,%sp@- 4c4d2: 2f0a movel %a2,%sp@- 4c4d4: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4c4d6: 4878 0001 pea 1 4c4da: 2f02 movel %d2,%sp@- _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4c4dc: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4c4de: 2f0a movel %a2,%sp@- 4c4e0: 4e93 jsr %a3@ _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4c4e2: 4fef 0018 lea %sp@(24),%sp 4c4e6: 7020 moveq #32,%d0 4c4e8: b082 cmpl %d2,%d0 4c4ea: 66e2 bnes 4c4ce <_POSIX_signals_Post_switch_hook+0x4e> 4c4ec: 7401 moveq #1,%d2 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 4c4ee: 42a7 clrl %sp@- 4c4f0: 2f02 movel %d2,%sp@- 4c4f2: 2f0a movel %a2,%sp@- 4c4f4: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4c4f6: 4878 0001 pea 1 4c4fa: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4c4fc: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4c4fe: 2f0a movel %a2,%sp@- 4c500: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4c502: 4fef 0018 lea %sp@(24),%sp 4c506: 701b moveq #27,%d0 4c508: b082 cmpl %d2,%d0 4c50a: 67a0 beqs 4c4ac <_POSIX_signals_Post_switch_hook+0x2c><== NEVER TAKEN _POSIX_signals_Check_signal( api, signo, false ); 4c50c: 42a7 clrl %sp@- 4c50e: 2f02 movel %d2,%sp@- 4c510: 2f0a movel %a2,%sp@- 4c512: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4c514: 4878 0001 pea 1 4c518: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4c51a: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4c51c: 2f0a movel %a2,%sp@- 4c51e: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4c520: 4fef 0018 lea %sp@(24),%sp 4c524: 701b moveq #27,%d0 4c526: b082 cmpl %d2,%d0 4c528: 66c4 bnes 4c4ee <_POSIX_signals_Post_switch_hook+0x6e> 4c52a: 6080 bras 4c4ac <_POSIX_signals_Post_switch_hook+0x2c> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; 4c52c: 2079 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a0 4c532: 2144 0034 movel %d4,%a0@(52) } 4c536: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4c53c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005d2a8 <_POSIX_signals_Unblock_thread>: 5d2a8: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 5d2aa: 4e56 fff4 linkw %fp,#-12 5d2ae: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5d2b2: 246e 0008 moveal %fp@(8),%a2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5d2b6: 222a 0010 movel %a2@(16),%d1 5d2ba: 2401 movel %d1,%d2 5d2bc: 262e 000c movel %fp@(12),%d3 5d2c0: 5383 subql #1,%d3 5d2c2: 0282 1000 8000 andil #268468224,%d2 { POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5d2c8: 206a 00fe moveal %a2@(254),%a0 5d2cc: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5d2ce: 0c82 1000 8000 cmpil #268468224,%d2 5d2d4: 6776 beqs 5d34c <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 5d2d6: 2428 00d0 movel %a0@(208),%d2 5d2da: 4682 notl %d2 5d2dc: c082 andl %d2,%d0 5d2de: 6760 beqs 5d340 <_POSIX_signals_Unblock_thread+0x98> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 5d2e0: 0801 001c btst #28,%d1 5d2e4: 673e beqs 5d324 <_POSIX_signals_Unblock_thread+0x7c> the_thread->Wait.return_code = EINTR; 5d2e6: 7004 moveq #4,%d0 5d2e8: 2540 0034 movel %d0,%a2@(52) */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 5d2ec: 2001 movel %d1,%d0 5d2ee: 0280 0003 bee0 andil #245472,%d0 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 5d2f4: 6600 00aa bnew 5d3a0 <_POSIX_signals_Unblock_thread+0xf8> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 5d2f8: 44c1 movew %d1,%ccr 5d2fa: 6a44 bpls 5d340 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 5d2fc: 486a 0048 pea %a2@(72) 5d300: 4eb9 0004 aaa0 jsr 4aaa0 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 5d306: 2f3c 1007 fff8 movel #268959736,%sp@- 5d30c: 2f0a movel %a2,%sp@- 5d30e: 4eb9 0004 98d0 jsr 498d0 <_Thread_Clear_state> 5d314: 4fef 000c lea %sp@(12),%sp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 5d318: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 5d31e: 4200 clrb %d0 } 5d320: 4e5e unlk %fp 5d322: 4e75 rts else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 5d324: 4a81 tstl %d1 5d326: 6618 bnes 5d340 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5d328: 4ab9 0006 1428 tstl 61428 <_Per_CPU_Information+0x8> 5d32e: 6710 beqs 5d340 <_POSIX_signals_Unblock_thread+0x98> 5d330: b5f9 0006 142e cmpal 6142e <_Per_CPU_Information+0xe>,%a2 5d336: 6608 bnes 5d340 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN _Thread_Dispatch_necessary = true; 5d338: 7001 moveq #1,%d0 5d33a: 13c0 0006 142c moveb %d0,6142c <_Per_CPU_Information+0xc> } } return false; } 5d340: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 5d346: 4200 clrb %d0 } 5d348: 4e5e unlk %fp 5d34a: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 5d34c: 2200 movel %d0,%d1 5d34e: c2aa 0030 andl %a2@(48),%d1 5d352: 6730 beqs 5d384 <_POSIX_signals_Unblock_thread+0xdc> the_thread->Wait.return_code = EINTR; 5d354: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 5d356: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 5d35a: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 5d35e: 4aae 0010 tstl %fp@(16) 5d362: 6752 beqs 5d3b6 <_POSIX_signals_Unblock_thread+0x10e> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 5d364: 226e 0010 moveal %fp@(16),%a1 5d368: 20d9 movel %a1@+,%a0@+ 5d36a: 20d9 movel %a1@+,%a0@+ 5d36c: 2091 movel %a1@,%a0@ } _Thread_queue_Extract_with_proxy( the_thread ); 5d36e: 2f0a movel %a2,%sp@- 5d370: 4eb9 0004 a444 jsr 4a444 <_Thread_queue_Extract_with_proxy> return true; 5d376: 588f addql #4,%sp 5d378: 7001 moveq #1,%d0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 5d37a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5d380: 4e5e unlk %fp 5d382: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 5d384: 2228 00d0 movel %a0@(208),%d1 5d388: 4681 notl %d1 5d38a: c081 andl %d1,%d0 5d38c: 67b2 beqs 5d340 <_POSIX_signals_Unblock_thread+0x98> the_thread->Wait.return_code = EINTR; 5d38e: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 5d390: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 5d394: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 5d398: 4aae 0010 tstl %fp@(16) 5d39c: 66c6 bnes 5d364 <_POSIX_signals_Unblock_thread+0xbc><== ALWAYS TAKEN 5d39e: 6016 bras 5d3b6 <_POSIX_signals_Unblock_thread+0x10e><== NOT EXECUTED /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 5d3a0: 2f0a movel %a2,%sp@- 5d3a2: 4eb9 0004 a444 jsr 4a444 <_Thread_queue_Extract_with_proxy> 5d3a8: 588f addql #4,%sp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 5d3aa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 5d3b0: 4200 clrb %d0 } 5d3b2: 4e5e unlk %fp 5d3b4: 4e75 rts the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 5d3b6: 20ae 000c movel %fp@(12),%a0@ the_info->si_code = SI_USER; 5d3ba: 103c 0001 moveb #1,%d0 the_info->si_value.sival_int = 0; 5d3be: 42a8 0008 clrl %a0@(8) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 5d3c2: 2140 0004 movel %d0,%a0@(4) the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 5d3c6: 2f0a movel %a2,%sp@- 5d3c8: 4eb9 0004 a444 jsr 4a444 <_Thread_queue_Extract_with_proxy> return true; 5d3ce: 588f addql #4,%sp 5d3d0: 7001 moveq #1,%d0 5d3d2: 60a6 bras 5d37a <_POSIX_signals_Unblock_thread+0xd2> =============================================================================== 0004e31c <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4e31c: 4e56 fff0 linkw %fp,#-16 * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) 4e320: 2039 0006 75b2 movel 675b2 <_Thread_Dispatch_disable_level>,%d0 4e326: 48d7 001c moveml %d2-%d4,%sp@ 4e32a: 262e 0008 movel %fp@(8),%d3 4e32e: 282e 000c movel %fp@(12),%d4 4e332: 142e 0013 moveb %fp@(19),%d2 4e336: 4a80 tstl %d0 4e338: 6640 bnes 4e37a <_Protected_heap_Walk+0x5e> * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4e33a: 2f39 0006 7636 movel 67636 <_RTEMS_Allocator_Mutex>,%sp@- status = _Heap_Walk( the_heap, source, do_dump ); 4e340: 0282 0000 00ff andil #255,%d2 * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4e346: 4eb9 0004 c300 jsr 4c300 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 4e34c: 2f02 movel %d2,%sp@- 4e34e: 2f04 movel %d4,%sp@- 4e350: 2f03 movel %d3,%sp@- 4e352: 4eb9 0004 d40a jsr 4d40a <_Heap_Walk> _RTEMS_Unlock_allocator(); 4e358: 2f39 0006 7636 movel 67636 <_RTEMS_Allocator_Mutex>,%sp@- 4e35e: 2d40 fffc movel %d0,%fp@(-4) 4e362: 4eb9 0004 c360 jsr 4c360 <_API_Mutex_Unlock> 4e368: 202e fffc movel %fp@(-4),%d0 4e36c: 4fef 0014 lea %sp@(20),%sp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4e370: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4e376: 4e5e unlk %fp 4e378: 4e75 rts if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4e37a: 2d44 000c movel %d4,%fp@(12) 4e37e: 0282 0000 00ff andil #255,%d2 4e384: 2d43 0008 movel %d3,%fp@(8) 4e388: 2d42 0010 movel %d2,%fp@(16) } return status; } 4e38c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4e392: 4e5e unlk %fp if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4e394: 4ef9 0004 d40a jmp 4d40a <_Heap_Walk> ... =============================================================================== 00049fbe <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 49fbe: 4e56 ffec linkw %fp,#-20 49fc2: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 49fc6: 2a6e 0008 moveal %fp@(8),%a5 49fca: 266e 000c moveal %fp@(12),%a3 RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 49fce: 4a8b tstl %a3 49fd0: 6700 00b0 beqw 4a082 <_RBTree_Extract_unprotected+0xc4> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 49fd4: b7ed 0008 cmpal %a5@(8),%a3 49fd8: 6700 00d2 beqw 4a0ac <_RBTree_Extract_unprotected+0xee> the_rbtree->first[RBT_LEFT] = next; } /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 49fdc: b7ed 000c cmpal %a5@(12),%a3 49fe0: 6700 00e4 beqw 4a0c6 <_RBTree_Extract_unprotected+0x108> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 49fe4: 246b 0004 moveal %a3@(4),%a2 49fe8: 4a8a tstl %a2 49fea: 6700 00f4 beqw 4a0e0 <_RBTree_Extract_unprotected+0x122> 49fee: 4aab 0008 tstl %a3@(8) 49ff2: 6700 0098 beqw 4a08c <_RBTree_Extract_unprotected+0xce> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 49ff6: 202a 0008 movel %a2@(8),%d0 49ffa: 6708 beqs 4a004 <_RBTree_Extract_unprotected+0x46> 49ffc: 2440 moveal %d0,%a2 49ffe: 202a 0008 movel %a2@(8),%d0 4a002: 66f8 bnes 49ffc <_RBTree_Extract_unprotected+0x3e> * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; 4a004: 286a 0004 moveal %a2@(4),%a4 if(leaf) { 4a008: 4a8c tstl %a4 4a00a: 6700 00fc beqw 4a108 <_RBTree_Extract_unprotected+0x14a> leaf->parent = target->parent; 4a00e: 2892 movel %a2@,%a4@ } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 4a010: 2252 moveal %a2@,%a1 4a012: b5e9 0004 cmpal %a1@(4),%a2 4a016: 56c0 sne %d0 target->parent->child[dir] = leaf; 4a018: 7201 moveq #1,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = target; 4a01a: 7401 moveq #1,%d2 } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 4a01c: 49c0 extbl %d0 target->parent->child[dir] = leaf; 4a01e: 9280 subl %d0,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4a020: 2053 moveal %a3@,%a0 /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; target->parent->child[dir] = leaf; 4a022: 238c 1c00 movel %a4,%a1@(00000000,%d1:l:4) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4a026: b7e8 0004 cmpal %a0@(4),%a3 4a02a: 56c1 sne %d1 leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; 4a02c: 202a 000c movel %a2@(12),%d0 dir = target != target->parent->child[0]; target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4a030: 49c1 extbl %d1 the_node->parent->child[dir] = target; 4a032: 9481 subl %d1,%d2 4a034: 218a 2c00 movel %a2,%a0@(00000000,%d2:l:4) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 4a038: 256b 0008 0008 movel %a3@(8),%a2@(8) if (the_node->child[RBT_RIGHT]) 4a03e: 206b 0008 moveal %a3@(8),%a0 4a042: 4a88 tstl %a0 4a044: 6702 beqs 4a048 <_RBTree_Extract_unprotected+0x8a><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 4a046: 208a movel %a2,%a0@ target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 4a048: 256b 0004 0004 movel %a3@(4),%a2@(4) if (the_node->child[RBT_LEFT]) 4a04e: 206b 0004 moveal %a3@(4),%a0 4a052: 4a88 tstl %a0 4a054: 6702 beqs 4a058 <_RBTree_Extract_unprotected+0x9a> the_node->child[RBT_LEFT]->parent = target; 4a056: 208a movel %a2,%a0@ /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; 4a058: 2493 movel %a3@,%a2@ target->color = the_node->color; 4a05a: 256b 000c 000c movel %a3@(12),%a2@(12) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 4a060: 4a80 tstl %d0 4a062: 6608 bnes 4a06c <_RBTree_Extract_unprotected+0xae> if (leaf) { 4a064: 4a8c tstl %a4 4a066: 6704 beqs 4a06c <_RBTree_Extract_unprotected+0xae> leaf->color = RBT_BLACK; /* case 2 */ 4a068: 42ac 000c clrl %a4@(12) /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; 4a06c: 206d 0004 moveal %a5@(4),%a0 */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 4a070: 42ab 0008 clrl %a3@(8) 4a074: 42ab 0004 clrl %a3@(4) 4a078: 4293 clrl %a3@ 4a07a: 4a88 tstl %a0 4a07c: 6704 beqs 4a082 <_RBTree_Extract_unprotected+0xc4> 4a07e: 42a8 000c clrl %a0@(12) } 4a082: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a088: 4e5e unlk %fp 4a08a: 4e75 rts * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4a08c: 284a moveal %a2,%a4 * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; 4a08e: 2893 movel %a3@,%a4@ } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4a090: 7401 moveq #1,%d2 _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4a092: 2053 moveal %a3@,%a0 4a094: b7e8 0004 cmpal %a0@(4),%a3 4a098: 56c1 sne %d1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 4a09a: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4a09e: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4a0a0: 9481 subl %d1,%d2 4a0a2: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 4a0a6: 4a80 tstl %d0 4a0a8: 66c2 bnes 4a06c <_RBTree_Extract_unprotected+0xae> 4a0aa: 60b8 bras 4a064 <_RBTree_Extract_unprotected+0xa6> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_RIGHT ); 4a0ac: 4878 0001 pea 1 4a0b0: 2f0b movel %a3,%sp@- 4a0b2: 4eb9 0004 a3c0 jsr 4a3c0 <_RBTree_Next_unprotected> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { RBTree_Node *next; next = _RBTree_Successor_unprotected(the_node); the_rbtree->first[RBT_LEFT] = next; 4a0b8: 508f addql #8,%sp 4a0ba: 2b40 0008 movel %d0,%a5@(8) } /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4a0be: b7ed 000c cmpal %a5@(12),%a3 4a0c2: 6600 ff20 bnew 49fe4 <_RBTree_Extract_unprotected+0x26> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_LEFT ); 4a0c6: 42a7 clrl %sp@- 4a0c8: 2f0b movel %a3,%sp@- 4a0ca: 4eb9 0004 a3c0 jsr 4a3c0 <_RBTree_Next_unprotected> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4a0d0: 246b 0004 moveal %a3@(4),%a2 /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { RBTree_Node *previous; previous = _RBTree_Predecessor_unprotected(the_node); the_rbtree->first[RBT_RIGHT] = previous; 4a0d4: 508f addql #8,%sp 4a0d6: 2b40 000c movel %d0,%a5@(12) * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4a0da: 4a8a tstl %a2 4a0dc: 6600 ff10 bnew 49fee <_RBTree_Extract_unprotected+0x30> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; 4a0e0: 286b 0008 moveal %a3@(8),%a4 if( leaf ) { 4a0e4: 4a8c tstl %a4 4a0e6: 66a6 bnes 4a08e <_RBTree_Extract_unprotected+0xd0> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4a0e8: 2f0b movel %a3,%sp@- } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4a0ea: 7401 moveq #1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4a0ec: 4eba fcc2 jsr %pc@(49db0 <_RBTree_Extract_validate_unprotected>) } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4a0f0: 2053 moveal %a3@,%a0 4a0f2: b7e8 0004 cmpal %a0@(4),%a3 4a0f6: 56c1 sne %d1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 4a0f8: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4a0fc: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4a0fe: 9481 subl %d1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4a100: 588f addql #4,%sp } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4a102: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) 4a106: 609e bras 4a0a6 <_RBTree_Extract_unprotected+0xe8> leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 4a108: 2f0a movel %a2,%sp@- 4a10a: 4eba fca4 jsr %pc@(49db0 <_RBTree_Extract_validate_unprotected>) 4a10e: 588f addql #4,%sp 4a110: 6000 fefe braw 4a010 <_RBTree_Extract_unprotected+0x52> =============================================================================== 00049db0 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 49db0: 4e56 ffec linkw %fp,#-20 49db4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49db8: 266e 0008 moveal %fp@(8),%a3 RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 49dbc: 2053 moveal %a3@,%a0 if(!parent->parent) return; 49dbe: 4a90 tstl %a0@ 49dc0: 677e beqs 49e40 <_RBTree_Extract_validate_unprotected+0x90> { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 49dc2: 2268 0004 moveal %a0@(4),%a1 49dc6: b3cb cmpal %a3,%a1 49dc8: 6700 01de beqw 49fa8 <_RBTree_Extract_validate_unprotected+0x1f8> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 49dcc: 7401 moveq #1,%d2 49dce: b4ab 000c cmpl %a3@(12),%d2 49dd2: 6764 beqs 49e38 <_RBTree_Extract_validate_unprotected+0x88> sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 49dd4: 4a90 tstl %a0@ 49dd6: 6760 beqs 49e38 <_RBTree_Extract_validate_unprotected+0x88> 49dd8: 4a89 tstl %a1 49dda: 670a beqs 49de6 <_RBTree_Extract_validate_unprotected+0x36><== NEVER TAKEN 49ddc: 7001 moveq #1,%d0 49dde: b0a9 000c cmpl %a1@(12),%d0 49de2: 6700 011c beqw 49f00 <_RBTree_Extract_validate_unprotected+0x150> _RBTree_Rotate(parent, dir); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 49de6: 2469 0008 moveal %a1@(8),%a2 49dea: 4a8a tstl %a2 49dec: 6708 beqs 49df6 <_RBTree_Extract_validate_unprotected+0x46> 49dee: 7601 moveq #1,%d3 49df0: b6aa 000c cmpl %a2@(12),%d3 49df4: 6752 beqs 49e48 <_RBTree_Extract_validate_unprotected+0x98> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 49df6: 2469 0004 moveal %a1@(4),%a2 49dfa: 4a8a tstl %a2 49dfc: 6708 beqs 49e06 <_RBTree_Extract_validate_unprotected+0x56> 49dfe: 7001 moveq #1,%d0 49e00: b0aa 000c cmpl %a2@(12),%d0 49e04: 6742 beqs 49e48 <_RBTree_Extract_validate_unprotected+0x98> sibling->color = RBT_RED; 49e06: 7001 moveq #1,%d0 49e08: 2340 000c movel %d0,%a1@(12) 49e0c: b0a8 000c cmpl %a0@(12),%d0 49e10: 6700 019e beqw 49fb0 <_RBTree_Extract_validate_unprotected+0x200> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 49e14: 2450 moveal %a0@,%a2 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49e16: 4a8a tstl %a2 49e18: 6700 0154 beqw 49f6e <_RBTree_Extract_validate_unprotected+0x1be> if(!(the_node->parent->parent)) return NULL; 49e1c: 4a92 tstl %a2@ 49e1e: 6700 014e beqw 49f6e <_RBTree_Extract_validate_unprotected+0x1be> if(the_node == the_node->parent->child[RBT_LEFT]) 49e22: 226a 0004 moveal %a2@(4),%a1 49e26: b3c8 cmpal %a0,%a1 49e28: 6700 0138 beqw 49f62 <_RBTree_Extract_validate_unprotected+0x1b2> 49e2c: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49e2e: 204a moveal %a2,%a0 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 49e30: 7401 moveq #1,%d2 49e32: b4ab 000c cmpl %a3@(12),%d2 49e36: 669c bnes 49dd4 <_RBTree_Extract_validate_unprotected+0x24><== ALWAYS TAKEN sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 49e38: 2053 moveal %a3@,%a0 49e3a: 4a90 tstl %a0@ 49e3c: 6700 0140 beqw 49f7e <_RBTree_Extract_validate_unprotected+0x1ce> } 49e40: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 49e44: 4e5e unlk %fp 49e46: 4e75 rts * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; 49e48: b7e8 0004 cmpal %a0@(4),%a3 49e4c: 56c0 sne %d0 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 49e4e: 7201 moveq #1,%d1 49e50: 4480 negl %d0 49e52: b181 eorl %d0,%d1 49e54: 0280 0000 00ff andil #255,%d0 49e5a: 0281 0000 00ff andil #255,%d1 if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { 49e60: 5281 addql #1,%d1 49e62: 2471 1c00 moveal %a1@(00000000,%d1:l:4),%a2 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 49e66: 4a8a tstl %a2 49e68: 670a beqs 49e74 <_RBTree_Extract_validate_unprotected+0xc4> 49e6a: 7401 moveq #1,%d2 49e6c: b4aa 000c cmpl %a2@(12),%d2 49e70: 6700 0118 beqw 49f8a <_RBTree_Extract_validate_unprotected+0x1da> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; 49e74: 5280 addql #1,%d0 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; 49e76: 7401 moveq #1,%d2 sibling->child[dir]->color = RBT_BLACK; 49e78: 2471 0c00 moveal %a1@(00000000,%d0:l:4),%a2 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; 49e7c: 2342 000c movel %d2,%a1@(12) sibling->child[dir]->color = RBT_BLACK; 49e80: 42aa 000c clrl %a2@(12) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 49e84: 4a8a tstl %a2 49e86: 672c beqs 49eb4 <_RBTree_Extract_validate_unprotected+0x104><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 49e88: 49f2 1c00 lea %a2@(00000000,%d1:l:4),%a4 49e8c: 2394 0c00 movel %a4@,%a1@(00000000,%d0:l:4) if (c->child[dir]) 49e90: 2872 1c00 moveal %a2@(00000000,%d1:l:4),%a4 49e94: 4a8c tstl %a4 49e96: 6702 beqs 49e9a <_RBTree_Extract_validate_unprotected+0xea> c->child[dir]->parent = the_node; 49e98: 2889 movel %a1,%a4@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49e9a: 2851 moveal %a1@,%a4 49e9c: 7601 moveq #1,%d3 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 49e9e: 2589 1c00 movel %a1,%a2@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49ea2: b3ec 0004 cmpal %a4@(4),%a1 49ea6: 56c2 sne %d2 c->parent = the_node->parent; 49ea8: 248c movel %a4,%a2@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49eaa: 49c2 extbl %d2 49eac: 9682 subl %d2,%d3 49eae: 298a 3c00 movel %a2,%a4@(00000000,%d3:l:4) c->parent = the_node->parent; the_node->parent = c; 49eb2: 228a movel %a2,%a1@ _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; 49eb4: 2870 1c00 moveal %a0@(00000000,%d1:l:4),%a4 } sibling->color = parent->color; 49eb8: 2968 000c 000c movel %a0@(12),%a4@(12) 49ebe: 2274 1c00 moveal %a4@(00000000,%d1:l:4),%a1 parent->color = RBT_BLACK; 49ec2: 42a8 000c clrl %a0@(12) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 49ec6: 42a9 000c clrl %a1@(12) RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 49eca: 43f4 0c00 lea %a4@(00000000,%d0:l:4),%a1 49ece: 2191 1c00 movel %a1@,%a0@(00000000,%d1:l:4) if (c->child[dir]) 49ed2: 2274 0c00 moveal %a4@(00000000,%d0:l:4),%a1 49ed6: 4a89 tstl %a1 49ed8: 6702 beqs 49edc <_RBTree_Extract_validate_unprotected+0x12c> c->child[dir]->parent = the_node; 49eda: 2288 movel %a0,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49edc: 2250 moveal %a0@,%a1 49ede: 7201 moveq #1,%d1 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 49ee0: 2988 0c00 movel %a0,%a4@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49ee4: b1e9 0004 cmpal %a1@(4),%a0 49ee8: 56c0 sne %d0 c->parent = the_node->parent; 49eea: 2889 movel %a1,%a4@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49eec: 49c0 extbl %d0 49eee: 9280 subl %d0,%d1 c->parent = the_node->parent; the_node->parent = c; 49ef0: 208c movel %a4,%a0@ _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 49ef2: 2053 moveal %a3@,%a0 if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49ef4: 238c 1c00 movel %a4,%a1@(00000000,%d1:l:4) 49ef8: 4a90 tstl %a0@ 49efa: 6600 ff44 bnew 49e40 <_RBTree_Extract_validate_unprotected+0x90> 49efe: 607e bras 49f7e <_RBTree_Extract_validate_unprotected+0x1ce><== NOT EXECUTED * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 49f00: b7e8 0004 cmpal %a0@(4),%a3 49f04: 56c1 sne %d1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 49f06: 7001 moveq #1,%d0 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 49f08: 7601 moveq #1,%d3 sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 49f0a: 4481 negl %d1 49f0c: b380 eorl %d1,%d0 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 49f0e: 2143 000c movel %d3,%a0@(12) 49f12: 0280 0000 00ff andil #255,%d0 sibling->color = RBT_BLACK; 49f18: 42a9 000c clrl %a1@(12) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 49f1c: 5280 addql #1,%d0 49f1e: 2470 0c00 moveal %a0@(00000000,%d0:l:4),%a2 dir = the_node != parent->child[0]; 49f22: 0281 0000 00ff andil #255,%d1 49f28: 4a8a tstl %a2 49f2a: 674c beqs 49f78 <_RBTree_Extract_validate_unprotected+0x1c8><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 49f2c: 5281 addql #1,%d1 49f2e: 43f2 1c00 lea %a2@(00000000,%d1:l:4),%a1 49f32: 2191 0c00 movel %a1@,%a0@(00000000,%d0:l:4) if (c->child[dir]) 49f36: 2272 1c00 moveal %a2@(00000000,%d1:l:4),%a1 49f3a: 4a89 tstl %a1 49f3c: 6702 beqs 49f40 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN c->child[dir]->parent = the_node; 49f3e: 2288 movel %a0,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49f40: 2250 moveal %a0@,%a1 49f42: 7401 moveq #1,%d2 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 49f44: 2588 1c00 movel %a0,%a2@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49f48: b1e9 0004 cmpal %a1@(4),%a0 49f4c: 56c1 sne %d1 c->parent = the_node->parent; 49f4e: 2489 movel %a1,%a2@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49f50: 49c1 extbl %d1 49f52: 9481 subl %d1,%d2 49f54: 238a 2c00 movel %a2,%a1@(00000000,%d2:l:4) 49f58: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 c->parent = the_node->parent; the_node->parent = c; 49f5c: 208a movel %a2,%a0@ 49f5e: 6000 fe86 braw 49de6 <_RBTree_Extract_validate_unprotected+0x36> 49f62: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49f64: 204a moveal %a2,%a0 if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 49f66: 226a 0008 moveal %a2@(8),%a1 49f6a: 6000 fec4 braw 49e30 <_RBTree_Extract_validate_unprotected+0x80> 49f6e: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49f70: 93c9 subal %a1,%a1 49f72: 204a moveal %a2,%a0 49f74: 6000 feba braw 49e30 <_RBTree_Extract_validate_unprotected+0x80> RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 49f78: 93c9 subal %a1,%a1 <== NOT EXECUTED 49f7a: 6000 fe6a braw 49de6 <_RBTree_Extract_validate_unprotected+0x36><== NOT EXECUTED sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 49f7e: 42ab 000c clrl %a3@(12) } 49f82: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 49f86: 4e5e unlk %fp 49f88: 4e75 rts 49f8a: 2870 1c00 moveal %a0@(00000000,%d1:l:4),%a4 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } sibling->color = parent->color; 49f8e: 2368 000c 000c movel %a0@(12),%a1@(12) parent->color = RBT_BLACK; 49f94: 42a8 000c clrl %a0@(12) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 49f98: 42aa 000c clrl %a2@(12) 49f9c: 4a8c tstl %a4 49f9e: 6700 fe98 beqw 49e38 <_RBTree_Extract_validate_unprotected+0x88> 49fa2: 5280 addql #1,%d0 49fa4: 6000 ff24 braw 49eca <_RBTree_Extract_validate_unprotected+0x11a> if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 49fa8: 2268 0008 moveal %a0@(8),%a1 49fac: 6000 fe1e braw 49dcc <_RBTree_Extract_validate_unprotected+0x1c> /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; 49fb0: 42a8 000c clrl %a0@(12) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 49fb4: 2053 moveal %a3@,%a0 49fb6: 4a90 tstl %a0@ 49fb8: 6600 fe86 bnew 49e40 <_RBTree_Extract_validate_unprotected+0x90> 49fbc: 60c0 bras 49f7e <_RBTree_Extract_validate_unprotected+0x1ce><== NOT EXECUTED =============================================================================== 0004a620 <_RBTree_Find>: { ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4a620: 203c 0000 0700 movel #1792,%d0 RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 4a626: 4e56 ffec linkw %fp,#-20 4a62a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4a62e: 266e 0008 moveal %fp@(8),%a3 4a632: 242e 000c movel %fp@(12),%d2 ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4a636: 40c4 movew %sr,%d4 4a638: 8084 orl %d4,%d0 4a63a: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 4a63c: 246b 0004 moveal %a3@(4),%a2 RBTree_Node* found = NULL; int compare_result; while (iter_node) { 4a640: 4283 clrl %d3 4a642: 4a8a tstl %a2 4a644: 672a beqs 4a670 <_RBTree_Find+0x50> <== NEVER TAKEN compare_result = the_rbtree->compare_function(the_node, iter_node); 4a646: 2f0a movel %a2,%sp@- 4a648: 206b 0010 moveal %a3@(16),%a0 4a64c: 2f02 movel %d2,%sp@- 4a64e: 4e90 jsr %a0@ if ( _RBTree_Is_equal( compare_result ) ) { 4a650: 508f addql #8,%sp 4a652: 4a80 tstl %d0 4a654: 6608 bnes 4a65e <_RBTree_Find+0x3e> found = iter_node; if ( the_rbtree->is_unique ) 4a656: 260a movel %a2,%d3 4a658: 4a2b 0014 tstb %a3@(20) 4a65c: 6612 bnes 4a670 <_RBTree_Find+0x50> RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater( int compare_result ) { return compare_result > 0; 4a65e: 4a80 tstl %d0 4a660: 5ec1 sgt %d1 break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; 4a662: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater( int compare_result ) { return compare_result > 0; 4a664: 49c1 extbl %d1 break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; 4a666: 9081 subl %d1,%d0 4a668: 2472 0c00 moveal %a2@(00000000,%d0:l:4),%a2 ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { 4a66c: 4a8a tstl %a2 4a66e: 66d6 bnes 4a646 <_RBTree_Find+0x26> return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 4a670: 46c4 movew %d4,%sr return return_node; } 4a672: 2003 movel %d3,%d0 4a674: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4a67a: 4e5e unlk %fp ... =============================================================================== 0004a5e0 <_RBTree_Find_header>: { ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 4a5e0: 203c 0000 0700 movel #1792,%d0 #include RBTree_Control *_RBTree_Find_header( RBTree_Node *the_node ) { 4a5e6: 4e56 0000 linkw %fp,#0 4a5ea: 206e 0008 moveal %fp@(8),%a0 4a5ee: 2f02 movel %d2,%sp@- ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 4a5f0: 40c2 movew %sr,%d2 4a5f2: 8082 orl %d2,%d0 4a5f4: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 4a5f6: 4a88 tstl %a0 4a5f8: 671a beqs 4a614 <_RBTree_Find_header+0x34> if(!(the_node->parent)) return NULL; 4a5fa: 2050 moveal %a0@,%a0 4a5fc: 4a88 tstl %a0 4a5fe: 670a beqs 4a60a <_RBTree_Find_header+0x2a> 4a600: 2210 movel %a0@,%d1 while(the_node->parent) the_node = the_node->parent; 4a602: 6706 beqs 4a60a <_RBTree_Find_header+0x2a> <== NEVER TAKEN 4a604: 2041 moveal %d1,%a0 4a606: 2210 movel %a0@,%d1 4a608: 66fa bnes 4a604 <_RBTree_Find_header+0x24> return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 4a60a: 46c2 movew %d2,%sr return return_header; } 4a60c: 241f movel %sp@+,%d2 4a60e: 2008 movel %a0,%d0 4a610: 4e5e unlk %fp 4a612: 4e75 rts */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 4a614: 91c8 subal %a0,%a0 RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 4a616: 46c2 movew %d2,%sr return return_header; } 4a618: 241f movel %sp@+,%d2 4a61a: 2008 movel %a0,%d0 4a61c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a974 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 4a974: 4e56 ffec linkw %fp,#-20 4a978: 202e 001c movel %fp@(28),%d0 4a97c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4a980: 246e 0008 moveal %fp@(8),%a2 4a984: 242e 0014 movel %fp@(20),%d2 4a988: 282e 0018 movel %fp@(24),%d4 size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 4a98c: 4a8a tstl %a2 4a98e: 6736 beqs 4a9c6 <_RBTree_Initialize+0x52> <== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 4a990: 4292 clrl %a2@ the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; 4a992: 256e 000c 0010 movel %fp@(12),%a2@(16) the_rbtree->is_unique = is_unique; 4a998: 1540 0014 moveb %d0,%a2@(20) RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; 4a99c: 42aa 0004 clrl %a2@(4) the_rbtree->first[0] = NULL; 4a9a0: 42aa 0008 clrl %a2@(8) the_rbtree->first[1] = NULL; 4a9a4: 42aa 000c clrl %a2@(12) /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 4a9a8: 4a82 tstl %d2 4a9aa: 671a beqs 4a9c6 <_RBTree_Initialize+0x52> <== NEVER TAKEN 4a9ac: 262e 0010 movel %fp@(16),%d3 4a9b0: 47f9 0004 a6bc lea 4a6bc <_RBTree_Insert_unprotected>,%a3 _RBTree_Insert_unprotected(the_rbtree, next); 4a9b6: 2f03 movel %d3,%sp@- #include #include #include #include void _RBTree_Initialize( 4a9b8: d684 addl %d4,%d3 4a9ba: 5382 subql #1,%d2 _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { _RBTree_Insert_unprotected(the_rbtree, next); 4a9bc: 2f0a movel %a2,%sp@- 4a9be: 4e93 jsr %a3@ /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 4a9c0: 508f addql #8,%sp 4a9c2: 4a82 tstl %d2 4a9c4: 66f0 bnes 4a9b6 <_RBTree_Initialize+0x42> _RBTree_Insert_unprotected(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 4a9c6: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4a9cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a140 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 4a140: 4e56 ffe4 linkw %fp,#-28 4a144: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4a148: 286e 0008 moveal %fp@(8),%a4 4a14c: 266e 000c moveal %fp@(12),%a3 if(!the_node) return (RBTree_Node*)-1; 4a150: 4a8b tstl %a3 4a152: 6700 01b6 beqw 4a30a <_RBTree_Insert_unprotected+0x1ca> RBTree_Node *iter_node = the_rbtree->root; 4a156: 246c 0004 moveal %a4@(4),%a2 int compare_result; if (!iter_node) { /* special case: first node inserted */ 4a15a: 4a8a tstl %a2 4a15c: 6700 01ba beqw 4a318 <_RBTree_Insert_unprotected+0x1d8> the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); 4a160: 2f0a movel %a2,%sp@- 4a162: 206c 0010 moveal %a4@(16),%a0 4a166: 2f0b movel %a3,%sp@- 4a168: 4e90 jsr %a0@ if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 4a16a: 508f addql #8,%sp return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 4a16c: 2400 movel %d0,%d2 4a16e: 4682 notl %d2 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 4a170: 4a2c 0014 tstb %a4@(20) 4a174: 6706 beqs 4a17c <_RBTree_Insert_unprotected+0x3c> 4a176: 4a80 tstl %d0 4a178: 6700 0182 beqw 4a2fc <_RBTree_Insert_unprotected+0x1bc> return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 4a17c: d482 addl %d2,%d2 4a17e: 9582 subxl %d2,%d2 4a180: 4482 negl %d2 if (!iter_node->child[dir]) { 4a182: 2202 movel %d2,%d1 4a184: 5281 addql #1,%d1 4a186: 2632 1c00 movel %a2@(00000000,%d1:l:4),%d3 4a18a: 6704 beqs 4a190 <_RBTree_Insert_unprotected+0x50> (dir && _RBTree_Is_greater(compare_result)) ) { the_rbtree->first[dir] = the_node; } break; } else { iter_node = iter_node->child[dir]; 4a18c: 2443 moveal %d3,%a2 4a18e: 60d0 bras 4a160 <_RBTree_Insert_unprotected+0x20> the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ compare_result = the_rbtree->compare_function( 4a190: 206c 0010 moveal %a4@(16),%a0 if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; 4a194: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 4a196: 2a42 moveal %d2,%a5 4a198: 548d addql #2,%a5 compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 4a19a: 42ab 0008 clrl %a3@(8) 4a19e: 42ab 0004 clrl %a3@(4) the_node->color = RBT_RED; iter_node->child[dir] = the_node; 4a1a2: 258b 1c00 movel %a3,%a2@(00000000,%d1:l:4) if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; 4a1a6: 2740 000c movel %d0,%a3@(12) iter_node->child[dir] = the_node; the_node->parent = iter_node; 4a1aa: 268a movel %a2,%a3@ /* update min/max */ compare_result = the_rbtree->compare_function( 4a1ac: 2f34 dc00 movel %a4@(00000000,%a5:l:4),%sp@- 4a1b0: 2f0b movel %a3,%sp@- 4a1b2: 4e90 jsr %a0@ the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || 4a1b4: 508f addql #8,%sp 4a1b6: 4a82 tstl %d2 4a1b8: 6600 0124 bnew 4a2de <_RBTree_Insert_unprotected+0x19e> 4a1bc: 4a80 tstl %d0 4a1be: 6d00 0124 bltw 4a2e4 <_RBTree_Insert_unprotected+0x1a4> _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } 4a1c2: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4a1c4: 2250 moveal %a0@,%a1 4a1c6: 2449 moveal %a1,%a2 4a1c8: 4a89 tstl %a1 4a1ca: 6700 00ee beqw 4a2ba <_RBTree_Insert_unprotected+0x17a> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4a1ce: 7801 moveq #1,%d4 4a1d0: b8a8 000c cmpl %a0@(12),%d4 4a1d4: 670c beqs 4a1e2 <_RBTree_Insert_unprotected+0xa2> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a1d6: 2003 movel %d3,%d0 4a1d8: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a1de: 4e5e unlk %fp 4a1e0: 4e75 rts ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 4a1e2: 4a91 tstl %a1@ 4a1e4: 6700 0106 beqw 4a2ec <_RBTree_Insert_unprotected+0x1ac> { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 4a1e8: 2229 0004 movel %a1@(4),%d1 4a1ec: b288 cmpl %a0,%d1 4a1ee: 6700 0104 beqw 4a2f4 <_RBTree_Insert_unprotected+0x1b4> 4a1f2: 2841 moveal %d1,%a4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4a1f4: 4a8c tstl %a4 4a1f6: 670a beqs 4a202 <_RBTree_Insert_unprotected+0xc2> 4a1f8: 7401 moveq #1,%d2 4a1fa: b4ac 000c cmpl %a4@(12),%d2 4a1fe: 6700 00ca beqw 4a2ca <_RBTree_Insert_unprotected+0x18a> the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 4a202: b7e8 0004 cmpal %a0@(4),%a3 4a206: 56c2 sne %d2 RBTree_Direction pdir = the_node->parent != g->child[0]; 4a208: b288 cmpl %a0,%d1 4a20a: 56c1 sne %d1 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 4a20c: 49c2 extbl %d2 RBTree_Direction pdir = the_node->parent != g->child[0]; 4a20e: 49c1 extbl %d1 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 4a210: 2001 movel %d1,%d0 4a212: 4480 negl %d0 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 4a214: b282 cmpl %d2,%d1 4a216: 6748 beqs 4a260 <_RBTree_Insert_unprotected+0x120> */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 4a218: 4a80 tstl %d0 4a21a: 57c2 seq %d2 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 4a21c: 7801 moveq #1,%d4 4a21e: 2200 movel %d0,%d1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 4a220: 49c2 extbl %d2 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 4a222: 9882 subl %d2,%d4 4a224: 5281 addql #1,%d1 4a226: 2870 4c00 moveal %a0@(00000000,%d4:l:4),%a4 4a22a: 4a8c tstl %a4 4a22c: 672c beqs 4a25a <_RBTree_Insert_unprotected+0x11a><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 4a22e: 4bf4 1c00 lea %a4@(00000000,%d1:l:4),%a5 4a232: 2195 4c00 movel %a5@,%a0@(00000000,%d4:l:4) if (c->child[dir]) 4a236: 2a74 1c00 moveal %a4@(00000000,%d1:l:4),%a5 4a23a: 4a8d tstl %a5 4a23c: 6704 beqs 4a242 <_RBTree_Insert_unprotected+0x102> c->child[dir]->parent = the_node; 4a23e: 2a88 movel %a0,%a5@ 4a240: 2250 moveal %a0@,%a1 c->child[dir] = the_node; 4a242: 2988 1c00 movel %a0,%a4@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4a246: 7801 moveq #1,%d4 4a248: b1e9 0004 cmpal %a1@(4),%a0 4a24c: 56c2 sne %d2 c->parent = the_node->parent; 4a24e: 2889 movel %a1,%a4@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4a250: 49c2 extbl %d2 4a252: 9882 subl %d2,%d4 4a254: 238c 4c00 movel %a4,%a1@(00000000,%d4:l:4) c->parent = the_node->parent; the_node->parent = c; 4a258: 208c movel %a4,%a0@ _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; 4a25a: 2673 1c00 moveal %a3@(00000000,%d1:l:4),%a3 4a25e: 2053 moveal %a3@,%a0 } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 4a260: 7201 moveq #1,%d1 4a262: 9280 subl %d0,%d1 4a264: 2001 movel %d1,%d0 4a266: 7201 moveq #1,%d1 if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; 4a268: 7401 moveq #1,%d2 4a26a: b181 eorl %d0,%d1 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 4a26c: 42a8 000c clrl %a0@(12) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 4a270: 5281 addql #1,%d1 4a272: 2072 1c00 moveal %a2@(00000000,%d1:l:4),%a0 g->color = RBT_RED; 4a276: 2542 000c movel %d2,%a2@(12) 4a27a: 4a88 tstl %a0 4a27c: 6700 ff44 beqw 4a1c2 <_RBTree_Insert_unprotected+0x82> c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 4a280: 5280 addql #1,%d0 4a282: 43f0 0c00 lea %a0@(00000000,%d0:l:4),%a1 4a286: 2591 1c00 movel %a1@,%a2@(00000000,%d1:l:4) if (c->child[dir]) 4a28a: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 4a28e: 4a89 tstl %a1 4a290: 6702 beqs 4a294 <_RBTree_Insert_unprotected+0x154> c->child[dir]->parent = the_node; 4a292: 228a movel %a2,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4a294: 2252 moveal %a2@,%a1 4a296: 7201 moveq #1,%d1 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4a298: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4a29c: b5e9 0004 cmpal %a1@(4),%a2 4a2a0: 56c0 sne %d0 c->parent = the_node->parent; 4a2a2: 2089 movel %a1,%a0@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4a2a4: 49c0 extbl %d0 4a2a6: 9280 subl %d0,%d1 4a2a8: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) c->parent = the_node->parent; the_node->parent = c; 4a2ac: 2488 movel %a0,%a2@ _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } 4a2ae: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4a2b0: 2250 moveal %a0@,%a1 4a2b2: 2449 moveal %a1,%a2 4a2b4: 4a89 tstl %a1 4a2b6: 6600 ff16 bnew 4a1ce <_RBTree_Insert_unprotected+0x8e> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a2ba: 2003 movel %d3,%d0 /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4a2bc: 42ab 000c clrl %a3@(12) /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a2c0: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a2c6: 4e5e unlk %fp 4a2c8: 4e75 rts u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; 4a2ca: 42a8 000c clrl %a0@(12) u->color = RBT_BLACK; g->color = RBT_RED; 4a2ce: 7401 moveq #1,%d2 4a2d0: 2649 moveal %a1,%a3 g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; 4a2d2: 42ac 000c clrl %a4@(12) g->color = RBT_RED; 4a2d6: 2342 000c movel %d2,%a1@(12) 4a2da: 6000 fee6 braw 4a1c2 <_RBTree_Insert_unprotected+0x82> compare_result = the_rbtree->compare_function( the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || (dir && _RBTree_Is_greater(compare_result)) ) { 4a2de: 4a80 tstl %d0 4a2e0: 6f00 fee0 blew 4a1c2 <_RBTree_Insert_unprotected+0x82> the_rbtree->first[dir] = the_node; 4a2e4: 298b dc00 movel %a3,%a4@(00000000,%a5:l:4) 4a2e8: 6000 fed8 braw 4a1c2 <_RBTree_Insert_unprotected+0x82> 4a2ec: 2229 0004 movel %a1@(4),%d1 <== NOT EXECUTED 4a2f0: 6000 ff10 braw 4a202 <_RBTree_Insert_unprotected+0xc2><== NOT EXECUTED if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4a2f4: 2869 0008 moveal %a1@(8),%a4 4a2f8: 6000 fefa braw 4a1f4 <_RBTree_Insert_unprotected+0xb4> the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 4a2fc: 260a movel %a2,%d3 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a2fe: 2003 movel %d3,%d0 4a300: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a306: 4e5e unlk %fp 4a308: 4e75 rts RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { if(!the_node) return (RBTree_Node*)-1; 4a30a: 76ff moveq #-1,%d3 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a30c: 2003 movel %d3,%d0 4a30e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a314: 4e5e unlk %fp 4a316: 4e75 rts RBTree_Node *iter_node = the_rbtree->root; int compare_result; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; 4a318: 42ab 000c clrl %a3@(12) } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; 4a31c: 4283 clrl %d3 } 4a31e: 2003 movel %d3,%d0 RBTree_Node *iter_node = the_rbtree->root; int compare_result; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; the_rbtree->root = the_node; 4a320: 294b 0004 movel %a3,%a4@(4) the_rbtree->first[0] = the_rbtree->first[1] = the_node; 4a324: 294b 000c movel %a3,%a4@(12) 4a328: 294b 0008 movel %a3,%a4@(8) the_node->parent = (RBTree_Node *) the_rbtree; 4a32c: 268c movel %a4,%a3@ the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 4a32e: 42ab 0008 clrl %a3@(8) 4a332: 42ab 0004 clrl %a3@(4) /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a336: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a33c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a36c <_RBTree_Iterate_unprotected>: RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 4a36c: 7202 moveq #2,%d1 const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 4a36e: 4e56 ffe8 linkw %fp,#-24 4a372: 206e 0008 moveal %fp@(8),%a0 4a376: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4a37a: 262e 000c movel %fp@(12),%d3 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 4a37e: 57c0 seq %d0 4a380: 246e 0010 moveal %fp@(16),%a2 4a384: 49c0 extbl %d0 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 4a386: 9280 subl %d0,%d1 4a388: 47f9 0004 a3c0 lea 4a3c0 <_RBTree_Next_unprotected>,%a3 4a38e: 2430 1c00 movel %a0@(00000000,%d1:l:4),%d2 4a392: 2a2e 0014 movel %fp@(20),%d5 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 4a396: 4a82 tstl %d2 4a398: 671a beqs 4a3b4 <_RBTree_Iterate_unprotected+0x48> stop = (*visitor)( current, dir, visitor_arg ); 4a39a: 2f05 movel %d5,%sp@- 4a39c: 2f03 movel %d3,%sp@- 4a39e: 2f02 movel %d2,%sp@- 4a3a0: 4e92 jsr %a2@ current = _RBTree_Next_unprotected( current, dir ); 4a3a2: 2f03 movel %d3,%sp@- RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { stop = (*visitor)( current, dir, visitor_arg ); 4a3a4: 1800 moveb %d0,%d4 current = _RBTree_Next_unprotected( current, dir ); 4a3a6: 2f02 movel %d2,%sp@- 4a3a8: 4e93 jsr %a3@ { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 4a3aa: 4fef 0014 lea %sp@(20),%sp stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); 4a3ae: 2400 movel %d0,%d2 { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 4a3b0: 4a04 tstb %d4 4a3b2: 67e2 beqs 4a396 <_RBTree_Iterate_unprotected+0x2a><== ALWAYS TAKEN stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); } } 4a3b4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4a3ba: 4e5e unlk %fp ... =============================================================================== 0004a3c0 <_RBTree_Next_unprotected>: RBTree_Node *_RBTree_Next_unprotected( const RBTree_Node *node, RBTree_Direction dir ) { 4a3c0: 4e56 0000 linkw %fp,#0 4a3c4: 222e 000c movel %fp@(12),%d1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 4a3c8: 57c0 seq %d0 4a3ca: 226e 0008 moveal %fp@(8),%a1 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; 4a3ce: 5281 addql #1,%d1 4a3d0: 49c0 extbl %d0 4a3d2: 4480 negl %d0 4a3d4: 2071 1c00 moveal %a1@(00000000,%d1:l:4),%a0 RBTree_Node *_RBTree_Next_unprotected( const RBTree_Node *node, RBTree_Direction dir ) { 4a3d8: 2f0a movel %a2,%sp@- RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; RBTree_Node *next = NULL; if ( current != NULL ) { 4a3da: 4a88 tstl %a0 4a3dc: 6718 beqs 4a3f6 <_RBTree_Next_unprotected+0x36> 4a3de: 5280 addql #1,%d0 next = current; while ( (current = current->child [opp_dir]) != NULL ) { 4a3e0: 2230 0c00 movel %a0@(00000000,%d0:l:4),%d1 4a3e4: 6708 beqs 4a3ee <_RBTree_Next_unprotected+0x2e> 4a3e6: 2041 moveal %d1,%a0 4a3e8: 2230 0c00 movel %a0@(00000000,%d0:l:4),%d1 4a3ec: 66f8 bnes 4a3e6 <_RBTree_Next_unprotected+0x26> <== NEVER TAKEN } } } return next; } 4a3ee: 245f moveal %sp@+,%a2 RBTree_Node *parent = node->parent; if ( parent->parent && node == parent->child [opp_dir] ) { next = parent; } else { while ( parent->parent && node == parent->child [dir] ) { 4a3f0: 2008 movel %a0,%d0 } } } return next; } 4a3f2: 4e5e unlk %fp 4a3f4: 4e75 rts next = current; while ( (current = current->child [opp_dir]) != NULL ) { next = current; } } else { RBTree_Node *parent = node->parent; 4a3f6: 2051 moveal %a1@,%a0 if ( parent->parent && node == parent->child [opp_dir] ) { 4a3f8: 2450 moveal %a0@,%a2 4a3fa: 4a8a tstl %a2 4a3fc: 6706 beqs 4a404 <_RBTree_Next_unprotected+0x44> 4a3fe: b3f0 0c04 cmpal %a0@(00000004,%d0:l:4),%a1 4a402: 67ea beqs 4a3ee <_RBTree_Next_unprotected+0x2e> next = parent; } else { while ( parent->parent && node == parent->child [dir] ) { 4a404: 4a8a tstl %a2 4a406: 670e beqs 4a416 <_RBTree_Next_unprotected+0x56> 4a408: b3f0 1c00 cmpal %a0@(00000000,%d1:l:4),%a1 4a40c: 66e0 bnes 4a3ee <_RBTree_Next_unprotected+0x2e> 4a40e: 2248 moveal %a0,%a1 4a410: 204a moveal %a2,%a0 4a412: 2452 moveal %a2@,%a2 4a414: 60ee bras 4a404 <_RBTree_Next_unprotected+0x44> } } } return next; } 4a416: 245f moveal %sp@+,%a2 RBTree_Direction dir ) { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; RBTree_Node *next = NULL; 4a418: 4280 clrl %d0 } } } return next; } 4a41a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000486cc <_RTEMS_signal_Post_switch_hook>: #include #include #include static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) { 486cc: 4e56 ffec linkw %fp,#-20 486d0: 206e 0008 moveal %fp@(8),%a0 486d4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 486d8: 2468 00fa moveal %a0@(250),%a2 if ( !api ) 486dc: 4a8a tstl %a2 486de: 671a beqs 486fa <_RTEMS_signal_Post_switch_hook+0x2e><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 486e0: 203c 0000 0700 movel #1792,%d0 486e6: 40c1 movew %sr,%d1 486e8: 8081 orl %d1,%d0 486ea: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 486ec: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 486f0: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 486f4: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 486f6: 4a82 tstl %d2 486f8: 660a bnes 48704 <_RTEMS_signal_Post_switch_hook+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 486fa: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 48700: 4e5e unlk %fp 48702: 4e75 rts if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 48704: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 48708: 260e movel %fp,%d3 4870a: 5983 subql #4,%d3 4870c: 47f9 0004 8b5c lea 48b5c ,%a3 48712: 2f03 movel %d3,%sp@- 48714: 2f3c 0000 ffff movel #65535,%sp@- 4871a: 2f2a 000e movel %a2@(14),%sp@- 4871e: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 48720: 2f02 movel %d2,%sp@- 48722: 206a 000a moveal %a2@(10),%a0 48726: 4e90 jsr %a0@ asr->nest_level -= 1; 48728: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4872c: 2f03 movel %d3,%sp@- 4872e: 2f3c 0000 ffff movel #65535,%sp@- 48734: 2f2e fffc movel %fp@(-4),%sp@- 48738: 4e93 jsr %a3@ 4873a: 4fef 001c lea %sp@(28),%sp } 4873e: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 48744: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cd02 <_RTEMS_tasks_Create_extension>: static bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4cd02: 4e56 0000 linkw %fp,#0 4cd06: 2f0a movel %a2,%sp@- 4cd08: 246e 000c moveal %fp@(12),%a2 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 4cd0c: 4a39 0005 f6f6 tstb 5f6f6 4cd12: 675c beqs 4cd70 <_RTEMS_tasks_Create_extension+0x6e> /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); 4cd14: 705e moveq #94,%d0 if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4cd16: 2f00 movel %d0,%sp@- 4cd18: 4eb9 0004 acc0 jsr 4acc0 <_Workspace_Allocate> if ( !api ) 4cd1e: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4cd20: 2040 moveal %d0,%a0 if ( !api ) 4cd22: 4a80 tstl %d0 4cd24: 675c beqs 4cd82 <_RTEMS_tasks_Create_extension+0x80> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4cd26: 2540 00fa movel %d0,%a2@(250) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4cd2a: 4200 clrb %d0 4cd2c: 4290 clrl %a0@ 4cd2e: 1140 0008 moveb %d0,%a0@(8) 4cd32: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4cd36: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4cd3a: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4cd3e: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4cd42: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4cd46: 42a8 001a clrl %a0@(26) _Event_Initialize( &api->Event ); _Event_Initialize( &api->System_event ); _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 4cd4a: 42aa 0106 clrl %a2@(262) if ( rtems_configuration_get_notepads_enabled() ) { 4cd4e: 4a39 0005 f6f6 tstb 5f6f6 4cd54: 6710 beqs 4cd66 <_RTEMS_tasks_Create_extension+0x64> * task is created via another API, then this routine is invoked * and this API given the opportunity to initialize its extension * area. */ static bool _RTEMS_tasks_Create_extension( 4cd56: 41e8 001e lea %a0@(30),%a0 4cd5a: 4280 clrl %d0 _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4cd5c: 4298 clrl %a0@+ _Event_Initialize( &api->System_event ); _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4cd5e: 5280 addql #1,%d0 4cd60: 7210 moveq #16,%d1 4cd62: b280 cmpl %d0,%d1 4cd64: 66f6 bnes 4cd5c <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4cd66: 246e fffc moveal %fp@(-4),%a2 4cd6a: 4e5e unlk %fp if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; 4cd6c: 7001 moveq #1,%d0 } 4cd6e: 4e75 rts * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); 4cd70: 701e moveq #30,%d0 api = _Workspace_Allocate( to_allocate ); 4cd72: 2f00 movel %d0,%sp@- 4cd74: 4eb9 0004 acc0 jsr 4acc0 <_Workspace_Allocate> if ( !api ) 4cd7a: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4cd7c: 2040 moveal %d0,%a0 if ( !api ) 4cd7e: 4a80 tstl %d0 4cd80: 66a4 bnes 4cd26 <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4cd82: 246e fffc moveal %fp@(-4),%a2 4cd86: 4e5e unlk %fp to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 4cd88: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 00047908 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 47908: 4e56 ffe4 linkw %fp,#-28 4790c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 47910: 2479 0005 f71c moveal 5f71c ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 47916: 2639 0005 f718 movel 5f718 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 4791c: 4a8a tstl %a2 4791e: 6754 beqs 47974 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 47920: 4a83 tstl %d3 47922: 6750 beqs 47974 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 47924: 280e movel %fp,%d4 47926: 4282 clrl %d2 47928: 5984 subql #4,%d4 4792a: 47f9 0004 76c4 lea 476c4 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 47930: 49f9 0004 7990 lea 47990 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 47936: 2f04 movel %d4,%sp@- 47938: 2f2a 000c movel %a2@(12),%sp@- 4793c: 2f2a 0014 movel %a2@(20),%sp@- 47940: 2f2a 0004 movel %a2@(4),%sp@- 47944: 2f2a 0008 movel %a2@(8),%sp@- 47948: 2f12 movel %a2@,%sp@- 4794a: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 4794c: 4fef 0018 lea %sp@(24),%sp 47950: 4a80 tstl %d0 47952: 662a bnes 4797e <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 47954: 2f2a 0018 movel %a2@(24),%sp@- 47958: 2f2a 0010 movel %a2@(16),%sp@- 4795c: 2f2e fffc movel %fp@(-4),%sp@- 47960: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 47962: 4fef 000c lea %sp@(12),%sp 47966: 4a80 tstl %d0 47968: 6614 bnes 4797e <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 4796a: 5282 addql #1,%d2 4796c: 45ea 001c lea %a2@(28),%a2 47970: b682 cmpl %d2,%d3 47972: 66c2 bnes 47936 <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 47974: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4797a: 4e5e unlk %fp 4797c: 4e75 rts id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 4797e: 2f00 movel %d0,%sp@- 47980: 4878 0001 pea 1 47984: 4878 0001 pea 1 47988: 4eb9 0004 8974 jsr 48974 <_Internal_error_Occurred> ... =============================================================================== 0004cc62 <_RTEMS_tasks_Switch_extension>: static void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4cc62: 4e56 0000 linkw %fp,#0 4cc66: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4cc6a: 2068 0106 moveal %a0@(262),%a0 while (tvp) { 4cc6e: 4a88 tstl %a0 4cc70: 6712 beqs 4cc84 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4cc72: 2268 0004 moveal %a0@(4),%a1 4cc76: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4cc7a: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4cc7e: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4cc80: 4a88 tstl %a0 4cc82: 66ee bnes 4cc72 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4cc84: 206e 000c moveal %fp@(12),%a0 4cc88: 2068 0106 moveal %a0@(262),%a0 while (tvp) { 4cc8c: 4a88 tstl %a0 4cc8e: 6712 beqs 4cca2 <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4cc90: 2268 0004 moveal %a0@(4),%a1 4cc94: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4cc98: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4cc9c: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4cc9e: 4a88 tstl %a0 4cca0: 66ee bnes 4cc90 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4cca2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00074b08 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 74b08: 4e56 fffc linkw %fp,#-4 74b0c: 2f0a movel %a2,%sp@- 74b0e: 486e fffc pea %fp@(-4) 74b12: 2f2e 0008 movel %fp@(8),%sp@- 74b16: 4879 000a 1e9c pea a1e9c <_Rate_monotonic_Information> 74b1c: 4eb9 0004 8c58 jsr 48c58 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 74b22: 4fef 000c lea %sp@(12),%sp 74b26: 2440 moveal %d0,%a2 74b28: 4aae fffc tstl %fp@(-4) 74b2c: 6636 bnes 74b64 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 74b2e: 206a 0040 moveal %a2@(64),%a0 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 74b32: 2028 0010 movel %a0@(16),%d0 74b36: 0280 0000 4000 andil #16384,%d0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 74b3c: 670a beqs 74b48 <_Rate_monotonic_Timeout+0x40> 74b3e: 202a 0008 movel %a2@(8),%d0 74b42: b0a8 0020 cmpl %a0@(32),%d0 74b46: 675e beqs 74ba6 <_Rate_monotonic_Timeout+0x9e> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 74b48: 7001 moveq #1,%d0 74b4a: b0aa 0038 cmpl %a2@(56),%d0 74b4e: 671c beqs 74b6c <_Rate_monotonic_Timeout+0x64> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 74b50: 7004 moveq #4,%d0 74b52: 2540 0038 movel %d0,%a2@(56) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 74b56: 2039 000a 14da movel a14da <_Thread_Dispatch_disable_level>,%d0 --level; 74b5c: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 74b5e: 23c0 000a 14da movel %d0,a14da <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 74b64: 246e fff8 moveal %fp@(-8),%a2 74b68: 4e5e unlk %fp 74b6a: 4e75 rts _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 74b6c: 103c 0003 moveb #3,%d0 74b70: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 74b74: 2f0a movel %a2,%sp@- 74b76: 4eb9 0007 4844 jsr 74844 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 74b7c: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 74b82: 486a 0010 pea %a2@(16) 74b86: 4879 000a 1576 pea a1576 <_Watchdog_Ticks_chain> 74b8c: 4eb9 0004 a614 jsr 4a614 <_Watchdog_Insert> 74b92: 4fef 000c lea %sp@(12),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 74b96: 2039 000a 14da movel a14da <_Thread_Dispatch_disable_level>,%d0 --level; 74b9c: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 74b9e: 23c0 000a 14da movel %d0,a14da <_Thread_Dispatch_disable_level> 74ba4: 60be bras 74b64 <_Rate_monotonic_Timeout+0x5c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 74ba6: 2f3c 1007 fff8 movel #268959736,%sp@- 74bac: 2f08 movel %a0,%sp@- 74bae: 4eb9 0004 9574 jsr 49574 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 74bb4: 2f0a movel %a2,%sp@- 74bb6: 4eb9 0007 4844 jsr 74844 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 74bbc: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 74bc2: 486a 0010 pea %a2@(16) 74bc6: 4879 000a 1576 pea a1576 <_Watchdog_Ticks_chain> 74bcc: 4eb9 0004 a614 jsr 4a614 <_Watchdog_Insert> 74bd2: 4fef 0014 lea %sp@(20),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 74bd6: 2039 000a 14da movel a14da <_Thread_Dispatch_disable_level>,%d0 --level; 74bdc: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 74bde: 23c0 000a 14da movel %d0,a14da <_Thread_Dispatch_disable_level> 74be4: 6000 ff7e braw 74b64 <_Rate_monotonic_Timeout+0x5c> =============================================================================== 00049c44 <_Scheduler_CBS_Allocate>: #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { 49c44: 4e56 0000 linkw %fp,#0 49c48: 2f0a movel %a2,%sp@- void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); 49c4a: 4878 001c pea 1c #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { 49c4e: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); 49c52: 4eb9 0004 b6b4 jsr 4b6b4 <_Workspace_Allocate> if ( sched ) { 49c58: 588f addql #4,%sp 49c5a: 4a80 tstl %d0 49c5c: 6712 beqs 49c70 <_Scheduler_CBS_Allocate+0x2c> <== NEVER TAKEN the_thread->scheduler_info = sched; 49c5e: 2540 0086 movel %d0,%a2@(134) schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; 49c62: 2040 moveal %d0,%a0 schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49c64: 7202 moveq #2,%d1 sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); if ( sched ) { the_thread->scheduler_info = sched; schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; 49c66: 208a movel %a2,%a0@ schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49c68: 2141 0014 movel %d1,%a0@(20) schinfo->cbs_server = NULL; 49c6c: 42a8 0018 clrl %a0@(24) } return sched; } 49c70: 246e fffc moveal %fp@(-4),%a2 49c74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b37c <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 4b37c: 4e56 fffc linkw %fp,#-4 4b380: 2f0a movel %a2,%sp@- 4b382: 246e 0008 moveal %fp@(8),%a2 Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 4b386: 202a 00a8 movel %a2@(168),%d0 if ( the_thread->real_priority != new_priority ) 4b38a: b0aa 0018 cmpl %a2@(24),%d0 4b38e: 6704 beqs 4b394 <_Scheduler_CBS_Budget_callout+0x18><== NEVER TAKEN the_thread->real_priority = new_priority; 4b390: 2540 0018 movel %d0,%a2@(24) if ( the_thread->current_priority != new_priority ) 4b394: b0aa 0014 cmpl %a2@(20),%d0 4b398: 6712 beqs 4b3ac <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN _Thread_Change_priority(the_thread, new_priority, true); 4b39a: 4878 0001 pea 1 4b39e: 2f00 movel %d0,%sp@- 4b3a0: 2f0a movel %a2,%sp@- 4b3a2: 4eb9 0004 b95c jsr 4b95c <_Thread_Change_priority> 4b3a8: 4fef 000c lea %sp@(12),%sp /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 4b3ac: 246a 0086 moveal %a2@(134),%a2 if ( sched_info->cbs_server->cbs_budget_overrun ) { 4b3b0: 206a 0018 moveal %a2@(24),%a0 4b3b4: 4aa8 000c tstl %a0@(12) 4b3b8: 671e beqs 4b3d8 <_Scheduler_CBS_Budget_callout+0x5c> _Scheduler_CBS_Get_server_id( 4b3ba: 486e fffc pea %fp@(-4) 4b3be: 2f10 movel %a0@,%sp@- 4b3c0: 4eb9 0004 b338 jsr 4b338 <_Scheduler_CBS_Get_server_id> sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); 4b3c6: 206a 0018 moveal %a2@(24),%a0 4b3ca: 2f2e fffc movel %fp@(-4),%sp@- 4b3ce: 2068 000c moveal %a0@(12),%a0 4b3d2: 4e90 jsr %a0@ 4b3d4: 4fef 000c lea %sp@(12),%sp } } 4b3d8: 246e fff8 moveal %fp@(-8),%a2 4b3dc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004af34 <_Scheduler_CBS_Cleanup>: #include #include #include int _Scheduler_CBS_Cleanup (void) { 4af34: 4e56 0000 linkw %fp,#0 4af38: 2079 0006 4b72 moveal 64b72 <_Scheduler_CBS_Server_list>,%a0 4af3e: 2f0a movel %a2,%sp@- 4af40: 2f02 movel %d2,%sp@- unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4af42: 4ab9 0006 2e3c tstl 62e3c <_Scheduler_CBS_Maximum_servers> 4af48: 6724 beqs 4af6e <_Scheduler_CBS_Cleanup+0x3a> <== NEVER TAKEN 4af4a: 4282 clrl %d2 if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); 4af4c: 45f9 0004 b03c lea 4b03c <_Scheduler_CBS_Destroy_server>,%a2 int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[ i ] ) 4af52: 4ab0 2c00 tstl %a0@(00000000,%d2:l:4) 4af56: 670c beqs 4af64 <_Scheduler_CBS_Cleanup+0x30> _Scheduler_CBS_Destroy_server( i ); 4af58: 2f02 movel %d2,%sp@- 4af5a: 4e92 jsr %a2@ 4af5c: 2079 0006 4b72 moveal 64b72 <_Scheduler_CBS_Server_list>,%a0 4af62: 588f addql #4,%sp int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4af64: 5282 addql #1,%d2 4af66: b4b9 0006 2e3c cmpl 62e3c <_Scheduler_CBS_Maximum_servers>,%d2 4af6c: 65e4 bcss 4af52 <_Scheduler_CBS_Cleanup+0x1e> if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); } _Workspace_Free( _Scheduler_CBS_Server_list ); 4af6e: 2f08 movel %a0,%sp@- 4af70: 4eb9 0004 ce4c jsr 4ce4c <_Workspace_Free> return SCHEDULER_CBS_OK; } 4af76: 242e fff8 movel %fp@(-8),%d2 4af7a: 4280 clrl %d0 4af7c: 246e fffc moveal %fp@(-4),%a2 4af80: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004af84 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 4af84: 4e56 fff0 linkw %fp,#-16 4af88: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4af8c: 266e 0008 moveal %fp@(8),%a3 4af90: 246e 0010 moveal %fp@(16),%a2 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 4af94: 4aab 0004 tstl %a3@(4) 4af98: 6f00 0088 blew 4b022 <_Scheduler_CBS_Create_server+0x9e> 4af9c: 4a93 tstl %a3@ 4af9e: 6f00 0082 blew 4b022 <_Scheduler_CBS_Create_server+0x9e> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4afa2: 2239 0006 2e3c movel 62e3c <_Scheduler_CBS_Maximum_servers>,%d1 4afa8: 6766 beqs 4b010 <_Scheduler_CBS_Create_server+0x8c><== NEVER TAKEN if ( !_Scheduler_CBS_Server_list[i] ) 4afaa: 2279 0006 4b72 moveal 64b72 <_Scheduler_CBS_Server_list>,%a1 4afb0: 4a91 tstl %a1@ 4afb2: 6768 beqs 4b01c <_Scheduler_CBS_Create_server+0x98> #include #include #include #include int _Scheduler_CBS_Create_server ( 4afb4: 41e9 0004 lea %a1@(4),%a0 4afb8: 4280 clrl %d0 params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4afba: 5280 addql #1,%d0 4afbc: b280 cmpl %d0,%d1 4afbe: 6750 beqs 4b010 <_Scheduler_CBS_Create_server+0x8c> if ( !_Scheduler_CBS_Server_list[i] ) 4afc0: 4a98 tstl %a0@+ 4afc2: 66f6 bnes 4afba <_Scheduler_CBS_Create_server+0x36> 4afc4: 2200 movel %d0,%d1 4afc6: e589 lsll #2,%d1 if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 4afc8: 4878 0010 pea 10 if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 4afcc: 49f1 1800 lea %a1@(00000000,%d1:l),%a4 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 4afd0: 2480 movel %d0,%a2@ _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 4afd2: 4eb9 0004 ce30 jsr 4ce30 <_Workspace_Allocate> the_server = _Scheduler_CBS_Server_list[*server_id]; 4afd8: 2212 movel %a2@,%d1 if ( !the_server ) 4afda: 588f addql #4,%sp if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 4afdc: 2880 movel %d0,%a4@ _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 4afde: 2079 0006 4b72 moveal 64b72 <_Scheduler_CBS_Server_list>,%a0 4afe4: 2070 1c00 moveal %a0@(00000000,%d1:l:4),%a0 if ( !the_server ) 4afe8: 4a88 tstl %a0 4afea: 6742 beqs 4b02e <_Scheduler_CBS_Create_server+0xaa><== NEVER TAKEN return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 4afec: 4280 clrl %d0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 4afee: 2213 movel %a3@,%d1 4aff0: 242b 0004 movel %a3@(4),%d2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 4aff4: 216e 000c 000c movel %fp@(12),%a0@(12) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 4affa: 2141 0004 movel %d1,%a0@(4) 4affe: 2142 0008 movel %d2,%a0@(8) the_server->task_id = -1; 4b002: 72ff moveq #-1,%d1 the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4b004: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; the_server->task_id = -1; 4b00a: 2081 movel %d1,%a0@ the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4b00c: 4e5e unlk %fp 4b00e: 4e75 rts if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 4b010: 70e6 moveq #-26,%d0 the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4b012: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b018: 4e5e unlk %fp 4b01a: 4e75 rts params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( !_Scheduler_CBS_Server_list[i] ) 4b01c: 4281 clrl %d1 4b01e: 4280 clrl %d0 4b020: 60a6 bras 4afc8 <_Scheduler_CBS_Create_server+0x44> if ( params->budget <= 0 || params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 4b022: 70ee moveq #-18,%d0 the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4b024: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b02a: 4e5e unlk %fp 4b02c: 4e75 rts *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 4b02e: 70ef moveq #-17,%d0 <== NOT EXECUTED the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4b030: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 4b036: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004b0dc <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 4b0dc: 4e56 fff0 linkw %fp,#-16 4b0e0: 48d7 040c moveml %d2-%d3/%a2,%sp@ Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 4b0e4: 486e fffc pea %fp@(-4) int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 4b0e8: 242e 000c movel %fp@(12),%d2 4b0ec: 262e 0008 movel %fp@(8),%d3 Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 4b0f0: 2f02 movel %d2,%sp@- 4b0f2: 4eb9 0004 be60 jsr 4be60 <_Thread_Get> /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 4b0f8: 508f addql #8,%sp { Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 4b0fa: 2440 moveal %d0,%a2 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 4b0fc: 4a80 tstl %d0 4b0fe: 674a beqs 4b14a <_Scheduler_CBS_Detach_thread+0x6e> _Thread_Enable_dispatch(); 4b100: 4eb9 0004 be40 jsr 4be40 <_Thread_Enable_dispatch> } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 4b106: b6b9 0006 2e3c cmpl 62e3c <_Scheduler_CBS_Maximum_servers>,%d3 4b10c: 643c bccs 4b14a <_Scheduler_CBS_Detach_thread+0x6e> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 4b10e: 2079 0006 4b72 moveal 64b72 <_Scheduler_CBS_Server_list>,%a0 4b114: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 4b118: 4a88 tstl %a0 4b11a: 673a beqs 4b156 <_Scheduler_CBS_Detach_thread+0x7a> return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) 4b11c: b490 cmpl %a0@,%d2 4b11e: 662a bnes 4b14a <_Scheduler_CBS_Detach_thread+0x6e><== NEVER TAKEN return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 4b120: 70ff moveq #-1,%d0 4b122: 2080 movel %d0,%a0@ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 4b124: 206a 0086 moveal %a2@(134),%a0 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; 4b128: 4280 clrl %d0 if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 4b12a: 42a8 0018 clrl %a0@(24) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4b12e: 256a 009c 0076 movel %a2@(156),%a2@(118) the_thread->budget_callout = the_thread->Start.budget_callout; 4b134: 256a 00a0 007a movel %a2@(160),%a2@(122) the_thread->is_preemptible = the_thread->Start.is_preemptible; 4b13a: 156a 009a 0070 moveb %a2@(154),%a2@(112) return SCHEDULER_CBS_OK; } 4b140: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4b146: 4e5e unlk %fp 4b148: 4e75 rts if ( the_thread ) { _Thread_Enable_dispatch(); } if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 4b14a: 70ee moveq #-18,%d0 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; } 4b14c: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4b152: 4e5e unlk %fp 4b154: 4e75 rts return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; 4b156: 70e7 moveq #-25,%d0 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; } 4b158: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4b15e: 4e5e unlk %fp ... =============================================================================== 0004b338 <_Scheduler_CBS_Get_server_id>: int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 4b338: 4e56 0000 linkw %fp,#0 unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4b33c: 2239 0006 2e3c movel 62e3c <_Scheduler_CBS_Maximum_servers>,%d1 int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 4b342: 2f02 movel %d2,%sp@- 4b344: 242e 0008 movel %fp@(8),%d2 unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4b348: 4a81 tstl %d1 4b34a: 6718 beqs 4b364 <_Scheduler_CBS_Get_server_id+0x2c><== NEVER TAKEN 4b34c: 2279 0006 4b72 moveal 64b72 <_Scheduler_CBS_Server_list>,%a1 4b352: 4280 clrl %d0 if ( _Scheduler_CBS_Server_list[i] && 4b354: 2059 moveal %a1@+,%a0 4b356: 4a88 tstl %a0 4b358: 6704 beqs 4b35e <_Scheduler_CBS_Get_server_id+0x26> 4b35a: b490 cmpl %a0@,%d2 4b35c: 670e beqs 4b36c <_Scheduler_CBS_Get_server_id+0x34> rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4b35e: 5280 addql #1,%d0 4b360: b280 cmpl %d0,%d1 4b362: 66f0 bnes 4b354 <_Scheduler_CBS_Get_server_id+0x1c> *server_id = i; return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; } 4b364: 241f movel %sp@+,%d2 _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; 4b366: 70e7 moveq #-25,%d0 } 4b368: 4e5e unlk %fp 4b36a: 4e75 rts { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; 4b36c: 206e 000c moveal %fp@(12),%a0 return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; } 4b370: 241f movel %sp@+,%d2 4b372: 4e5e unlk %fp { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; 4b374: 2080 movel %d0,%a0@ return SCHEDULER_CBS_OK; 4b376: 4280 clrl %d0 } } return SCHEDULER_CBS_ERROR_NOSERVER; } ... =============================================================================== 0004b3e0 <_Scheduler_CBS_Initialize>: int _Scheduler_CBS_Initialize(void) { 4b3e0: 4e56 0000 linkw %fp,#0 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 4b3e4: 2039 0006 2e3c movel 62e3c <_Scheduler_CBS_Maximum_servers>,%d0 4b3ea: e588 lsll #2,%d0 4b3ec: 2f00 movel %d0,%sp@- 4b3ee: 4eb9 0004 ce30 jsr 4ce30 <_Workspace_Allocate> _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 4b3f4: 588f addql #4,%sp } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 4b3f6: 2040 moveal %d0,%a0 4b3f8: 23c0 0006 4b72 movel %d0,64b72 <_Scheduler_CBS_Server_list> _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 4b3fe: 672c beqs 4b42c <_Scheduler_CBS_Initialize+0x4c> <== NEVER TAKEN return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 4b400: 2039 0006 2e3c movel 62e3c <_Scheduler_CBS_Maximum_servers>,%d0 4b406: 4281 clrl %d1 4b408: 4a80 tstl %d0 4b40a: 671a beqs 4b426 <_Scheduler_CBS_Initialize+0x46> <== NEVER TAKEN _Scheduler_CBS_Server_list[i] = NULL; 4b40c: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 4b410: 5281 addql #1,%d1 4b412: b081 cmpl %d1,%d0 4b414: 6710 beqs 4b426 <_Scheduler_CBS_Initialize+0x46> <== NEVER TAKEN 4b416: 2079 0006 4b72 moveal 64b72 <_Scheduler_CBS_Server_list>,%a0 _Scheduler_CBS_Server_list[i] = NULL; 4b41c: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 4b420: 5281 addql #1,%d1 4b422: b081 cmpl %d1,%d0 4b424: 66f0 bnes 4b416 <_Scheduler_CBS_Initialize+0x36> _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 4b426: 4280 clrl %d0 } 4b428: 4e5e unlk %fp 4b42a: 4e75 rts { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 4b42c: 70ef moveq #-17,%d0 <== NOT EXECUTED for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; } 4b42e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00049c78 <_Scheduler_CBS_Release_job>: void _Scheduler_CBS_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 49c78: 4e56 0000 linkw %fp,#0 49c7c: 206e 0008 moveal %fp@(8),%a0 Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 49c80: 2268 0086 moveal %a0@(134),%a1 ) { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = 49c84: 2269 0018 moveal %a1@(24),%a1 (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { 49c88: 4aae 000c tstl %fp@(12) 49c8c: 6732 beqs 49cc0 <_Scheduler_CBS_Release_job+0x48> /* Initializing or shifting deadline. */ if (serv_info) new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 49c8e: 2039 0006 2994 movel 62994 <_Watchdog_Ticks_since_boot>,%d0 Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { /* Initializing or shifting deadline. */ if (serv_info) 49c94: 4a89 tstl %a1 49c96: 6738 beqs 49cd0 <_Scheduler_CBS_Release_job+0x58> new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 49c98: d0a9 0004 addl %a1@(4),%d0 49c9c: 0880 001f bclr #31,%d0 new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; 49ca0: 2169 0008 0072 movel %a1@(8),%a0@(114) the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49ca6: 4878 0001 pea 1 49caa: 2f00 movel %d0,%sp@- /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; 49cac: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 49cb0: 2f08 movel %a0,%sp@- 49cb2: 4eb9 0004 a14c jsr 4a14c <_Thread_Change_priority> 49cb8: 4fef 000c lea %sp@(12),%sp } 49cbc: 4e5e unlk %fp 49cbe: 4e75 rts new_priority = (_Watchdog_Ticks_since_boot + deadline) & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 49cc0: 2028 00a8 movel %a0@(168),%d0 } /* Budget replenishment for the next job. */ if (serv_info) 49cc4: 4a89 tstl %a1 49cc6: 67de beqs 49ca6 <_Scheduler_CBS_Release_job+0x2e><== NEVER TAKEN the_thread->cpu_time_budget = serv_info->parameters.budget; 49cc8: 2169 0008 0072 movel %a1@(8),%a0@(114) 49cce: 60d6 bras 49ca6 <_Scheduler_CBS_Release_job+0x2e> /* Initializing or shifting deadline. */ if (serv_info) new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 49cd0: d0ae 000c addl %fp@(12),%d0 /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49cd4: 4878 0001 pea 1 /* Initializing or shifting deadline. */ if (serv_info) new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 49cd8: 0880 001f bclr #31,%d0 /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49cdc: 2f00 movel %d0,%sp@- /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; 49cde: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 49ce2: 2f08 movel %a0,%sp@- 49ce4: 4eb9 0004 a14c jsr 4a14c <_Thread_Change_priority> 49cea: 4fef 000c lea %sp@(12),%sp } 49cee: 4e5e unlk %fp ... =============================================================================== 00049cf4 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 49cf4: 4e56 0000 linkw %fp,#0 49cf8: 2f0a movel %a2,%sp@- 49cfa: 246e 0008 moveal %fp@(8),%a2 49cfe: 2f02 movel %d2,%sp@- Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); 49d00: 2f0a movel %a2,%sp@- 49d02: 4eb9 0004 9e18 jsr 49e18 <_Scheduler_EDF_Enqueue> /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 49d08: 206a 0086 moveal %a2@(134),%a0 * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { 49d0c: 588f addql #4,%sp _Scheduler_EDF_Enqueue(the_thread); /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 49d0e: 2068 0018 moveal %a0@(24),%a0 * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { 49d12: 4a88 tstl %a0 49d14: 6700 0094 beqw 49daa <_Scheduler_CBS_Unblock+0xb6> time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - 49d18: 222a 0018 movel %a2@(24),%d1 49d1c: 2401 movel %d1,%d2 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 49d1e: 43e8 0004 lea %a0@(4),%a1 */ if (serv_info) { time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - 49d22: 2039 0006 2994 movel 62994 <_Watchdog_Ticks_since_boot>,%d0 49d28: 9480 subl %d0,%d2 49d2a: 2002 movel %d2,%d0 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 49d2c: 4c11 0800 mulsl %a1@,%d0 49d30: 43ea 0072 lea %a2@(114),%a1 49d34: 2428 0008 movel %a0@(8),%d2 49d38: 4c11 2800 mulsl %a1@,%d2 49d3c: b480 cmpl %d0,%d2 49d3e: 6c6a bges 49daa <_Scheduler_CBS_Unblock+0xb6> /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 49d40: 206a 00a8 moveal %a2@(168),%a0 if ( the_thread->real_priority != new_priority ) 49d44: b1c1 cmpal %d1,%a0 49d46: 6704 beqs 49d4c <_Scheduler_CBS_Unblock+0x58> the_thread->real_priority = new_priority; 49d48: 2548 0018 movel %a0,%a2@(24) if ( the_thread->current_priority != new_priority ) 49d4c: 202a 0014 movel %a2@(20),%d0 49d50: b1c0 cmpal %d0,%a0 49d52: 6716 beqs 49d6a <_Scheduler_CBS_Unblock+0x76> _Thread_Change_priority(the_thread, new_priority, true); 49d54: 4878 0001 pea 1 49d58: 2f08 movel %a0,%sp@- 49d5a: 2f0a movel %a2,%sp@- 49d5c: 4eb9 0004 a14c jsr 4a14c <_Thread_Change_priority> 49d62: 202a 0014 movel %a2@(20),%d0 49d66: 4fef 000c lea %sp@(12),%sp * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, 49d6a: 2079 0006 2cfa moveal 62cfa <_Per_CPU_Information+0x12>,%a0 49d70: 2f28 0014 movel %a0@(20),%sp@- 49d74: 2079 0006 1000 moveal 61000 <_Scheduler+0x30>,%a0 49d7a: 2f00 movel %d0,%sp@- 49d7c: 4e90 jsr %a0@ 49d7e: 508f addql #8,%sp 49d80: 4a80 tstl %d0 49d82: 6f1a bles 49d9e <_Scheduler_CBS_Unblock+0xaa> _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 49d84: 2079 0006 2cf6 moveal 62cf6 <_Per_CPU_Information+0xe>,%a0 * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; 49d8a: 23ca 0006 2cfa movel %a2,62cfa <_Per_CPU_Information+0x12> if ( _Thread_Executing->is_preemptible || 49d90: 4a28 0070 tstb %a0@(112) 49d94: 671a beqs 49db0 <_Scheduler_CBS_Unblock+0xbc> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49d96: 7001 moveq #1,%d0 49d98: 13c0 0006 2cf4 moveb %d0,62cf4 <_Per_CPU_Information+0xc> } } 49d9e: 242e fff8 movel %fp@(-8),%d2 49da2: 246e fffc moveal %fp@(-4),%a2 49da6: 4e5e unlk %fp 49da8: 4e75 rts 49daa: 202a 0014 movel %a2@(20),%d0 49dae: 60ba bras 49d6a <_Scheduler_CBS_Unblock+0x76> * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 49db0: 4aaa 0014 tstl %a2@(20) 49db4: 66e8 bnes 49d9e <_Scheduler_CBS_Unblock+0xaa> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49db6: 7001 moveq #1,%d0 <== NOT EXECUTED 49db8: 13c0 0006 2cf4 moveb %d0,62cf4 <_Per_CPU_Information+0xc> <== NOT EXECUTED 49dbe: 60de bras 49d9e <_Scheduler_CBS_Unblock+0xaa> <== NOT EXECUTED =============================================================================== 00049c44 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 49c44: 4e56 0000 linkw %fp,#0 49c48: 2f0a movel %a2,%sp@- void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 49c4a: 4878 0018 pea 18 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 49c4e: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 49c52: 4eb9 0004 b628 jsr 4b628 <_Workspace_Allocate> if ( sched ) { 49c58: 588f addql #4,%sp 49c5a: 4a80 tstl %d0 49c5c: 670e beqs 49c6c <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN the_thread->scheduler_info = sched; 49c5e: 2540 0086 movel %d0,%a2@(134) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 49c62: 2040 moveal %d0,%a0 schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49c64: 7202 moveq #2,%d1 sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); if ( sched ) { the_thread->scheduler_info = sched; schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 49c66: 208a movel %a2,%a0@ schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49c68: 2141 0014 movel %d1,%a0@(20) } return sched; } 49c6c: 246e fffc moveal %fp@(-4),%a2 49c70: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049dc0 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { 49dc0: 4e56 0000 linkw %fp,#0 49dc4: 2f02 movel %d2,%sp@- 49dc6: 242e 0008 movel %fp@(8),%d2 _Scheduler_EDF_Extract( the_thread ); 49dca: 2f02 movel %d2,%sp@- 49dcc: 4eb9 0004 9e48 jsr 49e48 <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 49dd2: 588f addql #4,%sp 49dd4: b4b9 0006 2cfa cmpl 62cfa <_Per_CPU_Information+0x12>,%d2 49dda: 6720 beqs 49dfc <_Scheduler_EDF_Block+0x3c> _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 49ddc: b4b9 0006 2cf6 cmpl 62cf6 <_Per_CPU_Information+0xe>,%d2 49de2: 6708 beqs 49dec <_Scheduler_EDF_Block+0x2c> <== NEVER TAKEN _Thread_Dispatch_necessary = true; } 49de4: 242e fffc movel %fp@(-4),%d2 49de8: 4e5e unlk %fp 49dea: 4e75 rts 49dec: 242e fffc movel %fp@(-4),%d2 49df0: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 49df2: 7001 moveq #1,%d0 49df4: 13c0 0006 2cf4 moveb %d0,62cf4 <_Per_CPU_Information+0xc> } 49dfa: 4e75 rts _Scheduler_EDF_Extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); 49dfc: 4eb9 0004 9f28 jsr 49f28 <_Scheduler_EDF_Schedule> if ( _Thread_Is_executing( the_thread ) ) 49e02: b4b9 0006 2cf6 cmpl 62cf6 <_Per_CPU_Information+0xe>,%d2 49e08: 66da bnes 49de4 <_Scheduler_EDF_Block+0x24> <== NEVER TAKEN 49e0a: 60e0 bras 49dec <_Scheduler_EDF_Block+0x2c> =============================================================================== 00049e74 <_Scheduler_EDF_Free>: #include void _Scheduler_EDF_Free( Thread_Control *the_thread ) { 49e74: 4e56 0000 linkw %fp,#0 49e78: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 49e7c: 2d68 0086 0008 movel %a0@(134),%fp@(8) } 49e82: 4e5e unlk %fp void _Scheduler_EDF_Free( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 49e84: 4ef9 0004 b6d0 jmp 4b6d0 <_Workspace_Free> ... =============================================================================== 00049e48 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 49e48: 4e56 0000 linkw %fp,#0 49e4c: 2f0a movel %a2,%sp@- 49e4e: 246e 0008 moveal %fp@(8),%a2 _Scheduler_EDF_Enqueue(the_thread); 49e52: 2f0a movel %a2,%sp@- 49e54: 4eb9 0004 9ccc jsr 49ccc <_Scheduler_EDF_Enqueue> 49e5a: 2f2a 0014 movel %a2@(20),%sp@- * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( 49e5e: 2079 0006 2c6a moveal 62c6a <_Per_CPU_Information+0x12>,%a0 49e64: 2f28 0014 movel %a0@(20),%sp@- 49e68: 2079 0006 0f70 moveal 60f70 <_Scheduler+0x30>,%a0 49e6e: 4e90 jsr %a0@ 49e70: 4fef 000c lea %sp@(12),%sp 49e74: 4a80 tstl %d0 49e76: 6d08 blts 49e80 <_Scheduler_EDF_Unblock+0x38> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } 49e78: 246e fffc moveal %fp@(-4),%a2 49e7c: 4e5e unlk %fp 49e7e: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 49e80: 2079 0006 2c66 moveal 62c66 <_Per_CPU_Information+0xe>,%a0 * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 49e86: 23ca 0006 2c6a movel %a2,62c6a <_Per_CPU_Information+0x12> if ( _Thread_Executing->is_preemptible || 49e8c: 4a28 0070 tstb %a0@(112) 49e90: 6710 beqs 49ea2 <_Scheduler_EDF_Unblock+0x5a> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49e92: 7001 moveq #1,%d0 49e94: 13c0 0006 2c64 moveb %d0,62c64 <_Per_CPU_Information+0xc> } } 49e9a: 246e fffc moveal %fp@(-4),%a2 49e9e: 4e5e unlk %fp 49ea0: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 49ea2: 4aaa 0014 tstl %a2@(20) 49ea6: 66d0 bnes 49e78 <_Scheduler_EDF_Unblock+0x30> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49ea8: 7001 moveq #1,%d0 <== NOT EXECUTED 49eaa: 13c0 0006 2c64 moveb %d0,62c64 <_Per_CPU_Information+0xc> <== NOT EXECUTED 49eb0: 60e8 bras 49e9a <_Scheduler_EDF_Unblock+0x52> <== NOT EXECUTED ... =============================================================================== 00049288 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 49288: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 4928c: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 4928e: 2279 0005 f774 moveal 5f774 <_Scheduler+0x4>,%a1 49294: 4ed1 jmp %a1@ ... =============================================================================== 000492b4 <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 492b4: 4e56 0000 linkw %fp,#0 492b8: 206e 0008 moveal %fp@(8),%a0 492bc: 2f0b movel %a3,%sp@- 492be: 2f0a movel %a2,%sp@- ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 492c0: 2468 0086 moveal %a0@(134),%a2 ready = sched_info->ready_chain; 492c4: 2252 moveal %a2@,%a1 if ( _Chain_Has_only_one_node( ready ) ) { 492c6: 2029 0008 movel %a1@(8),%d0 492ca: b091 cmpl %a1@,%d0 492cc: 6700 0088 beqw 49356 <_Scheduler_priority_Block+0xa2> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 492d0: 2450 moveal %a0@,%a2 previous = the_node->previous; 492d2: 2268 0004 moveal %a0@(4),%a1 next->previous = previous; 492d6: 2549 0004 movel %a1,%a2@(4) previous->next = next; 492da: 228a movel %a2,%a1@ _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 492dc: b1f9 0006 1432 cmpal 61432 <_Per_CPU_Information+0x12>,%a0 492e2: 6720 beqs 49304 <_Scheduler_priority_Block+0x50> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 492e4: b1f9 0006 142e cmpal 6142e <_Per_CPU_Information+0xe>,%a0 492ea: 6708 beqs 492f4 <_Scheduler_priority_Block+0x40> _Thread_Dispatch_necessary = true; } 492ec: 245f moveal %sp@+,%a2 492ee: 265f moveal %sp@+,%a3 492f0: 4e5e unlk %fp 492f2: 4e75 rts 492f4: 245f moveal %sp@+,%a2 if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 492f6: 7001 moveq #1,%d0 } 492f8: 265f moveal %sp@+,%a3 492fa: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 492fc: 13c0 0006 142c moveb %d0,6142c <_Per_CPU_Information+0xc> } 49302: 4e75 rts RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 49304: 3039 0006 1444 movew 61444 <_Priority_Major_bit_map>,%d0 4930a: 4840 swap %d0 4930c: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4930e: 43f9 0006 1448 lea 61448 <_Priority_Bit_map>,%a1 49314: 0280 0000 ffff andil #65535,%d0 4931a: 3231 0a00 movew %a1@(00000000,%d0:l:2),%d1 4931e: 4841 swap %d1 49320: 04c1 ff1 %d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 49322: 2279 0005 f770 moveal 5f770 <_Scheduler>,%a1 return (_Priority_Bits_index( major ) << 4) + 49328: 0281 0000 ffff andil #65535,%d1 4932e: e988 lsll #4,%d0 49330: d081 addl %d1,%d0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 49332: 2200 movel %d0,%d1 49334: e988 lsll #4,%d0 49336: e589 lsll #2,%d1 49338: 9081 subl %d1,%d0 4933a: d3c0 addal %d0,%a1 4933c: 2019 movel %a1@+,%d0 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 4933e: b3c0 cmpal %d0,%a1 49340: 56c1 sne %d1 49342: 49c1 extbl %d1 * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 49344: c081 andl %d1,%d0 49346: 23c0 0006 1432 movel %d0,61432 <_Per_CPU_Information+0x12> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 4934c: b1f9 0006 142e cmpal 6142e <_Per_CPU_Information+0xe>,%a0 49352: 6698 bnes 492ec <_Scheduler_priority_Block+0x38> 49354: 609e bras 492f4 <_Scheduler_priority_Block+0x40> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 49356: 266a 0004 moveal %a2@(4),%a3 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4935a: 2209 movel %a1,%d1 4935c: 5881 addql #4,%d1 4935e: 2281 movel %d1,%a1@ 49360: 3013 movew %a3@,%d0 49362: 322a 000e movew %a2@(14),%d1 head->next = tail; head->previous = NULL; 49366: 42a9 0004 clrl %a1@(4) 4936a: c081 andl %d1,%d0 tail->previous = head; 4936c: 2349 0008 movel %a1,%a1@(8) 49370: 3680 movew %d0,%a3@ if ( *the_priority_map->minor == 0 ) 49372: 6600 ff68 bnew 492dc <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; 49376: 3239 0006 1444 movew 61444 <_Priority_Major_bit_map>,%d1 4937c: 302a 000c movew %a2@(12),%d0 49380: c081 andl %d1,%d0 49382: 33c0 0006 1444 movew %d0,61444 <_Priority_Major_bit_map> { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 49388: b1f9 0006 1432 cmpal 61432 <_Per_CPU_Information+0x12>,%a0 4938e: 6600 ff54 bnew 492e4 <_Scheduler_priority_Block+0x30> 49392: 6000 ff70 braw 49304 <_Scheduler_priority_Block+0x50> ... =============================================================================== 0004948c <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 4948c: 4e56 0000 linkw %fp,#0 49490: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 49494: 2d68 0086 0008 movel %a0@(134),%fp@(8) } 4949a: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 4949c: 4ef9 0004 acdc jmp 4acdc <_Workspace_Free> ... =============================================================================== 00049588 <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 49588: 4e56 0000 linkw %fp,#0 4958c: 2f0a movel %a2,%sp@- Thread_Control *executing; executing = _Thread_Executing; 4958e: 2479 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a2 /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 49594: 4a2a 0070 tstb %a2@(112) 49598: 6720 beqs 495ba <_Scheduler_priority_Tick+0x32> return; if ( !_States_Is_ready( executing->current_state ) ) 4959a: 4aaa 0010 tstl %a2@(16) 4959e: 661a bnes 495ba <_Scheduler_priority_Tick+0x32> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 495a0: 202a 0076 movel %a2@(118),%d0 495a4: 7201 moveq #1,%d1 495a6: b280 cmpl %d0,%d1 495a8: 6210 bhis 495ba <_Scheduler_priority_Tick+0x32> 495aa: 123c 0002 moveb #2,%d1 495ae: b280 cmpl %d0,%d1 495b0: 642e bccs 495e0 <_Scheduler_priority_Tick+0x58> 495b2: 123c 0003 moveb #3,%d1 495b6: b280 cmpl %d0,%d1 495b8: 6708 beqs 495c2 <_Scheduler_priority_Tick+0x3a> <== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 495ba: 246e fffc moveal %fp@(-4),%a2 495be: 4e5e unlk %fp 495c0: 4e75 rts } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 495c2: 202a 0072 movel %a2@(114),%d0 495c6: 5380 subql #1,%d0 495c8: 2540 0072 movel %d0,%a2@(114) 495cc: 66ec bnes 495ba <_Scheduler_priority_Tick+0x32> (*executing->budget_callout)( executing ); 495ce: 2f0a movel %a2,%sp@- 495d0: 206a 007a moveal %a2@(122),%a0 495d4: 4e90 jsr %a0@ break; #endif } } 495d6: 246e fffc moveal %fp@(-4),%a2 break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); 495da: 588f addql #4,%sp break; #endif } } 495dc: 4e5e unlk %fp 495de: 4e75 rts case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 495e0: 202a 0072 movel %a2@(114),%d0 495e4: 5380 subql #1,%d0 495e6: 2540 0072 movel %d0,%a2@(114) 495ea: 6ece bgts 495ba <_Scheduler_priority_Tick+0x32> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 495ec: 2079 0005 f77c moveal 5f77c <_Scheduler+0xc>,%a0 495f2: 4e90 jsr %a0@ * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 495f4: 41f9 0006 0f9e lea 60f9e <_Thread_Ticks_per_timeslice>,%a0 495fa: 2550 0072 movel %a0@,%a2@(114) if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 495fe: 246e fffc moveal %fp@(-4),%a2 49602: 4e5e unlk %fp ... =============================================================================== 00049ca8 <_Scheduler_simple_Block>: #include void _Scheduler_simple_Block( Thread_Control *the_thread ) { 49ca8: 4e56 0000 linkw %fp,#0 49cac: 2f02 movel %d2,%sp@- 49cae: 242e 0008 movel %fp@(8),%d2 _Scheduler_simple_Extract(the_thread); 49cb2: 2f02 movel %d2,%sp@- 49cb4: 4eb9 0004 9d0c jsr 49d0c <_Scheduler_simple_Extract> if ( _Thread_Is_heir( the_thread ) ) 49cba: 588f addql #4,%sp 49cbc: b4b9 0006 237a cmpl 6237a <_Per_CPU_Information+0x12>,%d2 49cc2: 6720 beqs 49ce4 <_Scheduler_simple_Block+0x3c> _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 49cc4: b4b9 0006 2376 cmpl 62376 <_Per_CPU_Information+0xe>,%d2 49cca: 6708 beqs 49cd4 <_Scheduler_simple_Block+0x2c> <== NEVER TAKEN _Thread_Dispatch_necessary = true; } 49ccc: 242e fffc movel %fp@(-4),%d2 49cd0: 4e5e unlk %fp 49cd2: 4e75 rts 49cd4: 242e fffc movel %fp@(-4),%d2 49cd8: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 49cda: 7001 moveq #1,%d0 49cdc: 13c0 0006 2374 moveb %d0,62374 <_Per_CPU_Information+0xc> } 49ce2: 4e75 rts ) { _Scheduler_simple_Extract(the_thread); if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); 49ce4: 4eb9 0004 9e08 jsr 49e08 <_Scheduler_simple_Schedule> if ( _Thread_Is_executing( the_thread ) ) 49cea: b4b9 0006 2376 cmpl 62376 <_Per_CPU_Information+0xe>,%d2 49cf0: 66da bnes 49ccc <_Scheduler_simple_Block+0x24> <== NEVER TAKEN 49cf2: 60e0 bras 49cd4 <_Scheduler_simple_Block+0x2c> =============================================================================== 00049c4c <_TOD_Set_with_timestamp>: #include void _TOD_Set_with_timestamp( const Timestamp_Control *tod ) { 49c4c: 4e56 ffec linkw %fp,#-20 49c50: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49c54: 246e 0008 moveal %fp@(8),%a2 static inline uint32_t _Timestamp64_implementation_Get_seconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time / 1000000000L); 49c58: 47f9 0005 d728 lea 5d728 <__divdi3>,%a3 _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 49c5e: 2412 movel %a2@,%d2 49c60: 262a 0004 movel %a2@(4),%d3 static inline uint32_t _Timestamp64_implementation_Get_nanoseconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time % 1000000000L); 49c64: 2f3c 3b9a ca00 movel #1000000000,%sp@- 49c6a: 42a7 clrl %sp@- 49c6c: 2f03 movel %d3,%sp@- 49c6e: 2f02 movel %d2,%sp@- 49c70: 4eb9 0005 db88 jsr 5db88 <__moddi3> 49c76: 4fef 0010 lea %sp@(16),%sp 49c7a: 2801 movel %d1,%d4 static inline uint32_t _Timestamp64_implementation_Get_seconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time / 1000000000L); 49c7c: 2f3c 3b9a ca00 movel #1000000000,%sp@- 49c82: 42a7 clrl %sp@- 49c84: 2f03 movel %d3,%sp@- 49c86: 2f02 movel %d2,%sp@- 49c88: 4e93 jsr %a3@ * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 49c8a: 2039 0006 3a86 movel 63a86 <_Thread_Dispatch_disable_level>,%d0 ++level; 49c90: 5280 addql #1,%d0 49c92: 4fef 0010 lea %sp@(16),%sp 49c96: 2401 movel %d1,%d2 _Thread_Dispatch_disable_level = level; 49c98: 23c0 0006 3a86 movel %d0,63a86 <_Thread_Dispatch_disable_level> 49c9e: 2f3c 3b9a ca00 movel #1000000000,%sp@- 49ca4: 42a7 clrl %sp@- 49ca6: 2f39 0006 3a2c movel 63a2c <_TOD+0x4>,%sp@- 49cac: 2f39 0006 3a28 movel 63a28 <_TOD>,%sp@- 49cb2: 4e93 jsr %a3@ 49cb4: 4fef 0010 lea %sp@(16),%sp _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds_now = _TOD_Seconds_since_epoch(); if ( seconds_next < seconds_now ) 49cb8: b282 cmpl %d2,%d1 49cba: 6244 bhis 49d00 <_TOD_Set_with_timestamp+0xb4> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 49cbc: 9481 subl %d1,%d2 49cbe: 2f02 movel %d2,%sp@- 49cc0: 42a7 clrl %sp@- 49cc2: 4879 0006 3b16 pea 63b16 <_Watchdog_Seconds_chain> 49cc8: 4eb9 0004 c364 jsr 4c364 <_Watchdog_Adjust> 49cce: 4fef 000c lea %sp@(12),%sp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; 49cd2: 2012 movel %a2@,%d0 49cd4: 222a 0004 movel %a2@(4),%d1 _TOD.seconds_trigger = nanoseconds; 49cd8: 23c4 0006 3a38 movel %d4,63a38 <_TOD+0x10> if ( seconds_next < seconds_now ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; 49cde: 23c0 0006 3a28 movel %d0,63a28 <_TOD> 49ce4: 23c1 0006 3a2c movel %d1,63a2c <_TOD+0x4> _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 49cea: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; 49cf0: 7201 moveq #1,%d1 _TOD_Activate(); _Thread_Enable_dispatch(); } 49cf2: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; 49cf4: 13c1 0006 3a3c moveb %d1,63a3c <_TOD+0x14> _TOD_Activate(); _Thread_Enable_dispatch(); 49cfa: 4ef9 0004 b5e4 jmp 4b5e4 <_Thread_Enable_dispatch> 49d00: 9282 subl %d2,%d1 49d02: 2f01 movel %d1,%sp@- 49d04: 4878 0001 pea 1 49d08: 4879 0006 3b16 pea 63b16 <_Watchdog_Seconds_chain> 49d0e: 4eb9 0004 c364 jsr 4c364 <_Watchdog_Adjust> 49d14: 4fef 000c lea %sp@(12),%sp if ( seconds_next < seconds_now ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; 49d18: 2012 movel %a2@,%d0 49d1a: 222a 0004 movel %a2@(4),%d1 _TOD.seconds_trigger = nanoseconds; 49d1e: 23c4 0006 3a38 movel %d4,63a38 <_TOD+0x10> if ( seconds_next < seconds_now ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; 49d24: 23c0 0006 3a28 movel %d0,63a28 <_TOD> 49d2a: 23c1 0006 3a2c movel %d1,63a2c <_TOD+0x4> _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 49d30: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; 49d36: 7201 moveq #1,%d1 _TOD_Activate(); _Thread_Enable_dispatch(); } 49d38: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; 49d3a: 13c1 0006 3a3c moveb %d1,63a3c <_TOD+0x14> _TOD_Activate(); _Thread_Enable_dispatch(); 49d40: 4ef9 0004 b5e4 jmp 4b5e4 <_Thread_Enable_dispatch> ... =============================================================================== 00048210 <_TOD_Validate>: ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 48210: 43f9 0005 fa9e lea 5fa9e ,%a1 }; bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 48216: 4e56 0000 linkw %fp,#0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 4821a: 203c 000f 4240 movel #1000000,%d0 }; bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 48220: 206e 0008 moveal %fp@(8),%a0 48224: 2f02 movel %d2,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 48226: 4c51 0000 remul %a1@,%d0,%d0 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 4822a: 4a88 tstl %a0 4822c: 6758 beqs 48286 <_TOD_Validate+0x76> <== NEVER TAKEN 4822e: b0a8 0018 cmpl %a0@(24),%d0 48232: 6352 blss 48286 <_TOD_Validate+0x76> (the_tod->ticks >= ticks_per_second) || 48234: 703b moveq #59,%d0 48236: b0a8 0014 cmpl %a0@(20),%d0 4823a: 654a bcss 48286 <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 4823c: b0a8 0010 cmpl %a0@(16),%d0 48240: 6544 bcss 48286 <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 48242: 7217 moveq #23,%d1 48244: b2a8 000c cmpl %a0@(12),%d1 48248: 653c bcss 48286 <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 4824a: 2028 0004 movel %a0@(4),%d0 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 4824e: 6736 beqs 48286 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->month == 0) || 48250: 740c moveq #12,%d2 48252: b480 cmpl %d0,%d2 48254: 6530 bcss 48286 <_TOD_Validate+0x76> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 48256: 2210 movel %a0@,%d1 (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 48258: 0c81 0000 07c3 cmpil #1987,%d1 4825e: 6326 blss 48286 <_TOD_Validate+0x76> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 48260: 2068 0008 moveal %a0@(8),%a0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 48264: 4a88 tstl %a0 48266: 671e beqs 48286 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 48268: 143c 0003 moveb #3,%d2 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 4826c: 43f9 0006 0e28 lea 60e28 <_TOD_Days_per_month>,%a1 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 48272: c282 andl %d2,%d1 48274: 6618 bnes 4828e <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 48276: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; if ( the_tod->day > days_in_month ) 4827a: b1c0 cmpal %d0,%a0 4827c: 53c0 sls %d0 4827e: 4480 negl %d0 return false; return true; } 48280: 241f movel %sp@+,%d2 48282: 4e5e unlk %fp 48284: 4e75 rts 48286: 241f movel %sp@+,%d2 48288: 4e5e unlk %fp (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 4828a: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 4828c: 4e75 rts return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 4828e: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0 if ( the_tod->day > days_in_month ) 48292: b1c0 cmpal %d0,%a0 48294: 53c0 sls %d0 48296: 4480 negl %d0 48298: 60e6 bras 48280 <_TOD_Validate+0x70> ... =============================================================================== 000497ec <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 497ec: 4e56 fff0 linkw %fp,#-16 497f0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 497f4: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 497f8: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 497fc: 242e 000c movel %fp@(12),%d2 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 49800: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 49802: 182e 0013 moveb %fp@(19),%d4 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 49806: 4eb9 0004 a64c jsr 4a64c <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 4980c: 588f addql #4,%sp 4980e: b4aa 0014 cmpl %a2@(20),%d2 49812: 670c beqs 49820 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 49814: 2f02 movel %d2,%sp@- 49816: 2f0a movel %a2,%sp@- 49818: 4eb9 0004 a5e8 jsr 4a5e8 <_Thread_Set_priority> 4981e: 508f addql #8,%sp _ISR_Disable( level ); 49820: 203c 0000 0700 movel #1792,%d0 49826: 40c2 movew %sr,%d2 49828: 8082 orl %d2,%d0 4982a: 46c0 movew %d0,%sr /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 4982c: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 49830: 7204 moveq #4,%d1 49832: b280 cmpl %d0,%d1 49834: 6738 beqs 4986e <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 49836: 44c3 movew %d3,%ccr 49838: 6708 beqs 49842 <_Thread_Change_priority+0x56> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4983a: 72fb moveq #-5,%d1 4983c: c280 andl %d0,%d1 4983e: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 49842: 46c2 movew %d2,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 49844: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 4984a: 660a bnes 49856 <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 4984c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 49852: 4e5e unlk %fp 49854: 4e75 rts /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 49856: 2d4a 000c movel %a2,%fp@(12) 4985a: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 49860: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 49866: 4e5e unlk %fp /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 49868: 4ef9 0004 a538 jmp 4a538 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 4986e: 44c3 movew %d3,%ccr 49870: 6714 beqs 49886 <_Thread_Change_priority+0x9a> <== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 49872: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 49876: 4a04 tstb %d4 49878: 6748 beqs 498c2 <_Thread_Change_priority+0xd6> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 4987a: 2f0a movel %a2,%sp@- 4987c: 2079 0005 f798 moveal 5f798 <_Scheduler+0x28>,%a0 49882: 4e90 jsr %a0@ 49884: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 49886: 203c 0000 0700 movel #1792,%d0 4988c: 46c2 movew %d2,%sr 4988e: 8082 orl %d2,%d0 49890: 46c0 movew %d0,%sr * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 49892: 2079 0005 f778 moveal 5f778 <_Scheduler+0x8>,%a0 49898: 4e90 jsr %a0@ * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 4989a: 2079 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a0 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 498a0: b1f9 0006 1432 cmpal 61432 <_Per_CPU_Information+0x12>,%a0 498a6: 670e beqs 498b6 <_Thread_Change_priority+0xca> 498a8: 4a28 0070 tstb %a0@(112) 498ac: 6708 beqs 498b6 <_Thread_Change_priority+0xca> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 498ae: 7001 moveq #1,%d0 498b0: 13c0 0006 142c moveb %d0,6142c <_Per_CPU_Information+0xc> _ISR_Enable( level ); 498b6: 46c2 movew %d2,%sr } 498b8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 498be: 4e5e unlk %fp 498c0: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 498c2: 2f0a movel %a2,%sp@- 498c4: 2079 0005 f794 moveal 5f794 <_Scheduler+0x24>,%a0 498ca: 4e90 jsr %a0@ 498cc: 588f addql #4,%sp 498ce: 60b6 bras 49886 <_Thread_Change_priority+0x9a> =============================================================================== 0004992c <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 4992c: 4e56 0000 linkw %fp,#0 49930: 2f0b movel %a3,%sp@- 49932: 266e 0008 moveal %fp@(8),%a3 49936: 2f0a movel %a2,%sp@- 49938: 246e 000c moveal %fp@(12),%a2 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 4993c: 202a 0008 movel %a2@(8),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 49940: 206b 0018 moveal %a3@(24),%a0 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 49944: 0280 0000 ffff andil #65535,%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4994a: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) return ctx.ok; } static inline void _User_extensions_Thread_delete( Thread_Control *deleted ) { _User_extensions_Iterate( 4994e: 4879 0004 a7dc pea 4a7dc <_User_extensions_Thread_delete_visitor> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 49954: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 --level; 4995a: 5380 subql #1,%d0 4995c: 2f0a movel %a2,%sp@- _Thread_Dispatch_disable_level = level; 4995e: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> 49964: 4eb9 0004 a884 jsr 4a884 <_User_extensions_Iterate> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4996a: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 ++level; 49970: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 49972: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 49978: 2f0a movel %a2,%sp@- 4997a: 2f0b movel %a3,%sp@- 4997c: 4eb9 0004 8acc jsr 48acc <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 49982: 4878 0001 pea 1 49986: 2f0a movel %a2,%sp@- 49988: 4eb9 0004 a600 jsr 4a600 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4998e: 2f0a movel %a2,%sp@- 49990: 4eb9 0004 a444 jsr 4a444 <_Thread_queue_Extract_with_proxy> 49996: 4fef 001c lea %sp@(28),%sp 4999a: 4a00 tstb %d0 4999c: 660a bnes 499a8 <_Thread_Close+0x7c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4999e: 7002 moveq #2,%d0 499a0: b0aa 0050 cmpl %a2@(80),%d0 499a4: 6700 0088 beqw 49a2e <_Thread_Close+0x102> */ RTEMS_INLINE_ROUTINE void _Scheduler_Free( Thread_Control *the_thread ) { return _Scheduler.Operations.free( the_thread ); 499a8: 2f0a movel %a2,%sp@- 499aa: 2079 0005 f78c moveal 5f78c <_Scheduler+0x1c>,%a0 499b0: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 499b2: 588f addql #4,%sp 499b4: b5f9 0006 1052 cmpal 61052 <_Thread_Allocated_fp>,%a2 499ba: 6736 beqs 499f2 <_Thread_Close+0xc6> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 499bc: 2f2a 00b6 movel %a2@(182),%sp@- 499c0: 47f9 0004 acdc lea 4acdc <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 499c6: 42aa 00f2 clrl %a2@(242) _Workspace_Free( the_thread->Start.fp_context ); 499ca: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 499cc: 2f0a movel %a2,%sp@- 499ce: 4eb9 0004 a6d0 jsr 4a6d0 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 499d4: 2f2a 0102 movel %a2@(258),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 499d8: 42aa 00ba clrl %a2@(186) _Workspace_Free( the_thread->extensions ); 499dc: 4e93 jsr %a3@ the_thread->extensions = NULL; } 499de: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 499e2: 4fef 000c lea %sp@(12),%sp 499e6: 42aa 0102 clrl %a2@(258) } 499ea: 246e fff8 moveal %fp@(-8),%a2 499ee: 4e5e unlk %fp 499f0: 4e75 rts if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 499f2: 2f2a 00b6 movel %a2@(182),%sp@- 499f6: 47f9 0004 acdc lea 4acdc <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 499fc: 42aa 00f2 clrl %a2@(242) */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 49a00: 42b9 0006 1052 clrl 61052 <_Thread_Allocated_fp> _Workspace_Free( the_thread->Start.fp_context ); 49a06: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 49a08: 2f0a movel %a2,%sp@- 49a0a: 4eb9 0004 a6d0 jsr 4a6d0 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 49a10: 2f2a 0102 movel %a2@(258),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 49a14: 42aa 00ba clrl %a2@(186) _Workspace_Free( the_thread->extensions ); 49a18: 4e93 jsr %a3@ the_thread->extensions = NULL; } 49a1a: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 49a1e: 4fef 000c lea %sp@(12),%sp 49a22: 42aa 0102 clrl %a2@(258) } 49a26: 246e fff8 moveal %fp@(-8),%a2 49a2a: 4e5e unlk %fp 49a2c: 4e75 rts */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 49a2e: 486a 0048 pea %a2@(72) 49a32: 4eb9 0004 aaa0 jsr 4aaa0 <_Watchdog_Remove> 49a38: 588f addql #4,%sp 49a3a: 2079 0005 f78c moveal 5f78c <_Scheduler+0x1c>,%a0 49a40: 2f0a movel %a2,%sp@- 49a42: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 49a44: 588f addql #4,%sp 49a46: b5f9 0006 1052 cmpal 61052 <_Thread_Allocated_fp>,%a2 49a4c: 6600 ff6e bnew 499bc <_Thread_Close+0x90> 49a50: 60a0 bras 499f2 <_Thread_Close+0xc6> <== NOT EXECUTED ... =============================================================================== 00049b00 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 49b00: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 49b04: 486e fffc pea %fp@(-4) 49b08: 2f2e 0008 movel %fp@(8),%sp@- 49b0c: 4eb9 0004 9cf0 jsr 49cf0 <_Thread_Get> switch ( location ) { 49b12: 508f addql #8,%sp 49b14: 4aae fffc tstl %fp@(-4) 49b18: 661e bnes 49b38 <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 49b1a: 2f3c 1000 0018 movel #268435480,%sp@- 49b20: 2f00 movel %d0,%sp@- 49b22: 4eb9 0004 98d0 jsr 498d0 <_Thread_Clear_state> 49b28: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 49b2a: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 --level; 49b30: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 49b32: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 49b38: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049b3c <_Thread_Dispatch>: #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { 49b3c: 4e56 ffd0 linkw %fp,#-48 49b40: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); 49b44: 283c 0000 0700 movel #1792,%d4 49b4a: 2004 movel %d4,%d0 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 49b4c: 2479 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a2 _ISR_Disable( level ); 49b52: 40c1 movew %sr,%d1 49b54: 8081 orl %d1,%d0 49b56: 46c0 movew %d0,%sr while ( _Thread_Dispatch_necessary == true ) { 49b58: 1039 0006 142c moveb 6142c <_Per_CPU_Information+0xc>,%d0 49b5e: 6700 012e beqw 49c8e <_Thread_Dispatch+0x152> * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; 49b62: 7001 moveq #1,%d0 heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 49b64: 4207 clrb %d7 * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; 49b66: 2679 0006 1432 moveal 61432 <_Per_CPU_Information+0x12>,%a3 49b6c: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 49b72: 13c7 0006 142c moveb %d7,6142c <_Per_CPU_Information+0xc> _Thread_Executing = heir; 49b78: 23cb 0006 142e movel %a3,6142e <_Per_CPU_Information+0xe> /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 49b7e: b7ca cmpal %a2,%a3 49b80: 6700 010c beqw 49c8e <_Thread_Dispatch+0x152> 49b84: 2a0e movel %fp,%d5 49b86: 5185 subql #8,%d5 49b88: 4bf9 0004 8494 lea 48494 <_TOD_Get_with_nanoseconds>,%a5 #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); 49b8e: 2c3c 0004 ae94 movel #306836,%d6 */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 49b94: 7001 moveq #1,%d0 49b96: b0ab 0076 cmpl %a3@(118),%d0 49b9a: 6700 0126 beqw 49cc2 <_Thread_Dispatch+0x186> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 49b9e: 46c1 movew %d1,%sr */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); 49ba0: 4879 0006 0f90 pea 60f90 <_TOD+0x8> 49ba6: 2f05 movel %d5,%sp@- 49ba8: 4e95 jsr %a5@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 49baa: 2079 0006 1056 moveal 61056 <_Thread_libc_reent>,%a0 49bb0: 508f addql #8,%sp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 49bb2: 202e fff8 movel %fp@(-8),%d0 49bb6: 222e fffc movel %fp@(-4),%d1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 49bba: 2400 movel %d0,%d2 49bbc: 2601 movel %d1,%d3 49bbe: 2e39 0006 143a movel 6143a <_Per_CPU_Information+0x1a>,%d7 49bc4: 96b9 0006 143e subl 6143e <_Per_CPU_Information+0x1e>,%d3 49bca: 9587 subxl %d7,%d2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 49bcc: d7aa 0082 addl %d3,%a2@(130) 49bd0: 2e2a 007e movel %a2@(126),%d7 49bd4: df82 addxl %d2,%d7 49bd6: 2547 007e movel %d7,%a2@(126) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 49bda: 23c0 0006 143a movel %d0,6143a <_Per_CPU_Information+0x1a> 49be0: 23c1 0006 143e movel %d1,6143e <_Per_CPU_Information+0x1e> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 49be6: 4a88 tstl %a0 49be8: 6708 beqs 49bf2 <_Thread_Dispatch+0xb6> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 49bea: 2550 00f6 movel %a0@,%a2@(246) *_Thread_libc_reent = heir->libc_reent; 49bee: 20ab 00f6 movel %a3@(246),%a0@ */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 49bf2: 2879 0005 f898 moveal 5f898 <_User_extensions_Switches_list>,%a4 { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 49bf8: b9fc 0005 f89c cmpal #391324,%a4 49bfe: 6716 beqs 49c16 <_Thread_Dispatch+0xda> <== NEVER TAKEN const User_extensions_Switch_control *extension = (const User_extensions_Switch_control *) node; (*extension->thread_switch)( executing, heir ); 49c00: 2f0b movel %a3,%sp@- 49c02: 2f0a movel %a2,%sp@- 49c04: 206c 0008 moveal %a4@(8),%a0 49c08: 4e90 jsr %a0@ #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } 49c0a: 2854 moveal %a4@,%a4 { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 49c0c: 508f addql #8,%sp 49c0e: b9fc 0005 f89c cmpal #391324,%a4 49c14: 66ea bnes 49c00 <_Thread_Dispatch+0xc4> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 49c16: 486b 00be pea %a3@(190) 49c1a: 486a 00be pea %a2@(190) 49c1e: 4eb9 0004 ad2c jsr 4ad2c <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 49c24: 508f addql #8,%sp 49c26: 4aaa 00f2 tstl %a2@(242) 49c2a: 672a beqs 49c56 <_Thread_Dispatch+0x11a> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 49c2c: 2079 0006 1052 moveal 61052 <_Thread_Allocated_fp>,%a0 49c32: b1ca cmpal %a2,%a0 49c34: 6720 beqs 49c56 <_Thread_Dispatch+0x11a> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 49c36: 4a88 tstl %a0 49c38: 670c beqs 49c46 <_Thread_Dispatch+0x10a> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 49c3a: 4868 00f2 pea %a0@(242) 49c3e: 4eb9 0004 ae5c jsr 4ae5c <_CPU_Context_save_fp> 49c44: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 49c46: 486a 00f2 pea %a2@(242) 49c4a: 2046 moveal %d6,%a0 49c4c: 4e90 jsr %a0@ _Thread_Allocated_fp = executing; 49c4e: 588f addql #4,%sp 49c50: 23ca 0006 1052 movel %a2,61052 <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 49c56: 2479 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a2 _ISR_Disable( level ); 49c5c: 2004 movel %d4,%d0 49c5e: 40c1 movew %sr,%d1 49c60: 8081 orl %d1,%d0 49c62: 46c0 movew %d0,%sr /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 49c64: 1039 0006 142c moveb 6142c <_Per_CPU_Information+0xc>,%d0 49c6a: 6722 beqs 49c8e <_Thread_Dispatch+0x152> * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; 49c6c: 7001 moveq #1,%d0 heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 49c6e: 4207 clrb %d7 * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; 49c70: 2679 0006 1432 moveal 61432 <_Per_CPU_Information+0x12>,%a3 49c76: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 49c7c: 13c7 0006 142c moveb %d7,6142c <_Per_CPU_Information+0xc> _Thread_Executing = heir; 49c82: 23cb 0006 142e movel %a3,6142e <_Per_CPU_Information+0xe> /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 49c88: b5cb cmpal %a3,%a2 49c8a: 6600 ff08 bnew 49b94 <_Thread_Dispatch+0x58> 49c8e: 42b9 0006 0fe6 clrl 60fe6 <_Thread_Dispatch_disable_level> post_switch: #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 0 ); #endif _ISR_Enable( level ); 49c94: 46c1 movew %d1,%sr 49c96: 2679 0006 105a moveal 6105a <_API_extensions_Post_switch_list>,%a3 { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 49c9c: b7fc 0006 105e cmpal #397406,%a3 49ca2: 6714 beqs 49cb8 <_Thread_Dispatch+0x17c> const API_extensions_Post_switch_control *post_switch = (const API_extensions_Post_switch_control *) node; (*post_switch->hook)( executing ); 49ca4: 2f0a movel %a2,%sp@- 49ca6: 206b 0008 moveal %a3@(8),%a0 49caa: 4e90 jsr %a0@ #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } 49cac: 2653 moveal %a3@,%a3 { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 49cae: 588f addql #4,%sp 49cb0: b7fc 0006 105e cmpal #397406,%a3 49cb6: 66ec bnes 49ca4 <_Thread_Dispatch+0x168> <== NEVER TAKEN 49cb8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 49cbe: 4e5e unlk %fp 49cc0: 4e75 rts #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 49cc2: 41f9 0006 0f9e lea 60f9e <_Thread_Ticks_per_timeslice>,%a0 49cc8: 2750 0072 movel %a0@,%a3@(114) 49ccc: 6000 fed0 braw 49b9e <_Thread_Dispatch+0x62> =============================================================================== 0004edb4 <_Thread_Handler>: #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { 4edb4: 4e56 fff4 linkw %fp,#-12 4edb8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 4edbc: 2479 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a2 /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4edc2: 222a 00a4 movel %a2@(164),%d1 _ISR_Set_level(level); 4edc6: 40c0 movew %sr,%d0 4edc8: e189 lsll #8,%d1 4edca: 0280 0000 f8ff andil #63743,%d0 4edd0: 8081 orl %d1,%d0 4edd2: 46c0 movew %d0,%sr && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; doneConstructors = true; 4edd4: 7001 moveq #1,%d0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 4edd6: 1439 0006 07e4 moveb 607e4 ,%d2 doneConstructors = true; 4eddc: 13c0 0006 07e4 moveb %d0,607e4 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4ede2: 4aaa 00f2 tstl %a2@(242) 4ede6: 6720 beqs 4ee08 <_Thread_Handler+0x54> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 4ede8: 2079 0006 1052 moveal 61052 <_Thread_Allocated_fp>,%a0 4edee: b1ca cmpal %a2,%a0 4edf0: 6716 beqs 4ee08 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4edf2: 4a88 tstl %a0 4edf4: 670c beqs 4ee02 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4edf6: 4868 00f2 pea %a0@(242) 4edfa: 4eb9 0004 ae5c jsr 4ae5c <_CPU_Context_save_fp> 4ee00: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4ee02: 23ca 0006 1052 movel %a2,61052 <_Thread_Allocated_fp> ); } static inline void _User_extensions_Thread_begin( Thread_Control *executing ) { _User_extensions_Iterate( 4ee08: 4879 0004 a824 pea 4a824 <_User_extensions_Thread_begin_visitor> 4ee0e: 47f9 0004 a884 lea 4a884 <_User_extensions_Iterate>,%a3 4ee14: 2f0a movel %a2,%sp@- 4ee16: 4e93 jsr %a3@ _User_extensions_Thread_begin( executing ); /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4ee18: 4eb9 0004 9cd0 jsr 49cd0 <_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 (doCons) /* && (volatile void *)_init) */ { 4ee1e: 508f addql #8,%sp 4ee20: 4a02 tstb %d2 4ee22: 6726 beqs 4ee4a <_Thread_Handler+0x96> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4ee24: 202a 008e movel %a2@(142),%d0 4ee28: 672c beqs 4ee56 <_Thread_Handler+0xa2> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4ee2a: 7201 moveq #1,%d1 4ee2c: b280 cmpl %d0,%d1 4ee2e: 6750 beqs 4ee80 <_Thread_Handler+0xcc> <== ALWAYS TAKEN } } static inline void _User_extensions_Thread_exitted( Thread_Control *executing ) { _User_extensions_Iterate( 4ee30: 4879 0004 a83c pea 4a83c <_User_extensions_Thread_exitted_visitor><== NOT EXECUTED 4ee36: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ee38: 4e93 jsr %a3@ <== NOT EXECUTED * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); _Internal_error_Occurred( 4ee3a: 4878 0005 pea 5 <== NOT EXECUTED 4ee3e: 4878 0001 pea 1 <== NOT EXECUTED 4ee42: 42a7 clrl %sp@- <== NOT EXECUTED 4ee44: 4eb9 0004 8974 jsr 48974 <_Internal_error_Occurred> <== NOT EXECUTED * _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 (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4ee4a: 4eb9 0005 d72c jsr 5d72c <_init> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4ee50: 202a 008e movel %a2@(142),%d0 4ee54: 66d4 bnes 4ee2a <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4ee56: 2f2a 0096 movel %a2@(150),%sp@- 4ee5a: 206a 008a moveal %a2@(138),%a0 4ee5e: 4e90 jsr %a0@ #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4ee60: 588f addql #4,%sp 4ee62: 2540 0028 movel %d0,%a2@(40) 4ee66: 4879 0004 a83c pea 4a83c <_User_extensions_Thread_exitted_visitor> 4ee6c: 2f0a movel %a2,%sp@- 4ee6e: 4e93 jsr %a3@ * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); _Internal_error_Occurred( 4ee70: 4878 0005 pea 5 4ee74: 4878 0001 pea 1 4ee78: 42a7 clrl %sp@- 4ee7a: 4eb9 0004 8974 jsr 48974 <_Internal_error_Occurred> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4ee80: 2f2a 0092 movel %a2@(146),%sp@- 4ee84: 206a 008a moveal %a2@(138),%a0 4ee88: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4ee8a: 588f addql #4,%sp 4ee8c: 2540 0028 movel %d0,%a2@(40) 4ee90: 4879 0004 a83c pea 4a83c <_User_extensions_Thread_exitted_visitor> 4ee96: 2f0a movel %a2,%sp@- 4ee98: 4e93 jsr %a3@ * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); _Internal_error_Occurred( 4ee9a: 4878 0005 pea 5 <== NOT EXECUTED 4ee9e: 4878 0001 pea 1 <== NOT EXECUTED 4eea2: 42a7 clrl %sp@- <== NOT EXECUTED 4eea4: 4eb9 0004 8974 jsr 48974 <_Internal_error_Occurred> <== NOT EXECUTED ... =============================================================================== 00049fdc <_Thread_Handler_initialization>: #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { 49fdc: 4e56 0000 linkw %fp,#0 uint32_t ticks_per_timeslice = rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = rtems_configuration_get_maximum_extensions(); rtems_stack_allocate_init_hook stack_allocate_init_hook = 49fe0: 2079 0005 d978 moveal 5d978 ,%a0 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 49fe6: 4ab9 0005 d97c tstl 5d97c 49fec: 6772 beqs 4a060 <_Thread_Handler_initialization+0x84><== NEVER TAKEN 49fee: 4ab9 0005 d980 tstl 5d980 49ff4: 676a beqs 4a060 <_Thread_Handler_initialization+0x84> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 49ff6: 4a88 tstl %a0 49ff8: 670a beqs 4a004 <_Thread_Handler_initialization+0x28> (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 49ffa: 2f39 0005 d958 movel 5d958 ,%sp@- 4a000: 4e90 jsr %a0@ 4a002: 588f addql #4,%sp #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 4a004: 4878 0008 pea 8 _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Maximum_extensions = maximum_extensions; 4a008: 41f9 0005 d95c lea 5d95c ,%a0 4a00e: 23d0 0006 1066 movel %a0@,61066 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 4a014: 41f9 0005 d968 lea 5d968 ,%a0 4a01a: 23d0 0006 0f9e movel %a0@,60f9e <_Thread_Ticks_per_timeslice> ); if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; 4a020: 4200 clrb %d0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 4a022: 42a7 clrl %sp@- 4a024: 4878 010a pea 10a 4a028: 4878 0001 pea 1 4a02c: 4878 0001 pea 1 4a030: 4878 0001 pea 1 4a034: 4879 0006 10d4 pea 610d4 <_Thread_Internal_information> ); if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; 4a03a: 13c0 0006 142c moveb %d0,6142c <_Per_CPU_Information+0xc> _Thread_Executing = NULL; 4a040: 42b9 0006 142e clrl 6142e <_Per_CPU_Information+0xe> _Thread_Heir = NULL; 4a046: 42b9 0006 1432 clrl 61432 <_Per_CPU_Information+0x12> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 4a04c: 42b9 0006 1052 clrl 61052 <_Thread_Allocated_fp> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 4a052: 4eb9 0004 8f9c jsr 48f9c <_Objects_Initialize_information> 4a058: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4a05c: 4e5e unlk %fp 4a05e: 4e75 rts _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 4a060: 4878 000e pea e 4a064: 4878 0001 pea 1 4a068: 42a7 clrl %sp@- 4a06a: 4eb9 0004 8974 jsr 48974 <_Internal_error_Occurred> =============================================================================== 00049d8c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 49d8c: 4e56 ffd8 linkw %fp,#-40 49d90: 202e 0010 movel %fp@(16),%d0 49d94: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ 49d98: 246e 000c moveal %fp@(12),%a2 49d9c: 266e 001c moveal %fp@(28),%a3 49da0: 282e 0024 movel %fp@(36),%d4 49da4: 142e 001b moveb %fp@(27),%d2 49da8: 1c2e 0023 moveb %fp@(35),%d6 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 49dac: 42aa 00fa clrl %a2@(250) 49db0: 42aa 00fe clrl %a2@(254) extensions_area = NULL; the_thread->libc_reent = NULL; 49db4: 42aa 00f6 clrl %a2@(246) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 49db8: 4a80 tstl %d0 49dba: 6700 01b6 beqw 49f72 <_Thread_Initialize+0x1e6> 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; 49dbe: 222e 0014 movel %fp@(20),%d1 49dc2: 4207 clrb %d7 49dc4: 1547 00ac moveb %d7,%a2@(172) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 49dc8: 2540 00b2 movel %d0,%a2@(178) the_stack->size = size; 49dcc: 2541 00ae movel %d1,%a2@(174) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 49dd0: 4a02 tstb %d2 49dd2: 6600 011c bnew 49ef0 <_Thread_Initialize+0x164> extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 49dd6: 4283 clrl %d3 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 49dd8: 2039 0006 1066 movel 61066 <_Thread_Maximum_extensions>,%d0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 49dde: 2543 00f2 movel %d3,%a2@(242) the_thread->Start.fp_context = fp_area; 49de2: 2543 00b6 movel %d3,%a2@(182) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 49de6: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 49dea: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 49dee: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 49df2: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 49df6: 4a80 tstl %d0 49df8: 6600 0140 bnew 49f3a <_Thread_Initialize+0x1ae> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 49dfc: 42aa 0102 clrl %a2@(258) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 49e00: 4285 clrl %d5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 49e02: 2544 009c movel %d4,%a2@(156) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 49e06: 7002 moveq #2,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 49e08: 1546 009a moveb %d6,%a2@(154) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 49e0c: 256e 0028 00a0 movel %fp@(40),%a2@(160) switch ( budget_algorithm ) { 49e12: b084 cmpl %d4,%d0 49e14: 6700 00c0 beqw 49ed6 <_Thread_Initialize+0x14a> #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 49e18: 7001 moveq #1,%d0 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 49e1a: 256e 002c 00a4 movel %fp@(44),%a2@(164) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 49e20: 2079 0005 f788 moveal 5f788 <_Scheduler+0x18>,%a0 the_thread->current_state = STATES_DORMANT; 49e26: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 49e2a: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 49e2e: 42aa 001c clrl %a2@(28) the_thread->real_priority = priority; 49e32: 254b 0018 movel %a3,%a2@(24) the_thread->Start.initial_priority = priority; 49e36: 254b 00a8 movel %a3,%a2@(168) 49e3a: 2f0a movel %a2,%sp@- 49e3c: 4e90 jsr %a0@ sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 49e3e: 588f addql #4,%sp 49e40: 2400 movel %d0,%d2 49e42: 6756 beqs 49e9a <_Thread_Initialize+0x10e> goto failed; _Thread_Set_priority( the_thread, priority ); 49e44: 2f0b movel %a3,%sp@- static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 49e46: 4286 clrl %d6 49e48: 4287 clrl %d7 49e4a: 2f0a movel %a2,%sp@- 49e4c: 4eb9 0004 a5e8 jsr 4a5e8 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 49e52: 206e 0008 moveal %fp@(8),%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 49e56: 202a 0008 movel %a2@(8),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 49e5a: 2068 0018 moveal %a0@(24),%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 49e5e: 0280 0000 ffff andil #65535,%d0 49e64: 2546 007e movel %d6,%a2@(126) 49e68: 2547 0082 movel %d7,%a2@(130) * @{ */ static inline bool _User_extensions_Thread_create( Thread_Control *created ) { User_extensions_Thread_create_context ctx = { created, true }; 49e6c: 7e01 moveq #1,%d7 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 49e6e: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) _User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor ); 49e72: 4879 0004 a7a4 pea 4a7a4 <_User_extensions_Thread_create_visitor> 49e78: 486e fffa pea %fp@(-6) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 49e7c: 256e 0030 000c movel %fp@(48),%a2@(12) * @{ */ static inline bool _User_extensions_Thread_create( Thread_Control *created ) { User_extensions_Thread_create_context ctx = { created, true }; 49e82: 1d47 fffe moveb %d7,%fp@(-2) 49e86: 2d4a fffa movel %a2,%fp@(-6) _User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor ); 49e8a: 4eb9 0004 a884 jsr 4a884 <_User_extensions_Iterate> * 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 ); if ( extension_status ) 49e90: 4fef 0010 lea %sp@(16),%sp 49e94: 4a2e fffe tstb %fp@(-2) 49e98: 664a bnes 49ee4 <_Thread_Initialize+0x158> return true; failed: _Workspace_Free( the_thread->libc_reent ); 49e9a: 2f2a 00f6 movel %a2@(246),%sp@- 49e9e: 47f9 0004 acdc lea 4acdc <_Workspace_Free>,%a3 49ea4: 4e93 jsr %a3@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 49ea6: 2f2a 00fa movel %a2@(250),%sp@- 49eaa: 4e93 jsr %a3@ 49eac: 2f2a 00fe movel %a2@(254),%sp@- 49eb0: 4e93 jsr %a3@ _Workspace_Free( extensions_area ); 49eb2: 2f05 movel %d5,%sp@- 49eb4: 4e93 jsr %a3@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 49eb6: 2f03 movel %d3,%sp@- 49eb8: 4e93 jsr %a3@ #endif _Workspace_Free( sched ); 49eba: 2f02 movel %d2,%sp@- 49ebc: 4e93 jsr %a3@ _Thread_Stack_Free( the_thread ); 49ebe: 2f0a movel %a2,%sp@- 49ec0: 4eb9 0004 a6d0 jsr 4a6d0 <_Thread_Stack_Free> return false; 49ec6: 4fef 001c lea %sp@(28),%sp 49eca: 4200 clrb %d0 } 49ecc: 4cee 0cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a3 49ed2: 4e5e unlk %fp 49ed4: 4e75 rts case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 49ed6: 41f9 0006 0f9e lea 60f9e <_Thread_Ticks_per_timeslice>,%a0 49edc: 2550 0072 movel %a0@,%a2@(114) break; 49ee0: 6000 ff36 braw 49e18 <_Thread_Initialize+0x8c> _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 49ee4: 4cee 0cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a3 * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 49eea: 7001 moveq #1,%d0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 49eec: 4e5e unlk %fp 49eee: 4e75 rts /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 49ef0: 4878 001c pea 1c 49ef4: 4eb9 0004 acc0 jsr 4acc0 <_Workspace_Allocate> if ( !fp_area ) 49efa: 588f addql #4,%sp /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 49efc: 2600 movel %d0,%d3 if ( !fp_area ) 49efe: 6600 fed8 bnew 49dd8 <_Thread_Initialize+0x4c> extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 49f02: 2f2a 00f6 movel %a2@(246),%sp@- 49f06: 47f9 0004 acdc lea 4acdc <_Workspace_Free>,%a3 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 49f0c: 4285 clrl %d5 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 49f0e: 4282 clrl %d2 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 49f10: 4e93 jsr %a3@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 49f12: 2f2a 00fa movel %a2@(250),%sp@- 49f16: 4e93 jsr %a3@ 49f18: 2f2a 00fe movel %a2@(254),%sp@- 49f1c: 4e93 jsr %a3@ _Workspace_Free( extensions_area ); 49f1e: 2f05 movel %d5,%sp@- 49f20: 4e93 jsr %a3@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 49f22: 2f03 movel %d3,%sp@- 49f24: 4e93 jsr %a3@ #endif _Workspace_Free( sched ); 49f26: 2f02 movel %d2,%sp@- 49f28: 4e93 jsr %a3@ _Thread_Stack_Free( the_thread ); 49f2a: 2f0a movel %a2,%sp@- 49f2c: 4eb9 0004 a6d0 jsr 4a6d0 <_Thread_Stack_Free> return false; 49f32: 4fef 001c lea %sp@(28),%sp 49f36: 4200 clrb %d0 49f38: 6092 bras 49ecc <_Thread_Initialize+0x140> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 49f3a: e588 lsll #2,%d0 49f3c: 2040 moveal %d0,%a0 49f3e: 4868 0004 pea %a0@(4) 49f42: 4eb9 0004 acc0 jsr 4acc0 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 49f48: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 49f4a: 2a00 movel %d0,%d5 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 49f4c: 6756 beqs 49fa4 <_Thread_Initialize+0x218> 49f4e: 2439 0006 1066 movel 61066 <_Thread_Maximum_extensions>,%d2 goto failed; } the_thread->extensions = (void **) extensions_area; 49f54: 2240 moveal %d0,%a1 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 49f56: 91c8 subal %a0,%a0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 49f58: 4281 clrl %d1 49f5a: 2540 0102 movel %d0,%a2@(258) * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 49f5e: 42b1 8c00 clrl %a1@(00000000,%a0:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 49f62: 5281 addql #1,%d1 49f64: 2041 moveal %d1,%a0 49f66: b481 cmpl %d1,%d2 49f68: 6500 fe98 bcsw 49e02 <_Thread_Initialize+0x76> 49f6c: 226a 0102 moveal %a2@(258),%a1 49f70: 60ec bras 49f5e <_Thread_Initialize+0x1d2> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 49f72: 2f2e 0014 movel %fp@(20),%sp@- 49f76: 2f0a movel %a2,%sp@- 49f78: 4eb9 0004 a694 jsr 4a694 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 49f7e: 508f addql #8,%sp return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 49f80: 2200 movel %d0,%d1 if ( !actual_stack_size || actual_stack_size < stack_size ) 49f82: 6714 beqs 49f98 <_Thread_Initialize+0x20c> 49f84: b0ae 0014 cmpl %fp@(20),%d0 49f88: 650e bcss 49f98 <_Thread_Initialize+0x20c> <== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 49f8a: 202a 00ba movel %a2@(186),%d0 the_thread->Start.core_allocated_stack = true; 49f8e: 7601 moveq #1,%d3 49f90: 1543 00ac moveb %d3,%a2@(172) 49f94: 6000 fe32 braw 49dc8 <_Thread_Initialize+0x3c> _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 49f98: 4cee 0cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a3 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 49f9e: 4200 clrb %d0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 49fa0: 4e5e unlk %fp 49fa2: 4e75 rts extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 49fa4: 2f2a 00f6 movel %a2@(246),%sp@- 49fa8: 47f9 0004 acdc lea 4acdc <_Workspace_Free>,%a3 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 49fae: 4282 clrl %d2 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 49fb0: 4e93 jsr %a3@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 49fb2: 2f2a 00fa movel %a2@(250),%sp@- 49fb6: 4e93 jsr %a3@ 49fb8: 2f2a 00fe movel %a2@(254),%sp@- 49fbc: 4e93 jsr %a3@ _Workspace_Free( extensions_area ); 49fbe: 2f05 movel %d5,%sp@- 49fc0: 4e93 jsr %a3@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 49fc2: 2f03 movel %d3,%sp@- 49fc4: 4e93 jsr %a3@ #endif _Workspace_Free( sched ); 49fc6: 2f02 movel %d2,%sp@- 49fc8: 4e93 jsr %a3@ _Thread_Stack_Free( the_thread ); 49fca: 2f0a movel %a2,%sp@- 49fcc: 4eb9 0004 a6d0 jsr 4a6d0 <_Thread_Stack_Free> return false; 49fd2: 4fef 001c lea %sp@(28),%sp 49fd6: 4200 clrb %d0 49fd8: 6000 fef2 braw 49ecc <_Thread_Initialize+0x140> =============================================================================== 0004df54 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4df54: 4e56 0000 linkw %fp,#0 4df58: 2f0a movel %a2,%sp@- 4df5a: 246e 0008 moveal %fp@(8),%a2 the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4df5e: 256a 009c 0076 movel %a2@(156),%a2@(118) the_thread->budget_callout = the_thread->Start.budget_callout; 4df64: 256a 00a0 007a movel %a2@(160),%a2@(122) the_thread->Start.pointer_argument = pointer_argument; 4df6a: 256e 000c 0092 movel %fp@(12),%a2@(146) the_thread->Start.numeric_argument = numeric_argument; 4df70: 256e 0010 0096 movel %fp@(16),%a2@(150) void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4df76: 156a 009a 0070 moveb %a2@(154),%a2@(112) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4df7c: 42aa 001c clrl %a2@(28) the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4df80: 2f0a movel %a2,%sp@- 4df82: 4eb9 0004 acd8 jsr 4acd8 <_Thread_queue_Extract_with_proxy> 4df88: 588f addql #4,%sp 4df8a: 4a00 tstb %d0 4df8c: 6608 bnes 4df96 <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4df8e: 7002 moveq #2,%d0 4df90: b0aa 0050 cmpl %a2@(80),%d0 4df94: 672a beqs 4dfc0 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4df96: 202a 00a8 movel %a2@(168),%d0 4df9a: b0aa 0014 cmpl %a2@(20),%d0 4df9e: 6718 beqs 4dfb8 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; 4dfa0: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4dfa4: 2d4a 0008 movel %a2,%fp@(8) } } 4dfa8: 246e fffc moveal %fp@(-4),%a2 (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4dfac: 2d40 000c movel %d0,%fp@(12) } } 4dfb0: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4dfb2: 4ef9 0004 af0c jmp 4af0c <_Thread_Set_priority> } } 4dfb8: 246e fffc moveal %fp@(-4),%a2 4dfbc: 4e5e unlk %fp 4dfbe: 4e75 rts the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4dfc0: 486a 0048 pea %a2@(72) 4dfc4: 4eb9 0004 b3c4 jsr 4b3c4 <_Watchdog_Remove> 4dfca: 588f addql #4,%sp 4dfcc: 60c8 bras 4df96 <_Thread_Reset+0x42> ... =============================================================================== 0004ae7c <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 4ae7c: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4ae7e: 4e56 0000 linkw %fp,#0 4ae82: 2f0a movel %a2,%sp@- 4ae84: 246e 0008 moveal %fp@(8),%a2 4ae88: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 4ae8c: 670a beqs 4ae98 <_Thread_Restart+0x1c> _Thread_Restart_self(); return true; } return false; 4ae8e: 4200 clrb %d0 } 4ae90: 246e fffc moveal %fp@(-4),%a2 4ae94: 4e5e unlk %fp 4ae96: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 4ae98: 2f0a movel %a2,%sp@- 4ae9a: 4eb9 0004 af70 jsr 4af70 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 4aea0: 2f2e 0010 movel %fp@(16),%sp@- 4aea4: 2f2e 000c movel %fp@(12),%sp@- 4aea8: 2f0a movel %a2,%sp@- 4aeaa: 4eb9 0004 df54 jsr 4df54 <_Thread_Reset> _Thread_Load_environment( the_thread ); 4aeb0: 2f0a movel %a2,%sp@- 4aeb2: 4eb9 0004 dc58 jsr 4dc58 <_Thread_Load_environment> _Thread_Ready( the_thread ); 4aeb8: 2f0a movel %a2,%sp@- 4aeba: 4eb9 0004 df24 jsr 4df24 <_Thread_Ready> ); } static inline void _User_extensions_Thread_restart( Thread_Control *restarted ) { _User_extensions_Iterate( 4aec0: 4879 0004 b130 pea 4b130 <_User_extensions_Thread_restart_visitor> 4aec6: 2f0a movel %a2,%sp@- 4aec8: 4eb9 0004 b1a8 jsr 4b1a8 <_User_extensions_Iterate> _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) 4aece: 4fef 0020 lea %sp@(32),%sp _Thread_Restart_self(); return true; 4aed2: 7001 moveq #1,%d0 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) 4aed4: b5f9 0006 1f86 cmpal 61f86 <_Per_CPU_Information+0xe>,%a2 4aeda: 66b4 bnes 4ae90 <_Thread_Restart+0x14> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 4aedc: 4aaa 00f2 tstl %a2@(242) 4aee0: 6712 beqs 4aef4 <_Thread_Restart+0x78> _Context_Restore_fp( &_Thread_Executing->fp_context ); 4aee2: 486a 00f2 pea %a2@(242) 4aee6: 4eb9 0004 b7b8 jsr 4b7b8 <_CPU_Context_restore_fp> 4aeec: 2479 0006 1f86 moveal 61f86 <_Per_CPU_Information+0xe>,%a2 4aef2: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 4aef4: 486a 00be pea %a2@(190) 4aef8: 4eb9 0004 b666 jsr 4b666 <_CPU_Context_Restart_self> return true; } return false; } 4aefe: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4af02: 588f addql #4,%sp <== NOT EXECUTED 4af04: 4e5e unlk %fp <== NOT EXECUTED _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4af06: 7001 moveq #1,%d0 <== NOT EXECUTED } return false; } ... =============================================================================== 0004a6d0 <_Thread_Stack_Free>: #include void _Thread_Stack_Free( Thread_Control *the_thread ) { 4a6d0: 4e56 0000 linkw %fp,#0 4a6d4: 206e 0008 moveal %fp@(8),%a0 #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 4a6d8: 4a28 00ac tstb %a0@(172) 4a6dc: 6604 bnes 4a6e2 <_Thread_Stack_Free+0x12> <== ALWAYS TAKEN * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ (*stack_free_hook)( the_thread->Start.Initial_stack.area ); } 4a6de: 4e5e unlk %fp <== NOT EXECUTED 4a6e0: 4e75 rts <== NOT EXECUTED * 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. */ (*stack_free_hook)( the_thread->Start.Initial_stack.area ); 4a6e2: 2279 0005 d980 moveal 5d980 ,%a1 4a6e8: 2d68 00b2 0008 movel %a0@(178),%fp@(8) } 4a6ee: 4e5e unlk %fp * 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. */ (*stack_free_hook)( the_thread->Start.Initial_stack.area ); 4a6f0: 4ed1 jmp %a1@ ... =============================================================================== 00049784 <_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 ) ) { 49784: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 49786: 4e56 0000 linkw %fp,#0 4978a: 202e 0010 movel %fp@(16),%d0 4978e: 2f0a movel %a2,%sp@- 49790: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 49794: 42aa 0044 clrl %a2@(68) /* * 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 ) ) { 49798: b2aa 0050 cmpl %a2@(80),%d1 4979c: 671c beqs 497ba <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4979e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 497a0: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 497a4: 246e fffc moveal %fp@(-4),%a2 497a8: 203c 1007 fff8 movel #268959736,%d0 497ae: 2d40 000c movel %d0,%fp@(12) 497b2: 4e5e unlk %fp 497b4: 4ef9 0004 98d0 jmp 498d0 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 497ba: 123c 0003 moveb #3,%d1 497be: 2541 0050 movel %d1,%a2@(80) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 497c2: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 497c4: 486a 0048 pea %a2@(72) 497c8: 4eb9 0004 aaa0 jsr 4aaa0 <_Watchdog_Remove> 497ce: 588f addql #4,%sp 497d0: 203c 1007 fff8 movel #268959736,%d0 497d6: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 497da: 246e fffc moveal %fp@(-4),%a2 497de: 2d40 000c movel %d0,%fp@(12) 497e2: 4e5e unlk %fp 497e4: 4ef9 0004 98d0 jmp 498d0 <_Thread_Clear_state> ... =============================================================================== 0004a0ec <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4a0ec: 203c 0000 0700 movel #1792,%d0 #include Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4a0f2: 4e56 ffe8 linkw %fp,#-24 4a0f6: 226e 0008 moveal %fp@(8),%a1 4a0fa: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4a0fe: 40c3 movew %sr,%d3 4a100: 8083 orl %d3,%d0 4a102: 46c0 movew %d0,%sr for( index=0 ; 4a104: 4281 clrl %d1 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 4a106: 2401 movel %d1,%d2 4a108: 2001 movel %d1,%d0 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 4a10a: 5281 addql #1,%d1 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 4a10c: e58a lsll #2,%d2 4a10e: e988 lsll #4,%d0 4a110: 9082 subl %d2,%d0 4a112: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 4a116: 2458 moveal %a0@+,%a2 4a118: b1ca cmpal %a2,%a0 4a11a: 6616 bnes 4a132 <_Thread_queue_Dequeue_priority+0x46> Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 4a11c: 7004 moveq #4,%d0 4a11e: b081 cmpl %d1,%d0 4a120: 66e4 bnes 4a106 <_Thread_queue_Dequeue_priority+0x1a> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 4a122: 46c3 movew %d3,%sr return NULL; 4a124: 95ca subal %a2,%a2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4a126: 200a movel %a2,%d0 4a128: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a12e: 4e5e unlk %fp 4a130: 4e75 rts RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4a132: 200a movel %a2,%d0 4a134: 0680 0000 003c addil #60,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a13a: 206a 0038 moveal %a2@(56),%a0 dequeue: the_thread->Wait.queue = NULL; new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 4a13e: 2252 moveal %a2@,%a1 previous_node = the_thread->Object.Node.previous; 4a140: 266a 0004 moveal %a2@(4),%a3 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 4a144: 42aa 0044 clrl %a2@(68) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4a148: b088 cmpl %a0,%d0 4a14a: 6700 008a beqw 4a1d6 <_Thread_queue_Dequeue_priority+0xea> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4a14e: 286a 0040 moveal %a2@(64),%a4 last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4a152: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4a154: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 4a158: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4a15a: 214b 0004 movel %a3,%a0@(4) last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4a15e: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4a160: 226a 0040 moveal %a2@(64),%a1 4a164: b3ea 0038 cmpal %a2@(56),%a1 4a168: 6716 beqs 4a180 <_Thread_queue_Dequeue_priority+0x94> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4a16a: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4a16e: 43e8 003c lea %a0@(60),%a1 4a172: 2889 movel %a1,%a4@ 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 */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 4a174: 43e8 0038 lea %a0@(56),%a1 4a178: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 4a17c: 214c 0040 movel %a4,%a0@(64) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4a180: 7002 moveq #2,%d0 4a182: b0aa 0050 cmpl %a2@(80),%d0 4a186: 671e beqs 4a1a6 <_Thread_queue_Dequeue_priority+0xba> _ISR_Enable( level ); 4a188: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4a18a: 2f3c 1007 fff8 movel #268959736,%sp@- 4a190: 2f0a movel %a2,%sp@- 4a192: 4eb9 0004 98d0 jsr 498d0 <_Thread_Clear_state> 4a198: 508f addql #8,%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4a19a: 200a movel %a2,%d0 4a19c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a1a2: 4e5e unlk %fp 4a1a4: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4a1a6: 7003 moveq #3,%d0 4a1a8: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4a1ac: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4a1ae: 486a 0048 pea %a2@(72) 4a1b2: 4eb9 0004 aaa0 jsr 4aaa0 <_Watchdog_Remove> 4a1b8: 2f3c 1007 fff8 movel #268959736,%sp@- 4a1be: 2f0a movel %a2,%sp@- 4a1c0: 4eb9 0004 98d0 jsr 498d0 <_Thread_Clear_state> 4a1c6: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4a1ca: 200a movel %a2,%d0 4a1cc: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a1d2: 4e5e unlk %fp 4a1d4: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 4a1d6: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4a1d8: 234b 0004 movel %a3,%a1@(4) 4a1dc: 60a2 bras 4a180 <_Thread_queue_Dequeue_priority+0x94> ... =============================================================================== 0004a28c <_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 ) { 4a28c: 4e56 ffe0 linkw %fp,#-32 4a290: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4a294: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4a298: 45eb 0038 lea %a3@(56),%a2 Chain_Node *tail = _Chain_Tail( the_chain ); 4a29c: 41eb 003c lea %a3@(60),%a0 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 4a2a0: 222b 0014 movel %a3@(20),%d1 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 4a2a4: 2001 movel %d1,%d0 4a2a6: ec88 lsrl #6,%d0 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 4a2a8: 2400 movel %d0,%d2 4a2aa: e988 lsll #4,%d0 4a2ac: e58a lsll #2,%d2 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4a2ae: 286e 0008 moveal %fp@(8),%a4 _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 ]; 4a2b2: 9082 subl %d2,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4a2b4: 274a 0040 movel %a2,%a3@(64) block_state = the_thread_queue->state; 4a2b8: 242c 0038 movel %a4@(56),%d2 _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 ]; 4a2bc: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 Chain_Node *tail = _Chain_Tail( the_chain ); 4a2c0: 2748 0038 movel %a0,%a3@(56) head->next = tail; head->previous = NULL; 4a2c4: 42ab 003c clrl %a3@(60) block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 4a2c8: 0801 0005 btst #5,%d1 4a2cc: 6656 bnes 4a324 <_Thread_queue_Enqueue_priority+0x98> 4a2ce: 2c0a movel %a2,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 4a2d0: 2a3c 0000 0700 movel #1792,%d5 4a2d6: 5886 addql #4,%d6 4a2d8: 2005 movel %d5,%d0 4a2da: 40c3 movew %sr,%d3 4a2dc: 8083 orl %d3,%d0 4a2de: 46c0 movew %d0,%sr 4a2e0: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a2e2: 2052 moveal %a2@,%a0 search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4a2e4: bc88 cmpl %a0,%d6 4a2e6: 6700 0148 beqw 4a430 <_Thread_queue_Enqueue_priority+0x1a4> search_priority = search_thread->current_priority; 4a2ea: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 4a2ee: b3c1 cmpal %d1,%a1 4a2f0: 6418 bccs 4a30a <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4a2f2: 2005 movel %d5,%d0 4a2f4: 46c3 movew %d3,%sr 4a2f6: 8083 orl %d3,%d0 4a2f8: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 4a2fa: 2002 movel %d2,%d0 4a2fc: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4a300: 6700 0092 beqw 4a394 <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = 4a304: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4a306: bc88 cmpl %a0,%d6 4a308: 66e0 bnes 4a2ea <_Thread_queue_Enqueue_priority+0x5e> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4a30a: 202c 0030 movel %a4@(48),%d0 4a30e: 7401 moveq #1,%d2 4a310: b480 cmpl %d0,%d2 4a312: 6700 00b6 beqw 4a3ca <_Thread_queue_Enqueue_priority+0x13e> * 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; 4a316: 206e 0010 moveal %fp@(16),%a0 4a31a: 2084 movel %d4,%a0@ return the_thread_queue->sync_state; } 4a31c: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4a320: 4e5e unlk %fp 4a322: 4e75 rts return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4a324: 2a3c 0000 0700 movel #1792,%d5 4a32a: 2005 movel %d5,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4a32c: 1c39 0005 f6ec moveb 5f6ec ,%d6 _ISR_Disable( level ); 4a332: 40c3 movew %sr,%d3 4a334: 8083 orl %d3,%d0 4a336: 46c0 movew %d0,%sr 4a338: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4a33a: 206a 0008 moveal %a2@(8),%a0 search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4a33e: b5c8 cmpal %a0,%a2 4a340: 6700 00d4 beqw 4a416 <_Thread_queue_Enqueue_priority+0x18a> search_priority = search_thread->current_priority; 4a344: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 4a348: b3c1 cmpal %d1,%a1 4a34a: 6318 blss 4a364 <_Thread_queue_Enqueue_priority+0xd8> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4a34c: 2005 movel %d5,%d0 4a34e: 46c3 movew %d3,%sr 4a350: 8083 orl %d3,%d0 4a352: 46c0 movew %d0,%sr 4a354: 2002 movel %d2,%d0 4a356: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4a35a: 6750 beqs 4a3ac <_Thread_queue_Enqueue_priority+0x120> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4a35c: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4a360: b5c8 cmpal %a0,%a2 4a362: 66e0 bnes 4a344 <_Thread_queue_Enqueue_priority+0xb8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4a364: 202c 0030 movel %a4@(48),%d0 4a368: 7401 moveq #1,%d2 4a36a: b480 cmpl %d0,%d2 4a36c: 66a8 bnes 4a316 <_Thread_queue_Enqueue_priority+0x8a><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4a36e: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 4a372: b3c1 cmpal %d1,%a1 4a374: 677c beqs 4a3f2 <_Thread_queue_Enqueue_priority+0x166> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4a376: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4a378: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 4a37c: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 4a37e: 234b 0004 movel %a3,%a1@(4) 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; 4a382: 208b movel %a3,%a0@ next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4a384: 274c 0044 movel %a4,%a3@(68) _ISR_Enable( level ); 4a388: 46c3 movew %d3,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4a38a: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4a38c: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4a390: 4e5e unlk %fp 4a392: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 4a394: 46c3 movew %d3,%sr if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 4a396: 2005 movel %d5,%d0 4a398: 40c3 movew %sr,%d3 4a39a: 8083 orl %d3,%d0 4a39c: 46c0 movew %d0,%sr 4a39e: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a3a0: 2052 moveal %a2@,%a0 search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4a3a2: bc88 cmpl %a0,%d6 4a3a4: 6600 ff44 bnew 4a2ea <_Thread_queue_Enqueue_priority+0x5e> 4a3a8: 6000 0086 braw 4a430 <_Thread_queue_Enqueue_priority+0x1a4> if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 4a3ac: 46c3 movew %d3,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4a3ae: 2005 movel %d5,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4a3b0: 1c39 0005 f6ec moveb 5f6ec ,%d6 _ISR_Disable( level ); 4a3b6: 40c3 movew %sr,%d3 4a3b8: 8083 orl %d3,%d0 4a3ba: 46c0 movew %d0,%sr 4a3bc: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4a3be: 206a 0008 moveal %a2@(8),%a0 search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4a3c2: b5c8 cmpal %a0,%a2 4a3c4: 6600 ff7e bnew 4a344 <_Thread_queue_Enqueue_priority+0xb8> 4a3c8: 604c bras 4a416 <_Thread_queue_Enqueue_priority+0x18a> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4a3ca: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 4a3ce: b3c1 cmpal %d1,%a1 4a3d0: 6720 beqs 4a3f2 <_Thread_queue_Enqueue_priority+0x166> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 4a3d2: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4a3d6: 2688 movel %a0,%a3@ the_node->previous = previous_node; 4a3d8: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; 4a3dc: 228b movel %a3,%a1@ search_node->previous = the_node; 4a3de: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; 4a3e2: 274c 0044 movel %a4,%a3@(68) _ISR_Enable( level ); 4a3e6: 46c3 movew %d3,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4a3e8: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4a3ea: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4a3ee: 4e5e unlk %fp 4a3f0: 4e75 rts _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 4a3f2: 2268 0040 moveal %a0@(64),%a1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 4a3f6: 45e8 003c lea %a0@(60),%a2 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 4a3fa: 2749 0004 movel %a1,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 4a3fe: 268a movel %a2,%a3@ the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; 4a400: 214b 0040 movel %a3,%a0@(64) 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; 4a404: 228b movel %a3,%a1@ search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4a406: 274c 0044 movel %a4,%a3@(68) _ISR_Enable( level ); 4a40a: 46c4 movew %d4,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4a40c: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4a40e: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4a412: 4e5e unlk %fp 4a414: 4e75 rts } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4a416: 202c 0030 movel %a4@(48),%d0 4a41a: 7401 moveq #1,%d2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4a41c: 0286 0000 00ff andil #255,%d6 4a422: 2246 moveal %d6,%a1 4a424: 5289 addql #1,%a1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4a426: b480 cmpl %d0,%d2 4a428: 6600 feec bnew 4a316 <_Thread_queue_Enqueue_priority+0x8a> 4a42c: 6000 ff40 braw 4a36e <_Thread_queue_Enqueue_priority+0xe2> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4a430: 202c 0030 movel %a4@(48),%d0 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 4a434: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4a438: 7401 moveq #1,%d2 4a43a: b480 cmpl %d0,%d2 4a43c: 6600 fed8 bnew 4a316 <_Thread_queue_Enqueue_priority+0x8a> 4a440: 6088 bras 4a3ca <_Thread_queue_Enqueue_priority+0x13e> ... =============================================================================== 0004eeac <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4eeac: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4eeb2: 4e56 0000 linkw %fp,#0 4eeb6: 2f0a movel %a2,%sp@- 4eeb8: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4eebc: 40c1 movew %sr,%d1 4eebe: 8081 orl %d1,%d0 4eec0: 46c0 movew %d0,%sr 4eec2: 202a 0010 movel %a2@(16),%d0 4eec6: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4eecc: 6734 beqs 4ef02 <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4eece: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4eed0: 7002 moveq #2,%d0 previous = the_node->previous; 4eed2: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4eed6: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4eeda: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4eedc: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4eee0: b0aa 0050 cmpl %a2@(80),%d0 4eee4: 6726 beqs 4ef0c <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4eee6: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4eee8: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4eeec: 246e fffc moveal %fp@(-4),%a2 4eef0: 203c 1007 fff8 movel #268959736,%d0 4eef6: 2d40 000c movel %d0,%fp@(12) 4eefa: 4e5e unlk %fp 4eefc: 4ef9 0004 98d0 jmp 498d0 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4ef02: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4ef04: 246e fffc moveal %fp@(-4),%a2 4ef08: 4e5e unlk %fp 4ef0a: 4e75 rts 4ef0c: 7003 moveq #3,%d0 4ef0e: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4ef12: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4ef14: 486a 0048 pea %a2@(72) 4ef18: 4eb9 0004 aaa0 jsr 4aaa0 <_Watchdog_Remove> 4ef1e: 588f addql #4,%sp 4ef20: 203c 1007 fff8 movel #268959736,%d0 4ef26: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4ef2a: 246e fffc moveal %fp@(-4),%a2 4ef2e: 2d40 000c movel %d0,%fp@(12) 4ef32: 4e5e unlk %fp 4ef34: 4ef9 0004 98d0 jmp 498d0 <_Thread_Clear_state> ... =============================================================================== 0004d4d4 <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4d4d4: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4d4da: 4e56 ffec linkw %fp,#-20 4d4de: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d4e2: 246e 000c moveal %fp@(12),%a2 4d4e6: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4d4ea: 40c1 movew %sr,%d1 4d4ec: 8081 orl %d1,%d0 4d4ee: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 4d4f0: 202a 0010 movel %a2@(16),%d0 4d4f4: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4d4fa: 6772 beqs 4d56e <_Thread_queue_Extract_priority_helper+0x9a> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4d4fc: 200a movel %a2,%d0 4d4fe: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4d504: 2252 moveal %a2@,%a1 previous_node = the_node->previous; 4d506: 266a 0004 moveal %a2@(4),%a3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4d50a: 206a 0038 moveal %a2@(56),%a0 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4d50e: b088 cmpl %a0,%d0 4d510: 6768 beqs 4d57a <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4d512: 286a 0040 moveal %a2@(64),%a4 new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4d516: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4d518: 2348 0004 movel %a0,%a1@(4) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 4d51c: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4d51e: 214b 0004 movel %a3,%a0@(4) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4d522: 202a 0040 movel %a2@(64),%d0 last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4d526: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4d528: b0aa 0038 cmpl %a2@(56),%d0 4d52c: 6716 beqs 4d544 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4d52e: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4d532: 43e8 003c lea %a0@(60),%a1 4d536: 2889 movel %a1,%a4@ 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 */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 4d538: 43e8 0038 lea %a0@(56),%a1 4d53c: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 4d540: 214c 0040 movel %a4,%a0@(64) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4d544: 4a02 tstb %d2 4d546: 6626 bnes 4d56e <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4d548: 7002 moveq #2,%d0 4d54a: b0aa 0050 cmpl %a2@(80),%d0 4d54e: 6736 beqs 4d586 <_Thread_queue_Extract_priority_helper+0xb2> _ISR_Enable( level ); 4d550: 46c1 movew %d1,%sr 4d552: 2d4a 0008 movel %a2,%fp@(8) 4d556: 227c 1007 fff8 moveal #268959736,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d55c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d562: 2d49 000c movel %a1,%fp@(12) 4d566: 4e5e unlk %fp 4d568: 4ef9 0004 98d0 jmp 498d0 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4d56e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d570: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d576: 4e5e unlk %fp 4d578: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 4d57a: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4d57c: 234b 0004 movel %a3,%a1@(4) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4d580: 4a02 tstb %d2 4d582: 67c4 beqs 4d548 <_Thread_queue_Extract_priority_helper+0x74> 4d584: 60e8 bras 4d56e <_Thread_queue_Extract_priority_helper+0x9a> 4d586: 7003 moveq #3,%d0 4d588: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4d58c: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4d58e: 486a 0048 pea %a2@(72) 4d592: 4eb9 0004 aaa0 jsr 4aaa0 <_Watchdog_Remove> 4d598: 588f addql #4,%sp 4d59a: 227c 1007 fff8 moveal #268959736,%a1 4d5a0: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d5a4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d5aa: 2d49 000c movel %a1,%fp@(12) 4d5ae: 4e5e unlk %fp 4d5b0: 4ef9 0004 98d0 jmp 498d0 <_Thread_Clear_state> ... =============================================================================== 0004a4b0 <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4a4b0: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4a4b2: 4e56 0000 linkw %fp,#0 4a4b6: 206e 0008 moveal %fp@(8),%a0 4a4ba: 2f02 movel %d2,%sp@- 4a4bc: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; 4a4c0: 216e 0010 0038 movel %fp@(16),%a0@(56) the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 4a4c6: 216e 0014 003c movel %fp@(20),%a0@(60) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; 4a4cc: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4a4d0: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4a4d4: b280 cmpl %d0,%d1 4a4d6: 6714 beqs 4a4ec <_Thread_queue_Initialize+0x3c> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4a4d8: 2008 movel %a0,%d0 4a4da: 5880 addql #4,%d0 head->next = tail; head->previous = NULL; 4a4dc: 42a8 0004 clrl %a0@(4) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4a4e0: 2080 movel %d0,%a0@ head->next = tail; head->previous = NULL; tail->previous = head; 4a4e2: 2148 0008 movel %a0,%a0@(8) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 4a4e6: 241f movel %sp@+,%d2 4a4e8: 4e5e unlk %fp 4a4ea: 4e75 rts the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4a4ec: 4280 clrl %d0 uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 4a4ee: 2400 movel %d0,%d2 4a4f0: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 4a4f2: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 4a4f4: e58a lsll #2,%d2 4a4f6: e989 lsll #4,%d1 4a4f8: 9282 subl %d2,%d1 4a4fa: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4a4fe: 2209 movel %a1,%d1 4a500: 5881 addql #4,%d1 4a502: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 4a504: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 4a506: 42a9 0004 clrl %a1@(4) tail->previous = head; 4a50a: 2349 0008 movel %a1,%a1@(8) 4a50e: b280 cmpl %d0,%d1 4a510: 67d4 beqs 4a4e6 <_Thread_queue_Initialize+0x36> <== NEVER TAKEN index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 4a512: 2400 movel %d0,%d2 4a514: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 4a516: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 4a518: e58a lsll #2,%d2 4a51a: e989 lsll #4,%d1 4a51c: 9282 subl %d2,%d1 4a51e: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4a522: 2209 movel %a1,%d1 4a524: 5881 addql #4,%d1 4a526: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 4a528: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 4a52a: 42a9 0004 clrl %a1@(4) tail->previous = head; 4a52e: 2349 0008 movel %a1,%a1@(8) 4a532: b280 cmpl %d0,%d1 4a534: 66b8 bnes 4a4ee <_Thread_queue_Initialize+0x3e> 4a536: 60ae bras 4a4e6 <_Thread_queue_Initialize+0x36> =============================================================================== 0004d5b8 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4d5b8: 4e56 0000 linkw %fp,#0 4d5bc: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4d5c0: 2268 0044 moveal %a0@(68),%a1 * 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 && 4d5c4: 2029 0030 movel %a1@(48),%d0 4d5c8: 6708 beqs 4d5d2 <_Thread_queue_Process_timeout+0x1a> 4d5ca: b1f9 0006 142e cmpal 6142e <_Per_CPU_Information+0xe>,%a0 4d5d0: 6716 beqs 4d5e8 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN 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; 4d5d2: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4d5d8: 2f08 movel %a0,%sp@- 4d5da: 2f09 movel %a1,%sp@- 4d5dc: 4eb9 0004 d49c jsr 4d49c <_Thread_queue_Extract> 4d5e2: 508f addql #8,%sp } } 4d5e4: 4e5e unlk %fp 4d5e6: 4e75 rts * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4d5e8: 7203 moveq #3,%d1 4d5ea: b280 cmpl %d0,%d1 4d5ec: 67f6 beqs 4d5e4 <_Thread_queue_Process_timeout+0x2c> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4d5ee: 7002 moveq #2,%d0 } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 4d5f0: 4e5e unlk %fp */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4d5f2: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4d5f8: 2340 0030 movel %d0,%a1@(48) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } ... =============================================================================== 0004a538 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4a538: 4e56 fffc linkw %fp,#-4 4a53c: 2f0a movel %a2,%sp@- 4a53e: 246e 0008 moveal %fp@(8),%a2 4a542: 2f02 movel %d2,%sp@- /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 4a544: 4a8a tstl %a2 4a546: 6708 beqs 4a550 <_Thread_queue_Requeue+0x18> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4a548: 7001 moveq #1,%d0 4a54a: b0aa 0034 cmpl %a2@(52),%d0 4a54e: 670c beqs 4a55c <_Thread_queue_Requeue+0x24> <== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 4a550: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4a554: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4a558: 4e5e unlk %fp <== NOT EXECUTED 4a55a: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 4a55c: 303c 0700 movew #1792,%d0 4a560: 40c2 movew %sr,%d2 4a562: 8082 orl %d2,%d0 4a564: 46c0 movew %d0,%sr 4a566: 206e 000c moveal %fp@(12),%a0 4a56a: 2028 0010 movel %a0@(16),%d0 4a56e: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4a574: 660e bnes 4a584 <_Thread_queue_Requeue+0x4c> <== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 4a576: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4a578: 242e fff4 movel %fp@(-12),%d2 4a57c: 246e fff8 moveal %fp@(-8),%a2 4a580: 4e5e unlk %fp 4a582: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 4a584: 4878 0001 pea 1 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; 4a588: 7001 moveq #1,%d0 4a58a: 2f08 movel %a0,%sp@- 4a58c: 2540 0030 movel %d0,%a2@(48) 4a590: 2f0a movel %a2,%sp@- 4a592: 4eb9 0004 d4d4 jsr 4d4d4 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4a598: 486e fffc pea %fp@(-4) 4a59c: 2f2e 000c movel %fp@(12),%sp@- 4a5a0: 2f0a movel %a2,%sp@- 4a5a2: 4eb9 0004 a28c jsr 4a28c <_Thread_queue_Enqueue_priority> 4a5a8: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4a5ac: 46c2 movew %d2,%sr 4a5ae: 60c8 bras 4a578 <_Thread_queue_Requeue+0x40> =============================================================================== 0004a5b0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 4a5b0: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4a5b4: 486e fffc pea %fp@(-4) 4a5b8: 2f2e 0008 movel %fp@(8),%sp@- 4a5bc: 4eb9 0004 9cf0 jsr 49cf0 <_Thread_Get> switch ( location ) { 4a5c2: 508f addql #8,%sp 4a5c4: 4aae fffc tstl %fp@(-4) 4a5c8: 6618 bnes 4a5e2 <_Thread_queue_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4a5ca: 2f00 movel %d0,%sp@- 4a5cc: 4eb9 0004 d5b8 jsr 4d5b8 <_Thread_queue_Process_timeout> RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; --level; _Thread_Dispatch_disable_level = level; 4a5d2: 588f addql #4,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4a5d4: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 --level; 4a5da: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 4a5dc: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 4a5e2: 4e5e unlk %fp ... =============================================================================== 00057cc4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 57cc4: 4e56 ffb0 linkw %fp,#-80 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 57cc8: 41ee ffe8 lea %fp@(-24),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 57ccc: 200e movel %fp,%d0 57cce: 5180 subql #8,%d0 57cd0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 57cd4: 246e 0008 moveal %fp@(8),%a2 57cd8: 2a0e movel %fp,%d5 57cda: 2c0e movel %fp,%d6 57cdc: 0685 ffff fff4 addil #-12,%d5 57ce2: 0686 ffff ffec addil #-20,%d6 57ce8: 260a movel %a2,%d3 57cea: 240a movel %a2,%d2 57cec: 4bf9 0005 c114 lea 5c114 <_Watchdog_Adjust_to_chain>,%a5 57cf2: 0683 0000 0030 addil #48,%d3 57cf8: 0682 0000 0068 addil #104,%d2 57cfe: 47f9 0005 87e4 lea 587e4 <_Chain_Get>,%a3 57d04: 49f9 0005 c1a0 lea 5c1a0 <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 57d0a: 283c 0000 0700 movel #1792,%d4 head->previous = NULL; tail->previous = head; 57d10: 2d48 fff0 movel %a0,%fp@(-16) 57d14: 41ea 0008 lea %a2@(8),%a0 57d18: 2d48 ffe0 movel %a0,%fp@(-32) 57d1c: 41ea 0040 lea %a2@(64),%a0 57d20: 2d48 ffe4 movel %a0,%fp@(-28) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 57d24: 41ee ffe8 lea %fp@(-24),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 57d28: 2d40 fff4 movel %d0,%fp@(-12) head->previous = NULL; 57d2c: 42ae ffec clrl %fp@(-20) 57d30: 42ae fff8 clrl %fp@(-8) tail->previous = head; 57d34: 2d45 fffc movel %d5,%fp@(-4) 57d38: 2d40 ffd8 movel %d0,%fp@(-40) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 57d3c: 2d46 ffe8 movel %d6,%fp@(-24) 57d40: 2548 0078 movel %a0,%a2@(120) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 57d44: 2039 0007 db50 movel 7db50 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 57d4a: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 57d4e: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57d52: 9081 subl %d1,%d0 57d54: 2f05 movel %d5,%sp@- 57d56: 2f00 movel %d0,%sp@- 57d58: 2f03 movel %d3,%sp@- 57d5a: 4e95 jsr %a5@ 57d5c: 2f3c 3b9a ca00 movel #1000000000,%sp@- 57d62: 42a7 clrl %sp@- 57d64: 2f39 0007 da10 movel 7da10 <_TOD+0x4>,%sp@- 57d6a: 2f39 0007 da0c movel 7da0c <_TOD>,%sp@- 57d70: 4eb9 0006 d424 jsr 6d424 <__divdi3> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 57d76: 202a 0074 movel %a2@(116),%d0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 57d7a: 4fef 001c lea %sp@(28),%sp 57d7e: b081 cmpl %d1,%d0 57d80: 6500 009a bcsw 57e1c <_Timer_server_Body+0x158> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 57d84: b081 cmpl %d1,%d0 57d86: 6200 00b8 bhiw 57e40 <_Timer_server_Body+0x17c> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 57d8a: 2541 0074 movel %d1,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 57d8e: 202a 0078 movel %a2@(120),%d0 57d92: 2f00 movel %d0,%sp@- 57d94: 4e93 jsr %a3@ if ( timer == NULL ) { 57d96: 588f addql #4,%sp 57d98: 4a80 tstl %d0 57d9a: 672e beqs 57dca <_Timer_server_Body+0x106> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 57d9c: 2040 moveal %d0,%a0 <== NOT EXECUTED 57d9e: 7e01 moveq #1,%d7 <== NOT EXECUTED 57da0: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 57da4: be81 cmpl %d1,%d7 <== NOT EXECUTED 57da6: 6700 00bc beqw 57e64 <_Timer_server_Body+0x1a0> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 57daa: 7e03 moveq #3,%d7 <== NOT EXECUTED 57dac: be81 cmpl %d1,%d7 <== NOT EXECUTED 57dae: 66de bnes 57d8e <_Timer_server_Body+0xca> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 57db0: 2040 moveal %d0,%a0 <== NOT EXECUTED 57db2: 4868 0010 pea %a0@(16) <== NOT EXECUTED 57db6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 57db8: 4e94 jsr %a4@ <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 57dba: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 57dbe: 508f addql #8,%sp <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 57dc0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 57dc2: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 57dc4: 588f addql #4,%sp <== NOT EXECUTED 57dc6: 4a80 tstl %d0 <== NOT EXECUTED 57dc8: 66d2 bnes 57d9c <_Timer_server_Body+0xd8> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 57dca: 2004 movel %d4,%d0 57dcc: 40c1 movew %sr,%d1 57dce: 8081 orl %d1,%d0 57dd0: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 57dd2: bcae ffe8 cmpl %fp@(-24),%d6 57dd6: 6700 009a beqw 57e72 <_Timer_server_Body+0x1ae> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 57dda: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 57ddc: 2039 0007 db50 movel 7db50 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 57de2: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 57de6: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57dea: 9081 subl %d1,%d0 <== NOT EXECUTED 57dec: 2f05 movel %d5,%sp@- <== NOT EXECUTED 57dee: 2f00 movel %d0,%sp@- <== NOT EXECUTED 57df0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 57df2: 4e95 jsr %a5@ <== NOT EXECUTED 57df4: 2f3c 3b9a ca00 movel #1000000000,%sp@- <== NOT EXECUTED 57dfa: 42a7 clrl %sp@- <== NOT EXECUTED 57dfc: 2f39 0007 da10 movel 7da10 <_TOD+0x4>,%sp@- <== NOT EXECUTED 57e02: 2f39 0007 da0c movel 7da0c <_TOD>,%sp@- <== NOT EXECUTED 57e08: 4eb9 0006 d424 jsr 6d424 <__divdi3> <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 57e0e: 202a 0074 movel %a2@(116),%d0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 57e12: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 57e16: b081 cmpl %d1,%d0 <== NOT EXECUTED 57e18: 6400 ff6a bccw 57d84 <_Timer_server_Body+0xc0> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57e1c: 2f05 movel %d5,%sp@- 57e1e: 2e01 movel %d1,%d7 57e20: 9e80 subl %d0,%d7 57e22: 2f07 movel %d7,%sp@- 57e24: 2d41 ffdc movel %d1,%fp@(-36) 57e28: 2f02 movel %d2,%sp@- 57e2a: 4eb9 0005 c114 jsr 5c114 <_Watchdog_Adjust_to_chain> 57e30: 222e ffdc movel %fp@(-36),%d1 57e34: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 57e38: 2541 0074 movel %d1,%a2@(116) 57e3c: 6000 ff50 braw 57d8e <_Timer_server_Body+0xca> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 57e40: 9081 subl %d1,%d0 57e42: 2f00 movel %d0,%sp@- 57e44: 4878 0001 pea 1 57e48: 2d41 ffdc movel %d1,%fp@(-36) 57e4c: 2f02 movel %d2,%sp@- 57e4e: 4eb9 0005 c080 jsr 5c080 <_Watchdog_Adjust> 57e54: 222e ffdc movel %fp@(-36),%d1 57e58: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 57e5c: 2541 0074 movel %d1,%a2@(116) 57e60: 6000 ff2c braw 57d8e <_Timer_server_Body+0xca> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 57e64: 4868 0010 pea %a0@(16) <== NOT EXECUTED 57e68: 2f03 movel %d3,%sp@- <== NOT EXECUTED 57e6a: 4e94 jsr %a4@ <== NOT EXECUTED 57e6c: 508f addql #8,%sp <== NOT EXECUTED 57e6e: 6000 ff1e braw 57d8e <_Timer_server_Body+0xca> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 57e72: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 57e76: 46c1 movew %d1,%sr _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 57e78: 2e2e ffd8 movel %fp@(-40),%d7 57e7c: beae fff4 cmpl %fp@(-12),%d7 57e80: 6758 beqs 57eda <_Timer_server_Body+0x216> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 57e82: 2004 movel %d4,%d0 57e84: 40c1 movew %sr,%d1 57e86: 8081 orl %d1,%d0 57e88: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57e8a: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57e8e: be88 cmpl %a0,%d7 57e90: 673a beqs 57ecc <_Timer_server_Body+0x208> <== NEVER TAKEN 57e92: 2e0a movel %a2,%d7 Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 57e94: 2250 moveal %a0@,%a1 head->next = new_first; new_first->previous = head; 57e96: 45ee fff4 lea %fp@(-12),%a2 57e9a: 234a 0004 movel %a2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 57e9e: 42a8 0008 clrl %a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 57ea2: 2d49 fff4 movel %a1,%fp@(-12) _ISR_Enable( level ); 57ea6: 46c1 movew %d1,%sr /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 57ea8: 2f28 0024 movel %a0@(36),%sp@- 57eac: 2f28 0020 movel %a0@(32),%sp@- 57eb0: 2068 001c moveal %a0@(28),%a0 57eb4: 4e90 jsr %a0@ /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 57eb6: 2004 movel %d4,%d0 57eb8: 40c1 movew %sr,%d1 57eba: 8081 orl %d1,%d0 57ebc: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57ebe: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57ec0: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57ec4: b1ee ffd8 cmpal %fp@(-40),%a0 57ec8: 66ca bnes 57e94 <_Timer_server_Body+0x1d0> 57eca: 2447 moveal %d7,%a2 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 57ecc: 46c1 movew %d1,%sr { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 57ece: 41ee ffe8 lea %fp@(-24),%a0 57ed2: 2548 0078 movel %a0,%a2@(120) 57ed6: 6000 fe6c braw 57d44 <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 57eda: 4200 clrb %d0 57edc: 1540 007c moveb %d0,%a2@(124) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 57ee0: 2039 0007 da6a movel 7da6a <_Thread_Dispatch_disable_level>,%d0 ++level; 57ee6: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 57ee8: 23c0 0007 da6a movel %d0,7da6a <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 57eee: 4878 0008 pea 8 57ef2: 2f12 movel %a2@,%sp@- _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 57ef4: 7e01 moveq #1,%d7 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 57ef6: 4eb9 0005 bd10 jsr 5bd10 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 57efc: 2f0a movel %a2,%sp@- 57efe: 4eba fb7c jsr %pc@(57a7c <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 57f02: 2f0a movel %a2,%sp@- 57f04: 4eba fbe0 jsr %pc@(57ae6 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 57f08: 4eb9 0005 b350 jsr 5b350 <_Thread_Enable_dispatch> ts->active = true; 57f0e: 1547 007c moveb %d7,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 57f12: 2f2e ffe0 movel %fp@(-32),%sp@- 57f16: 4eb9 0005 c2d0 jsr 5c2d0 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 57f1c: 2f2e ffe4 movel %fp@(-28),%sp@- 57f20: 4eb9 0005 c2d0 jsr 5c2d0 <_Watchdog_Remove> 57f26: 4fef 0018 lea %sp@(24),%sp { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 57f2a: 41ee ffe8 lea %fp@(-24),%a0 57f2e: 2548 0078 movel %a0,%a2@(120) 57f32: 6000 fe10 braw 57d44 <_Timer_server_Body+0x80> =============================================================================== 00057b54 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 57b54: 4e56 fff0 linkw %fp,#-16 57b58: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57b5c: 246e 0008 moveal %fp@(8),%a2 57b60: 266e 000c moveal %fp@(12),%a3 if ( ts->insert_chain == NULL ) { 57b64: 202a 0078 movel %a2@(120),%d0 57b68: 671a beqs 57b84 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 57b6a: 246a 0078 moveal %a2@(120),%a2 <== NOT EXECUTED 57b6e: 2d4b 000c movel %a3,%fp@(12) <== NOT EXECUTED 57b72: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 57b76: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 57b7c: 4e5e unlk %fp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 57b7e: 4ef9 0005 87ac jmp 587ac <_Chain_Append> <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 57b84: 2039 0007 da6a movel 7da6a <_Thread_Dispatch_disable_level>,%d0 ++level; 57b8a: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 57b8c: 23c0 0007 da6a movel %d0,7da6a <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 57b92: 202b 0038 movel %a3@(56),%d0 57b96: 7201 moveq #1,%d1 57b98: b280 cmpl %d0,%d1 57b9a: 6700 009e beqw 57c3a <_Timer_server_Schedule_operation_method+0xe6> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 57b9e: 7603 moveq #3,%d3 57ba0: b680 cmpl %d0,%d3 57ba2: 670e beqs 57bb2 <_Timer_server_Schedule_operation_method+0x5e> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 57ba4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 57baa: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57bac: 4ef9 0005 b350 jmp 5b350 <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 57bb2: 203c 0000 0700 movel #1792,%d0 57bb8: 40c2 movew %sr,%d2 57bba: 8082 orl %d2,%d0 57bbc: 46c0 movew %d0,%sr 57bbe: 2f3c 3b9a ca00 movel #1000000000,%sp@- 57bc4: 42a7 clrl %sp@- 57bc6: 2f39 0007 da10 movel 7da10 <_TOD+0x4>,%sp@- 57bcc: 2f39 0007 da0c movel 7da0c <_TOD>,%sp@- 57bd2: 4eb9 0006 d424 jsr 6d424 <__divdi3> snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 57bd8: 202a 0074 movel %a2@(116),%d0 57bdc: 4fef 0010 lea %sp@(16),%sp RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 57be0: 43ea 006c lea %a2@(108),%a1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57be4: 206a 0068 moveal %a2@(104),%a0 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 57be8: b3c8 cmpal %a0,%a1 57bea: 671c beqs 57c08 <_Timer_server_Schedule_operation_method+0xb4> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 57bec: 2268 0010 moveal %a0@(16),%a1 if ( snapshot > last_snapshot ) { 57bf0: b081 cmpl %d1,%d0 57bf2: 6400 00ba bccw 57cae <_Timer_server_Schedule_operation_method+0x15a> /* * We advanced in time. */ delta = snapshot - last_snapshot; 57bf6: 2601 movel %d1,%d3 57bf8: 9680 subl %d0,%d3 if (delta_interval > delta) { 57bfa: b689 cmpl %a1,%d3 57bfc: 6400 00bc bccw 57cba <_Timer_server_Schedule_operation_method+0x166> delta_interval -= delta; 57c00: 93c3 subal %d3,%a1 57c02: 2009 movel %a1,%d0 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57c04: 2140 0010 movel %d0,%a0@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 57c08: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 57c0c: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 57c0e: 486b 0010 pea %a3@(16) 57c12: 486a 0068 pea %a2@(104) 57c16: 4eb9 0005 c1a0 jsr 5c1a0 <_Watchdog_Insert> if ( !ts->active ) { 57c1c: 508f addql #8,%sp 57c1e: 102a 007c moveb %a2@(124),%d0 57c22: 6680 bnes 57ba4 <_Timer_server_Schedule_operation_method+0x50><== NEVER TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); 57c24: 2f0a movel %a2,%sp@- 57c26: 4eba febe jsr %pc@(57ae6 <_Timer_server_Reset_tod_system_watchdog>) 57c2a: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 57c2c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 57c32: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57c34: 4ef9 0005 b350 jmp 5b350 <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 57c3a: 203c 0000 0700 movel #1792,%d0 57c40: 40c2 movew %sr,%d2 57c42: 8082 orl %d2,%d0 57c44: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 57c46: 2039 0007 db50 movel 7db50 <_Watchdog_Ticks_since_boot>,%d0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 57c4c: 220a movel %a2,%d1 57c4e: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 57c54: 262a 003c movel %a2@(60),%d3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57c58: 206a 0030 moveal %a2@(48),%a0 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 57c5c: b288 cmpl %a0,%d1 57c5e: 6712 beqs 57c72 <_Timer_server_Schedule_operation_method+0x11e> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 57c60: 2200 movel %d0,%d1 57c62: 9283 subl %d3,%d1 delta_interval = first_watchdog->delta_interval; 57c64: 2268 0010 moveal %a0@(16),%a1 if (delta_interval > delta) { 57c68: b3c1 cmpal %d1,%a1 57c6a: 633a blss 57ca6 <_Timer_server_Schedule_operation_method+0x152> delta_interval -= delta; 57c6c: 93c1 subal %d1,%a1 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 57c6e: 2149 0010 movel %a1,%a0@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 57c72: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 57c76: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 57c78: 486b 0010 pea %a3@(16) 57c7c: 486a 0030 pea %a2@(48) 57c80: 4eb9 0005 c1a0 jsr 5c1a0 <_Watchdog_Insert> if ( !ts->active ) { 57c86: 508f addql #8,%sp 57c88: 102a 007c moveb %a2@(124),%d0 57c8c: 6600 ff16 bnew 57ba4 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 57c90: 2f0a movel %a2,%sp@- 57c92: 4eba fde8 jsr %pc@(57a7c <_Timer_server_Reset_interval_system_watchdog>) 57c96: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 57c98: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 57c9e: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57ca0: 4ef9 0005 b350 jmp 5b350 <_Thread_Enable_dispatch> delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57ca6: 93c9 subal %a1,%a1 } first_watchdog->delta_interval = delta_interval; 57ca8: 2149 0010 movel %a1,%a0@(16) 57cac: 60c4 bras 57c72 <_Timer_server_Schedule_operation_method+0x11e> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 57cae: d089 addl %a1,%d0 delta_interval += delta; 57cb0: 9081 subl %d1,%d0 } first_watchdog->delta_interval = delta_interval; 57cb2: 2140 0010 movel %d0,%a0@(16) 57cb6: 6000 ff50 braw 57c08 <_Timer_server_Schedule_operation_method+0xb4> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57cba: 4280 clrl %d0 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57cbc: 2140 0010 movel %d0,%a0@(16) <== NOT EXECUTED 57cc0: 6000 ff46 braw 57c08 <_Timer_server_Schedule_operation_method+0xb4><== NOT EXECUTED =============================================================================== 0004c600 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 4c600: 4e56 0000 linkw %fp,#0 4c604: 226e 000c moveal %fp@(12),%a1 4c608: 2f0a movel %a2,%sp@- 4c60a: 246e 0008 moveal %fp@(8),%a2 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 4c60e: 206a 0004 moveal %a2@(4),%a0 4c612: d1e9 0004 addal %a1@(4),%a0 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4c616: 2208 movel %a0,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 4c618: 2011 movel %a1@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 4c61a: d192 addl %d0,%a2@ time->tv_nsec += add->tv_nsec; 4c61c: 2548 0004 movel %a0,%a2@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4c620: b1fc 3b9a c9ff cmpal #999999999,%a0 4c626: 6320 blss 4c648 <_Timespec_Add_to+0x48> 4c628: 2052 moveal %a2@,%a0 4c62a: 5288 addql #1,%a0 #include #include #include #include uint32_t _Timespec_Add_to( 4c62c: 91c0 subal %d0,%a0 4c62e: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 4c632: 0681 c465 3600 addil #-1000000000,%d1 time->tv_sec++; seconds++; 4c638: 5280 addql #1,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4c63a: 0c81 3b9a c9ff cmpil #999999999,%d1 4c640: 62ec bhis 4c62e <_Timespec_Add_to+0x2e> <== NEVER TAKEN 4c642: 2541 0004 movel %d1,%a2@(4) 4c646: 2489 movel %a1,%a2@ time->tv_sec++; seconds++; } return seconds; } 4c648: 245f moveal %sp@+,%a2 4c64a: 4e5e unlk %fp ... =============================================================================== 0004c0b8 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 4c0b8: 4e56 fff4 linkw %fp,#-12 Timestamp64_Control answer; if ( *_rhs == 0 ) { 4c0bc: 206e 000c moveal %fp@(12),%a0 const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 4c0c0: 48d7 040c moveml %d2-%d3/%a2,%sp@ Timestamp64_Control answer; if ( *_rhs == 0 ) { 4c0c4: 2410 movel %a0@,%d2 4c0c6: 2628 0004 movel %a0@(4),%d3 4c0ca: 2002 movel %d2,%d0 4c0cc: 8083 orl %d3,%d0 4c0ce: 676e beqs 4c13e <_Timestamp64_Divide+0x86> <== NEVER TAKEN * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 4c0d0: 206e 0008 moveal %fp@(8),%a0 4c0d4: 45f9 0005 d728 lea 5d728 <__divdi3>,%a2 4c0da: 2f3c 0001 86a0 movel #100000,%sp@- 4c0e0: 42a7 clrl %sp@- 4c0e2: 2f28 0004 movel %a0@(4),%sp@- 4c0e6: 2f10 movel %a0@,%sp@- 4c0e8: 4eb9 0005 d6c0 jsr 5d6c0 <__muldi3> 4c0ee: 4fef 000c lea %sp@(12),%sp 4c0f2: 2e83 movel %d3,%sp@ 4c0f4: 2f02 movel %d2,%sp@- 4c0f6: 2f01 movel %d1,%sp@- 4c0f8: 2f00 movel %d0,%sp@- 4c0fa: 4e92 jsr %a2@ 4c0fc: 4fef 0010 lea %sp@(16),%sp 4c100: 2400 movel %d0,%d2 *_ival_percentage = answer / 1000; 4c102: 4878 03e8 pea 3e8 * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 4c106: 2601 movel %d1,%d3 *_ival_percentage = answer / 1000; 4c108: 42a7 clrl %sp@- 4c10a: 2f01 movel %d1,%sp@- 4c10c: 2f02 movel %d2,%sp@- 4c10e: 4e92 jsr %a2@ 4c110: 4fef 0010 lea %sp@(16),%sp *_fval_percentage = answer % 1000; 4c114: 4878 03e8 pea 3e8 * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 4c118: 206e 0010 moveal %fp@(16),%a0 *_fval_percentage = answer % 1000; 4c11c: 42a7 clrl %sp@- * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 4c11e: 2081 movel %d1,%a0@ *_fval_percentage = answer % 1000; 4c120: 2f03 movel %d3,%sp@- 4c122: 2f02 movel %d2,%sp@- 4c124: 4eb9 0005 db88 jsr 5db88 <__moddi3> 4c12a: 206e 0014 moveal %fp@(20),%a0 4c12e: 4fef 0010 lea %sp@(16),%sp } 4c132: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; 4c138: 2081 movel %d1,%a0@ } 4c13a: 4e5e unlk %fp 4c13c: 4e75 rts ) { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; 4c13e: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4c142: 4290 clrl %a0@ <== NOT EXECUTED *_fval_percentage = 0; 4c144: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; } 4c148: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; *_fval_percentage = 0; 4c14e: 4290 clrl %a0@ <== NOT EXECUTED answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; } 4c150: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a938 <_User_extensions_Handler_initialization>: void _User_extensions_Handler_initialization(void) { 4a938: 4e56 fffc linkw %fp,#-4 uint32_t number_of_initial_extensions = 4a93c: 2039 0005 d994 movel 5d994 ,%d0 rtems_configuration_get_number_of_initial_extensions(); if ( number_of_initial_extensions > 0 ) { 4a942: 6604 bnes 4a948 <_User_extensions_Handler_initialization+0x10><== ALWAYS TAKEN ); User_extensions_Switch_context ctx = { initial_extension_switch_controls }; _User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor ); } } 4a944: 4e5e unlk %fp <== NOT EXECUTED 4a946: 4e75 rts <== NOT EXECUTED uint32_t number_of_initial_extensions = rtems_configuration_get_number_of_initial_extensions(); if ( number_of_initial_extensions > 0 ) { User_extensions_Switch_control *initial_extension_switch_controls = _Workspace_Allocate_or_fatal_error( 4a948: 2200 movel %d0,%d1 4a94a: e988 lsll #4,%d0 4a94c: e589 lsll #2,%d1 { uint32_t number_of_initial_extensions = rtems_configuration_get_number_of_initial_extensions(); if ( number_of_initial_extensions > 0 ) { User_extensions_Switch_control *initial_extension_switch_controls = 4a94e: 9081 subl %d1,%d0 4a950: 2f00 movel %d0,%sp@- 4a952: 4eb9 0004 acf6 jsr 4acf6 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( number_of_initial_extensions * sizeof( *initial_extension_switch_controls ) ); User_extensions_Switch_context ctx = { initial_extension_switch_controls }; 4a958: 204e moveal %fp,%a0 4a95a: 2100 movel %d0,%a0@- _User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor ); 4a95c: 487a ff9a pea %pc@(4a8f8 <_User_extensions_Switch_visitor>) 4a960: 2f08 movel %a0,%sp@- 4a962: 4eb9 0004 a884 jsr 4a884 <_User_extensions_Iterate> 4a968: 4fef 000c lea %sp@(12),%sp } } 4a96c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a884 <_User_extensions_Iterate>: void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { 4a884: 4e56 ffec linkw %fp,#-20 Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); 4a888: 2039 0005 d994 movel 5d994 ,%d0 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { 4a88e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); 4a892: eb88 lsll #5,%d0 void *arg, User_extensions_Visitor visitor ) { Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = 4a894: 2439 0005 d998 movel 5d998 ,%d2 rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = 4a89a: 2442 moveal %d2,%a2 4a89c: d5c0 addal %d0,%a2 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { 4a89e: 282e 0008 movel %fp@(8),%d4 4a8a2: 266e 000c moveal %fp@(12),%a3 Thread_Control *executing = _Thread_Executing; 4a8a6: 2639 0006 142e movel 6142e <_Per_CPU_Information+0xe>,%d3 const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { 4a8ac: b5c2 cmpal %d2,%a2 4a8ae: 6716 beqs 4a8c6 <_User_extensions_Iterate+0x42> <== NEVER TAKEN (*visitor)( executing, arg, callouts_current ); 4a8b0: 2f02 movel %d2,%sp@- ++callouts_current; 4a8b2: 0682 0000 0020 addil #32,%d2 callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { (*visitor)( executing, arg, callouts_current ); 4a8b8: 2f04 movel %d4,%sp@- 4a8ba: 2f03 movel %d3,%sp@- 4a8bc: 4e93 jsr %a3@ const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { 4a8be: 4fef 000c lea %sp@(12),%sp 4a8c2: b48a cmpl %a2,%d2 4a8c4: 66ea bnes 4a8b0 <_User_extensions_Iterate+0x2c> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4a8c6: 2479 0005 f88c moveal 5f88c <_User_extensions_List>,%a2 ++callouts_current; } node = _Chain_Immutable_first( &_User_extensions_List ); tail = _Chain_Immutable_tail( &_User_extensions_List ); while ( node != tail ) { 4a8cc: b5fc 0005 f890 cmpal #391312,%a2 4a8d2: 6718 beqs 4a8ec <_User_extensions_Iterate+0x68> const User_extensions_Control *extension = (const User_extensions_Control *) node; (*visitor)( executing, arg, &extension->Callouts ); 4a8d4: 486a 0014 pea %a2@(20) 4a8d8: 2f04 movel %d4,%sp@- 4a8da: 2f03 movel %d3,%sp@- 4a8dc: 4e93 jsr %a3@ node = _Chain_Immutable_next( node ); } } 4a8de: 2452 moveal %a2@,%a2 ++callouts_current; } node = _Chain_Immutable_first( &_User_extensions_List ); tail = _Chain_Immutable_tail( &_User_extensions_List ); while ( node != tail ) { 4a8e0: 4fef 000c lea %sp@(12),%sp 4a8e4: b5fc 0005 f890 cmpal #391312,%a2 4a8ea: 66e8 bnes 4a8d4 <_User_extensions_Iterate+0x50> (*visitor)( executing, arg, &extension->Callouts ); node = _Chain_Immutable_next( node ); } } 4a8ec: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4a8f2: 4e5e unlk %fp ... =============================================================================== 0004c364 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4c364: 4e56 ffe8 linkw %fp,#-24 4c368: 226e 000c moveal %fp@(12),%a1 4c36c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4c370: 263c 0000 0700 movel #1792,%d3 4c376: 2003 movel %d3,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4c378: 266e 0008 moveal %fp@(8),%a3 4c37c: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4c380: 40c1 movew %sr,%d1 4c382: 8081 orl %d1,%d0 4c384: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4c386: 244b moveal %a3,%a2 4c388: 205a moveal %a2@+,%a0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4c38a: b5c8 cmpal %a0,%a2 4c38c: 6746 beqs 4c3d4 <_Watchdog_Adjust+0x70> switch ( direction ) { 4c38e: 4a89 tstl %a1 4c390: 664e bnes 4c3e0 <_Watchdog_Adjust+0x7c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4c392: 4a82 tstl %d2 4c394: 673e beqs 4c3d4 <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4c396: 2028 0010 movel %a0@(16),%d0 4c39a: b082 cmpl %d2,%d0 4c39c: 6230 bhis 4c3ce <_Watchdog_Adjust+0x6a> <== NEVER TAKEN 4c39e: 49f9 0004 c5c8 lea 4c5c8 <_Watchdog_Tickle>,%a4 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4c3a4: 7801 moveq #1,%d4 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 4c3a6: 9480 subl %d0,%d2 _Watchdog_First( header )->delta_interval = 1; 4c3a8: 2144 0010 movel %d4,%a0@(16) _ISR_Enable( level ); 4c3ac: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4c3ae: 2f0b movel %a3,%sp@- 4c3b0: 4e94 jsr %a4@ _ISR_Disable( level ); 4c3b2: 2003 movel %d3,%d0 4c3b4: 40c1 movew %sr,%d1 4c3b6: 8081 orl %d1,%d0 4c3b8: 46c0 movew %d0,%sr if ( _Chain_Is_empty( header ) ) 4c3ba: 588f addql #4,%sp 4c3bc: 2053 moveal %a3@,%a0 4c3be: b1ca cmpal %a2,%a0 4c3c0: 6712 beqs 4c3d4 <_Watchdog_Adjust+0x70> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4c3c2: 4a82 tstl %d2 4c3c4: 670e beqs 4c3d4 <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4c3c6: 2028 0010 movel %a0@(16),%d0 4c3ca: b480 cmpl %d0,%d2 4c3cc: 64d6 bccs 4c3a4 <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4c3ce: 9082 subl %d2,%d0 4c3d0: 2140 0010 movel %d0,%a0@(16) } break; } } _ISR_Enable( level ); 4c3d4: 46c1 movew %d1,%sr } 4c3d6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4c3dc: 4e5e unlk %fp 4c3de: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4c3e0: 7001 moveq #1,%d0 4c3e2: b089 cmpl %a1,%d0 4c3e4: 66ee bnes 4c3d4 <_Watchdog_Adjust+0x70> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4c3e6: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4c3ea: 46c1 movew %d1,%sr } 4c3ec: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4c3f2: 4e5e unlk %fp ... =============================================================================== 0005c114 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5c114: 4e56 ffe4 linkw %fp,#-28 5c118: 226e 0010 moveal %fp@(16),%a1 5c11c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; _ISR_Disable( level ); 5c120: 263c 0000 0700 movel #1792,%d3 5c126: 2003 movel %d3,%d0 Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5c128: 242e 0008 movel %fp@(8),%d2 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; _ISR_Disable( level ); 5c12c: 40c1 movew %sr,%d1 5c12e: 8081 orl %d1,%d0 5c130: 46c0 movew %d0,%sr 5c132: 2a42 moveal %d2,%a5 Watchdog_Interval units_arg, Chain_Control *to_fire ) { Watchdog_Interval units = units_arg; 5c134: 282e 000c movel %fp@(12),%d4 5c138: 205d moveal %a5@+,%a0 Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { 5c13a: b1cd cmpal %a5,%a0 5c13c: 6748 beqs 5c186 <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 5c13e: 2028 0010 movel %a0@(16),%d0 5c142: b084 cmpl %d4,%d0 5c144: 624a bhis 5c190 <_Watchdog_Adjust_to_chain+0x7c> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 5c146: 9880 subl %d0,%d4 first->delta_interval = 0; 5c148: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5c14c: 2850 moveal %a0@,%a4 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 5c14e: 2009 movel %a1,%d0 5c150: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 5c152: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; 5c156: 294b 0004 movel %a3,%a4@(4) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 5c15a: 2469 0008 moveal %a1@(8),%a2 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 5c15e: 268c movel %a4,%a3@ { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 5c160: 2348 0008 movel %a0,%a1@(8) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 5c164: 2080 movel %d0,%a0@ Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; 5c166: 214a 0004 movel %a2,%a0@(4) Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; 5c16a: 2488 movel %a0,%a2@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5c16c: 2003 movel %d3,%d0 5c16e: 46c1 movew %d1,%sr 5c170: 8081 orl %d1,%d0 5c172: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 5c174: 2442 moveal %d2,%a2 5c176: 2052 moveal %a2@,%a0 if ( _Chain_Is_empty( header ) ) 5c178: b1cd cmpal %a5,%a0 5c17a: 67be beqs 5c13a <_Watchdog_Adjust_to_chain+0x26> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5c17c: 4aa8 0010 tstl %a0@(16) 5c180: 67ca beqs 5c14c <_Watchdog_Adjust_to_chain+0x38> Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { 5c182: b1cd cmpal %a5,%a0 5c184: 66b8 bnes 5c13e <_Watchdog_Adjust_to_chain+0x2a> <== ALWAYS TAKEN if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5c186: 46c1 movew %d1,%sr } 5c188: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5c18c: 4e5e unlk %fp 5c18e: 4e75 rts /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 5c190: 9084 subl %d4,%d0 5c192: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5c196: 46c1 movew %d1,%sr } 5c198: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5c19c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a970 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4a970: 4e56 fff0 linkw %fp,#-16 4a974: 226e 000c moveal %fp@(12),%a1 4a978: 48d7 041c moveml %d2-%d4/%a2,%sp@ Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 4a97c: 283c 0000 0700 movel #1792,%d4 4a982: 2004 movel %d4,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 4a984: 2639 0006 1428 movel 61428 <_Per_CPU_Information+0x8>,%d3 _ISR_Disable( level ); 4a98a: 40c2 movew %sr,%d2 4a98c: 8082 orl %d2,%d0 4a98e: 46c0 movew %d0,%sr /* * 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 ) { 4a990: 4aa9 0008 tstl %a1@(8) 4a994: 6600 009c bnew 4aa32 <_Watchdog_Insert+0xc2> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 4a998: 2039 0006 10c8 movel 610c8 <_Watchdog_Sync_count>,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4a99e: 7201 moveq #1,%d1 _Watchdog_Sync_count++; 4a9a0: 5280 addql #1,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4a9a2: 2341 0008 movel %d1,%a1@(8) _Watchdog_Sync_count++; 4a9a6: 23c0 0006 10c8 movel %d0,610c8 <_Watchdog_Sync_count> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a9ac: 246e 0008 moveal %fp@(8),%a2 restart: delta_interval = the_watchdog->initial; 4a9b0: 2029 000c movel %a1@(12),%d0 4a9b4: 2052 moveal %a2@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4a9b6: 6740 beqs 4a9f8 <_Watchdog_Insert+0x88> 4a9b8: 4a90 tstl %a0@ 4a9ba: 673c beqs 4a9f8 <_Watchdog_Insert+0x88> break; if ( delta_interval < after->delta_interval ) { 4a9bc: 2228 0010 movel %a0@(16),%d1 4a9c0: b280 cmpl %d0,%d1 4a9c2: 622e bhis 4a9f2 <_Watchdog_Insert+0x82> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 4a9c4: 9081 subl %d1,%d0 _ISR_Flash( level ); 4a9c6: 2204 movel %d4,%d1 4a9c8: 46c2 movew %d2,%sr 4a9ca: 8282 orl %d2,%d1 4a9cc: 46c1 movew %d1,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 4a9ce: 7201 moveq #1,%d1 4a9d0: b2a9 0008 cmpl %a1@(8),%d1 4a9d4: 6648 bnes 4aa1e <_Watchdog_Insert+0xae> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4a9d6: 2239 0006 106e movel 6106e <_Watchdog_Sync_level>,%d1 4a9dc: b283 cmpl %d3,%d1 4a9de: 625c bhis 4aa3c <_Watchdog_Insert+0xcc> exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 4a9e0: 2050 moveal %a0@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4a9e2: 4a80 tstl %d0 4a9e4: 6712 beqs 4a9f8 <_Watchdog_Insert+0x88> 4a9e6: 4a90 tstl %a0@ 4a9e8: 670e beqs 4a9f8 <_Watchdog_Insert+0x88> break; if ( delta_interval < after->delta_interval ) { 4a9ea: 2228 0010 movel %a0@(16),%d1 4a9ee: b081 cmpl %d1,%d0 4a9f0: 64d2 bccs 4a9c4 <_Watchdog_Insert+0x54> after->delta_interval -= delta_interval; 4a9f2: 9280 subl %d0,%d1 4a9f4: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 4a9f8: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 4a9fc: 7202 moveq #2,%d1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4a9fe: 2450 moveal %a0@,%a2 } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 4aa00: 2340 0010 movel %d0,%a1@(16) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4aa04: 2039 0006 10cc movel 610cc <_Watchdog_Ticks_since_boot>,%d0 4aa0a: 2341 0008 movel %d1,%a1@(8) 4aa0e: 2340 0014 movel %d0,%a1@(20) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4aa12: 2348 0004 movel %a0,%a1@(4) before_node = after_node->next; after_node->next = the_node; 4aa16: 2089 movel %a1,%a0@ the_node->next = before_node; before_node->previous = the_node; 4aa18: 2549 0004 movel %a1,%a2@(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; 4aa1c: 228a movel %a2,%a1@ exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4aa1e: 23c3 0006 106e movel %d3,6106e <_Watchdog_Sync_level> _Watchdog_Sync_count--; 4aa24: 2039 0006 10c8 movel 610c8 <_Watchdog_Sync_count>,%d0 4aa2a: 5380 subql #1,%d0 4aa2c: 23c0 0006 10c8 movel %d0,610c8 <_Watchdog_Sync_count> _ISR_Enable( level ); 4aa32: 46c2 movew %d2,%sr } 4aa34: 4cd7 041c moveml %sp@,%d2-%d4/%a2 4aa38: 4e5e unlk %fp 4aa3a: 4e75 rts if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 4aa3c: 23c3 0006 106e movel %d3,6106e <_Watchdog_Sync_level> goto restart; 4aa42: 6000 ff68 braw 4a9ac <_Watchdog_Insert+0x3c> ... =============================================================================== 0004aaa0 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4aaa0: 203c 0000 0700 movel #1792,%d0 #include Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4aaa6: 4e56 0000 linkw %fp,#0 4aaaa: 206e 0008 moveal %fp@(8),%a0 4aaae: 2f0a movel %a2,%sp@- 4aab0: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4aab2: 40c1 movew %sr,%d1 4aab4: 8081 orl %d1,%d0 4aab6: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 4aab8: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 4aabc: 7401 moveq #1,%d2 4aabe: b480 cmpl %d0,%d2 4aac0: 6764 beqs 4ab26 <_Watchdog_Remove+0x86> 4aac2: 6314 blss 4aad8 <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4aac4: 2439 0006 10cc movel 610cc <_Watchdog_Ticks_since_boot>,%d2 4aaca: 2142 0018 movel %d2,%a0@(24) _ISR_Enable( level ); 4aace: 46c1 movew %d1,%sr return( previous_state ); } 4aad0: 241f movel %sp@+,%d2 4aad2: 245f moveal %sp@+,%a2 4aad4: 4e5e unlk %fp 4aad6: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4aad8: 143c 0003 moveb #3,%d2 4aadc: b480 cmpl %d0,%d2 4aade: 65e4 bcss 4aac4 <_Watchdog_Remove+0x24> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 4aae0: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4aae2: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4aae6: 4a91 tstl %a1@ 4aae8: 6708 beqs 4aaf2 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 4aaea: 2428 0010 movel %a0@(16),%d2 4aaee: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 4aaf2: 2479 0006 10c8 moveal 610c8 <_Watchdog_Sync_count>,%a2 4aaf8: 4a8a tstl %a2 4aafa: 670c beqs 4ab08 <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 4aafc: 45f9 0006 1428 lea 61428 <_Per_CPU_Information+0x8>,%a2 4ab02: 23d2 0006 106e movel %a2@,6106e <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4ab08: 2468 0004 moveal %a0@(4),%a2 _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4ab0c: 2439 0006 10cc movel 610cc <_Watchdog_Ticks_since_boot>,%d2 next->previous = previous; 4ab12: 234a 0004 movel %a2,%a1@(4) previous->next = next; 4ab16: 2489 movel %a1,%a2@ 4ab18: 2142 0018 movel %d2,%a0@(24) _ISR_Enable( level ); 4ab1c: 46c1 movew %d1,%sr return( previous_state ); } 4ab1e: 241f movel %sp@+,%d2 4ab20: 245f moveal %sp@+,%a2 4ab22: 4e5e unlk %fp 4ab24: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4ab26: 2439 0006 10cc movel 610cc <_Watchdog_Ticks_since_boot>,%d2 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 4ab2c: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4ab30: 2142 0018 movel %d2,%a0@(24) _ISR_Enable( level ); 4ab34: 46c1 movew %d1,%sr return( previous_state ); } 4ab36: 241f movel %sp@+,%d2 4ab38: 245f moveal %sp@+,%a2 4ab3a: 4e5e unlk %fp ... =============================================================================== 0004bc98 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4bc98: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4bc9e: 4e56 ffe8 linkw %fp,#-24 4bca2: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4bca6: 242e 0008 movel %fp@(8),%d2 4bcaa: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4bcae: 40c3 movew %sr,%d3 4bcb0: 8083 orl %d3,%d0 4bcb2: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4bcb4: 2f0b movel %a3,%sp@- 4bcb6: 4bf9 0004 4990 lea 44990 ,%a5 4bcbc: 2f02 movel %d2,%sp@- 4bcbe: 4879 0006 0597 pea 60597 <_Copyright_Notice+0x4b> 4bcc4: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4bcc6: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4bcc8: 4fef 000c lea %sp@(12),%sp 4bccc: b7ca cmpal %a2,%a3 4bcce: 672c beqs 4bcfc <_Watchdog_Report_chain+0x64> 4bcd0: 49f9 0004 bd14 lea 4bd14 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4bcd6: 2f0a movel %a2,%sp@- 4bcd8: 42a7 clrl %sp@- 4bcda: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 4bcdc: 2452 moveal %a2@,%a2 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; 4bcde: 508f addql #8,%sp 4bce0: b7ca cmpal %a2,%a3 4bce2: 66f2 bnes 4bcd6 <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4bce4: 2f02 movel %d2,%sp@- 4bce6: 4879 0006 05ae pea 605ae <_Copyright_Notice+0x62> 4bcec: 4e95 jsr %a5@ 4bcee: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4bcf0: 46c3 movew %d3,%sr } 4bcf2: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4bcf8: 4e5e unlk %fp 4bcfa: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4bcfc: 4879 0006 05bd pea 605bd <_Copyright_Notice+0x71> 4bd02: 4e95 jsr %a5@ 4bd04: 588f addql #4,%sp } _ISR_Enable( level ); 4bd06: 46c3 movew %d3,%sr } 4bd08: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4bd0e: 4e5e unlk %fp ... =============================================================================== 0004ab40 <_Watchdog_Tickle>: * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 4ab40: 203c 0000 0700 movel #1792,%d0 #include void _Watchdog_Tickle( Chain_Control *header ) { 4ab46: 4e56 ffe8 linkw %fp,#-24 4ab4a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4ab4e: 286e 0008 moveal %fp@(8),%a4 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 4ab52: 40c2 movew %sr,%d2 4ab54: 8082 orl %d2,%d0 4ab56: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4ab58: 264c moveal %a4,%a3 4ab5a: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 4ab5c: b7ca cmpal %a2,%a3 4ab5e: 673c beqs 4ab9c <_Watchdog_Tickle+0x5c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 4ab60: 202a 0010 movel %a2@(16),%d0 4ab64: 6708 beqs 4ab6e <_Watchdog_Tickle+0x2e> <== NEVER TAKEN the_watchdog->delta_interval--; 4ab66: 5380 subql #1,%d0 4ab68: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 4ab6c: 662e bnes 4ab9c <_Watchdog_Tickle+0x5c> 4ab6e: 4bf9 0004 aaa0 lea 4aaa0 <_Watchdog_Remove>,%a5 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4ab74: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4ab7a: 2f0a movel %a2,%sp@- 4ab7c: 4e95 jsr %a5@ _ISR_Enable( level ); 4ab7e: 46c2 movew %d2,%sr switch( watchdog_state ) { 4ab80: 7202 moveq #2,%d1 4ab82: 588f addql #4,%sp 4ab84: b280 cmpl %d0,%d1 4ab86: 6720 beqs 4aba8 <_Watchdog_Tickle+0x68> <== ALWAYS TAKEN case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4ab88: 2003 movel %d3,%d0 4ab8a: 40c2 movew %sr,%d2 4ab8c: 8082 orl %d2,%d0 4ab8e: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4ab90: 2454 moveal %a4@,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 4ab92: b5cb cmpal %a3,%a2 4ab94: 6706 beqs 4ab9c <_Watchdog_Tickle+0x5c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 4ab96: 4aaa 0010 tstl %a2@(16) 4ab9a: 67de beqs 4ab7a <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 4ab9c: 46c2 movew %d2,%sr } 4ab9e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4aba4: 4e5e unlk %fp 4aba6: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 4aba8: 2f2a 0024 movel %a2@(36),%sp@- 4abac: 2f2a 0020 movel %a2@(32),%sp@- 4abb0: 206a 001c moveal %a2@(28),%a0 4abb4: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 4abb6: 508f addql #8,%sp 4abb8: 60ce bras 4ab88 <_Watchdog_Tickle+0x48> ... =============================================================================== 0004acf6 <_Workspace_Allocate_or_fatal_error>: void *_Workspace_Allocate_or_fatal_error( size_t size ) { 4acf6: 4e56 0000 linkw %fp,#0 4acfa: 42a7 clrl %sp@- 4acfc: 42a7 clrl %sp@- 4acfe: 2f2e 0008 movel %fp@(8),%sp@- 4ad02: 4879 0006 0ff6 pea 60ff6 <_Workspace_Area> 4ad08: 4eb9 0004 cff0 jsr 4cff0 <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 4ad0e: 4fef 0010 lea %sp@(16),%sp 4ad12: 4a80 tstl %d0 4ad14: 6704 beqs 4ad1a <_Workspace_Allocate_or_fatal_error+0x24> true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 4ad16: 4e5e unlk %fp 4ad18: 4e75 rts memory ); #endif if ( memory == NULL ) _Internal_error_Occurred( 4ad1a: 4878 0003 pea 3 4ad1e: 4878 0001 pea 1 4ad22: 42a7 clrl %sp@- 4ad24: 4eb9 0004 8974 jsr 48974 <_Internal_error_Occurred> ... =============================================================================== 0004abbc <_Workspace_Handler_initialization>: void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { 4abbc: 4e56 ffd8 linkw %fp,#-40 4abc0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4abc4: 266e 0008 moveal %fp@(8),%a3 4abc8: 2c2e 000c movel %fp@(12),%d6 4abcc: 2a2e 0010 movel %fp@(16),%d5 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); 4abd0: 4a39 0005 d986 tstb 5d986 4abd6: 6600 00d2 bnew 4acaa <_Workspace_Handler_initialization+0xee> 4abda: 2839 0005 d958 movel 5d958 ,%d4 4abe0: d8b9 0005 d954 addl 5d954 ,%d4 bool do_zero = rtems_configuration_get_do_zero_of_workspace(); 4abe6: 1e39 0005 d984 moveb 5d984 ,%d7 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4abec: 4a86 tstl %d6 4abee: 6768 beqs 4ac58 <_Workspace_Handler_initialization+0x9c><== NEVER TAKEN /* #define DEBUG_WORKSPACE */ #if defined(DEBUG_WORKSPACE) #include #endif void _Workspace_Handler_initialization( 4abf0: 45eb 0004 lea %a3@(4),%a2 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4abf4: 4283 clrl %d3 Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; 4abf6: 49f9 0004 8708 lea 48708 <_Heap_Initialize>,%a4 for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { memset( area->begin, 0, area->size ); 4abfc: 4bf9 0004 f8b4 lea 4f8b4 ,%a5 size_t i; for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { 4ac02: 4a07 tstb %d7 4ac04: 6660 bnes 4ac66 <_Workspace_Handler_initialization+0xaa> memset( area->begin, 0, area->size ); } if ( area->size > overhead ) { 4ac06: 2412 movel %a2@,%d2 4ac08: 700e moveq #14,%d0 4ac0a: b082 cmpl %d2,%d0 4ac0c: 6440 bccs 4ac4e <_Workspace_Handler_initialization+0x92> uintptr_t space_available; uintptr_t size; if ( unified ) { 4ac0e: 4a39 0005 d985 tstb 5d985 4ac14: 6618 bnes 4ac2e <_Workspace_Handler_initialization+0x72> size = area->size; } else { if ( remaining > 0 ) { 4ac16: 4a84 tstl %d4 4ac18: 675a beqs 4ac74 <_Workspace_Handler_initialization+0xb8><== NEVER TAKEN size = remaining < area->size - overhead ? 4ac1a: 2002 movel %d2,%d0 4ac1c: 0680 ffff fff2 addil #-14,%d0 remaining + overhead : area->size; 4ac22: b880 cmpl %d0,%d4 4ac24: 6408 bccs 4ac2e <_Workspace_Handler_initialization+0x72><== NEVER TAKEN 4ac26: 2404 movel %d4,%d2 4ac28: 0682 0000 000e addil #14,%d2 } else { size = 0; } } space_available = (*init_or_extend)( 4ac2e: 4878 0004 pea 4 4ac32: 2f02 movel %d2,%sp@- 4ac34: 2f13 movel %a3@,%sp@- 4ac36: 4879 0006 0ff6 pea 60ff6 <_Workspace_Area> 4ac3c: 4e94 jsr %a4@ ); area->begin = (char *) area->begin + size; area->size -= size; if ( space_available < remaining ) { 4ac3e: 4fef 0010 lea %sp@(16),%sp area->begin, size, page_size ); area->begin = (char *) area->begin + size; 4ac42: d593 addl %d2,%a3@ area->size -= size; 4ac44: 9592 subl %d2,%a2@ if ( space_available < remaining ) { 4ac46: b880 cmpl %d0,%d4 4ac48: 634e blss 4ac98 <_Workspace_Handler_initialization+0xdc><== ALWAYS TAKEN remaining -= space_available; 4ac4a: 9880 subl %d0,%d4 <== NOT EXECUTED } else { remaining = 0; } init_or_extend = extend; 4ac4c: 2845 moveal %d5,%a4 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4ac4e: 5283 addql #1,%d3 4ac50: 508a addql #8,%a2 4ac52: 508b addql #8,%a3 4ac54: bc83 cmpl %d3,%d6 4ac56: 66aa bnes 4ac02 <_Workspace_Handler_initialization+0x46><== NEVER TAKEN init_or_extend = extend; } } if ( remaining > 0 ) { 4ac58: 4a84 tstl %d4 4ac5a: 6654 bnes 4acb0 <_Workspace_Handler_initialization+0xf4> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } } 4ac5c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4ac62: 4e5e unlk %fp 4ac64: 4e75 rts for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { memset( area->begin, 0, area->size ); 4ac66: 2f12 movel %a2@,%sp@- 4ac68: 42a7 clrl %sp@- 4ac6a: 2f13 movel %a3@,%sp@- 4ac6c: 4e95 jsr %a5@ 4ac6e: 4fef 000c lea %sp@(12),%sp 4ac72: 6092 bras 4ac06 <_Workspace_Handler_initialization+0x4a> } else { size = 0; } } space_available = (*init_or_extend)( 4ac74: 4878 0004 pea 4 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4ac78: 5283 addql #1,%d3 <== NOT EXECUTED 4ac7a: 508a addql #8,%a2 <== NOT EXECUTED } else { size = 0; } } space_available = (*init_or_extend)( 4ac7c: 42a7 clrl %sp@- <== NOT EXECUTED 4ac7e: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 4ac80: 508b addql #8,%a3 <== NOT EXECUTED 4ac82: 4879 0006 0ff6 pea 60ff6 <_Workspace_Area> <== NOT EXECUTED 4ac88: 4e94 jsr %a4@ <== NOT EXECUTED 4ac8a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; 4ac8e: 2845 moveal %d5,%a4 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4ac90: bc83 cmpl %d3,%d6 <== NOT EXECUTED 4ac92: 6600 ff6e bnew 4ac02 <_Workspace_Handler_initialization+0x46><== NOT EXECUTED 4ac96: 60c0 bras 4ac58 <_Workspace_Handler_initialization+0x9c><== NOT EXECUTED remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; 4ac98: 2845 moveal %d5,%a4 area->size -= size; if ( space_available < remaining ) { remaining -= space_available; } else { remaining = 0; 4ac9a: 4284 clrl %d4 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4ac9c: 5283 addql #1,%d3 4ac9e: 508a addql #8,%a2 4aca0: 508b addql #8,%a3 4aca2: bc83 cmpl %d3,%d6 4aca4: 6600 ff5c bnew 4ac02 <_Workspace_Handler_initialization+0x46> 4aca8: 60ae bras 4ac58 <_Workspace_Handler_initialization+0x9c> size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); 4acaa: 4284 clrl %d4 4acac: 6000 ff32 braw 4abe0 <_Workspace_Handler_initialization+0x24> init_or_extend = extend; } } if ( remaining > 0 ) { _Internal_error_Occurred( 4acb0: 4878 0002 pea 2 4acb4: 4878 0001 pea 1 4acb8: 42a7 clrl %sp@- 4acba: 4eb9 0004 8974 jsr 48974 <_Internal_error_Occurred> =============================================================================== 0005cadc <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5cadc: 4e56 0000 linkw %fp,#0 5cae0: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 5cae4: 2d6e 0010 000c movel %fp@(16),%fp@(12) void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5caea: 2d40 0008 movel %d0,%fp@(8) return calloc( elements, size ); } 5caee: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 5caf0: 4ef9 0004 2e28 jmp 42e28 ... =============================================================================== 00052a90 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 52a90: 4e56 ffd8 linkw %fp,#-40 52a94: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 52a98: 246e 0008 moveal %fp@(8),%a2 52a9c: 242e 0014 movel %fp@(20),%d2 52aa0: 286e 0018 moveal %fp@(24),%a4 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 52aa4: 6772 beqs 52b18 <_fat_block_read+0x88> <== NEVER TAKEN 52aa6: 2c0e movel %fp,%d6 52aa8: 4283 clrl %d3 52aaa: 5986 subql #4,%d6 52aac: 47f9 0005 29d4 lea 529d4 ,%a3 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); 52ab2: 4bf9 0005 c068 lea 5c068 ,%a5 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 52ab8: 2a2e 0010 movel %fp@(16),%d5 52abc: 282e 000c movel %fp@(12),%d4 { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 52ac0: 2f06 movel %d6,%sp@- 52ac2: 4878 0001 pea 1 52ac6: 2f04 movel %d4,%sp@- c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); count -= c; cmpltd += c; sec_num++; 52ac8: 5284 addql #1,%d4 uint8_t *sec_buf; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 52aca: 2f0a movel %a2,%sp@- 52acc: 4e93 jsr %a3@ if (rc != RC_OK) 52ace: 4fef 0010 lea %sp@(16),%sp 52ad2: 4a80 tstl %d0 52ad4: 6634 bnes 52b0a <_fat_block_read+0x7a> <== NEVER TAKEN return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 52ad6: 4281 clrl %d1 52ad8: 3212 movew %a2@,%d1 52ada: 9285 subl %d5,%d1 52adc: b481 cmpl %d1,%d2 52ade: 6402 bccs 52ae2 <_fat_block_read+0x52> <== ALWAYS TAKEN 52ae0: 2202 movel %d2,%d1 <== NOT EXECUTED memcpy((buff + cmpltd), (sec_buf + ofs), c); 52ae2: daae fffc addl %fp@(-4),%d5 count -= c; 52ae6: 9481 subl %d1,%d2 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); 52ae8: 2f01 movel %d1,%sp@- 52aea: 2f05 movel %d5,%sp@- 52aec: 4874 3800 pea %a4@(00000000,%d3:l) count -= c; cmpltd += c; 52af0: d681 addl %d1,%d3 sec_num++; ofs = 0; 52af2: 4285 clrl %d5 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); 52af4: 4e95 jsr %a5@ uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 52af6: 4fef 000c lea %sp@(12),%sp 52afa: 4a82 tstl %d2 52afc: 66c2 bnes 52ac0 <_fat_block_read+0x30> cmpltd += c; sec_num++; ofs = 0; } return cmpltd; } 52afe: 2003 movel %d3,%d0 52b00: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 52b06: 4e5e unlk %fp 52b08: 4e75 rts while (count > 0) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; 52b0a: 76ff moveq #-1,%d3 <== NOT EXECUTED cmpltd += c; sec_num++; ofs = 0; } return cmpltd; } 52b0c: 2003 movel %d3,%d0 <== NOT EXECUTED 52b0e: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 52b14: 4e5e unlk %fp <== NOT EXECUTED 52b16: 4e75 rts <== NOT EXECUTED uint32_t count, void *buff ) { int rc = RC_OK; ssize_t cmpltd = 0; 52b18: 4283 clrl %d3 <== NOT EXECUTED cmpltd += c; sec_num++; ofs = 0; } return cmpltd; } 52b1a: 2003 movel %d3,%d0 <== NOT EXECUTED 52b1c: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 52b22: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005cb74 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 5cb74: 4e56 0000 linkw %fp,#0 free( ptr ); 5cb78: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5cb7e: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 5cb80: 4ef9 0004 30cc jmp 430cc ... =============================================================================== 0005cc24 <_fstat_r>: int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 5cc24: 4e56 0000 linkw %fp,#0 5cc28: 202e 000c movel %fp@(12),%d0 return fstat( fd, buf ); 5cc2c: 2d6e 0010 000c movel %fp@(16),%fp@(12) int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 5cc32: 2d40 0008 movel %d0,%fp@(8) return fstat( fd, buf ); } 5cc36: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { return fstat( fd, buf ); 5cc38: 4ef9 0005 cb88 jmp 5cb88 ... =============================================================================== 00043206 <_gettimeofday>: */ int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 43206: 4e56 0000 linkw %fp,#0 return gettimeofday( tp, tzp ); } 4320a: 4e5e unlk %fp int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4320c: 4ef9 0004 315c jmp 4315c ... =============================================================================== 0005cc54 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 5cc54: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5cc58: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5cc5e: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 5cc60: 4ef9 0005 d698 jmp 5d698 ... =============================================================================== 0005ce28 <_kill_r>: int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5ce28: 4e56 0000 linkw %fp,#0 return killinfo( pid, sig, NULL ); 5ce2c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5ce32: 202e 0010 movel %fp@(16),%d0 return killinfo( pid, sig, NULL ); 5ce36: 42ae 0010 clrl %fp@(16) 5ce3a: 2d40 000c movel %d0,%fp@(12) } 5ce3e: 4e5e unlk %fp struct _reent *ptr, pid_t pid, int sig ) { return killinfo( pid, sig, NULL ); 5ce40: 4ef9 0005 d020 jmp 5d020 ... =============================================================================== 0005cce0 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 5cce0: 4e56 0000 linkw %fp,#0 5cce4: 202e 000c movel %fp@(12),%d0 5cce8: 2d40 0008 movel %d0,%fp@(8) 5ccec: 202e 0010 movel %fp@(16),%d0 5ccf0: 222e 0014 movel %fp@(20),%d1 return lseek( fd, offset, whence ); 5ccf4: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 5ccfa: 2d40 000c movel %d0,%fp@(12) 5ccfe: 2d41 0010 movel %d1,%fp@(16) } 5cd02: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 5cd04: 4ef9 0005 cc68 jmp 5cc68 ... =============================================================================== 00042f58 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 42f58: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42f5c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 42f60: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 42f66: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED return _STAT_NAME( path, buf ); } 42f6a: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 42f6c: 4ef9 0004 2ef8 jmp 42ef8 <== NOT EXECUTED ... =============================================================================== 0005cd0c <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5cd0c: 4e56 0000 linkw %fp,#0 return malloc( size ); 5cd10: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5cd16: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5cd18: 4ef9 0004 33cc jmp 433cc ... =============================================================================== 00043f28 <_open_r>: struct _reent *ptr __attribute__((unused)), const char *buf, int oflag, int mode ) { 43f28: 4e56 0000 linkw %fp,#0 43f2c: 202e 0010 movel %fp@(16),%d0 43f30: 222e 000c movel %fp@(12),%d1 return open( buf, oflag, mode ); 43f34: 2d6e 0014 0010 movel %fp@(20),%fp@(16) struct _reent *ptr __attribute__((unused)), const char *buf, int oflag, int mode ) { 43f3a: 2d41 0008 movel %d1,%fp@(8) return open( buf, oflag, mode ); 43f3e: 2d40 000c movel %d0,%fp@(12) } 43f42: 4e5e unlk %fp const char *buf, int oflag, int mode ) { return open( buf, oflag, mode ); 43f44: 4ef9 0004 3d00 jmp 43d00 ... =============================================================================== 0005cde8 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5cde8: 4e56 0000 linkw %fp,#0 5cdec: 202e 000c movel %fp@(12),%d0 return realloc( ptr, size ); 5cdf0: 2d6e 0010 000c movel %fp@(16),%fp@(12) void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5cdf6: 2d40 0008 movel %d0,%fp@(8) return realloc( ptr, size ); } 5cdfa: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5cdfc: 4ef9 0005 ce48 jmp 5ce48 ... =============================================================================== 00043fd0 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 43fd0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43fd4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 43fd8: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 43fde: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED return _STAT_NAME( path, buf ); } 43fe2: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 43fe4: 4ef9 0004 3f70 jmp 43f70 <== NOT EXECUTED ... =============================================================================== 000469e8 <_times_r>: */ clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { 469e8: 4e56 0000 linkw %fp,#0 return _times( ptms ); 469ec: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 469f2: 4e5e unlk %fp clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { return _times( ptms ); 469f4: 4ef9 0004 6924 jmp 46924 <_times> ... =============================================================================== 000480d0 <_unlink_r>: */ int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 480d0: 4e56 0000 linkw %fp,#0 return unlink( path ); 480d4: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 480da: 4e5e unlk %fp int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 480dc: 4ef9 0004 8030 jmp 48030 ... =============================================================================== 0005ce04 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5ce04: 4e56 0000 linkw %fp,#0 5ce08: 202e 0010 movel %fp@(16),%d0 5ce0c: 222e 000c movel %fp@(12),%d1 return write( fd, buf, nbytes ); 5ce10: 2d6e 0014 0010 movel %fp@(20),%fp@(16) struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5ce16: 2d41 0008 movel %d1,%fp@(8) return write( fd, buf, nbytes ); 5ce1a: 2d40 000c movel %d0,%fp@(12) } 5ce1e: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5ce20: 4ef9 0005 cf7c jmp 5cf7c ... =============================================================================== 0004727c : */ int adjtime( const struct timeval *delta, struct timeval *olddelta ) { 4727c: 4e56 ffe0 linkw %fp,#-32 47280: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 47284: 246e 0008 moveal %fp@(8),%a2 47288: 266e 000c moveal %fp@(12),%a3 long adjustment; /* * Simple validations */ if ( !delta ) 4728c: 4a8a tstl %a2 4728e: 6700 0136 beqw 473c6 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 47292: 202a 0004 movel %a2@(4),%d0 47296: 0c80 000f 423f cmpil #999999,%d0 4729c: 6200 0128 bhiw 473c6 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 472a0: 4a8b tstl %a3 472a2: 670a beqs 472ae olddelta->tv_sec = 0; olddelta->tv_usec = 0; 472a4: 42ab 0004 clrl %a3@(4) 472a8: 202a 0004 movel %a2@(4),%d0 if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; 472ac: 4293 clrl %a3@ olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 472ae: 223c 000f 4240 movel #1000000,%d1 472b4: 4c12 1800 mulsl %a2@,%d1 adjustment += delta->tv_usec; 472b8: d081 addl %d1,%d0 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 472ba: b0b9 0005 ea6c cmpl 5ea6c ,%d0 472c0: 640c bccs 472ce return 0; 472c2: 4280 clrl %d0 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 472c4: 4cee 0c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a3 472ca: 4e5e unlk %fp 472cc: 4e75 rts * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 472ce: 2039 0006 25ae movel 625ae <_Thread_Dispatch_disable_level>,%d0 ++level; 472d4: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 472d6: 23c0 0006 25ae movel %d0,625ae <_Thread_Dispatch_disable_level> ) { Timestamp_Control tod_as_timestamp; Timestamp_Control *tod_as_timestamp_ptr; tod_as_timestamp_ptr = 472dc: 4879 0006 2550 pea 62550 <_TOD> _TOD_Get_with_nanoseconds( &tod_as_timestamp, &_TOD.now ); 472e2: 280e movel %fp,%d4 472e4: 5184 subql #8,%d4 ) { Timestamp_Control tod_as_timestamp; Timestamp_Control *tod_as_timestamp_ptr; tod_as_timestamp_ptr = 472e6: 2f04 movel %d4,%sp@- 472e8: 4eb9 0004 8dac jsr 48dac <_TOD_Get_with_nanoseconds> 472ee: 2040 moveal %d0,%a0 472f0: 2410 movel %a0@,%d2 472f2: 2628 0004 movel %a0@(4),%d3 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 472f6: 2f3c 3b9a ca00 movel #1000000000,%sp@- 472fc: 42a7 clrl %sp@- 472fe: 2f03 movel %d3,%sp@- 47300: 2f02 movel %d2,%sp@- 47302: 4eb9 0005 c8a4 jsr 5c8a4 <__divdi3> _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 47308: 2a12 movel %a2@,%d5 4730a: 4fef 0010 lea %sp@(16),%sp 4730e: da81 addl %d1,%d5 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 47310: 2f3c 3b9a ca00 movel #1000000000,%sp@- 47316: 42a7 clrl %sp@- 47318: 2f03 movel %d3,%sp@- 4731a: 2f02 movel %d2,%sp@- 4731c: 4eb9 0005 cd04 jsr 5cd04 <__moddi3> ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 47322: 242a 0004 movel %a2@(4),%d2 47326: 203c 0000 03e8 movel #1000,%d0 4732c: 4c00 2800 mulsl %d0,%d2 int _EXFUN(setitimer, (int __which, const struct itimerval *__value, struct itimerval *__ovalue)); #if defined(__rtems__) /* BSD function used by RTEMS code */ int _EXFUN(adjtime,(const struct timeval *, struct timeval *)); 47330: 2045 moveal %d5,%a0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 47332: 4fef 0018 lea %sp@(24),%sp 47336: 5288 addql #1,%a0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 47338: d282 addl %d2,%d1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4733a: 0c81 3b9a c9ff cmpil #999999999,%d1 47340: 6312 blss 47354 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; 47342: 2a08 movel %a0,%d5 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 47344: 0681 c465 3600 addil #-1000000000,%d1 4734a: 5288 addql #1,%a0 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4734c: 0c81 3b9a c9ff cmpil #999999999,%d1 47352: 62ee bhis 47342 <== NEVER TAKEN 47354: 2005 movel %d5,%d0 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 47356: 2401 movel %d1,%d2 47358: 5380 subql #1,%d0 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; 4735a: 2200 movel %d0,%d1 ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 4735c: 0682 3b9a ca00 addil #1000000000,%d2 47362: 5380 subql #1,%d0 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 47364: 0c82 c465 3600 cmpil #-1000000000,%d2 4736a: 63ee blss 4735a Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 4736c: 2f3c 3b9a ca00 movel #1000000000,%sp@- const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 47372: 2602 movel %d2,%d3 47374: 5bc2 smi %d2 47376: 49c2 extbl %d2 47378: 42a7 clrl %sp@- 4737a: 2f01 movel %d1,%sp@- 4737c: 5bc0 smi %d0 4737e: 49c0 extbl %d0 47380: 2f00 movel %d0,%sp@- 47382: 4eb9 0005 c83c jsr 5c83c <__muldi3> &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 47388: 4fef 000c lea %sp@(12),%sp 4738c: d283 addl %d3,%d1 4738e: d182 addxl %d2,%d0 47390: 2e84 movel %d4,%sp@ 47392: 2d40 fff8 movel %d0,%fp@(-8) 47396: 2d41 fffc movel %d1,%fp@(-4) 4739a: 4eb9 0004 8e30 jsr 48e30 <_TOD_Set_with_timestamp> ts.tv_sec--; } _TOD_Set( &ts ); _Thread_Enable_dispatch(); 473a0: 4eb9 0004 a664 jsr 4a664 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 473a6: 588f addql #4,%sp 473a8: 4a8b tstl %a3 473aa: 6700 ff16 beqw 472c2 *olddelta = *delta; return 0; 473ae: 4280 clrl %d0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 473b0: 2212 movel %a2@,%d1 473b2: 242a 0004 movel %a2@(4),%d2 473b6: 2681 movel %d1,%a3@ 473b8: 2742 0004 movel %d2,%a3@(4) return 0; } 473bc: 4cee 0c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a3 473c2: 4e5e unlk %fp 473c4: 4e75 rts */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 473c6: 4eb9 0004 faf0 jsr 4faf0 <__errno> 473cc: 7216 moveq #22,%d1 473ce: 2040 moveal %d0,%a0 473d0: 70ff moveq #-1,%d0 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 473d2: 4cee 0c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a3 */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 473d8: 2081 movel %d1,%a0@ /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 473da: 4e5e unlk %fp ... =============================================================================== 000474ac : #include #include #include int aio_cancel(int fildes, struct aiocb *aiocbp) { 474ac: 4e56 ffe8 linkw %fp,#-24 474b0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 474b4: 4879 0006 35ac pea 635ac 474ba: 49f9 0004 8868 lea 48868 ,%a4 #include #include #include int aio_cancel(int fildes, struct aiocb *aiocbp) { 474c0: 242e 0008 movel %fp@(8),%d2 474c4: 246e 000c moveal %fp@(12),%a2 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 474c8: 4e94 jsr %a4@ if (fcntl (fildes, F_GETFD) < 0) { 474ca: 4878 0001 pea 1 474ce: 2f02 movel %d2,%sp@- 474d0: 4eb9 0004 e148 jsr 4e148 474d6: 4fef 000c lea %sp@(12),%sp 474da: 4a80 tstl %d0 474dc: 6d00 01c4 bltw 476a2 pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 474e0: 4a8a tstl %a2 474e2: 6700 00f4 beqw 475d8 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 474e6: 2612 movel %a2@,%d3 474e8: b483 cmpl %d3,%d2 474ea: 6600 00c4 bnew 475b0 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 474ee: 42a7 clrl %sp@- 474f0: 4bf9 0004 7c32 lea 47c32 ,%a5 474f6: 2f03 movel %d3,%sp@- 474f8: 4879 0006 35f4 pea 635f4 474fe: 4e95 jsr %a5@ if (r_chain == NULL) { 47500: 4fef 000c lea %sp@(12),%sp if (aiocbp->aio_fildes != fildes) { pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 47504: 2640 moveal %d0,%a3 if (r_chain == NULL) { 47506: 4a80 tstl %d0 47508: 673c beqs 47546 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 4750a: 2600 movel %d0,%d3 4750c: 0683 0000 001c addil #28,%d3 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&r_chain->mutex); 47512: 4bf9 0004 8904 lea 48904 ,%a5 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 47518: 2f03 movel %d3,%sp@- 4751a: 4e94 jsr %a4@ result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 4751c: 2f0a movel %a2,%sp@- 4751e: 486b 0008 pea %a3@(8) 47522: 4eb9 0004 7d5a jsr 47d5a 47528: 2400 movel %d0,%d2 pthread_mutex_unlock (&r_chain->mutex); 4752a: 2f03 movel %d3,%sp@- 4752c: 4e95 jsr %a5@ pthread_mutex_unlock (&aio_request_queue.mutex); 4752e: 4879 0006 35ac pea 635ac 47534: 4e95 jsr %a5@ return result; 47536: 4fef 0014 lea %sp@(20),%sp } return AIO_ALLDONE; } 4753a: 2002 movel %d2,%d0 4753c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47542: 4e5e unlk %fp 47544: 4e75 rts rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 47546: 203c 0006 3604 movel #407044,%d0 4754c: b0b9 0006 3600 cmpl 63600 ,%d0 47552: 6740 beqs 47594 <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 47554: 42a7 clrl %sp@- 47556: 2f03 movel %d3,%sp@- 47558: 4879 0006 3600 pea 63600 4755e: 4e95 jsr %a5@ if (r_chain == NULL) { 47560: 4fef 000c lea %sp@(12),%sp 47564: 4a80 tstl %d0 47566: 6748 beqs 475b0 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 47568: 2f0a movel %a2,%sp@- 4756a: 2040 moveal %d0,%a0 4756c: 4868 0008 pea %a0@(8) 47570: 4eb9 0004 7d5a jsr 47d5a pthread_mutex_unlock (&aio_request_queue.mutex); 47576: 4879 0006 35ac pea 635ac rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 4757c: 2400 movel %d0,%d2 pthread_mutex_unlock (&aio_request_queue.mutex); 4757e: 4eb9 0004 8904 jsr 48904 return result; 47584: 4fef 000c lea %sp@(12),%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47588: 2002 movel %d2,%d0 4758a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47590: 4e5e unlk %fp 47592: 4e75 rts AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock(&aio_request_queue.mutex); 47594: 4879 0006 35ac pea 635ac return AIO_ALLDONE; 4759a: 7402 moveq #2,%d2 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock(&aio_request_queue.mutex); 4759c: 4eb9 0004 8904 jsr 48904 return AIO_ALLDONE; 475a2: 588f addql #4,%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 475a4: 2002 movel %d2,%d0 475a6: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 475ac: 4e5e unlk %fp 475ae: 4e75 rts r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); 475b0: 4879 0006 35ac pea 635ac rtems_set_errno_and_return_minus_one (EINVAL); 475b6: 74ff moveq #-1,%d2 r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); 475b8: 4eb9 0004 8904 jsr 48904 rtems_set_errno_and_return_minus_one (EINVAL); 475be: 4eb9 0005 15f8 jsr 515f8 <__errno> 475c4: 588f addql #4,%sp 475c6: 2040 moveal %d0,%a0 475c8: 7016 moveq #22,%d0 475ca: 2080 movel %d0,%a0@ pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 475cc: 2002 movel %d2,%d0 475ce: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 475d4: 4e5e unlk %fp 475d6: 4e75 rts /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 475d8: 42a7 clrl %sp@- 475da: 45f9 0004 7c32 lea 47c32 ,%a2 475e0: 2f02 movel %d2,%sp@- 475e2: 4879 0006 35f4 pea 635f4 475e8: 4e92 jsr %a2@ if (r_chain == NULL) { 475ea: 4fef 000c lea %sp@(12),%sp /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 475ee: 2600 movel %d0,%d3 if (r_chain == NULL) { 475f0: 673e beqs 47630 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 475f2: 2640 moveal %d0,%a3 475f4: 47eb 001c lea %a3@(28),%a3 rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_unlock (&r_chain->mutex); 475f8: 45f9 0004 8904 lea 48904 ,%a2 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; 475fe: 4282 clrl %d2 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 47600: 2f0b movel %a3,%sp@- 47602: 4e94 jsr %a4@ */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 47604: 2f03 movel %d3,%sp@- 47606: 4eb9 0004 a4d0 jsr 4a4d0 <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 4760c: 2f03 movel %d3,%sp@- 4760e: 4eb9 0004 7d02 jsr 47d02 pthread_mutex_unlock (&r_chain->mutex); 47614: 2f0b movel %a3,%sp@- 47616: 4e92 jsr %a2@ pthread_mutex_unlock (&aio_request_queue.mutex); 47618: 4879 0006 35ac pea 635ac 4761e: 4e92 jsr %a2@ return AIO_CANCELED; 47620: 4fef 0014 lea %sp@(20),%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47624: 2002 movel %d2,%d0 47626: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4762c: 4e5e unlk %fp 4762e: 4e75 rts r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 47630: 203c 0006 3604 movel #407044,%d0 47636: b0b9 0006 3600 cmpl 63600 ,%d0 4763c: 6700 ff56 beqw 47594 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 47640: 42a7 clrl %sp@- 47642: 2f02 movel %d2,%sp@- 47644: 4879 0006 3600 pea 63600 4764a: 4e92 jsr %a2@ if (r_chain == NULL) { 4764c: 4fef 000c lea %sp@(12),%sp r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 47650: 2600 movel %d0,%d3 if (r_chain == NULL) { 47652: 6700 ff40 beqw 47594 47656: 2f00 movel %d0,%sp@- AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); 47658: 2440 moveal %d0,%a2 4765a: 45ea 001c lea %a2@(28),%a2 pthread_cond_destroy (&r_chain->mutex); free (r_chain); pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; 4765e: 4282 clrl %d2 47660: 4eb9 0004 a4d0 jsr 4a4d0 <_Chain_Extract> } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 47666: 2f03 movel %d3,%sp@- 47668: 4eb9 0004 7d02 jsr 47d02 pthread_mutex_destroy (&r_chain->mutex); 4766e: 2f0a movel %a2,%sp@- 47670: 4eb9 0004 85cc jsr 485cc pthread_cond_destroy (&r_chain->mutex); 47676: 2f0a movel %a2,%sp@- 47678: 4eb9 0004 8258 jsr 48258 free (r_chain); 4767e: 2f03 movel %d3,%sp@- 47680: 4eb9 0004 35f8 jsr 435f8 pthread_mutex_unlock (&aio_request_queue.mutex); 47686: 4879 0006 35ac pea 635ac 4768c: 4eb9 0004 8904 jsr 48904 return AIO_CANCELED; 47692: 4fef 0018 lea %sp@(24),%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47696: 2002 movel %d2,%d0 47698: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4769e: 4e5e unlk %fp 476a0: 4e75 rts int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); 476a2: 4879 0006 35ac pea 635ac rtems_set_errno_and_return_minus_one (EBADF); 476a8: 74ff moveq #-1,%d2 int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); 476aa: 4eb9 0004 8904 jsr 48904 rtems_set_errno_and_return_minus_one (EBADF); 476b0: 4eb9 0005 15f8 jsr 515f8 <__errno> 476b6: 588f addql #4,%sp 476b8: 7209 moveq #9,%d1 476ba: 2040 moveal %d0,%a0 pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 476bc: 2002 movel %d2,%d0 476be: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); 476c4: 2081 movel %d1,%a0@ pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 476c6: 4e5e unlk %fp ... =============================================================================== 000476dc : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 476dc: 203c 0000 2000 movel #8192,%d0 int aio_fsync( int op, struct aiocb *aiocbp ) { 476e2: 4e56 0000 linkw %fp,#0 476e6: 2f0a movel %a2,%sp@- 476e8: 246e 000c moveal %fp@(12),%a2 rtems_aio_request *req; int mode; if (op != O_SYNC) 476ec: b0ae 0008 cmpl %fp@(8),%d0 476f0: 6648 bnes 4773a rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 476f2: 4878 0003 pea 3 476f6: 2f12 movel %a2@,%sp@- 476f8: 4eb9 0004 e148 jsr 4e148 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 476fe: 508f addql #8,%sp 47700: 7203 moveq #3,%d1 47702: c081 andl %d1,%d0 47704: 123c 0001 moveb #1,%d1 47708: 5380 subql #1,%d0 4770a: b280 cmpl %d0,%d1 4770c: 654e bcss 4775c rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 4770e: 4878 0018 pea 18 47712: 4eb9 0004 3a48 jsr 43a48 if (req == NULL) 47718: 588f addql #4,%sp 4771a: 4a80 tstl %d0 4771c: 6760 beqs 4777e <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 4771e: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_SYNC; 47720: 7203 moveq #3,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47722: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_SYNC; 47726: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 4772a: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 4772e: 2d40 0008 movel %d0,%fp@(8) } 47732: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 47734: 4ef9 0004 7dbe jmp 47dbe { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 4773a: 7216 moveq #22,%d1 4773c: 70ff moveq #-1,%d0 4773e: 2541 0030 movel %d1,%a2@(48) 47742: 2540 0034 movel %d0,%a2@(52) 47746: 4eb9 0005 15f8 jsr 515f8 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4774c: 246e fffc moveal %fp@(-4),%a2 { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47750: 2040 moveal %d0,%a0 47752: 7016 moveq #22,%d0 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47754: 4e5e unlk %fp { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47756: 2080 movel %d0,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47758: 70ff moveq #-1,%d0 4775a: 4e75 rts if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 4775c: 72ff moveq #-1,%d1 4775e: 7009 moveq #9,%d0 47760: 2541 0034 movel %d1,%a2@(52) 47764: 2540 0030 movel %d0,%a2@(48) 47768: 4eb9 0005 15f8 jsr 515f8 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4776e: 246e fffc moveal %fp@(-4),%a2 if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47772: 2040 moveal %d0,%a0 47774: 7209 moveq #9,%d1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47776: 70ff moveq #-1,%d0 47778: 4e5e unlk %fp if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 4777a: 2081 movel %d1,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4777c: 4e75 rts if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4777e: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47782: 72ff moveq #-1,%d1 <== NOT EXECUTED 47784: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47788: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 4778c: 4eb9 0005 15f8 jsr 515f8 <__errno> <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47792: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47796: 2040 moveal %d0,%a0 <== NOT EXECUTED 47798: 700b moveq #11,%d0 <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4779a: 4e5e unlk %fp <== NOT EXECUTED if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4779c: 2080 movel %d0,%a0@ <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4779e: 70ff moveq #-1,%d0 <== NOT EXECUTED ... =============================================================================== 00047fec : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 47fec: 4e56 0000 linkw %fp,#0 47ff0: 2f0a movel %a2,%sp@- rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47ff2: 4878 0003 pea 3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 47ff6: 246e 0008 moveal %fp@(8),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47ffa: 2f12 movel %a2@,%sp@- 47ffc: 4eb9 0004 e148 jsr 4e148 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 48002: 508f addql #8,%sp 48004: 7203 moveq #3,%d1 48006: c081 andl %d1,%d0 48008: 6708 beqs 48012 <== NEVER TAKEN 4800a: 123c 0002 moveb #2,%d1 4800e: b280 cmpl %d0,%d1 48010: 6638 bnes 4804a rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 48012: 4aaa 0014 tstl %a2@(20) 48016: 6654 bnes 4806c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 48018: 4aaa 0004 tstl %a2@(4) 4801c: 6b4e bmis 4806c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 4801e: 4878 0018 pea 18 48022: 4eb9 0004 3a48 jsr 43a48 if (req == NULL) 48028: 588f addql #4,%sp 4802a: 4a80 tstl %d0 4802c: 6760 beqs 4808e <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 4802e: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_READ; 48030: 7201 moveq #1,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 48032: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_READ; 48036: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 4803a: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 4803e: 2d40 0008 movel %d0,%fp@(8) } 48042: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 48044: 4ef9 0004 7dbe jmp 47dbe rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 4804a: 7009 moveq #9,%d0 4804c: 72ff moveq #-1,%d1 4804e: 2540 0030 movel %d0,%a2@(48) 48052: 2541 0034 movel %d1,%a2@(52) 48056: 4eb9 0005 15f8 jsr 515f8 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 4805c: 246e fffc moveal %fp@(-4),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 48060: 2040 moveal %d0,%a0 48062: 7009 moveq #9,%d0 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 48064: 4e5e unlk %fp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 48066: 2080 movel %d0,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 48068: 70ff moveq #-1,%d0 4806a: 4e75 rts if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 4806c: 72ff moveq #-1,%d1 4806e: 7016 moveq #22,%d0 48070: 2541 0034 movel %d1,%a2@(52) 48074: 2540 0030 movel %d0,%a2@(48) 48078: 4eb9 0005 15f8 jsr 515f8 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 4807e: 246e fffc moveal %fp@(-4),%a2 if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 48082: 2040 moveal %d0,%a0 48084: 7216 moveq #22,%d1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 48086: 70ff moveq #-1,%d0 48088: 4e5e unlk %fp if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 4808a: 2081 movel %d1,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 4808c: 4e75 rts if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4808e: 103c 000b moveb #11,%d0 <== NOT EXECUTED 48092: 72ff moveq #-1,%d1 <== NOT EXECUTED 48094: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 48098: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 4809c: 4eb9 0005 15f8 jsr 515f8 <__errno> <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 480a2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 480a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 480a8: 700b moveq #11,%d0 <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 480aa: 4e5e unlk %fp <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 480ac: 2080 movel %d0,%a0@ <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 480ae: 70ff moveq #-1,%d0 <== NOT EXECUTED ... =============================================================================== 000480c4 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 480c4: 4e56 0000 linkw %fp,#0 480c8: 2f0a movel %a2,%sp@- rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 480ca: 4878 0003 pea 3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 480ce: 246e 0008 moveal %fp@(8),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 480d2: 2f12 movel %a2@,%sp@- 480d4: 4eb9 0004 e148 jsr 4e148 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 480da: 508f addql #8,%sp 480dc: 7203 moveq #3,%d1 480de: c081 andl %d1,%d0 480e0: 123c 0001 moveb #1,%d1 480e4: 5380 subql #1,%d0 480e6: b280 cmpl %d0,%d1 480e8: 6538 bcss 48122 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 480ea: 4aaa 0014 tstl %a2@(20) 480ee: 6654 bnes 48144 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 480f0: 4aaa 0004 tstl %a2@(4) 480f4: 6b4e bmis 48144 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 480f6: 4878 0018 pea 18 480fa: 4eb9 0004 3a48 jsr 43a48 if (req == NULL) 48100: 588f addql #4,%sp 48102: 4a80 tstl %d0 48104: 6760 beqs 48166 <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 48106: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_WRITE; 48108: 7202 moveq #2,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 4810a: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_WRITE; 4810e: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 48112: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 48116: 2d40 0008 movel %d0,%fp@(8) } 4811a: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 4811c: 4ef9 0004 7dbe jmp 47dbe rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 48122: 7009 moveq #9,%d0 48124: 72ff moveq #-1,%d1 48126: 2540 0030 movel %d0,%a2@(48) 4812a: 2541 0034 movel %d1,%a2@(52) 4812e: 4eb9 0005 15f8 jsr 515f8 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 48134: 246e fffc moveal %fp@(-4),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 48138: 2040 moveal %d0,%a0 4813a: 7009 moveq #9,%d0 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 4813c: 4e5e unlk %fp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 4813e: 2080 movel %d0,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 48140: 70ff moveq #-1,%d0 48142: 4e75 rts if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 48144: 72ff moveq #-1,%d1 48146: 7016 moveq #22,%d0 48148: 2541 0034 movel %d1,%a2@(52) 4814c: 2540 0030 movel %d0,%a2@(48) 48150: 4eb9 0005 15f8 jsr 515f8 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 48156: 246e fffc moveal %fp@(-4),%a2 if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 4815a: 2040 moveal %d0,%a0 4815c: 7216 moveq #22,%d1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 4815e: 70ff moveq #-1,%d0 48160: 4e5e unlk %fp if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 48162: 2081 movel %d1,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 48164: 4e75 rts if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 48166: 103c 000b moveb #11,%d0 <== NOT EXECUTED 4816a: 72ff moveq #-1,%d1 <== NOT EXECUTED 4816c: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 48170: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 48174: 4eb9 0005 15f8 jsr 515f8 <__errno> <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 4817a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4817e: 2040 moveal %d0,%a0 <== NOT EXECUTED 48180: 700b moveq #11,%d0 <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 48182: 4e5e unlk %fp <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 48184: 2080 movel %d0,%a0@ <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 48186: 70ff moveq #-1,%d0 <== NOT EXECUTED ... =============================================================================== 000491d4 : } unsigned int alarm( unsigned int seconds ) { 491d4: 4e56 fff4 linkw %fp,#-12 491d8: 48d7 001c moveml %d2-%d4,%sp@ 491dc: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 491e0: 4ab9 0006 5c94 tstl 65c94 <_POSIX_signals_Alarm_timer+0x1c> 491e6: 674e beqs 49236 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 491e8: 4879 0006 5c78 pea 65c78 <_POSIX_signals_Alarm_timer> 491ee: 4eb9 0004 e2ec jsr 4e2ec <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 491f4: 588f addql #4,%sp 491f6: 7201 moveq #1,%d1 491f8: 5580 subql #2,%d0 491fa: b280 cmpl %d0,%d1 491fc: 645e bccs 4925c unsigned int alarm( unsigned int seconds ) { unsigned int remaining = 0; 491fe: 4283 clrl %d3 remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 49200: 4a82 tstl %d2 49202: 660c bnes 49210 <== NEVER TAKEN _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 49204: 2003 movel %d3,%d0 49206: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4920c: 4e5e unlk %fp 4920e: 4e75 rts ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 49210: 4879 0006 5c78 pea 65c78 <_POSIX_signals_Alarm_timer> 49216: 4879 0006 5fae pea 65fae <_Watchdog_Seconds_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4921c: 23c2 0006 5c84 movel %d2,65c84 <_POSIX_signals_Alarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 49222: 4eb9 0004 e1bc jsr 4e1bc <_Watchdog_Insert> 49228: 508f addql #8,%sp 4922a: 2003 movel %d3,%d0 4922c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 49232: 4e5e unlk %fp 49234: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 49236: 42b9 0006 5c80 clrl 65c80 <_POSIX_signals_Alarm_timer+0x8> unsigned int alarm( unsigned int seconds ) { unsigned int remaining = 0; 4923c: 4283 clrl %d3 the_watchdog->routine = routine; 4923e: 203c 0004 91b8 movel #299448,%d0 the_watchdog->id = id; 49244: 42b9 0006 5c98 clrl 65c98 <_POSIX_signals_Alarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4924a: 23c0 0006 5c94 movel %d0,65c94 <_POSIX_signals_Alarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 49250: 42b9 0006 5c9c clrl 65c9c <_POSIX_signals_Alarm_timer+0x24> remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 49256: 4a82 tstl %d2 49258: 67aa beqs 49204 <== NEVER TAKEN 4925a: 60b4 bras 49210 * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 4925c: 2839 0006 5c90 movel 65c90 <_POSIX_signals_Alarm_timer+0x18>,%d4 49262: 98b9 0006 5c8c subl 65c8c <_POSIX_signals_Alarm_timer+0x14>,%d4 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 49268: 2639 0006 5c84 movel 65c84 <_POSIX_signals_Alarm_timer+0xc>,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 4926e: 4eb9 0004 bd08 jsr 4bd08 49274: 4c40 4004 remul %d0,%d4,%d4 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 49278: 9684 subl %d4,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 4927a: 4a82 tstl %d2 4927c: 6786 beqs 49204 <== NEVER TAKEN 4927e: 6090 bras 49210 =============================================================================== 00043dec : speed_t cfgetispeed( const struct termios *tp ) { return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; 43dec: 4280 clrl %d0 <== NOT EXECUTED #include speed_t cfgetispeed( const struct termios *tp ) { 43dee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43df2: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; } 43df6: 4e5e unlk %fp <== NOT EXECUTED speed_t cfgetispeed( const struct termios *tp ) { return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; 43df8: 3028 0008 movew %a0@(8),%d0 <== NOT EXECUTED } 43dfc: 0280 0000 100f andil #4111,%d0 <== NOT EXECUTED =============================================================================== 00043e04 : * POSIX 1003.1b 7.1.3 - Baud Rate Functions */ speed_t cfgetospeed( const struct termios *tp ) { 43e04: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43e08: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED return tp->c_cflag & CBAUD; } 43e0c: 4e5e unlk %fp <== NOT EXECUTED 43e0e: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED 43e12: 0280 0000 100f andil #4111,%d0 <== NOT EXECUTED ... =============================================================================== 00043e1c : */ int cfsetispeed( struct termios *tp, speed_t speed ) { 43e1c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43e20: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED if ( speed & ~CBAUD ) 43e24: 2001 movel %d1,%d0 <== NOT EXECUTED 43e26: 0280 ffff eff0 andil #-4112,%d0 <== NOT EXECUTED */ int cfsetispeed( struct termios *tp, speed_t speed ) { 43e2c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 43e30: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ( speed & ~CBAUD ) 43e32: 4a80 tstl %d0 <== NOT EXECUTED 43e34: 661e bnes 43e54 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); 43e36: 2428 0008 movel %a0@(8),%d2 <== NOT EXECUTED return 0; 43e3a: 4280 clrl %d0 <== NOT EXECUTED ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); 43e3c: 0282 eff0 ffff andil #-269418497,%d2 <== NOT EXECUTED 43e42: 4841 swap %d1 <== NOT EXECUTED 43e44: 4241 clrw %d1 <== NOT EXECUTED 43e46: 8282 orl %d2,%d1 <== NOT EXECUTED return 0; } 43e48: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 43e4c: 4e5e unlk %fp <== NOT EXECUTED ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); 43e4e: 2141 0008 movel %d1,%a0@(8) <== NOT EXECUTED return 0; } 43e52: 4e75 rts <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 43e54: 4eb9 0005 05bc jsr 505bc <__errno> <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); return 0; } 43e5a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 43e5e: 2040 moveal %d0,%a0 <== NOT EXECUTED 43e60: 7216 moveq #22,%d1 <== NOT EXECUTED 43e62: 70ff moveq #-1,%d0 <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); return 0; } 43e64: 4e5e unlk %fp <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 43e66: 2081 movel %d1,%a0@ <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); return 0; } ... =============================================================================== 00043e6c : */ int cfsetospeed( struct termios *tp, speed_t speed ) { 43e6c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43e70: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED if ( speed & ~CBAUD ) 43e74: 2001 movel %d1,%d0 <== NOT EXECUTED 43e76: 0280 ffff eff0 andil #-4112,%d0 <== NOT EXECUTED */ int cfsetospeed( struct termios *tp, speed_t speed ) { 43e7c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 43e80: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ( speed & ~CBAUD ) 43e82: 4a80 tstl %d0 <== NOT EXECUTED 43e84: 661a bnes 43ea0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 43e86: 2428 0008 movel %a0@(8),%d2 <== NOT EXECUTED return 0; 43e8a: 4280 clrl %d0 <== NOT EXECUTED ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 43e8c: 0282 ffff eff0 andil #-4112,%d2 <== NOT EXECUTED 43e92: 8282 orl %d2,%d1 <== NOT EXECUTED return 0; } 43e94: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 43e98: 4e5e unlk %fp <== NOT EXECUTED ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 43e9a: 2141 0008 movel %d1,%a0@(8) <== NOT EXECUTED return 0; } 43e9e: 4e75 rts <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 43ea0: 4eb9 0005 05bc jsr 505bc <__errno> <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; return 0; } 43ea6: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 43eaa: 2040 moveal %d0,%a0 <== NOT EXECUTED 43eac: 7216 moveq #22,%d1 <== NOT EXECUTED 43eae: 70ff moveq #-1,%d0 <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; return 0; } 43eb0: 4e5e unlk %fp <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 43eb2: 2081 movel %d1,%a0@ <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; return 0; } ... =============================================================================== 00048590 : rtems_rbtree_control *chunk_tree, rtems_rbheap_chunk *a, rtems_rbheap_chunk *b ) { if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) { 48590: 72f8 moveq #-8,%d1 rtems_chain_control *free_chain, rtems_rbtree_control *chunk_tree, rtems_rbheap_chunk *a, rtems_rbheap_chunk *b ) { 48592: 4e56 fff4 linkw %fp,#-12 48596: 202e 000c movel %fp@(12),%d0 4859a: 48d7 1c00 moveml %a2-%a4,%sp@ 4859e: 266e 0008 moveal %fp@(8),%a3 485a2: 226e 0010 moveal %fp@(16),%a1 485a6: 206e 0014 moveal %fp@(20),%a0 if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) { 485aa: b288 cmpl %a0,%d1 485ac: 6754 beqs 48602 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); 485ae: 2450 moveal %a0@,%a2 485b0: 4a8a tstl %a2 485b2: 6748 beqs 485fc if (b->begin < a->begin) { 485b4: 2229 0018 movel %a1@(24),%d1 485b8: b2a8 0018 cmpl %a0@(24),%d1 485bc: 6308 blss 485c6 485be: 2451 moveal %a1@,%a2 485c0: 2209 movel %a1,%d1 485c2: 2248 moveal %a0,%a1 485c4: 2041 moveal %d1,%a0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 485c6: 2868 0004 moveal %a0@(4),%a4 a = b; b = t; } a->size += b->size; 485ca: 2228 001c movel %a0@(28),%d1 485ce: d3a9 001c addl %d1,%a1@(28) next->previous = previous; previous->next = next; 485d2: 288a movel %a2,%a4@ ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 485d4: 2253 moveal %a3@,%a1 Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 485d6: 254c 0004 movel %a4,%a2@(4) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; 485da: 2688 movel %a0,%a3@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 485dc: 214b 0004 movel %a3,%a0@(4) rtems_chain_extract_unprotected(&b->chain_node); add_to_chain(free_chain, b); _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); } } 485e0: 4cd7 1c00 moveml %sp@,%a2-%a4 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 485e4: 2089 movel %a1,%a0@ before_node->previous = the_node; 485e6: 2348 0004 movel %a0,%a1@(4) } a->size += b->size; rtems_chain_extract_unprotected(&b->chain_node); add_to_chain(free_chain, b); _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); 485ea: 5088 addql #8,%a0 485ec: 2d40 0008 movel %d0,%fp@(8) 485f0: 2d48 000c movel %a0,%fp@(12) } } 485f4: 4e5e unlk %fp } a->size += b->size; rtems_chain_extract_unprotected(&b->chain_node); add_to_chain(free_chain, b); _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); 485f6: 4ef9 0004 9fbe jmp 49fbe <_RBTree_Extract_unprotected> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); 485fc: 4aa8 0004 tstl %a0@(4) 48600: 66b2 bnes 485b4 <== NEVER TAKEN } } 48602: 4cd7 1c00 moveml %sp@,%a2-%a4 48606: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000429a8 : #include #include int chroot( const char *path ) { 429a8: 4e56 ffac linkw %fp,#-84 429ac: 2f0a movel %a2,%sp@- /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( 429ae: 4879 0005 e468 pea 5e468 eval_flags, &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); 429b4: 45ee ffb0 lea %fp@(-80),%a2 /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( 429b8: 4879 0005 e46c pea 5e46c 429be: 4878 0019 pea 19 429c2: 2f2e 0008 movel %fp@(8),%sp@- 429c6: 486e ffc8 pea %fp@(-56) 429ca: 4eb9 0004 3fd8 jsr 43fd8 429d0: 486e ffe0 pea %fp@(-32) 429d4: 2f0a movel %a2,%sp@- 429d6: 4eb9 0004 4504 jsr 44504 &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); 429dc: 2f0a movel %a2,%sp@- 429de: 45f9 0004 4624 lea 44624 ,%a2 429e4: 4eb9 0004 4748 jsr 44748 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 429ea: 4fef 0020 lea %sp@(32),%sp 429ee: 223c 0005 d404 movel #381956,%d1 429f4: 2040 moveal %d0,%a0 &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); 429f6: 2d40 ffac movel %d0,%fp@(-84) if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 429fa: b2a8 0010 cmpl %a0@(16),%d1 429fe: 674a beqs 42a4a rtems_filesystem_global_location_t *new_root_loc = 42a00: 486e ffac pea %fp@(-84) 42a04: 4eb9 0004 4698 jsr 44698 42a0a: 2440 moveal %d0,%a2 rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = (*new_root_loc->location.mt_entry->ops->node_type_h)( 42a0c: 206a 0014 moveal %a2@(20),%a0 42a10: 2068 000c moveal %a0@(12),%a0 rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { rtems_filesystem_global_location_t *new_root_loc = rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = 42a14: 2f00 movel %d0,%sp@- 42a16: 2068 0014 moveal %a0@(20),%a0 42a1a: 4e90 jsr %a0@ (*new_root_loc->location.mt_entry->ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { 42a1c: 508f addql #8,%sp 42a1e: 4a80 tstl %d0 42a20: 6644 bnes 42a66 sc = rtems_libio_set_private_env(); 42a22: 4eb9 0004 37f8 jsr 437f8 if (sc == RTEMS_SUCCESSFUL) { 42a28: 4a80 tstl %d0 42a2a: 6760 beqs 42a8c rtems_filesystem_global_location_assign( &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 42a2c: 720d moveq #13,%d1 42a2e: b280 cmpl %d0,%d1 42a30: 670c beqs 42a3e <== NEVER TAKEN errno = ENOMEM; 42a32: 4eb9 0004 b040 jsr 4b040 <__errno> 42a38: 720c moveq #12,%d1 42a3a: 2040 moveal %d0,%a0 42a3c: 2081 movel %d1,%a0@ rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); 42a3e: 2f0a movel %a2,%sp@- 42a40: 45f9 0004 4624 lea 44624 ,%a2 42a46: 4e92 jsr %a2@ 42a48: 588f addql #4,%sp } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 42a4a: 486e ffc8 pea %fp@(-56) 42a4e: 4eb9 0004 415e jsr 4415e if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); 42a54: 2f2e ffac movel %fp@(-84),%sp@- 42a58: 4e92 jsr %a2@ } return rv; } 42a5a: 246e ffa8 moveal %fp@(-88),%a2 } rtems_filesystem_eval_path_cleanup( &ctx ); if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); 42a5e: 508f addql #8,%sp 42a60: 70ff moveq #-1,%d0 } return rv; } 42a62: 4e5e unlk %fp 42a64: 4e75 rts static inline void rtems_filesystem_location_error( const rtems_filesystem_location_info_t *loc, int eno ) { if ( !rtems_filesystem_location_is_null( loc ) ) { 42a66: 203c 0005 d404 movel #381956,%d0 42a6c: b0aa 0010 cmpl %a2@(16),%d0 42a70: 67cc beqs 42a3e <== NEVER TAKEN errno = eno; 42a72: 4eb9 0004 b040 jsr 4b040 <__errno> 42a78: 2040 moveal %d0,%a0 42a7a: 7014 moveq #20,%d0 42a7c: 2080 movel %d0,%a0@ rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); 42a7e: 2f0a movel %a2,%sp@- 42a80: 45f9 0004 4624 lea 44624 ,%a2 42a86: 4e92 jsr %a2@ 42a88: 588f addql #4,%sp 42a8a: 60be bras 42a4a ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { sc = rtems_libio_set_private_env(); if (sc == RTEMS_SUCCESSFUL) { rtems_filesystem_global_location_assign( 42a8c: 2079 0005 e464 moveal 5e464 ,%a0 42a92: 5888 addql #4,%a0 42a94: 2f0a movel %a2,%sp@- 42a96: 45f9 0004 466e lea 4466e ,%a2 42a9c: 2f08 movel %a0,%sp@- 42a9e: 4e92 jsr %a2@ &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 42aa0: 2f2e ffac movel %fp@(-84),%sp@- 42aa4: 2f39 0005 e464 movel 5e464 ,%sp@- 42aaa: 4e92 jsr %a2@ } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 42aac: 486e ffc8 pea %fp@(-56) 42ab0: 4eb9 0004 415e jsr 4415e if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } 42ab6: 246e ffa8 moveal %fp@(-88),%a2 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 42aba: 4fef 0014 lea %sp@(20),%sp 42abe: 4280 clrl %d0 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } 42ac0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000470c8 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 470c8: 4e56 ffec linkw %fp,#-20 470cc: 202e 0008 movel %fp@(8),%d0 470d0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 470d4: 246e 000c moveal %fp@(12),%a2 if ( !tp ) 470d8: 4a8a tstl %a2 470da: 671a beqs 470f6 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 470dc: 7201 moveq #1,%d1 470de: b280 cmpl %d0,%d1 470e0: 675a beqs 4713c _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 470e2: 7204 moveq #4,%d1 470e4: b280 cmpl %d0,%d1 470e6: 673e beqs 47126 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 470e8: 7202 moveq #2,%d1 470ea: b280 cmpl %d0,%d1 470ec: 6738 beqs 47126 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 470ee: 123c 0003 moveb #3,%d1 470f2: b280 cmpl %d0,%d1 470f4: 6718 beqs 4710e rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 470f6: 4eb9 0005 0090 jsr 50090 <__errno> 470fc: 7216 moveq #22,%d1 470fe: 2040 moveal %d0,%a0 47100: 70ff moveq #-1,%d0 return 0; } 47102: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 47108: 2081 movel %d1,%a0@ return 0; } 4710a: 4e5e unlk %fp 4710c: 4e75 rts } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); 4710e: 4eb9 0005 0090 jsr 50090 <__errno> 47114: 7458 moveq #88,%d2 47116: 2040 moveal %d0,%a0 47118: 70ff moveq #-1,%d0 4711a: 2082 movel %d2,%a0@ #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 4711c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47122: 4e5e unlk %fp 47124: 4e75 rts _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { _TOD_Get_uptime_as_timespec( tp ); 47126: 2f0a movel %a2,%sp@- 47128: 4eb9 0004 9330 jsr 49330 <_TOD_Get_uptime_as_timespec> return 0; 4712e: 588f addql #4,%sp 47130: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 47132: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47138: 4e5e unlk %fp 4713a: 4e75 rts ) { Timestamp_Control tod_as_timestamp; Timestamp_Control *tod_as_timestamp_ptr; tod_as_timestamp_ptr = 4713c: 4879 0006 2d68 pea 62d68 <_TOD> 47142: 486e fff8 pea %fp@(-8) 47146: 4eb9 0004 92e4 jsr 492e4 <_TOD_Get_with_nanoseconds> 4714c: 2040 moveal %d0,%a0 4714e: 2410 movel %a0@,%d2 47150: 2628 0004 movel %a0@(4),%d3 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 47154: 2f3c 3b9a ca00 movel #1000000000,%sp@- 4715a: 42a7 clrl %sp@- 4715c: 2f03 movel %d3,%sp@- 4715e: 2f02 movel %d2,%sp@- 47160: 4eb9 0005 d4ec jsr 5d4ec <__divdi3> _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 47166: 4fef 000c lea %sp@(12),%sp 4716a: 2ebc 3b9a ca00 movel #1000000000,%sp@ 47170: 42a7 clrl %sp@- static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 47172: 2481 movel %d1,%a2@ _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 47174: 2f03 movel %d3,%sp@- 47176: 2f02 movel %d2,%sp@- 47178: 4eb9 0005 d94c jsr 5d94c <__moddi3> 4717e: 4fef 0018 lea %sp@(24),%sp if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); return 0; 47182: 4280 clrl %d0 47184: 2541 0004 movel %d1,%a2@(4) #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 47188: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4718e: 4e5e unlk %fp ... =============================================================================== 000669a0 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 669a0: 4e56 fff8 linkw %fp,#-8 669a4: 202e 0008 movel %fp@(8),%d0 669a8: 2f03 movel %d3,%sp@- 669aa: 206e 000c moveal %fp@(12),%a0 669ae: 2f02 movel %d2,%sp@- if ( !tp ) 669b0: 4a88 tstl %a0 669b2: 6712 beqs 669c6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 669b4: 7201 moveq #1,%d1 669b6: b280 cmpl %d0,%d1 669b8: 6740 beqs 669fa _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 669ba: 7202 moveq #2,%d1 669bc: b280 cmpl %d0,%d1 669be: 6720 beqs 669e0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 669c0: 7203 moveq #3,%d1 669c2: b280 cmpl %d0,%d1 669c4: 671a beqs 669e0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 669c6: 4eb9 0007 8640 jsr 78640 <__errno> return 0; } 669cc: 242e fff0 movel %fp@(-16),%d2 #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 669d0: 2040 moveal %d0,%a0 669d2: 7216 moveq #22,%d1 669d4: 70ff moveq #-1,%d0 return 0; } 669d6: 262e fff4 movel %fp@(-12),%d3 669da: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 669dc: 2081 movel %d1,%a0@ return 0; } 669de: 4e75 rts else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); 669e0: 4eb9 0007 8640 jsr 78640 <__errno> 669e6: 7458 moveq #88,%d2 669e8: 2040 moveal %d0,%a0 669ea: 70ff moveq #-1,%d0 669ec: 2082 movel %d2,%a0@ #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 669ee: 242e fff0 movel %fp@(-16),%d2 669f2: 262e fff4 movel %fp@(-12),%d3 669f6: 4e5e unlk %fp 669f8: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 669fa: 203c 21da e4ff movel #567993599,%d0 66a00: b090 cmpl %a0@,%d0 66a02: 64c2 bccs 669c6 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 66a04: 2039 000a 14da movel a14da <_Thread_Dispatch_disable_level>,%d0 ++level; 66a0a: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 66a0c: 23c0 000a 14da movel %d0,a14da <_Thread_Dispatch_disable_level> Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 66a12: 2f3c 3b9a ca00 movel #1000000000,%sp@- 66a18: 42a7 clrl %sp@- const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 66a1a: 2628 0004 movel %a0@(4),%d3 66a1e: 5bc2 smi %d2 66a20: 49c2 extbl %d2 66a22: 2f10 movel %a0@,%sp@- 66a24: 5bc1 smi %d1 66a26: 49c1 extbl %d1 66a28: 2f01 movel %d1,%sp@- 66a2a: 4eb9 0009 03d4 jsr 903d4 <__muldi3> 66a30: 4fef 0010 lea %sp@(16),%sp 66a34: 204e moveal %fp,%a0 66a36: d283 addl %d3,%d1 66a38: d182 addxl %d2,%d0 66a3a: 2101 movel %d1,%a0@- 66a3c: 2100 movel %d0,%a0@- &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 66a3e: 2f08 movel %a0,%sp@- 66a40: 4eb9 0006 7a74 jsr 67a74 <_TOD_Set_with_timestamp> rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); 66a46: 4eb9 0004 9974 jsr 49974 <_Thread_Enable_dispatch> #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 66a4c: 242e fff0 movel %fp@(-16),%d2 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 66a50: 588f addql #4,%sp 66a52: 4280 clrl %d0 } 66a54: 262e fff4 movel %fp@(-12),%d3 66a58: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043332 : dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { 43332: 4e56 ffe0 linkw %fp,#-32 43336: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ 4333a: 242e 0008 movel %fp@(8),%d2 4333e: 262e 000c movel %fp@(12),%d3 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 43342: 2c39 0006 4c02 movel 64c02 ,%d6 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 43348: 2802 movel %d2,%d4 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.minor; 4334a: 2a03 movel %d3,%d5 4334c: bc84 cmpl %d4,%d6 4334e: 6300 008e blsw 433de 43352: 2479 0006 4c06 moveal 64c06 ,%a2 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 43358: e78c lsll #3,%d4 4335a: 47f2 4800 lea %a2@(00000000,%d4:l),%a3 4335e: 2453 moveal %a3@,%a2 43360: 282b 0004 movel %a3@(4),%d4 43364: 4a8a tstl %a2 43366: 671e beqs 43386 43368: b885 cmpl %d5,%d4 4336a: 631a blss 43386 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; } return disktab [major].minor + minor; 4336c: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 43370: 4a8a tstl %a2 43372: 675e beqs 433d2 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; 43374: 700c moveq #12,%d0 if (dd_entry == NULL) { return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 43376: 4a92 tstl %a2@ 43378: 6700 00be beqw 43438 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 4337c: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 43382: 4e5e unlk %fp 43384: 4e75 rts if (disktab [major].minor == NULL || minor >= disktab[major].size) { rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { 43386: 4a84 tstl %d4 43388: 6600 00a6 bnew 43430 new_size = DISKTAB_INITIAL_SIZE; 4338c: 7c08 moveq #8,%d6 } else { new_size = 2 * old_size; } if (minor >= new_size) { 4338e: bc85 cmpl %d5,%d6 43390: 6204 bhis 43396 new_size = minor + 1; 43392: 2c05 movel %d5,%d6 43394: 5286 addql #1,%d6 } table = realloc(table, new_size * sizeof(*table)); 43396: 2006 movel %d6,%d0 43398: e588 lsll #2,%d0 4339a: 2f00 movel %d0,%sp@- 4339c: 2f0a movel %a2,%sp@- 4339e: 4eb9 0004 556c jsr 4556c if (table == NULL) { 433a4: 508f addql #8,%sp } if (minor >= new_size) { new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 433a6: 2440 moveal %d0,%a2 if (table == NULL) { 433a8: 4a80 tstl %d0 433aa: 6726 beqs 433d2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 433ac: 2006 movel %d6,%d0 433ae: 9084 subl %d4,%d0 433b0: e588 lsll #2,%d0 433b2: 2f00 movel %d0,%sp@- 433b4: 42a7 clrl %sp@- 433b6: 4872 4c00 pea %a2@(00000000,%d4:l:4) 433ba: 4eb9 0005 4124 jsr 54124 disktab [major].minor = table; disktab [major].size = new_size; 433c0: 4fef 000c lea %sp@(12),%sp if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; 433c4: 268a movel %a2,%a3@ disktab [major].size = new_size; } return disktab [major].minor + minor; 433c6: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; 433ca: 2746 0004 movel %d6,%a3@(4) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 433ce: 4a8a tstl %a2 433d0: 66a2 bnes 43374 <== ALWAYS TAKEN alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); return RTEMS_NO_MEMORY; 433d2: 701a moveq #26,%d0 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 433d4: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 433da: 4e5e unlk %fp 433dc: 4e75 rts rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 433de: 2e06 movel %d6,%d7 433e0: de87 addl %d7,%d7 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 433e2: 2039 0006 4c06 movel 64c06 ,%d0 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; if (major >= new_size) { 433e8: be84 cmpl %d4,%d7 433ea: 6204 bhis 433f0 <== NEVER TAKEN new_size = major + 1; 433ec: 2e04 movel %d4,%d7 433ee: 5287 addql #1,%d7 } table = realloc(table, new_size * sizeof(*table)); 433f0: 2207 movel %d7,%d1 433f2: e789 lsll #3,%d1 433f4: 2f01 movel %d1,%sp@- 433f6: 2f00 movel %d0,%sp@- 433f8: 4eb9 0004 556c jsr 4556c if (table == NULL) { 433fe: 508f addql #8,%sp if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); 43400: 2440 moveal %d0,%a2 if (table == NULL) { 43402: 4a80 tstl %d0 43404: 67cc beqs 433d2 <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 43406: 2007 movel %d7,%d0 <== NOT EXECUTED 43408: 9086 subl %d6,%d0 <== NOT EXECUTED 4340a: e788 lsll #3,%d0 <== NOT EXECUTED 4340c: e78e lsll #3,%d6 <== NOT EXECUTED 4340e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43410: 42a7 clrl %sp@- <== NOT EXECUTED 43412: 4872 6800 pea %a2@(00000000,%d6:l) <== NOT EXECUTED 43416: 4eb9 0005 4124 jsr 54124 <== NOT EXECUTED disktab = table; disktab_size = new_size; 4341c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; 43420: 23ca 0006 4c06 movel %a2,64c06 <== NOT EXECUTED disktab_size = new_size; 43426: 23c7 0006 4c02 movel %d7,64c02 <== NOT EXECUTED 4342c: 6000 ff2a braw 43358 <== NOT EXECUTED rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 43430: 2c04 movel %d4,%d6 43432: dc86 addl %d6,%d6 43434: 6000 ff58 braw 4338e if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 43438: 4878 0072 pea 72 4343c: 4eb9 0004 49d4 jsr 449d4 if (dd == NULL) { 43442: 588f addql #4,%sp if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 43444: 2800 movel %d0,%d4 if (dd == NULL) { 43446: 678a beqs 433d2 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 43448: 4aae 0010 tstl %fp@(16) 4344c: 6760 beqs 434ae alloc_name = strdup(name); 4344e: 2f2e 0010 movel %fp@(16),%sp@- 43452: 4eb9 0005 46ec jsr 546ec if (alloc_name == NULL) { 43458: 588f addql #4,%sp if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); 4345a: 2a00 movel %d0,%d5 4345c: 2c00 movel %d0,%d6 if (alloc_name == NULL) { 4345e: 6762 beqs 434c2 <== NEVER TAKEN return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 43460: 2f03 movel %d3,%sp@- 43462: 2f02 movel %d2,%sp@- 43464: 4878 61ff pea 61ff 43468: 2f00 movel %d0,%sp@- 4346a: 4eb9 0004 4b58 jsr 44b58 43470: 4fef 0010 lea %sp@(16),%sp 43474: 4a80 tstl %d0 43476: 6d1a blts 43492 <== NEVER TAKEN free(dd); return RTEMS_UNSATISFIED; } } *dd_entry = dd; 43478: 2484 movel %d4,%a2@ *dd_ptr = dd; 4347a: 206e 0014 moveal %fp@(20),%a0 *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; 4347e: 4280 clrl %d0 return RTEMS_UNSATISFIED; } } *dd_entry = dd; *dd_ptr = dd; 43480: 2084 movel %d4,%a0@ *alloc_name_ptr = alloc_name; 43482: 206e 0018 moveal %fp@(24),%a0 43486: 2086 movel %d6,%a0@ return RTEMS_SUCCESSFUL; } 43488: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 4348e: 4e5e unlk %fp 43490: 4e75 rts } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 43492: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43494: 45f9 0004 4528 lea 44528 ,%a2 <== NOT EXECUTED 4349a: 4e92 jsr %a2@ <== NOT EXECUTED free(dd); 4349c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4349e: 4e92 jsr %a2@ <== NOT EXECUTED return RTEMS_UNSATISFIED; 434a0: 508f addql #8,%sp <== NOT EXECUTED 434a2: 700d moveq #13,%d0 <== NOT EXECUTED *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 434a4: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 434aa: 4e5e unlk %fp <== NOT EXECUTED 434ac: 4e75 rts <== NOT EXECUTED free(dd); return RTEMS_UNSATISFIED; } } *dd_entry = dd; 434ae: 2484 movel %d4,%a2@ *dd_ptr = dd; 434b0: 206e 0014 moveal %fp@(20),%a0 char **alloc_name_ptr ) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; 434b4: 4286 clrl %d6 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; 434b6: 4280 clrl %d0 return RTEMS_UNSATISFIED; } } *dd_entry = dd; *dd_ptr = dd; 434b8: 2084 movel %d4,%a0@ *alloc_name_ptr = alloc_name; 434ba: 206e 0018 moveal %fp@(24),%a0 434be: 2086 movel %d6,%a0@ 434c0: 60c6 bras 43488 if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); 434c2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 434c4: 4eb9 0004 4528 jsr 44528 <== NOT EXECUTED return RTEMS_NO_MEMORY; 434ca: 588f addql #4,%sp <== NOT EXECUTED 434cc: 701a moveq #26,%d0 <== NOT EXECUTED 434ce: 6000 ff04 braw 433d4 <== NOT EXECUTED =============================================================================== 00044322 : * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) 44322: 4e56 ffdc linkw %fp,#-36 44326: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 4432a: 4878 0028 pea 28 4432e: 4878 0001 pea 1 * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) 44332: 266e 000c moveal %fp@(12),%a3 44336: 286e 0008 moveal %fp@(8),%a4 if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; 4433a: 4293 clrl %a3@ if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 4433c: 4eb9 0004 5024 jsr 45024 44342: 508f addql #8,%sp 44344: 2440 moveal %d0,%a2 44346: 4a80 tstl %d0 44348: 6700 00be beqw 44408 /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 4434c: 202c 000c movel %a4@(12),%d0 uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 44350: 7218 moveq #24,%d1 44352: 2e00 movel %d0,%d7 44354: e2af lsrl %d1,%d7 44356: 7618 moveq #24,%d3 byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 44358: 7a18 moveq #24,%d5 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 4435a: 2800 movel %d0,%d4 byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 4435c: 7c18 moveq #24,%d6 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 4435e: e08c lsrl #8,%d4 part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); 44360: 222c 0008 movel %a4@(8),%d1 uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 44364: 2401 movel %d1,%d2 44366: e6aa lsrl %d3,%d2 44368: 2042 moveal %d2,%a0 byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 4436a: 2400 movel %d0,%d2 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 4436c: 2601 movel %d1,%d3 4436e: e08b lsrl #8,%d3 byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 44370: ebaa lsll %d5,%d2 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 44372: 2a00 movel %d0,%d5 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 44374: 2001 movel %d1,%d0 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 44376: e18d lsll #8,%d5 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 44378: eda8 lsll %d6,%d0 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 4437a: e189 lsll #8,%d1 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 4437c: 2c08 movel %a0,%d6 4437e: 0285 00ff 0000 andil #16711680,%d5 44384: 8487 orl %d7,%d2 44386: 0281 00ff 0000 andil #16711680,%d1 4438c: 8086 orl %d6,%d0 4438e: 8485 orl %d5,%d2 44390: 8081 orl %d1,%d0 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 44392: 4285 clrl %d5 44394: 1a2c 0004 moveb %a4@(4),%d5 * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 44398: 2205 movel %d5,%d1 4439a: 0283 0000 ff00 andil #65280,%d3 443a0: 0284 0000 ff00 andil #65280,%d4 if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 443a6: 1494 moveb %a4@,%a2@ 443a8: 8083 orl %d3,%d0 443aa: 8484 orl %d4,%d2 443ac: 2540 0004 movel %d0,%a2@(4) * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 443b0: 7005 moveq #5,%d0 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 443b2: 1545 0001 moveb %d5,%a2@(1) /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); part_desc->size = LE_TO_CPU_U32(temp); 443b6: 2542 0008 movel %d2,%a2@(8) * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 443ba: b081 cmpl %d1,%d0 443bc: 673c beqs 443fa 443be: 0c81 0000 0085 cmpil #133,%d1 443c4: 6734 beqs 443fa <== NEVER TAKEN DOS_P32MB_PARTITION, FAT32_PARTITION ,FAT32_LBA_PARTITION, FAT16_LBA_PARTITION }; return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types))); 443c6: 4878 0006 pea 6 443ca: 2f01 movel %d1,%sp@- 443cc: 4879 0006 3625 pea 63625 443d2: 4eb9 0005 4eb0 jsr 54eb0 443d8: 4fef 000c lea %sp@(12),%sp * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 443dc: 4a80 tstl %d0 443de: 6704 beqs 443e4 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { 443e0: 4a82 tstl %d2 443e2: 6616 bnes 443fa <== ALWAYS TAKEN *new_part_desc = part_desc; } else { /* empty partition */ free(part_desc); 443e4: 2f0a movel %a2,%sp@- 443e6: 4eb9 0004 5344 jsr 45344 443ec: 588f addql #4,%sp } return RTEMS_SUCCESSFUL; 443ee: 4280 clrl %d0 } 443f0: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 443f6: 4e5e unlk %fp 443f8: 4e75 rts * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { *new_part_desc = part_desc; 443fa: 268a movel %a2,%a3@ } else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; 443fc: 4280 clrl %d0 } 443fe: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 44404: 4e5e unlk %fp 44406: 4e75 rts *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; 44408: 701a moveq #26,%d0 <== NOT EXECUTED else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; } 4440a: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 44410: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004251c : #endif #include "devfs.h" void devFS_Show(void) { 4251c: 4e56 ffe8 linkw %fp,#-24 rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { 42520: 203c 0005 b69e movel #374430,%d0 #include "devfs.h" void devFS_Show(void) { rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 42526: 2079 0005 cc1c moveal 5cc1c ,%a0 if (rootloc->mt_entry->ops == &devFS_ops) { 4252c: 2068 0004 moveal %a0@(4),%a0 42530: 2068 0014 moveal %a0@(20),%a0 #endif #include "devfs.h" void devFS_Show(void) { 42534: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { 42538: b0a8 000c cmpl %a0@(12),%d0 4253c: 670a beqs 42548 <== ALWAYS TAKEN (unsigned long) current->minor ); } } } } 4253e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 42544: 4e5e unlk %fp <== NOT EXECUTED 42546: 4e75 rts <== NOT EXECUTED static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; 42548: 2068 0010 moveal %a0@(16),%a0 rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; 4254c: 2a28 0004 movel %a0@(4),%d5 devFS_node *nodes = data->nodes; 42550: 2450 moveal %a0@,%a2 for (i = 0; i < n; ++i) { 42552: 67ea beqs 4253e <== NEVER TAKEN 42554: 4284 clrl %d4 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 42556: 47f9 0004 36a8 lea 436a8 ,%a3 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { devFS_node *current = nodes + i; if (current->name != NULL) { 4255c: 4a92 tstl %a2@ 4255e: 6742 beqs 425a2 size_t j = 0; size_t m = current->namelen; 42560: 262a 0004 movel %a2@(4),%d3 printk("/"); 42564: 4879 0005 b6f2 pea 5b6f2 for (j = 0; j < m; ++j) { 4256a: 4282 clrl %d2 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 4256c: 4e93 jsr %a3@ for (j = 0; j < m; ++j) { 4256e: 588f addql #4,%sp 42570: 4a83 tstl %d3 42572: 671a beqs 4258e <== NEVER TAKEN printk("%c", current->name [j]); 42574: 2052 moveal %a2@,%a0 42576: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { 4257a: 5282 addql #1,%d2 printk("%c", current->name [j]); 4257c: 49c0 extbl %d0 4257e: 2f00 movel %d0,%sp@- 42580: 4879 0005 b6fe pea 5b6fe 42586: 4e93 jsr %a3@ if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { 42588: 508f addql #8,%sp 4258a: b682 cmpl %d2,%d3 4258c: 66e6 bnes 42574 printk("%c", current->name [j]); } printk( 4258e: 2f2a 000c movel %a2@(12),%sp@- 42592: 2f2a 0008 movel %a2@(8),%sp@- 42596: 4879 0005 b6f4 pea 5b6f4 4259c: 4e93 jsr %a3@ 4259e: 4fef 000c lea %sp@(12),%sp const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 425a2: 5284 addql #1,%d4 425a4: 45ea 0014 lea %a2@(20),%a2 425a8: ba84 cmpl %d4,%d5 425aa: 66b0 bnes 4255c (unsigned long) current->minor ); } } } } 425ac: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 425b2: 4e5e unlk %fp ... =============================================================================== 0004c488 : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 4c488: 4e56 ffdc linkw %fp,#-36 4c48c: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4c490: 2a6e 0008 moveal %fp@(8),%a5 ) { size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; 4c494: 4283 clrl %d3 devFS_node *free_node = NULL; 4c496: 97cb subal %a3,%a3 for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 4c498: 4282 clrl %d2 devFS_node *current = nodes + i; if (current->name != NULL) { if ( current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 4c49a: 49f9 0004 f354 lea 4f354 ,%a4 static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; 4c4a0: 206d 002c moveal %a5@(44),%a0 4c4a4: 2068 0010 moveal %a0@(16),%a0 4c4a8: 2450 moveal %a0@,%a2 devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { devFS_node *current = nodes + i; 4c4aa: 220a movel %a2,%d1 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c4ac: 282d 0004 movel %a5@(4),%d4 4c4b0: 2c15 movel %a5@,%d6 size_t pathlen, devFS_node **free_node_ptr ) { size_t i = 0; size_t n = data->count; 4c4b2: 2a28 0004 movel %a0@(4),%d5 devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 4c4b6: ba82 cmpl %d2,%d5 4c4b8: 6722 beqs 4c4dc devFS_node *current = nodes + i; if (current->name != NULL) { 4c4ba: 2012 movel %a2@,%d0 4c4bc: 6708 beqs 4c4c6 if ( 4c4be: 220b movel %a3,%d1 4c4c0: b8aa 0004 cmpl %a2@(4),%d4 4c4c4: 6736 beqs 4c4fc size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 4c4c6: 5282 addql #1,%d2 4c4c8: 4a81 tstl %d1 4c4ca: 6704 beqs 4c4d0 4c4cc: 4a83 tstl %d3 4c4ce: 6642 bnes 4c512 4c4d0: 45ea 0014 lea %a2@(20),%a2 4c4d4: 2641 moveal %d1,%a3 devFS_node *current = nodes + i; 4c4d6: 220a movel %a2,%d1 size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 4c4d8: ba82 cmpl %d2,%d5 4c4da: 66de bnes 4c4ba } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c4dc: 202d 0010 movel %a5@(16),%d0 rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { 4c4e0: 4a83 tstl %d3 4c4e2: 6750 beqs 4c534 if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 4c4e4: 0800 0006 btst #6,%d0 4c4e8: 6632 bnes 4c51c <== ALWAYS TAKEN currentloc->node_access = node; 4c4ea: 2b43 0020 movel %d3,%a5@(32) static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 4c4ee: 42ad 0004 clrl %a5@(4) } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c4f2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4c4f8: 4e5e unlk %fp 4c4fa: 4e75 rts devFS_node *current = nodes + i; if (current->name != NULL) { if ( current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 4c4fc: 2f04 movel %d4,%sp@- 4c4fe: 2f06 movel %d6,%sp@- 4c500: 2f00 movel %d0,%sp@- 4c502: 4e94 jsr %a4@ 4c504: 4fef 000c lea %sp@(12),%sp 4c508: 220b movel %a3,%d1 4c50a: 4a80 tstl %d0 4c50c: 66b8 bnes 4c4c6 4c50e: 260a movel %a2,%d3 4c510: 60b4 bras 4c4c6 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c512: 202d 0010 movel %a5@(16),%d0 &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 4c516: 0800 0006 btst #6,%d0 4c51a: 67ce beqs 4c4ea <== ALWAYS TAKEN currentloc->node_access = node; rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); 4c51c: 4878 0011 pea 11 4c520: 2f0d movel %a5,%sp@- 4c522: 4eb9 0004 52ae jsr 452ae 4c528: 508f addql #8,%sp } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c52a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4c530: 4e5e unlk %fp 4c532: 4e75 rts rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { 4c534: 0800 0005 btst #5,%d0 4c538: 6728 beqs 4c562 <== NEVER TAKEN if (free_node != NULL) { 4c53a: 4a8b tstl %a3 4c53c: 673c beqs 4c57a <== NEVER TAKEN free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 4c53e: 203c 0000 01ff movel #511,%d0 4c544: 2740 0010 movel %d0,%a3@(16) currentloc->node_access = free_node; 4c548: 2b4b 0020 movel %a3,%a5@(32) rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 4c54c: 2b46 0008 movel %d6,%a5@(8) ctx->tokenlen = tokenlen; 4c550: 2b44 000c movel %d4,%a5@(12) static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 4c554: 42ad 0004 clrl %a5@(4) } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c558: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4c55e: 4e5e unlk %fp 4c560: 4e75 rts rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 4c562: 4878 0002 pea 2 <== NOT EXECUTED 4c566: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4c568: 4eb9 0004 52ae jsr 452ae <== NOT EXECUTED 4c56e: 508f addql #8,%sp <== NOT EXECUTED } } } 4c570: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4c576: 4e5e unlk %fp <== NOT EXECUTED 4c578: 4e75 rts <== NOT EXECUTED rtems_filesystem_eval_path_get_path(ctx), rtems_filesystem_eval_path_get_pathlen(ctx) ); rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); 4c57a: 4878 001c pea 1c 4c57e: 2f0d movel %a5,%sp@- 4c580: 4eb9 0004 52ae jsr 452ae 4c586: 508f addql #8,%sp } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c588: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4c58e: 4e5e unlk %fp ... =============================================================================== 00043e34 : dev_t dev ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 43e34: 7003 moveq #3,%d0 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 43e36: 4e56 ffec linkw %fp,#-20 43e3a: 48d7 043c moveml %d2-%d5/%a2,%sp@ 43e3e: 246e 000c moveal %fp@(12),%a2 43e42: 242e 0010 movel %fp@(16),%d2 43e46: 262e 0014 movel %fp@(20),%d3 43e4a: 2a2e 0018 movel %fp@(24),%d5 43e4e: 282e 001c movel %fp@(28),%d4 int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 43e52: b082 cmpl %d2,%d0 43e54: 675e beqs 43eb4 if (S_ISBLK(mode) || S_ISCHR(mode)) { 43e56: 2003 movel %d3,%d0 43e58: 0280 0000 f000 andil #61440,%d0 43e5e: 0c80 0000 6000 cmpil #24576,%d0 43e64: 6708 beqs 43e6e 43e66: 0c80 0000 2000 cmpil #8192,%d0 43e6c: 667e bnes 43eec char *dupname = malloc(namelen); 43e6e: 2f02 movel %d2,%sp@- 43e70: 4eb9 0004 449c jsr 4449c if (dupname != NULL) { 43e76: 588f addql #4,%sp 43e78: 4a80 tstl %d0 43e7a: 6700 008a beqw 43f06 devFS_node *node = parentloc->node_access; 43e7e: 206e 0008 moveal %fp@(8),%a0 43e82: 2068 0008 moveal %a0@(8),%a0 node->name = dupname; 43e86: 2080 movel %d0,%a0@ node->namelen = namelen; 43e88: 2142 0004 movel %d2,%a0@(4) node->major = rtems_filesystem_dev_major_t(dev); 43e8c: 2145 0008 movel %d5,%a0@(8) node->minor = rtems_filesystem_dev_minor_t(dev); 43e90: 2144 000c movel %d4,%a0@(12) node->mode = mode; 43e94: 2143 0010 movel %d3,%a0@(16) memcpy(dupname, name, namelen); 43e98: 2f02 movel %d2,%sp@- 43e9a: 2f0a movel %a2,%sp@- 43e9c: 2f00 movel %d0,%sp@- 43e9e: 4eb9 0004 f3e4 jsr 4f3e4 43ea4: 4fef 000c lea %sp@(12),%sp size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 43ea8: 4280 clrl %d0 rv = -1; } } return rv; } 43eaa: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 43eb0: 4e5e unlk %fp 43eb2: 4e75 rts dev_t dev ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 43eb4: 7264 moveq #100,%d1 43eb6: 1012 moveb %a2@,%d0 43eb8: 49c0 extbl %d0 43eba: b280 cmpl %d0,%d1 43ebc: 6698 bnes 43e56 <== NEVER TAKEN 43ebe: 123c 0065 moveb #101,%d1 43ec2: 102a 0001 moveb %a2@(1),%d0 43ec6: 49c0 extbl %d0 43ec8: b280 cmpl %d0,%d1 43eca: 668a bnes 43e56 <== NEVER TAKEN 43ecc: 123c 0076 moveb #118,%d1 43ed0: 102a 0002 moveb %a2@(2),%d0 43ed4: 49c0 extbl %d0 43ed6: b280 cmpl %d0,%d1 43ed8: 6600 ff7c bnew 43e56 size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 43edc: 4280 clrl %d0 } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { 43ede: 0283 0000 f000 andil #61440,%d3 43ee4: 0c83 0000 4000 cmpil #16384,%d3 43eea: 67be beqs 43eaa <== ALWAYS TAKEN errno = ENOTSUP; 43eec: 4eb9 0004 eab0 jsr 4eab0 <__errno> 43ef2: 2040 moveal %d0,%a0 rv = -1; 43ef4: 70ff moveq #-1,%d0 } } return rv; } 43ef6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { errno = ENOTSUP; 43efc: 20bc 0000 0086 movel #134,%a0@ rv = -1; } } return rv; } 43f02: 4e5e unlk %fp 43f04: 4e75 rts node->major = rtems_filesystem_dev_major_t(dev); node->minor = rtems_filesystem_dev_minor_t(dev); node->mode = mode; memcpy(dupname, name, namelen); } else { errno = ENOMEM; 43f06: 4eb9 0004 eab0 jsr 4eab0 <__errno> 43f0c: 720c moveq #12,%d1 43f0e: 2040 moveal %d0,%a0 rv = -1; 43f10: 70ff moveq #-1,%d0 rv = -1; } } return rv; } 43f12: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 node->major = rtems_filesystem_dev_major_t(dev); node->minor = rtems_filesystem_dev_minor_t(dev); node->mode = mode; memcpy(dupname, name, namelen); } else { errno = ENOMEM; 43f18: 2081 movel %d1,%a0@ rv = -1; } } return rv; } 43f1a: 4e5e unlk %fp ... =============================================================================== 000432d6 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 432d6: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 432da: 42a7 clrl %sp@- 432dc: 42a7 clrl %sp@- 432de: 2f39 0006 4bfe movel 64bfe ,%sp@- 432e4: 4eb9 0004 8c48 jsr 48c48 if (sc == RTEMS_SUCCESSFUL) { 432ea: 4fef 000c lea %sp@(12),%sp 432ee: 4a80 tstl %d0 432f0: 6706 beqs 432f8 <== ALWAYS TAKEN diskdevs_protected = true; return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; 432f2: 7016 moveq #22,%d0 <== NOT EXECUTED } } 432f4: 4e5e unlk %fp <== NOT EXECUTED 432f6: 4e75 rts <== NOT EXECUTED 432f8: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { diskdevs_protected = true; 432fa: 7201 moveq #1,%d1 432fc: 13c1 0006 4bfc moveb %d1,64bfc return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } =============================================================================== 00043304 : static void disk_unlock(void) { 43304: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 43308: 4200 clrb %d0 sc = rtems_semaphore_release(diskdevs_mutex); 4330a: 2f39 0006 4bfe movel 64bfe ,%sp@- static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 43310: 13c0 0006 4bfc moveb %d0,64bfc sc = rtems_semaphore_release(diskdevs_mutex); 43316: 4eb9 0004 8da0 jsr 48da0 if (sc != RTEMS_SUCCESSFUL) { 4331c: 588f addql #4,%sp 4331e: 4a80 tstl %d0 43320: 6604 bnes 43326 <== NEVER TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); } } 43322: 4e5e unlk %fp 43324: 4e75 rts diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); if (sc != RTEMS_SUCCESSFUL) { /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 43326: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 4332c: 4eb9 0004 93f0 jsr 493f0 <== NOT EXECUTED =============================================================================== 00044e0a : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 44e0a: 4e56 fff4 linkw %fp,#-12 44e0e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 44e12: 243c 0000 0700 movel #1792,%d2 44e18: 2002 movel %d2,%d0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 44e1a: 246e 0008 moveal %fp@(8),%a2 { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 44e1e: 40c1 movew %sr,%d1 44e20: 8081 orl %d1,%d0 44e22: 46c0 movew %d0,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 44e24: 206a 0084 moveal %a2@(132),%a0 44e28: 202a 0080 movel %a2@(128),%d0 44e2c: b088 cmpl %a0,%d0 44e2e: 6734 beqs 44e64 44e30: 47f9 0004 7458 lea 47458 ,%a3 tty->rawOutBufState = rob_wait; 44e36: 7002 moveq #2,%d0 44e38: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 44e3c: 46c1 movew %d1,%sr sc = rtems_semaphore_obtain( 44e3e: 42a7 clrl %sp@- 44e40: 42a7 clrl %sp@- 44e42: 2f2a 008c movel %a2@(140),%sp@- 44e46: 4e93 jsr %a3@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44e48: 4fef 000c lea %sp@(12),%sp 44e4c: 4a80 tstl %d0 44e4e: 6620 bnes 44e70 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 44e50: 2002 movel %d2,%d0 44e52: 40c1 movew %sr,%d1 44e54: 8081 orl %d1,%d0 44e56: 46c0 movew %d0,%sr 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) { 44e58: 206a 0084 moveal %a2@(132),%a0 44e5c: 202a 0080 movel %a2@(128),%d0 44e60: b088 cmpl %a0,%d0 44e62: 66d2 bnes 44e36 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 44e64: 46c1 movew %d1,%sr } } 44e66: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44e6c: 4e5e unlk %fp 44e6e: 4e75 rts tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 44e70: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44e72: 4eb9 0004 7c50 jsr 47c50 <== NOT EXECUTED =============================================================================== 00043624 : */ int dup2( int fildes, int fildes2 ) { 43624: 4e56 ffa8 linkw %fp,#-88 43628: 48d7 041c moveml %d2-%d4/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 4362c: 240e movel %fp,%d2 4362e: 0682 ffff ffba addil #-70,%d2 43634: 45f9 0004 3cf0 lea 43cf0 ,%a2 4363a: 2f02 movel %d2,%sp@- */ int dup2( int fildes, int fildes2 ) { 4363c: 262e 0008 movel %fp@(8),%d3 43640: 282e 000c movel %fp@(12),%d4 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 43644: 2f03 movel %d3,%sp@- 43646: 4e92 jsr %a2@ if ( status == -1 ) 43648: 508f addql #8,%sp 4364a: 72ff moveq #-1,%d1 4364c: b280 cmpl %d0,%d1 4364e: 6728 beqs 43678 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 43650: 2f02 movel %d2,%sp@- 43652: 2f04 movel %d4,%sp@- 43654: 4e92 jsr %a2@ if ( status == -1 ) 43656: 508f addql #8,%sp 43658: 72ff moveq #-1,%d1 4365a: b280 cmpl %d0,%d1 4365c: 671a beqs 43678 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 4365e: 2f04 movel %d4,%sp@- 43660: 42a7 clrl %sp@- 43662: 2f03 movel %d3,%sp@- 43664: 4eb9 0004 38f4 jsr 438f4 4366a: 4fef 000c lea %sp@(12),%sp } 4366e: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 43674: 4e5e unlk %fp 43676: 4e75 rts * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); if ( status == -1 ) return -1; 43678: 70ff moveq #-1,%d0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); } 4367a: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 43680: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045c08 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 45c08: 4e56 fff0 linkw %fp,#-16 45c0c: 222e 0008 movel %fp@(8),%d1 45c10: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45c14: 246e 000c moveal %fp@(12),%a2 if ((tty->termios.c_lflag & ECHOCTL) && 45c18: 242a 003c movel %a2@(60),%d2 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 45c1c: 1001 moveb %d1,%d0 if ((tty->termios.c_lflag & ECHOCTL) && 45c1e: 0282 0000 0200 andil #512,%d2 iscntrl(c) && (c != '\t') && (c != '\n')) { 45c24: 0280 0000 00ff andil #255,%d0 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 45c2a: 4a82 tstl %d2 45c2c: 6720 beqs 45c4e <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 45c2e: 2079 0005 f968 moveal 5f968 <__ctype_ptr__>,%a0 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 45c34: 7620 moveq #32,%d3 iscntrl(c) && (c != '\t') && (c != '\n')) { 45c36: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 45c3a: c483 andl %d3,%d2 45c3c: 4a02 tstb %d2 45c3e: 670e beqs 45c4e iscntrl(c) && (c != '\t') && (c != '\n')) { 45c40: 7409 moveq #9,%d2 45c42: b480 cmpl %d0,%d2 45c44: 6708 beqs 45c4e 45c46: 163c 000a moveb #10,%d3 45c4a: b680 cmpl %d0,%d3 45c4c: 6614 bnes 45c62 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 45c4e: 2f0a movel %a2,%sp@- 45c50: 2f00 movel %d0,%sp@- 45c52: 4eba fe04 jsr %pc@(45a58 ) 45c56: 508f addql #8,%sp } } 45c58: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 45c5e: 4e5e unlk %fp 45c60: 4e75 rts iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 45c62: 2f0a movel %a2,%sp@- 45c64: 4878 0002 pea 2 if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 45c68: 7040 moveq #64,%d0 rtems_termios_puts (echobuf, 2, tty); 45c6a: 486e fffe pea %fp@(-2) if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 45c6e: b181 eorl %d0,%d1 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 45c70: 745e moveq #94,%d2 echobuf[1] = c ^ 0x40; 45c72: 1d41 ffff moveb %d1,%fp@(-1) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 45c76: 1d42 fffe moveb %d2,%fp@(-2) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 45c7a: 4eb9 0004 5954 jsr 45954 45c80: 4fef 000c lea %sp@(12),%sp tty->column += 2; 45c84: 54aa 0028 addql #2,%a2@(40) } else { oproc (c, tty); } } 45c88: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 45c8e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000657e8 : void endgrent(void) { 657e8: 4e56 0000 linkw %fp,#0 if (group_fp != NULL) 657ec: 2039 000a 0a38 movel a0a38 ,%d0 657f2: 670a beqs 657fe <== NEVER TAKEN fclose(group_fp); 657f4: 2f00 movel %d0,%sp@- 657f6: 4eb9 0007 877c jsr 7877c 657fc: 588f addql #4,%sp } 657fe: 4e5e unlk %fp ... =============================================================================== 0006569e : void endpwent(void) { 6569e: 4e56 0000 linkw %fp,#0 if (passwd_fp != NULL) 656a2: 2039 000a 095e movel a095e ,%d0 656a8: 670a beqs 656b4 <== NEVER TAKEN fclose(passwd_fp); 656aa: 2f00 movel %d0,%sp@- 656ac: 4eb9 0007 877c jsr 7877c 656b2: 588f addql #4,%sp } 656b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045c92 : * Erase a character or line * 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) 45c92: 4e56 ffe0 linkw %fp,#-32 45c96: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 45c9a: 246e 0008 moveal %fp@(8),%a2 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 45c9e: 47f9 0004 5954 lea 45954 ,%a3 * Erase a character or line * 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) 45ca4: 282e 000c movel %fp@(12),%d4 echo ('\n', tty); return; } } while (tty->ccount) { 45ca8: 202a 0020 movel %a2@(32),%d0 45cac: 676e beqs 45d1c unsigned char c = tty->cbuf[--tty->ccount]; 45cae: 5380 subql #1,%d0 45cb0: 206a 001c moveal %a2@(28),%a0 if (tty->termios.c_lflag & ECHO) { 45cb4: 262a 003c movel %a2@(60),%d3 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 45cb8: 2540 0020 movel %d0,%a2@(32) 45cbc: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 if (tty->termios.c_lflag & ECHO) { 45cc0: 44c3 movew %d3,%ccr 45cc2: 6a54 bpls 45d18 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 45cc4: 4a84 tstl %d4 45cc6: 6608 bnes 45cd0 45cc8: 0803 0004 btst #4,%d3 45ccc: 6700 0142 beqw 45e10 echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 45cd0: 7409 moveq #9,%d2 45cd2: 0281 0000 00ff andil #255,%d1 45cd8: b481 cmpl %d1,%d2 45cda: 6700 0096 beqw 45d72 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 45cde: 2401 movel %d1,%d2 45ce0: 5282 addql #1,%d2 45ce2: 7a20 moveq #32,%d5 45ce4: 2079 0005 f968 moveal 5f968 <__ctype_ptr__>,%a0 45cea: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 45cee: c085 andl %d5,%d0 45cf0: 4a00 tstb %d0 45cf2: 6632 bnes 45d26 <== NEVER TAKEN 45cf4: 49f9 0004 5954 lea 45954 ,%a4 rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 45cfa: 2f0a movel %a2,%sp@- 45cfc: 4878 0003 pea 3 45d00: 4879 0005 e78b pea 5e78b 45d06: 4e94 jsr %a4@ if (tty->column) 45d08: 202a 0028 movel %a2@(40),%d0 45d0c: 4fef 000c lea %sp@(12),%sp 45d10: 6706 beqs 45d18 <== NEVER TAKEN tty->column--; 45d12: 5380 subql #1,%d0 45d14: 2540 0028 movel %d0,%a2@(40) } } } if (!lineFlag) 45d18: 4a84 tstl %d4 45d1a: 668c bnes 45ca8 break; } } 45d1c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 45d22: 4e5e unlk %fp 45d24: 4e75 rts rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 45d26: 0803 0009 btst #9,%d3 <== NOT EXECUTED 45d2a: 67ec beqs 45d18 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 45d2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45d2e: 4878 0003 pea 3 <== NOT EXECUTED 45d32: 49f9 0004 5954 lea 45954 ,%a4 <== NOT EXECUTED 45d38: 4879 0005 e78b pea 5e78b <== NOT EXECUTED 45d3e: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 45d40: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 45d44: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45d48: 6600 00e0 bnew 45e2a <== NOT EXECUTED tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 45d4c: 2079 0005 f968 moveal 5f968 <__ctype_ptr__>,%a0 <== NOT EXECUTED 45d52: 7220 moveq #32,%d1 <== NOT EXECUTED 45d54: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 45d58: c081 andl %d1,%d0 <== NOT EXECUTED 45d5a: 4a00 tstb %d0 <== NOT EXECUTED 45d5c: 679c beqs 45cfa <== NOT EXECUTED 45d5e: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 45d62: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 45d68: 6690 bnes 45cfa <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 45d6a: 4a84 tstl %d4 <== NOT EXECUTED 45d6c: 6600 ff3a bnew 45ca8 <== NOT EXECUTED 45d70: 60aa bras 45d1c <== 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; 45d72: 242a 002c movel %a2@(44),%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45d76: 4a80 tstl %d0 45d78: 6732 beqs 45dac c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 45d7a: 2c03 movel %d3,%d6 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; int i = 0; 45d7c: 4281 clrl %d1 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 45d7e: 0286 0000 0200 andil #512,%d6 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 45d84: 2279 0005 f968 moveal 5f968 <__ctype_ptr__>,%a1 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 45d8a: 4283 clrl %d3 45d8c: 1618 moveb %a0@+,%d3 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 45d8e: 5281 addql #1,%d1 if (c == '\t') { 45d90: 7a09 moveq #9,%d5 45d92: ba83 cmpl %d3,%d5 45d94: 676c beqs 45e02 col = (col | 7) + 1; } else if (iscntrl (c)) { 45d96: 1a31 3801 moveb %a1@(00000001,%d3:l),%d5 45d9a: 7620 moveq #32,%d3 45d9c: ca83 andl %d3,%d5 45d9e: 4a05 tstb %d5 45da0: 6758 beqs 45dfa <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 45da2: 4a86 tstl %d6 <== NOT EXECUTED 45da4: 6702 beqs 45da8 <== NOT EXECUTED col += 2; 45da6: 5482 addql #2,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45da8: b280 cmpl %d0,%d1 <== NOT EXECUTED 45daa: 66de bnes 45d8a <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 45dac: b4aa 0028 cmpl %a2@(40),%d2 45db0: 6c00 ff66 bgew 45d18 rtems_termios_puts ("\b", 1, tty); 45db4: 2f0a movel %a2,%sp@- 45db6: 4878 0001 pea 1 45dba: 4879 0005 e78d pea 5e78d 45dc0: 4e93 jsr %a3@ tty->column--; 45dc2: 202a 0028 movel %a2@(40),%d0 45dc6: 5380 subql #1,%d0 } /* * Back up over the tab */ while (tty->column > col) { 45dc8: 4fef 000c lea %sp@(12),%sp rtems_termios_puts ("\b", 1, tty); tty->column--; 45dcc: 2540 0028 movel %d0,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 45dd0: b480 cmpl %d0,%d2 45dd2: 6c00 ff44 bgew 45d18 rtems_termios_puts ("\b", 1, tty); 45dd6: 2f0a movel %a2,%sp@- 45dd8: 4878 0001 pea 1 45ddc: 4879 0005 e78d pea 5e78d 45de2: 4e93 jsr %a3@ tty->column--; 45de4: 202a 0028 movel %a2@(40),%d0 45de8: 5380 subql #1,%d0 } /* * Back up over the tab */ while (tty->column > col) { 45dea: 4fef 000c lea %sp@(12),%sp rtems_termios_puts ("\b", 1, tty); tty->column--; 45dee: 2540 0028 movel %d0,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 45df2: b480 cmpl %d0,%d2 45df4: 6dbe blts 45db4 45df6: 6000 ff20 braw 45d18 col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 45dfa: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45dfc: b280 cmpl %d0,%d1 45dfe: 668a bnes 45d8a 45e00: 60aa bras 45dac c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 45e02: 7607 moveq #7,%d3 45e04: 8483 orl %d3,%d2 45e06: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45e08: b280 cmpl %d0,%d1 45e0a: 6600 ff7e bnew 45d8a 45e0e: 609c bras 45dac <== 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); 45e10: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 45e14: 4280 clrl %d0 <== NOT EXECUTED 45e16: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED } } if (!lineFlag) break; } } 45e1a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== 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); 45e20: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 45e24: 4e5e unlk %fp <== 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); 45e26: 6000 fde0 braw 45c08 <== NOT EXECUTED } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; 45e2a: 5380 subql #1,%d0 <== NOT EXECUTED 45e2c: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 45e30: 6000 ff1a braw 45d4c <== NOT EXECUTED =============================================================================== 000529d4 : static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 529d4: 4281 clrl %d1 529d6: 4280 clrl %d0 int fat_buf_access(fat_fs_info_t *fs_info, const uint32_t sec_num, const int op_type, uint8_t **sec_buf) { 529d8: 4e56 fff0 linkw %fp,#-16 529dc: 48d7 041c moveml %d2-%d4/%a2,%sp@ 529e0: 246e 0008 moveal %fp@(8),%a2 529e4: 122a 0002 moveb %a2@(2),%d1 529e8: 102a 000c moveb %a2@(12),%d0 529ec: 9081 subl %d1,%d0 529ee: 242e 000c movel %fp@(12),%d2 529f2: 2802 movel %d2,%d4 529f4: e0ac lsrl %d0,%d4 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 529f6: 2604 movel %d4,%d3 529f8: e1ab lsll %d0,%d3 529fa: 2003 movel %d3,%d0 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 529fc: 2602 movel %d2,%d3 529fe: 9680 subl %d0,%d3 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 52a00: e3ab lsll %d1,%d3 sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset (fs_info, sec_num, 0); if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) 52a02: 4a2a 007f tstb %a2@(127) 52a06: 6706 beqs 52a0e 52a08: b4aa 007a cmpl %a2@(122),%d2 52a0c: 673a beqs 52a48 { fat_buf_release(fs_info); 52a0e: 2f0a movel %a2,%sp@- 52a10: 4eb9 0005 2804 jsr 52804 if (op_type == FAT_OP_TYPE_READ) 52a16: 588f addql #4,%sp 52a18: 7001 moveq #1,%d0 52a1a: b0ae 0010 cmpl %fp@(16),%d0 52a1e: 6742 beqs 52a62 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 52a20: 486a 0080 pea %a2@(128) 52a24: 2f04 movel %d4,%sp@- 52a26: 2f2a 005a movel %a2@(90),%sp@- 52a2a: 4eb9 0005 05bc jsr 505bc 52a30: 4fef 000c lea %sp@(12),%sp if (sc != RTEMS_SUCCESSFUL) 52a34: 4a80 tstl %d0 52a36: 6640 bnes 52a78 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = sec_num; 52a38: 2542 007a movel %d2,%a2@(122) fs_info->c.modified = 0; 52a3c: 4200 clrb %d0 52a3e: 1540 007e moveb %d0,%a2@(126) fs_info->c.state = FAT_CACHE_ACTUAL; 52a42: 7001 moveq #1,%d0 52a44: 1540 007f moveb %d0,%a2@(127) } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 52a48: 226a 0080 moveal %a2@(128),%a1 52a4c: d6a9 001a addl %a1@(26),%d3 return RC_OK; 52a50: 4280 clrl %d0 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = sec_num; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 52a52: 206e 0014 moveal %fp@(20),%a0 52a56: 2083 movel %d3,%a0@ return RC_OK; } 52a58: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 52a5e: 4e5e unlk %fp 52a60: 4e75 rts if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) { fat_buf_release(fs_info); if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 52a62: 486a 0080 pea %a2@(128) 52a66: 2f04 movel %d4,%sp@- 52a68: 2f2a 005a movel %a2@(90),%sp@- 52a6c: 4eb9 0005 06be jsr 506be 52a72: 4fef 000c lea %sp@(12),%sp 52a76: 60bc bras 52a34 else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 52a78: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 52a7e: 7605 moveq #5,%d3 <== NOT EXECUTED 52a80: 2040 moveal %d0,%a0 <== NOT EXECUTED 52a82: 70ff moveq #-1,%d0 <== NOT EXECUTED 52a84: 2083 movel %d3,%a0@ <== NOT EXECUTED fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; return RC_OK; } 52a86: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 52a8c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052804 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 52804: 4e56 ffd4 linkw %fp,#-44 52808: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5280c: 246e 0008 moveal %fp@(8),%a2 rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) 52810: 4a2a 007f tstb %a2@(127) 52814: 6700 0122 beqw 52938 return RC_OK; if (fs_info->c.modified) 52818: 4a2a 007e tstb %a2@(126) 5281c: 6700 0126 beqw 52944 { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 52820: 4281 clrl %d1 52822: 322a 0018 movew %a2@(24),%d1 if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; 52826: 202a 007a movel %a2@(122),%d0 bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 5282a: b280 cmpl %d0,%d1 5282c: 6200 0104 bhiw 52932 52830: b0aa 001e cmpl %a2@(30),%d0 52834: 6400 00fc bccw 52932 uint32_t ino ) { return (ino >= fs_info->uino_base); } 52838: 162a 0002 moveb %a2@(2),%d3 5283c: 122a 000c moveb %a2@(12),%d1 uint32_t blk = fat_sector_num_to_block_num(fs_info, sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) 52840: 4a2a 004e tstb %a2@(78) 52844: 6700 0152 beqw 52998 return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 52848: 7401 moveq #1,%d2 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer + blk_ofs, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 5284a: 2f2a 0080 movel %a2@(128),%sp@- 5284e: 47f9 0005 094a lea 5094a ,%a3 52854: 4e93 jsr %a3@ if (sc != RTEMS_SUCCESSFUL) 52856: 588f addql #4,%sp 52858: 4a80 tstl %d0 5285a: 6600 00f8 bnew 52954 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 5285e: 4200 clrb %d0 52860: 1540 007e moveb %d0,%a2@(126) if (sec_of_fat && !fs_info->vol.mirror) 52864: 4a02 tstb %d2 52866: 6700 00b8 beqw 52920 5286a: 4a2a 004e tstb %a2@(78) 5286e: 6600 00b0 bnew 52920 { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 52872: 4280 clrl %d0 52874: 102a 000d moveb %a2@(13),%d0 52878: 7201 moveq #1,%d1 5287a: b280 cmpl %d0,%d1 5287c: 6400 00a2 bccw 52920 52880: 260e movel %fp,%d3 52882: 7001 moveq #1,%d0 52884: 5983 subql #4,%d3 { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 52886: 4bf9 0005 06be lea 506be ,%a5 0); if (blk_ofs == 0 && fs_info->vol.bps == fs_info->vol.bytes_per_block) { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); 5288c: 283c 0005 05bc movel #329148,%d4 { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); } if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); 52892: 49f9 0005 c068 lea 5c068 ,%a4 if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 52898: 7401 moveq #1,%d2 { rtems_bdbuf_buffer *bd; sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i, 5289a: 41ea 001a lea %a2@(26),%a0 5289e: 4c10 0800 mulsl %a0@,%d0 static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 528a2: 4286 clrl %d6 528a4: 4281 clrl %d1 528a6: 1c2a 0002 moveb %a2@(2),%d6 528aa: 122a 000c moveb %a2@(12),%d1 528ae: d0aa 007a addl %a2@(122),%d0 528b2: 9286 subl %d6,%d1 528b4: 2e00 movel %d0,%d7 528b6: e2af lsrl %d1,%d7 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 528b8: 2a07 movel %d7,%d5 528ba: e3ad lsll %d1,%d5 528bc: 2205 movel %d5,%d1 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 528be: 2a00 movel %d0,%d5 528c0: 9a81 subl %d1,%d5 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 528c2: edad lsll %d6,%d5 blk = fat_sector_num_to_block_num(fs_info, sec_num); blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (blk_ofs == 0 528c4: 6610 bnes 528d6 <== ALWAYS TAKEN && fs_info->vol.bps == fs_info->vol.bytes_per_block) 528c6: 4281 clrl %d1 <== NOT EXECUTED 528c8: 4280 clrl %d0 <== NOT EXECUTED 528ca: 3212 movew %a2@,%d1 <== NOT EXECUTED 528cc: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED 528d0: b081 cmpl %d1,%d0 <== NOT EXECUTED 528d2: 6700 0098 beqw 5296c <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 528d6: 2f03 movel %d3,%sp@- 528d8: 2f07 movel %d7,%sp@- 528da: 2f2a 005a movel %a2@(90),%sp@- 528de: 4e95 jsr %a5@ 528e0: 4fef 000c lea %sp@(12),%sp if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 528e4: 5282 addql #1,%d2 } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); } if ( sc != RTEMS_SUCCESSFUL) 528e6: 4a80 tstl %d0 528e8: 6600 0096 bnew 52980 rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); 528ec: 4280 clrl %d0 528ee: 3012 movew %a2@,%d0 528f0: 206e fffc moveal %fp@(-4),%a0 528f4: 2f00 movel %d0,%sp@- 528f6: 2f2a 0084 movel %a2@(132),%sp@- 528fa: daa8 001a addl %a0@(26),%d5 528fe: 2f05 movel %d5,%sp@- 52900: 4e94 jsr %a4@ sc = rtems_bdbuf_release_modified(bd); 52902: 2f2e fffc movel %fp@(-4),%sp@- 52906: 4e93 jsr %a3@ if ( sc != RTEMS_SUCCESSFUL) 52908: 4fef 0010 lea %sp@(16),%sp 5290c: 4a80 tstl %d0 5290e: 6670 bnes 52980 <== NEVER TAKEN if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 52910: 4281 clrl %d1 52912: 122a 000d moveb %a2@(13),%d1 52916: 4280 clrl %d0 52918: 1002 moveb %d2,%d0 5291a: b280 cmpl %d0,%d1 5291c: 6200 ff7c bhiw 5289a sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; 52920: 4280 clrl %d0 { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 52922: 4201 clrb %d1 52924: 1541 007f moveb %d1,%a2@(127) return RC_OK; } 52928: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 5292e: 4e5e unlk %fp 52930: 4e75 rts return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 52932: 4202 clrb %d2 52934: 6000 ff14 braw 5284a fat_buf_release(fat_fs_info_t *fs_info) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; 52938: 4280 clrl %d0 if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 5293a: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 52940: 4e5e unlk %fp 52942: 4e75 rts } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 52944: 2f2a 0080 movel %a2@(128),%sp@- 52948: 4eb9 0005 0890 jsr 50890 if (sc != RTEMS_SUCCESSFUL) 5294e: 588f addql #4,%sp 52950: 4a80 tstl %d0 52952: 67cc beqs 52920 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 52954: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 5295a: 7205 moveq #5,%d1 <== NOT EXECUTED 5295c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5295e: 70ff moveq #-1,%d0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 52960: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 52966: 2081 movel %d1,%a0@ <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 52968: 4e5e unlk %fp <== NOT EXECUTED 5296a: 4e75 rts <== NOT EXECUTED 0); if (blk_ofs == 0 && fs_info->vol.bps == fs_info->vol.bytes_per_block) { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); 5296c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5296e: 2044 moveal %d4,%a0 <== NOT EXECUTED 52970: 2f07 movel %d7,%sp@- <== NOT EXECUTED 52972: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 52976: 4e90 jsr %a0@ <== NOT EXECUTED 52978: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5297c: 6000 ff66 braw 528e4 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(bd); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 52980: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 52986: 740c moveq #12,%d2 <== NOT EXECUTED 52988: 2040 moveal %d0,%a0 <== NOT EXECUTED 5298a: 70ff moveq #-1,%d0 <== NOT EXECUTED 5298c: 2082 movel %d2,%a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 5298e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52994: 4e5e unlk %fp <== NOT EXECUTED 52996: 4e75 rts <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52998: 2400 movel %d0,%d2 uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, 5299a: 4284 clrl %d4 5299c: 0283 0000 00ff andil #255,%d3 529a2: 0281 0000 00ff andil #255,%d1 fs_info->c.buf->buffer + blk_ofs, 529a8: 206a 0080 moveal %a2@(128),%a0 529ac: 9283 subl %d3,%d1 529ae: e2aa lsrl %d1,%d2 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 529b0: e3aa lsll %d1,%d2 uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, 529b2: 3812 movew %a2@,%d4 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 529b4: 9082 subl %d2,%d0 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 529b6: e7a8 lsll %d3,%d0 529b8: 2f04 movel %d4,%sp@- 529ba: d0a8 001a addl %a0@(26),%d0 529be: 2f00 movel %d0,%sp@- 529c0: 2f2a 0084 movel %a2@(132),%sp@- return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 529c4: 7401 moveq #1,%d2 uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, 529c6: 4eb9 0005 c068 jsr 5c068 529cc: 4fef 000c lea %sp@(12),%sp 529d0: 6000 fe78 braw 5284a =============================================================================== 00052be6 : const uint32_t offset, const uint32_t count, const uint8_t pattern) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52be6: 4280 clrl %d0 <== NOT EXECUTED fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 52be8: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 52bec: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 52bf0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 52bf4: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 52bf8: 162e 001b moveb %fp@(27),%d3 <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52bfc: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 52c00: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52c04: 9081 subl %d1,%d0 <== NOT EXECUTED 52c06: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 52c0a: 3043 moveaw %d3,%a0 <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52c0c: b08d cmpl %a5,%d0 <== NOT EXECUTED 52c0e: 6402 bccs 52c12 <== NOT EXECUTED 52c10: 2a40 moveal %d0,%a5 <== NOT EXECUTED fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info, uint32_t cln) { uint32_t blk; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 52c12: 4a82 tstl %d2 <== NOT EXECUTED 52c14: 660e bnes 52c24 <== NOT EXECUTED 52c16: 7c03 moveq #3,%d6 <== NOT EXECUTED 52c18: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED 52c1c: c086 andl %d6,%d0 <== NOT EXECUTED 52c1e: 4a00 tstb %d0 <== NOT EXECUTED 52c20: 6600 0106 bnew 52d28 <== NOT EXECUTED blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 52c24: 4283 clrl %d3 <== NOT EXECUTED 52c26: 162a 0008 moveb %a2@(8),%d3 <== NOT EXECUTED 52c2a: 4280 clrl %d0 <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52c2c: 4285 clrl %d5 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; 52c2e: 5582 subql #2,%d2 <== NOT EXECUTED 52c30: 1a2a 0002 moveb %a2@(2),%d5 <== NOT EXECUTED blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 52c34: 1e2a 000c moveb %a2@(12),%d7 <== NOT EXECUTED 52c38: 282a 0030 movel %a2@(48),%d4 <== NOT EXECUTED 52c3c: 1007 moveb %d7,%d0 <== NOT EXECUTED 52c3e: 9680 subl %d0,%d3 <== NOT EXECUTED 52c40: 2c00 movel %d0,%d6 <== NOT EXECUTED 52c42: 9c85 subl %d5,%d6 <== NOT EXECUTED 52c44: ecac lsrl %d6,%d4 <== NOT EXECUTED 52c46: e7aa lsll %d3,%d2 <== NOT EXECUTED blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 52c48: d882 addl %d2,%d4 <== NOT EXECUTED const uint8_t pattern) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; 52c4a: 2601 movel %d1,%d3 <== NOT EXECUTED 52c4c: e0ab lsrl %d0,%d3 <== NOT EXECUTED uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ssize_t bytes_written = 0; ssize_t ret; cur_blk += blocks_in_offset; 52c4e: d883 addl %d3,%d4 <== NOT EXECUTED { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 52c50: 2841 moveal %d1,%a4 <== NOT EXECUTED ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52c52: 4285 clrl %d5 <== NOT EXECUTED { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 52c54: e1ab lsll %d0,%d3 <== NOT EXECUTED 52c56: 99c3 subal %d3,%a4 <== NOT EXECUTED ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52c58: 4a8d tstl %a5 <== NOT EXECUTED 52c5a: 6700 00c0 beqw 52d1c <== NOT EXECUTED if (bytes_to_write == fs_info->vol.bytes_per_block) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 52c5e: 2c0e movel %fp,%d6 <== NOT EXECUTED 52c60: 5986 subql #4,%d6 <== NOT EXECUTED 52c62: 47f9 0005 29d4 lea 529d4 ,%a3 <== NOT EXECUTED if (RC_OK == rc) { memset(blk_buf + offset, pattern, bytes_to_write); 52c68: 3608 movew %a0,%d3 <== NOT EXECUTED 52c6a: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED 52c70: 2d43 fff8 movel %d3,%fp@(-8) <== NOT EXECUTED cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) { uint32_t c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 52c74: 4280 clrl %d0 <== NOT EXECUTED 52c76: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED 52c7a: 2200 movel %d0,%d1 <== NOT EXECUTED 52c7c: 928c subl %a4,%d1 <== NOT EXECUTED 52c7e: 2401 movel %d1,%d2 <== NOT EXECUTED 52c80: bbc1 cmpal %d1,%a5 <== NOT EXECUTED 52c82: 6402 bccs 52c86 <== NOT EXECUTED 52c84: 240d movel %a5,%d2 <== NOT EXECUTED const uint32_t offset, const uint32_t count, const uint8_t pattern) { int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 52c86: 2602 movel %d2,%d3 <== NOT EXECUTED 52c88: b282 cmpl %d2,%d1 <== NOT EXECUTED 52c8a: 6402 bccs 52c8e <== NOT EXECUTED 52c8c: 2601 movel %d1,%d3 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 52c8e: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) 52c92: 4a83 tstl %d3 <== NOT EXECUTED 52c94: 6756 beqs 52cec <== NOT EXECUTED static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52c96: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 52c9c: 0287 0000 00ff andil #255,%d7 <== NOT EXECUTED 52ca2: 9e81 subl %d1,%d7 <== NOT EXECUTED 52ca4: 2204 movel %d4,%d1 <== NOT EXECUTED 52ca6: efa9 lsll %d7,%d1 <== NOT EXECUTED { if (bytes_to_write == fs_info->vol.bytes_per_block) 52ca8: b680 cmpl %d0,%d3 <== NOT EXECUTED 52caa: 675a beqs 52d06 <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 52cac: 2f06 movel %d6,%sp@- <== NOT EXECUTED 52cae: 4878 0001 pea 1 <== NOT EXECUTED 52cb2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52cb4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52cb6: 4e93 jsr %a3@ <== NOT EXECUTED 52cb8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (RC_OK == rc) 52cbc: 4a80 tstl %d0 <== NOT EXECUTED 52cbe: 6710 beqs 52cd0 <== NOT EXECUTED fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 52cc0: b480 cmpl %d0,%d2 <== NOT EXECUTED 52cc2: 672e beqs 52cf2 <== NOT EXECUTED 52cc4: 70ff moveq #-1,%d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } 52cc6: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52ccc: 4e5e unlk %fp <== NOT EXECUTED 52cce: 4e75 rts <== NOT EXECUTED else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) { memset(blk_buf + offset, pattern, bytes_to_write); 52cd0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 52cd2: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 52cd6: d9ee fffc addal %fp@(-4),%a4 <== NOT EXECUTED 52cda: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52cdc: 4eb9 0005 c0d8 jsr 5c0d8 <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 52ce2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52ce6: 7001 moveq #1,%d0 <== NOT EXECUTED 52ce8: 1540 007e moveb %d0,%a2@(126) <== NOT EXECUTED } } if (RC_OK != rc) return rc; else return bytes_to_write; 52cec: 2003 movel %d3,%d0 <== NOT EXECUTED fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 52cee: b480 cmpl %d0,%d2 <== NOT EXECUTED 52cf0: 66d2 bnes 52cc4 <== NOT EXECUTED rc = -1; else { bytes_to_write -= ret; 52cf2: 9bc0 subal %d0,%a5 <== NOT EXECUTED bytes_written += ret; 52cf4: da80 addl %d0,%d5 <== NOT EXECUTED ++cur_blk; 52cf6: 5284 addql #1,%d4 <== NOT EXECUTED ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52cf8: 4a8d tstl %a5 <== NOT EXECUTED 52cfa: 6720 beqs 52d1c <== NOT EXECUTED 52cfc: 99cc subal %a4,%a4 <== NOT EXECUTED 52cfe: 1e2a 000c moveb %a2@(12),%d7 <== NOT EXECUTED 52d02: 6000 ff70 braw 52c74 <== NOT EXECUTED if (0 < bytes_to_write) { if (bytes_to_write == fs_info->vol.bytes_per_block) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 52d06: 2f06 movel %d6,%sp@- <== NOT EXECUTED 52d08: 4878 0002 pea 2 <== NOT EXECUTED 52d0c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52d0e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52d10: 4e93 jsr %a3@ <== NOT EXECUTED 52d12: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) 52d16: 4a80 tstl %d0 <== NOT EXECUTED 52d18: 66a6 bnes 52cc0 <== NOT EXECUTED 52d1a: 60b4 bras 52cd0 <== NOT EXECUTED fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 52d1c: 2005 movel %d5,%d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } 52d1e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52d24: 4e5e unlk %fp <== NOT EXECUTED 52d26: 4e75 rts <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52d28: 4282 clrl %d2 <== NOT EXECUTED 52d2a: 142a 0002 moveb %a2@(2),%d2 <== NOT EXECUTED 52d2e: 4280 clrl %d0 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 52d30: 1e2a 000c moveb %a2@(12),%d7 <== NOT EXECUTED 52d34: 282a 001e movel %a2@(30),%d4 <== NOT EXECUTED 52d38: 1007 moveb %d7,%d0 <== NOT EXECUTED 52d3a: 2600 movel %d0,%d3 <== NOT EXECUTED 52d3c: 9682 subl %d2,%d3 <== NOT EXECUTED 52d3e: e6ac lsrl %d3,%d4 <== NOT EXECUTED 52d40: 6000 ff08 braw 52c4a <== NOT EXECUTED =============================================================================== 00052d44 : const uint32_t count, const void *buff, const bool overwrite_cluster) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52d44: 4280 clrl %d0 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { 52d46: 4e56 ffcc linkw %fp,#-52 52d4a: 222e 0010 movel %fp@(16),%d1 52d4e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52d52: 246e 0008 moveal %fp@(8),%a2 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52d56: 302a 0006 movew %a2@(6),%d0 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { 52d5a: 242e 000c movel %fp@(12),%d2 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52d5e: 9081 subl %d1,%d0 52d60: 2a6e 0014 moveal %fp@(20),%a5 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { 52d64: 1c2e 001f moveb %fp@(31),%d6 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52d68: b08d cmpl %a5,%d0 52d6a: 6402 bccs 52d6e <== ALWAYS TAKEN 52d6c: 2a40 moveal %d0,%a5 <== NOT EXECUTED fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info, uint32_t cln) { uint32_t blk; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 52d6e: 4a82 tstl %d2 52d70: 660e bnes 52d80 52d72: 7603 moveq #3,%d3 52d74: 102a 000e moveb %a2@(14),%d0 52d78: c083 andl %d3,%d0 52d7a: 4a00 tstb %d0 52d7c: 6600 0124 bnew 52ea2 blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 52d80: 4283 clrl %d3 52d82: 162a 0008 moveb %a2@(8),%d3 52d86: 4285 clrl %d5 52d88: 1a2a 0002 moveb %a2@(2),%d5 52d8c: 4280 clrl %d0 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; 52d8e: 5582 subql #2,%d2 52d90: 2045 moveal %d5,%a0 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 52d92: 1e2a 000c moveb %a2@(12),%d7 52d96: 282a 0030 movel %a2@(48),%d4 52d9a: 1007 moveb %d7,%d0 52d9c: 9680 subl %d0,%d3 52d9e: 2240 moveal %d0,%a1 52da0: 93c8 subal %a0,%a1 52da2: 2a09 movel %a1,%d5 52da4: eaac lsrl %d5,%d4 52da6: e7aa lsll %d3,%d2 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 52da8: d882 addl %d2,%d4 const bool overwrite_cluster) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); 52daa: 2601 movel %d1,%d3 52dac: e0ab lsrl %d0,%d3 ssize_t bytes_written = 0; uint8_t *buffer = (uint8_t*)buff; ssize_t ret; uint32_t c; cur_blk += blocks_in_offset; 52dae: d883 addl %d3,%d4 { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 52db0: 2841 moveal %d1,%a4 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52db2: 4285 clrl %d5 { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 52db4: e1ab lsll %d0,%d3 52db6: 99c3 subal %d3,%a4 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52db8: 4a8d tstl %a5 52dba: 6700 00da beqw 52e96 if (0 < bytes_to_write) { if ( overwrite_block || (bytes_to_write == fs_info->vol.bytes_per_block)) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 52dbe: 47f9 0005 29d4 lea 529d4 ,%a3 52dc4: 3247 moveaw %d7,%a1 52dc6: 2e0c movel %a4,%d7 52dc8: 284a moveal %a2,%a4 52dca: 1d46 fffb moveb %d6,%fp@(-5) 52dce: 246e 0018 moveal %fp@(24),%a2 52dd2: 2d45 fff6 movel %d5,%fp@(-10) cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) { c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 52dd6: 4281 clrl %d1 52dd8: 322c 000a movew %a4@(10),%d1 52ddc: 2001 movel %d1,%d0 52dde: 9087 subl %d7,%d0 52de0: 2400 movel %d0,%d2 52de2: bbc0 cmpal %d0,%a5 52de4: 6402 bccs 52de8 52de6: 240d movel %a5,%d2 const uint32_t count, const void *buf, const bool overwrite_block) { int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 52de8: 2602 movel %d2,%d3 52dea: b082 cmpl %d2,%d0 52dec: 6402 bccs 52df0 <== ALWAYS TAKEN 52dee: 2600 movel %d0,%d3 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 52df0: 1c2c 0002 moveb %a4@(2),%d6 int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) 52df4: 4a83 tstl %d3 52df6: 6764 beqs 52e5c <== NEVER TAKEN static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52df8: 4280 clrl %d0 52dfa: 3a09 movew %a1,%d5 52dfc: 0286 0000 00ff andil #255,%d6 52e02: 1005 moveb %d5,%d0 52e04: 9086 subl %d6,%d0 52e06: 2a04 movel %d4,%d5 52e08: e1ad lsll %d0,%d5 52e0a: 2005 movel %d5,%d0 { if ( overwrite_block 52e0c: 4a2e fffb tstb %fp@(-5) 52e10: 6668 bnes 52e7a || (bytes_to_write == fs_info->vol.bytes_per_block)) 52e12: b681 cmpl %d1,%d3 52e14: 6764 beqs 52e7a { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 52e16: 486e fffc pea %fp@(-4) 52e1a: 4878 0001 pea 1 52e1e: 2f05 movel %d5,%sp@- 52e20: 2f0c movel %a4,%sp@- 52e22: 4e93 jsr %a3@ 52e24: 4fef 0010 lea %sp@(16),%sp if (RC_OK == rc) 52e28: 4a80 tstl %d0 52e2a: 6710 beqs 52e3c <== ALWAYS TAKEN cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) 52e2c: b480 cmpl %d0,%d2 <== NOT EXECUTED 52e2e: 6732 beqs 52e62 <== NOT EXECUTED 52e30: 70ff moveq #-1,%d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } 52e32: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52e38: 4e5e unlk %fp <== NOT EXECUTED 52e3a: 4e75 rts <== NOT EXECUTED else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) { memcpy(blk_buf + offset, buf, bytes_to_write); 52e3c: 206e fff6 moveal %fp@(-10),%a0 52e40: deae fffc addl %fp@(-4),%d7 52e44: 2f03 movel %d3,%sp@- 52e46: 4872 8800 pea %a2@(00000000,%a0:l) 52e4a: 2f07 movel %d7,%sp@- 52e4c: 4eb9 0005 c068 jsr 5c068 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 52e52: 4fef 000c lea %sp@(12),%sp 52e56: 7001 moveq #1,%d0 52e58: 1940 007e moveb %d0,%a4@(126) } } if (RC_OK != rc) return rc; else return bytes_to_write; 52e5c: 2003 movel %d3,%d0 cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) 52e5e: b480 cmpl %d0,%d2 52e60: 66ce bnes 52e30 <== NEVER TAKEN rc = -1; else { bytes_to_write -= ret; 52e62: 9bc0 subal %d0,%a5 bytes_written += ret; 52e64: d1ae fff6 addl %d0,%fp@(-10) ++cur_blk; 52e68: 5284 addql #1,%d4 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52e6a: 4a8d tstl %a5 52e6c: 6724 beqs 52e92 <== ALWAYS TAKEN 52e6e: 4287 clrl %d7 <== NOT EXECUTED 52e70: 162c 000c moveb %a4@(12),%d3 <== NOT EXECUTED 52e74: 3243 moveaw %d3,%a1 <== NOT EXECUTED 52e76: 6000 ff5e braw 52dd6 <== NOT EXECUTED if (0 < bytes_to_write) { if ( overwrite_block || (bytes_to_write == fs_info->vol.bytes_per_block)) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 52e7a: 486e fffc pea %fp@(-4) 52e7e: 4878 0002 pea 2 52e82: 2f00 movel %d0,%sp@- 52e84: 2f0c movel %a4,%sp@- 52e86: 4e93 jsr %a3@ 52e88: 4fef 0010 lea %sp@(16),%sp } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) 52e8c: 4a80 tstl %d0 52e8e: 669c bnes 52e2c <== NEVER TAKEN 52e90: 60aa bras 52e3c 52e92: 2a2e fff6 movel %fp@(-10),%d5 cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) 52e96: 2005 movel %d5,%d0 } if (RC_OK != rc) return rc; else return bytes_written; } 52e98: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 52e9e: 4e5e unlk %fp 52ea0: 4e75 rts static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52ea2: 4282 clrl %d2 52ea4: 142a 0002 moveb %a2@(2),%d2 52ea8: 4280 clrl %d0 uint32_t ino ) { return (ino >= fs_info->uino_base); } 52eaa: 1e2a 000c moveb %a2@(12),%d7 52eae: 282a 001e movel %a2@(30),%d4 52eb2: 1007 moveb %d7,%d0 52eb4: 2a00 movel %d0,%d5 52eb6: 9a82 subl %d2,%d5 52eb8: eaac lsrl %d5,%d4 52eba: 6000 feee braw 52daa =============================================================================== 00051fe2 : /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 51fe2: 7201 moveq #1,%d1 int fat_file_close( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 51fe4: 4e56 0000 linkw %fp,#0 51fe8: 2f0a movel %a2,%sp@- 51fea: 246e 000c moveal %fp@(12),%a2 51fee: 2f02 movel %d2,%sp@- 51ff0: 242e 0008 movel %fp@(8),%d2 /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 51ff4: 202a 0008 movel %a2@(8),%d0 51ff8: b280 cmpl %d0,%d1 51ffa: 6414 bccs 52010 { fat_fd->links_num--; 51ffc: 5380 subql #1,%d0 51ffe: 2540 0008 movel %d0,%a2@(8) return rc; 52002: 4280 clrl %d0 * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 52004: 242e fff8 movel %fp@(-8),%d2 52008: 246e fffc moveal %fp@(-4),%a2 5200c: 4e5e unlk %fp 5200e: 4e75 rts return rc; } key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 52010: 102a 0030 moveb %a2@(48),%d0 52014: 0800 0000 btst #0,%d0 52018: 674e beqs 52068 <== ALWAYS TAKEN { rc = fat_file_truncate(fs_info, fat_fd, 0); 5201a: 42a7 clrl %sp@- <== NOT EXECUTED 5201c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5201e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 52020: 4eb9 0005 1eee jsr 51eee <== NOT EXECUTED if ( rc != RC_OK ) 52026: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5202a: 4a80 tstl %d0 <== NOT EXECUTED 5202c: 66d6 bnes 52004 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5202e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52030: 4eb9 0005 5fc4 jsr 55fc4 <_Chain_Extract> <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(fs_info, fat_fd->ino) ) 52036: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 5203a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5203c: 4eb9 0005 3b3c jsr 53b3c <== NOT EXECUTED 52042: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52046: 4a00 tstb %d0 <== NOT EXECUTED 52048: 666e bnes 520b8 <== NOT EXECUTED fat_free_unique_ino(fs_info, fat_fd->ino); free(fat_fd); 5204a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5204c: 4eb9 0004 4bec jsr 44bec <== NOT EXECUTED 52052: 588f addql #4,%sp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 52054: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED return rc; } 52058: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 5205c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 52060: 4e5e unlk %fp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 52062: 4ef9 0005 2804 jmp 52804 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(fs_info, fat_fd->ino)) 52068: 2f2a 000c movel %a2@(12),%sp@- 5206c: 2f02 movel %d2,%sp@- 5206e: 4eb9 0005 3b3c jsr 53b3c 52074: 508f addql #8,%sp 52076: 4a00 tstb %d0 52078: 6718 beqs 52092 <== ALWAYS TAKEN { fat_fd->links_num = 0; 5207a: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 5207e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 52082: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED return rc; } 52086: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 5208a: 4e5e unlk %fp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 5208c: 4ef9 0005 2804 jmp 52804 <== NOT EXECUTED 52092: 2f0a movel %a2,%sp@- 52094: 4eb9 0005 5fc4 jsr 55fc4 <_Chain_Extract> fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 5209a: 2f0a movel %a2,%sp@- 5209c: 4eb9 0004 4bec jsr 44bec * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 520a2: 246e fffc moveal %fp@(-4),%a2 fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 520a6: 508f addql #8,%sp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 520a8: 2d42 0008 movel %d2,%fp@(8) return rc; } 520ac: 242e fff8 movel %fp@(-8),%d2 520b0: 4e5e unlk %fp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 520b2: 4ef9 0005 2804 jmp 52804 return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(fs_info, fat_fd->ino) ) fat_free_unique_ino(fs_info, fat_fd->ino); 520b8: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 520bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 520be: 4eb9 0005 3b0a jsr 53b0a <== NOT EXECUTED 520c4: 508f addql #8,%sp <== NOT EXECUTED free(fat_fd); 520c6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 520c8: 4eb9 0004 4bec jsr 44bec <== NOT EXECUTED 520ce: 588f addql #4,%sp <== NOT EXECUTED 520d0: 6082 bras 52054 <== NOT EXECUTED =============================================================================== 00052188 : fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 52188: 4e56 ffcc linkw %fp,#-52 5218c: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 52190: 242e 0014 movel %fp@(20),%d2 52194: 286e 0018 moveal %fp@(24),%a4 52198: 246e 000c moveal %fp@(12),%a2 uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; 5219c: 2882 movel %d2,%a4@ fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 5219e: 266e 0008 moveal %fp@(8),%a3 uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 521a2: 202a 0018 movel %a2@(24),%d0 fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 521a6: 1a2e 0013 moveb %fp@(19),%d5 int rc = RC_OK; uint32_t chain = 0; 521aa: 42ae fff0 clrl %fp@(-16) uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 521ae: 42ae fff8 clrl %fp@(-8) uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 521b2: b082 cmpl %d2,%d0 521b4: 6400 00d8 bccw 5228e return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 521b8: 7201 moveq #1,%d1 521ba: b2aa 0020 cmpl %a2@(32),%d1 521be: 6700 00e2 beqw 522a2 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 521c2: 4283 clrl %d3 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 521c4: 2042 moveal %d2,%a0 521c6: 91c0 subal %d0,%a0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 521c8: 362b 0006 movew %a3@(6),%d3 521cc: 2203 movel %d3,%d1 521ce: 5381 subql #1,%d1 521d0: 2c01 movel %d1,%d6 521d2: cc80 andl %d0,%d6 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 521d4: 9686 subl %d6,%d3 521d6: c681 andl %d1,%d3 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) 521d8: b1c3 cmpal %d3,%a0 521da: 6300 00c0 blsw 5229c bytes2add -= bytes_remain; 521de: 2e08 movel %a0,%d7 521e0: 9e83 subl %d3,%d7 else bytes2add = 0; if (zero_fill && bytes_remain > 0) { 521e2: 4a05 tstb %d5 521e4: 6706 beqs 521ec <== ALWAYS TAKEN 521e6: 4a83 tstl %d3 <== NOT EXECUTED 521e8: 6600 00e8 bnew 522d2 <== NOT EXECUTED /* * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) 521ec: 4a87 tstl %d7 521ee: 6700 009e beqw 5228e return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 521f2: 4281 clrl %d1 521f4: 122b 0008 moveb %a3@(8),%d1 521f8: 2007 movel %d7,%d0 521fa: 5380 subql #1,%d0 521fc: e2a8 lsrl %d1,%d0 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 521fe: 0285 0000 00ff andil #255,%d5 52204: 2f05 movel %d5,%sp@- 52206: 486e fff8 pea %fp@(-8) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 5220a: 2a00 movel %d0,%d5 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 5220c: 486e fffc pea %fp@(-4) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 52210: 5285 addql #1,%d5 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 52212: 2f05 movel %d5,%sp@- 52214: 486e fff0 pea %fp@(-16) 52218: 2f0b movel %a3,%sp@- 5221a: 4eb9 0005 9970 jsr 59970 &cls_added, &last_cl, zero_fill); /* this means that low level I/O error occured */ if (rc != RC_OK) 52220: 4fef 0018 lea %sp@(24),%sp if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 52224: 2800 movel %d0,%d4 &cls_added, &last_cl, zero_fill); /* this means that low level I/O error occured */ if (rc != RC_OK) 52226: 665a bnes 52282 <== NEVER TAKEN return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 52228: 222e fffc movel %fp@(-4),%d1 5222c: 6606 bnes 52234 <== ALWAYS TAKEN 5222e: 4a83 tstl %d3 <== NOT EXECUTED 52230: 6700 0086 beqw 522b8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 52234: b285 cmpl %d5,%d1 52236: 6718 beqs 52250 <== ALWAYS TAKEN { new_length -= bytes2add & (fs_info->vol.bpc - 1); 52238: 4283 clrl %d3 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 5223a: 4280 clrl %d0 <== NOT EXECUTED 5223c: 102b 0008 moveb %a3@(8),%d0 <== NOT EXECUTED 52240: 9a81 subl %d1,%d5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) { new_length -= bytes2add & (fs_info->vol.bpc - 1); 52242: 362b 0006 movew %a3@(6),%d3 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 52246: e1ad lsll %d0,%d5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) { new_length -= bytes2add & (fs_info->vol.bpc - 1); 52248: 5383 subql #1,%d3 <== NOT EXECUTED 5224a: ce83 andl %d3,%d7 <== NOT EXECUTED 5224c: 9487 subl %d7,%d2 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 5224e: 9485 subl %d5,%d2 <== NOT EXECUTED } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 52250: 206a 0018 moveal %a2@(24),%a0 52254: 4a88 tstl %a0 52256: 6600 00c2 bnew 5231a { fat_fd->map.disk_cln = fat_fd->cln = chain; 5225a: 202e fff0 movel %fp@(-16),%d0 fat_fd->map.file_cln = 0; 5225e: 42aa 0032 clrl %a2@(50) } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; 52262: 2540 001c movel %d0,%a2@(28) 52266: 2540 0036 movel %d0,%a2@(54) } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 5226a: 4a81 tstl %d1 5226c: 670e beqs 5227c <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; 5226e: 256e fff8 003a movel %fp@(-8),%a2@(58) if (fat_fd->fat_file_type == FAT_DIRECTORY) 52274: 4aaa 0010 tstl %a2@(16) 52278: 6700 00d6 beqw 52350 return rc; } } } *a_length = new_length; 5227c: 2882 movel %d2,%a4@ fat_fd->fat_file_size = new_length; 5227e: 2542 0018 movel %d2,%a2@(24) return RC_OK; } 52282: 2004 movel %d4,%d0 52284: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 5228a: 4e5e unlk %fp 5228c: 4e75 rts ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; 5228e: 4284 clrl %d4 *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 52290: 2004 movel %d4,%d0 52292: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 52298: 4e5e unlk %fp 5229a: 4e75 rts bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) bytes2add -= bytes_remain; else bytes2add = 0; 5229c: 4287 clrl %d7 <== NOT EXECUTED 5229e: 6000 ff42 braw 521e2 <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 522a2: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 522a6: 6600 ff1a bnew 521c2 <== NOT EXECUTED 522aa: 7603 moveq #3,%d3 <== NOT EXECUTED 522ac: 122b 000e moveb %a3@(14),%d1 <== NOT EXECUTED 522b0: c283 andl %d3,%d1 <== NOT EXECUTED 522b2: 4a01 tstb %d1 <== NOT EXECUTED 522b4: 6700 ff0c beqw 521c2 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 522b8: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 522be: 78ff moveq #-1,%d4 <== NOT EXECUTED 522c0: 761c moveq #28,%d3 <== NOT EXECUTED 522c2: 2040 moveal %d0,%a0 <== NOT EXECUTED *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 522c4: 2004 movel %d4,%d0 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 522c6: 2083 movel %d3,%a0@ <== NOT EXECUTED *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 522c8: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 <== NOT EXECUTED 522ce: 4e5e unlk %fp <== NOT EXECUTED 522d0: 4e75 rts <== NOT EXECUTED uint32_t start = fat_fd->fat_file_size; uint32_t cl_start = start >> fs_info->vol.bpc_log2; uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 522d2: 486e fffc pea %fp@(-4) <== NOT EXECUTED else bytes2add = 0; if (zero_fill && bytes_remain > 0) { uint32_t start = fat_fd->fat_file_size; uint32_t cl_start = start >> fs_info->vol.bpc_log2; 522d6: 4281 clrl %d1 <== NOT EXECUTED 522d8: 122b 0008 moveb %a3@(8),%d1 <== NOT EXECUTED 522dc: e2a8 lsrl %d1,%d0 <== NOT EXECUTED uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 522de: 2f00 movel %d0,%sp@- <== NOT EXECUTED 522e0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 522e2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 522e4: 4eba f64e jsr %pc@(51934 ) <== NOT EXECUTED if (rc != RC_OK) 522e8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED uint32_t start = fat_fd->fat_file_size; uint32_t cl_start = start >> fs_info->vol.bpc_log2; uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 522ec: 2801 movel %d1,%d4 <== NOT EXECUTED if (rc != RC_OK) 522ee: 6692 bnes 52282 <== NOT EXECUTED return rc; bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0); 522f0: 42a7 clrl %sp@- <== NOT EXECUTED 522f2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 522f4: 2f06 movel %d6,%sp@- <== NOT EXECUTED 522f6: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 522fa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 522fc: 4eb9 0005 2be6 jsr 52be6 <== NOT EXECUTED if (bytes_remain != bytes_written) 52302: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 52306: b680 cmpl %d0,%d3 <== NOT EXECUTED 52308: 6700 fee2 beqw 521ec <== NOT EXECUTED return -1; 5230c: 78ff moveq #-1,%d4 <== NOT EXECUTED *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 5230e: 2004 movel %d4,%d0 <== NOT EXECUTED 52310: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 <== NOT EXECUTED 52316: 4e5e unlk %fp <== NOT EXECUTED 52318: 4e75 rts <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 5231a: 202a 003a movel %a2@(58),%d0 5231e: 72ff moveq #-1,%d1 52320: b280 cmpl %d0,%d1 52322: 675c beqs 52380 <== NEVER TAKEN fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 52324: 2f2e fff0 movel %fp@(-16),%sp@- 52328: 2f00 movel %d0,%sp@- } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) { old_last_cl = fat_fd->map.last_cln; 5232a: 2d40 fff4 movel %d0,%fp@(-12) fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 5232e: 2f0b movel %a3,%sp@- 52330: 4eb9 0005 9622 jsr 59622 if ( rc != RC_OK ) 52336: 4fef 000c lea %sp@(12),%sp 5233a: 4a80 tstl %d0 5233c: 6626 bnes 52364 <== NEVER TAKEN { fat_free_fat_clusters_chain(fs_info, chain); return rc; } fat_buf_release(fs_info); 5233e: 2f0b movel %a3,%sp@- 52340: 4eb9 0005 2804 jsr 52804 52346: 222e fffc movel %fp@(-4),%d1 5234a: 588f addql #4,%sp 5234c: 6000 ff1c braw 5226a if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(fs_info, chain); 52350: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 52354: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52356: 4eb9 0005 39c6 jsr 539c6 <== NOT EXECUTED if ( rc != RC_OK ) 5235c: 508f addql #8,%sp <== NOT EXECUTED 5235e: 4a80 tstl %d0 <== NOT EXECUTED 52360: 6700 ff1a beqw 5227c <== NOT EXECUTED { fat_free_fat_clusters_chain(fs_info, chain); 52364: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 52368: 2800 movel %d0,%d4 <== NOT EXECUTED 5236a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5236c: 4eb9 0005 989e jsr 5989e <== NOT EXECUTED 52372: 508f addql #8,%sp <== NOT EXECUTED *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 52374: 2004 movel %d4,%d0 <== NOT EXECUTED 52376: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 <== NOT EXECUTED 5237c: 4e5e unlk %fp <== NOT EXECUTED 5237e: 4e75 rts <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 52380: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 52384: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 52388: 4878 0001 pea 1 <== NOT EXECUTED 5238c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5238e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52390: 4eb9 0005 20d2 jsr 520d2 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 52396: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5239a: 4a80 tstl %d0 <== NOT EXECUTED 5239c: 66c6 bnes 52364 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 5239e: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 523a2: 202e fff4 movel %fp@(-12),%d0 <== NOT EXECUTED 523a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 523a8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 523aa: 4eb9 0005 9622 jsr 59622 <== NOT EXECUTED if ( rc != RC_OK ) 523b0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 523b4: 4a80 tstl %d0 <== NOT EXECUTED 523b6: 6786 beqs 5233e <== NOT EXECUTED 523b8: 60aa bras 52364 <== NOT EXECUTED =============================================================================== 000520d2 : uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 520d2: 7001 moveq #1,%d0 fat_file_ioctl( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd, ...) { 520d4: 4e56 fffc linkw %fp,#-4 520d8: 226e 0008 moveal %fp@(8),%a1 520dc: 2f0a movel %a2,%sp@- 520de: 206e 000c moveal %fp@(12),%a0 520e2: 2f02 movel %d2,%sp@- int rc = RC_OK; uint32_t cur_cln = 0; 520e4: 42ae fffc clrl %fp@(-4) uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 520e8: b0ae 0010 cmpl %fp@(16),%d0 520ec: 671a beqs 52108 <== ALWAYS TAKEN *ret = cur_cln; break; default: errno = EINVAL; 520ee: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 520f4: 7216 moveq #22,%d1 <== NOT EXECUTED 520f6: 2040 moveal %d0,%a0 <== NOT EXECUTED rc = -1; 520f8: 70ff moveq #-1,%d0 <== NOT EXECUTED *ret = cur_cln; break; default: errno = EINVAL; 520fa: 2081 movel %d1,%a0@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 520fc: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 52100: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 52104: 4e5e unlk %fp <== NOT EXECUTED 52106: 4e75 rts <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 52108: 202e 0014 movel %fp@(20),%d0 ret = va_arg(ap, uint32_t *); 5210c: 246e 0018 moveal %fp@(24),%a2 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 52110: b0a8 0018 cmpl %a0@(24),%d0 52114: 6458 bccs 5216e <== NEVER TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52116: 7201 moveq #1,%d1 52118: b2a8 0020 cmpl %a0@(32),%d1 5211c: 672e beqs 5214c <== ALWAYS TAKEN break; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 5211e: 486e fffc pea %fp@(-4) <== NOT EXECUTED *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 52122: 4281 clrl %d1 <== NOT EXECUTED 52124: 1229 0008 moveb %a1@(8),%d1 <== NOT EXECUTED 52128: e2a8 lsrl %d1,%d0 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 5212a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5212c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5212e: 2f09 movel %a1,%sp@- <== NOT EXECUTED 52130: 4eba f802 jsr %pc@(51934 ) <== NOT EXECUTED if ( rc != RC_OK ) 52134: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED break; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 52138: 2001 movel %d1,%d0 <== NOT EXECUTED if ( rc != RC_OK ) 5213a: 66c0 bnes 520fc <== NOT EXECUTED break; *ret = cur_cln; 5213c: 24ae fffc movel %fp@(-4),%a2@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 52140: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 52144: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 52148: 4e5e unlk %fp <== NOT EXECUTED 5214a: 4e75 rts <== NOT EXECUTED if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5214c: 4aa8 0024 tstl %a0@(36) 52150: 66cc bnes 5211e <== NEVER TAKEN 52152: 7403 moveq #3,%d2 52154: 1229 000e moveb %a1@(14),%d1 52158: c282 andl %d2,%d1 5215a: 4a01 tstb %d1 5215c: 67c0 beqs 5211e <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 5215e: 4292 clrl %a2@ rc = -1; break; } va_end(ap); return rc; } 52160: 242e fff4 movel %fp@(-12),%d2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; rc = RC_OK; 52164: 4280 clrl %d0 rc = -1; break; } va_end(ap); return rc; } 52166: 246e fff8 moveal %fp@(-8),%a2 5216a: 4e5e unlk %fp 5216c: 4e75 rts ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 5216e: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 52174: 7405 moveq #5,%d2 <== NOT EXECUTED 52176: 2040 moveal %d0,%a0 <== NOT EXECUTED 52178: 70ff moveq #-1,%d0 <== NOT EXECUTED 5217a: 2082 movel %d2,%a0@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 5217c: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 52180: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 52184: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051934 : fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 51934: 4e56 ffe0 linkw %fp,#-32 51938: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 5193c: 266e 000c moveal %fp@(12),%a3 51940: 282e 0008 movel %fp@(8),%d4 51944: 2c2e 0010 movel %fp@(16),%d6 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 51948: 202b 0032 movel %a3@(50),%d0 5194c: bc80 cmpl %d0,%d6 5194e: 6776 beqs 519c6 uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; 51950: 2406 movel %d6,%d2 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 51952: bc80 cmpl %d0,%d6 51954: 6354 blss 519aa <== NEVER TAKEN { cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; 51956: 9480 subl %d0,%d2 uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 51958: 2d6b 0036 fffc movel %a3@(54),%fp@(-4) cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 5195e: 4a82 tstl %d2 51960: 6724 beqs 51986 <== NEVER TAKEN 51962: 2a0e movel %fp,%d5 51964: 4283 clrl %d3 51966: 5985 subql #4,%d5 51968: 45f9 0005 9450 lea 59450 ,%a2 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 5196e: 2f05 movel %d5,%sp@- 51970: 2f2e fffc movel %fp@(-4),%sp@- cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 51974: 5283 addql #1,%d3 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 51976: 2f04 movel %d4,%sp@- 51978: 4e92 jsr %a2@ if ( rc != RC_OK ) 5197a: 4fef 000c lea %sp@(12),%sp 5197e: 4a80 tstl %d0 51980: 6630 bnes 519b2 <== NEVER TAKEN cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 51982: b483 cmpl %d3,%d2 51984: 66e8 bnes 5196e <== NEVER TAKEN return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 51986: 202e fffc movel %fp@(-4),%d0 if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 5198a: 2746 0032 movel %d6,%a3@(50) fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; 5198e: 206e 0014 moveal %fp@(20),%a0 return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 51992: 2740 0036 movel %d0,%a3@(54) *disk_cln = cur_cln; } return RC_OK; 51996: 4282 clrl %d2 51998: 4283 clrl %d3 /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; 5199a: 2080 movel %d0,%a0@ } return RC_OK; } 5199c: 2002 movel %d2,%d0 5199e: 2203 movel %d3,%d1 519a0: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 519a6: 4e5e unlk %fp 519a8: 4e75 rts cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 519aa: 2d6b 001c fffc movel %a3@(28),%fp@(-4) <== NOT EXECUTED 519b0: 60ac bras 5195e <== NOT EXECUTED /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; 519b2: 2600 movel %d0,%d3 <== NOT EXECUTED 519b4: 5bc2 smi %d2 <== NOT EXECUTED 519b6: 49c2 extbl %d2 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 519b8: 2002 movel %d2,%d0 <== NOT EXECUTED 519ba: 2203 movel %d3,%d1 <== NOT EXECUTED 519bc: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 519c2: 4e5e unlk %fp <== NOT EXECUTED 519c4: 4e75 rts <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 519c6: 206e 0014 moveal %fp@(20),%a0 fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 519ca: 4282 clrl %d2 519cc: 4283 clrl %d3 ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 519ce: 20ab 0036 movel %a3@(54),%a0@ fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 519d2: 2002 movel %d2,%d0 519d4: 2203 movel %d3,%d1 519d6: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 519dc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005264e : fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) 5264e: 7001 moveq #1,%d0 <== NOT EXECUTED void fat_file_mark_removed( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 52650: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 52654: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED 52658: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 5265c: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED 52660: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 52664: b081 cmpl %d1,%d0 <== NOT EXECUTED 52666: 6700 008c beqw 526f4 <== NOT EXECUTED fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 5266a: 4a81 tstl %d1 <== NOT EXECUTED 5266c: 666e bnes 526dc <== NOT EXECUTED 5266e: 7403 moveq #3,%d2 <== NOT EXECUTED 52670: 102b 000e moveb %a3@(14),%d0 <== NOT EXECUTED 52674: c082 andl %d2,%d0 <== NOT EXECUTED 52676: 4a00 tstb %d0 <== NOT EXECUTED 52678: 6762 beqs 526dc <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 5267a: 4280 clrl %d0 <== NOT EXECUTED 5267c: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 52680: 222b 001e movel %a3@(30),%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 52684: e1a9 lsll %d0,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52686: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 5268a: 7609 moveq #9,%d3 <== NOT EXECUTED 5268c: 2400 movel %d0,%d2 <== NOT EXECUTED 5268e: e6aa lsrl %d3,%d2 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 52690: d282 addl %d2,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52692: 740f moveq #15,%d2 <== NOT EXECUTED 52694: ea88 lsrl #5,%d0 <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 52696: 163c 0001 moveb #1,%d3 <== NOT EXECUTED fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 5269a: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 5269c: c082 andl %d2,%d0 <== NOT EXECUTED 5269e: 2f0a movel %a2,%sp@- <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 526a0: 2401 movel %d1,%d2 <== NOT EXECUTED 526a2: d480 addl %d0,%d2 <== NOT EXECUTED 526a4: 4eb9 0005 5fc4 jsr 55fc4 <_Chain_Extract> <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 526aa: 7001 moveq #1,%d0 <== NOT EXECUTED 526ac: c082 andl %d2,%d0 <== 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 ); 526ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 526b0: 2200 movel %d0,%d1 <== NOT EXECUTED 526b2: e988 lsll #4,%d0 <== NOT EXECUTED 526b4: e589 lsll #2,%d1 <== NOT EXECUTED 526b6: 9081 subl %d1,%d0 <== NOT EXECUTED 526b8: d0ab 0066 addl %a3@(102),%d0 <== NOT EXECUTED 526bc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 526be: 4eb9 0004 a09c jsr 4a09c <_Chain_Append> <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 526c4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 526c8: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 526cc: 8083 orl %d3,%d0 <== NOT EXECUTED 526ce: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 526d2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 526d8: 4e5e unlk %fp <== NOT EXECUTED 526da: 4e75 rts <== NOT EXECUTED ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 526dc: 4280 clrl %d0 <== NOT EXECUTED 526de: 102b 0005 moveb %a3@(5),%d0 <== NOT EXECUTED 526e2: 5581 subql #2,%d1 <== NOT EXECUTED 526e4: e1a9 lsll %d0,%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 526e6: 4280 clrl %d0 <== NOT EXECUTED 526e8: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 526ec: d2ab 0030 addl %a3@(48),%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 526f0: e1a9 lsll %d0,%d1 <== NOT EXECUTED 526f2: 6092 bras 52686 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 526f4: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 526f8: 7609 moveq #9,%d3 <== NOT EXECUTED 526fa: 2400 movel %d0,%d2 <== NOT EXECUTED 526fc: e6aa lsrl %d3,%d2 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) return 1; 526fe: 7201 moveq #1,%d1 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 52700: d282 addl %d2,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52702: 740f moveq #15,%d2 <== NOT EXECUTED 52704: ea88 lsrl #5,%d0 <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 52706: 163c 0001 moveb #1,%d3 <== NOT EXECUTED fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 5270a: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 5270c: c082 andl %d2,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5270e: 2f0a movel %a2,%sp@- <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 52710: 2401 movel %d1,%d2 <== NOT EXECUTED 52712: d480 addl %d0,%d2 <== NOT EXECUTED 52714: 4eb9 0005 5fc4 jsr 55fc4 <_Chain_Extract> <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 5271a: 7001 moveq #1,%d0 <== NOT EXECUTED 5271c: c082 andl %d2,%d0 <== 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 ); 5271e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52720: 2200 movel %d0,%d1 <== NOT EXECUTED 52722: e988 lsll #4,%d0 <== NOT EXECUTED 52724: e589 lsll #2,%d1 <== NOT EXECUTED 52726: 9081 subl %d1,%d0 <== NOT EXECUTED 52728: d0ab 0066 addl %a3@(102),%d0 <== NOT EXECUTED 5272c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5272e: 4eb9 0004 a09c jsr 4a09c <_Chain_Append> <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 52734: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52738: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 5273c: 8083 orl %d3,%d0 <== NOT EXECUTED 5273e: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 52742: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 52748: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000519e0 : fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) 519e0: 7201 moveq #1,%d1 fat_file_open( fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 519e2: 4e56 ffe0 linkw %fp,#-32 519e6: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 519ea: 286e 000c moveal %fp@(12),%a4 519ee: 246e 0008 moveal %fp@(8),%a2 519f2: 266e 0010 moveal %fp@(16),%a3 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 519f6: 2014 movel %a4@,%d0 519f8: b280 cmpl %d0,%d1 519fa: 6700 020a beqw 51c06 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 519fe: 4a80 tstl %d0 51a00: 6600 016e bnew 51b70 51a04: 7403 moveq #3,%d2 51a06: 122a 000e moveb %a2@(14),%d1 51a0a: c282 andl %d2,%d1 51a0c: 4a01 tstb %d1 51a0e: 6700 0160 beqw 51b70 ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51a12: 4281 clrl %d1 51a14: 122a 0003 moveb %a2@(3),%d1 const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 51a18: 202a 001e movel %a2@(30),%d0 ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51a1c: e3a8 lsll %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51a1e: 242c 0004 movel %a4@(4),%d2 51a22: 7609 moveq #9,%d3 51a24: 2202 movel %d2,%d1 51a26: e6a9 lsrl %d3,%d1 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51a28: d081 addl %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51a2a: ea8a lsrl #5,%d2 51a2c: 780f moveq #15,%d4 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 51a2e: 163c 0001 moveb #1,%d3 fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51a32: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51a34: c484 andl %d4,%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 51a36: 226a 0062 moveal %a2@(98),%a1 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51a3a: d480 addl %d0,%d2 51a3c: c682 andl %d2,%d3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 51a3e: 2003 movel %d3,%d0 51a40: e98b lsll #4,%d3 51a42: e588 lsll #2,%d0 51a44: 9680 subl %d0,%d3 51a46: d3c3 addal %d3,%a1 51a48: 2059 moveal %a1@+,%a0 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 51a4a: b3c8 cmpal %a0,%a1 51a4c: 6752 beqs 51aa0 <== NEVER TAKEN 51a4e: 2228 0020 movel %a0@(32),%d1 ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51a52: 2001 movel %d1,%d0 51a54: 5580 subql #2,%d0 fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) 51a56: 7a01 moveq #1,%d5 51a58: ba81 cmpl %d1,%d5 51a5a: 6700 0158 beqw 51bb4 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 51a5e: 4a81 tstl %d1 <== NOT EXECUTED 51a60: 6600 0128 bnew 51b8a <== NOT EXECUTED 51a64: 7803 moveq #3,%d4 <== NOT EXECUTED 51a66: 122a 000e moveb %a2@(14),%d1 <== NOT EXECUTED 51a6a: c284 andl %d4,%d1 <== NOT EXECUTED 51a6c: 4a01 tstb %d1 <== NOT EXECUTED 51a6e: 6700 011a beqw 51b8a <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51a72: 4281 clrl %d1 <== NOT EXECUTED 51a74: 122a 0003 moveb %a2@(3),%d1 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 51a78: 202a 001e movel %a2@(30),%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51a7c: e3a8 lsll %d1,%d0 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51a7e: 2228 0024 movel %a0@(36),%d1 51a82: 7a09 moveq #9,%d5 51a84: 2801 movel %d1,%d4 51a86: eaac lsrl %d5,%d4 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51a88: d084 addl %d4,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51a8a: ea89 lsrl #5,%d1 51a8c: 780f moveq #15,%d4 fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51a8e: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51a90: c284 andl %d4,%d1 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51a92: d081 addl %d1,%d0 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) 51a94: b082 cmpl %d2,%d0 51a96: 6700 010a beqw 51ba2 { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 51a9a: 2050 moveal %a0@,%a0 ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 51a9c: b1c9 cmpal %a1,%a0 51a9e: 66ae bnes 51a4e <== NEVER TAKEN 51aa0: 226a 0066 moveal %a2@(102),%a1 51aa4: d3c3 addal %d3,%a1 51aa6: 2059 moveal %a1@+,%a0 51aa8: b3c8 cmpal %a0,%a1 51aaa: 674e beqs 51afa <== ALWAYS TAKEN 51aac: 2228 0020 movel %a0@(32),%d1 <== NOT EXECUTED fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) 51ab0: 7a01 moveq #1,%d5 <== NOT EXECUTED 51ab2: ba81 cmpl %d1,%d5 <== NOT EXECUTED 51ab4: 6700 0130 beqw 51be6 <== NOT EXECUTED fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 51ab8: 4a81 tstl %d1 <== NOT EXECUTED 51aba: 6600 0110 bnew 51bcc <== NOT EXECUTED 51abe: 7803 moveq #3,%d4 <== NOT EXECUTED 51ac0: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED 51ac4: c084 andl %d4,%d0 <== NOT EXECUTED 51ac6: 4a00 tstb %d0 <== NOT EXECUTED 51ac8: 6700 0102 beqw 51bcc <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51acc: 4280 clrl %d0 <== NOT EXECUTED 51ace: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 51ad2: 222a 001e movel %a2@(30),%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51ad6: e1a9 lsll %d0,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51ad8: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 51adc: 7a09 moveq #9,%d5 <== NOT EXECUTED 51ade: 2800 movel %d0,%d4 <== NOT EXECUTED 51ae0: eaac lsrl %d5,%d4 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51ae2: d284 addl %d4,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51ae4: ea88 lsrl #5,%d0 <== NOT EXECUTED 51ae6: 780f moveq #15,%d4 <== NOT EXECUTED fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51ae8: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51aea: c084 andl %d4,%d0 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51aec: d081 addl %d1,%d0 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) 51aee: b082 cmpl %d2,%d0 <== NOT EXECUTED 51af0: 6700 00c8 beqw 51bba <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 51af4: 2050 moveal %a0@,%a0 <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 51af6: b3c8 cmpal %a0,%a1 <== NOT EXECUTED 51af8: 66b2 bnes 51aac <== NOT EXECUTED return 0; } } the_node = the_node->next; } return -1; 51afa: 78ff moveq #-1,%d4 } /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 51afc: 4878 0042 pea 42 51b00: 4eb9 0004 50f4 jsr 450f4 if ( lfat_fd == NULL ) 51b06: 588f addql #4,%sp } /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 51b08: 2a40 moveal %d0,%a5 51b0a: 2680 movel %d0,%a3@ if ( lfat_fd == NULL ) 51b0c: 6700 0164 beqw 51c72 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 51b10: 4878 0042 pea 42 lfat_fd->links_num = 1; 51b14: 7a01 moveq #1,%d5 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 51b16: 42a7 clrl %sp@- 51b18: 2f00 movel %d0,%sp@- 51b1a: 4eb9 0005 c0d8 jsr 5c0d8 lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 51b20: 2b5c 0020 movel %a4@+,%a5@(32) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 51b24: 72fe moveq #-2,%d1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 51b26: 4fef 000c lea %sp@(12),%sp lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 51b2a: 2b5c 0024 movel %a4@+,%a5@(36) 51b2e: 2b5c 0028 movel %a4@+,%a5@(40) 51b32: 2b54 002c movel %a4@,%a5@(44) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 51b36: 102d 0030 moveb %a5@(48),%d0 if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; 51b3a: 2b45 0008 movel %d5,%a5@(8) lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 51b3e: 7aff moveq #-1,%d5 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 51b40: c081 andl %d1,%d0 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 51b42: 2b45 003a movel %d5,%a5@(58) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 51b46: 1b40 0030 moveb %d0,%a5@(48) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 51b4a: 4a84 tstl %d4 51b4c: 6700 00f0 beqw 51c3e lfat_fd->ino = key; 51b50: 2b42 000c movel %d2,%a5@(12) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 51b54: 2f0d movel %a5,%sp@- 51b56: d6aa 0062 addl %a2@(98),%d3 51b5a: 2f03 movel %d3,%sp@- 51b5c: 4eb9 0004 a09c jsr 4a09c <_Chain_Append> 51b62: 508f addql #8,%sp /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 51b64: 4280 clrl %d0 } 51b66: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 51b6c: 4e5e unlk %fp 51b6e: 4e75 rts ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51b70: 4281 clrl %d1 <== NOT EXECUTED 51b72: 122a 0005 moveb %a2@(5),%d1 <== NOT EXECUTED 51b76: 5580 subql #2,%d0 <== NOT EXECUTED 51b78: e3a8 lsll %d1,%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51b7a: 4281 clrl %d1 <== NOT EXECUTED 51b7c: 122a 0003 moveb %a2@(3),%d1 <== NOT EXECUTED ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51b80: d0aa 0030 addl %a2@(48),%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51b84: e3a8 lsll %d1,%d0 <== NOT EXECUTED 51b86: 6000 fe96 braw 51a1e <== NOT EXECUTED ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51b8a: 4281 clrl %d1 <== NOT EXECUTED 51b8c: 122a 0005 moveb %a2@(5),%d1 <== NOT EXECUTED 51b90: e3a8 lsll %d1,%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51b92: 4281 clrl %d1 <== NOT EXECUTED 51b94: 122a 0003 moveb %a2@(3),%d1 <== NOT EXECUTED ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51b98: d0aa 0030 addl %a2@(48),%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51b9c: e3a8 lsll %d1,%d0 <== NOT EXECUTED 51b9e: 6000 fede braw 51a7e <== NOT EXECUTED /* access "valid" hash table */ rc = _hash_search(fs_info, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 51ba2: 2688 movel %a0,%a3@ <== NOT EXECUTED lfat_fd->links_num++; 51ba4: 4280 clrl %d0 <== NOT EXECUTED 51ba6: 52a8 0008 addql #1,%a0@(8) <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 51baa: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 51bb0: 4e5e unlk %fp <== NOT EXECUTED 51bb2: 4e75 rts <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) return 1; 51bb4: 7001 moveq #1,%d0 51bb6: 6000 fec6 braw 51a7e fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 51bba: 4a82 tstl %d2 <== NOT EXECUTED 51bbc: 6708 beqs 51bc6 <== NOT EXECUTED 51bbe: b4a8 000c cmpl %a0@(12),%d2 <== NOT EXECUTED 51bc2: 6600 ff30 bnew 51af4 <== NOT EXECUTED { *ret = (void *)the_node; return 0; 51bc6: 4284 clrl %d4 <== NOT EXECUTED 51bc8: 6000 ff32 braw 51afc <== NOT EXECUTED ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51bcc: 4280 clrl %d0 <== NOT EXECUTED 51bce: 102a 0005 moveb %a2@(5),%d0 <== NOT EXECUTED 51bd2: 5581 subql #2,%d1 <== NOT EXECUTED 51bd4: e1a9 lsll %d0,%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51bd6: 4280 clrl %d0 <== NOT EXECUTED 51bd8: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51bdc: d2aa 0030 addl %a2@(48),%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51be0: e1a9 lsll %d0,%d1 <== NOT EXECUTED 51be2: 6000 fef4 braw 51ad8 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51be6: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 51bea: 7a09 moveq #9,%d5 <== NOT EXECUTED 51bec: 2800 movel %d0,%d4 <== NOT EXECUTED 51bee: eaac lsrl %d5,%d4 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) return 1; 51bf0: 7201 moveq #1,%d1 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51bf2: d284 addl %d4,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51bf4: ea88 lsrl #5,%d0 <== NOT EXECUTED 51bf6: 780f moveq #15,%d4 <== NOT EXECUTED fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51bf8: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51bfa: c084 andl %d4,%d0 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51bfc: d081 addl %d1,%d0 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) 51bfe: b082 cmpl %d2,%d0 <== NOT EXECUTED 51c00: 6600 fef2 bnew 51af4 <== NOT EXECUTED 51c04: 60b4 bras 51bba <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51c06: 242c 0004 movel %a4@(4),%d2 51c0a: 7609 moveq #9,%d3 51c0c: 2202 movel %d2,%d1 51c0e: e6a9 lsrl %d3,%d1 51c10: 7001 moveq #1,%d0 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51c12: d081 addl %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51c14: ea8a lsrl #5,%d2 51c16: 780f moveq #15,%d4 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 51c18: 163c 0001 moveb #1,%d3 fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51c1c: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51c1e: c484 andl %d4,%d2 51c20: 226a 0062 moveal %a2@(98),%a1 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51c24: d480 addl %d0,%d2 51c26: c682 andl %d2,%d3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 51c28: 2003 movel %d3,%d0 51c2a: e98b lsll #4,%d3 51c2c: e588 lsll #2,%d0 51c2e: 9680 subl %d0,%d3 51c30: d3c3 addal %d3,%a1 51c32: 2059 moveal %a1@+,%a0 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 51c34: b3c8 cmpal %a0,%a1 51c36: 6600 fe16 bnew 51a4e 51c3a: 6000 fe64 braw 51aa0 if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(fs_info); 51c3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51c40: 4eb9 0005 3a4c jsr 53a4c <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 51c46: 588f addql #4,%sp <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(fs_info); 51c48: 2b40 000c movel %d0,%a5@(12) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 51c4c: 6600 ff06 bnew 51b54 <== NOT EXECUTED { free((*fat_fd)); 51c50: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 51c52: 4eb9 0004 4bec jsr 44bec <== NOT EXECUTED /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 51c58: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 51c5e: 588f addql #4,%sp <== NOT EXECUTED 51c60: 720c moveq #12,%d1 <== NOT EXECUTED 51c62: 2040 moveal %d0,%a0 <== NOT EXECUTED 51c64: 70ff moveq #-1,%d0 <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 51c66: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED free((*fat_fd)); /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 51c6c: 2081 movel %d1,%a0@ <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 51c6e: 4e5e unlk %fp <== NOT EXECUTED 51c70: 4e75 rts <== NOT EXECUTED /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 51c72: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 51c78: 740c moveq #12,%d2 <== NOT EXECUTED 51c7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 51c7c: 70ff moveq #-1,%d0 <== NOT EXECUTED 51c7e: 2082 movel %d2,%a0@ <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 51c80: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 51c86: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051c9c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 51c9c: 4e56 ffcc linkw %fp,#-52 51ca0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 51ca4: 246e 0008 moveal %fp@(8),%a2 51ca8: 266e 000c moveal %fp@(12),%a3 51cac: 282e 0010 movel %fp@(16),%d4 51cb0: 242e 0014 movel %fp@(20),%d2 int rc = RC_OK; ssize_t ret = 0; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 51cb4: 42ae fffc clrl %fp@(-4) uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) 51cb8: 4a82 tstl %d2 51cba: 6700 0106 beqw 51dc2 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 51cbe: 202b 0018 movel %a3@(24),%d0 51cc2: b880 cmpl %d0,%d4 51cc4: 6400 00fc bccw 51dc2 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 51cc8: b082 cmpl %d2,%d0 51cca: 6400 0102 bccw 51dce (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 51cce: 2400 movel %d0,%d2 <== NOT EXECUTED 51cd0: 9484 subl %d4,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 51cd2: 7001 moveq #1,%d0 51cd4: b0ab 0020 cmpl %a3@(32),%d0 51cd8: 6700 0106 beqw 51de0 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 51cdc: 4280 clrl %d0 <== NOT EXECUTED 51cde: 102a 0008 moveb %a2@(8),%d0 <== NOT EXECUTED 51ce2: 2604 movel %d4,%d3 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51ce4: 486e fffc pea %fp@(-4) <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 51ce8: e0ab lsrl %d0,%d3 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51cea: 2f03 movel %d3,%sp@- <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 51cec: 3c2a 0006 movew %a2@(6),%d6 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51cf0: 2f0b movel %a3,%sp@- <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 51cf2: 2d43 fff8 movel %d3,%fp@(-8) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51cf6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51cf8: 4eba fc3a jsr %pc@(51934 ) <== NOT EXECUTED if (rc != RC_OK) 51cfc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 51d00: 4a81 tstl %d1 <== NOT EXECUTED 51d02: 6600 0138 bnew 51e3c <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 51d06: 0286 0000 ffff andil #65535,%d6 <== NOT EXECUTED 51d0c: 5386 subql #1,%d6 <== NOT EXECUTED 51d0e: c886 andl %d6,%d4 <== NOT EXECUTED 51d10: 2d44 fff4 movel %d4,%fp@(-12) <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 51d14: 4a82 tstl %d2 <== NOT EXECUTED 51d16: 6700 01b0 beqw 51ec8 <== NOT EXECUTED 51d1a: 99cc subal %a4,%a4 <== NOT EXECUTED 51d1c: 2a0c movel %a4,%d5 <== NOT EXECUTED 51d1e: 284a moveal %a2,%a4 <== NOT EXECUTED 51d20: 4bf9 0005 2a90 lea 52a90 <_fat_block_read>,%a5 <== NOT EXECUTED 51d26: 1e2a 0002 moveb %a2@(2),%d7 <== NOT EXECUTED 51d2a: 3252 moveaw %a2@,%a1 <== NOT EXECUTED 51d2c: 2c2e fff4 movel %fp@(-12),%d6 <== NOT EXECUTED 51d30: 246e 0018 moveal %fp@(24),%a2 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 51d34: 4280 clrl %d0 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 51d36: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51d3a: 2208 movel %a0,%d1 <== NOT EXECUTED 51d3c: 5581 subql #2,%d1 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 51d3e: 302c 0006 movew %a4@(6),%d0 <== NOT EXECUTED 51d42: 9086 subl %d6,%d0 <== NOT EXECUTED 51d44: b480 cmpl %d0,%d2 <== NOT EXECUTED 51d46: 6402 bccs 51d4a <== NOT EXECUTED 51d48: 2002 movel %d2,%d0 <== NOT EXECUTED fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 51d4a: 4a88 tstl %a0 <== NOT EXECUTED 51d4c: 6600 00fa bnew 51e48 <== NOT EXECUTED 51d50: 7603 moveq #3,%d3 <== NOT EXECUTED 51d52: 182c 000e moveb %a4@(14),%d4 <== NOT EXECUTED 51d56: c883 andl %d3,%d4 <== NOT EXECUTED 51d58: 4a04 tstb %d4 <== NOT EXECUTED 51d5a: 6700 00ec beqw 51e48 <== NOT EXECUTED return fs_info->vol.rdir_loc; 51d5e: 222c 001e movel %a4@(30),%d1 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 51d62: 4284 clrl %d4 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51d64: 4872 5800 pea %a2@(00000000,%d5:l) <== NOT EXECUTED if ( ret < 0 ) return -1; count -= c; 51d68: 9480 subl %d0,%d2 <== NOT EXECUTED cmpltd += c; 51d6a: da80 addl %d0,%d5 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51d6c: 2041 moveal %d1,%a0 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 51d6e: 3809 movew %a1,%d4 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51d70: 2f00 movel %d0,%sp@- <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 51d72: 2244 moveal %d4,%a1 <== NOT EXECUTED 51d74: 2009 movel %a1,%d0 <== NOT EXECUTED 51d76: 5380 subql #1,%d0 <== NOT EXECUTED while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 51d78: 0287 0000 00ff andil #255,%d7 <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51d7e: c086 andl %d6,%d0 <== NOT EXECUTED while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 51d80: eeae lsrl %d7,%d6 <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51d82: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51d84: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 51d88: 2f0c movel %a4,%sp@- <== NOT EXECUTED 51d8a: 4e95 jsr %a5@ <== NOT EXECUTED if ( ret < 0 ) 51d8c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 51d90: 4a80 tstl %d0 <== NOT EXECUTED 51d92: 6d00 009c bltw 51e30 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 51d96: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( rc != RC_OK ) return rc; ofs = 0; 51d9a: 4286 clrl %d6 <== NOT EXECUTED if ( ret < 0 ) return -1; count -= c; cmpltd += c; save_cln = cur_cln; 51d9c: 2e2e fffc movel %fp@(-4),%d7 <== NOT EXECUTED rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 51da0: 2f07 movel %d7,%sp@- <== NOT EXECUTED 51da2: 2f0c movel %a4,%sp@- <== NOT EXECUTED 51da4: 4eb9 0005 9450 jsr 59450 <== NOT EXECUTED if ( rc != RC_OK ) 51daa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51dae: 4a80 tstl %d0 <== NOT EXECUTED 51db0: 6612 bnes 51dc4 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 51db2: 4a82 tstl %d2 <== NOT EXECUTED 51db4: 6700 00e4 beqw 51e9a <== NOT EXECUTED 51db8: 1e2c 0002 moveb %a4@(2),%d7 <== NOT EXECUTED 51dbc: 3254 moveaw %a4@,%a1 <== NOT EXECUTED 51dbe: 6000 ff74 braw 51d34 <== NOT EXECUTED uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) return cmpltd; 51dc2: 4280 clrl %d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 51dc4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 51dca: 4e5e unlk %fp 51dcc: 4e75 rts */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) 51dce: 2200 movel %d0,%d1 51dd0: 9282 subl %d2,%d1 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 51dd2: b284 cmpl %d4,%d1 51dd4: 6400 fefc bccw 51cd2 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 51dd8: 2400 movel %d0,%d2 <== NOT EXECUTED 51dda: 9484 subl %d4,%d2 <== NOT EXECUTED 51ddc: 6000 fef4 braw 51cd2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 51de0: 4aab 0024 tstl %a3@(36) 51de4: 6600 fef6 bnew 51cdc 51de8: 7203 moveq #3,%d1 51dea: 102a 000e moveb %a2@(14),%d0 51dee: c081 andl %d1,%d0 51df0: 4a00 tstb %d0 51df2: 6700 fee8 beqw 51cdc (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 51df6: 202b 001c movel %a3@(28),%d0 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 51dfa: 665c bnes 51e58 <== NEVER TAKEN return fs_info->vol.rdir_loc; 51dfc: 202a 001e movel %a2@(30),%d0 sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51e00: 4281 clrl %d1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 51e02: 2040 moveal %d0,%a0 51e04: 2f2e 0018 movel %fp@(24),%sp@- if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51e08: 3212 movew %a2@,%d1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 51e0a: 2f02 movel %d2,%sp@- if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51e0c: 2401 movel %d1,%d2 51e0e: 5382 subql #1,%d2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 51e10: 4281 clrl %d1 51e12: 122a 0002 moveb %a2@(2),%d1 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 51e16: c484 andl %d4,%d2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 51e18: e2ac lsrl %d1,%d4 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 51e1a: 2f02 movel %d2,%sp@- 51e1c: 4870 4800 pea %a0@(00000000,%d4:l) 51e20: 2f0a movel %a2,%sp@- 51e22: 4eb9 0005 2a90 jsr 52a90 <_fat_block_read> if ( ret < 0 ) 51e28: 4fef 0014 lea %sp@(20),%sp 51e2c: 4a80 tstl %d0 51e2e: 6c94 bges 51dc4 <== ALWAYS TAKEN sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 51e30: 70ff moveq #-1,%d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 51e32: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 51e38: 4e5e unlk %fp <== NOT EXECUTED 51e3a: 4e75 rts <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 51e3c: 2001 movel %d1,%d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 51e3e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 51e44: 4e5e unlk %fp <== NOT EXECUTED 51e46: 4e75 rts <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51e48: 4283 clrl %d3 <== NOT EXECUTED 51e4a: 162c 0005 moveb %a4@(5),%d3 <== NOT EXECUTED 51e4e: e7a9 lsll %d3,%d1 <== NOT EXECUTED 51e50: d2ac 0030 addl %a4@(48),%d1 <== NOT EXECUTED 51e54: 6000 ff0c braw 51d62 <== NOT EXECUTED 51e58: 4281 clrl %d1 <== NOT EXECUTED 51e5a: 122a 0005 moveb %a2@(5),%d1 <== NOT EXECUTED 51e5e: 5580 subql #2,%d0 <== NOT EXECUTED 51e60: e3a8 lsll %d1,%d0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51e62: 4281 clrl %d1 <== NOT EXECUTED 51e64: d0aa 0030 addl %a2@(48),%d0 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, count, buf); 51e68: 2040 moveal %d0,%a0 <== NOT EXECUTED 51e6a: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51e6e: 3212 movew %a2@,%d1 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, count, buf); 51e70: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51e72: 2401 movel %d1,%d2 <== NOT EXECUTED 51e74: 5382 subql #1,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 51e76: 4281 clrl %d1 <== NOT EXECUTED 51e78: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 51e7c: c484 andl %d4,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 51e7e: e2ac lsrl %d1,%d4 <== NOT EXECUTED byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 51e80: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51e82: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 51e86: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51e88: 4eb9 0005 2a90 jsr 52a90 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 51e8e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 51e92: 4a80 tstl %d0 <== NOT EXECUTED 51e94: 6c00 ff2e bgew 51dc4 <== NOT EXECUTED 51e98: 6096 bras 51e30 <== NOT EXECUTED 51e9a: 244c moveal %a4,%a2 <== NOT EXECUTED 51e9c: 2845 moveal %d5,%a4 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 51e9e: 4282 clrl %d2 <== NOT EXECUTED 51ea0: 142a 0008 moveb %a2@(8),%d2 <== NOT EXECUTED 51ea4: 2005 movel %d5,%d0 <== NOT EXECUTED 51ea6: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 51eaa: 41f0 c8ff lea %a0@(ffffffff,%a4:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 51eae: 2747 0036 movel %d7,%a3@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 51eb2: 2208 movel %a0,%d1 <== NOT EXECUTED 51eb4: e4a9 lsrl %d2,%d1 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 51eb6: d2ae fff8 addl %fp@(-8),%d1 <== NOT EXECUTED 51eba: 2741 0032 movel %d1,%a3@(50) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 51ebe: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 51ec4: 4e5e unlk %fp <== NOT EXECUTED 51ec6: 4e75 rts <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 51ec8: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 51ecc: 99cc subal %a4,%a4 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 51ece: 4282 clrl %d2 <== NOT EXECUTED 51ed0: 142a 0008 moveb %a2@(8),%d2 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 51ed4: 4287 clrl %d7 <== NOT EXECUTED 51ed6: 4280 clrl %d0 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 51ed8: 41f0 c8ff lea %a0@(ffffffff,%a4:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 51edc: 2747 0036 movel %d7,%a3@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 51ee0: 2208 movel %a0,%d1 <== NOT EXECUTED 51ee2: e4a9 lsrl %d2,%d1 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 51ee4: d2ae fff8 addl %fp@(-8),%d1 <== NOT EXECUTED 51ee8: 2741 0032 movel %d1,%a3@(50) <== NOT EXECUTED 51eec: 60d0 bras 51ebe <== NOT EXECUTED =============================================================================== 0005274c : int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5274c: 7001 moveq #1,%d0 <== NOT EXECUTED int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 5274e: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 52752: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 52756: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; 5275a: 242b 001c movel %a3@(28),%d2 <== NOT EXECUTED int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 5275e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; 52762: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52766: b0ab 0020 cmpl %a3@(32),%d0 <== NOT EXECUTED 5276a: 6760 beqs 527cc <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5276c: 2002 movel %d2,%d0 <== NOT EXECUTED 5276e: c0aa 0010 andl %a2@(16),%d0 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 52772: 42ab 0018 clrl %a3@(24) <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 52776: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED 5277a: 6474 bccs 527f0 <== NOT EXECUTED 5277c: 280e movel %fp,%d4 <== NOT EXECUTED 5277e: 5984 subql #4,%d4 <== NOT EXECUTED 52780: 49f9 0005 9450 lea 59450 ,%a4 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 52786: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52788: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5278a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5278c: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 5278e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52792: 4a80 tstl %d0 <== NOT EXECUTED 52794: 662c bnes 527c2 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 52796: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 5279a: 4283 clrl %d3 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5279c: 2200 movel %d0,%d1 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 5279e: 362a 0006 movew %a2@(6),%d3 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 527a2: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 527a6: d7ab 0018 addl %d3,%a3@(24) <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 527aa: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED 527ae: 6442 bccs 527f2 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 527b0: 2f04 movel %d4,%sp@- <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 527b2: 2400 movel %d0,%d2 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 527b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 527b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 527b8: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 527ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 527be: 4a80 tstl %d0 <== NOT EXECUTED 527c0: 67d4 beqs 52796 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 527c2: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 527c8: 4e5e unlk %fp <== NOT EXECUTED 527ca: 4e75 rts <== NOT EXECUTED int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 527cc: 4aab 0024 tstl %a3@(36) <== NOT EXECUTED 527d0: 669a bnes 5276c <== NOT EXECUTED 527d2: 7203 moveq #3,%d1 <== NOT EXECUTED 527d4: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED 527d8: c081 andl %d1,%d0 <== NOT EXECUTED 527da: 4a00 tstb %d0 <== NOT EXECUTED 527dc: 678e beqs 5276c <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; 527de: 4280 clrl %d0 <== NOT EXECUTED /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 527e0: 276a 0028 0018 movel %a2@(40),%a3@(24) <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 527e6: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 527ec: 4e5e unlk %fp <== NOT EXECUTED 527ee: 4e75 rts <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; 527f0: 4282 clrl %d2 <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 527f2: 2742 003a movel %d2,%a3@(58) <== NOT EXECUTED 527f6: 4280 clrl %d0 <== NOT EXECUTED return rc; } 527f8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 527fe: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00051eee : ) { int rc = RC_OK; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 51eee: 72ff moveq #-1,%d1 <== NOT EXECUTED fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { 51ef0: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 51ef4: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 51ef8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ <== NOT EXECUTED 51efc: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 51f00: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 51f04: 202a 0018 movel %a2@(24),%d0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t new_length ) { int rc = RC_OK; uint32_t cur_cln = 0; 51f08: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 51f0c: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) 51f10: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 51f12: 646c bccs 51f80 <== NOT EXECUTED return rc; assert(fat_fd->fat_file_size); 51f14: 4a80 tstl %d0 <== NOT EXECUTED 51f16: 6700 00ae beqw 51fc6 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 51f1a: 4282 clrl %d2 <== NOT EXECUTED 51f1c: 4281 clrl %d1 <== NOT EXECUTED 51f1e: 122b 0008 moveb %a3@(8),%d1 <== NOT EXECUTED 51f22: 342b 0006 movew %a3@(6),%d2 <== NOT EXECUTED 51f26: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 <== NOT EXECUTED 51f2a: 2408 movel %a0,%d2 <== NOT EXECUTED 51f2c: e2aa lsrl %d1,%d2 <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 51f2e: 2602 movel %d2,%d3 <== NOT EXECUTED 51f30: e3ab lsll %d1,%d3 <== NOT EXECUTED 51f32: b680 cmpl %d0,%d3 <== NOT EXECUTED 51f34: 644a bccs 51f80 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 51f36: 4a82 tstl %d2 <== NOT EXECUTED 51f38: 6752 beqs 51f8c <== NOT EXECUTED { rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); 51f3a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 51f3e: 2042 moveal %d2,%a0 <== NOT EXECUTED 51f40: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 51f44: 49fa f9ee lea %pc@(51934 ),%a4 <== NOT EXECUTED 51f48: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51f4a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51f4c: 4e94 jsr %a4@ <== NOT EXECUTED if (rc != RC_OK) 51f4e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) return RC_OK; if (cl_start != 0) { rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); 51f52: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 51f54: 662c bnes 51f82 <== NOT EXECUTED return rc; } rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51f56: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 51f5a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51f5c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51f5e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51f60: 4e94 jsr %a4@ <== NOT EXECUTED if (rc != RC_OK) 51f62: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (rc != RC_OK) return rc; } rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51f66: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 51f68: 6618 bnes 51f82 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 51f6a: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 51f6e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51f70: 4eb9 0005 989e jsr 5989e <== NOT EXECUTED if (rc != RC_OK) 51f76: 508f addql #8,%sp <== NOT EXECUTED 51f78: 4a80 tstl %d0 <== NOT EXECUTED 51f7a: 6606 bnes 51f82 <== NOT EXECUTED return rc; if (cl_start != 0) 51f7c: 4a82 tstl %d2 <== NOT EXECUTED 51f7e: 6612 bnes 51f92 <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; 51f80: 4280 clrl %d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } 51f82: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 51f88: 4e5e unlk %fp <== NOT EXECUTED 51f8a: 4e75 rts <== NOT EXECUTED 51f8c: 49fa f9a6 lea %pc@(51934 ),%a4 <== NOT EXECUTED 51f90: 60c4 bras 51f56 <== NOT EXECUTED if (rc != RC_OK) return rc; if (cl_start != 0) { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); 51f92: 4878 ffff pea ffffffff <== NOT EXECUTED 51f96: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 51f9a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51f9c: 4eb9 0005 9622 jsr 59622 <== NOT EXECUTED if ( rc != RC_OK ) 51fa2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51fa6: 4a80 tstl %d0 <== NOT EXECUTED 51fa8: 66d8 bnes 51f82 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 51faa: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 51fae: 5382 subql #1,%d2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 51fb0: 2541 0036 movel %d1,%a2@(54) <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 51fb4: 2542 0032 movel %d2,%a2@(50) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 51fb8: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED } return RC_OK; } 51fbc: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 51fc2: 4e5e unlk %fp <== NOT EXECUTED 51fc4: 4e75 rts <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 51fc6: 4879 0006 b102 pea 6b102 <== NOT EXECUTED 51fcc: 4879 0006 b160 pea 6b160 <__FUNCTION__.7507> <== NOT EXECUTED 51fd2: 4878 02d1 pea 2d1 <== NOT EXECUTED 51fd6: 4879 0006 b118 pea 6b118 <== NOT EXECUTED 51fdc: 4eb9 0005 4518 jsr 54518 <__assert_func> <== NOT EXECUTED =============================================================================== 000523ba : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 523ba: 4e56 ffc8 linkw %fp,#-56 523be: 202e 0014 movel %fp@(20),%d0 523c2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 523c6: 246e 000c moveal %fp@(12),%a2 523ca: 266e 0008 moveal %fp@(8),%a3 523ce: 262e 0010 movel %fp@(16),%d3 int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 523d2: 222a 0018 movel %a2@(24),%d1 uint32_t file_cln_initial = fat_fd->map.file_cln; 523d6: 282a 0032 movel %a2@(50),%d4 { int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; 523da: 42ae fff8 clrl %fp@(-8) bool zero_fill = start > fat_fd->fat_file_size; uint32_t file_cln_initial = fat_fd->map.file_cln; uint32_t cln; if ( count == 0 ) 523de: 4a80 tstl %d0 523e0: 6700 0146 beqw 52528 return cmpltd; if (start >= fat_fd->size_limit) 523e4: 242a 0014 movel %a2@(20),%d2 523e8: b483 cmpl %d3,%d2 523ea: 6300 0204 blsw 525f0 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) 523ee: 9483 subl %d3,%d2 523f0: b082 cmpl %d2,%d0 523f2: 6500 0108 bcsw 524fc count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 523f6: 486e fff8 pea %fp@(-8) <== NOT EXECUTED int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 523fa: b681 cmpl %d1,%d3 <== NOT EXECUTED 523fc: 52c0 shi %d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 523fe: 2a02 movel %d2,%d5 <== NOT EXECUTED 52400: da83 addl %d3,%d5 <== NOT EXECUTED int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 52402: 49c0 extbl %d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 52404: 4480 negl %d0 <== NOT EXECUTED 52406: 2f05 movel %d5,%sp@- <== NOT EXECUTED 52408: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5240a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5240c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5240e: 4eb9 0005 2188 jsr 52188 <== NOT EXECUTED if (RC_OK == rc) 52414: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 52418: 4a80 tstl %d0 <== NOT EXECUTED 5241a: 6600 00d6 bnew 524f2 <== NOT EXECUTED { /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 5241e: 202e fff8 movel %fp@(-8),%d0 52422: b085 cmpl %d5,%d0 52424: 6704 beqs 5242a <== ALWAYS TAKEN count = c - start; 52426: 2400 movel %d0,%d2 <== NOT EXECUTED 52428: 9483 subl %d3,%d2 <== NOT EXECUTED */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 5242a: 7201 moveq #1,%d1 */ if (c != (start + count)) count = c - start; /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) 5242c: 102b 000e moveb %a3@(14),%d0 */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 52430: b2aa 0020 cmpl %a2@(32),%d1 52434: 6700 00fe beqw 52534 const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 52438: 2a4e moveal %fp,%a5 uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; 5243a: 4286 clrl %d6 5243c: 1c2b 0008 moveb %a3@(8),%d6 52440: 2a03 movel %d3,%d5 52442: ecad lsrl %d6,%d5 const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 52444: 42a5 clrl %a5@- uint32_t file_cln_cnt; ssize_t ret; uint32_t c; bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); 52446: 2f0d movel %a5,%sp@- 52448: 2f05 movel %d5,%sp@- 5244a: 2f0a movel %a2,%sp@- 5244c: 2f0b movel %a3,%sp@- 5244e: 4eba f4e4 jsr %pc@(51934 ) if (RC_OK == rc) 52452: 4fef 0010 lea %sp@(16),%sp 52456: 4a81 tstl %d1 52458: 6600 0090 bnew 524ea int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 5245c: 2005 movel %d5,%d0 5245e: eda8 lsll %d6,%d0 bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; 52460: 206e fffc moveal %fp@(-4),%a0 int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 52464: 9680 subl %d0,%d3 bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; 52466: 2e08 movel %a0,%d7 52468: 9eaa 001c subl %a2@(28),%d7 int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 5246c: 2d43 fff4 movel %d3,%fp@(-12) rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) && (bytes_to_write > 0)) 52470: 4a82 tstl %d2 52472: 6700 0194 beqw 52608 52476: 2243 moveal %d3,%a1 52478: 99cc subal %a4,%a4 5247a: 4283 clrl %d3 5247c: 4206 clrb %d6 5247e: 2d4d fff0 movel %a5,%fp@(-16) { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); 52482: 4280 clrl %d0 if (file_cln_initial < file_cln_cnt) 52484: 7201 moveq #1,%d1 { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) && (bytes_to_write > 0)) { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); 52486: 302b 0006 movew %a3@(6),%d0 5248a: 9089 subl %a1,%d0 5248c: b480 cmpl %d0,%d2 5248e: 6402 bccs 52492 52490: 2002 movel %d2,%d0 if (file_cln_initial < file_cln_cnt) 52492: be84 cmpl %d4,%d7 52494: 6200 00f2 bhiw 52588 52498: 4281 clrl %d1 5249a: 1206 moveb %d6,%d1 if (0 > ret) rc = -1; if (RC_OK == rc) { ++file_cln_cnt; 5249c: 5287 addql #1,%d7 c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); if (file_cln_initial < file_cln_cnt) overwrite_cluster = true; ret = fat_cluster_write(fs_info, 5249e: 2a6e 0018 moveal %fp@(24),%a5 524a2: 2f01 movel %d1,%sp@- 524a4: 4875 c800 pea %a5@(00000000,%a4:l) 524a8: 2f00 movel %d0,%sp@- 524aa: 2f09 movel %a1,%sp@- 524ac: 2f08 movel %a0,%sp@- 524ae: 2f0b movel %a3,%sp@- 524b0: 4eb9 0005 2d44 jsr 52d44 cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) 524b6: 4fef 0018 lea %sp@(24),%sp 524ba: 4a80 tstl %d0 524bc: 6d00 00f0 bltw 525ae if (RC_OK == rc) { ++file_cln_cnt; bytes_to_write -= ret; cmpltd += ret; save_cln = cur_cln; 524c0: 262e fffc movel %fp@(-4),%d3 rc = -1; if (RC_OK == rc) { ++file_cln_cnt; bytes_to_write -= ret; 524c4: 9480 subl %d0,%d2 cmpltd += ret; 524c6: d9c0 addal %d0,%a4 save_cln = cur_cln; if (0 < bytes_to_write) 524c8: 6600 0106 bnew 525d0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 524cc: 2a6e fff4 moveal %fp@(-12),%a5 524d0: 4282 clrl %d2 524d2: 142b 0008 moveb %a3@(8),%d2 524d6: 220c movel %a4,%d1 524d8: 4bf4 d8ff lea %a4@(ffffffff,%a5:l),%a5 fat_fd->map.disk_cln = save_cln; 524dc: 2543 0036 movel %d3,%a2@(54) } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 524e0: 200d movel %a5,%d0 524e2: e4a8 lsrl %d2,%d0 } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 524e4: d085 addl %d5,%d0 524e6: 2540 0032 movel %d0,%a2@(50) fat_fd, start, count, buf, file_cln_initial); if (0 > ret) 524ea: 4a81 tstl %d1 524ec: 6d00 008e bltw 5257c rc = -1; else cmpltd = ret; 524f0: 2001 movel %d1,%d0 } if (RC_OK != rc) return rc; else return cmpltd; } 524f2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 524f8: 4e5e unlk %fp 524fa: 4e75 rts 524fc: 2400 movel %d0,%d2 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 524fe: 486e fff8 pea %fp@(-8) int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 52502: b681 cmpl %d1,%d3 52504: 52c0 shi %d0 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 52506: 2a02 movel %d2,%d5 52508: da83 addl %d3,%d5 int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 5250a: 49c0 extbl %d0 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 5250c: 4480 negl %d0 5250e: 2f05 movel %d5,%sp@- 52510: 2f00 movel %d0,%sp@- 52512: 2f0a movel %a2,%sp@- 52514: 2f0b movel %a3,%sp@- 52516: 4eb9 0005 2188 jsr 52188 if (RC_OK == rc) 5251c: 4fef 0014 lea %sp@(20),%sp 52520: 4a80 tstl %d0 52522: 66ce bnes 524f2 <== NEVER TAKEN 52524: 6000 fef8 braw 5241e uint32_t file_cln_initial = fat_fd->map.file_cln; uint32_t cln; if ( count == 0 ) return cmpltd; 52528: 4280 clrl %d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return cmpltd; } 5252a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52530: 4e5e unlk %fp <== NOT EXECUTED 52532: 4e75 rts <== NOT EXECUTED */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 52534: 4aaa 0024 tstl %a2@(36) 52538: 6600 fefe bnew 52438 5253c: 123c 0003 moveb #3,%d1 52540: c081 andl %d1,%d0 52542: 4a00 tstb %d0 52544: 6700 fef2 beqw 52438 /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); byte = start & (fs_info->vol.bpc -1); 52548: 4281 clrl %d1 /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); 5254a: 4280 clrl %d0 byte = start & (fs_info->vol.bpc -1); ret = fat_cluster_write(fs_info, 5254c: 42a7 clrl %sp@- /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); byte = start & (fs_info->vol.bpc -1); 5254e: 322b 0006 movew %a3@(6),%d1 ret = fat_cluster_write(fs_info, 52552: 2f2e 0018 movel %fp@(24),%sp@- /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); byte = start & (fs_info->vol.bpc -1); 52556: 5381 subql #1,%d1 ret = fat_cluster_write(fs_info, 52558: c283 andl %d3,%d1 5255a: 2f02 movel %d2,%sp@- /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); 5255c: 102b 0008 moveb %a3@(8),%d0 52560: e0ab lsrl %d0,%d3 byte = start & (fs_info->vol.bpc -1); ret = fat_cluster_write(fs_info, 52562: 2f01 movel %d1,%sp@- 52564: d6aa 001c addl %a2@(28),%d3 52568: 2f03 movel %d3,%sp@- 5256a: 2f0b movel %a3,%sp@- 5256c: 4eb9 0005 2d44 jsr 52d44 cln, byte, count, buf, false); if (0 > ret) 52572: 4fef 0018 lea %sp@(24),%sp 52576: 4a80 tstl %d0 52578: 6c00 ff78 bgew 524f2 start, count, buf, file_cln_initial); if (0 > ret) rc = -1; 5257c: 70ff moveq #-1,%d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return cmpltd; } 5257e: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52584: 4e5e unlk %fp <== NOT EXECUTED 52586: 4e75 rts <== NOT EXECUTED c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); if (file_cln_initial < file_cln_cnt) overwrite_cluster = true; ret = fat_cluster_write(fs_info, 52588: 2a6e 0018 moveal %fp@(24),%a5 if (0 > ret) rc = -1; if (RC_OK == rc) { ++file_cln_cnt; 5258c: 5287 addql #1,%d7 c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); if (file_cln_initial < file_cln_cnt) overwrite_cluster = true; ret = fat_cluster_write(fs_info, 5258e: 2f01 movel %d1,%sp@- 52590: 4875 c800 pea %a5@(00000000,%a4:l) && (bytes_to_write > 0)) { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); if (file_cln_initial < file_cln_cnt) overwrite_cluster = true; 52594: 7c01 moveq #1,%d6 ret = fat_cluster_write(fs_info, 52596: 2f00 movel %d0,%sp@- 52598: 2f09 movel %a1,%sp@- 5259a: 2f08 movel %a0,%sp@- 5259c: 2f0b movel %a3,%sp@- 5259e: 4eb9 0005 2d44 jsr 52d44 cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) 525a4: 4fef 0018 lea %sp@(24),%sp 525a8: 4a80 tstl %d0 525aa: 6c00 ff14 bgew 524c0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 525ae: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 525b2: 4282 clrl %d2 <== NOT EXECUTED 525b4: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) 525b8: 72ff moveq #-1,%d1 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 525ba: 41f4 88ff lea %a4@(ffffffff,%a0:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 525be: 2543 0036 movel %d3,%a2@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 525c2: 2008 movel %a0,%d0 <== NOT EXECUTED 525c4: e4a8 lsrl %d2,%d0 <== NOT EXECUTED } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 525c6: d085 addl %d5,%d0 <== NOT EXECUTED 525c8: 2540 0032 movel %d0,%a2@(50) <== NOT EXECUTED 525cc: 6000 ff1c braw 524ea <== NOT EXECUTED ++file_cln_cnt; bytes_to_write -= ret; cmpltd += ret; save_cln = cur_cln; if (0 < bytes_to_write) rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 525d0: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 525d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 525d6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 525d8: 4eb9 0005 9450 jsr 59450 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) 525de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 525e2: 93c9 subal %a1,%a1 <== NOT EXECUTED 525e4: 4a80 tstl %d0 <== NOT EXECUTED 525e6: 6644 bnes 5262c <== NOT EXECUTED 525e8: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 525ec: 6000 fe94 braw 52482 <== NOT EXECUTED if ( count == 0 ) return cmpltd; if (start >= fat_fd->size_limit) rtems_set_errno_and_return_minus_one(EFBIG); 525f0: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 525f6: 781b moveq #27,%d4 <== NOT EXECUTED 525f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 525fa: 70ff moveq #-1,%d0 <== NOT EXECUTED 525fc: 2084 movel %d4,%a0@ <== NOT EXECUTED } if (RC_OK != rc) return rc; else return cmpltd; } 525fe: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52604: 4e5e unlk %fp <== NOT EXECUTED 52606: 4e75 rts <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 52608: 2a6e fff4 moveal %fp@(-12),%a5 <== NOT EXECUTED const uint32_t count, const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; 5260c: 99cc subal %a4,%a4 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 5260e: 4282 clrl %d2 <== NOT EXECUTED 52610: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ 52614: 4283 clrl %d3 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 52616: 4bf4 d8ff lea %a4@(ffffffff,%a5:l),%a5 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 5261a: 2543 0036 movel %d3,%a2@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 5261e: 200d movel %a5,%d0 <== NOT EXECUTED 52620: e4a8 lsrl %d2,%d0 <== NOT EXECUTED } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 52622: d085 addl %d5,%d0 <== NOT EXECUTED 52624: 2540 0032 movel %d0,%a2@(50) <== NOT EXECUTED 52628: 6000 fec0 braw 524ea <== NOT EXECUTED ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 5262c: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 52630: 4282 clrl %d2 <== NOT EXECUTED 52632: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED 52636: 2200 movel %d0,%d1 <== NOT EXECUTED 52638: 41f4 88ff lea %a4@(ffffffff,%a0:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 5263c: 2543 0036 movel %d3,%a2@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 52640: 2008 movel %a0,%d0 <== NOT EXECUTED 52642: e4a8 lsrl %d2,%d0 <== NOT EXECUTED } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 52644: d085 addl %d5,%d0 <== NOT EXECUTED 52646: 2540 0032 movel %d0,%a2@(50) <== NOT EXECUTED 5264a: 6000 fe9e braw 524ea <== NOT EXECUTED =============================================================================== 0005989e : int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 5989e: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 598a2: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ <== NOT EXECUTED 598a6: 2e2e 000c movel %fp@(12),%d7 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 598aa: 2007 movel %d7,%d0 <== NOT EXECUTED int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 598ac: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 598b0: c0aa 0010 andl %a2@(16),%d0 <== NOT EXECUTED uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; 598b4: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 598b8: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED 598bc: 6400 009e bccw 5995c <== NOT EXECUTED 598c0: 2a0e movel %fp,%d5 <== NOT EXECUTED 598c2: 2407 movel %d7,%d2 <== NOT EXECUTED 598c4: 4284 clrl %d4 <== NOT EXECUTED 598c6: 4286 clrl %d6 <== NOT EXECUTED 598c8: 5985 subql #4,%d5 <== NOT EXECUTED 598ca: 47f9 0005 9450 lea 59450 ,%a3 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 598d0: 49f9 0005 9622 lea 59622 ,%a4 <== NOT EXECUTED uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 598d6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 598d8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 598da: 2f0a movel %a2,%sp@- <== NOT EXECUTED 598dc: 4e93 jsr %a3@ <== NOT EXECUTED if ( rc != RC_OK ) 598de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 598e2: 2600 movel %d0,%d3 <== NOT EXECUTED if ( rc != RC_OK ) 598e4: 6650 bnes 59936 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 598e6: 42a7 clrl %sp@- <== NOT EXECUTED if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 598e8: 5284 addql #1,%d4 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 598ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 598ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 598ee: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 598f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 598f4: 4a80 tstl %d0 <== NOT EXECUTED 598f6: 6702 beqs 598fa <== NOT EXECUTED 598f8: 2c00 movel %d0,%d6 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 598fa: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 598fe: 2002 movel %d2,%d0 <== NOT EXECUTED 59900: c0aa 0010 andl %a2@(16),%d0 <== NOT EXECUTED 59904: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED 59908: 65cc bcss 598d6 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5990a: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED 5990e: 72ff moveq #-1,%d1 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 59910: 2547 0046 movel %d7,%a2@(70) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 59914: b280 cmpl %d0,%d1 <== NOT EXECUTED 59916: 6706 beqs 5991e <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 59918: d880 addl %d0,%d4 <== NOT EXECUTED 5991a: 2544 003e movel %d4,%a2@(62) <== NOT EXECUTED fat_buf_release(fs_info); 5991e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59920: 2606 movel %d6,%d3 <== NOT EXECUTED 59922: 4eb9 0005 2804 jsr 52804 <== NOT EXECUTED 59928: 588f addql #4,%sp <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 5992a: 2003 movel %d3,%d0 <== NOT EXECUTED 5992c: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 <== NOT EXECUTED 59932: 4e5e unlk %fp <== NOT EXECUTED 59934: 4e75 rts <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); if ( rc != RC_OK ) { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 59936: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED 5993a: 72ff moveq #-1,%d1 <== NOT EXECUTED 5993c: b280 cmpl %d0,%d1 <== NOT EXECUTED 5993e: 6706 beqs 59946 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 59940: d880 addl %d0,%d4 <== NOT EXECUTED 59942: 2544 003e movel %d4,%a2@(62) <== NOT EXECUTED fat_buf_release(fs_info); 59946: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59948: 4eb9 0005 2804 jsr 52804 <== NOT EXECUTED 5994e: 588f addql #4,%sp <== NOT EXECUTED fat_buf_release(fs_info); if (rc1 != RC_OK) return rc1; return RC_OK; } 59950: 2003 movel %d3,%d0 <== NOT EXECUTED 59952: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 <== NOT EXECUTED 59958: 4e5e unlk %fp <== NOT EXECUTED 5995a: 4e75 rts <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5995c: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED ) { int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; 59960: 4284 clrl %d4 <== NOT EXECUTED fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; 59962: 4286 clrl %d6 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 59964: 72ff moveq #-1,%d1 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 59966: 2547 0046 movel %d7,%a2@(70) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5996a: b280 cmpl %d0,%d1 <== NOT EXECUTED 5996c: 66aa bnes 59918 <== NOT EXECUTED 5996e: 60ae bras 5991e <== NOT EXECUTED =============================================================================== 00053b0a : fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53b0a: 7001 moveq #1,%d0 <== NOT EXECUTED void fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { 53b0c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 53b10: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53b14: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED 53b18: 92a9 0076 subl %a1@(118),%d1 <== NOT EXECUTED void fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { 53b1c: 2f02 movel %d2,%sp@- <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53b1e: 2401 movel %d1,%d2 <== NOT EXECUTED 53b20: e68a lsrl #3,%d2 <== NOT EXECUTED 53b22: 2069 006a moveal %a1@(106),%a0 <== NOT EXECUTED 53b26: d1c2 addal %d2,%a0 <== NOT EXECUTED 53b28: 7407 moveq #7,%d2 <== NOT EXECUTED 53b2a: c282 andl %d2,%d1 <== NOT EXECUTED 53b2c: e3a8 lsll %d1,%d0 <== NOT EXECUTED 53b2e: 1210 moveb %a0@,%d1 <== NOT EXECUTED 53b30: 4680 notl %d0 <== NOT EXECUTED 53b32: c081 andl %d1,%d0 <== NOT EXECUTED 53b34: 1080 moveb %d0,%a0@ <== NOT EXECUTED } 53b36: 241f movel %sp@+,%d2 <== NOT EXECUTED 53b38: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059450 : uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 59450: 7001 moveq #1,%d0 fat_get_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t *ret_val ) { 59452: 4e56 ffe0 linkw %fp,#-32 59456: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 5945a: 246e 0008 moveal %fp@(8),%a2 5945e: 242e 000c movel %fp@(12),%d2 uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 59462: b082 cmpl %d2,%d0 59464: 6400 0164 bccw 595ca 59468: 202a 0034 movel %a2@(52),%d0 5946c: 5280 addql #1,%d0 5946e: b082 cmpl %d2,%d0 59470: 6500 0158 bcsw 595ca rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 59474: 102a 000e moveb %a2@(14),%d0 59478: 0800 0000 btst #0,%d0 5947c: 667a bnes 594f8 5947e: 7202 moveq #2,%d1 <== NOT EXECUTED 59480: 2a02 movel %d2,%d5 <== NOT EXECUTED 59482: c081 andl %d1,%d0 <== NOT EXECUTED 59484: 4a00 tstb %d0 <== NOT EXECUTED 59486: 6778 beqs 59500 <== NOT EXECUTED 59488: da85 addl %d5,%d5 <== NOT EXECUTED 5948a: 4280 clrl %d0 5948c: 102a 0002 moveb %a2@(2),%d0 59490: 2605 movel %d5,%d3 59492: e0ab lsrl %d0,%d3 59494: d6aa 0050 addl %a2@(80),%d3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 59498: 47f9 0005 29d4 lea 529d4 ,%a3 5949e: 486e fffc pea %fp@(-4) 594a2: 4878 0001 pea 1 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 594a6: 3c12 movew %a2@,%d6 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 594a8: 2f03 movel %d3,%sp@- 594aa: 2f0a movel %a2,%sp@- 594ac: 4e93 jsr %a3@ if (rc != RC_OK) 594ae: 4fef 0010 lea %sp@(16),%sp sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 594b2: 2800 movel %d0,%d4 if (rc != RC_OK) 594b4: 6636 bnes 594ec <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) 594b6: 4280 clrl %d0 594b8: 102a 000e moveb %a2@(14),%d0 594bc: 7202 moveq #2,%d1 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 594be: 0286 0000 ffff andil #65535,%d6 594c4: 5386 subql #1,%d6 594c6: ca86 andl %d6,%d5 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 594c8: b280 cmpl %d0,%d1 594ca: 6738 beqs 59504 <== NEVER TAKEN 594cc: 123c 0004 moveb #4,%d1 594d0: b280 cmpl %d0,%d1 594d2: 6700 00a0 beqw 59574 594d6: 123c 0001 moveb #1,%d1 594da: b280 cmpl %d0,%d1 594dc: 6750 beqs 5952e *ret_val = *((uint32_t *)(sec_buf + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 594de: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 594e4: 78ff moveq #-1,%d4 <== NOT EXECUTED 594e6: 2240 moveal %d0,%a1 <== NOT EXECUTED 594e8: 7005 moveq #5,%d0 <== NOT EXECUTED 594ea: 2280 movel %d0,%a1@ <== NOT EXECUTED break; } return RC_OK; } 594ec: 2004 movel %d4,%d0 <== NOT EXECUTED 594ee: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 594f4: 4e5e unlk %fp <== NOT EXECUTED 594f6: 4e75 rts <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 594f8: 2a02 movel %d2,%d5 594fa: e28d lsrl #1,%d5 594fc: da82 addl %d2,%d5 594fe: 608a bras 5948a 59500: e58d lsll #2,%d5 <== NOT EXECUTED 59502: 6086 bras 5948a <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); 59504: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED static inline uint16_t m68k_swap_u16( uint16_t value ) { return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 59508: 4281 clrl %d1 <== NOT EXECUTED 5950a: 3230 5800 movew %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 5950e: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 59512: 2001 movel %d1,%d0 <== NOT EXECUTED 59514: e089 lsrl #8,%d1 <== NOT EXECUTED 59516: e188 lsll #8,%d0 <== NOT EXECUTED 59518: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED 5951e: 8081 orl %d1,%d0 <== NOT EXECUTED 59520: 2280 movel %d0,%a1@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 59522: 2004 movel %d4,%d0 <== NOT EXECUTED 59524: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5952a: 4e5e unlk %fp <== NOT EXECUTED 5952c: 4e75 rts <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); 5952e: 206e fffc moveal %fp@(-4),%a0 59532: 4281 clrl %d1 if ( ofs == (fs_info->vol.bps - 1) ) 59534: 4280 clrl %d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); 59536: 1230 5800 moveb %a0@(00000000,%d5:l),%d1 if ( ofs == (fs_info->vol.bps - 1) ) 5953a: 3012 movew %a2@,%d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); 5953c: 226e 0010 moveal %fp@(16),%a1 if ( ofs == (fs_info->vol.bps - 1) ) 59540: 5380 subql #1,%d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); 59542: 2281 movel %d1,%a1@ if ( ofs == (fs_info->vol.bps - 1) ) 59544: ba80 cmpl %d0,%d5 59546: 6700 009c beqw 595e4 *ret_val |= *sec_buf << 8; } else { *ret_val |= *(sec_buf + ofs + 1) << 8; 5954a: 4280 clrl %d0 5954c: 1030 5801 moveb %a0@(00000001,%d5:l),%d0 59550: e188 lsll #8,%d0 59552: 206e 0010 moveal %fp@(16),%a0 59556: 8081 orl %d1,%d0 59558: 2080 movel %d0,%a0@ } if ( FAT_CLUSTER_IS_ODD(cln) ) 5955a: 0802 0000 btst #0,%d2 5955e: 6752 beqs 595b2 *ret_val = (*ret_val) >> FAT12_SHIFT; 59560: 226e 0010 moveal %fp@(16),%a1 59564: e888 lsrl #4,%d0 59566: 2280 movel %d0,%a1@ rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 59568: 2004 movel %d4,%d0 5956a: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 59570: 4e5e unlk %fp 59572: 4e75 rts *ret_val = *((uint16_t *)(sec_buf + ofs)); *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(sec_buf + ofs)); 59574: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 59578: 7018 moveq #24,%d0 <== NOT EXECUTED 5957a: 2230 5800 movel %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5957e: 7a18 moveq #24,%d5 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 59580: 2601 movel %d1,%d3 <== NOT EXECUTED 59582: e0ab lsrl %d0,%d3 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 59584: 2401 movel %d1,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 59586: 2001 movel %d1,%d0 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 59588: e08a lsrl #8,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5958a: eba8 lsll %d5,%d0 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 5958c: e189 lsll #8,%d1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5958e: 0282 0000 ff00 andil #65280,%d2 <== NOT EXECUTED 59594: 8083 orl %d3,%d0 <== NOT EXECUTED 59596: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 5959a: 0281 00ff 0000 andil #16711680,%d1 <== NOT EXECUTED 595a0: 8081 orl %d1,%d0 <== NOT EXECUTED 595a2: 8082 orl %d2,%d0 <== NOT EXECUTED 595a4: 2080 movel %d0,%a0@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 595a6: 2004 movel %d4,%d0 <== NOT EXECUTED 595a8: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 595ae: 4e5e unlk %fp <== NOT EXECUTED 595b0: 4e75 rts <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 595b2: 206e 0010 moveal %fp@(16),%a0 595b6: 0280 0000 0fff andil #4095,%d0 595bc: 2080 movel %d0,%a0@ rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 595be: 2004 movel %d4,%d0 595c0: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 595c6: 4e5e unlk %fp 595c8: 4e75 rts uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); 595ca: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 595d0: 78ff moveq #-1,%d4 <== NOT EXECUTED 595d2: 7205 moveq #5,%d1 <== NOT EXECUTED 595d4: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 595d6: 2004 movel %d4,%d0 <== NOT EXECUTED 595d8: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); 595de: 2081 movel %d1,%a0@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 595e0: 4e5e unlk %fp <== NOT EXECUTED 595e2: 4e75 rts <== NOT EXECUTED * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 595e4: 486e fffc pea %fp@(-4) <== NOT EXECUTED 595e8: 2043 moveal %d3,%a0 <== NOT EXECUTED 595ea: 4878 0001 pea 1 <== NOT EXECUTED 595ee: 4868 0001 pea %a0@(1) <== NOT EXECUTED 595f2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 595f4: 4e93 jsr %a3@ <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 595f6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 595fa: 4a80 tstl %d0 <== NOT EXECUTED 595fc: 6616 bnes 59614 <== NOT EXECUTED return rc; *ret_val |= *sec_buf << 8; 595fe: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 59602: 4280 clrl %d0 <== NOT EXECUTED 59604: 1010 moveb %a0@,%d0 <== NOT EXECUTED 59606: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 5960a: e188 lsll #8,%d0 <== NOT EXECUTED 5960c: 8091 orl %a1@,%d0 <== NOT EXECUTED 5960e: 2280 movel %d0,%a1@ <== NOT EXECUTED 59610: 6000 ff48 braw 5955a <== NOT EXECUTED *ret_val = (*(sec_buf + ofs)); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) 59614: 2800 movel %d0,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 59616: 2004 movel %d4,%d0 <== NOT EXECUTED 59618: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5961e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053a4c : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { 53a4c: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 53a50: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED 53a54: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 53a58: 47f9 0004 5c8c lea 45c8c ,%a3 <== NOT EXECUTED 53a5e: 242a 0072 movel %a2@(114),%d2 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 53a62: 4a82 tstl %d2 <== NOT EXECUTED 53a64: 6768 beqs 53ace <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 53a66: 202a 006e movel %a2@(110),%d0 <== NOT EXECUTED 53a6a: 2200 movel %d0,%d1 <== NOT EXECUTED 53a6c: e689 lsrl #3,%d1 <== NOT EXECUTED 53a6e: 7807 moveq #7,%d4 <== NOT EXECUTED 53a70: 226a 006a moveal %a2@(106),%a1 <== NOT EXECUTED 53a74: 41f1 1800 lea %a1@(00000000,%d1:l),%a0 <== NOT EXECUTED 53a78: 1610 moveb %a0@,%d3 <== NOT EXECUTED 53a7a: c880 andl %d0,%d4 <== NOT EXECUTED 53a7c: 1203 moveb %d3,%d1 <== NOT EXECUTED 53a7e: 49c1 extbl %d1 <== NOT EXECUTED 53a80: 0901 btst %d4,%d1 <== NOT EXECUTED 53a82: 6730 beqs 53ab4 <== NOT EXECUTED 53a84: 4281 clrl %d1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 53a86: 5280 addql #1,%d0 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 53a88: 5281 addql #1,%d1 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 53a8a: 2540 006e movel %d0,%a2@(110) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 53a8e: b480 cmpl %d0,%d2 <== NOT EXECUTED 53a90: 6204 bhis 53a96 <== NOT EXECUTED fs_info->index = 0; 53a92: 42aa 006e clrl %a2@(110) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 53a96: b481 cmpl %d1,%d2 <== NOT EXECUTED 53a98: 6734 beqs 53ace <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 53a9a: 202a 006e movel %a2@(110),%d0 <== NOT EXECUTED 53a9e: 2600 movel %d0,%d3 <== NOT EXECUTED 53aa0: e68b lsrl #3,%d3 <== NOT EXECUTED 53aa2: 41f1 3800 lea %a1@(00000000,%d3:l),%a0 <== NOT EXECUTED 53aa6: 7807 moveq #7,%d4 <== NOT EXECUTED 53aa8: 1610 moveb %a0@,%d3 <== NOT EXECUTED 53aaa: c880 andl %d0,%d4 <== NOT EXECUTED 53aac: 1a03 moveb %d3,%d5 <== NOT EXECUTED 53aae: 49c5 extbl %d5 <== NOT EXECUTED 53ab0: 0905 btst %d4,%d5 <== NOT EXECUTED 53ab2: 66d2 bnes 53a86 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 53ab4: 7001 moveq #1,%d0 <== NOT EXECUTED 53ab6: e9a8 lsll %d4,%d0 <== NOT EXECUTED 53ab8: 8083 orl %d3,%d0 <== NOT EXECUTED 53aba: 1080 moveb %d0,%a0@ <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 53abc: 202a 006e movel %a2@(110),%d0 <== NOT EXECUTED 53ac0: d0aa 0076 addl %a2@(118),%d0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 53ac4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 53aca: 4e5e unlk %fp <== NOT EXECUTED 53acc: 4e75 rts <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 53ace: 203c 0fff ffff movel #268435455,%d0 <== NOT EXECUTED 53ad4: 90aa 0076 subl %a2@(118),%d0 <== NOT EXECUTED 53ad8: d482 addl %d2,%d2 <== NOT EXECUTED 53ada: b082 cmpl %d2,%d0 <== NOT EXECUTED 53adc: 620c bhis 53aea <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 53ade: 4280 clrl %d0 <== NOT EXECUTED } 53ae0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 53ae6: 4e5e unlk %fp <== NOT EXECUTED 53ae8: 4e75 rts <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 53aea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 53aec: 2f2a 006a movel %a2@(106),%sp@- <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; 53af0: 2542 0072 movel %d2,%a2@(114) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 53af4: 4e93 jsr %a3@ <== NOT EXECUTED if (fs_info->uino != NULL) 53af6: 508f addql #8,%sp <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 53af8: 2540 006a movel %d0,%a2@(106) <== NOT EXECUTED if (fs_info->uino != NULL) 53afc: 67e0 beqs 53ade <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 53afe: 242a 0072 movel %a2@(114),%d2 <== NOT EXECUTED 53b02: 2542 006e movel %d2,%a2@(110) <== NOT EXECUTED 53b06: 6000 ff5a braw 53a62 <== NOT EXECUTED =============================================================================== 000539c6 : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 539c6: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 539ca: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 539ce: 2200 movel %d0,%d1 <== NOT EXECUTED int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 539d0: 48d7 3c00 moveml %a2-%a5,%sp@ <== NOT EXECUTED 539d4: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; 539d8: 264e moveal %fp,%a3 <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 539da: 49f9 0005 2be6 lea 52be6 ,%a4 <== NOT EXECUTED if ( ret != fs_info->vol.bpc ) { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 539e0: 4bf9 0005 9450 lea 59450 ,%a5 <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 539e6: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED uint32_t start_cln ) { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; 539ea: 2700 movel %d0,%a3@- <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 539ec: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED 539f0: 6442 bccs 53a34 <== NOT EXECUTED { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 539f2: 4281 clrl %d1 <== NOT EXECUTED 539f4: 42a7 clrl %sp@- <== NOT EXECUTED 539f6: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED 539fa: 2f01 movel %d1,%sp@- <== NOT EXECUTED 539fc: 42a7 clrl %sp@- <== NOT EXECUTED 539fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53a00: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53a02: 4e94 jsr %a4@ <== NOT EXECUTED if ( ret != fs_info->vol.bpc ) 53a04: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 53a08: 4281 clrl %d1 <== NOT EXECUTED 53a0a: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED 53a0e: b081 cmpl %d1,%d0 <== NOT EXECUTED 53a10: 662e bnes 53a40 <== NOT EXECUTED { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 53a12: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53a14: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 53a18: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53a1a: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 53a1c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53a20: 4a80 tstl %d0 <== NOT EXECUTED 53a22: 6612 bnes 53a36 <== NOT EXECUTED 53a24: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53a28: 2200 movel %d0,%d1 <== NOT EXECUTED 53a2a: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED 53a2e: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED 53a32: 65be bcss 539f2 <== NOT EXECUTED return rc; } } return rc; 53a34: 4280 clrl %d0 <== NOT EXECUTED } 53a36: 4cee 3c00 ffec moveml %fp@(-20),%a2-%a5 <== NOT EXECUTED 53a3c: 4e5e unlk %fp <== NOT EXECUTED 53a3e: 4e75 rts <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); if ( ret != fs_info->vol.bpc ) { return -1; 53a40: 70ff moveq #-1,%d0 <== NOT EXECUTED } } return rc; } 53a42: 4cee 3c00 ffec moveml %fp@(-20),%a2-%a5 <== NOT EXECUTED 53a48: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052ebe : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { 52ebe: 4e56 ff60 linkw %fp,#-160 52ec2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); 52ec6: 4878 0002 pea 2 52eca: 2f2e 000c movel %fp@(12),%sp@- * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { 52ece: 246e 0008 moveal %fp@(8),%a2 char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 52ed2: 42ae ffaa clrl %fp@(-86) vol->fd = open(device, O_RDWR); 52ed6: 4eb9 0004 5a28 jsr 45a28 if (vol->fd < 0) 52edc: 508f addql #8,%sp ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); 52ede: 2540 0056 movel %d0,%a2@(86) if (vol->fd < 0) 52ee2: 6d00 07a4 bltw 53688 { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 52ee6: 486e ffba pea %fp@(-70) 52eea: 2f00 movel %d0,%sp@- 52eec: 4eb9 0004 4c7c jsr 44c7c if (rc != 0) 52ef2: 508f addql #8,%sp 52ef4: 4a80 tstl %d0 52ef6: 6600 06e2 bnew 535da close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 52efa: 202e ffc6 movel %fp@(-58),%d0 52efe: 0280 0000 f000 andil #61440,%d0 52f04: 0c80 0000 6000 cmpil #24576,%d0 52f0a: 6600 06ce bnew 535da static inline int rtems_disk_fd_get_disk_device( int fd, rtems_disk_device **dd_ptr ) { return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 52f0e: 486a 005a pea %a2@(90) 52f12: 2f3c 4004 4209 movel #1074020873,%sp@- 52f18: 2f2a 0056 movel %a2@(86),%sp@- 52f1c: 4eb9 0005 4868 jsr 54868 rtems_set_errno_and_return_minus_one(ENXIO); } /* check that device is registred as block device and lock it */ rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd); if (rc != 0) { 52f22: 4fef 000c lea %sp@(12),%sp 52f26: 4a80 tstl %d0 52f28: 6600 06b0 bnew 535da rtems_set_errno_and_return_minus_one(ENXIO); } /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 52f2c: 486e ffaa pea %fp@(-86) 52f30: 42a7 clrl %sp@- 52f32: 2f2a 005a movel %a2@(90),%sp@- 52f36: 4eb9 0005 06be jsr 506be if (sc != RTEMS_SUCCESSFUL) 52f3c: 4fef 000c lea %sp@(12),%sp 52f40: 4a80 tstl %d0 52f42: 6600 06f4 bnew 53638 { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 52f46: 226e ffaa moveal %fp@(-86),%a1 52f4a: 2069 001a moveal %a1@(26),%a0 52f4e: 1228 0010 moveb %a0@(16),%d1 52f52: 1a28 0011 moveb %a0@(17),%d5 52f56: 1c28 0012 moveb %a0@(18),%d6 52f5a: 3841 moveaw %d1,%a4 52f5c: 1228 0013 moveb %a0@(19),%d1 52f60: 1d45 ffa7 moveb %d5,%fp@(-89) 52f64: 1d41 ffa5 moveb %d1,%fp@(-91) 52f68: 1228 0020 moveb %a0@(32),%d1 52f6c: 1a28 0014 moveb %a0@(20),%d5 52f70: 1d41 ff96 moveb %d1,%fp@(-106) 52f74: 1228 0021 moveb %a0@(33),%d1 52f78: 1d46 ffa6 moveb %d6,%fp@(-90) 52f7c: 1d41 ff9d moveb %d1,%fp@(-99) 52f80: 1228 0022 moveb %a0@(34),%d1 52f84: 1d45 ffa4 moveb %d5,%fp@(-92) 52f88: 1d41 ff9c moveb %d1,%fp@(-100) 52f8c: 1228 0023 moveb %a0@(35),%d1 52f90: 1028 000f moveb %a0@(15),%d0 52f94: 1d41 ff9b moveb %d1,%fp@(-101) 52f98: 1228 0024 moveb %a0@(36),%d1 52f9c: 1428 000b moveb %a0@(11),%d2 52fa0: 1d41 ff97 moveb %d1,%fp@(-105) 52fa4: 1228 0025 moveb %a0@(37),%d1 52fa8: 1828 000c moveb %a0@(12),%d4 52fac: 1d41 ff9f moveb %d1,%fp@(-97) 52fb0: 1228 0026 moveb %a0@(38),%d1 52fb4: 1628 000d moveb %a0@(13),%d3 52fb8: 1d41 ff9e moveb %d1,%fp@(-98) 52fbc: 1228 0027 moveb %a0@(39),%d1 52fc0: 1e28 000e moveb %a0@(14),%d7 52fc4: 1a28 0016 moveb %a0@(22),%d5 52fc8: 1c28 0017 moveb %a0@(23),%d6 52fcc: 1d41 ffa3 moveb %d1,%fp@(-93) 52fd0: 1228 0028 moveb %a0@(40),%d1 52fd4: 3640 moveaw %d0,%a3 52fd6: 1d41 ff95 moveb %d1,%fp@(-107) 52fda: 1228 002c moveb %a0@(44),%d1 52fde: 1d41 ff8f moveb %d1,%fp@(-113) 52fe2: 1228 002d moveb %a0@(45),%d1 52fe6: 1d41 ff8e moveb %d1,%fp@(-114) 52fea: 1228 002e moveb %a0@(46),%d1 52fee: 1d41 ff8d moveb %d1,%fp@(-115) 52ff2: 1228 002f moveb %a0@(47),%d1 52ff6: 1d41 ff8b moveb %d1,%fp@(-117) 52ffa: 1228 0030 moveb %a0@(48),%d1 52ffe: 1d41 ff91 moveb %d1,%fp@(-111) 53002: 1228 0031 moveb %a0@(49),%d1 sc = rtems_bdbuf_release( block); 53006: 2f09 movel %a1,%sp@- { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 53008: 1d41 ff90 moveb %d1,%fp@(-112) sc = rtems_bdbuf_release( block); 5300c: 4eb9 0005 0890 jsr 50890 if (sc != RTEMS_SUCCESSFUL) 53012: 588f addql #4,%sp 53014: 4a80 tstl %d0 53016: 6600 0620 bnew 53638 } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); if ( (vol->bps != 512) && 5301a: 4280 clrl %d0 close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 5301c: 0284 0000 00ff andil #255,%d4 53022: 0282 0000 00ff andil #255,%d2 53028: e18c lsll #8,%d4 5302a: 8882 orl %d2,%d4 if ( (vol->bps != 512) && 5302c: 3004 movew %d4,%d0 close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 5302e: 3484 movew %d4,%a2@ 53030: 3a44 moveaw %d4,%a5 if ( (vol->bps != 512) && 53032: 0c80 0000 0200 cmpil #512,%d0 53038: 6700 055e beqw 53598 5303c: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 53042: 6712 beqs 53056 <== NOT EXECUTED (vol->bps != 1024) && 53044: 0c80 0000 0800 cmpil #2048,%d0 <== NOT EXECUTED 5304a: 670a beqs 53056 <== NOT EXECUTED (vol->bps != 2048) && 5304c: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED 53052: 6600 05c0 bnew 53614 <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 53056: 4281 clrl %d1 <== NOT EXECUTED 53058: 7409 moveq #9,%d2 <== NOT EXECUTED 5305a: 320d movew %a5,%d1 <== NOT EXECUTED 5305c: 2241 moveal %d1,%a1 <== NOT EXECUTED 5305e: 2009 movel %a1,%d0 <== NOT EXECUTED 53060: e4a8 lsrl %d2,%d0 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 53062: e280 asrl #1,%d0 <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 53064: 7201 moveq #1,%d1 <== NOT EXECUTED 53066: 2401 movel %d1,%d2 <== NOT EXECUTED 53068: 5282 addql #1,%d2 <== NOT EXECUTED 5306a: 0800 0000 btst #0,%d0 <== NOT EXECUTED 5306e: 660e bnes 5307e <== NOT EXECUTED i >>= 1, vol->sec_mul++); 53070: e280 asrl #1,%d0 <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 53072: 1202 moveb %d2,%d1 <== NOT EXECUTED 53074: 2401 movel %d1,%d2 <== NOT EXECUTED 53076: 5282 addql #1,%d2 <== NOT EXECUTED 53078: 0800 0000 btst #0,%d0 <== NOT EXECUTED 5307c: 67f2 beqs 53070 <== NOT EXECUTED 5307e: 1541 0003 moveb %d1,%a2@(3) <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 53082: 4202 clrb %d2 53084: 1542 0002 moveb %d2,%a2@(2) 53088: 0804 0000 btst #0,%d4 5308c: 6600 057a bnew 53608 53090: 2009 movel %a1,%d0 i >>= 1, vol->sec_log2++); 53092: e280 asrl #1,%d0 close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 53094: 7201 moveq #1,%d1 53096: 2401 movel %d1,%d2 53098: 5282 addql #1,%d2 5309a: 0800 0000 btst #0,%d0 5309e: 660e bnes 530ae <== NEVER TAKEN i >>= 1, vol->sec_log2++); 530a0: e280 asrl #1,%d0 close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 530a2: 1202 moveb %d2,%d1 530a4: 2401 movel %d1,%d2 530a6: 5282 addql #1,%d2 530a8: 0800 0000 btst #0,%d0 530ac: 67f2 beqs 530a0 530ae: 1541 0002 moveb %d1,%a2@(2) i >>= 1, vol->sec_log2++); vol->bytes_per_block = vol->bps; vol->bytes_per_block_log2 = vol->sec_log2; vol->sectors_per_block = 1; 530b2: 7801 moveq #1,%d4 for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); vol->bytes_per_block = vol->bps; 530b4: 354d 000a movew %a5,%a2@(10) vol->bytes_per_block_log2 = vol->sec_log2; 530b8: 1541 000c moveb %d1,%a2@(12) vol->sectors_per_block = 1; 530bc: 1544 0009 moveb %d4,%a2@(9) vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 530c0: 1543 0004 moveb %d3,%a2@(4) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 530c4: 6700 054e beqw 53614 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 530c8: 4282 clrl %d2 530ca: 1403 moveb %d3,%d2 530cc: 4200 clrb %d0 530ce: 1540 0005 moveb %d0,%a2@(5) 530d2: 2002 movel %d2,%d0 530d4: 0803 0000 btst #0,%d3 530d8: 6600 0534 bnew 5360e i >>= 1, vol->spc_log2++); 530dc: e280 asrl #1,%d0 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 530de: 7601 moveq #1,%d3 530e0: 2803 movel %d3,%d4 530e2: 5284 addql #1,%d4 530e4: 0800 0000 btst #0,%d0 530e8: 660e bnes 530f8 <== ALWAYS TAKEN i >>= 1, vol->spc_log2++); 530ea: e280 asrl #1,%d0 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 530ec: 1604 moveb %d4,%d3 <== NOT EXECUTED 530ee: 2803 movel %d3,%d4 <== NOT EXECUTED 530f0: 5284 addql #1,%d4 <== NOT EXECUTED 530f2: 0800 0000 btst #0,%d0 <== NOT EXECUTED 530f6: 67f2 beqs 530ea <== NOT EXECUTED 530f8: 1543 0005 moveb %d3,%a2@(5) 530fc: 0283 0000 00ff andil #255,%d3 i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 53102: 2809 movel %a1,%d4 53104: 4280 clrl %d0 53106: e7ac lsll %d3,%d4 53108: 3004 movew %d4,%d0 5310a: 3544 0006 movew %d4,%a2@(6) 5310e: 0c80 0000 8000 cmpil #32768,%d0 53114: 6200 04fe bhiw 53614 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 53118: 2004 movel %d4,%d0 5311a: 4203 clrb %d3 5311c: 0280 0000 ffff andil #65535,%d0 53122: 1543 0008 moveb %d3,%a2@(8) 53126: 7601 moveq #1,%d3 53128: 0804 0000 btst #0,%d4 5312c: 661e bnes 5314c <== NEVER TAKEN 5312e: 2803 movel %d3,%d4 53130: 5284 addql #1,%d4 i >>= 1, vol->bpc_log2++); 53132: e280 asrl #1,%d0 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 53134: 0800 0000 btst #0,%d0 53138: 660e bnes 53148 <== NEVER TAKEN i >>= 1, vol->bpc_log2++); 5313a: e280 asrl #1,%d0 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 5313c: 1604 moveb %d4,%d3 5313e: 2803 movel %d3,%d4 53140: 5284 addql #1,%d4 53142: 0800 0000 btst #0,%d0 53146: 67f2 beqs 5313a 53148: 1543 0008 moveb %d3,%a2@(8) i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5314c: 4280 clrl %d0 5314e: 102e ffa7 moveb %fp@(-89),%d0 53152: 4284 clrl %d4 53154: 2040 moveal %d0,%a0 53156: 182e ffa6 moveb %fp@(-90),%d4 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 5315a: 4283 clrl %d3 5315c: 300b movew %a3,%d0 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5315e: e18c lsll #8,%d4 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 53160: 0286 0000 00ff andil #255,%d6 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 53166: 1600 moveb %d0,%d3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 53168: 2008 movel %a0,%d0 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5316a: 2646 moveal %d6,%a3 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 5316c: 2c09 movel %a1,%d6 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5316e: 8880 orl %d0,%d4 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 53170: 0287 0000 00ff andil #255,%d7 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 53176: 0281 0000 00ff andil #255,%d1 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 5317c: 2004 movel %d4,%d0 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 5317e: 2a47 moveal %d7,%a5 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 53180: eb88 lsll #5,%d0 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 53182: e18b lsll #8,%d3 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 53184: 0285 0000 00ff andil #255,%d5 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 5318a: 41f1 08ff lea %a1@(ffffffff,%d0:l),%a0 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5318e: 3544 0022 movew %d4,%a2@(34) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 53192: 2008 movel %a0,%d0 53194: 4c46 0800 remsl %d6,%d0,%d0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 53198: 2c0b movel %a3,%d6 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 5319a: 2e0d movel %a5,%d7 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5319c: e18e lsll #8,%d6 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 5319e: 8687 orl %d7,%d3 } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 531a0: 3e0c movew %a4,%d7 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 531a2: 2646 moveal %d6,%a3 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 531a4: 2c00 movel %d0,%d6 531a6: e3ae lsll %d1,%d6 } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 531a8: 1547 000d moveb %d7,%a2@(13) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 531ac: 3543 0018 movew %d3,%a2@(24) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 531b0: 2206 movel %d6,%d1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 531b2: 2c0b movel %a3,%d6 531b4: 8c85 orl %d5,%d6 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 531b6: 2540 0024 movel %d0,%a2@(36) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 531ba: 2541 0028 movel %d1,%a2@(40) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 531be: 4a46 tstw %d6 531c0: 6700 01d0 beqw 53392 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 531c4: 4284 clrl %d4 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 531c6: 4281 clrl %d1 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 531c8: 182e ffa4 moveb %fp@(-92),%d4 531cc: 4285 clrl %d5 531ce: 1a2e ffa5 moveb %fp@(-91),%d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 531d2: 3e0c movew %a4,%d7 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 531d4: 0286 0000 ffff andil #65535,%d6 else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 531da: 0283 0000 ffff andil #65535,%d3 531e0: 1207 moveb %d7,%d1 531e2: 4c06 1800 mulsl %d6,%d1 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 531e6: e18c lsll #8,%d4 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 531e8: 2546 001a movel %d6,%a2@(26) else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 531ec: d681 addl %d1,%d3 531ee: d083 addl %d3,%d0 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 531f0: 8885 orl %d5,%d4 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 531f2: 2540 0030 movel %d0,%a2@(48) vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 531f6: 2543 001e movel %d3,%a2@(30) if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 531fa: 4a44 tstw %d4 531fc: 6700 01f0 beqw 533ee vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 53200: 0284 0000 ffff andil #65535,%d4 53206: 2544 002c movel %d4,%a2@(44) else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; 5320a: 9880 subl %d0,%d4 vol->data_cls = data_secs / vol->spc; 5320c: 4c42 4004 remul %d2,%d4,%d4 53210: 2544 0034 movel %d4,%a2@(52) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 53214: 0c84 0000 0ff4 cmpil #4084,%d4 5321a: 6200 0210 bhiw 5342c else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 5321e: 76ff moveq #-1,%d3 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 53220: 2c3c 0000 0fff movel #4095,%d6 vol->eoc_val = FAT_FAT12_EOC; 53226: 307c 0ff8 moveaw #4088,%a0 } } else { vol->rdir_cl = 0; vol->mirror = 0; 5322a: 4204 clrb %d4 vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 5322c: 7e01 moveq #1,%d7 vol->mask = FAT_FAT12_MASK; 5322e: 2546 0010 movel %d6,%a2@(16) vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 53232: 1547 000e moveb %d7,%a2@(14) vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; 53236: 2548 0014 movel %a0,%a2@(20) } } else { vol->rdir_cl = 0; vol->mirror = 0; 5323a: 1544 004e moveb %d4,%a2@(78) vol->afat = 0; 5323e: 1544 0054 moveb %d4,%a2@(84) } } } else { vol->rdir_cl = 0; 53242: 42aa 0038 clrl %a2@(56) vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 53246: 2543 003e movel %d3,%a2@(62) vol->next_cl = FAT_UNDEFINED_VALUE; 5324a: 2543 0046 movel %d3,%a2@(70) * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 5324e: 2f0a movel %a2,%sp@- _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 53250: 47f9 0004 48cc lea 448cc ,%a3 * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 53256: 4eb9 0005 2804 jsr 52804 _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 5325c: 4878 000c pea c vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 53260: 4280 clrl %d0 /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 53262: 4878 0002 pea 2 vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 53266: 102a 0054 moveb %a2@(84),%d0 5326a: 41ea 001a lea %a2@(26),%a0 5326e: 4c10 0800 mulsl %a0@,%d0 53272: 4281 clrl %d1 53274: 322a 0018 movew %a2@(24),%d1 53278: d081 addl %d1,%d0 5327a: 2540 0050 movel %d0,%a2@(80) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 5327e: 4e93 jsr %a3@ if ( fs_info->vhash == NULL ) 53280: 4fef 000c lea %sp@(12),%sp _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 53284: 2040 moveal %d0,%a0 53286: 2540 0062 movel %d0,%a2@(98) if ( fs_info->vhash == NULL ) 5328a: 6700 044c beqw 536d8 } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 5328e: 4878 000c pea c RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 53292: 2240 moveal %d0,%a1 53294: 5889 addql #4,%a1 53296: 2089 movel %a1,%a0@ 53298: 43e8 0010 lea %a0@(16),%a1 5329c: 2149 000c movel %a1,%a0@(12) 532a0: 4878 0002 pea 2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 532a4: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 532a8: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 532ac: 2149 0014 movel %a1,%a0@(20) Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 532b0: 2140 0008 movel %d0,%a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 532b4: 42a8 0010 clrl %a0@(16) 532b8: 4e93 jsr %a3@ if ( fs_info->rhash == NULL ) 532ba: 508f addql #8,%sp } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 532bc: 2040 moveal %d0,%a0 532be: 2540 0066 movel %d0,%a2@(102) if ( fs_info->rhash == NULL ) 532c2: 6700 0476 beqw 5373a } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 532c6: 222a 002c movel %a2@(44),%d1 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 532ca: 4878 0001 pea 1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 532ce: 43e8 0010 lea %a0@(16),%a1 532d2: 5880 addql #4,%d0 532d4: 2149 000c movel %a1,%a0@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 532d8: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); 532dc: 2080 movel %d0,%a0@ 532de: 4878 0100 pea 100 } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 532e2: 4280 clrl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 532e4: 2149 0014 movel %a1,%a0@(20) 532e8: 102a 0003 moveb %a2@(3),%d0 532ec: e1a9 lsll %d0,%d1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 532ee: 42a8 0004 clrl %a0@(4) rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 532f2: 203c 0000 0100 movel #256,%d0 tail->previous = head; 532f8: 2148 0008 movel %a0,%a0@(8) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 532fc: e989 lsll #4,%d1 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 532fe: 42a8 0010 clrl %a0@(16) rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 53302: 2540 0072 movel %d0,%a2@(114) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 53306: 2541 0076 movel %d1,%a2@(118) fs_info->index = 0; 5330a: 42aa 006e clrl %a2@(110) fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 5330e: 4e93 jsr %a3@ if ( fs_info->uino == NULL ) 53310: 508f addql #8,%sp rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 53312: 2540 006a movel %d0,%a2@(106) if ( fs_info->uino == NULL ) 53316: 6700 0388 beqw 536a0 close(vol->fd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 5331a: 4878 0001 pea 1 5331e: 4280 clrl %d0 53320: 3012 movew %a2@,%d0 53322: 2f00 movel %d0,%sp@- 53324: 4e93 jsr %a3@ if (fs_info->sec_buf == NULL) 53326: 508f addql #8,%sp close(vol->fd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 53328: 2540 0084 movel %d0,%a2@(132) if (fs_info->sec_buf == NULL) 5332c: 6700 03ce beqw 536fc return bytes_written; } static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num) { return (sec_num & (vol->spc - 1)) == 0; 53330: 4280 clrl %d0 53332: 102a 0004 moveb %a2@(4),%d0 53336: 5380 subql #1,%d0 53338: 2200 movel %d0,%d1 5333a: c2aa 0030 andl %a2@(48),%d1 /* * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) 5333e: 6600 024c bnew 5358c && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 53342: 4281 clrl %d1 53344: 122a 000e moveb %a2@(14),%d1 53348: 7404 moveq #4,%d2 5334a: b481 cmpl %d1,%d2 5334c: 6708 beqs 53356 <== NEVER TAKEN return bytes_written; } static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num) { return (sec_num & (vol->spc - 1)) == 0; 5334e: c0aa 001e andl %a2@(30),%d0 * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 53352: 6600 0238 bnew 5358c { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); 53356: 4878 0001 pea 1 5335a: 4280 clrl %d0 5335c: 302a 0006 movew %a2@(6),%d0 53360: 2f00 movel %d0,%sp@- 53362: 2f2a 005a movel %a2@(90),%sp@- 53366: 4eb9 0005 0d1e jsr 50d1e if (sc == RTEMS_SUCCESSFUL) 5336c: 4fef 000c lea %sp@(12),%sp 53370: 4a80 tstl %d0 53372: 6600 0218 bnew 5358c { vol->bytes_per_block = vol->bpc; vol->bytes_per_block_log2 = vol->bpc_log2; 53376: 156a 0008 000c moveb %a2@(8),%a2@(12) vol->sectors_per_block = vol->spc; 5337c: 156a 0004 0009 moveb %a2@(4),%a2@(9) && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); if (sc == RTEMS_SUCCESSFUL) { vol->bytes_per_block = vol->bpc; 53382: 356a 0006 000a movew %a2@(6),%a2@(10) vol->sectors_per_block = vol->spc; } } return RC_OK; } 53388: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 5338e: 4e5e unlk %fp 53390: 4e75 rts vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 53392: 4286 clrl %d6 <== NOT EXECUTED 53394: 4281 clrl %d1 <== NOT EXECUTED 53396: 1c2e ff9f moveb %fp@(-97),%d6 <== NOT EXECUTED 5339a: 122e ff9e moveb %fp@(-98),%d1 <== NOT EXECUTED 5339e: 4284 clrl %d4 <== NOT EXECUTED 533a0: 182e ff97 moveb %fp@(-105),%d4 <== NOT EXECUTED 533a4: 7a18 moveq #24,%d5 <== NOT EXECUTED 533a6: 4841 swap %d1 <== NOT EXECUTED 533a8: 4241 clrw %d1 <== NOT EXECUTED 533aa: e18e lsll #8,%d6 <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 533ac: 3e0c movew %a4,%d7 <== NOT EXECUTED 533ae: 0283 0000 ffff andil #65535,%d3 <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 533b4: 8c81 orl %d1,%d6 <== NOT EXECUTED 533b6: 122e ffa3 moveb %fp@(-93),%d1 <== NOT EXECUTED 533ba: 8c84 orl %d4,%d6 <== NOT EXECUTED 533bc: eba9 lsll %d5,%d1 <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 533be: 4284 clrl %d4 <== NOT EXECUTED 533c0: 182e ffa4 moveb %fp@(-92),%d4 <== NOT EXECUTED 533c4: 4285 clrl %d5 <== NOT EXECUTED 533c6: 1a2e ffa5 moveb %fp@(-91),%d5 <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 533ca: 8c81 orl %d1,%d6 <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 533cc: 4281 clrl %d1 <== NOT EXECUTED 533ce: 1207 moveb %d7,%d1 <== NOT EXECUTED 533d0: 4c06 1800 mulsl %d6,%d1 <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 533d4: e18c lsll #8,%d4 <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 533d6: 2546 001a movel %d6,%a2@(26) <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 533da: d681 addl %d1,%d3 <== NOT EXECUTED 533dc: d083 addl %d3,%d0 <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 533de: 8885 orl %d5,%d4 <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 533e0: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 533e4: 2543 001e movel %d3,%a2@(30) <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 533e8: 4a44 tstw %d4 <== NOT EXECUTED 533ea: 6600 fe14 bnew 53200 <== NOT EXECUTED vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 533ee: 4284 clrl %d4 <== NOT EXECUTED 533f0: 4281 clrl %d1 <== NOT EXECUTED 533f2: 182e ff9d moveb %fp@(-99),%d4 <== NOT EXECUTED 533f6: 122e ff9c moveb %fp@(-100),%d1 <== NOT EXECUTED 533fa: 4283 clrl %d3 <== NOT EXECUTED 533fc: 162e ff96 moveb %fp@(-106),%d3 <== NOT EXECUTED 53400: 7a18 moveq #24,%d5 <== NOT EXECUTED 53402: 4841 swap %d1 <== NOT EXECUTED 53404: 4241 clrw %d1 <== NOT EXECUTED 53406: e18c lsll #8,%d4 <== NOT EXECUTED 53408: 8881 orl %d1,%d4 <== NOT EXECUTED 5340a: 122e ff9b moveb %fp@(-101),%d1 <== NOT EXECUTED 5340e: 8883 orl %d3,%d4 <== NOT EXECUTED 53410: eba9 lsll %d5,%d1 <== NOT EXECUTED 53412: 8881 orl %d1,%d4 <== NOT EXECUTED 53414: 2544 002c movel %d4,%a2@(44) <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 53418: 9880 subl %d0,%d4 <== NOT EXECUTED vol->data_cls = data_secs / vol->spc; 5341a: 4c42 4004 remul %d2,%d4,%d4 <== NOT EXECUTED 5341e: 2544 0034 movel %d4,%a2@(52) <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 53422: 0c84 0000 0ff4 cmpil #4084,%d4 <== NOT EXECUTED 53428: 6300 fdf4 blsw 5321e <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 5342c: 0c84 0000 fff4 cmpil #65524,%d4 <== NOT EXECUTED 53432: 6300 0170 blsw 535a4 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 53436: 4280 clrl %d0 <== NOT EXECUTED 53438: 4281 clrl %d1 <== NOT EXECUTED 5343a: 102e ff8e moveb %fp@(-114),%d0 <== NOT EXECUTED 5343e: 122e ff8d moveb %fp@(-115),%d1 <== NOT EXECUTED 53442: 4283 clrl %d3 <== NOT EXECUTED 53444: 162e ff8f moveb %fp@(-113),%d3 <== NOT EXECUTED 53448: 7818 moveq #24,%d4 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 5344a: 7a80 moveq #-128,%d5 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 5344c: 2e3c 0fff ffff movel #268435455,%d7 <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 53452: 207c 0fff fff8 moveal #268435448,%a0 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 53458: 4841 swap %d1 <== NOT EXECUTED 5345a: 4241 clrw %d1 <== NOT EXECUTED 5345c: e188 lsll #8,%d0 <== NOT EXECUTED 5345e: 142e ff8b moveb %fp@(-117),%d2 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 53462: 7c04 moveq #4,%d6 <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 53464: 2547 0010 movel %d7,%a2@(16) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 53468: 8081 orl %d1,%d0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 5346a: 122e ff95 moveb %fp@(-107),%d1 <== NOT EXECUTED } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; vol->eoc_val = FAT_FAT32_EOC; 5346e: 2548 0014 movel %a0,%a2@(20) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 53472: e9aa lsll %d4,%d2 <== NOT EXECUTED 53474: 8083 orl %d3,%d0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 53476: c285 andl %d5,%d1 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 53478: 8082 orl %d2,%d0 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 5347a: 1546 000e moveb %d6,%a2@(14) <== NOT EXECUTED if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 5347e: 1541 004e moveb %d1,%a2@(78) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 53482: 2540 0038 movel %d0,%a2@(56) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) 53486: 4a01 tstb %d1 <== NOT EXECUTED 53488: 6700 0174 beqw 535fe <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 5348c: 720f moveq #15,%d1 <== NOT EXECUTED 5348e: 102e ff95 moveb %fp@(-107),%d0 <== NOT EXECUTED 53492: c081 andl %d1,%d0 <== NOT EXECUTED 53494: 1540 0054 moveb %d0,%a2@(84) <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 53498: 4280 clrl %d0 <== NOT EXECUTED 5349a: 102e ff90 moveb %fp@(-112),%d0 <== NOT EXECUTED 5349e: 4281 clrl %d1 <== NOT EXECUTED 534a0: 122e ff91 moveb %fp@(-111),%d1 <== NOT EXECUTED 534a4: e188 lsll #8,%d0 <== NOT EXECUTED 534a6: 8081 orl %d1,%d0 <== NOT EXECUTED 534a8: 3540 003c movew %d0,%a2@(60) <== NOT EXECUTED if( vol->info_sec == 0 ) 534ac: 6700 0166 beqw 53614 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); 534b0: 260e movel %fp,%d3 <== NOT EXECUTED 534b2: 0683 ffff ffae addil #-82,%d3 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, 534b8: 47f9 0005 2a90 lea 52a90 <_fat_block_read>,%a3 <== NOT EXECUTED 534be: 2f03 movel %d3,%sp@- <== NOT EXECUTED 534c0: 4878 0004 pea 4 <== NOT EXECUTED 534c4: 42a7 clrl %sp@- <== NOT EXECUTED 534c6: 3f00 movew %d0,%sp@- <== NOT EXECUTED 534c8: 4267 clrw %sp@- <== NOT EXECUTED 534ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED 534cc: 4e93 jsr %a3@ <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 534ce: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 534d2: 4a80 tstl %d0 <== NOT EXECUTED 534d4: 6d00 0292 bltw 53768 <== NOT EXECUTED { close(vol->fd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 534d8: 4281 clrl %d1 <== NOT EXECUTED 534da: 4282 clrl %d2 <== NOT EXECUTED 534dc: 122e ffaf moveb %fp@(-81),%d1 <== NOT EXECUTED 534e0: 142e ffb0 moveb %fp@(-80),%d2 <== NOT EXECUTED 534e4: 4280 clrl %d0 <== NOT EXECUTED 534e6: 102e ffae moveb %fp@(-82),%d0 <== NOT EXECUTED 534ea: 7818 moveq #24,%d4 <== NOT EXECUTED 534ec: 4842 swap %d2 <== NOT EXECUTED 534ee: 4242 clrw %d2 <== NOT EXECUTED 534f0: e189 lsll #8,%d1 <== NOT EXECUTED 534f2: 8282 orl %d2,%d1 <== NOT EXECUTED 534f4: 4282 clrl %d2 <== NOT EXECUTED 534f6: 142e ffb1 moveb %fp@(-79),%d2 <== NOT EXECUTED 534fa: 8280 orl %d0,%d1 <== NOT EXECUTED 534fc: e9aa lsll %d4,%d2 <== NOT EXECUTED 534fe: 8282 orl %d2,%d1 <== NOT EXECUTED 53500: 0c81 4161 5252 cmpil #1096897106,%d1 <== NOT EXECUTED 53506: 6600 0154 bnew 5365c <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, 5350a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5350c: 4878 000c pea c <== NOT EXECUTED 53510: 4280 clrl %d0 <== NOT EXECUTED 53512: 4878 01e4 pea 1e4 <== NOT EXECUTED 53516: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED 5351a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5351c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5351e: 4e93 jsr %a3@ <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 53520: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 53524: 4a80 tstl %d0 <== NOT EXECUTED 53526: 6d00 0258 bltw 53780 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5352a: 4281 clrl %d1 <== NOT EXECUTED 5352c: 4283 clrl %d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5352e: 4280 clrl %d0 <== NOT EXECUTED 53530: 4282 clrl %d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53532: 122e ffb3 moveb %fp@(-77),%d1 <== NOT EXECUTED 53536: 162e ffb4 moveb %fp@(-76),%d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5353a: 102e ffb7 moveb %fp@(-73),%d0 <== NOT EXECUTED 5353e: 142e ffb8 moveb %fp@(-72),%d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53542: 4285 clrl %d5 <== NOT EXECUTED 53544: 1a2e ffb2 moveb %fp@(-78),%d5 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53548: 4284 clrl %d4 <== NOT EXECUTED 5354a: 182e ffb6 moveb %fp@(-74),%d4 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5354e: 4843 swap %d3 <== NOT EXECUTED 53550: 4243 clrw %d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53552: 4842 swap %d2 <== NOT EXECUTED 53554: 4242 clrw %d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53556: e189 lsll #8,%d1 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53558: e188 lsll #8,%d0 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5355a: 8283 orl %d3,%d1 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5355c: 8082 orl %d2,%d0 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5355e: 4283 clrl %d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53560: 4282 clrl %d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53562: 162e ffb5 moveb %fp@(-75),%d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53566: 142e ffb9 moveb %fp@(-71),%d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5356a: 8285 orl %d5,%d1 <== NOT EXECUTED 5356c: 7a18 moveq #24,%d5 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5356e: 8084 orl %d4,%d0 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53570: ebab lsll %d5,%d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53572: ebaa lsll %d5,%d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53574: 8283 orl %d3,%d1 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53576: 8082 orl %d2,%d0 <== NOT EXECUTED _fat_block_release(fs_info); close(vol->fd); return -1; } vol->free_cls_in_fs_info = 53578: 2541 0042 movel %d1,%a2@(66) <== NOT EXECUTED FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->free_cls = vol->free_cls_in_fs_info; 5357c: 2541 003e movel %d1,%a2@(62) <== NOT EXECUTED vol->next_cl_in_fs_info = 53580: 2540 004a movel %d0,%a2@(74) <== NOT EXECUTED FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); vol->next_cl = vol->next_cl_in_fs_info; 53584: 2540 0046 movel %d0,%a2@(70) <== NOT EXECUTED 53588: 6000 fcc4 braw 5324e <== NOT EXECUTED vol->bytes_per_block_log2 = vol->bpc_log2; vol->sectors_per_block = vol->spc; } } return RC_OK; 5358c: 4280 clrl %d0 <== NOT EXECUTED } 5358e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53594: 4e5e unlk %fp <== NOT EXECUTED 53596: 4e75 rts <== NOT EXECUTED 53598: 2240 moveal %d0,%a1 (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 5359a: 4200 clrb %d0 5359c: 1540 0003 moveb %d0,%a2@(3) 535a0: 6000 fae0 braw 53082 else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 535a4: 76ff moveq #-1,%d3 <== NOT EXECUTED else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 535a6: 227c 0000 ffff moveal #65535,%a1 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 535ac: 223c 0000 fff8 movel #65528,%d1 <== NOT EXECUTED } } else { vol->rdir_cl = 0; vol->mirror = 0; 535b2: 4204 clrb %d4 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 535b4: 7002 moveq #2,%d0 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 535b6: 2549 0010 movel %a1,%a2@(16) <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 535ba: 1540 000e moveb %d0,%a2@(14) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 535be: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 535c2: 42aa 0038 clrl %a2@(56) <== NOT EXECUTED vol->mirror = 0; 535c6: 1544 004e moveb %d4,%a2@(78) <== NOT EXECUTED vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 535ca: 2543 003e movel %d3,%a2@(62) <== NOT EXECUTED } else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; 535ce: 1544 0054 moveb %d4,%a2@(84) <== NOT EXECUTED vol->free_cls = FAT_UNDEFINED_VALUE; vol->next_cl = FAT_UNDEFINED_VALUE; 535d2: 2543 0046 movel %d3,%a2@(70) <== NOT EXECUTED 535d6: 6000 fc76 braw 5324e <== NOT EXECUTED } /* check that device is registred as block device and lock it */ rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd); if (rc != 0) { close(vol->fd); 535da: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 535de: 7806 moveq #6,%d4 <== NOT EXECUTED } /* check that device is registred as block device and lock it */ rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd); if (rc != 0) { close(vol->fd); 535e0: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 535e6: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 535ec: 588f addql #4,%sp <== NOT EXECUTED 535ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 535f0: 70ff moveq #-1,%d0 <== NOT EXECUTED 535f2: 2084 movel %d4,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 535f4: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 535fa: 4e5e unlk %fp <== NOT EXECUTED 535fc: 4e75 rts <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; 535fe: 4202 clrb %d2 <== NOT EXECUTED 53600: 1542 0054 moveb %d2,%a2@(84) <== NOT EXECUTED 53604: 6000 fe92 braw 53498 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 53608: 4201 clrb %d1 <== NOT EXECUTED 5360a: 6000 faa6 braw 530b2 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 5360e: 4283 clrl %d3 53610: 6000 faf0 braw 53102 vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { close(vol->fd); 53614: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 53618: 7416 moveq #22,%d2 <== NOT EXECUTED vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { close(vol->fd); 5361a: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 53620: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 53626: 588f addql #4,%sp <== NOT EXECUTED 53628: 2040 moveal %d0,%a0 <== NOT EXECUTED 5362a: 70ff moveq #-1,%d0 <== NOT EXECUTED 5362c: 2082 movel %d2,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 5362e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53634: 4e5e unlk %fp <== NOT EXECUTED 53636: 4e75 rts <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { close(vol->fd); 53638: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 5363c: 7605 moveq #5,%d3 <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { close(vol->fd); 5363e: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 53644: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 5364a: 588f addql #4,%sp <== NOT EXECUTED 5364c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5364e: 70ff moveq #-1,%d0 <== NOT EXECUTED 53650: 2083 movel %d3,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53652: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53658: 4e5e unlk %fp <== NOT EXECUTED 5365a: 4e75 rts <== NOT EXECUTED * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 5365c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5365e: 4eb9 0005 2804 jsr 52804 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); close(vol->fd); 53664: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED 53668: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 5366e: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 53674: 508f addql #8,%sp <== NOT EXECUTED 53676: 7216 moveq #22,%d1 <== NOT EXECUTED 53678: 2040 moveal %d0,%a0 <== NOT EXECUTED 5367a: 70ff moveq #-1,%d0 <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 5367c: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); 53682: 2081 movel %d1,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53684: 4e5e unlk %fp <== NOT EXECUTED 53686: 4e75 rts <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); if (vol->fd < 0) { rtems_set_errno_and_return_minus_one(ENXIO); 53688: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 5368e: 7a06 moveq #6,%d5 <== NOT EXECUTED 53690: 2040 moveal %d0,%a0 <== NOT EXECUTED 53692: 70ff moveq #-1,%d0 <== NOT EXECUTED 53694: 2085 movel %d5,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53696: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5369c: 4e5e unlk %fp <== NOT EXECUTED 5369e: 4e75 rts <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { close(vol->fd); 536a0: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED free(fs_info->vhash); 536a4: 47f9 0004 4bec lea 44bec ,%a3 <== NOT EXECUTED free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 536aa: 7a0c moveq #12,%d5 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { close(vol->fd); 536ac: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED free(fs_info->vhash); 536b2: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 536b6: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 536b8: 2f2a 0066 movel %a2@(102),%sp@- <== NOT EXECUTED 536bc: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 536be: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 536c4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 536c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 536ca: 70ff moveq #-1,%d0 <== NOT EXECUTED 536cc: 2085 movel %d5,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 536ce: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 536d4: 4e5e unlk %fp <== NOT EXECUTED 536d6: 4e75 rts <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { close(vol->fd); 536d8: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 536dc: 7e0c moveq #12,%d7 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { close(vol->fd); 536de: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 536e4: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 536ea: 588f addql #4,%sp <== NOT EXECUTED 536ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 536ee: 70ff moveq #-1,%d0 <== NOT EXECUTED 536f0: 2087 movel %d7,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 536f2: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 536f8: 4e5e unlk %fp <== NOT EXECUTED 536fa: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { close(vol->fd); 536fc: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED free(fs_info->vhash); 53700: 47f9 0004 4bec lea 44bec ,%a3 <== NOT EXECUTED free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 53706: 780c moveq #12,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { close(vol->fd); 53708: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED free(fs_info->vhash); 5370e: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 53712: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 53714: 2f2a 0066 movel %a2@(102),%sp@- <== NOT EXECUTED 53718: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->uino); 5371a: 2f2a 006a movel %a2@(106),%sp@- <== NOT EXECUTED 5371e: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 53720: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 53726: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5372a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5372c: 70ff moveq #-1,%d0 <== NOT EXECUTED 5372e: 2084 movel %d4,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53730: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53736: 4e5e unlk %fp <== NOT EXECUTED 53738: 4e75 rts <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { close(vol->fd); 5373a: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 5373e: 7c0c moveq #12,%d6 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { close(vol->fd); 53740: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED free(fs_info->vhash); 53746: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 5374a: 4eb9 0004 4bec jsr 44bec <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 53750: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 53756: 508f addql #8,%sp <== NOT EXECUTED 53758: 2040 moveal %d0,%a0 <== NOT EXECUTED 5375a: 70ff moveq #-1,%d0 <== NOT EXECUTED 5375c: 2086 movel %d6,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 5375e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53764: 4e5e unlk %fp <== NOT EXECUTED 53766: 4e75 rts <== NOT EXECUTED { ret = _fat_block_read(fs_info, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { close(vol->fd); 53768: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED 5376c: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED 53772: 588f addql #4,%sp <== NOT EXECUTED return -1; 53774: 70ff moveq #-1,%d0 <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53776: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5377c: 4e5e unlk %fp <== NOT EXECUTED 5377e: 4e75 rts <== NOT EXECUTED * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 53780: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53782: 4eb9 0005 2804 jsr 52804 <== NOT EXECUTED ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(fs_info); close(vol->fd); 53788: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED 5378c: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED 53792: 508f addql #8,%sp <== NOT EXECUTED return -1; 53794: 70ff moveq #-1,%d0 <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53796: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5379c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059970 : uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { 59970: 4e56 ffd0 linkw %fp,#-48 59974: 122e 001f moveb %fp@(31),%d1 59978: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5997c: 246e 0008 moveal %fp@(8),%a2 59980: 266e 0014 moveal %fp@(20),%a3 int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 59984: 282a 0034 movel %a2@(52),%d4 uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { 59988: 1d41 fffb moveb %d1,%fp@(-5) int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; 5998c: 42ae fffc clrl %fp@(-4) uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; ssize_t bytes_written; *cls_added = 0; 59990: 4293 clrl %a3@ if (count == 0) 59992: 4aae 0010 tstl %fp@(16) 59996: 6700 0146 beqw 59ade return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 5999a: 2e2a 0046 movel %a2@(70),%d7 5999e: 70ff moveq #-1,%d0 599a0: b087 cmpl %d7,%d0 599a2: 6700 0148 beqw 59aec { int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 599a6: 5484 addql #2,%d4 /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 599a8: 7202 moveq #2,%d1 599aa: b284 cmpl %d4,%d1 599ac: 6400 01c2 bccw 59b70 599b0: 2a0e movel %fp,%d5 599b2: 7402 moveq #2,%d2 599b4: 4286 clrl %d6 599b6: 5985 subql #4,%d5 599b8: 49f9 0005 9450 lea 59450 ,%a4 { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 599be: 2f05 movel %d5,%sp@- 599c0: 2f07 movel %d7,%sp@- 599c2: 2f0a movel %a2,%sp@- 599c4: 4e94 jsr %a4@ if ( rc != RC_OK ) 599c6: 4fef 000c lea %sp@(12),%sp * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 599ca: 2600 movel %d0,%d3 if ( rc != RC_OK ) 599cc: 6600 0124 bnew 59af2 if (*cls_added != 0) fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 599d0: 4aae fffc tstl %fp@(-4) 599d4: 663c bnes 59a12 /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) 599d6: 4a93 tstl %a3@ 599d8: 6600 00ce bnew 59aa8 { *chain = cl4find; rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 599dc: 4878 ffff pea ffffffff 599e0: 4bf9 0005 9622 lea 59622 ,%a5 * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 599e6: 206e 000c moveal %fp@(12),%a0 rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 599ea: 2f07 movel %d7,%sp@- * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 599ec: 2087 movel %d7,%a0@ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 599ee: 2f0a movel %a2,%sp@- 599f0: 4e95 jsr %a5@ if ( rc != RC_OK ) 599f2: 4fef 000c lea %sp@(12),%sp 599f6: 4a80 tstl %d0 599f8: 6600 014a bnew 59b44 rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); if ( rc != RC_OK ) goto cleanup; } if (zero_fill) 599fc: 4a2e fffb tstb %fp@(-5) 59a00: 6650 bnes 59a52 <== NEVER TAKEN goto cleanup; } } save_cln = cl4find; (*cls_added)++; 59a02: 2013 movel %a3@,%d0 59a04: 5280 addql #1,%d0 59a06: 2680 movel %d0,%a3@ /* have we satisfied request ? */ if (*cls_added == count) 59a08: b0ae 0010 cmpl %fp@(16),%d0 59a0c: 6700 0106 beqw 59b14 59a10: 2c07 movel %d7,%d6 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 59a12: 5282 addql #1,%d2 cl4find++; 59a14: 5287 addql #1,%d7 if (cl4find >= data_cls_val) 59a16: be84 cmpl %d4,%d7 59a18: 6502 bcss 59a1c <== ALWAYS TAKEN cl4find = 2; 59a1a: 7e02 moveq #2,%d7 <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 59a1c: b484 cmpl %d4,%d2 59a1e: 669e bnes 599be <== ALWAYS TAKEN if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 59a20: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED 59a24: 72ff moveq #-1,%d1 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 59a26: 2546 0046 movel %d6,%a2@(70) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 59a2a: b280 cmpl %d0,%d1 <== NOT EXECUTED 59a2c: 6706 beqs 59a34 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 59a2e: 9093 subl %a3@,%d0 <== NOT EXECUTED 59a30: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED *last_cl = save_cln; 59a34: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED fat_buf_release(fs_info); return RC_OK; 59a38: 4283 clrl %d3 <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; 59a3a: 2086 movel %d6,%a0@ <== NOT EXECUTED fat_buf_release(fs_info); 59a3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59a3e: 4eb9 0005 2804 jsr 52804 <== NOT EXECUTED 59a44: 588f addql #4,%sp <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 59a46: 2003 movel %d3,%d0 <== NOT EXECUTED 59a48: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59a4e: 4e5e unlk %fp <== NOT EXECUTED 59a50: 4e75 rts <== NOT EXECUTED goto cleanup; } if (zero_fill) { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); 59a52: 4280 clrl %d0 <== NOT EXECUTED if (fs_info->vol.bpc != bytes_written) 59a54: 4286 clrl %d6 <== NOT EXECUTED goto cleanup; } if (zero_fill) { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); 59a56: 42a7 clrl %sp@- <== NOT EXECUTED 59a58: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED 59a5c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59a5e: 42a7 clrl %sp@- <== NOT EXECUTED 59a60: 2f07 movel %d7,%sp@- <== NOT EXECUTED 59a62: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59a64: 4eb9 0005 2be6 jsr 52be6 <== NOT EXECUTED if (fs_info->vol.bpc != bytes_written) 59a6a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 59a6e: 3c2a 0006 movew %a2@(6),%d6 <== NOT EXECUTED 59a72: b086 cmpl %d6,%d0 <== NOT EXECUTED 59a74: 678c beqs 59a02 <== NOT EXECUTED { rc = -1; 59a76: 70ff moveq #-1,%d0 <== NOT EXECUTED return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 59a78: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; 59a7c: 2600 movel %d0,%d3 <== NOT EXECUTED return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 59a7e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 59a80: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59a82: 4eb9 0005 989e jsr 5989e <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); 59a88: 42a7 clrl %sp@- <== NOT EXECUTED 59a8a: 2f07 movel %d7,%sp@- <== NOT EXECUTED 59a8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59a8e: 4e95 jsr %a5@ <== NOT EXECUTED fat_buf_release(fs_info); 59a90: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59a92: 4eb9 0005 2804 jsr 52804 <== NOT EXECUTED 59a98: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED return rc; } 59a9c: 2003 movel %d3,%d0 <== NOT EXECUTED 59a9e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59aa4: 4e5e unlk %fp <== NOT EXECUTED 59aa6: 4e75 rts <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 59aa8: 4878 ffff pea ffffffff <== NOT EXECUTED 59aac: 4bf9 0005 9622 lea 59622 ,%a5 <== NOT EXECUTED 59ab2: 2f07 movel %d7,%sp@- <== NOT EXECUTED 59ab4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59ab6: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 59ab8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 59abc: 4a80 tstl %d0 <== NOT EXECUTED 59abe: 6600 0092 bnew 59b52 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); 59ac2: 2f07 movel %d7,%sp@- <== NOT EXECUTED 59ac4: 2f06 movel %d6,%sp@- <== NOT EXECUTED 59ac6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59ac8: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 59aca: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 59ace: 4a80 tstl %d0 <== NOT EXECUTED 59ad0: 66a6 bnes 59a78 <== NOT EXECUTED goto cleanup; } if (zero_fill) 59ad2: 4a2e fffb tstb %fp@(-5) <== NOT EXECUTED 59ad6: 6700 ff2a beqw 59a02 <== NOT EXECUTED 59ada: 6000 ff76 braw 59a52 <== NOT EXECUTED ssize_t bytes_written; *cls_added = 0; if (count == 0) return rc; 59ade: 4283 clrl %d3 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 59ae0: 2003 movel %d3,%d0 <== NOT EXECUTED 59ae2: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59ae8: 4e5e unlk %fp <== NOT EXECUTED 59aea: 4e75 rts <== NOT EXECUTED uint32_t *last_cl, bool zero_fill ) { int rc = RC_OK; uint32_t cl4find = 2; 59aec: 7e02 moveq #2,%d7 59aee: 6000 feb6 braw 599a6 while (i < data_cls_val) { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 59af2: 4a93 tstl %a3@ <== NOT EXECUTED 59af4: 6700 ff50 beqw 59a46 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 59af8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 59afc: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 59afe: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59b00: 4eb9 0005 989e jsr 5989e <== NOT EXECUTED 59b06: 508f addql #8,%sp <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 59b08: 2003 movel %d3,%d0 <== NOT EXECUTED 59b0a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59b10: 4e5e unlk %fp <== NOT EXECUTED 59b12: 4e75 rts <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 59b14: 202a 003e movel %a2@(62),%d0 59b18: 72ff moveq #-1,%d1 (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 59b1a: 2547 0046 movel %d7,%a2@(70) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 59b1e: b280 cmpl %d0,%d1 59b20: 6706 beqs 59b28 <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); 59b22: 9093 subl %a3@,%d0 <== NOT EXECUTED 59b24: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED *last_cl = save_cln; 59b28: 206e 0018 moveal %fp@(24),%a0 59b2c: 2087 movel %d7,%a0@ fat_buf_release(fs_info); 59b2e: 2f0a movel %a2,%sp@- 59b30: 4eb9 0005 2804 jsr 52804 59b36: 588f addql #4,%sp fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 59b38: 2003 movel %d3,%d0 59b3a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 59b40: 4e5e unlk %fp 59b42: 4e75 rts * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 59b44: 2600 movel %d0,%d3 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 59b46: 2003 movel %d3,%d0 <== NOT EXECUTED 59b48: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59b4e: 4e5e unlk %fp <== NOT EXECUTED 59b50: 4e75 rts <== NOT EXECUTED /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 59b52: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 59b56: 2600 movel %d0,%d3 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 59b58: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 59b5a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59b5c: 4eb9 0005 989e jsr 5989e <== NOT EXECUTED 59b62: 508f addql #8,%sp <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 59b64: 2003 movel %d3,%d0 <== NOT EXECUTED 59b66: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59b6c: 4e5e unlk %fp <== NOT EXECUTED 59b6e: 4e75 rts <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 59b70: 4286 clrl %d6 <== NOT EXECUTED 59b72: 6000 feac braw 59a20 <== NOT EXECUTED ... =============================================================================== 00052b26 : fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 52b26: 4e56 ffd4 linkw %fp,#-44 52b2a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52b2e: 246e 0008 moveal %fp@(8),%a2 52b32: 262e 0014 movel %fp@(20),%d3 52b36: 286e 0018 moveal %fp@(24),%a4 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 52b3a: 6700 009c beqw 52bd8 52b3e: 2e0e movel %fp,%d7 52b40: 4284 clrl %d4 52b42: 5987 subql #4,%d7 52b44: 47f9 0005 29d4 lea 529d4 ,%a3 else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 52b4a: 4bf9 0005 c068 lea 5c068 ,%a5 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 52b50: 2c2e 0010 movel %fp@(16),%d6 52b54: 2a2e 000c movel %fp@(12),%d5 { c = MIN(count, (fs_info->vol.bps - ofs)); 52b58: 4282 clrl %d2 52b5a: 3412 movew %a2@,%d2 52b5c: 9486 subl %d6,%d2 52b5e: b682 cmpl %d2,%d3 52b60: 6402 bccs 52b64 <== NEVER TAKEN 52b62: 2403 movel %d3,%d2 if (c == fs_info->vol.bytes_per_block) 52b64: 4280 clrl %d0 52b66: 302a 000a movew %a2@(10),%d0 52b6a: b480 cmpl %d0,%d2 52b6c: 6744 beqs 52bb2 <== NEVER TAKEN rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 52b6e: 2f07 movel %d7,%sp@- 52b70: 4878 0001 pea 1 memcpy((sec_buf + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 52b74: 9682 subl %d2,%d3 c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 52b76: 2f05 movel %d5,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; 52b78: 5285 addql #1,%d5 c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 52b7a: 2f0a movel %a2,%sp@- 52b7c: 4e93 jsr %a3@ 52b7e: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) 52b82: 4a80 tstl %d0 52b84: 6644 bnes 52bca <== NEVER TAKEN return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 52b86: 2f02 movel %d2,%sp@- 52b88: 4874 4800 pea %a4@(00000000,%d4:l) 52b8c: dcae fffc addl %fp@(-4),%d6 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 52b90: d882 addl %d2,%d4 else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 52b92: 2f06 movel %d6,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; ofs = 0; 52b94: 4286 clrl %d6 else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 52b96: 4e95 jsr %a5@ uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 52b98: 4fef 000c lea %sp@(12),%sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 52b9c: 7001 moveq #1,%d0 52b9e: 1540 007e moveb %d0,%a2@(126) 52ba2: 4a83 tstl %d3 52ba4: 66b2 bnes 52b58 <== NEVER TAKEN cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } 52ba6: 2004 movel %d4,%d0 52ba8: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 52bae: 4e5e unlk %fp 52bb0: 4e75 rts while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 52bb2: 2f07 movel %d7,%sp@- <== NOT EXECUTED 52bb4: 4878 0002 pea 2 <== NOT EXECUTED memcpy((sec_buf + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 52bb8: 9682 subl %d2,%d3 <== NOT EXECUTED while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 52bba: 2f05 movel %d5,%sp@- <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; 52bbc: 5285 addql #1,%d5 <== NOT EXECUTED while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 52bbe: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52bc0: 4e93 jsr %a3@ <== NOT EXECUTED 52bc2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) 52bc6: 4a80 tstl %d0 <== NOT EXECUTED 52bc8: 67bc beqs 52b86 <== NOT EXECUTED return -1; 52bca: 78ff moveq #-1,%d4 <== NOT EXECUTED cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } 52bcc: 2004 movel %d4,%d0 <== NOT EXECUTED 52bce: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52bd4: 4e5e unlk %fp <== NOT EXECUTED 52bd6: 4e75 rts <== NOT EXECUTED uint32_t offset, uint32_t count, const void *buff) { int rc = RC_OK; ssize_t cmpltd = 0; 52bd8: 4284 clrl %d4 <== NOT EXECUTED cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } 52bda: 2004 movel %d4,%d0 <== NOT EXECUTED 52bdc: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52be2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059622 : uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; uint8_t *sec_buf = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 59622: 7001 moveq #1,%d0 fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { 59624: 4e56 ffe4 linkw %fp,#-28 59628: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 5962c: 246e 0008 moveal %fp@(8),%a2 59630: 242e 000c movel %fp@(12),%d2 int rc = RC_OK; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; uint8_t *sec_buf = NULL; 59634: 42ae fffc clrl %fp@(-4) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 59638: b082 cmpl %d2,%d0 5963a: 6476 bccs 596b2 <== NEVER TAKEN 5963c: 202a 0034 movel %a2@(52),%d0 59640: 5280 addql #1,%d0 59642: b082 cmpl %d2,%d0 59644: 656c bcss 596b2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 59646: 102a 000e moveb %a2@(14),%d0 5964a: 0800 0000 btst #0,%d0 5964e: 667a bnes 596ca <== ALWAYS TAKEN 59650: 7202 moveq #2,%d1 <== NOT EXECUTED 59652: 2802 movel %d2,%d4 <== NOT EXECUTED 59654: c081 andl %d1,%d0 <== NOT EXECUTED 59656: 4a00 tstb %d0 <== NOT EXECUTED 59658: 6778 beqs 596d2 <== NOT EXECUTED 5965a: d884 addl %d4,%d4 <== NOT EXECUTED 5965c: 4280 clrl %d0 5965e: 102a 0002 moveb %a2@(2),%d0 59662: 2604 movel %d4,%d3 59664: e0ab lsrl %d0,%d3 59666: d6aa 0050 addl %a2@(80),%d3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 5966a: 47f9 0005 29d4 lea 529d4 ,%a3 59670: 486e fffc pea %fp@(-4) 59674: 4878 0001 pea 1 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 59678: 3a12 movew %a2@,%d5 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 5967a: 2f03 movel %d3,%sp@- 5967c: 2f0a movel %a2,%sp@- 5967e: 4e93 jsr %a3@ if (rc != RC_OK) 59680: 4fef 0010 lea %sp@(16),%sp 59684: 4a80 tstl %d0 59686: 6638 bnes 596c0 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) 59688: 4281 clrl %d1 5968a: 122a 000e moveb %a2@(14),%d1 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 5968e: 0285 0000 ffff andil #65535,%d5 59694: 5385 subql #1,%d5 59696: c885 andl %d5,%d4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 59698: 7a02 moveq #2,%d5 5969a: ba81 cmpl %d1,%d5 5969c: 6700 00ec beqw 5978a 596a0: 1a3c 0004 moveb #4,%d5 596a4: ba81 cmpl %d1,%d5 596a6: 6700 0092 beqw 5973a 596aa: 1a3c 0001 moveb #1,%d5 596ae: ba81 cmpl %d1,%d5 596b0: 6724 beqs 596d6 <== ALWAYS TAKEN fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 596b2: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 596b8: 7405 moveq #5,%d2 <== NOT EXECUTED 596ba: 2040 moveal %d0,%a0 <== NOT EXECUTED 596bc: 70ff moveq #-1,%d0 <== NOT EXECUTED 596be: 2082 movel %d2,%a0@ <== NOT EXECUTED break; } return RC_OK; } 596c0: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 596c6: 4e5e unlk %fp <== NOT EXECUTED 596c8: 4e75 rts <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 596ca: 2802 movel %d2,%d4 596cc: e28c lsrl #1,%d4 596ce: d882 addl %d2,%d4 596d0: 608a bras 5965c 596d2: e58c lsll #2,%d4 <== NOT EXECUTED 596d4: 6086 bras 5965c <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *(sec_buf + ofs) &= 0x0F; 596d6: 206e fffc moveal %fp@(-4),%a0 return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 596da: 0802 0000 btst #0,%d2 596de: 6700 00d4 beqw 597b4 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *(sec_buf + ofs) &= 0x0F; 596e2: d1c4 addal %d4,%a0 596e4: 1a3c 000f moveb #15,%d5 596e8: 1210 moveb %a0@,%d1 switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 596ea: 242e 0010 movel %fp@(16),%d2 *(sec_buf + ofs) &= 0x0F; 596ee: c285 andl %d5,%d1 switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 596f0: e98a lsll #4,%d2 *(sec_buf + ofs) &= 0x0F; 596f2: 1081 moveb %d1,%a0@ *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0); 596f4: 206e fffc moveal %fp@(-4),%a0 596f8: d1c4 addal %d4,%a0 596fa: 1210 moveb %a0@,%d1 596fc: 8282 orl %d2,%d1 596fe: 1081 moveb %d1,%a0@ } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 59700: 7201 moveq #1,%d1 59702: 1541 007e moveb %d1,%a2@(126) fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 59706: 4281 clrl %d1 59708: 3212 movew %a2@,%d1 5970a: 5381 subql #1,%d1 5970c: b881 cmpl %d1,%d4 5970e: 6700 0100 beqw 59810 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 59712: 206e fffc moveal %fp@(-4),%a0 59716: 5284 addql #1,%d4 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 59718: 4281 clrl %d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 5971a: 4203 clrb %d3 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 5971c: 3202 movew %d2,%d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 5971e: 1183 4800 moveb %d3,%a0@(00000000,%d4:l) *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 59722: e089 lsrl #8,%d1 59724: 206e fffc moveal %fp@(-4),%a0 59728: d1c4 addal %d4,%a0 5972a: 1a10 moveb %a0@,%d5 5972c: 8285 orl %d5,%d1 5972e: 1081 moveb %d1,%a0@ break; } return RC_OK; } 59730: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 59736: 4e5e unlk %fp 59738: 4e75 rts (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 5973a: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED 5973e: 7418 moveq #24,%d2 <== NOT EXECUTED 59740: 0283 0fff ffff andil #268435455,%d3 <== NOT EXECUTED 59746: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5974a: 2a03 movel %d3,%d5 <== NOT EXECUTED 5974c: e4ad lsrl %d2,%d5 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5974e: e5a9 lsll %d2,%d1 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 59750: 2403 movel %d3,%d2 <== NOT EXECUTED 59752: e08a lsrl #8,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; 59754: e18b lsll #8,%d3 <== NOT EXECUTED *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); 59756: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5975a: d1c4 addal %d4,%a0 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5975c: 8285 orl %d5,%d1 <== NOT EXECUTED 5975e: 0283 00ff 0000 andil #16711680,%d3 <== NOT EXECUTED 59764: 2810 movel %a0@,%d4 <== NOT EXECUTED 59766: 0282 0000 ff00 andil #65280,%d2 <== NOT EXECUTED 5976c: 8283 orl %d3,%d1 <== NOT EXECUTED 5976e: 0284 0000 00f0 andil #240,%d4 <== NOT EXECUTED 59774: 7601 moveq #1,%d3 <== NOT EXECUTED 59776: 8282 orl %d2,%d1 <== NOT EXECUTED *((uint32_t *)(sec_buf + ofs)) |= fat32_clv; 59778: 8284 orl %d4,%d1 <== NOT EXECUTED 5977a: 2081 movel %d1,%a0@ <== NOT EXECUTED 5977c: 1543 007e moveb %d3,%a2@(126) <== NOT EXECUTED break; } return RC_OK; } 59780: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 59786: 4e5e unlk %fp <== NOT EXECUTED 59788: 4e75 rts <== NOT EXECUTED 5978a: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 5978e: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = 59794: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED static inline uint16_t m68k_swap_u16( uint16_t value ) { return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 59798: 2401 movel %d1,%d2 <== NOT EXECUTED 5979a: e089 lsrl #8,%d1 <== NOT EXECUTED 5979c: e18a lsll #8,%d2 <== NOT EXECUTED 5979e: 8282 orl %d2,%d1 <== NOT EXECUTED 597a0: 3181 4800 movew %d1,%a0@(00000000,%d4:l) <== NOT EXECUTED 597a4: 7201 moveq #1,%d1 <== NOT EXECUTED 597a6: 1541 007e moveb %d1,%a2@(126) <== NOT EXECUTED break; } return RC_OK; } 597aa: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 597b0: 4e5e unlk %fp <== NOT EXECUTED 597b2: 4e75 rts <== NOT EXECUTED *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 597b4: 242e 0010 movel %fp@(16),%d2 *(sec_buf + ofs) &= 0x00; 597b8: 4201 clrb %d1 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 597ba: 0282 0000 0fff andil #4095,%d2 *(sec_buf + ofs) &= 0x00; 597c0: 1181 4800 moveb %d1,%a0@(00000000,%d4:l) *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 597c4: 3a02 movew %d2,%d5 *(sec_buf + ofs) &= 0x00; *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); 597c6: 206e fffc moveal %fp@(-4),%a0 597ca: d1c4 addal %d4,%a0 597cc: 1210 moveb %a0@,%d1 597ce: 8481 orl %d1,%d2 597d0: 1082 moveb %d2,%a0@ 597d2: 7401 moveq #1,%d2 597d4: 1542 007e moveb %d2,%a2@(126) fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 597d8: 4282 clrl %d2 597da: 3412 movew %a2@,%d2 597dc: 2042 moveal %d2,%a0 597de: 5388 subql #1,%a0 597e0: b888 cmpl %a0,%d4 597e2: 6770 beqs 59854 <== NEVER TAKEN fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 597e4: 206e fffc moveal %fp@(-4),%a0 597e8: 5284 addql #1,%d4 597ea: d1c4 addal %d4,%a0 597ec: 76f0 moveq #-16,%d3 *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 597ee: 4281 clrl %d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 597f0: 1410 moveb %a0@,%d2 *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 597f2: 3205 movew %d5,%d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 597f4: c483 andl %d3,%d2 *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 597f6: e089 lsrl #8,%d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 597f8: 1082 moveb %d2,%a0@ *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 597fa: 206e fffc moveal %fp@(-4),%a0 597fe: d1c4 addal %d4,%a0 59800: 1a10 moveb %a0@,%d5 59802: 8285 orl %d5,%d1 59804: 1081 moveb %d1,%a0@ break; } return RC_OK; } 59806: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 5980c: 4e5e unlk %fp 5980e: 4e75 rts fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 59810: 486e fffc pea %fp@(-4) <== NOT EXECUTED 59814: 2043 moveal %d3,%a0 <== NOT EXECUTED 59816: 4878 0001 pea 1 <== NOT EXECUTED 5981a: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5981e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59820: 4e93 jsr %a3@ <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 59822: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 59826: 4a80 tstl %d0 <== NOT EXECUTED 59828: 6600 fe96 bnew 596c0 <== NOT EXECUTED return rc; *sec_buf &= 0x00; 5982c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 59830: 4210 clrb %a0@ <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 59832: 0282 0000 ffff andil #65535,%d2 <== NOT EXECUTED 59838: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5983c: e08a lsrl #8,%d2 <== NOT EXECUTED 5983e: 1210 moveb %a0@,%d1 <== NOT EXECUTED 59840: 8481 orl %d1,%d2 <== NOT EXECUTED 59842: 1082 moveb %d2,%a0@ <== NOT EXECUTED 59844: 7401 moveq #1,%d2 <== NOT EXECUTED 59846: 1542 007e moveb %d2,%a2@(126) <== NOT EXECUTED break; } return RC_OK; } 5984a: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 59850: 4e5e unlk %fp <== NOT EXECUTED 59852: 4e75 rts <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 59854: 486e fffc pea %fp@(-4) <== NOT EXECUTED 59858: 2043 moveal %d3,%a0 <== NOT EXECUTED 5985a: 4878 0001 pea 1 <== NOT EXECUTED 5985e: 4868 0001 pea %a0@(1) <== NOT EXECUTED 59862: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59864: 4e93 jsr %a3@ <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 59866: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5986a: 4a80 tstl %d0 <== NOT EXECUTED 5986c: 6600 fe52 bnew 596c0 <== NOT EXECUTED return rc; *sec_buf &= 0xF0; 59870: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 59874: 74f0 moveq #-16,%d2 <== NOT EXECUTED 59876: 1210 moveb %a0@,%d1 <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 59878: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; *sec_buf &= 0xF0; 5987e: c282 andl %d2,%d1 <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 59880: e08d lsrl #8,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; *sec_buf &= 0xF0; 59882: 1081 moveb %d1,%a0@ <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 59884: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 59888: 1610 moveb %a0@,%d3 <== NOT EXECUTED 5988a: 8a83 orl %d3,%d5 <== NOT EXECUTED 5988c: 1085 moveb %d5,%a0@ <== NOT EXECUTED 5988e: 7a01 moveq #1,%d5 <== NOT EXECUTED 59890: 1545 007e moveb %d5,%a2@(126) <== NOT EXECUTED break; } return RC_OK; } 59894: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 5989a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000538dc : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 538dc: 4e56 ffe8 linkw %fp,#-24 538e0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 538e4: 286e 0008 moveal %fp@(8),%a4 int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); 538e8: 2f0c movel %a4,%sp@- 538ea: 4eb9 0005 37a0 jsr 537a0 if ( rc != RC_OK ) 538f0: 588f addql #4,%sp fat_shutdown_drive(fat_fs_info_t *fs_info) { int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); 538f2: 2800 movel %d0,%d4 if ( rc != RC_OK ) 538f4: 6600 00bc bnew 539b2 rc = -1; 538f8: 4283 clrl %d3 538fa: 45f9 0004 4bec lea 44bec ,%a2 53900: 47f9 0004 a0d4 lea 4a0d4 <_Chain_Get>,%a3 for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 53906: 242c 0062 movel %a4@(98),%d2 5390a: d483 addl %d3,%d2 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 5390c: 2f02 movel %d2,%sp@- 5390e: 4e93 jsr %a3@ while ( (node = rtems_chain_get(the_chain)) != NULL ) 53910: 588f addql #4,%sp 53912: 4a80 tstl %d0 53914: 6710 beqs 53926 <== ALWAYS TAKEN free(node); 53916: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53918: 4e92 jsr %a2@ <== NOT EXECUTED 5391a: 588f addql #4,%sp <== NOT EXECUTED 5391c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5391e: 4e93 jsr %a3@ <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 53920: 588f addql #4,%sp <== NOT EXECUTED 53922: 4a80 tstl %d0 <== NOT EXECUTED 53924: 66f0 bnes 53916 <== NOT EXECUTED 53926: 0683 0000 000c addil #12,%d3 rc = fat_sync(fs_info); if ( rc != RC_OK ) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 5392c: 103c 0018 moveb #24,%d0 53930: b083 cmpl %d3,%d0 53932: 66d2 bnes 53906 53934: 4283 clrl %d3 } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 53936: 242c 0066 movel %a4@(102),%d2 5393a: d483 addl %d3,%d2 5393c: 2f02 movel %d2,%sp@- 5393e: 4e93 jsr %a3@ while ( (node = rtems_chain_get(the_chain)) != NULL ) 53940: 588f addql #4,%sp 53942: 4a80 tstl %d0 53944: 6710 beqs 53956 <== ALWAYS TAKEN free(node); 53946: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53948: 4e92 jsr %a2@ <== NOT EXECUTED 5394a: 588f addql #4,%sp <== NOT EXECUTED 5394c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5394e: 4e93 jsr %a3@ <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 53950: 588f addql #4,%sp <== NOT EXECUTED 53952: 4a80 tstl %d0 <== NOT EXECUTED 53954: 66f0 bnes 53946 <== NOT EXECUTED 53956: 0683 0000 000c addil #12,%d3 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 5395c: 103c 0018 moveb #24,%d0 53960: b083 cmpl %d3,%d0 53962: 66d2 bnes 53936 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 53964: 2f2c 0062 movel %a4@(98),%sp@- 53968: 4e92 jsr %a2@ free(fs_info->rhash); 5396a: 2f2c 0066 movel %a4@(102),%sp@- 5396e: 4e92 jsr %a2@ free(fs_info->uino); 53970: 2f2c 006a movel %a4@(106),%sp@- 53974: 4e92 jsr %a2@ free(fs_info->sec_buf); 53976: 2f2c 0084 movel %a4@(132),%sp@- 5397a: 4e92 jsr %a2@ close(fs_info->vol.fd); 5397c: 2f2c 0056 movel %a4@(86),%sp@- 53980: 4eb9 0004 4918 jsr 44918 if (rc) 53986: 4fef 0014 lea %sp@(20),%sp 5398a: 4a84 tstl %d4 5398c: 660c bnes 5399a <== NEVER TAKEN errno = EIO; return rc; } 5398e: 2004 movel %d4,%d0 53990: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 53996: 4e5e unlk %fp 53998: 4e75 rts free(fs_info->uino); free(fs_info->sec_buf); close(fs_info->vol.fd); if (rc) errno = EIO; 5399a: 4eb9 0005 b6c0 jsr 5b6c0 <__errno> <== NOT EXECUTED 539a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 539a2: 7005 moveq #5,%d0 <== NOT EXECUTED 539a4: 2080 movel %d0,%a0@ <== NOT EXECUTED return rc; } 539a6: 2004 movel %d4,%d0 <== NOT EXECUTED 539a8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 539ae: 4e5e unlk %fp <== NOT EXECUTED 539b0: 4e75 rts <== NOT EXECUTED int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); if ( rc != RC_OK ) rc = -1; 539b2: 78ff moveq #-1,%d4 <== NOT EXECUTED 539b4: 4283 clrl %d3 <== NOT EXECUTED 539b6: 45f9 0004 4bec lea 44bec ,%a2 <== NOT EXECUTED 539bc: 47f9 0004 a0d4 lea 4a0d4 <_Chain_Get>,%a3 <== NOT EXECUTED 539c2: 6000 ff42 braw 53906 <== NOT EXECUTED =============================================================================== 000537a0 : static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) 537a0: 4280 clrl %d0 537a2: 7204 moveq #4,%d1 return RC_OK; } int fat_sync(fat_fs_info_t *fs_info) { 537a4: 4e56 ffe0 linkw %fp,#-32 537a8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 537ac: 246e 0008 moveal %fp@(8),%a2 static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) 537b0: 102a 000e moveb %a2@(14),%d0 537b4: b280 cmpl %d0,%d1 537b6: 6728 beqs 537e0 <== NEVER TAKEN * RC_OK on success, or -1 if error occured (errno set appropriately) */ static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; 537b8: 4282 clrl %d2 rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; fat_buf_release(fs_info); 537ba: 2f0a movel %a2,%sp@- 537bc: 4eb9 0005 2804 jsr 52804 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 537c2: 2f2a 005a movel %a2@(90),%sp@- 537c6: 4eb9 0005 0aec jsr 50aec 537cc: 508f addql #8,%sp 537ce: 4a80 tstl %d0 537d0: 6600 00fc bnew 538ce rc = -1; return rc; } 537d4: 2002 movel %d2,%d0 537d6: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 537dc: 4e5e unlk %fp 537de: 4e75 rts { ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) { uint32_t free_count = fs_info->vol.free_cls; 537e0: 222a 003e movel %a2@(62),%d1 <== NOT EXECUTED uint32_t next_free = fs_info->vol.next_cl; 537e4: 242a 0046 movel %a2@(70),%d2 <== NOT EXECUTED if (free_count != fs_info->vol.free_cls_in_fs_info) 537e8: b2aa 0042 cmpl %a2@(66),%d1 <== NOT EXECUTED 537ec: 677a beqs 53868 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 537ee: 2001 movel %d1,%d0 <== NOT EXECUTED 537f0: 7618 moveq #24,%d3 <== NOT EXECUTED 537f2: e6a8 lsrl %d3,%d0 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 537f4: 2601 movel %d1,%d3 <== NOT EXECUTED 537f6: 7a18 moveq #24,%d5 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 537f8: 2801 movel %d1,%d4 <== NOT EXECUTED 537fa: e08c lsrl #8,%d4 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 537fc: 264e moveal %fp,%a3 <== NOT EXECUTED { uint32_t le_free_count = CT_LE_L(free_count); fs_info->vol.free_cls_in_fs_info = free_count; ret1 = fat_sector_write(fs_info, 537fe: 49f9 0005 2b26 lea 52b26 ,%a4 <== NOT EXECUTED 53804: ebab lsll %d5,%d3 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 53806: 2a01 movel %d1,%d5 <== NOT EXECUTED 53808: e18d lsll #8,%d5 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5380a: 8680 orl %d0,%d3 <== NOT EXECUTED 5380c: 0284 0000 ff00 andil #65280,%d4 <== NOT EXECUTED 53812: 0285 00ff 0000 andil #16711680,%d5 <== NOT EXECUTED if (free_count != fs_info->vol.free_cls_in_fs_info) { uint32_t le_free_count = CT_LE_L(free_count); fs_info->vol.free_cls_in_fs_info = free_count; 53818: 2541 0042 movel %d1,%a2@(66) <== NOT EXECUTED ret1 = fat_sector_write(fs_info, 5381c: 4280 clrl %d0 <== NOT EXECUTED 5381e: 8685 orl %d5,%d3 <== NOT EXECUTED 53820: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED 53824: 8684 orl %d4,%d3 <== NOT EXECUTED 53826: 2703 movel %d3,%a3@- <== NOT EXECUTED 53828: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5382a: 4878 0004 pea 4 <== NOT EXECUTED 5382e: 4878 01e8 pea 1e8 <== NOT EXECUTED 53832: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53834: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53836: 4e94 jsr %a4@ <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) 53838: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED { uint32_t le_free_count = CT_LE_L(free_count); fs_info->vol.free_cls_in_fs_info = free_count; ret1 = fat_sector_write(fs_info, 5383c: 2800 movel %d0,%d4 <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) 5383e: b4aa 004a cmpl %a2@(74),%d2 <== NOT EXECUTED 53842: 6638 bnes 5387c <== NOT EXECUTED sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) 53844: 4a80 tstl %d0 <== NOT EXECUTED 53846: 6c00 ff70 bgew 537b8 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; fat_buf_release(fs_info); 5384a: 2f0a movel %a2,%sp@- <== NOT EXECUTED { int rc = RC_OK; rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; 5384c: 74ff moveq #-1,%d2 <== NOT EXECUTED fat_buf_release(fs_info); 5384e: 4eb9 0005 2804 jsr 52804 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 53854: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 53858: 4eb9 0005 0aec jsr 50aec <== NOT EXECUTED 5385e: 508f addql #8,%sp <== NOT EXECUTED 53860: 4a80 tstl %d0 <== NOT EXECUTED 53862: 6700 ff70 beqw 537d4 <== NOT EXECUTED 53866: 6066 bras 538ce <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) 53868: b4aa 004a cmpl %a2@(74),%d2 <== NOT EXECUTED 5386c: 6700 ff4a beqw 537b8 <== NOT EXECUTED * RC_OK on success, or -1 if error occured (errno set appropriately) */ static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; 53870: 4284 clrl %d4 <== NOT EXECUTED 53872: 47ee fffc lea %fp@(-4),%a3 <== NOT EXECUTED 53876: 49f9 0005 2b26 lea 52b26 ,%a4 <== NOT EXECUTED { uint32_t le_next_free = CT_LE_L(next_free); fs_info->vol.next_cl_in_fs_info = next_free; ret2 = fat_sector_write(fs_info, 5387c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5387e: 4878 0004 pea 4 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 53882: 7018 moveq #24,%d0 <== NOT EXECUTED 53884: 4878 01ec pea 1ec <== NOT EXECUTED 53888: 2a02 movel %d2,%d5 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 5388a: 2602 movel %d2,%d3 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5388c: 2202 movel %d2,%d1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5388e: e0ad lsrl %d0,%d5 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 53890: e08b lsrl #8,%d3 <== NOT EXECUTED if (next_free != fs_info->vol.next_cl_in_fs_info) { uint32_t le_next_free = CT_LE_L(next_free); fs_info->vol.next_cl_in_fs_info = next_free; 53892: 2542 004a movel %d2,%a2@(74) <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 53896: e1a9 lsll %d0,%d1 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 53898: e18a lsll #8,%d2 <== NOT EXECUTED ret2 = fat_sector_write(fs_info, 5389a: 4280 clrl %d0 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5389c: 8285 orl %d5,%d1 <== NOT EXECUTED 5389e: 0282 00ff 0000 andil #16711680,%d2 <== NOT EXECUTED 538a4: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED 538a8: 0283 0000 ff00 andil #65280,%d3 <== NOT EXECUTED 538ae: 8282 orl %d2,%d1 <== NOT EXECUTED 538b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 538b2: 8283 orl %d3,%d1 <== NOT EXECUTED 538b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 538b6: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED 538ba: 4e94 jsr %a4@ <== NOT EXECUTED sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) 538bc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 538c0: 4a84 tstl %d4 <== NOT EXECUTED 538c2: 6d86 blts 5384a <== NOT EXECUTED 538c4: 4a80 tstl %d0 <== NOT EXECUTED 538c6: 6d82 blts 5384a <== NOT EXECUTED * RC_OK on success, or -1 if error occured (errno set appropriately) */ static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; 538c8: 4282 clrl %d2 <== NOT EXECUTED 538ca: 6000 feee braw 537ba <== NOT EXECUTED rc = -1; fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; 538ce: 74ff moveq #-1,%d2 <== NOT EXECUTED return rc; } 538d0: 2002 movel %d2,%d0 <== NOT EXECUTED 538d2: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 <== NOT EXECUTED 538d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00073f7c : /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 73f7c: 4e56 ff9c linkw %fp,#-100 rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; st.st_uid = 0; 73f80: 4241 clrw %d1 /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 73f82: 202e 0008 movel %fp@(8),%d0 73f86: 2f0a movel %a2,%sp@- rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; st.st_uid = 0; 73f88: 3d41 ffcc movew %d1,%fp@(-52) /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 73f8c: 2f02 movel %d2,%sp@- struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; st.st_uid = 0; st.st_gid = 0; 73f8e: 3d41 ffce movew %d1,%fp@(-50) int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 73f92: 42ae ffc6 clrl %fp@(-58) st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); 73f96: b0b9 0009 c79c cmpl 9c79c ,%d0 73f9c: 6400 0100 bccw 7409e iop = rtems_libio_iop( fd ); 73fa0: 2200 movel %d0,%d1 73fa2: ed88 lsll #6,%d0 73fa4: e989 lsll #4,%d1 73fa6: 2479 000a 13c4 moveal a13c4 ,%a2 73fac: 9081 subl %d1,%d0 73fae: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 73fb0: 202a 000c movel %a2@(12),%d0 73fb4: 0280 0000 0100 andil #256,%d0 73fba: 6700 00e2 beqw 7409e if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 73fbe: 206a 0024 moveal %a2@(36),%a0 rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 73fc2: 240a movel %a2,%d2 73fc4: 0682 0000 0010 addil #16,%d2 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 73fca: 2268 000c moveal %a0@(12),%a1 73fce: 2f08 movel %a0,%sp@- 73fd0: 2051 moveal %a1@,%a0 73fd2: 4e90 jsr %a0@ 73fd4: 206a 0020 moveal %a2@(32),%a0 73fd8: 486e ffba pea %fp@(-70) 73fdc: 2f02 movel %d2,%sp@- 73fde: 2068 0018 moveal %a0@(24),%a0 73fe2: 4e90 jsr %a0@ if ( rv == 0 ) { 73fe4: 4fef 000c lea %sp@(12),%sp 73fe8: 4a80 tstl %d0 73fea: 6726 beqs 74012 <== ALWAYS TAKEN if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 73fec: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 73ff0: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED 73ff4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 73ff6: 2069 0004 moveal %a1@(4),%a0 <== NOT EXECUTED 73ffa: 2d40 ff9c movel %d0,%fp@(-100) <== NOT EXECUTED 73ffe: 4e90 jsr %a0@ <== NOT EXECUTED 74000: 202e ff9c movel %fp@(-100),%d0 <== NOT EXECUTED 74004: 588f addql #4,%sp <== NOT EXECUTED 74006: 242e ff94 movel %fp@(-108),%d2 7400a: 246e ff98 moveal %fp@(-104),%a2 7400e: 4e5e unlk %fp 74010: 4e75 rts rtems_libio_check_is_open( iop ); rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); if ( rv == 0 ) { bool access_ok = rtems_filesystem_check_access( 74012: 4281 clrl %d1 74014: 4280 clrl %d0 74016: 322e ffce movew %fp@(-50),%d1 7401a: 302e ffcc movew %fp@(-52),%d0 7401e: 2f01 movel %d1,%sp@- 74020: 2f00 movel %d0,%sp@- 74022: 2f2e ffc6 movel %fp@(-58),%sp@- 74026: 4878 0001 pea 1 7402a: 4eb9 0004 e268 jsr 4e268 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 74030: 4fef 0010 lea %sp@(16),%sp 74034: 4a00 tstb %d0 74036: 673a beqs 74072 rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 74038: 2f02 movel %d2,%sp@- 7403a: 240e movel %fp,%d2 7403c: 0682 ffff ffa2 addil #-94,%d2 74042: 2f02 movel %d2,%sp@- 74044: 4eb9 0004 dbc4 jsr 4dbc4 if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 7404a: 206a 0024 moveal %a2@(36),%a0 7404e: 2268 000c moveal %a0@(12),%a1 74052: 2f08 movel %a0,%sp@- 74054: 2069 0004 moveal %a1@(4),%a0 74058: 4e90 jsr %a0@ } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); 7405a: 2f02 movel %d2,%sp@- 7405c: 4eb9 0006 4990 jsr 64990 } return rv; } 74062: 242e ff94 movel %fp@(-108),%d2 } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); 74066: 4fef 0010 lea %sp@(16),%sp } return rv; } 7406a: 246e ff98 moveal %fp@(-104),%a2 7406e: 4e5e unlk %fp 74070: 4e75 rts ); if ( access_ok ) { rtems_filesystem_location_clone( &loc, &iop->pathinfo ); } else { errno = EACCES; 74072: 4eb9 0007 8640 jsr 78640 <__errno> 74078: 720d moveq #13,%d1 7407a: 2040 moveal %d0,%a0 rv = -1; 7407c: 70ff moveq #-1,%d0 ); if ( access_ok ) { rtems_filesystem_location_clone( &loc, &iop->pathinfo ); } else { errno = EACCES; 7407e: 2081 movel %d1,%a0@ if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 74080: 206a 0024 moveal %a2@(36),%a0 74084: 2268 000c moveal %a0@(12),%a1 74088: 2f08 movel %a0,%sp@- 7408a: 2069 0004 moveal %a1@(4),%a0 7408e: 2d40 ff9c movel %d0,%fp@(-100) 74092: 4e90 jsr %a0@ 74094: 202e ff9c movel %fp@(-100),%d0 74098: 588f addql #4,%sp 7409a: 6000 ff6a braw 74006 st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 7409e: 4eb9 0007 8640 jsr 78640 <__errno> 740a4: 7409 moveq #9,%d2 740a6: 2040 moveal %d0,%a0 740a8: 70ff moveq #-1,%d0 740aa: 2082 movel %d2,%a0@ if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 740ac: 242e ff94 movel %fp@(-108),%d2 740b0: 246e ff98 moveal %fp@(-104),%a2 740b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00064cb8 : /** * POSIX 1003.1b 5.6.4 - Change File Modes */ int fchmod( int fd, mode_t mode ) { 64cb8: 4e56 fffc linkw %fp,#-4 64cbc: 202e 0008 movel %fp@(8),%d0 64cc0: 2f0a movel %a2,%sp@- int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 64cc2: b0b9 0009 c79c cmpl 9c79c ,%d0 64cc8: 6400 0082 bccw 64d4c iop = rtems_libio_iop( fd ); 64ccc: 2200 movel %d0,%d1 64cce: ed88 lsll #6,%d0 64cd0: e989 lsll #4,%d1 64cd2: 2479 000a 13c4 moveal a13c4 ,%a2 64cd8: 9081 subl %d1,%d0 64cda: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 64cdc: 202a 000c movel %a2@(12),%d0 64ce0: 0280 0000 0100 andil #256,%d0 64ce6: 6764 beqs 64d4c if (iop->pathinfo.mt_entry->writeable) { 64ce8: 206a 0024 moveal %a2@(36),%a0 64cec: 4a28 0029 tstb %a0@(41) 64cf0: 6744 beqs 64d36 <== NEVER TAKEN const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 64cf2: 2268 000c moveal %a0@(12),%a1 64cf6: 2f08 movel %a0,%sp@- 64cf8: 2051 moveal %a1@,%a0 64cfa: 4e90 jsr %a0@ rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); 64cfc: 206a 0024 moveal %a2@(36),%a0 64d00: 2068 000c moveal %a0@(12),%a0 64d04: 2f2e 000c movel %fp@(12),%sp@- 64d08: 486a 0010 pea %a2@(16) 64d0c: 2068 0020 moveal %a0@(32),%a0 64d10: 4e90 jsr %a0@ errno = EROFS; rv = -1; } return rv; } 64d12: 206a 0024 moveal %a2@(36),%a0 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 64d16: 2268 000c moveal %a0@(12),%a1 64d1a: 2f08 movel %a0,%sp@- 64d1c: 2069 0004 moveal %a1@(4),%a0 64d20: 2d40 fffc movel %d0,%fp@(-4) 64d24: 4e90 jsr %a0@ 64d26: 202e fffc movel %fp@(-4),%d0 64d2a: 4fef 0010 lea %sp@(16),%sp 64d2e: 246e fff8 moveal %fp@(-8),%a2 64d32: 4e5e unlk %fp 64d34: 4e75 rts if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 64d36: 4eb9 0007 8640 jsr 78640 <__errno> <== NOT EXECUTED rv = -1; } return rv; } 64d3c: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 64d40: 2040 moveal %d0,%a0 <== NOT EXECUTED 64d42: 721e moveq #30,%d1 <== NOT EXECUTED rv = -1; 64d44: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 64d46: 4e5e unlk %fp <== NOT EXECUTED if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 64d48: 2081 movel %d1,%a0@ <== NOT EXECUTED rv = -1; } return rv; } 64d4a: 4e75 rts <== NOT EXECUTED int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 64d4c: 4eb9 0007 8640 jsr 78640 <__errno> errno = EROFS; rv = -1; } return rv; } 64d52: 246e fff8 moveal %fp@(-8),%a2 int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 64d56: 2040 moveal %d0,%a0 64d58: 7209 moveq #9,%d1 64d5a: 70ff moveq #-1,%d0 errno = EROFS; rv = -1; } return rv; } 64d5c: 4e5e unlk %fp int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 64d5e: 2081 movel %d1,%a0@ errno = EROFS; rv = -1; } return rv; } ... =============================================================================== 00064d64 : /** * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File */ int fchown( int fd, uid_t owner, gid_t group ) { 64d64: 4e56 fff0 linkw %fp,#-16 64d68: 202e 0008 movel %fp@(8),%d0 64d6c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 64d70: 342e 000e movew %fp@(14),%d2 64d74: 362e 0012 movew %fp@(18),%d3 int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 64d78: b0b9 0009 c79c cmpl 9c79c ,%d0 64d7e: 6400 008a bccw 64e0a iop = rtems_libio_iop( fd ); 64d82: 2200 movel %d0,%d1 64d84: ed88 lsll #6,%d0 64d86: e989 lsll #4,%d1 64d88: 2479 000a 13c4 moveal a13c4 ,%a2 64d8e: 9081 subl %d1,%d0 64d90: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 64d92: 202a 000c movel %a2@(12),%d0 64d96: 0280 0000 0100 andil #256,%d0 64d9c: 676c beqs 64e0a <== NEVER TAKEN if (iop->pathinfo.mt_entry->writeable) { 64d9e: 206a 0024 moveal %a2@(36),%a0 64da2: 4a28 0029 tstb %a0@(41) 64da6: 674a beqs 64df2 <== NEVER TAKEN const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 64da8: 2268 000c moveal %a0@(12),%a1 64dac: 2f08 movel %a0,%sp@- 64dae: 2051 moveal %a1@,%a0 64db0: 4e90 jsr %a0@ rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->chown_h)( 64db2: 206a 0024 moveal %a2@(36),%a0 64db6: 2068 000c moveal %a0@(12),%a0 64dba: 3f03 movew %d3,%sp@- 64dbc: 4267 clrw %sp@- 64dbe: 3f02 movew %d2,%sp@- 64dc0: 4267 clrw %sp@- 64dc2: 486a 0010 pea %a2@(16) 64dc6: 2068 0024 moveal %a0@(36),%a0 64dca: 4e90 jsr %a0@ errno = EROFS; rv = -1; } return rv; } 64dcc: 206a 0024 moveal %a2@(36),%a0 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 64dd0: 2268 000c moveal %a0@(12),%a1 64dd4: 2f08 movel %a0,%sp@- 64dd6: 2069 0004 moveal %a1@(4),%a0 64dda: 2d40 fffc movel %d0,%fp@(-4) 64dde: 4e90 jsr %a0@ 64de0: 202e fffc movel %fp@(-4),%d0 64de4: 4fef 0014 lea %sp@(20),%sp 64de8: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 64dee: 4e5e unlk %fp 64df0: 4e75 rts owner, group ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 64df2: 4eb9 0007 8640 jsr 78640 <__errno> <== NOT EXECUTED 64df8: 721e moveq #30,%d1 <== NOT EXECUTED 64dfa: 2040 moveal %d0,%a0 <== NOT EXECUTED rv = -1; 64dfc: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 64dfe: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED owner, group ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 64e04: 2081 movel %d1,%a0@ <== NOT EXECUTED rv = -1; } return rv; } 64e06: 4e5e unlk %fp <== NOT EXECUTED 64e08: 4e75 rts <== NOT EXECUTED int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 64e0a: 4eb9 0007 8640 jsr 78640 <__errno> 64e10: 7409 moveq #9,%d2 64e12: 2040 moveal %d0,%a0 64e14: 70ff moveq #-1,%d0 64e16: 2082 movel %d2,%a0@ errno = EROFS; rv = -1; } return rv; } 64e18: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 64e1e: 4e5e unlk %fp ... =============================================================================== 0006fb70 : int fcntl( int fd, int cmd, ... ) { 6fb70: 4e56 ffec linkw %fp,#-20 6fb74: 202e 0008 movel %fp@(8),%d0 6fb78: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 6fb7c: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 6fb80: b0b9 0007 56a8 cmpl 756a8 ,%d0 6fb86: 6400 0194 bccw 6fd1c iop = rtems_libio_iop( fd ); 6fb8a: 2200 movel %d0,%d1 6fb8c: ed88 lsll #6,%d0 6fb8e: e989 lsll #4,%d1 6fb90: 2479 0008 6f20 moveal 86f20 ,%a2 6fb96: 9081 subl %d1,%d0 6fb98: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 6fb9a: 202a 000c movel %a2@(12),%d0 6fb9e: 0800 0008 btst #8,%d0 6fba2: 6700 0178 beqw 6fd1c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 6fba6: 7209 moveq #9,%d1 6fba8: b283 cmpl %d3,%d1 6fbaa: 641a bccs 6fbc6 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 6fbac: 4eb9 0006 138c jsr 6138c <__errno> 6fbb2: 2040 moveal %d0,%a0 6fbb4: 7016 moveq #22,%d0 6fbb6: 2080 movel %d0,%a0@ int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 6fbb8: 74ff moveq #-1,%d2 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6fbba: 2002 movel %d2,%d0 6fbbc: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 6fbc2: 4e5e unlk %fp 6fbc4: 4e75 rts /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 6fbc6: 323b 3a08 movew %pc@(6fbd0 ,%d3:l:2),%d1 6fbca: 48c1 extl %d1 6fbcc: 4efb 1802 jmp %pc@(6fbd0 ,%d1:l) 6fbd0: 00b0 00a4 0090 oril #10748048,%d0 <== NOT EXECUTED 6fbd6: 0076 .short 0x0076 <== NOT EXECUTED 6fbd8: 0026 .short 0x0026 <== NOT EXECUTED 6fbda: 0014 .short 0x0014 <== NOT EXECUTED 6fbdc: 0014 .short 0x0014 <== NOT EXECUTED 6fbde: 0014 .short 0x0014 <== NOT EXECUTED 6fbe0: 0014 .short 0x0014 <== NOT EXECUTED 6fbe2: 0014 .short 0x0014 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 6fbe4: 4eb9 0006 138c jsr 6138c <__errno> int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 6fbea: 74ff moveq #-1,%d2 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 6fbec: 2040 moveal %d0,%a0 6fbee: 20bc 0000 0086 movel #134,%a0@ 6fbf4: 60c4 bras 6fbba case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 6fbf6: 2f2e 0010 movel %fp@(16),%sp@- { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 6fbfa: 4282 clrl %d2 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 6fbfc: 4eb9 0004 7644 jsr 47644 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 6fc02: 222a 000c movel %a2@(12),%d1 6fc06: 588f addql #4,%sp 6fc08: 0280 0000 0201 andil #513,%d0 6fc0e: 0281 ffff fdfe andil #-514,%d1 6fc14: 8081 orl %d1,%d0 6fc16: 2540 000c movel %d0,%a2@(12) * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 6fc1a: 206a 0020 moveal %a2@(32),%a0 6fc1e: 2f03 movel %d3,%sp@- 6fc20: 2f0a movel %a2,%sp@- 6fc22: 2068 0028 moveal %a0@(40),%a0 6fc26: 4e90 jsr %a0@ if (err) { 6fc28: 508f addql #8,%sp * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 6fc2a: 2600 movel %d0,%d3 if (err) { 6fc2c: 678c beqs 6fbba <== ALWAYS TAKEN errno = err; 6fc2e: 4eb9 0006 138c jsr 6138c <__errno> <== NOT EXECUTED ret = -1; 6fc34: 74ff moveq #-1,%d2 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); if (err) { errno = err; 6fc36: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6fc38: 2002 movel %d2,%d0 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); if (err) { errno = err; 6fc3a: 2083 movel %d3,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6fc3c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 6fc42: 4e5e unlk %fp <== NOT EXECUTED 6fc44: 4e75 rts <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 6fc46: 2f00 movel %d0,%sp@- 6fc48: 4eb9 0004 7684 jsr 47684 6fc4e: 588f addql #4,%sp 6fc50: 2400 movel %d0,%d2 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 6fc52: 6cc6 bges 6fc1a <== ALWAYS TAKEN va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6fc54: 2002 movel %d2,%d0 <== NOT EXECUTED 6fc56: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 6fc5c: 4e5e unlk %fp <== NOT EXECUTED 6fc5e: 4e75 rts <== NOT EXECUTED { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 6fc60: 4282 clrl %d2 * 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 ) ) 6fc62: 4aae 0010 tstl %fp@(16) 6fc66: 6700 00a8 beqw 6fd10 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 6fc6a: 08c0 000b bset #11,%d0 6fc6e: 2540 000c movel %d0,%a2@(12) 6fc72: 60a6 bras 6fc1a fd2 = va_arg( ap, int ); ret = duplicate_iop( iop, fd2 ); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 6fc74: 2400 movel %d0,%d2 6fc76: 720b moveq #11,%d1 6fc78: e2aa lsrl %d1,%d2 6fc7a: 7001 moveq #1,%d0 6fc7c: c480 andl %d0,%d2 6fc7e: 609a bras 6fc1a /* * FIXME: We ignore the start value fd2 for the file descriptor search. This * is not POSIX conform. */ rtems_libio_t *diop = rtems_libio_allocate(); 6fc80: 4eb9 0004 76d4 jsr 476d4 6fc86: 2640 moveal %d0,%a3 if (diop != NULL) { 6fc88: 4a80 tstl %d0 6fc8a: 6700 ff2c beqw 6fbb8 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 6fc8e: 2f2a 000c movel %a2@(12),%sp@- 6fc92: 4eb9 0004 7684 jsr 47684 oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 6fc98: 282b 000c movel %a3@(12),%d4 rtems_libio_t *diop = rtems_libio_allocate(); if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; 6fc9c: 2400 movel %d0,%d2 6fc9e: 0882 0009 bclr #9,%d2 diop->flags |= rtems_libio_fcntl_flags( oflag ); 6fca2: 2f02 movel %d2,%sp@- 6fca4: 4eb9 0004 7644 jsr 47644 int cmd, int arg ) { return fcntl( fd, cmd, arg ); } 6fcaa: 206a 0024 moveal %a2@(36),%a0 if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 6fcae: 8084 orl %d4,%d0 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 6fcb0: 2268 000c moveal %a0@(12),%a1 6fcb4: 2740 000c movel %d0,%a3@(12) 6fcb8: 2f08 movel %a0,%sp@- 6fcba: 2051 moveal %a1@,%a0 6fcbc: 4e90 jsr %a0@ rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 6fcbe: 486a 0010 pea %a2@(16) 6fcc2: 486b 0010 pea %a3@(16) 6fcc6: 4eb9 0005 65b8 jsr 565b8 int cmd, int arg ) { return fcntl( fd, cmd, arg ); } 6fccc: 206a 0024 moveal %a2@(36),%a0 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 6fcd0: 2268 000c moveal %a0@(12),%a1 6fcd4: 2f08 movel %a0,%sp@- 6fcd6: 2069 0004 moveal %a1@(4),%a0 6fcda: 4e90 jsr %a0@ /* * XXX: We call the open handler here to have a proper open and close pair. * * FIXME: What to do with the path? */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); 6fcdc: 206b 0020 moveal %a3@(32),%a0 6fce0: 42a7 clrl %sp@- 6fce2: 2f02 movel %d2,%sp@- 6fce4: 42a7 clrl %sp@- 6fce6: 2f0b movel %a3,%sp@- 6fce8: 2050 moveal %a0@,%a0 6fcea: 4e90 jsr %a0@ if ( rv == 0 ) { 6fcec: 4fef 0028 lea %sp@(40),%sp /* * XXX: We call the open handler here to have a proper open and close pair. * * FIXME: What to do with the path? */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); 6fcf0: 2400 movel %d0,%d2 if ( rv == 0 ) { 6fcf2: 6642 bnes 6fd36 <== NEVER TAKEN rv = diop - rtems_libio_iops; 6fcf4: 240b movel %a3,%d2 6fcf6: 94b9 0008 6f20 subl 86f20 ,%d2 6fcfc: 203c aaaa aaab movel #-1431655765,%d0 6fd02: e882 asrl #4,%d2 6fd04: 4c00 2800 mulsl %d0,%d2 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 6fd08: 6a00 ff10 bplw 6fc1a 6fd0c: 6000 ff46 braw 6fc54 <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 6fd10: 0880 000b bclr #11,%d0 6fd14: 2540 000c movel %d0,%a2@(12) 6fd18: 6000 ff00 braw 6fc1a int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 6fd1c: 4eb9 0006 138c jsr 6138c <__errno> 6fd22: 74ff moveq #-1,%d2 6fd24: 7209 moveq #9,%d1 6fd26: 2040 moveal %d0,%a0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6fd28: 2002 movel %d2,%d0 6fd2a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 6fd30: 2081 movel %d1,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6fd32: 4e5e unlk %fp 6fd34: 4e75 rts */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); if ( rv == 0 ) { rv = diop - rtems_libio_iops; } else { rtems_libio_free( diop ); 6fd36: 2f0b movel %a3,%sp@- <== NOT EXECUTED 6fd38: 4eb9 0004 773c jsr 4773c <== NOT EXECUTED 6fd3e: 588f addql #4,%sp <== NOT EXECUTED /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 6fd40: 4a82 tstl %d2 <== NOT EXECUTED 6fd42: 6c00 fed6 bgew 6fc1a <== NOT EXECUTED 6fd46: 6000 ff0c braw 6fc54 <== NOT EXECUTED =============================================================================== 0004d980 : int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4d980: 4e56 ffe4 linkw %fp,#-28 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4d984: 2039 0006 2de4 movel 62de4 ,%d0 int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4d98a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d98e: 47f9 0004 8f20 lea 48f20 ,%a3 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4d994: 4a80 tstl %d0 4d996: 6758 beqs 4d9f0 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4d998: 42a7 clrl %sp@- 4d99a: 42a7 clrl %sp@- 4d99c: 2f00 movel %d0,%sp@- 4d99e: 4e93 jsr %a3@ } if (sc == RTEMS_SUCCESSFUL) { 4d9a0: 4fef 000c lea %sp@(12),%sp 4d9a4: 4a80 tstl %d0 4d9a6: 6600 0254 bnew 4dbfc err = pipe_lock(); if (err) return err; pipe = *pipep; 4d9aa: 206e 0008 moveal %fp@(8),%a0 4d9ae: 2850 moveal %a0@,%a4 if (pipe == NULL) { 4d9b0: 4a8c tstl %a4 4d9b2: 676e beqs 4da22 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4d9b4: 42a7 clrl %sp@- 4d9b6: 42a7 clrl %sp@- 4d9b8: 2f2c 0028 movel %a4@(40),%sp@- 4d9bc: 4e93 jsr %a3@ 4d9be: 4fef 000c lea %sp@(12),%sp 4d9c2: 4a80 tstl %d0 4d9c4: 6700 01a8 beqw 4db6e err = -EINTR; if (*pipep == NULL) { 4d9c8: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4d9cc: 4a90 tstl %a0@ <== NOT EXECUTED 4d9ce: 6700 023c beqw 4dc0c <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4d9d2: 2f39 0006 2de4 movel 62de4 ,%sp@- <== NOT EXECUTED if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4d9d8: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4d9dc: 4eb9 0004 9078 jsr 49078 <== NOT EXECUTED 4d9e2: 588f addql #4,%sp <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 4d9e4: 200a movel %a2,%d0 4d9e6: 4cee 3c04 ffe4 moveml %fp@(-28),%d2/%a2-%a5 4d9ec: 4e5e unlk %fp 4d9ee: 4e75 rts */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4d9f0: 42a7 clrl %sp@- 4d9f2: 42a7 clrl %sp@- 4d9f4: 2f39 0006 34dc movel 634dc ,%sp@- 4d9fa: 4e93 jsr %a3@ rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 4d9fc: 4fef 000c lea %sp@(12),%sp 4da00: 4ab9 0006 2de4 tstl 62de4 4da06: 6700 01c0 beqw 4dbc8 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4da0a: 2f39 0006 34dc movel 634dc ,%sp@- <== NOT EXECUTED 4da10: 4eb9 0004 9078 jsr 49078 <== NOT EXECUTED 4da16: 2039 0006 2de4 movel 62de4 ,%d0 <== NOT EXECUTED 4da1c: 588f addql #4,%sp <== NOT EXECUTED 4da1e: 6000 ff78 braw 4d998 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4da22: 4878 0034 pea 34 4da26: 45f9 0004 4904 lea 44904 ,%a2 4da2c: 4e92 jsr %a2@ if (pipe == NULL) 4da2e: 588f addql #4,%sp { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4da30: 2840 moveal %d0,%a4 if (pipe == NULL) 4da32: 4a80 tstl %d0 4da34: 6700 024e beqw 4dc84 return err; memset(pipe, 0, sizeof(pipe_control_t)); 4da38: 2040 moveal %d0,%a0 pipe->Size = PIPE_BUF; 4da3a: 203c 0000 0200 movel #512,%d0 int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4da40: 4298 clrl %a0@+ 4da42: 5888 addql #4,%a0 4da44: 4298 clrl %a0@+ 4da46: 4298 clrl %a0@+ 4da48: 4298 clrl %a0@+ 4da4a: 4298 clrl %a0@+ 4da4c: 4298 clrl %a0@+ 4da4e: 4298 clrl %a0@+ 4da50: 4298 clrl %a0@+ 4da52: 4298 clrl %a0@+ 4da54: 4298 clrl %a0@+ 4da56: 4298 clrl %a0@+ 4da58: 4290 clrl %a0@ pipe->Size = PIPE_BUF; 4da5a: 2940 0004 movel %d0,%a4@(4) pipe->Buffer = malloc(pipe->Size); 4da5e: 4878 0200 pea 200 4da62: 4e92 jsr %a2@ if (! pipe->Buffer) 4da64: 588f addql #4,%sp 4da66: 45f9 0004 44b0 lea 444b0 ,%a2 if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4da6c: 2880 movel %d0,%a4@ if (! pipe->Buffer) 4da6e: 6700 020e beqw 4dc7e goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4da72: 486c 002c pea %a4@(44) 4da76: 45f9 0004 f520 lea 4f520 ,%a2 rtems_build_name ('P', 'I', 'r', c), 4da7c: 1039 0006 1e98 moveb 61e98 ,%d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4da82: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'r', c), 4da84: 49c0 extbl %d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4da86: 42a7 clrl %sp@- 4da88: 0080 5049 7200 oril #1346990592,%d0 4da8e: 2f00 movel %d0,%sp@- 4da90: 4e92 jsr %a2@ 4da92: 4fef 0010 lea %sp@(16),%sp 4da96: 4a80 tstl %d0 4da98: 6600 01d8 bnew 4dc72 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4da9c: 486c 0030 pea %a4@(48) rtems_build_name ('P', 'I', 'w', c), 4daa0: 1039 0006 1e98 moveb 61e98 ,%d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4daa6: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'w', c), 4daa8: 49c0 extbl %d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4daaa: 42a7 clrl %sp@- 4daac: 0080 5049 7700 oril #1346991872,%d0 4dab2: 2f00 movel %d0,%sp@- 4dab4: 4e92 jsr %a2@ 4dab6: 4fef 0010 lea %sp@(16),%sp 4daba: 45f9 0004 f5f4 lea 4f5f4 ,%a2 4dac0: 4a80 tstl %d0 4dac2: 6600 01a6 bnew 4dc6a rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4dac6: 486c 0028 pea %a4@(40) rtems_build_name ('P', 'I', 's', c), 1, 4daca: 1039 0006 1e98 moveb 61e98 ,%d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4dad0: 42a7 clrl %sp@- 4dad2: 4878 0010 pea 10 rtems_build_name ('P', 'I', 's', c), 1, 4dad6: 49c0 extbl %d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4dad8: 4878 0001 pea 1 4dadc: 0080 5049 7300 oril #1346990848,%d0 4dae2: 2f00 movel %d0,%sp@- 4dae4: 4eb9 0004 8c5c jsr 48c5c 4daea: 4fef 0014 lea %sp@(20),%sp 4daee: 4a80 tstl %d0 4daf0: 6600 016a bnew 4dc5c /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 4daf4: 240e movel %fp,%d2 4daf6: 5982 subql #4,%d2 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4daf8: 4bf9 0004 aad4 lea 4aad4 <_Objects_Get>,%a5 |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4dafe: 45f9 0004 b7f0 lea 4b7f0 <_Thread_Enable_dispatch>,%a2 4db04: 2f02 movel %d2,%sp@- 4db06: 2f2c 002c movel %a4@(44),%sp@- 4db0a: 4879 0006 3e0c pea 63e0c <_Barrier_Information> 4db10: 4e95 jsr %a5@ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 4db12: 223c 1000 0000 movel #268435456,%d1 4db18: 2040 moveal %d0,%a0 4db1a: 83a8 004c orl %d1,%a0@(76) _Thread_Enable_dispatch(); 4db1e: 4e92 jsr %a2@ 4db20: 2f02 movel %d2,%sp@- 4db22: 2f2c 0030 movel %a4@(48),%sp@- #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4db26: 747a moveq #122,%d2 4db28: 4879 0006 3e0c pea 63e0c <_Barrier_Information> 4db2e: 4e95 jsr %a5@ _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 4db30: 223c 1000 0000 movel #268435456,%d1 4db36: 2040 moveal %d0,%a0 4db38: 83a8 004c orl %d1,%a0@(76) _Thread_Enable_dispatch(); 4db3c: 4e92 jsr %a2@ #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4db3e: 4fef 0018 lea %sp@(24),%sp 4db42: 1039 0006 1e98 moveb 61e98 ,%d0 4db48: 1200 moveb %d0,%d1 4db4a: 49c1 extbl %d1 4db4c: b481 cmpl %d1,%d2 4db4e: 6700 0100 beqw 4dc50 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4db52: 42a7 clrl %sp@- #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4db54: 5280 addql #1,%d0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4db56: 42a7 clrl %sp@- 4db58: 2f2c 0028 movel %a4@(40),%sp@- #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4db5c: 13c0 0006 1e98 moveb %d0,61e98 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4db62: 4e93 jsr %a3@ 4db64: 4fef 000c lea %sp@(12),%sp 4db68: 4a80 tstl %d0 4db6a: 6600 fe5c bnew 4d9c8 err = -EINTR; if (*pipep == NULL) { 4db6e: 206e 0008 moveal %fp@(8),%a0 4db72: 4a90 tstl %a0@ 4db74: 6700 012e beqw 4dca4 #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4db78: 2f39 0006 2de4 movel 62de4 ,%sp@- 4db7e: 49f9 0004 9078 lea 49078 ,%a4 4db84: 4e94 jsr %a4@ int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4db86: 206e 0008 moveal %fp@(8),%a0 switch (LIBIO_ACCMODE(iop)) { 4db8a: 7006 moveq #6,%d0 4db8c: 588f addql #4,%sp 4db8e: 7204 moveq #4,%d1 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4db90: 2450 moveal %a0@,%a2 switch (LIBIO_ACCMODE(iop)) { 4db92: 206e 000c moveal %fp@(12),%a0 4db96: c0a8 000c andl %a0@(12),%d0 4db9a: b280 cmpl %d0,%d1 4db9c: 6700 01f0 beqw 4dd8e 4dba0: 7406 moveq #6,%d2 4dba2: b480 cmpl %d0,%d2 4dba4: 6700 018e beqw 4dd34 4dba8: 123c 0002 moveb #2,%d1 4dbac: b280 cmpl %d0,%d1 4dbae: 6700 00fe beqw 4dcae if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4dbb2: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4dbb6: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4dbb8: 4e94 jsr %a4@ return 0; 4dbba: 588f addql #4,%sp out_error: pipe_release(pipep, iop); return err; } 4dbbc: 200a movel %a2,%d0 4dbbe: 4cee 3c04 ffe4 moveml %fp@(-28),%d2/%a2-%a5 4dbc4: 4e5e unlk %fp 4dbc6: 4e75 rts if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( 4dbc8: 4879 0006 2de4 pea 62de4 4dbce: 42a7 clrl %sp@- 4dbd0: 4878 0054 pea 54 4dbd4: 4878 0001 pea 1 4dbd8: 2f3c 5049 5045 movel #1346981957,%sp@- 4dbde: 4eb9 0004 8c5c jsr 48c5c 4dbe4: 2f39 0006 34dc movel 634dc ,%sp@- 4dbea: 2400 movel %d0,%d2 4dbec: 4eb9 0004 9078 jsr 49078 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4dbf2: 4fef 0018 lea %sp@(24),%sp 4dbf6: 4a82 tstl %d2 4dbf8: 6700 00a0 beqw 4dc9a if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); err = -ENXIO; 4dbfc: 347c fff4 moveaw #-12,%a2 return 0; out_error: pipe_release(pipep, iop); return err; } 4dc00: 200a movel %a2,%d0 4dc02: 4cee 3c04 ffe4 moveml %fp@(-28),%d2/%a2-%a5 4dc08: 4e5e unlk %fp 4dc0a: 4e75 rts /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4dc0c: 2f2c 002c movel %a4@(44),%sp@- <== NOT EXECUTED 4dc10: 4bf9 0004 f5f4 lea 4f5f4 ,%a5 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4dc16: 47f9 0004 44b0 lea 444b0 ,%a3 <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4dc1c: 4e95 jsr %a5@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4dc1e: 2f2c 0030 movel %a4@(48),%sp@- <== NOT EXECUTED if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4dc22: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); 4dc26: 4e95 jsr %a5@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4dc28: 2f2c 0028 movel %a4@(40),%sp@- <== NOT EXECUTED 4dc2c: 4eb9 0004 8e48 jsr 48e48 <== NOT EXECUTED free(pipe->Buffer); 4dc32: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4dc34: 4e93 jsr %a3@ <== NOT EXECUTED free(pipe); 4dc36: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4dc38: 4e93 jsr %a3@ <== NOT EXECUTED 4dc3a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4dc3e: 2f39 0006 2de4 movel 62de4 ,%sp@- <== NOT EXECUTED 4dc44: 4eb9 0004 9078 jsr 49078 <== NOT EXECUTED 4dc4a: 588f addql #4,%sp <== NOT EXECUTED 4dc4c: 6000 fd96 braw 4d9e4 <== NOT EXECUTED pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') c = 'a'; 4dc50: 7061 moveq #97,%d0 4dc52: 13c0 0006 1e98 moveb %d0,61e98 4dc58: 6000 fd5a braw 4d9b4 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4dc5c: 2f2c 0030 movel %a4@(48),%sp@- 4dc60: 45f9 0004 f5f4 lea 4f5f4 ,%a2 4dc66: 4e92 jsr %a2@ 4dc68: 588f addql #4,%sp err_wbar: rtems_barrier_delete(pipe->readBarrier); 4dc6a: 2f2c 002c movel %a4@(44),%sp@- 4dc6e: 4e92 jsr %a2@ 4dc70: 588f addql #4,%sp err_rbar: free(pipe->Buffer); 4dc72: 2f14 movel %a4@,%sp@- 4dc74: 45f9 0004 44b0 lea 444b0 ,%a2 4dc7a: 4e92 jsr %a2@ 4dc7c: 588f addql #4,%sp err_buf: free(pipe); 4dc7e: 2f0c movel %a4,%sp@- 4dc80: 4e92 jsr %a2@ 4dc82: 588f addql #4,%sp #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4dc84: 2f39 0006 2de4 movel 62de4 ,%sp@- if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4dc8a: 347c fff4 moveaw #-12,%a2 #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4dc8e: 4eb9 0004 9078 jsr 49078 4dc94: 588f addql #4,%sp 4dc96: 6000 fd4c braw 4d9e4 4dc9a: 2039 0006 2de4 movel 62de4 ,%d0 4dca0: 6000 fcf6 braw 4d998 if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 4dca4: 206e 0008 moveal %fp@(8),%a0 4dca8: 208c movel %a4,%a0@ 4dcaa: 6000 fecc braw 4db78 pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4dcae: 202a 0010 movel %a2@(16),%d0 4dcb2: 2200 movel %d0,%d1 4dcb4: 5281 addql #1,%d1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4dcb6: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4dcba: 2541 0010 movel %d1,%a2@(16) 4dcbe: 4a80 tstl %d0 4dcc0: 6760 beqs 4dd22 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4dcc2: 4aaa 0014 tstl %a2@(20) 4dcc6: 6600 feea bnew 4dbb2 /* Not an error */ if (LIBIO_NODELAY(iop)) 4dcca: 206e 000c moveal %fp@(12),%a0 4dcce: 7001 moveq #1,%d0 4dcd0: c0a8 000c andl %a0@(12),%d0 4dcd4: 6600 fedc bnew 4dbb2 break; prevCounter = pipe->writerCounter; 4dcd8: 242a 0024 movel %a2@(36),%d2 4dcdc: 4bf9 0004 f6f4 lea 4f6f4 ,%a5 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4dce2: 2f2a 0028 movel %a2@(40),%sp@- 4dce6: 4e94 jsr %a4@ if (! PIPE_READWAIT(pipe)) 4dce8: 42a7 clrl %sp@- 4dcea: 2f2a 002c movel %a2@(44),%sp@- 4dcee: 4e95 jsr %a5@ 4dcf0: 4fef 000c lea %sp@(12),%sp 4dcf4: 4a80 tstl %d0 4dcf6: 6600 0116 bnew 4de0e goto out_error; if (! PIPE_LOCK(pipe)) 4dcfa: 42a7 clrl %sp@- 4dcfc: 42a7 clrl %sp@- 4dcfe: 2f2a 0028 movel %a2@(40),%sp@- 4dd02: 4e93 jsr %a3@ 4dd04: 4fef 000c lea %sp@(12),%sp 4dd08: 4a80 tstl %d0 4dd0a: 6600 0102 bnew 4de0e goto out_error; } while (prevCounter == pipe->writerCounter); 4dd0e: b4aa 0024 cmpl %a2@(36),%d2 4dd12: 67ce beqs 4dce2 <== NEVER TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4dd14: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4dd18: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4dd1a: 4e94 jsr %a4@ return 0; 4dd1c: 588f addql #4,%sp 4dd1e: 6000 fe9c braw 4dbbc switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4dd22: 486e fff8 pea %fp@(-8) 4dd26: 2f2a 0030 movel %a2@(48),%sp@- 4dd2a: 4eb9 0004 f698 jsr 4f698 4dd30: 508f addql #8,%sp 4dd32: 608e bras 4dcc2 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4dd34: 202a 0010 movel %a2@(16),%d0 4dd38: 2200 movel %d0,%d1 4dd3a: 5281 addql #1,%d1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4dd3c: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4dd40: 2541 0010 movel %d1,%a2@(16) 4dd44: 4a80 tstl %d0 4dd46: 6734 beqs 4dd7c <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4dd48: 202a 0014 movel %a2@(20),%d0 4dd4c: 2400 movel %d0,%d2 4dd4e: 5282 addql #1,%d2 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4dd50: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4dd54: 2542 0014 movel %d2,%a2@(20) 4dd58: 4a80 tstl %d0 4dd5a: 6600 fe56 bnew 4dbb2 PIPE_WAKEUPREADERS(pipe); 4dd5e: 486e fff8 pea %fp@(-8) 4dd62: 2f2a 002c movel %a2@(44),%sp@- 4dd66: 4eb9 0004 f698 jsr 4f698 4dd6c: 508f addql #8,%sp break; } PIPE_UNLOCK(pipe); 4dd6e: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4dd72: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4dd74: 4e94 jsr %a4@ return 0; 4dd76: 588f addql #4,%sp 4dd78: 6000 fe42 braw 4dbbc break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4dd7c: 486e fff8 pea %fp@(-8) 4dd80: 2f2a 0030 movel %a2@(48),%sp@- 4dd84: 4eb9 0004 f698 jsr 4f698 4dd8a: 508f addql #8,%sp 4dd8c: 60ba bras 4dd48 break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4dd8e: 202a 0014 movel %a2@(20),%d0 4dd92: 2200 movel %d0,%d1 4dd94: 5281 addql #1,%d1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4dd96: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4dd9a: 2541 0014 movel %d1,%a2@(20) 4dd9e: 4a80 tstl %d0 4dda0: 675a beqs 4ddfc <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4dda2: 4aaa 0010 tstl %a2@(16) 4dda6: 6600 fe0a bnew 4dbb2 4ddaa: 206e 000c moveal %fp@(12),%a0 4ddae: 7001 moveq #1,%d0 4ddb0: c0a8 000c andl %a0@(12),%d0 4ddb4: 6678 bnes 4de2e err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4ddb6: 242a 0020 movel %a2@(32),%d2 4ddba: 4bf9 0004 f6f4 lea 4f6f4 ,%a5 err = -EINTR; do { PIPE_UNLOCK(pipe); 4ddc0: 2f2a 0028 movel %a2@(40),%sp@- 4ddc4: 4e94 jsr %a4@ if (! PIPE_WRITEWAIT(pipe)) 4ddc6: 42a7 clrl %sp@- 4ddc8: 2f2a 0030 movel %a2@(48),%sp@- 4ddcc: 4e95 jsr %a5@ 4ddce: 4fef 000c lea %sp@(12),%sp 4ddd2: 4a80 tstl %d0 4ddd4: 6638 bnes 4de0e <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 4ddd6: 42a7 clrl %sp@- 4ddd8: 42a7 clrl %sp@- 4ddda: 2f2a 0028 movel %a2@(40),%sp@- 4ddde: 4e93 jsr %a3@ 4dde0: 4fef 000c lea %sp@(12),%sp 4dde4: 4a80 tstl %d0 4dde6: 6626 bnes 4de0e <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 4dde8: b4aa 0020 cmpl %a2@(32),%d2 4ddec: 67d2 beqs 4ddc0 <== NEVER TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4ddee: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4ddf2: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4ddf4: 4e94 jsr %a4@ return 0; 4ddf6: 588f addql #4,%sp 4ddf8: 6000 fdc2 braw 4dbbc case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4ddfc: 486e fff8 pea %fp@(-8) 4de00: 2f2a 002c movel %a2@(44),%sp@- 4de04: 4eb9 0004 f698 jsr 4f698 4de0a: 508f addql #8,%sp 4de0c: 6094 bras 4dda2 PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4de0e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) break; prevCounter = pipe->writerCounter; err = -EINTR; 4de12: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4de16: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4de1a: 4eb9 0004 d898 jsr 4d898 <== NOT EXECUTED return err; 4de20: 508f addql #8,%sp <== NOT EXECUTED } 4de22: 200a movel %a2,%d0 4de24: 4cee 3c04 ffe4 moveml %fp@(-28),%d2/%a2-%a5 4de2a: 4e5e unlk %fp 4de2c: 4e75 rts if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4de2e: 2f2a 0028 movel %a2@(40),%sp@- err = -ENXIO; 4de32: 347c fffa moveaw #-6,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4de36: 4e94 jsr %a4@ err = -ENXIO; goto out_error; 4de38: 588f addql #4,%sp PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4de3a: 2f2e 000c movel %fp@(12),%sp@- 4de3e: 2f2e 0008 movel %fp@(8),%sp@- 4de42: 4eb9 0004 d898 jsr 4d898 return err; 4de48: 508f addql #8,%sp 4de4a: 60d6 bras 4de22 =============================================================================== 00048794 : */ long fpathconf( int fd, int name ) { 48794: 4e56 0000 linkw %fp,#0 48798: 202e 0008 movel %fp@(8),%d0 4879c: 222e 000c movel %fp@(12),%d1 487a0: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 487a2: b0b9 0005 e454 cmpl 5e454 ,%d0 487a8: 6400 00f4 bccw 4889e iop = rtems_libio_iop(fd); 487ac: 2400 movel %d0,%d2 <== NOT EXECUTED 487ae: ed88 lsll #6,%d0 <== NOT EXECUTED 487b0: e98a lsll #4,%d2 <== NOT EXECUTED 487b2: 2079 0005 f4d8 moveal 5f4d8 ,%a0 <== NOT EXECUTED 487b8: 9082 subl %d2,%d0 <== NOT EXECUTED 487ba: d1c0 addal %d0,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 487bc: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 487c0: 0280 0000 0100 andil #256,%d0 <== NOT EXECUTED 487c6: 6700 00d6 beqw 4889e <== NOT EXECUTED /* * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; 487ca: 2068 0024 moveal %a0@(36),%a0 <== NOT EXECUTED switch ( name ) { 487ce: 700b moveq #11,%d0 <== NOT EXECUTED /* * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; 487d0: 2068 002a moveal %a0@(42),%a0 <== NOT EXECUTED switch ( name ) { 487d4: b081 cmpl %d1,%d0 <== NOT EXECUTED 487d6: 6416 bccs 487ee <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 487d8: 4eb9 0004 b040 jsr 4b040 <__errno> <== NOT EXECUTED break; } return return_value; } 487de: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 487e2: 2040 moveal %d0,%a0 <== NOT EXECUTED 487e4: 7216 moveq #22,%d1 <== NOT EXECUTED 487e6: 70ff moveq #-1,%d0 <== NOT EXECUTED break; } return return_value; } 487e8: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 487ea: 2081 movel %d1,%a0@ <== NOT EXECUTED break; } return return_value; } 487ec: 4e75 rts <== NOT EXECUTED * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 487ee: 303b 1a08 movew %pc@(487f8 ,%d1:l:2),%d0<== NOT EXECUTED 487f2: 48c0 extl %d0 <== NOT EXECUTED 487f4: 4efb 0802 jmp %pc@(487f8 ,%d0:l) <== NOT EXECUTED 487f8: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 487fe: 006c .short 0x006c <== NOT EXECUTED 48800: 0060 .short 0x0060 <== NOT EXECUTED 48802: 0054 .short 0x0054 <== NOT EXECUTED 48804: 0048 .short 0x0048 <== NOT EXECUTED 48806: 003c .short 0x003c <== NOT EXECUTED 48808: 0030 .short 0x0030 <== NOT EXECUTED 4880a: 0024 .short 0x0024 <== NOT EXECUTED 4880c: 0018 .short 0x0018 <== NOT EXECUTED 4880e: 009a 242e fffc oril #607059964,%d2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48814: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 48816: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 4881a: 4e75 rts <== NOT EXECUTED 4881c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48820: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 48822: 2028 0018 movel %a0@(24),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48826: 4e75 rts <== NOT EXECUTED 48828: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4882c: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 4882e: 2028 002c movel %a0@(44),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48832: 4e75 rts <== NOT EXECUTED 48834: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48838: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 4883a: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 4883e: 4e75 rts <== NOT EXECUTED 48840: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48844: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 48846: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 4884a: 4e75 rts <== NOT EXECUTED 4884c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48850: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 48852: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48856: 4e75 rts <== NOT EXECUTED 48858: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4885c: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 4885e: 2028 0010 movel %a0@(16),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48862: 4e75 rts <== NOT EXECUTED 48864: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48868: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 4886a: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 4886e: 4e75 rts <== NOT EXECUTED 48870: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48874: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 48876: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 4887a: 4e75 rts <== NOT EXECUTED 4887c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48880: 4e5e unlk %fp <== NOT EXECUTED switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 48882: 2028 0004 movel %a0@(4),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48886: 4e75 rts <== NOT EXECUTED 48888: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4888c: 4e5e unlk %fp <== NOT EXECUTED the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 4888e: 2010 movel %a0@,%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48890: 4e75 rts <== NOT EXECUTED 48892: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48896: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 48898: 2028 0028 movel %a0@(40),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 4889c: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 4889e: 4eb9 0004 b040 jsr 4b040 <__errno> 488a4: 7409 moveq #9,%d2 488a6: 2040 moveal %d0,%a0 488a8: 70ff moveq #-1,%d0 488aa: 2082 movel %d2,%a0@ rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 488ac: 242e fffc movel %fp@(-4),%d2 488b0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000430cc : #include void free( void *ptr ) { 430cc: 4e56 0000 linkw %fp,#0 MSBUMP(free_calls, 1); 430d0: 52b9 0006 0ee8 addql #1,60ee8 #include void free( void *ptr ) { 430d6: 2f02 movel %d2,%sp@- 430d8: 242e 0008 movel %fp@(8),%d2 MSBUMP(free_calls, 1); if ( !ptr ) 430dc: 6732 beqs 43110 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 430de: 7003 moveq #3,%d0 430e0: b0b9 0006 141a cmpl 6141a <_System_state_Current>,%d0 430e6: 6758 beqs 43140 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 430e8: 2079 0005 fea0 moveal 5fea0 ,%a0 430ee: 4a88 tstl %a0 430f0: 670a beqs 430fc (*rtems_malloc_statistics_helpers->at_free)(ptr); 430f2: 2f02 movel %d2,%sp@- 430f4: 2068 0008 moveal %a0@(8),%a0 430f8: 4e90 jsr %a0@ 430fa: 588f addql #4,%sp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 430fc: 2f02 movel %d2,%sp@- 430fe: 2f39 0005 f76c movel 5f76c ,%sp@- 43104: 4eb9 0004 9240 jsr 49240 <_Protected_heap_Free> 4310a: 508f addql #8,%sp 4310c: 4a00 tstb %d0 4310e: 6708 beqs 43118 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 43110: 242e fffc movel %fp@(-4),%d2 43114: 4e5e unlk %fp 43116: 4e75 rts if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 43118: 2079 0005 f76c moveal 5f76c ,%a0 */ 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", 4311e: 2f28 001c movel %a0@(28),%sp@- 43122: 2f28 0018 movel %a0@(24),%sp@- 43126: 2f02 movel %d2,%sp@- 43128: 4879 0005 e5a4 pea 5e5a4 4312e: 4eb9 0004 3f4c jsr 43f4c RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 43134: 242e fffc movel %fp@(-4),%d2 */ 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", 43138: 4fef 0010 lea %sp@(16),%sp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4313c: 4e5e unlk %fp 4313e: 4e75 rts /* * 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() ) { 43140: 4eb9 0004 32b8 jsr 432b8 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 43146: 4a00 tstb %d0 43148: 669e bnes 430e8 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4314a: 2d42 0008 movel %d2,%fp@(8) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4314e: 242e fffc movel %fp@(-4),%d2 43152: 4e5e unlk %fp /* * 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); 43154: 4ef9 0004 331a jmp 4331a ... =============================================================================== 0005cb88 : int fstat( int fd, struct stat *sbuf ) { 5cb88: 4e56 0000 linkw %fp,#0 5cb8c: 202e 0008 movel %fp@(8),%d0 5cb90: 2f0a movel %a2,%sp@- 5cb92: 2f02 movel %d2,%sp@- 5cb94: 242e 000c movel %fp@(12),%d2 rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 5cb98: 6770 beqs 5cc0a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 5cb9a: b0b9 0005 f7b0 cmpl 5f7b0 ,%d0 5cba0: 644e bccs 5cbf0 5cba2: 2200 movel %d0,%d1 5cba4: ed88 lsll #6,%d0 5cba6: e989 lsll #4,%d1 5cba8: 2479 0006 0ed0 moveal 60ed0 ,%a2 5cbae: 9081 subl %d1,%d0 5cbb0: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5cbb2: 202a 000c movel %a2@(12),%d0 5cbb6: 0280 0000 0100 andil #256,%d0 5cbbc: 6732 beqs 5cbf0 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 5cbbe: 4878 0046 pea 46 5cbc2: 42a7 clrl %sp@- 5cbc4: 2f02 movel %d2,%sp@- 5cbc6: 4eb9 0004 f8b4 jsr 4f8b4 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 5cbcc: 206a 0020 moveal %a2@(32),%a0 5cbd0: 45ea 0010 lea %a2@(16),%a2 5cbd4: 4fef 000c lea %sp@(12),%sp 5cbd8: 2d4a 0008 movel %a2,%fp@(8) } 5cbdc: 246e fffc moveal %fp@(-4),%a2 * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 5cbe0: 2d42 000c movel %d2,%fp@(12) } 5cbe4: 242e fff8 movel %fp@(-8),%d2 5cbe8: 4e5e unlk %fp * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 5cbea: 2268 0018 moveal %a0@(24),%a1 5cbee: 4ed1 jmp %a1@ /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5cbf0: 4eb9 0004 f024 jsr 4f024 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5cbf6: 242e fff8 movel %fp@(-8),%d2 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5cbfa: 2040 moveal %d0,%a0 5cbfc: 7009 moveq #9,%d0 * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5cbfe: 246e fffc moveal %fp@(-4),%a2 5cc02: 4e5e unlk %fp /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5cc04: 2080 movel %d0,%a0@ * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5cc06: 70ff moveq #-1,%d0 5cc08: 4e75 rts /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5cc0a: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5cc10: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5cc14: 2040 moveal %d0,%a0 <== NOT EXECUTED 5cc16: 720e moveq #14,%d1 <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5cc18: 70ff moveq #-1,%d0 <== NOT EXECUTED 5cc1a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5cc1e: 4e5e unlk %fp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5cc20: 2081 movel %d1,%a0@ <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } =============================================================================== 00043224 : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 43224: 4e56 0000 linkw %fp,#0 43228: 202e 0008 movel %fp@(8),%d0 4322c: 2f02 movel %d2,%sp@- 4322e: 206e 000c moveal %fp@(12),%a0 43232: 142e 0013 moveb %fp@(19),%d2 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 43236: b0b9 0006 4c02 cmpl 64c02 ,%d0 4323c: 6436 bccs 43274 <== NEVER TAKEN 4323e: 2239 0006 4c06 movel 64c06 ,%d1 43244: 672e beqs 43274 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 43246: 2241 moveal %d1,%a1 43248: e788 lsll #3,%d0 4324a: d3c0 addal %d0,%a1 if (minor < dtab->size && dtab->minor != NULL) { 4324c: b1e9 0004 cmpal %a1@(4),%a0 43250: 6422 bccs 43274 <== NEVER TAKEN 43252: 2251 moveal %a1@,%a1 43254: 4a89 tstl %a1 43256: 671c beqs 43274 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 43258: 2031 8c00 movel %a1@(00000000,%a0:l:4),%d0 if (dd != NULL && !lookup_only) { 4325c: 6710 beqs 4326e 4325e: 4a02 tstb %d2 43260: 660c bnes 4326e if (!dd->deleted) { 43262: 2040 moveal %d0,%a0 43264: 4a28 0040 tstb %a0@(64) 43268: 660a bnes 43274 ++dd->uses; 4326a: 52a8 0014 addql #1,%a0@(20) return dd; } } return NULL; } 4326e: 241f movel %sp@+,%d2 43270: 4e5e unlk %fp 43272: 4e75 rts 43274: 241f movel %sp@+,%d2 return dd; } } return NULL; 43276: 4280 clrl %d0 } 43278: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000442ba : * NOTES: * get_sector() operates with device via bdbuf library, * and does not support devices with sector size other than 512 bytes */ static rtems_status_code get_sector(int fd, 442ba: 4e56 0000 linkw %fp,#0 442be: 2f0a movel %a2,%sp@- new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); 442c0: 4878 0204 pea 204 442c4: 4eb9 0004 594c jsr 4594c if (s == NULL) 442ca: 588f addql #4,%sp new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); 442cc: 2440 moveal %d0,%a2 if (s == NULL) 442ce: 4a80 tstl %d0 442d0: 6732 beqs 44304 <== NEVER TAKEN { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); 442d2: 4878 0200 pea 200 442d6: 486a 0004 pea %a2@(4) 442da: 2f2e 0008 movel %fp@(8),%sp@- 442de: 4eb9 0004 64e4 jsr 464e4 if (n != RTEMS_IDE_SECTOR_SIZE) 442e4: 4fef 000c lea %sp@(12),%sp 442e8: 0c80 0000 0200 cmpil #512,%d0 442ee: 671e beqs 4430e <== ALWAYS TAKEN { free(s); 442f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442f2: 4eb9 0004 5344 jsr 45344 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } 442f8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); if (n != RTEMS_IDE_SECTOR_SIZE) { free(s); 442fc: 588f addql #4,%sp <== NOT EXECUTED return RTEMS_IO_ERROR; 442fe: 701b moveq #27,%d0 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } 44300: 4e5e unlk %fp <== NOT EXECUTED 44302: 4e75 rts <== NOT EXECUTED 44304: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); if (s == NULL) { return RTEMS_NO_MEMORY; 44308: 701a moveq #26,%d0 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } 4430a: 4e5e unlk %fp <== NOT EXECUTED 4430c: 4e75 rts <== NOT EXECUTED { free(s); return RTEMS_IO_ERROR; } s->sector_num = sector_num; 4430e: 24ae 000c movel %fp@(12),%a2@ *sector = s; return RTEMS_SUCCESSFUL; 44312: 4280 clrl %d0 return RTEMS_IO_ERROR; } s->sector_num = sector_num; *sector = s; 44314: 206e 0010 moveal %fp@(16),%a0 44318: 208a movel %a2,%a0@ return RTEMS_SUCCESSFUL; } 4431a: 246e fffc moveal %fp@(-4),%a2 4431e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0006fd80 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 6fd80: 4e56 fff4 linkw %fp,#-12 6fd84: 202e 0008 movel %fp@(8),%d0 6fd88: 48d7 040c moveml %d2-%d3/%a2,%sp@ 6fd8c: 242e 000c movel %fp@(12),%d2 6fd90: 262e 0010 movel %fp@(16),%d3 rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 6fd94: b0b9 0007 56a8 cmpl 756a8 ,%d0 6fd9a: 643e bccs 6fdda <== NEVER TAKEN 6fd9c: 2200 movel %d0,%d1 6fd9e: ed88 lsll #6,%d0 6fda0: e989 lsll #4,%d1 6fda2: 2479 0008 6f20 moveal 86f20 ,%a2 6fda8: 9081 subl %d1,%d0 6fdaa: d5c0 addal %d0,%a2 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 6fdac: 486a 0010 pea %a2@(16) 6fdb0: 4eb9 0004 9578 jsr 49578 if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 6fdb6: 588f addql #4,%sp 6fdb8: 4a80 tstl %d0 6fdba: 6622 bnes 6fdde /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 6fdbc: 206a 0020 moveal %a2@(32),%a0 6fdc0: 2d43 0010 movel %d3,%fp@(16) 6fdc4: 2d42 000c movel %d2,%fp@(12) 6fdc8: 2d4a 0008 movel %a2,%fp@(8) 6fdcc: 2268 0008 moveal %a0@(8),%a1 } 6fdd0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 6fdd6: 4e5e unlk %fp /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 6fdd8: 4ed1 jmp %a1@ rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 6fdda: 95ca subal %a2,%a2 <== NOT EXECUTED 6fddc: 60ce bras 6fdac <== NOT EXECUTED /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); if ( type != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 6fdde: 4eb9 0006 138c jsr 6138c <__errno> 6fde4: 2040 moveal %d0,%a0 6fde6: 7014 moveq #20,%d0 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); } 6fde8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); if ( type != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 6fdee: 2080 movel %d0,%a0@ /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); } 6fdf0: 70ff moveq #-1,%d0 6fdf2: 4e5e unlk %fp ... =============================================================================== 0006549c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 6549c: 4e56 ffe4 linkw %fp,#-28 654a0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 654a4: 242e 0008 movel %fp@(8),%d2 654a8: 47fa fd1e lea %pc@(651c8 ),%a3 for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(pwd->pw_name, name) == 0); 654ac: 49f9 0007 e12c lea 7e12c ,%a4 struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 654b2: 246e 0010 moveal %fp@(16),%a2 654b6: 2a2e 0014 movel %fp@(20),%d5 654ba: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 654be: 4eb9 0006 52c0 jsr 652c0 if ((fp = fopen("/etc/passwd", "r")) == NULL) 654c4: 4879 0009 4c88 pea 94c88 654ca: 4879 0009 842b pea 9842b 654d0: 4eb9 0007 901a jsr 7901a 654d6: 508f addql #8,%sp 654d8: 2600 movel %d0,%d3 654da: 677a beqs 65556 rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) 654dc: 2f04 movel %d4,%sp@- 654de: 2f05 movel %d5,%sp@- 654e0: 2f0a movel %a2,%sp@- 654e2: 2f03 movel %d3,%sp@- 654e4: 4e93 jsr %a3@ 654e6: 4fef 0010 lea %sp@(16),%sp 654ea: 4a80 tstl %d0 654ec: 6746 beqs 65534 goto error_einval; if (name) { 654ee: 4a82 tstl %d2 654f0: 672e beqs 65520 match = (strcmp(pwd->pw_name, name) == 0); 654f2: 2f02 movel %d2,%sp@- 654f4: 2f12 movel %a2@,%sp@- 654f6: 4e94 jsr %a4@ 654f8: 508f addql #8,%sp 654fa: 4a80 tstl %d0 654fc: 57c1 seq %d1 654fe: 49c1 extbl %d1 65500: 4481 negl %d1 } else { match = (pwd->pw_uid == uid); } if (match) { 65502: 67d8 beqs 654dc <== NEVER TAKEN fclose(fp); 65504: 2f03 movel %d3,%sp@- 65506: 4eb9 0007 877c jsr 7877c *result = pwd; 6550c: 206e 001c moveal %fp@(28),%a0 return 0; 65510: 588f addql #4,%sp 65512: 4280 clrl %d0 match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 65514: 208a movel %a2,%a0@ } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 65516: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 6551c: 4e5e unlk %fp 6551e: 4e75 rts goto error_einval; if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 65520: 4280 clrl %d0 65522: 302a 0008 movew %a2@(8),%d0 65526: b0ae 000c cmpl %fp@(12),%d0 6552a: 57c1 seq %d1 6552c: 49c1 extbl %d1 6552e: 4481 negl %d1 } if (match) { 65530: 67aa beqs 654dc 65532: 60d0 bras 65504 *result = pwd; return 0; } } error_einval: fclose(fp); 65534: 2f03 movel %d3,%sp@- rtems_set_errno_and_return_minus_one( EINVAL ); 65536: 7616 moveq #22,%d3 *result = pwd; return 0; } } error_einval: fclose(fp); 65538: 4eb9 0007 877c jsr 7877c rtems_set_errno_and_return_minus_one( EINVAL ); 6553e: 4eb9 0007 8640 jsr 78640 <__errno> 65544: 588f addql #4,%sp 65546: 2040 moveal %d0,%a0 65548: 70ff moveq #-1,%d0 6554a: 2083 movel %d3,%a0@ } 6554c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 65552: 4e5e unlk %fp 65554: 4e75 rts int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 65556: 4eb9 0007 8640 jsr 78640 <__errno> 6555c: 7816 moveq #22,%d4 6555e: 2040 moveal %d0,%a0 65560: 70ff moveq #-1,%d0 65562: 2084 movel %d4,%a0@ } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 65564: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 6556a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045e34 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 45e34: 4e56 fff0 linkw %fp,#-16 45e38: 222e 0008 movel %fp@(8),%d1 45e3c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 45e40: 246e 000c moveal %fp@(12),%a2 if (tty->termios.c_iflag & ISTRIP) 45e44: 202a 0030 movel %a2@(48),%d0 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 45e48: 1401 moveb %d1,%d2 if (tty->termios.c_iflag & ISTRIP) 45e4a: 0800 0005 btst #5,%d0 45e4e: 6704 beqs 45e54 <== ALWAYS TAKEN c &= 0x7f; 45e50: 747f moveq #127,%d2 <== NOT EXECUTED 45e52: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 45e54: 0800 0009 btst #9,%d0 45e58: 671e beqs 45e78 c = tolower (c); 45e5a: 2079 0005 f968 moveal 5f968 <__ctype_ptr__>,%a0 45e60: 7603 moveq #3,%d3 45e62: 0282 0000 00ff andil #255,%d2 45e68: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 45e6c: c283 andl %d3,%d1 45e6e: 163c 0001 moveb #1,%d3 45e72: b681 cmpl %d1,%d3 45e74: 6700 00ee beqw 45f64 if (c == '\r') { 45e78: 4281 clrl %d1 45e7a: 1202 moveb %d2,%d1 45e7c: 760d moveq #13,%d3 45e7e: b681 cmpl %d1,%d3 45e80: 675c beqs 45ede if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 45e82: 760a moveq #10,%d3 45e84: b681 cmpl %d1,%d3 45e86: 6700 00d2 beqw 45f5a c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 45e8a: 4a02 tstb %d2 45e8c: 665c bnes 45eea <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 45e8e: 2039 0005 f7f4 movel 5f7f4 ,%d0 45e94: 5380 subql #1,%d0 45e96: 222a 0020 movel %a2@(32),%d1 45e9a: b081 cmpl %d1,%d0 45e9c: 6334 blss 45ed2 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 45e9e: 7008 moveq #8,%d0 45ea0: c0aa 003c andl %a2@(60),%d0 45ea4: 6600 00c8 bnew 45f6e echo (c, tty); tty->cbuf[tty->ccount++] = c; 45ea8: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED } return 0; 45eac: 4280 clrl %d0 <== 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; 45eae: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45eb2: 5281 addql #1,%d1 <== NOT EXECUTED 45eb4: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED } return 0; } 45eb8: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 45ebe: 4e5e unlk %fp 45ec0: 4e75 rts * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 45ec2: 4aaa 0020 tstl %a2@(32) 45ec6: 670a beqs 45ed2 45ec8: 42a7 clrl %sp@- 45eca: 2f0a movel %a2,%sp@- 45ecc: 4eba fdc4 jsr %pc@(45c92 ) 45ed0: 508f addql #8,%sp } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; 45ed2: 4280 clrl %d0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45ed4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 45eda: 4e5e unlk %fp 45edc: 4e75 rts if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 45ede: 4a00 tstb %d0 45ee0: 6df0 blts 45ed2 <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) 45ee2: 0800 0008 btst #8,%d0 45ee6: 6702 beqs 45eea <== NEVER TAKEN c = '\n'; 45ee8: 740a moveq #10,%d2 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 45eea: 222a 003c movel %a2@(60),%d1 45eee: 0801 0001 btst #1,%d1 45ef2: 679a beqs 45e8e if (c == tty->termios.c_cc[VERASE]) { 45ef4: 4283 clrl %d3 45ef6: 162a 0043 moveb %a2@(67),%d3 45efa: 4280 clrl %d0 45efc: 1002 moveb %d2,%d0 45efe: b083 cmpl %d3,%d0 45f00: 67c0 beqs 45ec2 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 45f02: 4283 clrl %d3 45f04: 162a 0044 moveb %a2@(68),%d3 45f08: b083 cmpl %d3,%d0 45f0a: 6700 00a8 beqw 45fb4 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 45f0e: 4283 clrl %d3 45f10: 162a 0045 moveb %a2@(69),%d3 45f14: b083 cmpl %d3,%d0 45f16: 6700 0110 beqw 46028 return 1; } else if (c == '\n') { 45f1a: 760a moveq #10,%d3 45f1c: b680 cmpl %d0,%d3 45f1e: 6700 00be beqw 45fde if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 45f22: 4283 clrl %d3 45f24: 162a 004c moveb %a2@(76),%d3 45f28: b083 cmpl %d3,%d0 45f2a: 670c beqs 45f38 <== NEVER TAKEN 45f2c: 4283 clrl %d3 45f2e: 162a 0051 moveb %a2@(81),%d3 45f32: b083 cmpl %d3,%d0 45f34: 6600 ff58 bnew 45e8e (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 45f38: 44c1 movew %d1,%ccr <== NOT EXECUTED 45f3a: 6b58 bmis 45f94 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 45f3c: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; 45f40: 7001 moveq #1,%d0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45f42: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45f46: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45f4a: 5281 addql #1,%d1 <== NOT EXECUTED 45f4c: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45f50: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 45f56: 4e5e unlk %fp <== NOT EXECUTED 45f58: 4e75 rts <== NOT EXECUTED if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 45f5a: 0800 0006 btst #6,%d0 45f5e: 678a beqs 45eea <== ALWAYS TAKEN c = '\r'; 45f60: 740d moveq #13,%d2 <== NOT EXECUTED 45f62: 6086 bras 45eea <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 45f64: 0682 0000 0020 addil #32,%d2 45f6a: 6000 ff0c braw 45e78 /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 45f6e: 2f0a movel %a2,%sp@- 45f70: 4280 clrl %d0 45f72: 1002 moveb %d2,%d0 45f74: 2f00 movel %d0,%sp@- 45f76: 4eba fc90 jsr %pc@(45c08 ) 45f7a: 222a 0020 movel %a2@(32),%d1 45f7e: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; } return 0; 45f80: 4280 clrl %d0 * 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; 45f82: 206a 001c moveal %a2@(28),%a0 45f86: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 45f8a: 5281 addql #1,%d1 45f8c: 2541 0020 movel %d1,%a2@(32) 45f90: 6000 ff26 braw 45eb8 tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 45f94: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45f96: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45f98: 4eba fc6e jsr %pc@(45c08 ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 45f9c: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 45fa0: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; 45fa2: 7001 moveq #1,%d0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45fa4: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45fa8: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45fac: 5281 addql #1,%d1 <== NOT EXECUTED 45fae: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 45fb2: 609c bras 45f50 <== NOT EXECUTED * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 45fb4: 4aaa 0020 tstl %a2@(32) 45fb8: 6700 ff18 beqw 45ed2 return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 45fbc: 44c1 movew %d1,%ccr 45fbe: 6a74 bpls 46034 <== NEVER TAKEN tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 45fc0: 0801 0004 btst #4,%d1 45fc4: 677e beqs 46044 <== NEVER TAKEN 45fc6: 4878 0001 pea 1 45fca: 2f0a movel %a2,%sp@- 45fcc: 4eba fcc4 jsr %pc@(45c92 ) 45fd0: 508f addql #8,%sp erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; 45fd2: 4280 clrl %d0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45fd4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 45fda: 4e5e unlk %fp 45fdc: 4e75 rts return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 45fde: 7048 moveq #72,%d0 45fe0: c280 andl %d0,%d1 45fe2: 6620 bnes 46004 <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; 45fe4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; 45fe8: 7001 moveq #1,%d0 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45fea: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45fee: 740a moveq #10,%d2 <== NOT EXECUTED 45ff0: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45ff4: 5281 addql #1,%d1 <== NOT EXECUTED 45ff6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45ffa: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46000: 4e5e unlk %fp 46002: 4e75 rts } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 46004: 2f0a movel %a2,%sp@- 46006: 4878 000a pea a tty->cbuf[tty->ccount++] = c; 4600a: 740a moveq #10,%d2 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 4600c: 4eba fbfa jsr %pc@(45c08 ) tty->cbuf[tty->ccount++] = c; 46010: 222a 0020 movel %a2@(32),%d1 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 46014: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; return 1; 46016: 7001 moveq #1,%d0 else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 46018: 206a 001c moveal %a2@(28),%a0 4601c: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 46020: 5281 addql #1,%d1 46022: 2541 0020 movel %d1,%a2@(32) 46026: 60d2 bras 45ffa else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 46028: 7001 moveq #1,%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4602a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 46030: 4e5e unlk %fp <== NOT EXECUTED 46032: 4e75 rts <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 46034: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; 46038: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4603a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 46040: 4e5e unlk %fp <== NOT EXECUTED 46042: 4e75 rts <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 46044: 2f0a movel %a2,%sp@- <== NOT EXECUTED 46046: 47fa fbc0 lea %pc@(45c08 ),%a3 <== NOT EXECUTED 4604a: 2f03 movel %d3,%sp@- <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 4604c: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 46050: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 46052: 508f addql #8,%sp <== NOT EXECUTED 46054: 7020 moveq #32,%d0 <== NOT EXECUTED 46056: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 4605a: 6700 fe76 beqw 45ed2 <== NOT EXECUTED echo ('\n', tty); 4605e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 46060: 4878 000a pea a <== NOT EXECUTED 46064: 4e93 jsr %a3@ <== NOT EXECUTED 46066: 508f addql #8,%sp <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; 46068: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4606a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 46070: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005d020 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 5d020: 4e56 ffd0 linkw %fp,#-48 5d024: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 5d028: 262e 000c movel %fp@(12),%d3 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 5d02c: 4eb9 0005 cc40 jsr 5cc40 5d032: b0ae 0008 cmpl %fp@(8),%d0 5d036: 6600 0202 bnew 5d23a rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 5d03a: 4a83 tstl %d3 5d03c: 6700 0214 beqw 5d252 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 5d040: 2003 movel %d3,%d0 5d042: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 5d044: 721f moveq #31,%d1 5d046: b280 cmpl %d0,%d1 5d048: 6500 0208 bcsw 5d252 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 5d04c: 2203 movel %d3,%d1 5d04e: 2803 movel %d3,%d4 5d050: 7e01 moveq #1,%d7 5d052: e589 lsll #2,%d1 5d054: e98c lsll #4,%d4 5d056: 9881 subl %d1,%d4 5d058: 2044 moveal %d4,%a0 5d05a: d1fc 0006 1470 addal #398448,%a0 5d060: be90 cmpl %a0@,%d7 5d062: 6700 01c2 beqw 5d226 /* * 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 ) ) 5d066: 7208 moveq #8,%d1 5d068: b283 cmpl %d3,%d1 5d06a: 6700 015c beqw 5d1c8 5d06e: 1e3c 0004 moveb #4,%d7 5d072: be83 cmpl %d3,%d7 5d074: 6700 0152 beqw 5d1c8 5d078: 123c 000b moveb #11,%d1 5d07c: b283 cmpl %d3,%d1 5d07e: 6700 0148 beqw 5d1c8 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 5d082: 7401 moveq #1,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 5d084: 7e01 moveq #1,%d7 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 5d086: 2d43 fff4 movel %d3,%fp@(-12) 5d08a: e1aa lsll %d0,%d2 siginfo->si_code = SI_USER; 5d08c: 2d47 fff8 movel %d7,%fp@(-8) if ( !value ) { 5d090: 4aae 0010 tstl %fp@(16) 5d094: 6700 019c beqw 5d232 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 5d098: 206e 0010 moveal %fp@(16),%a0 5d09c: 2d50 fffc movel %a0@,%fp@(-4) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 5d0a0: 2039 0006 0fe6 movel 60fe6 <_Thread_Dispatch_disable_level>,%d0 ++level; 5d0a6: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 5d0a8: 23c0 0006 0fe6 movel %d0,60fe6 <_Thread_Dispatch_disable_level> */ void _POSIX_signals_Manager_Initialization(void); static inline void _POSIX_signals_Add_post_switch_extension(void) { _API_extensions_Add_post_switch( &_POSIX_signals_Post_switch ); 5d0ae: 4879 0005 f8b4 pea 5f8b4 <_POSIX_signals_Post_switch> 5d0b4: 4eb9 0004 7e3a jsr 47e3a <_API_extensions_Add_post_switch> /* * 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; 5d0ba: 2079 0006 142e moveal 6142e <_Per_CPU_Information+0xe>,%a0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 5d0c0: 588f addql #4,%sp 5d0c2: 2268 00fe moveal %a0@(254),%a1 5d0c6: 2029 00d0 movel %a1@(208),%d0 5d0ca: 4680 notl %d0 5d0cc: c082 andl %d2,%d0 5d0ce: 6600 00b8 bnew 5d188 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 5d0d2: 2079 0006 15f4 moveal 615f4 <_POSIX_signals_Wait_queue>,%a0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 5d0d8: b1fc 0006 15f8 cmpal #398840,%a0 5d0de: 6724 beqs 5d104 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5d0e0: 2002 movel %d2,%d0 5d0e2: c0a8 0030 andl %a0@(48),%d0 for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5d0e6: 2268 00fe moveal %a0@(254),%a1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5d0ea: 6600 009c bnew 5d188 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 5d0ee: 2029 00d0 movel %a1@(208),%d0 5d0f2: 4680 notl %d0 5d0f4: c082 andl %d2,%d0 5d0f6: 6600 0090 bnew 5d188 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 5d0fa: 2050 moveal %a0@,%a0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 5d0fc: b1fc 0006 15f8 cmpal #398840,%a0 5d102: 66dc bnes 5d0e0 <== NEVER TAKEN * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 5d104: 4285 clrl %d5 5d106: 1a39 0005 f6ec moveb 5f6ec ,%d5 5d10c: 47f9 0006 0faa lea 60faa <_Objects_Information_table+0x8>,%a3 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 5d112: 91c8 subal %a0,%a0 interested_priority = PRIORITY_MAXIMUM + 1; 5d114: 5285 addql #1,%d5 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 5d116: 225b moveal %a3@+,%a1 5d118: 4a89 tstl %a1 5d11a: 6760 beqs 5d17c <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 5d11c: 2269 0004 moveal %a1@(4),%a1 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 5d120: 4286 clrl %d6 5d122: 3c29 000e movew %a1@(14),%d6 object_table = the_info->local_table; 5d126: 2469 0018 moveal %a1@(24),%a2 for ( index = 1 ; index <= maximum ; index++ ) { 5d12a: 4a86 tstl %d6 5d12c: 674e beqs 5d17c */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 5d12e: 588a addql #4,%a2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5d130: 7001 moveq #1,%d0 the_thread = (Thread_Control *) object_table[ index ]; 5d132: 225a moveal %a2@+,%a1 if ( !the_thread ) 5d134: 4a89 tstl %a1 5d136: 673e beqs 5d176 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 5d138: 2229 0014 movel %a1@(20),%d1 5d13c: ba81 cmpl %d1,%d5 5d13e: 6536 bcss 5d176 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 5d140: 2869 00fe moveal %a1@(254),%a4 5d144: 2e2c 00d0 movel %a4@(208),%d7 5d148: 4687 notl %d7 5d14a: ce82 andl %d2,%d7 5d14c: 6728 beqs 5d176 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 5d14e: ba81 cmpl %d1,%d5 5d150: 6220 bhis 5d172 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 5d152: 4a88 tstl %a0 5d154: 6720 beqs 5d176 <== NEVER TAKEN 5d156: 2e28 0010 movel %a0@(16),%d7 5d15a: 671a beqs 5d176 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5d15c: 2869 0010 moveal %a1@(16),%a4 5d160: 4a8c tstl %a4 5d162: 670e beqs 5d172 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 5d164: 0807 001c btst #28,%d7 5d168: 660c bnes 5d176 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 5d16a: 2e0c movel %a4,%d7 5d16c: 0807 001c btst #28,%d7 5d170: 6704 beqs 5d176 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5d172: 2a01 movel %d1,%d5 5d174: 2049 moveal %a1,%a0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5d176: 5280 addql #1,%d0 5d178: b086 cmpl %d6,%d0 5d17a: 63b6 blss 5d132 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 5d17c: b7fc 0006 0fb2 cmpal #397234,%a3 5d182: 6692 bnes 5d116 } } } } if ( interested ) { 5d184: 4a88 tstl %a0 5d186: 6716 beqs 5d19e /* * 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 ) ) { 5d188: 486e fff4 pea %fp@(-12) 5d18c: 2f03 movel %d3,%sp@- 5d18e: 2f08 movel %a0,%sp@- 5d190: 4eb9 0005 d2a8 jsr 5d2a8 <_POSIX_signals_Unblock_thread> 5d196: 4fef 000c lea %sp@(12),%sp 5d19a: 4a00 tstb %d0 5d19c: 6618 bnes 5d1b6 /* * 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 ); 5d19e: 2f02 movel %d2,%sp@- 5d1a0: 4eb9 0005 d288 jsr 5d288 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 5d1a6: 588f addql #4,%sp 5d1a8: 41f9 0006 1468 lea 61468 <_POSIX_signals_Vectors>,%a0 5d1ae: 7002 moveq #2,%d0 5d1b0: b0b0 4800 cmpl %a0@(00000000,%d4:l),%d0 5d1b4: 672e beqs 5d1e4 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); 5d1b6: 4eb9 0004 9cd0 jsr 49cd0 <_Thread_Enable_dispatch> return 0; 5d1bc: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d1be: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 5d1c4: 4e5e unlk %fp 5d1c6: 4e75 rts * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 5d1c8: 4eb9 0005 d4b0 jsr 5d4b0 5d1ce: 2f03 movel %d3,%sp@- 5d1d0: 2f00 movel %d0,%sp@- 5d1d2: 4eb9 0005 d3d4 jsr 5d3d4 5d1d8: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d1da: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 5d1e0: 4e5e unlk %fp 5d1e2: 4e75 rts */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 5d1e4: 4879 0006 15e8 pea 615e8 <_POSIX_signals_Inactive_siginfo> 5d1ea: 4eb9 0004 7fcc jsr 47fcc <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 5d1f0: 588f addql #4,%sp */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 5d1f2: 2040 moveal %d0,%a0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 5d1f4: 4a80 tstl %d0 5d1f6: 6772 beqs 5d26a _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 5d1f8: 216e fff4 0008 movel %fp@(-12),%a0@(8) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 5d1fe: 0684 0006 1660 addil #398944,%d4 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 5d204: 216e fff8 000c movel %fp@(-8),%a0@(12) 5d20a: 216e fffc 0010 movel %fp@(-4),%a0@(16) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 5d210: 2f00 movel %d0,%sp@- 5d212: 2f04 movel %d4,%sp@- 5d214: 4eb9 0004 7f94 jsr 47f94 <_Chain_Append> 5d21a: 508f addql #8,%sp /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); 5d21c: 4eb9 0004 9cd0 jsr 49cd0 <_Thread_Enable_dispatch> return 0; 5d222: 4280 clrl %d0 5d224: 6098 bras 5d1be /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; 5d226: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d228: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 5d22e: 4e5e unlk %fp 5d230: 4e75 rts */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 5d232: 42ae fffc clrl %fp@(-4) 5d236: 6000 fe68 braw 5d0a0 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 5d23a: 4eb9 0004 f024 jsr 4f024 <__errno> 5d240: 7603 moveq #3,%d3 5d242: 2040 moveal %d0,%a0 5d244: 70ff moveq #-1,%d0 5d246: 2083 movel %d3,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d248: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 5d24e: 4e5e unlk %fp 5d250: 4e75 rts */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 5d252: 4eb9 0004 f024 jsr 4f024 <__errno> 5d258: 7416 moveq #22,%d2 5d25a: 2040 moveal %d0,%a0 5d25c: 70ff moveq #-1,%d0 5d25e: 2082 movel %d2,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d260: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 5d266: 4e5e unlk %fp 5d268: 4e75 rts if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 5d26a: 4eb9 0004 9cd0 jsr 49cd0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 5d270: 4eb9 0004 f024 jsr 4f024 <__errno> 5d276: 720b moveq #11,%d1 5d278: 2040 moveal %d0,%a0 5d27a: 70ff moveq #-1,%d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d27c: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 5d282: 2081 movel %d1,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d284: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043980 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 43980: 7003 moveq #3,%d0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 43982: 4e56 0000 linkw %fp,#0 43986: 2f0a movel %a2,%sp@- /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 43988: b0b9 0006 141a cmpl 6141a <_System_state_Current>,%d0 4398e: 6708 beqs 43998 <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } 43990: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43994: 4e5e unlk %fp <== NOT EXECUTED 43996: 4e75 rts <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 43998: 2479 0005 ef16 moveal 5ef16 <_global_impure_ptr>,%a2 4399e: b5f9 0005 f96c cmpal 5f96c <_impure_ptr>,%a2 439a4: 6710 beqs 439b6 _wrapup_reent(_global_impure_ptr); 439a6: 2f0a movel %a2,%sp@- 439a8: 4eb9 0004 fa72 jsr 4fa72 <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; 439ae: 588f addql #4,%sp 439b0: 23ca 0005 f96c movel %a2,5f96c <_impure_ptr> * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 439b6: 2f2a 0004 movel %a2@(4),%sp@- 439ba: 45f9 0004 f160 lea 4f160 ,%a2 439c0: 4e92 jsr %a2@ fclose (stdout); 439c2: 2079 0005 f96c moveal 5f96c <_impure_ptr>,%a0 439c8: 2f28 0008 movel %a0@(8),%sp@- 439cc: 4e92 jsr %a2@ fclose (stderr); 439ce: 2079 0005 f96c moveal 5f96c <_impure_ptr>,%a0 439d4: 2f28 000c movel %a0@(12),%sp@- 439d8: 4e92 jsr %a2@ } 439da: 246e fffc moveal %fp@(-4),%a2 * _fwalk (_REENT, fclose); */ fclose (stdin); fclose (stdout); fclose (stderr); 439de: 4fef 000c lea %sp@(12),%sp } 439e2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000433cc : #include "malloc_p.h" void *malloc( size_t size ) { 433cc: 4e56 0000 linkw %fp,#0 void *return_this; MSBUMP(malloc_calls, 1); 433d0: 52b9 0006 0ee0 addql #1,60ee0 #include "malloc_p.h" void *malloc( size_t size ) { 433d6: 2f03 movel %d3,%sp@- 433d8: 262e 0008 movel %fp@(8),%d3 433dc: 2f02 movel %d2,%sp@- MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 433de: 4eb9 0004 32d8 jsr 432d8 /* * Validate the parameters */ if ( !size ) 433e4: 4a83 tstl %d3 433e6: 6762 beqs 4344a return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 433e8: 7003 moveq #3,%d0 433ea: b0b9 0006 141a cmpl 6141a <_System_state_Current>,%d0 433f0: 674e beqs 43440 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 433f2: 42a7 clrl %sp@- 433f4: 42a7 clrl %sp@- 433f6: 2f03 movel %d3,%sp@- 433f8: 2f39 0005 f76c movel 5f76c ,%sp@- 433fe: 4eb9 0004 9200 jsr 49200 <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 43404: 4fef 0010 lea %sp@(16),%sp 43408: 2400 movel %d0,%d2 4340a: 674e beqs 4345a } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4340c: 2079 0005 fe9c moveal 5fe9c ,%a0 43412: 4a88 tstl %a0 43414: 6708 beqs 4341e (*rtems_malloc_dirty_helper)( return_this, size ); 43416: 2f03 movel %d3,%sp@- 43418: 2f02 movel %d2,%sp@- 4341a: 4e90 jsr %a0@ 4341c: 508f addql #8,%sp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4341e: 2079 0005 fea0 moveal 5fea0 ,%a0 43424: 4a88 tstl %a0 43426: 670a beqs 43432 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 43428: 2f02 movel %d2,%sp@- 4342a: 2068 0004 moveal %a0@(4),%a0 4342e: 4e90 jsr %a0@ 43430: 588f addql #4,%sp return return_this; } 43432: 2002 movel %d2,%d0 43434: 242e fff8 movel %fp@(-8),%d2 43438: 262e fffc movel %fp@(-4),%d3 4343c: 4e5e unlk %fp 4343e: 4e75 rts /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 43440: 4eb9 0004 32b8 jsr 432b8 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 43446: 4a00 tstb %d0 43448: 66a8 bnes 433f2 <== ALWAYS TAKEN /* * Validate the parameters */ if ( !size ) return (void *) 0; 4344a: 4282 clrl %d2 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 4344c: 2002 movel %d2,%d0 4344e: 242e fff8 movel %fp@(-8),%d2 43452: 262e fffc movel %fp@(-4),%d3 43456: 4e5e unlk %fp 43458: 4e75 rts */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); 4345a: 2f03 movel %d3,%sp@- 4345c: 2f39 0005 f76c movel 5f76c ,%sp@- 43462: 2079 0005 d99c moveal 5d99c ,%a0 43468: 4e90 jsr %a0@ if ( !return_this ) { 4346a: 508f addql #8,%sp */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); 4346c: 2400 movel %d0,%d2 if ( !return_this ) { 4346e: 669c bnes 4340c <== NEVER TAKEN errno = ENOMEM; 43470: 4eb9 0004 f024 jsr 4f024 <__errno> */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 43476: 262e fffc movel %fp@(-4),%d3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); if ( !return_this ) { errno = ENOMEM; 4347a: 2040 moveal %d0,%a0 4347c: 700c moveq #12,%d0 4347e: 2080 movel %d0,%a0@ */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 43480: 2002 movel %d2,%d0 43482: 242e fff8 movel %fp@(-8),%d2 43486: 4e5e unlk %fp ... =============================================================================== 000432d8 : void malloc_deferred_frees_process(void) { 432d8: 4e56 0000 linkw %fp,#0 432dc: 2f0b movel %a3,%sp@- /* * 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); 432de: 47f9 0004 30cc lea 430cc ,%a3 return true; } void malloc_deferred_frees_process(void) { 432e4: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 432e6: 4879 0005 f7d0 pea 5f7d0 432ec: 45f9 0004 7fcc lea 47fcc <_Chain_Get>,%a2 432f2: 4e92 jsr %a2@ 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) 432f4: 588f addql #4,%sp 432f6: 4a80 tstl %d0 432f8: 6714 beqs 4330e free(to_be_freed); 432fa: 2f00 movel %d0,%sp@- 432fc: 4e93 jsr %a3@ 432fe: 588f addql #4,%sp 43300: 4879 0005 f7d0 pea 5f7d0 43306: 4e92 jsr %a2@ 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) 43308: 588f addql #4,%sp 4330a: 4a80 tstl %d0 4330c: 66ec bnes 432fa <== NEVER TAKEN free(to_be_freed); } 4330e: 246e fff8 moveal %fp@(-8),%a2 43312: 266e fffc moveal %fp@(-4),%a3 43316: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d6c4 : * Allocate a block for an in-memory file. */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 4d6c4: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 4d6c8: 2f39 0006 06cc movel 606cc ,%sp@- 4d6ce: 4878 0001 pea 1 4d6d2: 4eb9 0004 2e28 jsr 42e28 if ( memory ) 4d6d8: 508f addql #8,%sp 4d6da: 4a80 tstl %d0 4d6dc: 6706 beqs 4d6e4 <== NEVER TAKEN memfile_blocks_allocated++; 4d6de: 52b9 0006 07e0 addql #1,607e0 return memory; } 4d6e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004db96 : */ static void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4db96: 4e56 ffec linkw %fp,#-20 4db9a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4db9e: 286e 0008 moveal %fp@(8),%a4 4dba2: 47f9 0004 db7c lea 4db7c ,%a3 4dba8: 262e 000c movel %fp@(12),%d3 IMFS_assert( block_table ); /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 4dbac: 2454 moveal %a4@,%a2 for ( i=0 ; i<== NEVER TAKEN 4dbb0: 4282 clrl %d2 4dbb2: 47f9 0004 db7c lea 4db7c ,%a3 if ( b[i] ) { 4dbb8: 2012 movel %a2@,%d0 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 4dbc0: 2f00 movel %d0,%sp@- 4dbc2: 4e93 jsr %a3@ b[i] = 0; 4dbc4: 588f addql #4,%sp 4dbc6: 4292 clrl %a2@ 4dbc8: 588a addql #4,%a2 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 4dbce: 2454 moveal %a4@,%a2 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4dbd0: 2f0a movel %a2,%sp@- 4dbd2: 4e93 jsr %a3@ *block_table = 0; 4dbd4: 588f addql #4,%sp 4dbd6: 4294 clrl %a4@ } 4dbd8: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4dbde: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e0e8 : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 4e0e8: 7004 moveq #4,%d0 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 4e0ea: 4e56 0000 linkw %fp,#0 4e0ee: 206e 0008 moveal %fp@(8),%a0 4e0f2: 2f03 movel %d3,%sp@- the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 4e0f4: c0a8 000c andl %a0@(12),%d0 mode_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4e0f8: 2068 0018 moveal %a0@(24),%a0 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 4e0fc: 2f02 movel %d2,%sp@- the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 4e0fe: 4a80 tstl %d0 4e100: 670a beqs 4e10c 4e102: 2268 004a moveal %a0@(74),%a1 && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { 4e106: 7005 moveq #5,%d0 4e108: b091 cmpl %a1@,%d0 4e10a: 670e beqs 4e11a <== NEVER TAKEN && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } return 0; } 4e10c: 242e fff8 movel %fp@(-8),%d2 if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } return 0; 4e110: 4280 clrl %d0 } 4e112: 262e fffc movel %fp@(-4),%d3 4e116: 4e5e unlk %fp 4e118: 4e75 rts /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 4e11a: 2028 0052 movel %a0@(82),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; 4e11e: 243c 0005 eaea movel #387818,%d2 <== NOT EXECUTED 4e124: 2142 004a movel %d2,%a0@(74) <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 4e128: 2228 0056 movel %a0@(86),%d1 <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; the_jnode->info.file.size = 0; 4e12c: 4282 clrl %d2 <== NOT EXECUTED 4e12e: 4283 clrl %d3 <== NOT EXECUTED the_jnode->info.file.indirect = 0; 4e130: 42a8 0056 clrl %a0@(86) <== NOT EXECUTED && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; the_jnode->info.file.size = 0; 4e134: 2142 004e movel %d2,%a0@(78) <== NOT EXECUTED 4e138: 2143 0052 movel %d3,%a0@(82) <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4e13c: 42a8 005a clrl %a0@(90) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4e140: 42a8 005e clrl %a0@(94) <== NOT EXECUTED if ((count != 0) 4e144: 4a80 tstl %d0 <== NOT EXECUTED 4e146: 67c4 beqs 4e10c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4e148: 2f00 movel %d0,%sp@- <== NOT EXECUTED return -1; 4e14a: 76ff moveq #-1,%d3 <== 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) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4e14c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4e14e: 42a7 clrl %sp@- <== NOT EXECUTED 4e150: 42a7 clrl %sp@- <== NOT EXECUTED 4e152: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4e154: 4eb9 0004 dea8 jsr 4dea8 <== NOT EXECUTED return -1; } return 0; } 4e15a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; 4e15e: b680 cmpl %d0,%d3 <== NOT EXECUTED 4e160: 57c0 seq %d0 <== NOT EXECUTED } return 0; } 4e162: 262e fffc movel %fp@(-4),%d3 <== 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) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4e166: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED return -1; 4e16a: 49c0 extbl %d0 <== NOT EXECUTED } return 0; } 4e16c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043614 : const void *data ) { int rv = 0; if ( 43614: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 43616: 4e56 ff84 linkw %fp,#-124 4361a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4361e: 282e 0008 movel %fp@(8),%d4 43622: 262e 000c movel %fp@(12),%d3 43626: 2c2e 0010 movel %fp@(16),%d6 int rv = 0; if ( 4362a: b0ae 0014 cmpl %fp@(20),%d0 4362e: 6500 0286 bcsw 438b6 options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 43632: 2f06 movel %d6,%sp@- 43634: 4eb9 0004 bd18 jsr 4bd18 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 4363a: 588f addql #4,%sp if ( options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 4363c: 2e00 movel %d0,%d7 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 4363e: 6700 0276 beqw 438b6 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 43642: 4a83 tstl %d3 43644: 6700 0212 beqw 43858 } return rv; } int mount( 43648: 2f03 movel %d3,%sp@- 4364a: 45f9 0005 0368 lea 50368 ,%a2 43650: 2d43 ffac movel %d3,%fp@(-84) 43654: 4e92 jsr %a2@ 43656: 588f addql #4,%sp 43658: 2a40 moveal %d0,%a5 4365a: 528d addql #1,%a5 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 4365c: 2f06 movel %d6,%sp@- 4365e: 4e92 jsr %a2@ 43660: 588f addql #4,%sp 43662: 2400 movel %d0,%d2 43664: 2640 moveal %d0,%a3 43666: 5282 addql #1,%d2 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 43668: 4a84 tstl %d4 4366a: 6700 0212 beqw 4387e 4366e: 2f04 movel %d4,%sp@- 43670: 4eb9 0005 0368 jsr 50368 43676: 588f addql #4,%sp 43678: 2440 moveal %d0,%a2 4367a: 528a addql #1,%a2 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 4367c: 41f5 b863 lea %a5@(00000063,%a3:l),%a0 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 43680: 4870 a800 pea %a0@(00000000,%a2:l) 43684: 4878 0001 pea 1 43688: 4eb9 0004 2e28 jsr 42e28 if ( mt_entry != NULL ) { 4368e: 508f addql #8,%sp strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 43690: 2840 moveal %d0,%a4 if ( mt_entry != NULL ) { 43692: 4a80 tstl %d0 43694: 6700 0206 beqw 4389c rtems_filesystem_global_location_t *mt_fs_root = (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); 43698: 2f02 movel %d2,%sp@- if ( mt_entry != NULL ) { rtems_filesystem_global_location_t *mt_fs_root = (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); 4369a: 2a00 movel %d0,%d5 4369c: 0685 0000 0062 addil #98,%d5 memcpy( str, filesystemtype, filesystemtype_size ); 436a2: 47f9 0004 f844 lea 4f844 ,%a3 mt_entry->type = str; str += filesystemtype_size; 436a8: d485 addl %d5,%d2 rtems_filesystem_global_location_t *mt_fs_root = (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); 436aa: 2f06 movel %d6,%sp@- + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { rtems_filesystem_global_location_t *mt_fs_root = 436ac: 2c00 movel %d0,%d6 436ae: 0686 0000 003e addil #62,%d6 (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); 436b4: 2f05 movel %d5,%sp@- 436b6: 4e93 jsr %a3@ mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 436b8: 4fef 000c lea %sp@(12),%sp (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 436bc: 2945 0032 movel %d5,%a4@(50) str += filesystemtype_size; if ( source_or_null != NULL ) { 436c0: 4a84 tstl %d4 436c2: 6712 beqs 436d6 memcpy( str, source_or_null, source_size ); 436c4: 2f0a movel %a2,%sp@- 436c6: 2f04 movel %d4,%sp@- 436c8: 2f02 movel %d2,%sp@- 436ca: 4e93 jsr %a3@ mt_entry->dev = str; str += source_size; 436cc: 4fef 000c lea %sp@(12),%sp mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 436d0: 2942 0036 movel %d2,%a4@(54) str += source_size; 436d4: d48a addl %a2,%d2 } memcpy( str, target, target_size ); 436d6: 2f0d movel %a5,%sp@- 436d8: 2f2e ffac movel %fp@(-84),%sp@- filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 436dc: 7a01 moveq #1,%d5 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; } memcpy( str, target, target_size ); 436de: 2f02 movel %d2,%sp@- 436e0: 4e93 jsr %a3@ void *starting_address, size_t number_nodes, size_t node_size ) { _Chain_Initialize( the_chain, starting_address, number_nodes, node_size ); 436e2: 4878 0024 pea 24 mt_entry->target = str; str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; 436e6: 203c 0005 e5de movel #386526,%d0 436ec: 2940 002a movel %d0,%a4@(42) 436f0: 4878 0001 pea 1 memcpy( str, target, target_size ); mt_entry->target = str; str += target_size; mt_entry->mounted = true; 436f4: 7001 moveq #1,%d0 436f6: 1940 0028 moveb %d0,%a4@(40) mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 436fa: 7001 moveq #1,%d0 436fc: 2f06 movel %d6,%sp@- 436fe: 486c 0014 pea %a4@(20) mt_entry->dev = str; str += source_size; } memcpy( str, target, target_size ); mt_entry->target = str; 43702: 2942 002e movel %d2,%a4@(46) mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 43706: 2940 0056 movel %d0,%a4@(86) memcpy( str, target, target_size ); mt_entry->target = str; str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; 4370a: 2946 0024 movel %d6,%a4@(36) mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; 4370e: 294c 0052 movel %a4,%a4@(82) 43712: 4eb9 0004 8008 jsr 48008 <_Chain_Initialize> ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; rv = (*fsmount_me_h)( mt_entry, data ); 43718: 2f2e 0018 movel %fp@(24),%sp@- 4371c: 2047 moveal %d7,%a0 filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 4371e: caae 0014 andl %fp@(20),%d5 43722: 1945 0029 moveb %d5,%a4@(41) rv = (*fsmount_me_h)( mt_entry, data ); 43726: 2f0c movel %a4,%sp@- 43728: 4e90 jsr %a0@ if ( rv == 0 ) { 4372a: 4fef 0024 lea %sp@(36),%sp ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; rv = (*fsmount_me_h)( mt_entry, data ); 4372e: 2400 movel %d0,%d2 if ( rv == 0 ) { 43730: 6600 00f6 bnew 43828 if ( target != NULL ) { 43734: 4a83 tstl %d3 43736: 6700 0198 beqw 438d0 { int rv = 0; rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_PERMS_RWX | RTEMS_FS_FOLLOW_LINK; rtems_filesystem_location_info_t *currentloc = 4373a: 4878 001f pea 1f rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); 4373e: 280e movel %fp,%d4 43740: 0684 ffff ffc8 addil #-56,%d4 { int rv = 0; rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_PERMS_RWX | RTEMS_FS_FOLLOW_LINK; rtems_filesystem_location_info_t *currentloc = 43746: 2f03 movel %d3,%sp@- 43748: 2f04 movel %d4,%sp@- 4374a: 4eb9 0004 4382 jsr 44382 static inline bool rtems_filesystem_location_is_instance_root( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 43750: 2040 moveal %d0,%a0 43752: 2268 0014 moveal %a0@(20),%a1 return (*mt_entry->ops->are_nodes_equal_h)( 43756: 2469 000c moveal %a1@(12),%a2 4375a: 2f29 0024 movel %a1@(36),%sp@- 4375e: 2f00 movel %d0,%sp@- 43760: 226a 0010 moveal %a2@(16),%a1 43764: 4e91 jsr %a1@ rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) { 43766: 4fef 0014 lea %sp@(20),%sp 4376a: 4a00 tstb %d0 4376c: 6600 01ee bnew 4395c static inline void rtems_filesystem_eval_path_extract_currentloc( rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_location_info_t *get ) { rtems_filesystem_location_copy_and_detach( 43770: 486e ffe0 pea %fp@(-32) rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); 43774: 240e movel %fp,%d2 43776: 0682 ffff ffb0 addil #-80,%d2 4377c: 2f02 movel %d2,%sp@- 4377e: 4eb9 0004 4834 jsr 44834 mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 43784: 2f02 movel %d2,%sp@- 43786: 4eb9 0004 4a78 jsr 44a78 4378c: 2440 moveal %d0,%a2 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 4378e: 226a 0014 moveal %a2@(20),%a1 43792: 2269 000c moveal %a1@(12),%a1 43796: 2f0c movel %a4,%sp@- 43798: 2269 0030 moveal %a1@(48),%a1 rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); mt_entry->mt_point_node = mt_point_node; 4379c: 2940 0020 movel %d0,%a4@(32) rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 437a0: 4e91 jsr %a1@ if ( rv == 0 ) { 437a2: 4fef 0010 lea %sp@(16),%sp rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 437a6: 2400 movel %d0,%d2 if ( rv == 0 ) { 437a8: 6600 0094 bnew 4383e */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 437ac: 42a7 clrl %sp@- 437ae: 42a7 clrl %sp@- 437b0: 2f39 0006 0ed8 movel 60ed8 ,%sp@- 437b6: 4eb9 0004 7458 jsr 47458 Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 437bc: 2279 0005 f7e4 moveal 5f7e4 ,%a1 the_node->next = tail; 437c2: 28bc 0005 f7e0 movel #391136,%a4@ tail->previous = the_node; old_last->next = the_node; 437c8: 228c movel %a4,%a1@ } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 437ca: 2f39 0006 0ed8 movel 60ed8 ,%sp@- { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 437d0: 23cc 0005 f7e4 movel %a4,5f7e4 old_last->next = the_node; the_node->previous = old_last; 437d6: 2949 0004 movel %a1,%a4@(4) 437da: 4eb9 0004 75b0 jsr 475b0 437e0: 4fef 0010 lea %sp@(16),%sp } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 437e4: 2f04 movel %d4,%sp@- 437e6: 4eb9 0004 44d6 jsr 444d6 437ec: 588f addql #4,%sp rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 437ee: 4a82 tstl %d2 437f0: 6628 bnes 4381a <== NEVER TAKEN errno = EINVAL; rv = -1; } return rv; } 437f2: 2002 movel %d2,%d0 437f4: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 437fa: 4e5e unlk %fp 437fc: 4e75 rts rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 437fe: 4eb9 0004 f024 jsr 4f024 <__errno> <== NOT EXECUTED 43804: 7616 moveq #22,%d3 <== NOT EXECUTED rv = -1; 43806: 74ff moveq #-1,%d2 <== NOT EXECUTED rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 43808: 2040 moveal %d0,%a0 <== NOT EXECUTED 4380a: 2083 movel %d3,%a0@ <== NOT EXECUTED 4380c: 2f39 0006 0ed8 movel 60ed8 ,%sp@- <== NOT EXECUTED 43812: 4eb9 0004 75b0 jsr 475b0 <== NOT EXECUTED 43818: 588f addql #4,%sp <== NOT EXECUTED } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 4381a: 226c 000c moveal %a4@(12),%a1 4381e: 2f0c movel %a4,%sp@- 43820: 2269 003c moveal %a1@(60),%a1 43824: 4e91 jsr %a1@ 43826: 588f addql #4,%sp } } if ( rv != 0 ) { free( mt_entry ); 43828: 2f0c movel %a4,%sp@- 4382a: 4eb9 0004 30cc jsr 430cc 43830: 588f addql #4,%sp errno = EINVAL; rv = -1; } return rv; } 43832: 2002 movel %d2,%d0 43834: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 4383a: 4e5e unlk %fp 4383c: 4e75 rts &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); 4383e: 2f0a movel %a2,%sp@- 43840: 4eb9 0004 4954 jsr 44954 43846: 588f addql #4,%sp } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 43848: 2f04 movel %d4,%sp@- 4384a: 4eb9 0004 44d6 jsr 444d6 43850: 588f addql #4,%sp rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 43852: 4a82 tstl %d2 43854: 679c beqs 437f2 <== NEVER TAKEN 43856: 60c2 bras 4381a const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 43858: 41f9 0005 e5dc lea 5e5dc ,%a0 4385e: 45f9 0005 0368 lea 50368 ,%a2 43864: 3a7c 0002 moveaw #2,%a5 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 43868: 2f06 movel %d6,%sp@- const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 4386a: 2d48 ffac movel %a0,%fp@(-84) size_t filesystemtype_size = strlen( filesystemtype ) + 1; 4386e: 4e92 jsr %a2@ 43870: 588f addql #4,%sp 43872: 2400 movel %d0,%d2 43874: 2640 moveal %d0,%a3 43876: 5282 addql #1,%d2 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 43878: 4a84 tstl %d4 4387a: 6600 fdf2 bnew 4366e 4387e: 95ca subal %a2,%a2 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 43880: 41f5 b863 lea %a5@(00000063,%a3:l),%a0 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 43884: 4870 a800 pea %a0@(00000000,%a2:l) 43888: 4878 0001 pea 1 4388c: 4eb9 0004 2e28 jsr 42e28 if ( mt_entry != NULL ) { 43892: 508f addql #8,%sp strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 43894: 2840 moveal %d0,%a4 if ( mt_entry != NULL ) { 43896: 4a80 tstl %d0 43898: 6600 fdfe bnew 43698 if ( rv != 0 ) { free( mt_entry ); } } else { errno = ENOMEM; 4389c: 4eb9 0004 f024 jsr 4f024 <__errno> rv = -1; 438a2: 74ff moveq #-1,%d2 if ( rv != 0 ) { free( mt_entry ); } } else { errno = ENOMEM; 438a4: 2040 moveal %d0,%a0 438a6: 700c moveq #12,%d0 438a8: 2080 movel %d0,%a0@ errno = EINVAL; rv = -1; } return rv; } 438aa: 2002 movel %d2,%d0 438ac: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 438b2: 4e5e unlk %fp 438b4: 4e75 rts } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 438b6: 4eb9 0004 f024 jsr 4f024 <__errno> rv = -1; 438bc: 74ff moveq #-1,%d2 } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 438be: 7216 moveq #22,%d1 438c0: 2040 moveal %d0,%a0 rv = -1; } return rv; } 438c2: 2002 movel %d2,%d0 438c4: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 438ca: 2081 movel %d1,%a0@ rv = -1; } return rv; } 438cc: 4e5e unlk %fp 438ce: 4e75 rts */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 438d0: 42a7 clrl %sp@- 438d2: 42a7 clrl %sp@- 438d4: 2f39 0006 0ed8 movel 60ed8 ,%sp@- 438da: 4eb9 0004 7458 jsr 47458 ) { int rv = 0; rtems_filesystem_mt_lock(); if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 438e0: 4fef 000c lea %sp@(12),%sp 438e4: 203c 0005 f7e0 movel #391136,%d0 438ea: b0b9 0005 f7dc cmpl 5f7dc ,%d0 438f0: 6600 ff0c bnew 437fe Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 438f4: 2279 0005 f7e4 moveal 5f7e4 ,%a1 } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); 438fa: 260c movel %a4,%d3 438fc: 0683 0000 0024 addil #36,%d3 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = 43902: 47f9 0004 49c8 lea 449c8 ,%a3 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 43908: 45f9 0004 499e lea 4499e ,%a2 the_node->next = tail; 4390e: 2880 movel %d0,%a4@ tail->previous = the_node; old_last->next = the_node; 43910: 228c movel %a4,%a1@ } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 43912: 2f39 0006 0ed8 movel 60ed8 ,%sp@- { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 43918: 23cc 0005 f7e4 movel %a4,5f7e4 old_last->next = the_node; the_node->previous = old_last; 4391e: 2949 0004 movel %a1,%a4@(4) 43922: 4eb9 0004 75b0 jsr 475b0 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = 43928: 2f03 movel %d3,%sp@- 4392a: 4e93 jsr %a3@ 4392c: 2800 movel %d0,%d4 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = 4392e: 2f03 movel %d3,%sp@- 43930: 4e93 jsr %a3@ rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 43932: 2079 0005 f7fc moveal 5f7fc ,%a0 43938: 5888 addql #4,%a0 rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = 4393a: 2600 movel %d0,%d3 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 4393c: 2f04 movel %d4,%sp@- 4393e: 2f08 movel %a0,%sp@- 43940: 4e92 jsr %a2@ &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( 43942: 2f03 movel %d3,%sp@- 43944: 2f39 0005 f7fc movel 5f7fc ,%sp@- 4394a: 4e92 jsr %a2@ 4394c: 4fef 001c lea %sp@(28),%sp errno = EINVAL; rv = -1; } return rv; } 43950: 2002 movel %d2,%d0 43952: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 43958: 4e5e unlk %fp 4395a: 4e75 rts rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 4395c: 4878 0010 pea 10 rv = -1; 43960: 74ff moveq #-1,%d2 rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 43962: 2f04 movel %d4,%sp@- 43964: 4eb9 0004 402a jsr 4402a 4396a: 508f addql #8,%sp rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 4396c: 2f04 movel %d4,%sp@- 4396e: 4eb9 0004 44d6 jsr 444d6 43974: 588f addql #4,%sp rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 43976: 4a82 tstl %d2 43978: 6700 fe78 beqw 437f2 4397c: 6000 fe9c braw 4381a =============================================================================== 00047b94 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 47b94: 4e56 ffec linkw %fp,#-20 47b98: 48d7 007c moveml %d2-%d6,%sp@ 47b9c: 262e 0008 movel %fp@(8),%d3 47ba0: 242e 000c movel %fp@(12),%d2 47ba4: 282e 0010 movel %fp@(16),%d4 47ba8: 2a2e 0014 movel %fp@(20),%d5 47bac: 2c2e 0018 movel %fp@(24),%d6 int rv = -1; if (target != NULL) { 47bb0: 4a82 tstl %d2 47bb2: 673e beqs 47bf2 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 47bb4: 4878 01ff pea 1ff 47bb8: 2f02 movel %d2,%sp@- 47bba: 4eb9 0004 883c jsr 4883c if (rv == 0) { 47bc0: 508f addql #8,%sp 47bc2: 4a80 tstl %d0 47bc4: 670a beqs 47bd0 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } 47bc6: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED 47bcc: 4e5e unlk %fp <== NOT EXECUTED 47bce: 4e75 rts <== NOT EXECUTED int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 47bd0: 2d46 0018 movel %d6,%fp@(24) 47bd4: 2d45 0014 movel %d5,%fp@(20) 47bd8: 2d44 0010 movel %d4,%fp@(16) 47bdc: 2d42 000c movel %d2,%fp@(12) 47be0: 2d43 0008 movel %d3,%fp@(8) } else { errno = EINVAL; } return rv; } 47be4: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 47bea: 4e5e unlk %fp int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 47bec: 4ef9 0004 7c0c jmp 47c0c options, data ); } } else { errno = EINVAL; 47bf2: 4eb9 0006 138c jsr 6138c <__errno> 47bf8: 7216 moveq #22,%d1 47bfa: 2040 moveal %d0,%a0 const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 47bfc: 70ff moveq #-1,%d0 } else { errno = EINVAL; } return rv; } 47bfe: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 options, data ); } } else { errno = EINVAL; 47c04: 2081 movel %d1,%a0@ } return rv; } 47c06: 4e5e unlk %fp ... =============================================================================== 0005743c : fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 5743c: 72ff moveq #-1,%d1 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 5743e: 4e56 ff44 linkw %fp,#-188 ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; time_t time_ret = 0; uint16_t time_val = 0; 57442: 4240 clrw %d0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 57444: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 57448: 246e 0008 moveal %fp@(8),%a2 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 5744c: 47ee ff80 lea %fp@(-128),%a3 mode_t mode, const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 57450: 206a 0014 moveal %a2@(20),%a0 57454: 2868 0008 moveal %a0@(8),%a4 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 57458: 4878 0040 pea 40 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 5745c: 282e 0010 movel %fp@(16),%d4 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 57460: 42a7 clrl %sp@- msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 57462: 262e 0014 movel %fp@(20),%d3 57466: 2d41 ff78 movel %d1,%fp@(-136) int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 5746a: 2a6a 0008 moveal %a2@(8),%a5 dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 5746e: 2d41 ff7c movel %d1,%fp@(-132) fat_file_fd_t *fat_fd = NULL; time_t time_ret = 0; uint16_t time_val = 0; 57472: 3d40 ff68 movew %d0,%fp@(-152) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 57476: 42ae ff6c clrl %fp@(-148) time_t time_ret = 0; uint16_t time_val = 0; uint16_t date = 0; 5747a: 3d40 ff6a movew %d0,%fp@(-150) static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 5747e: 42ae ff70 clrl %fp@(-144) dir_pos->sname.ofs = 0; 57482: 42ae ff74 clrl %fp@(-140) uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 57486: 4293 clrl %a3@ 57488: 42ae ff84 clrl %fp@(-124) 5748c: 42ae ff88 clrl %fp@(-120) 57490: 42ae ff8c clrl %fp@(-116) 57494: 42ae ff90 clrl %fp@(-112) 57498: 42ae ff94 clrl %fp@(-108) 5749c: 42ae ff98 clrl %fp@(-104) 574a0: 42ae ff9c clrl %fp@(-100) memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 574a4: 486e ffc0 pea %fp@(-64) 574a8: 4eb9 0005 c0d8 jsr 5c0d8 if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 574ae: 4fef 000c lea %sp@(12),%sp 574b2: 0c83 0000 0104 cmpil #260,%d3 574b8: 6e00 038c bgtw 57846 rtems_set_errno_and_return_minus_one(ENAMETOOLONG); } name_type = msdos_long_to_short (name, name_len, 574bc: 4878 000b pea b 574c0: 2f0b movel %a3,%sp@- 574c2: 2f03 movel %d3,%sp@- 574c4: 2f04 movel %d4,%sp@- 574c6: 4eb9 0005 79e0 jsr 579e0 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 574cc: 4fef 0010 lea %sp@(16),%sp if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { rtems_set_errno_and_return_minus_one(ENAMETOOLONG); } name_type = msdos_long_to_short (name, name_len, 574d0: 2a00 movel %d0,%d5 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 574d2: 6700 0384 beqw 57858 /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 574d6: 42a7 clrl %sp@- if (name_type == MSDOS_NAME_INVALID) { rtems_set_errno_and_return_minus_one(EINVAL); } /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 574d8: 4200 clrb %d0 574da: 1d40 ff8c moveb %d0,%fp@(-116) /* set up last write date and time */ time_ret = time(NULL); 574de: 4eb9 0005 f998 jsr 5f998