000480c8 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 480c8: 7206 moveq #6,%d1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 480ca: 4e56 0000 linkw %fp,#0 480ce: 206e 0008 moveal %fp@(8),%a0 480d2: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 480d4: 2450 moveal %a0@,%a2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 480d6: 2268 0010 moveal %a0@(16),%a1 switch( node->type ) { 480da: 202a 0048 movel %a2@(72),%d0 480de: 5380 subql #1,%d0 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 480e0: 2269 0034 moveal %a1@(52),%a1 switch( node->type ) { 480e4: b280 cmpl %d0,%d1 480e6: 6546 bcss 4812e 480e8: 303b 0a08 movew %pc@(480f2 ,%d0:l:2),%d0 480ec: 48c0 extl %d0 480ee: 4efb 0802 jmp %pc@(480f2 ,%d0:l) 480f2: 000e 016 <== NOT EXECUTED 480f4: 0016 026 <== NOT EXECUTED 480f6: 001e 036 <== NOT EXECUTED 480f8: 001e 036 <== NOT EXECUTED 480fa: 002a 052 <== NOT EXECUTED 480fc: 002a 052 <== NOT EXECUTED 480fe: 0032 062 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 48100: 2169 0008 0008 movel %a1@(8),%a0@(8) break; 48106: 6026 bras 4812e case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 48108: 203c 0005 a61a movel #370202,%d0 4810e: 601a bras 4812a break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 48110: 223c 0005 a652 movel #370258,%d1 48116: 2141 0008 movel %d1,%a0@(8) break; 4811a: 6012 bras 4812e case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 4811c: 2169 0004 0008 movel %a1@(4),%a0@(8) break; 48122: 600a bras 4812e case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 48124: 203c 0005 a576 movel #370038,%d0 4812a: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 4812e: 245f moveal %sp@+,%a2 48130: 4280 clrl %d0 48132: 4e5e unlk %fp 48134: 4e75 rts 0004c778 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4c778: 4e56 ffe8 linkw %fp,#-24 4c77c: 206e 0008 moveal %fp@(8),%a0 4c780: 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 *) pathloc->node_access; 4c784: 2450 moveal %a0@,%a2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4c786: 4284 clrl %d4 int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4c788: 362e 000e movew %fp@(14),%d3 4c78c: 342e 0012 movew %fp@(18),%d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4c790: 4eb9 0004 d7d4 jsr 4d7d4 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4c796: 4281 clrl %d1 4c798: 3800 movew %d0,%d4 4c79a: 322a 0038 movew %a2@(56),%d1 4c79e: b284 cmpl %d4,%d1 4c7a0: 6714 beqs 4c7b6 4c7a2: 4a40 tstw %d0 <== NOT EXECUTED 4c7a4: 6710 beqs 4c7b6 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4c7a6: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 4c7ac: 7201 moveq #1,%d1 <== NOT EXECUTED 4c7ae: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c7b0: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c7b2: 2081 movel %d1,%a0@ <== NOT EXECUTED 4c7b4: 601e bras 4c7d4 <== NOT EXECUTED #endif jnode->st_uid = owner; 4c7b6: 3543 0038 movew %d3,%a2@(56) jnode->st_gid = group; 4c7ba: 3542 003a movew %d2,%a2@(58) IMFS_update_ctime( jnode ); 4c7be: 42a7 clrl %sp@- 4c7c0: 486e fff8 pea %fp@(-8) 4c7c4: 4eb9 0004 3564 jsr 43564 4c7ca: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4c7d0: 508f addql #8,%sp #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 4c7d2: 4280 clrl %d0 return 0; } 4c7d4: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4c7da: 4e5e unlk %fp 4c7dc: 4e75 rts ... 0004b4c4 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4b4c4: 4e56 fff0 linkw %fp,#-16 4b4c8: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4b4cc: 266e 0008 moveal %fp@(8),%a3 4b4d0: 242e 000c movel %fp@(12),%d2 4b4d4: 246e 0018 moveal %fp@(24),%a2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4b4d8: 4a8b tstl %a3 4b4da: 6606 bnes 4b4e2 4b4dc: 99cc subal %a4,%a4 <== NOT EXECUTED 4b4de: 6000 00e6 braw 4b5c6 <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4b4e2: 2079 0005 b544 moveal 5b544 ,%a0 4b4e8: 2028 002c movel %a0@(44),%d0 4b4ec: 4680 notl %d0 4b4ee: c0ae 0014 andl %fp@(20),%d0 4b4f2: 2f00 movel %d0,%sp@- 4b4f4: 2f2e 0010 movel %fp@(16),%sp@- 4b4f8: 2f02 movel %d2,%sp@- 4b4fa: 4eb9 0004 b40c jsr 4b40c if ( !node ) 4b500: 4fef 000c lea %sp@(12),%sp return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4b504: 2840 moveal %d0,%a4 if ( !node ) 4b506: 4a80 tstl %d0 4b508: 6700 00bc beqw 4b5c6 return NULL; /* * Set the type specific information */ switch (type) { 4b50c: 5382 subql #1,%d2 4b50e: 7006 moveq #6,%d0 4b510: b082 cmpl %d2,%d0 4b512: 6570 bcss 4b584 4b514: 303b 2a08 movew %pc@(4b51e ,%d2:l:2),%d0 4b518: 48c0 extl %d0 4b51a: 4efb 0802 jmp %pc@(4b51e ,%d0:l) 4b51e: 000e 016 <== NOT EXECUTED 4b520: 002a 052 <== NOT EXECUTED 4b522: 0024 044 <== NOT EXECUTED 4b524: 0024 044 <== NOT EXECUTED 4b526: 0046 0106 <== NOT EXECUTED 4b528: 0036 066 <== NOT EXECUTED 4b52a: 0060 0140 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4b52c: 41ec 0050 lea %a4@(80),%a0 4b530: 2948 004c movel %a0,%a4@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4b534: 41ec 004c lea %a4@(76),%a0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4b538: 42ac 0050 clrl %a4@(80) the_chain->last = _Chain_Head(the_chain); 4b53c: 2948 0054 movel %a0,%a4@(84) 4b540: 605e bras 4b5a0 case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 4b542: 2952 004c movel %a2@,%a4@(76) break; 4b546: 6058 bras 4b5a0 case IMFS_DEVICE: node->info.device.major = info->device.major; 4b548: 2952 004c movel %a2@,%a4@(76) node->info.device.minor = info->device.minor; 4b54c: 296a 0004 0050 movel %a2@(4),%a4@(80) break; 4b552: 604c bras 4b5a0 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4b554: 42ac 0054 clrl %a4@(84) <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4b558: 4280 clrl %d0 <== NOT EXECUTED 4b55a: 4281 clrl %d1 <== NOT EXECUTED 4b55c: 2940 004c movel %d0,%a4@(76) <== NOT EXECUTED 4b560: 2941 0050 movel %d1,%a4@(80) <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 4b564: 42ac 0054 clrl %a4@(84) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4b568: 4280 clrl %d0 4b56a: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4b56c: 42ac 0058 clrl %a4@(88) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4b570: 2940 004c movel %d0,%a4@(76) 4b574: 2941 0050 movel %d1,%a4@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4b578: 42ac 005c clrl %a4@(92) break; 4b57c: 6022 bras 4b5a0 case IMFS_FIFO: node->info.fifo.pipe = NULL; 4b57e: 42ac 004c clrl %a4@(76) break; 4b582: 601c bras 4b5a0 default: assert(0); 4b584: 4879 0005 a9c4 pea 5a9c4 <== NOT EXECUTED 4b58a: 4879 0005 aa0f pea 5aa0f <__FUNCTION__.5851> <== NOT EXECUTED 4b590: 4878 005c pea 5c <== NOT EXECUTED 4b594: 4879 0005 a9c6 pea 5a9c6 <== NOT EXECUTED 4b59a: 4eb9 0004 8da4 jsr 48da4 <__assert_func> <== NOT EXECUTED /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4b5a0: 206b 0010 moveal %a3@(16),%a0 4b5a4: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4b5a8: 2010 movel %a0@,%d0 4b5aa: 5280 addql #1,%d0 4b5ac: 2080 movel %d0,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4b5ae: 2053 moveal %a3@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4b5b0: 2940 0034 movel %d0,%a4@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4b5b4: 2948 0008 movel %a0,%a4@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4b5b8: 2f0c movel %a4,%sp@- 4b5ba: 4868 004c pea %a0@(76) 4b5be: 4eb9 0004 58d0 jsr 458d0 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4b5c4: 508f addql #8,%sp } 4b5c6: 200c movel %a4,%d0 4b5c8: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b5ce: 4e5e unlk %fp 4b5d0: 4e75 rts ... 000435b2 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 435b2: 4e56 ffe0 linkw %fp,#-32 435b6: 206e 0008 moveal %fp@(8),%a0 435ba: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 435be: 242e 000c movel %fp@(12),%d2 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 435c2: 4a88 tstl %a0 435c4: 6612 bnes 435d8 435c6: 4879 0005 fa36 pea 5fa36 <== NOT EXECUTED 435cc: 4879 0005 fb04 pea 5fb04 <__FUNCTION__.6602> <== NOT EXECUTED 435d2: 4878 0084 pea 84 <== NOT EXECUTED 435d6: 6014 bras 435ec <== NOT EXECUTED assert( level >= 0 ); 435d8: 4a82 tstl %d2 435da: 6c1c bges 435f8 435dc: 4879 0005 fa44 pea 5fa44 <== NOT EXECUTED 435e2: 4879 0005 fb04 pea 5fb04 <__FUNCTION__.6602> <== NOT EXECUTED 435e8: 4878 0086 pea 86 <== NOT EXECUTED 435ec: 4879 0005 f98a pea 5f98a <== NOT EXECUTED 435f2: 4eb9 0004 3cfc jsr 43cfc <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 435f8: 7001 moveq #1,%d0 435fa: b0a8 0048 cmpl %a0@(72),%d0 435fe: 6712 beqs 43612 43600: 4879 0005 fa4f pea 5fa4f <== NOT EXECUTED 43606: 4879 0005 fb04 pea 5fb04 <__FUNCTION__.6602> <== NOT EXECUTED 4360c: 4878 0088 pea 88 <== NOT EXECUTED 43610: 60da bras 435ec <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 43612: 2a08 movel %a0,%d5 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43614: 2802 movel %d2,%d4 43616: 0685 0000 0050 addil #80,%d5 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 4361c: 4bf9 0005 0bb0 lea 50bb0 ,%a5 IMFS_print_jnode( the_jnode ); 43622: 49f9 0004 3436 lea 43436 ,%a4 if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43628: 5284 addql #1,%d4 4362a: 47f9 0004 35b2 lea 435b2 ,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43630: 2468 004c moveal %a0@(76),%a2 43634: 6034 bras 4366a !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 43636: 4283 clrl %d3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 43638: 2079 0006 15a0 moveal 615a0 <_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++ ) 4363e: 5283 addql #1,%d3 fprintf(stdout, "...." ); 43640: 2f28 0008 movel %a0@(8),%sp@- 43644: 4879 0005 fa75 pea 5fa75 4364a: 4e95 jsr %a5@ !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++ ) 4364c: 508f addql #8,%sp 4364e: b483 cmpl %d3,%d2 43650: 6ce6 bges 43638 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 43652: 2f0a movel %a2,%sp@- 43654: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 43656: 588f addql #4,%sp 43658: 7001 moveq #1,%d0 4365a: b0aa 0048 cmpl %a2@(72),%d0 4365e: 6608 bnes 43668 IMFS_dump_directory( the_jnode, level + 1 ); 43660: 2f04 movel %d4,%sp@- 43662: 2f0a movel %a2,%sp@- 43664: 4e93 jsr %a3@ 43666: 508f addql #8,%sp the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 43668: 2452 moveal %a2@,%a2 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 4366a: ba8a cmpl %a2,%d5 4366c: 66c8 bnes 43636 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 4366e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43674: 4e5e unlk %fp 43676: 4e75 rts 000482b6 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 482b6: 4e56 ff9c linkw %fp,#-100 482ba: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 482be: 246e 0014 moveal %fp@(20),%a2 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 482c2: 2a0e movel %fp,%d5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 482c4: 4282 clrl %d2 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 482c6: 0685 ffff ffc7 addil #-57,%d5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 482cc: 2e3c 0004 8980 movel #297344,%d7 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 482d2: 2a6e 0008 moveal %fp@(8),%a5 482d6: 286e 000c moveal %fp@(12),%a4 482da: 282e 0010 movel %fp@(16),%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 482de: 2652 moveal %a2@,%a3 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 482e0: 486e fffc pea %fp@(-4) 482e4: 2f05 movel %d5,%sp@- 482e6: 2f0c movel %a4,%sp@- 482e8: 4875 2800 pea %a5@(00000000,%d2:l) 482ec: 4eb9 0004 8a10 jsr 48a10 pathnamelen -= len; 482f2: 2c2e fffc movel %fp@(-4),%d6 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 482f6: 2600 movel %d0,%d3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 482f8: 4fef 0010 lea %sp@(16),%sp 482fc: 4a92 tstl %a2@ 482fe: 6700 00dc beqw 483dc rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 48302: 4a80 tstl %d0 48304: 671c beqs 48322 if ( node->type == IMFS_DIRECTORY ) 48306: 7001 moveq #1,%d0 48308: b0ab 0048 cmpl %a3@(72),%d0 4830c: 6614 bnes 48322 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4830e: 4878 0001 pea 1 48312: 2f0a movel %a2,%sp@- 48314: 4eb9 0004 8136 jsr 48136 4831a: 508f addql #8,%sp 4831c: 4a80 tstl %d0 4831e: 6700 0162 beqw 48482 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 48322: 2652 moveal %a2@,%a3 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 48324: d486 addl %d6,%d2 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 48326: 99c6 subal %d6,%a4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 48328: 7003 moveq #3,%d0 4832a: b083 cmpl %d3,%d0 4832c: 6742 beqs 48370 4832e: 7204 moveq #4,%d1 48330: b283 cmpl %d3,%d1 48332: 6700 00c0 beqw 483f4 48336: 103c 0002 moveb #2,%d0 4833a: b083 cmpl %d3,%d0 4833c: 6600 00c8 bnew 48406 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 48340: 2079 0005 b544 moveal 5b544 ,%a0 48346: b7e8 0018 cmpal %a0@(24),%a3 4834a: 6794 beqs 482e0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 4834c: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 48350: b7e8 001c cmpal %a0@(28),%a3 48354: 6614 bnes 4836a */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 48356: 4878 0014 pea 14 4835a: 260e movel %fp,%d3 4835c: 4868 0008 pea %a0@(8) 48360: 0683 ffff ffe8 addil #-24,%d3 48366: 6000 00ca braw 48432 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4836a: 266b 0008 moveal %a3@(8),%a3 4836e: 6068 bras 483d8 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 48370: 202b 0048 movel %a3@(72),%d0 48374: 7203 moveq #3,%d1 48376: b280 cmpl %d0,%d1 48378: 6614 bnes 4838e IMFS_evaluate_hard_link( pathloc, 0 ); 4837a: 42a7 clrl %sp@- 4837c: 2f0a movel %a2,%sp@- 4837e: 4eb9 0004 8194 jsr 48194 node = pathloc->node_access; 48384: 2652 moveal %a2@,%a3 if ( !node ) 48386: 508f addql #8,%sp 48388: 4a8b tstl %a3 4838a: 661e bnes 483aa 4838c: 6024 bras 483b2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 4838e: 7204 moveq #4,%d1 48390: b280 cmpl %d0,%d1 48392: 6616 bnes 483aa result = IMFS_evaluate_sym_link( pathloc, 0 ); 48394: 42a7 clrl %sp@- 48396: 2f0a movel %a2,%sp@- 48398: 4eb9 0004 81ee jsr 481ee node = pathloc->node_access; 4839e: 2652 moveal %a2@,%a3 if ( result == -1 ) 483a0: 508f addql #8,%sp 483a2: 72ff moveq #-1,%d1 483a4: b280 cmpl %d0,%d1 483a6: 6700 00ea beqw 48492 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 483aa: 7001 moveq #1,%d0 483ac: b0ab 0048 cmpl %a3@(72),%d0 483b0: 6712 beqs 483c4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 483b2: 4eb9 0004 ca1c jsr 4ca1c <__errno> 483b8: 7e14 moveq #20,%d7 483ba: 76ff moveq #-1,%d3 483bc: 2040 moveal %d0,%a0 483be: 2087 movel %d7,%a0@ 483c0: 6000 00d2 braw 48494 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 483c4: 206b 0058 moveal %a3@(88),%a0 483c8: 4a88 tstl %a0 483ca: 6656 bnes 48422 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 483cc: 2f05 movel %d5,%sp@- 483ce: 2047 moveal %d7,%a0 483d0: 2f0b movel %a3,%sp@- 483d2: 4e90 jsr %a0@ if ( !node ) 483d4: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 483d6: 2640 moveal %d0,%a3 if ( !node ) 483d8: 4a8b tstl %a3 483da: 6612 bnes 483ee rtems_set_errno_and_return_minus_one( ENOENT ); 483dc: 4eb9 0004 ca1c jsr 4ca1c <__errno> 483e2: 7c02 moveq #2,%d6 483e4: 76ff moveq #-1,%d3 483e6: 2040 moveal %d0,%a0 483e8: 2086 movel %d6,%a0@ 483ea: 6000 00a8 braw 48494 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 483ee: 248b movel %a3,%a2@ break; 483f0: 6000 feee braw 482e0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 483f4: 4eb9 0004 ca1c jsr 4ca1c <__errno> 483fa: 7a5b moveq #91,%d5 483fc: 76ff moveq #-1,%d3 483fe: 2040 moveal %d0,%a0 48400: 2085 movel %d5,%a0@ 48402: 6000 0090 braw 48494 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 48406: 4a83 tstl %d3 48408: 6708 beqs 48412 4840a: 7004 moveq #4,%d0 4840c: b083 cmpl %d3,%d0 4840e: 6600 fed0 bnew 482e0 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 48412: 7201 moveq #1,%d1 48414: b2ab 0048 cmpl %a3@(72),%d1 48418: 664e bnes 48468 if ( node->info.directory.mt_fs != NULL ) { 4841a: 206b 0058 moveal %a3@(88),%a0 4841e: 4a88 tstl %a0 48420: 6746 beqs 48468 newloc = node->info.directory.mt_fs->mt_fs_root; 48422: 4878 0014 pea 14 48426: 260e movel %fp,%d3 48428: 0683 ffff ffe8 addil #-24,%d3 4842e: 4868 001c pea %a0@(28) 48432: 2f03 movel %d3,%sp@- 48434: 47f9 0004 d23c lea 4d23c ,%a3 4843a: 4e93 jsr %a3@ *pathloc = newloc; 4843c: 4878 0014 pea 14 48440: 2f03 movel %d3,%sp@- 48442: 2f0a movel %a2,%sp@- 48444: 4e93 jsr %a3@ return (*pathloc->ops->evalpath_h)( &pathname[i-len], 48446: 206e fffc moveal %fp@(-4),%a0 4844a: 9488 subl %a0,%d2 4844c: 2f0a movel %a2,%sp@- 4844e: 226a 000c moveal %a2@(12),%a1 48452: 2f04 movel %d4,%sp@- 48454: 4874 8800 pea %a4@(00000000,%a0:l) 48458: 4875 2800 pea %a5@(00000000,%d2:l) 4845c: 2051 moveal %a1@,%a0 4845e: 4e90 jsr %a0@ 48460: 4fef 0028 lea %sp@(40),%sp 48464: 2600 movel %d0,%d3 48466: 602c bras 48494 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 48468: 2f0a movel %a2,%sp@- 4846a: 4eb9 0004 80c8 jsr 480c8 48470: 2600 movel %d0,%d3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 48472: 2e84 movel %d4,%sp@ 48474: 2f0a movel %a2,%sp@- 48476: 4eb9 0004 8136 jsr 48136 4847c: 508f addql #8,%sp 4847e: 4a80 tstl %d0 48480: 6612 bnes 48494 rtems_set_errno_and_return_minus_one( EACCES ); 48482: 4eb9 0004 ca1c jsr 4ca1c <__errno> 48488: 780d moveq #13,%d4 4848a: 76ff moveq #-1,%d3 4848c: 2040 moveal %d0,%a0 4848e: 2084 movel %d4,%a0@ 48490: 6002 bras 48494 48492: 2600 movel %d0,%d3 <== NOT EXECUTED return result; } 48494: 2003 movel %d3,%d0 48496: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 4849c: 4e5e unlk %fp 4849e: 4e75 rts 00048194 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 48194: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 48196: 4e56 0000 linkw %fp,#0 4819a: 2f0a movel %a2,%sp@- 4819c: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 481a0: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 481a2: b0a8 0048 cmpl %a0@(72),%d0 481a6: 670c beqs 481b4 rtems_fatal_error_occurred (0xABCD0000); 481a8: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 481ae: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 481b4: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 481b8: 2f0a movel %a2,%sp@- 481ba: 4eb9 0004 80c8 jsr 480c8 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 481c0: 2f2e 000c movel %fp@(12),%sp@- 481c4: 2f0a movel %a2,%sp@- 481c6: 4eb9 0004 8136 jsr 48136 481cc: 4fef 000c lea %sp@(12),%sp 481d0: 4a80 tstl %d0 481d2: 6704 beqs 481d8 481d4: 4280 clrl %d0 481d6: 600e bras 481e6 rtems_set_errno_and_return_minus_one( EACCES ); 481d8: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 481de: 720d moveq #13,%d1 <== NOT EXECUTED 481e0: 2040 moveal %d0,%a0 <== NOT EXECUTED 481e2: 70ff moveq #-1,%d0 <== NOT EXECUTED 481e4: 2081 movel %d1,%a0@ <== NOT EXECUTED return result; } 481e6: 246e fffc moveal %fp@(-4),%a2 481ea: 4e5e unlk %fp 481ec: 4e75 rts 000481ee : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 481ee: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 481f0: 4e56 fff0 linkw %fp,#-16 481f4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 481f8: 246e 0008 moveal %fp@(8),%a2 481fc: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode = node->node_access; 48200: 2652 moveal %a2@,%a3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 48202: b0ab 0048 cmpl %a3@(72),%d0 48206: 6708 beqs 48210 rtems_fatal_error_occurred (0xABCD0000); 48208: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 4820e: 600c bras 4821c <== NOT EXECUTED if ( !jnode->Parent ) 48210: 202b 0008 movel %a3@(8),%d0 48214: 660c bnes 48222 rtems_fatal_error_occurred( 0xBAD00000 ); 48216: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 4821c: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 48222: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 48224: 206b 004c moveal %a3@(76),%a0 48228: 762f moveq #47,%d3 4822a: 1010 moveb %a0@,%d0 4822c: 1200 moveb %d0,%d1 4822e: 49c1 extbl %d1 48230: b681 cmpl %d1,%d3 48232: 6710 beqs 48244 48234: 163c 005c moveb #92,%d3 48238: b681 cmpl %d1,%d3 4823a: 6708 beqs 48244 4823c: 4a00 tstb %d0 4823e: 6704 beqs 48244 48240: 4280 clrl %d0 48242: 601e bras 48262 48244: 4878 0014 pea 14 48248: 2079 0005 b544 moveal 5b544 ,%a0 4824e: 41e8 0018 lea %a0@(24),%a0 48252: 2f08 movel %a0,%sp@- 48254: 2f0a movel %a2,%sp@- 48256: 4eb9 0004 d23c jsr 4d23c 4825c: 4fef 000c lea %sp@(12),%sp 48260: 7001 moveq #1,%d0 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 48262: 266b 004c moveal %a3@(76),%a3 48266: d7c0 addal %d0,%a3 48268: 2f0b movel %a3,%sp@- 4826a: 4eb9 0004 dde8 jsr 4dde8 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 48270: 2e8a movel %a2,%sp@ 48272: 2f02 movel %d2,%sp@- 48274: 2f00 movel %d0,%sp@- 48276: 2f0b movel %a3,%sp@- 48278: 4eb9 0004 82b6 jsr 482b6 4827e: 2640 moveal %d0,%a3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 48280: 2f0a movel %a2,%sp@- 48282: 4eb9 0004 80c8 jsr 480c8 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 48288: 2f02 movel %d2,%sp@- 4828a: 2f0a movel %a2,%sp@- 4828c: 4eb9 0004 8136 jsr 48136 48292: 4fef 001c lea %sp@(28),%sp 48296: 4a80 tstl %d0 48298: 6610 bnes 482aa rtems_set_errno_and_return_minus_one( EACCES ); 4829a: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 482a0: 740d moveq #13,%d2 <== NOT EXECUTED 482a2: 2040 moveal %d0,%a0 <== NOT EXECUTED 482a4: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 482a8: 2082 movel %d2,%a0@ <== NOT EXECUTED return result; } 482aa: 200b movel %a3,%d0 482ac: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 482b2: 4e5e unlk %fp 482b4: 4e75 rts 0004b5d4 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4b5d4: 4e56 fff8 linkw %fp,#-8 4b5d8: 206e 0008 moveal %fp@(8),%a0 4b5dc: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4b5de: 2450 moveal %a0@,%a2 int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4b5e0: 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 ) ) 4b5e2: 4282 clrl %d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4b5e4: 4eb9 0004 90bc jsr 490bc if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4b5ea: 4281 clrl %d1 4b5ec: 3400 movew %d0,%d2 4b5ee: 322a 0038 movew %a2@(56),%d1 4b5f2: b282 cmpl %d2,%d1 4b5f4: 6714 beqs 4b60a 4b5f6: 4a40 tstw %d0 <== NOT EXECUTED 4b5f8: 6710 beqs 4b60a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4b5fa: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4b600: 7201 moveq #1,%d1 <== NOT EXECUTED 4b602: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b604: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b606: 2081 movel %d1,%a0@ <== NOT EXECUTED 4b608: 6030 bras 4b63a <== NOT EXECUTED /* * 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); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4b60a: 202a 002e movel %a2@(46),%d0 4b60e: 222e 000c movel %fp@(12),%d1 4b612: 0280 ffff f000 andil #-4096,%d0 4b618: 0281 0000 0fff andil #4095,%d1 4b61e: 8280 orl %d0,%d1 4b620: 2541 002e movel %d1,%a2@(46) IMFS_update_ctime( jnode ); 4b624: 42a7 clrl %sp@- 4b626: 486e fff8 pea %fp@(-8) 4b62a: 4eb9 0004 90d0 jsr 490d0 4b630: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4b636: 508f addql #8,%sp */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 4b638: 4280 clrl %d0 return 0; } 4b63a: 242e fff0 movel %fp@(-16),%d2 4b63e: 246e fff4 moveal %fp@(-12),%a2 4b642: 4e5e unlk %fp 4b644: 4e75 rts ... 0004b648 : int cmd, rtems_libio_t *iop ) { return 0; } 4b648: 4280 clrl %d0 int IMFS_fcntl( int cmd, rtems_libio_t *iop ) { 4b64a: 4e56 0000 linkw %fp,#0 return 0; } 4b64e: 4e5e unlk %fp 4b650: 4e75 rts ... 00050818 : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } 50818: 4280 clrl %d0 #include "imfs.h" int IMFS_fdatasync( rtems_libio_t *iop ) { 5081a: 4e56 0000 linkw %fp,#0 return 0; } 5081e: 4e5e unlk %fp 50820: 4e75 rts ... 000488da : } int IMFS_fifo_close( rtems_libio_t *iop ) { 488da: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 488de: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 488e2: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 488e6: 246b 0038 moveal %a3@(56),%a2 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 488ea: 2f0b movel %a3,%sp@- <== NOT EXECUTED 488ec: 486a 004c pea %a2@(76) <== NOT EXECUTED 488f0: 4eb9 0004 afbc jsr 4afbc <== NOT EXECUTED if (! err) { 488f6: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 488f8: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 488fa: 662a bnes 48926 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 488fc: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 48902: 2f0a movel %a2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 48904: c1ab 0014 andl %d0,%a3@(20) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 48908: 4eb9 0004 91d4 jsr 491d4 <== NOT EXECUTED 4890e: 588f addql #4,%sp <== NOT EXECUTED 48910: 4a80 tstl %d0 <== NOT EXECUTED 48912: 6624 bnes 48938 <== NOT EXECUTED 48914: 4a6a 0032 tstw %a2@(50) <== NOT EXECUTED 48918: 661e bnes 48938 <== NOT EXECUTED free(jnode); 4891a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4891c: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED 48922: 588f addql #4,%sp <== NOT EXECUTED 48924: 6012 bras 48938 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 48926: 4a80 tstl %d0 <== NOT EXECUTED 48928: 6c0e bges 48938 <== NOT EXECUTED 4892a: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 48930: 4482 negl %d2 <== NOT EXECUTED 48932: 2040 moveal %d0,%a0 <== NOT EXECUTED 48934: 2082 movel %d2,%a0@ <== NOT EXECUTED 48936: 74ff moveq #-1,%d2 <== NOT EXECUTED } 48938: 2002 movel %d2,%d0 <== NOT EXECUTED 4893a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 48940: 4e5e unlk %fp <== NOT EXECUTED 48942: 4e75 rts 000487a2 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 487a2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 487a6: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 487aa: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 487ae: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 487b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 487b4: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 487ba: 6620 bnes 487dc <== NOT EXECUTED if (buffer == NULL) 487bc: 4a89 tstl %a1 <== NOT EXECUTED 487be: 6604 bnes 487c4 <== NOT EXECUTED 487c0: 74f2 moveq #-14,%d2 <== NOT EXECUTED 487c2: 6034 bras 487f8 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 487c4: 4a91 tstl %a1@ <== NOT EXECUTED 487c6: 670a beqs 487d2 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 487c8: 7001 moveq #1,%d0 <== NOT EXECUTED 487ca: 4282 clrl %d2 <== NOT EXECUTED 487cc: 81a8 0014 orl %d0,%a0@(20) <== NOT EXECUTED 487d0: 6034 bras 48806 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 487d2: 70fe moveq #-2,%d0 <== NOT EXECUTED 487d4: 4282 clrl %d2 <== NOT EXECUTED 487d6: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED 487da: 602a bras 48806 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 487dc: 2f08 movel %a0,%sp@- <== NOT EXECUTED 487de: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 487e2: 2f09 movel %a1,%sp@- <== NOT EXECUTED 487e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 487e6: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 487ea: 4eb9 0004 ac1e jsr 4ac1e <== NOT EXECUTED IMFS_FIFO_RETURN(err); 487f0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 487f4: 2400 movel %d0,%d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 487f6: 6c0e bges 48806 <== NOT EXECUTED 487f8: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 487fe: 4482 negl %d2 <== NOT EXECUTED 48800: 2040 moveal %d0,%a0 <== NOT EXECUTED 48802: 2082 movel %d2,%a0@ <== NOT EXECUTED 48804: 74ff moveq #-1,%d2 <== NOT EXECUTED } 48806: 2002 movel %d2,%d0 <== NOT EXECUTED 48808: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4880c: 4e5e unlk %fp <== NOT EXECUTED 4880e: 4e75 rts 0004874c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4874c: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 48750: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 48754: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 48758: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4875a: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 4875e: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 48762: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 48766: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4876a: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 4876e: 4eb9 0004 abc4 jsr 4abc4 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 48774: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 48778: 2800 movel %d0,%d4 <== NOT EXECUTED 4877a: 2600 movel %d0,%d3 <== NOT EXECUTED 4877c: 5bc2 smi %d2 <== NOT EXECUTED 4877e: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 48780: 4a82 tstl %d2 <== NOT EXECUTED 48782: 6a10 bpls 48794 <== NOT EXECUTED 48784: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4878a: 4484 negl %d4 <== NOT EXECUTED 4878c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4878e: 74ff moveq #-1,%d2 <== NOT EXECUTED 48790: 76ff moveq #-1,%d3 <== NOT EXECUTED 48792: 2084 movel %d4,%a0@ <== NOT EXECUTED } 48794: 2203 movel %d3,%d1 <== NOT EXECUTED 48796: 2002 movel %d2,%d0 <== NOT EXECUTED 48798: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4879e: 4e5e unlk %fp <== NOT EXECUTED 487a0: 4e75 rts 00048944 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 48944: 4e56 0000 linkw %fp,#0 48948: 206e 0008 moveal %fp@(8),%a0 4894c: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4894e: 2f08 movel %a0,%sp@- 48950: 2068 0038 moveal %a0@(56),%a0 48954: 41e8 004c lea %a0@(76),%a0 48958: 2f08 movel %a0,%sp@- 4895a: 4eb9 0004 b084 jsr 4b084 IMFS_FIFO_RETURN(err); 48960: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 48962: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 48964: 6c0e bges 48974 48966: 4eb9 0004 ca1c jsr 4ca1c <__errno> 4896c: 4482 negl %d2 4896e: 2040 moveal %d0,%a0 48970: 2082 movel %d2,%a0@ 48972: 74ff moveq #-1,%d2 } 48974: 2002 movel %d2,%d0 48976: 242e fffc movel %fp@(-4),%d2 4897a: 4e5e unlk %fp 4897c: 4e75 rts ... 00048878 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 48878: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 4887c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 48880: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48882: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 48884: 2f08 movel %a0,%sp@- <== NOT EXECUTED 48886: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4888a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 4888e: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 48892: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 48896: 4eb9 0004 ac7e jsr 4ac7e <== NOT EXECUTED if (err > 0) 4889c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED size_t count ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 488a0: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 488a2: 6f16 bles 488ba <== NOT EXECUTED IMFS_update_atime(jnode); 488a4: 42a7 clrl %sp@- <== NOT EXECUTED 488a6: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 488aa: 4eb9 0004 90d0 jsr 490d0 <== NOT EXECUTED 488b0: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 488b6: 508f addql #8,%sp <== NOT EXECUTED 488b8: 6012 bras 488cc <== NOT EXECUTED IMFS_FIFO_RETURN(err); 488ba: 4a80 tstl %d0 <== NOT EXECUTED 488bc: 670e beqs 488cc <== NOT EXECUTED 488be: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 488c4: 4482 negl %d2 <== NOT EXECUTED 488c6: 2040 moveal %d0,%a0 <== NOT EXECUTED 488c8: 2082 movel %d2,%a0@ <== NOT EXECUTED 488ca: 74ff moveq #-1,%d2 <== NOT EXECUTED } 488cc: 2002 movel %d2,%d0 <== NOT EXECUTED 488ce: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 488d2: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 488d6: 4e5e unlk %fp <== NOT EXECUTED 488d8: 4e75 rts 00048810 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 48810: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 48814: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 48818: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4881a: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 4881c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4881e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 48822: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, const void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 48826: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 4882a: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 4882e: 4eb9 0004 ade6 jsr 4ade6 <== NOT EXECUTED if (err > 0) { 48834: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED size_t count ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 48838: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 4883a: 6f1c bles 48858 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 4883c: 42a7 clrl %sp@- <== NOT EXECUTED 4883e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 48842: 4eb9 0004 90d0 jsr 490d0 <== NOT EXECUTED 48848: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 4884c: 508f addql #8,%sp <== NOT EXECUTED 4884e: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 48852: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED 48856: 6012 bras 4886a <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 48858: 4a80 tstl %d0 <== NOT EXECUTED 4885a: 670e beqs 4886a <== NOT EXECUTED 4885c: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 48862: 4482 negl %d2 <== NOT EXECUTED 48864: 2040 moveal %d0,%a0 <== NOT EXECUTED 48866: 2082 movel %d2,%a0@ <== NOT EXECUTED 48868: 74ff moveq #-1,%d2 <== NOT EXECUTED } 4886a: 2002 movel %d2,%d0 <== NOT EXECUTED 4886c: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 48870: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 48874: 4e5e unlk %fp <== NOT EXECUTED 48876: 4e75 rts 00048980 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 48980: 4e56 fff0 linkw %fp,#-16 48984: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48988: 246e 0008 moveal %fp@(8),%a2 4898c: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 48990: 4a8a tstl %a2 48992: 661c bnes 489b0 48994: 4879 0005 add9 pea 5add9 <_global_impure_ptr+0x1b1> <== NOT EXECUTED 4899a: 4879 0005 a5ff pea 5a5ff <__FUNCTION__.5388> <== NOT EXECUTED 489a0: 4878 002a pea 2a <== NOT EXECUTED 489a4: 4879 0005 a5ae pea 5a5ae <== NOT EXECUTED 489aa: 4eb9 0004 8da4 jsr 48da4 <__assert_func> <== NOT EXECUTED if ( !name ) 489b0: 4a82 tstl %d2 489b2: 674e beqs 48a02 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 489b4: 4879 0005 a5fa pea 5a5fa 489ba: 49f9 0004 d924 lea 4d924 ,%a4 489c0: 2f02 movel %d2,%sp@- 489c2: 4e94 jsr %a4@ 489c4: 508f addql #8,%sp 489c6: 4a80 tstl %d0 489c8: 673a beqs 48a04 return directory; if ( !strcmp( name, dotdotname ) ) 489ca: 4879 0005 a5fc pea 5a5fc 489d0: 2f02 movel %d2,%sp@- 489d2: 4e94 jsr %a4@ 489d4: 508f addql #8,%sp 489d6: 4a80 tstl %d0 489d8: 6606 bnes 489e0 return directory->Parent; 489da: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED 489de: 6024 bras 48a04 <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 489e0: 266a 004c moveal %a2@(76),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 489e4: 45ea 0050 lea %a2@(80),%a2 489e8: 6014 bras 489fe !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 489ea: 486b 000c pea %a3@(12) 489ee: 2f02 movel %d2,%sp@- 489f0: 4e94 jsr %a4@ 489f2: 508f addql #8,%sp 489f4: 4a80 tstl %d0 489f6: 6604 bnes 489fc 489f8: 244b moveal %a3,%a2 489fa: 6008 bras 48a04 the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 489fc: 2653 moveal %a3@,%a3 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 489fe: b5cb cmpal %a3,%a2 48a00: 66e8 bnes 489ea 48a02: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 48a04: 200a movel %a2,%d0 48a06: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48a0c: 4e5e unlk %fp 48a0e: 4e75 rts 0004d260 : int IMFS_freenodinfo( rtems_filesystem_location_info_t *pathloc /* IN */ ) { return 0; } 4d260: 4280 clrl %d0 */ int IMFS_freenodinfo( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4d262: 4e56 0000 linkw %fp,#0 return 0; } 4d266: 4e5e unlk %fp 4d268: 4e75 rts ... 0004d26c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d26c: 4e56 ffd8 linkw %fp,#-40 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4d270: 200e movel %fp,%d0 4d272: 0680 ffff ffec addil #-20,%d0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d278: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4d27c: 4878 0014 pea 14 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 4d280: 2400 movel %d0,%d2 4d282: 4bf9 0004 c9a8 lea 4c9a8 ,%a5 if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4d288: 49f9 0004 2d74 lea 42d74 ,%a4 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d28e: 266e 0008 moveal %fp@(8),%a3 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4d292: 486b 001c pea %a3@(28) /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 4d296: 246b 001c moveal %a3@(28),%a2 loc = temp_mt_entry->mt_fs_root; 4d29a: 2f00 movel %d0,%sp@- 4d29c: 4eb9 0005 1c44 jsr 51c44 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4d2a2: 4fef 000c lea %sp@(12),%sp 4d2a6: 42ab 001c clrl %a3@(28) do { next = jnode->Parent; 4d2aa: 266a 0008 moveal %a2@(8),%a3 loc.node_access = (void *)jnode; 4d2ae: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4d2b2: 2f02 movel %d2,%sp@- 4d2b4: 4e95 jsr %a5@ if ( jnode->type != IMFS_DIRECTORY ) { 4d2b6: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d2b8: 200a movel %a2,%d0 4d2ba: 0680 0000 0050 addil #80,%d0 4d2c0: 7201 moveq #1,%d1 4d2c2: b2aa 0048 cmpl %a2@(72),%d1 4d2c6: 6606 bnes 4d2ce 4d2c8: b0aa 004c cmpl %a2@(76),%d0 4d2cc: 660e bnes 4d2dc result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 4d2ce: 2f02 movel %d2,%sp@- 4d2d0: 42a7 clrl %sp@- 4d2d2: 4e94 jsr %a4@ if (result != 0) 4d2d4: 508f addql #8,%sp 4d2d6: 4a80 tstl %d0 4d2d8: 6626 bnes 4d300 4d2da: 244b moveal %a3,%a2 return -1; jnode = next; } if ( jnode != NULL ) { 4d2dc: 4a8a tstl %a2 4d2de: 6724 beqs 4d304 if ( jnode->type == IMFS_DIRECTORY ) { 4d2e0: 7001 moveq #1,%d0 4d2e2: b0aa 0048 cmpl %a2@(72),%d0 4d2e6: 66c2 bnes 4d2aa 4d2e8: 200a movel %a2,%d0 4d2ea: 0680 0000 0050 addil #80,%d0 4d2f0: b0aa 004c cmpl %a2@(76),%d0 4d2f4: 67b4 beqs 4d2aa if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 4d2f6: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 4d2fa: 4a8a tstl %a2 4d2fc: 66ac bnes 4d2aa 4d2fe: 6004 bras 4d304 <== NOT EXECUTED 4d300: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d302: 6002 bras 4d306 <== NOT EXECUTED 4d304: 4280 clrl %d0 return 0; } 4d306: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4d30c: 4e5e unlk %fp 4d30e: 4e75 rts 00048a10 : register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 48a10: 4280 clrl %d0 const char *path, int pathlen, char *token, int *token_len ) { 48a12: 4e56 fff0 linkw %fp,#-16 48a16: 226e 0008 moveal %fp@(8),%a1 48a1a: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 48a1e: 206e 000c moveal %fp@(12),%a0 48a22: 246e 0010 moveal %fp@(16),%a2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 48a26: 1211 moveb %a1@,%d1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 48a28: 6016 bras 48a40 token[i] = c; 48a2a: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) if ( i == IMFS_NAME_MAX ) 48a2e: 7220 moveq #32,%d1 48a30: b280 cmpl %d0,%d1 48a32: 6606 bnes 48a3a 48a34: 7404 moveq #4,%d2 48a36: 6000 0084 braw 48abc return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 48a3a: 5280 addql #1,%d0 48a3c: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 48a40: 762f moveq #47,%d3 48a42: 1401 moveb %d1,%d2 48a44: 49c2 extbl %d2 48a46: b682 cmpl %d2,%d3 48a48: 6710 beqs 48a5a 48a4a: 163c 005c moveb #92,%d3 48a4e: b682 cmpl %d2,%d3 48a50: 6708 beqs 48a5a 48a52: 4a01 tstb %d1 48a54: 6704 beqs 48a5a 48a56: b1c0 cmpal %d0,%a0 48a58: 6ed0 bgts 48a2a /* * Copy a seperator into token. */ if ( i == 0 ) { 48a5a: 4a80 tstl %d0 48a5c: 6610 bnes 48a6e token[i] = c; 48a5e: 1481 moveb %d1,%a2@ if ( (token[i] != '\0') && pathlen ) { 48a60: 6720 beqs 48a82 48a62: 4a88 tstl %a0 48a64: 671c beqs 48a82 48a66: 7401 moveq #1,%d2 48a68: 103c 0001 moveb #1,%d0 48a6c: 6016 bras 48a84 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 48a6e: 4a32 08ff tstb %a2@(ffffffff,%d0:l) 48a72: 6604 bnes 48a78 48a74: 7403 moveq #3,%d2 <== NOT EXECUTED 48a76: 600c bras 48a84 <== NOT EXECUTED token[i] = '\0'; 48a78: 7403 moveq #3,%d2 48a7a: 4201 clrb %d1 48a7c: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) 48a80: 6002 bras 48a84 48a82: 4282 clrl %d2 /* * Set token_len to the number of characters copied. */ *token_len = i; 48a84: 206e 0014 moveal %fp@(20),%a0 /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 48a88: 7603 moveq #3,%d3 /* * Set token_len to the number of characters copied. */ *token_len = i; 48a8a: 2080 movel %d0,%a0@ /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 48a8c: b682 cmpl %d2,%d3 48a8e: 662c bnes 48abc if ( strcmp( token, "..") == 0 ) 48a90: 4879 0005 a616 pea 5a616 <__FUNCTION__.5388+0x17> 48a96: 47f9 0004 d924 lea 4d924 ,%a3 48a9c: 2f0a movel %a2,%sp@- 48a9e: 4e93 jsr %a3@ 48aa0: 508f addql #8,%sp 48aa2: 4a80 tstl %d0 48aa4: 6604 bnes 48aaa 48aa6: 7402 moveq #2,%d2 48aa8: 6012 bras 48abc type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 48aaa: 4879 0005 a617 pea 5a617 <__FUNCTION__.5388+0x18> 48ab0: 2f0a movel %a2,%sp@- 48ab2: 4e93 jsr %a3@ 48ab4: 508f addql #8,%sp 48ab6: 4a80 tstl %d0 48ab8: 6602 bnes 48abc 48aba: 7401 moveq #1,%d2 type = IMFS_CURRENT_DIR; } return type; } 48abc: 2002 movel %d2,%d0 48abe: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 48ac4: 4e5e unlk %fp 48ac6: 4e75 rts 00048ac8 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 48ac8: 4281 clrl %d1 48aca: 7010 moveq #16,%d0 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 48acc: 4e56 fff4 linkw %fp,#-12 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 48ad0: 2079 0005 b438 moveal 5b438 ,%a0 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 48ad6: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48ada: 246e 0008 moveal %fp@(8),%a2 48ade: 242e 0014 movel %fp@(20),%d2 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 48ae2: 5281 addql #1,%d1 48ae4: b1c0 cmpal %d0,%a0 48ae6: 670e beqs 48af6 48ae8: 7606 moveq #6,%d3 48aea: d080 addl %d0,%d0 48aec: b681 cmpl %d1,%d3 48aee: 66f2 bnes 48ae2 48af0: 203c 0000 0080 movel #128,%d0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 48af6: 23c0 0005 c43c movel %d0,5c43c /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 48afc: 4eb9 0004 b48a jsr 4b48a temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 48b02: 4878 0030 pea 30 48b06: 4879 0005 a994 pea 5a994 48b0c: 486a 0038 pea %a2@(56) * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 48b10: 256e 000c 0028 movel %fp@(12),%a2@(40) /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 48b16: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 48b1a: 2542 0024 movel %d2,%a2@(36) temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 48b1e: 4eb9 0004 d23c jsr 4d23c /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 48b24: 4878 000c pea c 48b28: 4878 0001 pea 1 48b2c: 4eb9 0004 8e68 jsr 48e68 if ( !fs_info ) { 48b32: 4fef 0014 lea %sp@(20),%sp temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 48b36: 2040 moveal %d0,%a0 if ( !fs_info ) { 48b38: 4a80 tstl %d0 48b3a: 661c bnes 48b58 free(temp_mt_entry->mt_fs_root.node_access); 48b3c: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 48b40: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 48b46: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 48b4c: 588f addql #4,%sp <== NOT EXECUTED 48b4e: 720c moveq #12,%d1 <== NOT EXECUTED 48b50: 2040 moveal %d0,%a0 <== NOT EXECUTED 48b52: 70ff moveq #-1,%d0 <== NOT EXECUTED 48b54: 2081 movel %d1,%a0@ <== NOT EXECUTED 48b56: 6024 bras 48b7c <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 48b58: 7001 moveq #1,%d0 fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 48b5a: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 48b5e: 2080 movel %d0,%a0@ fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 48b60: 7001 moveq #1,%d0 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 48b62: 216e 0010 0004 movel %fp@(16),%a0@(4) fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 48b68: 2340 0034 movel %d0,%a1@(52) * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 48b6c: 2142 0008 movel %d2,%a0@(8) fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 48b70: 2548 0034 movel %a0,%a2@(52) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 48b74: 4eb9 0004 abce jsr 4abce 48b7a: 4280 clrl %d0 return 0; } 48b7c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48b82: 4e5e unlk %fp 48b84: 4e75 rts ... 00042a54 : /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 42a54: 4280 clrl %d0 42a56: 7207 moveq #7,%d1 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 42a58: 4e56 ffbc linkw %fp,#-68 42a5c: 206e 0008 moveal %fp@(8),%a0 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 42a60: 2050 moveal %a0@,%a0 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 42a62: 2f03 movel %d3,%sp@- 42a64: 262e 0010 movel %fp@(16),%d3 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 42a68: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 42a6c: 3028 0032 movew %a0@(50),%d0 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 42a70: 2f02 movel %d2,%sp@- /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 42a72: b280 cmpl %d0,%d1 42a74: 6410 bccs 42a86 rtems_set_errno_and_return_minus_one( EMLINK ); 42a76: 4eb9 0005 1424 jsr 51424 <__errno> 42a7c: 741f moveq #31,%d2 42a7e: 72ff moveq #-1,%d1 42a80: 2040 moveal %d0,%a0 42a82: 2082 movel %d2,%a0@ 42a84: 607c bras 42b02 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 42a86: 2f03 movel %d3,%sp@- 42a88: 240e movel %fp,%d2 42a8a: 0682 ffff ffbf addil #-65,%d2 42a90: 4eb9 0005 27a0 jsr 527a0 42a96: 588f addql #4,%sp 42a98: 486e fffc pea %fp@(-4) 42a9c: 2f02 movel %d2,%sp@- 42a9e: 2f00 movel %d0,%sp@- 42aa0: 2f03 movel %d3,%sp@- 42aa2: 4eb9 0004 d3a0 jsr 4d3a0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 42aa8: 486e ffe0 pea %fp@(-32) 42aac: 2f3c 0000 a1ff movel #41471,%sp@- 42ab2: 2f02 movel %d2,%sp@- 42ab4: 4878 0003 pea 3 42ab8: 2f2e 000c movel %fp@(12),%sp@- 42abc: 4eb9 0004 c898 jsr 4c898 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 42ac2: 4fef 0024 lea %sp@(36),%sp 42ac6: 4a80 tstl %d0 42ac8: 6610 bnes 42ada rtems_set_errno_and_return_minus_one( ENOMEM ); 42aca: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 42ad0: 72ff moveq #-1,%d1 <== NOT EXECUTED 42ad2: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ad4: 700c moveq #12,%d0 <== NOT EXECUTED 42ad6: 2080 movel %d0,%a0@ <== NOT EXECUTED 42ad8: 6028 bras 42b02 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 42ada: 206e ffe0 moveal %fp@(-32),%a0 42ade: 3028 0032 movew %a0@(50),%d0 42ae2: 5280 addql #1,%d0 42ae4: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 42ae8: 42a7 clrl %sp@- 42aea: 486e fff4 pea %fp@(-12) 42aee: 4eb9 0004 3564 jsr 43564 42af4: 206e ffe0 moveal %fp@(-32),%a0 return 0; 42af8: 508f addql #8,%sp /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 42afa: 4281 clrl %d1 42afc: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 42b02: 242e ffb4 movel %fp@(-76),%d2 42b06: 2001 movel %d1,%d0 42b08: 262e ffb8 movel %fp@(-72),%d3 42b0c: 4e5e unlk %fp 42b0e: 4e75 rts 0004f984 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4f984: 4e56 0000 linkw %fp,#0 4f988: 206e 0008 moveal %fp@(8),%a0 4f98c: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4f98e: 4a88 tstl %a0 4f990: 6612 bnes 4f9a4 4f992: 4879 0005 fb1e pea 5fb1e <== NOT EXECUTED 4f998: 4879 0005 fcb0 pea 5fcb0 <__FUNCTION__.6022> <== NOT EXECUTED 4f99e: 4878 0169 pea 169 <== NOT EXECUTED 4f9a2: 6018 bras 4f9bc <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f9a4: 7005 moveq #5,%d0 4f9a6: b0a8 0048 cmpl %a0@(72),%d0 4f9aa: 671c beqs 4f9c8 4f9ac: 4879 0005 fb6e pea 5fb6e <== NOT EXECUTED 4f9b2: 4879 0005 fcb0 pea 5fcb0 <__FUNCTION__.6022> <== NOT EXECUTED 4f9b8: 4878 016d pea 16d <== NOT EXECUTED 4f9bc: 4879 0005 fb28 pea 5fb28 <== NOT EXECUTED 4f9c2: 4eb9 0004 d590 jsr 4d590 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4f9c8: 4878 0001 pea 1 4f9cc: 2f2e 000c movel %fp@(12),%sp@- 4f9d0: 2f08 movel %a0,%sp@- 4f9d2: 4eb9 0004 f548 jsr 4f548 if ( *block_entry_ptr ) 4f9d8: 4fef 000c lea %sp@(12),%sp assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4f9dc: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4f9de: 4a92 tstl %a2@ 4f9e0: 6612 bnes 4f9f4 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4f9e2: 4eb9 0004 f524 jsr 4f524 if ( !memory ) 4f9e8: 4a80 tstl %d0 4f9ea: 6606 bnes 4f9f2 4f9ec: 103c 0001 moveb #1,%d0 <== NOT EXECUTED 4f9f0: 6004 bras 4f9f6 <== NOT EXECUTED return 1; *block_entry_ptr = memory; 4f9f2: 2480 movel %d0,%a2@ 4f9f4: 4280 clrl %d0 return 0; } 4f9f6: 246e fffc moveal %fp@(-4),%a2 4f9fa: 4e5e unlk %fp 4f9fc: 4e75 rts 0004f9fe : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4f9fe: 4e56 ffd8 linkw %fp,#-40 4fa02: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fa06: 246e 0008 moveal %fp@(8),%a2 4fa0a: 242e 000c movel %fp@(12),%d2 4fa0e: 262e 0010 movel %fp@(16),%d3 /* * Perform internal consistency checks */ assert( the_jnode ); 4fa12: 4a8a tstl %a2 4fa14: 6612 bnes 4fa28 4fa16: 4879 0005 fb1e pea 5fb1e <== NOT EXECUTED 4fa1c: 4879 0005 fcc6 pea 5fcc6 <__FUNCTION__.5973> <== NOT EXECUTED 4fa22: 4878 0131 pea 131 <== NOT EXECUTED 4fa26: 6018 bras 4fa40 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4fa28: 7005 moveq #5,%d0 4fa2a: b0aa 0048 cmpl %a2@(72),%d0 4fa2e: 671c beqs 4fa4c 4fa30: 4879 0005 fb6e pea 5fb6e <== NOT EXECUTED 4fa36: 4879 0005 fcc6 pea 5fcc6 <__FUNCTION__.5973> <== NOT EXECUTED 4fa3c: 4878 0135 pea 135 <== NOT EXECUTED 4fa40: 4879 0005 fb28 pea 5fb28 <== NOT EXECUTED 4fa46: 4eb9 0004 d590 jsr 4d590 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4fa4c: 2c39 0006 1614 movel 61614 ,%d6 4fa52: 2206 movel %d6,%d1 4fa54: e489 lsrl #2,%d1 4fa56: 2001 movel %d1,%d0 4fa58: 5280 addql #1,%d0 4fa5a: 4c01 0800 mulsl %d1,%d0 4fa5e: 4284 clrl %d4 4fa60: 5280 addql #1,%d0 4fa62: 4c01 0800 mulsl %d1,%d0 4fa66: 5380 subql #1,%d0 4fa68: 4c06 0800 mulsl %d6,%d0 4fa6c: 2a00 movel %d0,%d5 4fa6e: 2002 movel %d2,%d0 4fa70: 2203 movel %d3,%d1 4fa72: 9285 subl %d5,%d1 4fa74: 9184 subxl %d4,%d0 4fa76: 6d12 blts 4fa8a rtems_set_errno_and_return_minus_one( EINVAL ); 4fa78: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 4fa7e: 7416 moveq #22,%d2 <== NOT EXECUTED 4fa80: 72ff moveq #-1,%d1 <== NOT EXECUTED 4fa82: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fa84: 2082 movel %d2,%a0@ <== NOT EXECUTED 4fa86: 6000 0092 braw 4fb1a <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 4fa8a: 282a 004c movel %a2@(76),%d4 4fa8e: 2a2a 0050 movel %a2@(80),%d5 4fa92: 2002 movel %d2,%d0 4fa94: 2203 movel %d3,%d1 4fa96: 9285 subl %d5,%d1 4fa98: 9184 subxl %d4,%d0 4fa9a: 6e04 bgts 4faa0 4fa9c: 4281 clrl %d1 4fa9e: 607a bras 4fb1a /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4faa0: 47f9 0005 cff0 lea 5cff0 <__divdi3>,%a3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4faa6: 4bf9 0004 f984 lea 4f984 ,%a5 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4faac: 2e06 movel %d6,%d7 4faae: 5bc6 smi %d6 4fab0: 49c6 extbl %d6 4fab2: 2f07 movel %d7,%sp@- 4fab4: 2f06 movel %d6,%sp@- 4fab6: 2f03 movel %d3,%sp@- 4fab8: 2f02 movel %d2,%sp@- 4faba: 4e93 jsr %a3@ 4fabc: 4fef 0010 lea %sp@(16),%sp 4fac0: 2841 moveal %d1,%a4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4fac2: 2f07 movel %d7,%sp@- 4fac4: 2f06 movel %d6,%sp@- 4fac6: 2f05 movel %d5,%sp@- 4fac8: 2f04 movel %d4,%sp@- 4faca: 4e93 jsr %a3@ 4facc: 4fef 0010 lea %sp@(16),%sp 4fad0: 2c01 movel %d1,%d6 4fad2: 2801 movel %d1,%d4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4fad4: 6036 bras 4fb0c if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4fad6: 2f04 movel %d4,%sp@- 4fad8: 2f0a movel %a2,%sp@- 4fada: 4e95 jsr %a5@ 4fadc: 508f addql #8,%sp 4fade: 4a80 tstl %d0 4fae0: 6728 beqs 4fb0a 4fae2: 600c bras 4faf0 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 4fae4: 2f04 movel %d4,%sp@- <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4fae6: 5384 subql #1,%d4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4fae8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4faea: 4e93 jsr %a3@ <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4faec: 508f addql #8,%sp <== NOT EXECUTED 4faee: 6006 bras 4faf6 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4faf0: 47f9 0004 f748 lea 4f748 ,%a3 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4faf6: bc84 cmpl %d4,%d6 <== NOT EXECUTED 4faf8: 63ea blss 4fae4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4fafa: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 4fb00: 72ff moveq #-1,%d1 <== NOT EXECUTED 4fb02: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fb04: 701c moveq #28,%d0 <== NOT EXECUTED 4fb06: 2080 movel %d0,%a0@ <== NOT EXECUTED 4fb08: 6010 bras 4fb1a <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4fb0a: 5284 addql #1,%d4 4fb0c: b9c4 cmpal %d4,%a4 4fb0e: 64c6 bccs 4fad6 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4fb10: 4281 clrl %d1 4fb12: 2542 004c movel %d2,%a2@(76) 4fb16: 2543 0050 movel %d3,%a2@(80) return 0; } 4fb1a: 2001 movel %d1,%d0 4fb1c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4fb22: 4e5e unlk %fp 4fb24: 4e75 rts 0004f548 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4f548: 4e56 fff0 linkw %fp,#-16 4f54c: 206e 0010 moveal %fp@(16),%a0 4f550: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4f554: 246e 0008 moveal %fp@(8),%a2 4f558: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4f55c: 4a8a tstl %a2 4f55e: 6612 bnes 4f572 4f560: 4879 0005 fb1e pea 5fb1e <== NOT EXECUTED 4f566: 4879 0005 fc21 pea 5fc21 <__FUNCTION__.6332> <== NOT EXECUTED 4f56c: 4878 0388 pea 388 <== NOT EXECUTED 4f570: 6018 bras 4f58a <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f572: 7005 moveq #5,%d0 4f574: b0aa 0048 cmpl %a2@(72),%d0 4f578: 671c beqs 4f596 4f57a: 4879 0005 fb6e pea 5fb6e <== NOT EXECUTED 4f580: 4879 0005 fc21 pea 5fc21 <__FUNCTION__.6332> <== NOT EXECUTED 4f586: 4878 038c pea 38c <== NOT EXECUTED 4f58a: 4879 0005 fb28 pea 5fb28 <== NOT EXECUTED 4f590: 4eb9 0004 d590 jsr 4d590 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4f596: 2239 0006 1614 movel 61614 ,%d1 4f59c: e489 lsrl #2,%d1 4f59e: 2001 movel %d1,%d0 4f5a0: 5380 subql #1,%d0 4f5a2: b082 cmpl %d2,%d0 4f5a4: 6536 bcss 4f5dc #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 4f5a6: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4f5aa: 4a88 tstl %a0 4f5ac: 6720 beqs 4f5ce if ( !p ) { 4f5ae: 4a89 tstl %a1 4f5b0: 6610 bnes 4f5c2 p = memfile_alloc_block(); 4f5b2: 4eb9 0004 f524 jsr 4f524 if ( !p ) 4f5b8: 4a80 tstl %d0 4f5ba: 6700 0118 beqw 4f6d4 return 0; info->indirect = p; 4f5be: 2540 0054 movel %d0,%a2@(84) } return &info->indirect[ my_block ]; 4f5c2: 206a 0054 moveal %a2@(84),%a0 4f5c6: e58a lsll #2,%d2 4f5c8: d1c2 addal %d2,%a0 4f5ca: 6000 010a braw 4f6d6 } if ( !p ) 4f5ce: 4a89 tstl %a1 4f5d0: 6700 0102 beqw 4f6d4 return 0; return &info->indirect[ my_block ]; 4f5d4: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4f5d8: 6000 00fc braw 4f6d6 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4f5dc: 2001 movel %d1,%d0 <== NOT EXECUTED 4f5de: 5280 addql #1,%d0 <== NOT EXECUTED 4f5e0: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 4f5e4: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f5e6: 5389 subql #1,%a1 <== NOT EXECUTED 4f5e8: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 4f5ea: 6562 bcss 4f64e <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 4f5ec: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4f5ee: 202a 0058 movel %a2@(88),%d0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4f5f2: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4f5f6: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4f5fa: 4a88 tstl %a0 <== NOT EXECUTED 4f5fc: 6736 beqs 4f634 <== NOT EXECUTED if ( !p ) { 4f5fe: 4a80 tstl %d0 <== NOT EXECUTED 4f600: 6610 bnes 4f612 <== NOT EXECUTED p = memfile_alloc_block(); 4f602: 4eb9 0004 f524 jsr 4f524 <== NOT EXECUTED if ( !p ) 4f608: 4a80 tstl %d0 <== NOT EXECUTED 4f60a: 6700 00c8 beqw 4f6d4 <== NOT EXECUTED return 0; info->doubly_indirect = p; 4f60e: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 4f612: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f614: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4f618: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p1 ) { 4f61a: 660e bnes 4f62a <== NOT EXECUTED p1 = memfile_alloc_block(); 4f61c: 4eb9 0004 f524 jsr 4f524 <== NOT EXECUTED if ( !p1 ) 4f622: 4a80 tstl %d0 <== NOT EXECUTED 4f624: 6700 00ae beqw 4f6d4 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 4f628: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 4f62a: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f62c: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4f630: 6000 00a4 braw 4f6d6 <== NOT EXECUTED } if ( !p ) 4f634: 4a80 tstl %d0 <== NOT EXECUTED 4f636: 6700 009c beqw 4f6d4 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4f63a: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f63c: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p ) 4f640: 4a88 tstl %a0 <== NOT EXECUTED 4f642: 6700 0090 beqw 4f6d4 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 4f646: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4f64a: 6000 008a braw 4f6d6 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4f64e: 2600 movel %d0,%d3 <== NOT EXECUTED 4f650: 5283 addql #1,%d3 <== NOT EXECUTED 4f652: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 4f656: 5383 subql #1,%d3 <== NOT EXECUTED 4f658: b682 cmpl %d2,%d3 <== NOT EXECUTED 4f65a: 6578 bcss 4f6d4 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 4f65c: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4f65e: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 4f662: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4f666: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4f66a: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4f66e: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4f672: 4a88 tstl %a0 <== NOT EXECUTED 4f674: 6746 beqs 4f6bc <== NOT EXECUTED if ( !p ) { 4f676: 4a80 tstl %d0 <== NOT EXECUTED 4f678: 660e bnes 4f688 <== NOT EXECUTED p = memfile_alloc_block(); 4f67a: 4eb9 0004 f524 jsr 4f524 <== NOT EXECUTED if ( !p ) 4f680: 4a80 tstl %d0 <== NOT EXECUTED 4f682: 6750 beqs 4f6d4 <== NOT EXECUTED return 0; info->triply_indirect = p; 4f684: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 4f688: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f68a: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4f68e: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p1 ) { 4f690: 660c bnes 4f69e <== NOT EXECUTED p1 = memfile_alloc_block(); 4f692: 4eb9 0004 f524 jsr 4f524 <== NOT EXECUTED if ( !p1 ) 4f698: 4a80 tstl %d0 <== NOT EXECUTED 4f69a: 6738 beqs 4f6d4 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 4f69c: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 4f69e: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f6a0: 45f1 3c00 lea %a1@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 4f6a4: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p2 ) { 4f6a6: 660c bnes 4f6b4 <== NOT EXECUTED p2 = memfile_alloc_block(); 4f6a8: 4eb9 0004 f524 jsr 4f524 <== NOT EXECUTED if ( !p2 ) 4f6ae: 4a80 tstl %d0 <== NOT EXECUTED 4f6b0: 6722 beqs 4f6d4 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 4f6b2: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 4f6b4: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f6b6: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 4f6ba: 601a bras 4f6d6 <== NOT EXECUTED } if ( !p ) 4f6bc: 4a80 tstl %d0 <== NOT EXECUTED 4f6be: 6714 beqs 4f6d4 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 4f6c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f6c2: 2270 2c00 moveal %a0@(00000000,%d2:l:4),%a1 <== NOT EXECUTED if ( !p1 ) 4f6c6: 4a89 tstl %a1 <== NOT EXECUTED 4f6c8: 670a beqs 4f6d4 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 4f6ca: 2071 3c00 moveal %a1@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4f6ce: e58c lsll #2,%d4 <== NOT EXECUTED 4f6d0: d1c4 addal %d4,%a0 <== NOT EXECUTED 4f6d2: 6002 bras 4f6d6 <== NOT EXECUTED 4f6d4: 91c8 subal %a0,%a0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4f6d6: 2008 movel %a0,%d0 4f6d8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4f6de: 4e5e unlk %fp 4f6e0: 4e75 rts 0004ff0a : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4ff0a: 4e56 ffc0 linkw %fp,#-64 4ff0e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4ff12: 246e 0008 moveal %fp@(8),%a2 4ff16: 2a2e 0014 movel %fp@(20),%d5 4ff1a: 2a6e 0018 moveal %fp@(24),%a5 4ff1e: 262e 000c movel %fp@(12),%d3 4ff22: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 4ff26: 4a8a tstl %a2 4ff28: 6612 bnes 4ff3c 4ff2a: 4879 0005 fb1e pea 5fb1e <== NOT EXECUTED 4ff30: 4879 0005 fc53 pea 5fc53 <__FUNCTION__.6159> <== NOT EXECUTED 4ff36: 4878 024c pea 24c <== NOT EXECUTED 4ff3a: 601e bras 4ff5a <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4ff3c: 202a 0048 movel %a2@(72),%d0 4ff40: 2200 movel %d0,%d1 4ff42: 5b81 subql #5,%d1 4ff44: 7401 moveq #1,%d2 4ff46: b481 cmpl %d1,%d2 4ff48: 641c bccs 4ff66 4ff4a: 4879 0005 fbd1 pea 5fbd1 <== NOT EXECUTED 4ff50: 4879 0005 fc53 pea 5fc53 <__FUNCTION__.6159> <== NOT EXECUTED 4ff56: 4878 0251 pea 251 <== NOT EXECUTED 4ff5a: 4879 0005 fb28 pea 5fb28 <== NOT EXECUTED 4ff60: 4eb9 0004 d590 jsr 4d590 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4ff66: 4a85 tstl %d5 4ff68: 6612 bnes 4ff7c 4ff6a: 4879 0005 fc1c pea 5fc1c <== NOT EXECUTED 4ff70: 4879 0005 fc53 pea 5fc53 <__FUNCTION__.6159> <== NOT EXECUTED 4ff76: 4878 025a pea 25a <== NOT EXECUTED 4ff7a: 60de bras 4ff5a <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 4ff7c: 4a8d tstl %a5 4ff7e: 6612 bnes 4ff92 rtems_set_errno_and_return_minus_one( EINVAL ); 4ff80: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 4ff86: 7e16 moveq #22,%d7 <== NOT EXECUTED 4ff88: 7cff moveq #-1,%d6 <== NOT EXECUTED 4ff8a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ff8c: 2087 movel %d7,%a0@ <== NOT EXECUTED 4ff8e: 6000 01be braw 5014e <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 4ff92: 7206 moveq #6,%d1 4ff94: b280 cmpl %d0,%d1 4ff96: 6658 bnes 4fff0 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4ff98: 284d moveal %a5,%a4 <== NOT EXECUTED 4ff9a: 97cb subal %a3,%a3 <== NOT EXECUTED 4ff9c: 2c2a 004c movel %a2@(76),%d6 <== NOT EXECUTED 4ffa0: 2e2a 0050 movel %a2@(80),%d7 <== NOT EXECUTED 4ffa4: 200b movel %a3,%d0 <== NOT EXECUTED 4ffa6: 220c movel %a4,%d1 <== NOT EXECUTED 4ffa8: 2d46 ffe8 movel %d6,%fp@(-24) <== NOT EXECUTED 4ffac: 2d47 ffec movel %d7,%fp@(-20) <== NOT EXECUTED 4ffb0: 9e84 subl %d4,%d7 <== NOT EXECUTED 4ffb2: 9d83 subxl %d3,%d6 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4ffb4: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 4ffb8: 9287 subl %d7,%d1 <== NOT EXECUTED 4ffba: 9186 subxl %d6,%d0 <== NOT EXECUTED 4ffbc: 6e04 bgts 4ffc2 <== NOT EXECUTED 4ffbe: 2c0d movel %a5,%d6 <== NOT EXECUTED 4ffc0: 6006 bras 4ffc8 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 4ffc2: 2c2e ffec movel %fp@(-20),%d6 <== NOT EXECUTED 4ffc6: 9c84 subl %d4,%d6 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 4ffc8: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4ffca: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 4ffce: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4ffd0: 4eb9 0005 1c44 jsr 51c44 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4ffd6: 42a7 clrl %sp@- <== NOT EXECUTED 4ffd8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4ffdc: 4eb9 0004 3564 jsr 43564 <== NOT EXECUTED 4ffe2: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 4ffe8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4ffec: 6000 0160 braw 5014e <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 4fff0: 200d movel %a5,%d0 4fff2: d084 addl %d4,%d0 4fff4: 2240 moveal %d0,%a1 4fff6: 91c8 subal %a0,%a0 4fff8: 202a 004c movel %a2@(76),%d0 4fffc: 222a 0050 movel %a2@(80),%d1 50000: 2c08 movel %a0,%d6 50002: 2e09 movel %a1,%d7 50004: 9e81 subl %d1,%d7 50006: 9d80 subxl %d0,%d6 50008: 6e04 bgts 5000e 5000a: 240d movel %a5,%d2 5000c: 6006 bras 50014 my_length = the_jnode->info.file.size - start; 5000e: 2e01 movel %d1,%d7 50010: 9e84 subl %d4,%d7 50012: 2407 movel %d7,%d2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 50014: 2e39 0006 1614 movel 61614 ,%d7 5001a: 2207 movel %d7,%d1 5001c: 5bc0 smi %d0 5001e: 49c0 extbl %d0 50020: 2640 moveal %d0,%a3 50022: 2841 moveal %d1,%a4 50024: 2f0c movel %a4,%sp@- 50026: 2f00 movel %d0,%sp@- 50028: 2f04 movel %d4,%sp@- 5002a: 2f03 movel %d3,%sp@- 5002c: 4eb9 0005 d3a8 jsr 5d3a8 <__moddi3> 50032: 4fef 0010 lea %sp@(16),%sp 50036: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 50038: 2f0c movel %a4,%sp@- 5003a: 2f0b movel %a3,%sp@- 5003c: 2f04 movel %d4,%sp@- 5003e: 2f03 movel %d3,%sp@- 50040: 4eb9 0005 cff0 jsr 5cff0 <__divdi3> 50046: 4fef 0010 lea %sp@(16),%sp 5004a: 2601 movel %d1,%d3 if ( start_offset ) { 5004c: 4a86 tstl %d6 5004e: 6604 bnes 50054 50050: 2e05 movel %d5,%d7 50052: 6050 bras 500a4 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 ); 50054: 42a7 clrl %sp@- 50056: 2f01 movel %d1,%sp@- 50058: 2f0a movel %a2,%sp@- 5005a: 4eb9 0004 f548 jsr 4f548 assert( block_ptr ); 50060: 4fef 000c lea %sp@(12),%sp 50064: 4a80 tstl %d0 50066: 6614 bnes 5007c 50068: 4879 0005 fb9e pea 5fb9e <== NOT EXECUTED 5006e: 4879 0005 fc53 pea 5fc53 <__FUNCTION__.6159> <== NOT EXECUTED 50074: 4878 0296 pea 296 <== NOT EXECUTED 50078: 6000 fee0 braw 4ff5a <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 5007c: 9e86 subl %d6,%d7 5007e: 2202 movel %d2,%d1 50080: be82 cmpl %d2,%d7 50082: 6402 bccs 50086 50084: 2207 movel %d7,%d1 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 50086: 2f01 movel %d1,%sp@- 50088: 2040 moveal %d0,%a0 5008a: dc90 addl %a0@,%d6 dest += to_copy; 5008c: 2e05 movel %d5,%d7 5008e: de81 addl %d1,%d7 block++; my_length -= to_copy; 50090: 9481 subl %d1,%d2 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; block++; 50092: 5283 addql #1,%d3 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 50094: 2f06 movel %d6,%sp@- dest += to_copy; block++; my_length -= to_copy; 50096: 2c01 movel %d1,%d6 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 50098: 2f05 movel %d5,%sp@- 5009a: 4eb9 0005 1c44 jsr 51c44 dest += to_copy; block++; my_length -= to_copy; 500a0: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 500a4: 2a39 0006 1614 movel 61614 ,%d5 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 500aa: 49f9 0004 f548 lea 4f548 ,%a4 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 500b0: 47f9 0005 1c44 lea 51c44 ,%a3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 500b6: 603a bras 500f2 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 500b8: 42a7 clrl %sp@- 500ba: 2f03 movel %d3,%sp@- 500bc: 2f0a movel %a2,%sp@- 500be: 4e94 jsr %a4@ assert( block_ptr ); 500c0: 4fef 000c lea %sp@(12),%sp 500c4: 4a80 tstl %d0 500c6: 6614 bnes 500dc 500c8: 4879 0005 fb9e pea 5fb9e <== NOT EXECUTED 500ce: 4879 0005 fc53 pea 5fc53 <__FUNCTION__.6159> <== NOT EXECUTED 500d4: 4878 02a7 pea 2a7 <== NOT EXECUTED 500d8: 6000 fe80 braw 4ff5a <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 500dc: 2040 moveal %d0,%a0 dest += to_copy; block++; 500de: 5283 addql #1,%d3 my_length -= to_copy; 500e0: 9485 subl %d5,%d2 copied += to_copy; 500e2: dc85 addl %d5,%d6 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 500e4: 2f05 movel %d5,%sp@- 500e6: 2f10 movel %a0@,%sp@- 500e8: 2f07 movel %d7,%sp@- dest += to_copy; 500ea: de85 addl %d5,%d7 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 500ec: 4e93 jsr %a3@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 500ee: 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 ) { 500f2: b4b9 0006 1614 cmpl 61614 ,%d2 500f8: 64be bccs 500b8 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 500fa: 4a82 tstl %d2 500fc: 673c beqs 5013a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 500fe: 42a7 clrl %sp@- 50100: 2f03 movel %d3,%sp@- 50102: 2f0a movel %a2,%sp@- 50104: 4eb9 0004 f548 jsr 4f548 assert( block_ptr ); 5010a: 4fef 000c lea %sp@(12),%sp 5010e: 4a80 tstl %d0 50110: 6614 bnes 50126 50112: 4879 0005 fb9e pea 5fb9e <== NOT EXECUTED 50118: 4879 0005 fc53 pea 5fc53 <__FUNCTION__.6159> <== NOT EXECUTED 5011e: 4878 02b9 pea 2b9 <== NOT EXECUTED 50122: 6000 fe36 braw 4ff5a <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 50126: 2040 moveal %d0,%a0 copied += my_length; 50128: dc82 addl %d2,%d6 if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 5012a: 2f02 movel %d2,%sp@- 5012c: 2f10 movel %a0@,%sp@- 5012e: 2f07 movel %d7,%sp@- 50130: 4eb9 0005 1c44 jsr 51c44 copied += my_length; 50136: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 5013a: 42a7 clrl %sp@- 5013c: 486e fff8 pea %fp@(-8) 50140: 4eb9 0004 3564 jsr 43564 50146: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 5014c: 508f addql #8,%sp } 5014e: 2006 movel %d6,%d0 50150: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 50156: 4e5e unlk %fp 50158: 4e75 rts 0004f794 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4f794: 4e56 ffe4 linkw %fp,#-28 4f798: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4f79c: 246e 0008 moveal %fp@(8),%a2 /* * Perform internal consistency checks */ assert( the_jnode ); 4f7a0: 4a8a tstl %a2 4f7a2: 6612 bnes 4f7b6 4f7a4: 4879 0005 fb1e pea 5fb1e <== NOT EXECUTED 4f7aa: 4879 0005 fc65 pea 5fc65 <__FUNCTION__.6084> <== NOT EXECUTED 4f7b0: 4878 01ee pea 1ee <== NOT EXECUTED 4f7b4: 6018 bras 4f7ce <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f7b6: 7005 moveq #5,%d0 4f7b8: b0aa 0048 cmpl %a2@(72),%d0 4f7bc: 671c beqs 4f7da 4f7be: 4879 0005 fb6e pea 5fb6e <== NOT EXECUTED 4f7c4: 4879 0005 fc65 pea 5fc65 <__FUNCTION__.6084> <== NOT EXECUTED 4f7ca: 4878 01f2 pea 1f2 <== NOT EXECUTED 4f7ce: 4879 0005 fb28 pea 5fb28 <== NOT EXECUTED 4f7d4: 4eb9 0004 d590 jsr 4d590 <__assert_func> <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 4f7da: 2439 0006 1614 movel 61614 ,%d2 4f7e0: e48a lsrl #2,%d2 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f7e2: 4aaa 0054 tstl %a2@(84) 4f7e6: 670e beqs 4f7f6 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 4f7e8: 2f02 movel %d2,%sp@- 4f7ea: 486a 0054 pea %a2@(84) 4f7ee: 4eb9 0004 f6e2 jsr 4f6e2 4f7f4: 508f addql #8,%sp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f7f6: 4aaa 0058 tstl %a2@(88) 4f7fa: 673e beqs 4f83a 4f7fc: 4283 clrl %d3 <== NOT EXECUTED if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4f7fe: 47f9 0004 f6e2 lea 4f6e2 ,%a3<== NOT EXECUTED 4f804: 601a bras 4f820 <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4f806: 2003 movel %d3,%d0 <== NOT EXECUTED 4f808: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4f80c: e588 lsll #2,%d0 <== NOT EXECUTED 4f80e: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 4f812: 670a beqs 4f81e <== NOT EXECUTED memfile_free_blocks_in_table( 4f814: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f816: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4f81a: 4e93 jsr %a3@ <== NOT EXECUTED 4f81c: 508f addql #8,%sp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i,%d0<== NOT EXECUTED 4f826: e488 lsrl #2,%d0 <== NOT EXECUTED 4f828: b083 cmpl %d3,%d0 <== NOT EXECUTED 4f82a: 62da bhis 4f806 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 4f82c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f82e: 486a 0058 pea %a2@(88) <== NOT EXECUTED 4f832: 4eb9 0004 f6e2 jsr 4f6e2 <== NOT EXECUTED 4f838: 508f addql #8,%sp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f83a: 4aaa 005c tstl %a2@(92) 4f83e: 6762 beqs 4f8a2 4f840: 4283 clrl %d3 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j,%a4<== NOT EXECUTED 4f848: 603e bras 4f888 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f84a: 2a03 movel %d3,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4f84c: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f850: e58d lsll #2,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4f852: 2670 5800 moveal %a0@(00000000,%d5:l),%a3 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4f856: 4a8b tstl %a3 <== NOT EXECUTED 4f858: 673a beqs 4f894 <== NOT EXECUTED 4f85a: 4284 clrl %d4 <== NOT EXECUTED 4f85c: 6010 bras 4f86e <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4f862: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f864: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f866: 4e94 jsr %a4@ <== NOT EXECUTED 4f868: 508f addql #8,%sp <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j,%d0<== NOT EXECUTED 4f874: e488 lsrl #2,%d0 <== NOT EXECUTED 4f876: b084 cmpl %d4,%d0 <== NOT EXECUTED 4f878: 62e4 bhis 4f85e <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4f87a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f87c: daaa 005c addl %a2@(92),%d5 <== NOT EXECUTED 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,%d0<== NOT EXECUTED 4f88e: e488 lsrl #2,%d0 <== NOT EXECUTED 4f890: b083 cmpl %d3,%d0 <== NOT EXECUTED 4f892: 62b6 bhis 4f84a <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4f894: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f896: 486a 005c pea %a2@(92) <== NOT EXECUTED 4f89a: 4eb9 0004 f6e2 jsr 4f6e2 <== NOT EXECUTED 4f8a0: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4f8a2: 4280 clrl %d0 4f8a4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4f8aa: 4e5e unlk %fp 4f8ac: 4e75 rts 0004f748 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4f748: 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 ); 4f74c: 42a7 clrl %sp@- <== NOT EXECUTED 4f74e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4f752: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4f756: 4eb9 0004 f548 jsr 4f548 <== NOT EXECUTED assert( block_ptr ); 4f75c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f760: 4a80 tstl %d0 <== NOT EXECUTED 4f762: 661c bnes 4f780 <== NOT EXECUTED 4f764: 4879 0005 fb9e pea 5fb9e <== NOT EXECUTED 4f76a: 4879 0005 fc96 pea 5fc96 <__FUNCTION__.6048> <== NOT EXECUTED 4f770: 4878 0196 pea 196 <== NOT EXECUTED 4f774: 4879 0005 fb28 pea 5fb28 <== NOT EXECUTED 4f77a: 4eb9 0004 d590 jsr 4d590 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 4f780: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f782: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4f784: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4f786: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4f788: 4eb9 0004 f50a jsr 4f50a <== NOT EXECUTED } return 1; } 4f78e: 7001 moveq #1,%d0 <== NOT EXECUTED 4f790: 4e5e unlk %fp <== NOT EXECUTED 4f792: 4e75 rts 0004fc1a : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4fc1a: 4e56 ffd0 linkw %fp,#-48 4fc1e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fc22: 246e 0008 moveal %fp@(8),%a2 4fc26: 262e 0014 movel %fp@(20),%d3 4fc2a: 242e 0018 movel %fp@(24),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4fc2e: 4a8a tstl %a2 4fc30: 6612 bnes 4fc44 4fc32: 4879 0005 fb1e pea 5fb1e <== NOT EXECUTED 4fc38: 4879 0005 fc40 pea 5fc40 <__FUNCTION__.6251> <== NOT EXECUTED 4fc3e: 4878 02e3 pea 2e3 <== NOT EXECUTED 4fc42: 6018 bras 4fc5c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4fc44: 7805 moveq #5,%d4 4fc46: b8aa 0048 cmpl %a2@(72),%d4 4fc4a: 671c beqs 4fc68 4fc4c: 4879 0005 fb6e pea 5fb6e <== NOT EXECUTED 4fc52: 4879 0005 fc40 pea 5fc40 <__FUNCTION__.6251> <== NOT EXECUTED 4fc58: 4878 02e7 pea 2e7 <== NOT EXECUTED 4fc5c: 4879 0005 fb28 pea 5fb28 <== NOT EXECUTED 4fc62: 4eb9 0004 d590 jsr 4d590 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4fc68: 4a83 tstl %d3 4fc6a: 6612 bnes 4fc7e 4fc6c: 4879 0005 f273 pea 5f273 <== NOT EXECUTED 4fc72: 4879 0005 fc40 pea 5fc40 <__FUNCTION__.6251> <== NOT EXECUTED 4fc78: 4878 02ef pea 2ef <== NOT EXECUTED 4fc7c: 60de bras 4fc5c <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4fc7e: 4a82 tstl %d2 4fc80: 6612 bnes 4fc94 rtems_set_errno_and_return_minus_one( EINVAL ); 4fc82: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 4fc88: 7a16 moveq #22,%d5 <== NOT EXECUTED 4fc8a: 7eff moveq #-1,%d7 <== NOT EXECUTED 4fc8c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fc8e: 2085 movel %d5,%a0@ <== NOT EXECUTED 4fc90: 6000 0186 braw 4fe18 <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 4fc94: 206e 0010 moveal %fp@(16),%a0 4fc98: d1c2 addal %d2,%a0 4fc9a: 2208 movel %a0,%d1 4fc9c: 4280 clrl %d0 4fc9e: 282a 004c movel %a2@(76),%d4 4fca2: 2a2a 0050 movel %a2@(80),%d5 4fca6: 9a81 subl %d1,%d5 4fca8: 9980 subxl %d0,%d4 4fcaa: 6c26 bges 4fcd2 status = IMFS_memfile_extend( the_jnode, last_byte ); 4fcac: 2f08 movel %a0,%sp@- 4fcae: 2f00 movel %d0,%sp@- 4fcb0: 2f0a movel %a2,%sp@- 4fcb2: 4eb9 0004 f9fe jsr 4f9fe if ( status ) 4fcb8: 4fef 000c lea %sp@(12),%sp 4fcbc: 4a80 tstl %d0 4fcbe: 6712 beqs 4fcd2 rtems_set_errno_and_return_minus_one( ENOSPC ); 4fcc0: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 4fcc6: 781c moveq #28,%d4 <== NOT EXECUTED 4fcc8: 7eff moveq #-1,%d7 <== NOT EXECUTED 4fcca: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fccc: 2084 movel %d4,%a0@ <== NOT EXECUTED 4fcce: 6000 0148 braw 4fe18 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4fcd2: 2e39 0006 1614 movel 61614 ,%d7 4fcd8: 2207 movel %d7,%d1 4fcda: 5bc0 smi %d0 4fcdc: 49c0 extbl %d0 4fcde: 2640 moveal %d0,%a3 4fce0: 2841 moveal %d1,%a4 4fce2: 2f0c movel %a4,%sp@- 4fce4: 2f00 movel %d0,%sp@- 4fce6: 2f2e 0010 movel %fp@(16),%sp@- 4fcea: 2f2e 000c movel %fp@(12),%sp@- 4fcee: 4eb9 0005 d3a8 jsr 5d3a8 <__moddi3> 4fcf4: 4fef 0010 lea %sp@(16),%sp 4fcf8: 2801 movel %d1,%d4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4fcfa: 2f0c movel %a4,%sp@- 4fcfc: 2f0b movel %a3,%sp@- 4fcfe: 2f2e 0010 movel %fp@(16),%sp@- 4fd02: 2f2e 000c movel %fp@(12),%sp@- 4fd06: 4eb9 0005 cff0 jsr 5cff0 <__divdi3> 4fd0c: 4fef 0010 lea %sp@(16),%sp 4fd10: 2a01 movel %d1,%d5 if ( start_offset ) { 4fd12: 4a84 tstl %d4 4fd14: 6606 bnes 4fd1c 4fd16: 2643 moveal %d3,%a3 4fd18: 4287 clrl %d7 4fd1a: 604c bras 4fd68 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 ); 4fd1c: 42a7 clrl %sp@- 4fd1e: 2f01 movel %d1,%sp@- 4fd20: 2f0a movel %a2,%sp@- 4fd22: 4eb9 0004 f548 jsr 4f548 assert( block_ptr ); 4fd28: 4fef 000c lea %sp@(12),%sp 4fd2c: 4a80 tstl %d0 4fd2e: 6614 bnes 4fd44 4fd30: 4879 0005 fb9e pea 5fb9e <== NOT EXECUTED 4fd36: 4879 0005 fc40 pea 5fc40 <__FUNCTION__.6251> <== NOT EXECUTED 4fd3c: 4878 031c pea 31c <== NOT EXECUTED 4fd40: 6000 ff1a braw 4fc5c <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4fd44: 9e84 subl %d4,%d7 4fd46: b487 cmpl %d7,%d2 4fd48: 6402 bccs 4fd4c 4fd4a: 2e02 movel %d2,%d7 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4fd4c: 2f07 movel %d7,%sp@- 4fd4e: 2040 moveal %d0,%a0 src += to_copy; 4fd50: 2643 moveal %d3,%a3 4fd52: d7c7 addal %d7,%a3 block++; 4fd54: 5285 addql #1,%d5 my_length -= to_copy; 4fd56: 9487 subl %d7,%d2 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4fd58: 2f03 movel %d3,%sp@- 4fd5a: d890 addl %a0@,%d4 4fd5c: 2f04 movel %d4,%sp@- 4fd5e: 4eb9 0005 1c44 jsr 51c44 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4fd64: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4fd68: 2639 0006 1614 movel 61614 ,%d3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4fd6e: 4bf9 0004 f548 lea 4f548 ,%a5 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 ); 4fd74: 49f9 0005 1c44 lea 51c44 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4fd7a: 603a bras 4fdb6 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4fd7c: 42a7 clrl %sp@- 4fd7e: 2f05 movel %d5,%sp@- 4fd80: 2f0a movel %a2,%sp@- 4fd82: 4e95 jsr %a5@ assert( block_ptr ); 4fd84: 4fef 000c lea %sp@(12),%sp 4fd88: 4a80 tstl %d0 4fd8a: 6614 bnes 4fda0 4fd8c: 4879 0005 fb9e pea 5fb9e <== NOT EXECUTED 4fd92: 4879 0005 fc40 pea 5fc40 <__FUNCTION__.6251> <== NOT EXECUTED 4fd98: 4878 0330 pea 330 <== NOT EXECUTED 4fd9c: 6000 febe braw 4fc5c <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4fda0: 2f03 movel %d3,%sp@- 4fda2: 2240 moveal %d0,%a1 src += to_copy; block++; 4fda4: 5285 addql #1,%d5 my_length -= to_copy; 4fda6: 9483 subl %d3,%d2 * * 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( 4fda8: de83 addl %d3,%d7 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 ); 4fdaa: 2f0b movel %a3,%sp@- 4fdac: 2f11 movel %a1@,%sp@- src += to_copy; 4fdae: d7c3 addal %d3,%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 ); 4fdb0: 4e94 jsr %a4@ * * 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( 4fdb2: 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 ) { 4fdb6: b4b9 0006 1614 cmpl 61614 ,%d2 4fdbc: 64be bccs 4fd7c */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4fdbe: 4a82 tstl %d2 4fdc0: 673c beqs 4fdfe block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4fdc2: 42a7 clrl %sp@- 4fdc4: 2f05 movel %d5,%sp@- 4fdc6: 2f0a movel %a2,%sp@- 4fdc8: 4eb9 0004 f548 jsr 4f548 assert( block_ptr ); 4fdce: 4fef 000c lea %sp@(12),%sp 4fdd2: 4a80 tstl %d0 4fdd4: 6614 bnes 4fdea 4fdd6: 4879 0005 fb9e pea 5fb9e <== NOT EXECUTED 4fddc: 4879 0005 fc40 pea 5fc40 <__FUNCTION__.6251> <== NOT EXECUTED 4fde2: 4878 0346 pea 346 <== NOT EXECUTED 4fde6: 6000 fe74 braw 4fc5c <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 4fdea: 2f02 movel %d2,%sp@- 4fdec: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4fdee: de82 addl %d2,%d7 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 ); 4fdf0: 2f0b movel %a3,%sp@- 4fdf2: 2f10 movel %a0@,%sp@- 4fdf4: 4eb9 0005 1c44 jsr 51c44 my_length = 0; copied += to_copy; 4fdfa: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4fdfe: 42a7 clrl %sp@- 4fe00: 486e fff8 pea %fp@(-8) 4fe04: 4eb9 0004 3564 jsr 43564 4fe0a: 202e fff8 movel %fp@(-8),%d0 return copied; 4fe0e: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4fe10: 2540 0044 movel %d0,%a2@(68) 4fe14: 2540 0040 movel %d0,%a2@(64) return copied; } 4fe18: 2007 movel %d7,%d0 4fe1a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4fe20: 4e5e unlk %fp 4fe22: 4e75 rts 00048b88 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48b88: 4e56 ffb4 linkw %fp,#-76 48b8c: 48d7 003c moveml %d2-%d5,%sp@ 48b90: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 48b94: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48b96: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 48b9a: 4eb9 0004 dde8 jsr 4dde8 48ba0: 588f addql #4,%sp 48ba2: 486e fffc pea %fp@(-4) 48ba6: 486e ffc7 pea %fp@(-57) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48baa: 2a2e 0010 movel %fp@(16),%d5 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 48bae: 2f00 movel %d0,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48bb0: 282e 0014 movel %fp@(20),%d4 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 48bb4: 2f03 movel %d3,%sp@- 48bb6: 4eb9 0004 8a10 jsr 48a10 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 48bbc: 4fef 0010 lea %sp@(16),%sp 48bc0: 2002 movel %d2,%d0 48bc2: 0280 0000 f000 andil #61440,%d0 48bc8: 0c80 0000 4000 cmpil #16384,%d0 48bce: 6748 beqs 48c18 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 48bd0: 0c80 0000 8000 cmpil #32768,%d0 48bd6: 6606 bnes 48bde 48bd8: 303c 0005 movew #5,%d0 48bdc: 603c bras 48c1a type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 48bde: 0c80 0000 6000 cmpil #24576,%d0 48be4: 6708 beqs 48bee 48be6: 0c80 0000 2000 cmpil #8192,%d0 48bec: 660c bnes 48bfa type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 48bee: 2d45 ffe8 movel %d5,%fp@(-24) 48bf2: 7002 moveq #2,%d0 48bf4: 2d44 ffec movel %d4,%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) ) { 48bf8: 6020 bras 48c1a type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 48bfa: 0c80 0000 1000 cmpil #4096,%d0 48c00: 6606 bnes 48c08 48c02: 303c 0007 movew #7,%d0 48c06: 6012 bras 48c1a type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 48c08: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 48c0e: 7416 moveq #22,%d2 <== NOT EXECUTED 48c10: 72ff moveq #-1,%d1 <== NOT EXECUTED 48c12: 2040 moveal %d0,%a0 <== NOT EXECUTED 48c14: 2082 movel %d2,%a0@ <== NOT EXECUTED 48c16: 6032 bras 48c4a <== NOT EXECUTED 48c18: 7001 moveq #1,%d0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 48c1a: 486e ffe8 pea %fp@(-24) 48c1e: 2f02 movel %d2,%sp@- 48c20: 486e ffc7 pea %fp@(-57) 48c24: 2f00 movel %d0,%sp@- 48c26: 2f2e 0018 movel %fp@(24),%sp@- 48c2a: 4eb9 0004 b4c4 jsr 4b4c4 new_name, mode, &info ); if ( !new_node ) 48c30: 4fef 0014 lea %sp@(20),%sp 48c34: 4a80 tstl %d0 48c36: 6704 beqs 48c3c 48c38: 4281 clrl %d1 48c3a: 600e bras 48c4a rtems_set_errno_and_return_minus_one( ENOMEM ); 48c3c: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 48c42: 72ff moveq #-1,%d1 <== NOT EXECUTED 48c44: 2040 moveal %d0,%a0 <== NOT EXECUTED 48c46: 700c moveq #12,%d0 <== NOT EXECUTED 48c48: 2080 movel %d0,%a0@ <== NOT EXECUTED return 0; } 48c4a: 2001 movel %d1,%d0 48c4c: 4cee 003c ffb4 moveml %fp@(-76),%d2-%d5 48c52: 4e5e unlk %fp 48c54: 4e75 rts ... 00042be0 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42be0: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42be2: 4e56 0000 linkw %fp,#0 42be6: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42bea: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42bee: b0a8 0048 cmpl %a0@(72),%d0 42bf2: 6710 beqs 42c04 rtems_set_errno_and_return_minus_one( ENOTDIR ); 42bf4: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 42bfa: 7214 moveq #20,%d1 <== NOT EXECUTED 42bfc: 2040 moveal %d0,%a0 <== NOT EXECUTED 42bfe: 70ff moveq #-1,%d0 <== NOT EXECUTED 42c00: 2081 movel %d1,%a0@ <== NOT EXECUTED 42c02: 6006 bras 42c0a <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 42c04: 2149 0058 movel %a1,%a0@(88) 42c08: 4280 clrl %d0 return 0; } 42c0a: 4e5e unlk %fp 42c0c: 4e75 rts ... 00048c58 : #include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 48c58: 4e56 0000 linkw %fp,#0 48c5c: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = pathloc->node_access; return node->type; } 48c60: 4e5e unlk %fp #include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 48c62: 2050 moveal %a0@,%a0 IMFS_jnode_t *node; node = pathloc->node_access; return node->type; } 48c64: 2028 0048 movel %a0@(72),%d0 48c68: 4e75 rts ... 00043436 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43436: 4e56 0000 linkw %fp,#0 4343a: 2f0a movel %a2,%sp@- 4343c: 246e 0008 moveal %fp@(8),%a2 43440: 2f02 movel %d2,%sp@- assert( the_jnode ); 43442: 4a8a tstl %a2 43444: 6614 bnes 4345a 43446: 4879 0005 f980 pea 5f980 <== NOT EXECUTED 4344c: 4879 0005 fb18 pea 5fb18 <__FUNCTION__.6571> <== NOT EXECUTED 43452: 4878 0038 pea 38 <== NOT EXECUTED 43456: 6000 00c6 braw 4351e <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 4345a: 2079 0006 15a0 moveal 615a0 <_impure_ptr>,%a0 switch( the_jnode->type ) { 43460: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 43462: 2f28 0008 movel %a0@(8),%sp@- 43466: 486a 000c pea %a2@(12) 4346a: 4eb9 0005 0bb0 jsr 50bb0 switch( the_jnode->type ) { 43470: 202a 0048 movel %a2@(72),%d0 43474: 2200 movel %d0,%d1 43476: 508f addql #8,%sp 43478: 5381 subql #1,%d1 4347a: b481 cmpl %d1,%d2 4347c: 6500 00f0 bcsw 4356e 43480: 2079 0006 15a0 moveal 615a0 <_impure_ptr>,%a0 43486: 303b 1a08 movew %pc@(43490 ,%d1:l:2),%d0 4348a: 48c0 extl %d0 4348c: 4efb 0802 jmp %pc@(43490 ,%d0:l) 43490: 000e 016 <== NOT EXECUTED 43492: 0022 042 <== NOT EXECUTED 43494: 006e 0156 <== NOT EXECUTED 43496: 009a 0052 0032 oril #5374002,%d2 <== NOT EXECUTED 4349c: 00bc 2f28 0008 oril #791150600,%d4 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 434a2: 4878 002f pea 2f 434a6: 4eb9 0005 0a84 jsr 50a84 break; 434ac: 508f addql #8,%sp 434ae: 6000 00e8 braw 43598 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 434b2: 2f2a 0050 movel %a2@(80),%sp@- 434b6: 2f2a 004c movel %a2@(76),%sp@- 434ba: 4879 0005 f9d3 pea 5f9d3 434c0: 600e bras 434d0 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 434c2: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 434c6: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 434ca: 4879 0005 f9e6 pea 5f9e6 <== NOT EXECUTED 434d0: 2f28 0008 movel %a0@(8),%sp@- 434d4: 4eb9 0005 0a44 jsr 50a44 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 434da: 4fef 0010 lea %sp@(16),%sp 434de: 6000 00b8 braw 43598 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 434e2: 2f2a 0050 movel %a2@(80),%sp@- 434e6: 4879 0005 f9f5 pea 5f9f5 434ec: 2f28 0008 movel %a0@(8),%sp@- 434f0: 4eb9 0005 0a44 jsr 50a44 (uint32_t)the_jnode->info.file.size ); #endif break; 434f6: 4fef 000c lea %sp@(12),%sp 434fa: 6000 009c braw 43598 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 434fe: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43502: 4879 0005 fa01 pea 5fa01 <== NOT EXECUTED 43508: 4eb9 0005 0bb0 jsr 50bb0 <== NOT EXECUTED assert(0); 4350e: 4879 0005 f0e9 pea 5f0e9 <== NOT EXECUTED 43514: 4879 0005 fb18 pea 5fb18 <__FUNCTION__.6571> <== NOT EXECUTED 4351a: 4878 005d pea 5d <== NOT EXECUTED 4351e: 4879 0005 f98a pea 5f98a <== NOT EXECUTED 43524: 4eb9 0004 3cfc jsr 43cfc <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 4352a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4352e: 4879 0005 fa01 pea 5fa01 <== NOT EXECUTED 43534: 4eb9 0005 0bb0 jsr 50bb0 <== NOT EXECUTED assert(0); 4353a: 4879 0005 f0e9 pea 5f0e9 <== NOT EXECUTED 43540: 4879 0005 fb18 pea 5fb18 <__FUNCTION__.6571> <== NOT EXECUTED 43546: 4878 0062 pea 62 <== NOT EXECUTED 4354a: 60d2 bras 4351e <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 4354c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43550: 4879 0005 fa15 pea 5fa15 <== NOT EXECUTED 43556: 4eb9 0005 0bb0 jsr 50bb0 <== NOT EXECUTED assert(0); 4355c: 4879 0005 f0e9 pea 5f0e9 <== NOT EXECUTED 43562: 4879 0005 fb18 pea 5fb18 <__FUNCTION__.6571> <== NOT EXECUTED 43568: 4878 0067 pea 67 <== NOT EXECUTED 4356c: 60b0 bras 4351e <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 4356e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43570: 4879 0005 fa28 pea 5fa28 <== NOT EXECUTED 43576: 2079 0006 15a0 moveal 615a0 <_impure_ptr>,%a0 <== NOT EXECUTED 4357c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43580: 4eb9 0005 0a44 jsr 50a44 <== NOT EXECUTED assert(0); 43586: 4879 0005 f0e9 pea 5f0e9 <== NOT EXECUTED 4358c: 4879 0005 fb18 pea 5fb18 <__FUNCTION__.6571> <== NOT EXECUTED 43592: 4878 006c pea 6c <== NOT EXECUTED 43596: 6086 bras 4351e <== NOT EXECUTED break; } puts(""); } 43598: 242e fff8 movel %fp@(-8),%d2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 4359c: 203c 0006 00f2 movel #393458,%d0 } 435a2: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 435a6: 2d40 0008 movel %d0,%fp@(8) } 435aa: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 435ac: 4ef9 0005 23ec jmp 523ec 00042c24 : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42c24: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42c26: 4e56 0000 linkw %fp,#0 42c2a: 206e 0008 moveal %fp@(8),%a0 42c2e: 2f0a movel %a2,%sp@- IMFS_jnode_t *node; int i; node = loc->node_access; 42c30: 2050 moveal %a0@,%a0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42c32: 2f02 movel %d2,%sp@- 42c34: 226e 000c moveal %fp@(12),%a1 42c38: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42c3c: b0a8 0048 cmpl %a0@(72),%d0 42c40: 6604 bnes 42c46 42c42: 4200 clrb %d0 42c44: 6016 bras 42c5c rtems_set_errno_and_return_minus_one( EINVAL ); 42c46: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 42c4c: 7216 moveq #22,%d1 <== NOT EXECUTED 42c4e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c50: 70ff moveq #-1,%d0 <== NOT EXECUTED 42c52: 2081 movel %d1,%a0@ <== NOT EXECUTED 42c54: 6014 bras 42c6a <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 42c56: 1381 0800 moveb %d1,%a1@(00000000,%d0:l) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42c5a: 5280 addql #1,%d0 42c5c: b480 cmpl %d0,%d2 42c5e: 630a blss 42c6a 42c60: 2468 004c moveal %a0@(76),%a2 42c64: 1232 0800 moveb %a2@(00000000,%d0:l),%d1 42c68: 66ec bnes 42c56 buf[i] = node->info.sym_link.name[i]; return i; } 42c6a: 242e fff8 movel %fp@(-8),%d2 42c6e: 246e fffc moveal %fp@(-4),%a2 42c72: 4e5e unlk %fp 42c74: 4e75 rts ... 00042c78 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 42c78: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42c7c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 42c80: 2f0a movel %a2,%sp@- <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42c82: 4878 0020 pea 20 <== NOT EXECUTED 42c86: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42c8a: 2450 moveal %a0@,%a2 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42c8c: 486a 000c pea %a2@(12) <== NOT EXECUTED 42c90: 4eb9 0005 27b8 jsr 527b8 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 42c96: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42c9a: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED 42c9e: 670a beqs 42caa <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42ca0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42ca2: 4eb9 0004 7140 jsr 47140 <_Chain_Extract> <== NOT EXECUTED 42ca8: 588f addql #4,%sp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 42caa: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 42cae: 2050 moveal %a0@,%a0 <== NOT EXECUTED the_jnode->Parent = new_parent; 42cb0: 2548 0008 movel %a0,%a2@(8) <== 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 ); 42cb4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cb6: 4868 004c pea %a0@(76) <== NOT EXECUTED 42cba: 4eb9 0004 7108 jsr 47108 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 42cc0: 42a7 clrl %sp@- <== NOT EXECUTED 42cc2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 42cc6: 4eb9 0004 3564 jsr 43564 <== NOT EXECUTED 42ccc: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED return 0; } 42cd2: 4280 clrl %d0 <== NOT EXECUTED 42cd4: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 42cd8: 4e5e unlk %fp <== NOT EXECUTED 42cda: 4e75 rts 00048c6c : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 48c6c: 4e56 fff8 linkw %fp,#-8 48c70: 2f0b movel %a3,%sp@- 48c72: 266e 000c moveal %fp@(12),%a3 48c76: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 48c78: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 48c7a: 4aaa 0008 tstl %a2@(8) 48c7e: 670e beqs 48c8e */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 48c80: 2f0a movel %a2,%sp@- 48c82: 4eb9 0004 9fe0 jsr 49fe0 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 48c88: 588f addql #4,%sp 48c8a: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 48c8e: 302a 0032 movew %a2@(50),%d0 48c92: 5380 subql #1,%d0 48c94: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 48c98: 42a7 clrl %sp@- 48c9a: 486e fff8 pea %fp@(-8) 48c9e: 4eb9 0004 90d0 jsr 490d0 48ca4: 256e fff8 0044 movel %fp@(-8),%a2@(68) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 48caa: 2f0a movel %a2,%sp@- 48cac: 4eb9 0004 91d4 jsr 491d4 48cb2: 4fef 000c lea %sp@(12),%sp 48cb6: 4a80 tstl %d0 48cb8: 663a bnes 48cf4 48cba: 4a6a 0032 tstw %a2@(50) 48cbe: 6634 bnes 48cf4 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 48cc0: 2079 0005 b544 moveal 5b544 ,%a0 48cc6: 2653 moveal %a3@,%a3 48cc8: b7e8 0004 cmpal %a0@(4),%a3 48ccc: 6604 bnes 48cd2 rtems_filesystem_current.node_access = NULL; 48cce: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 48cd2: 7004 moveq #4,%d0 48cd4: b0aa 0048 cmpl %a2@(72),%d0 48cd8: 6610 bnes 48cea if ( the_jnode->info.sym_link.name ) 48cda: 202a 004c movel %a2@(76),%d0 48cde: 670a beqs 48cea free( (void*) the_jnode->info.sym_link.name ); 48ce0: 2f00 movel %d0,%sp@- 48ce2: 4eb9 0004 8f48 jsr 48f48 48ce8: 588f addql #4,%sp } free( the_jnode ); 48cea: 2f0a movel %a2,%sp@- 48cec: 4eb9 0004 8f48 jsr 48f48 48cf2: 588f addql #4,%sp } return 0; } 48cf4: 246e fff0 moveal %fp@(-16),%a2 48cf8: 4280 clrl %d0 48cfa: 266e fff4 moveal %fp@(-12),%a3 48cfe: 4e5e unlk %fp 48d00: 4e75 rts ... 00048d04 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 48d04: 7205 moveq #5,%d1 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 48d06: 4e56 0000 linkw %fp,#0 48d0a: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 48d0e: 2250 moveal %a0@,%a1 switch ( the_jnode->type ) { 48d10: 2029 0048 movel %a1@(72),%d0 48d14: 5580 subql #2,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 48d16: 206e 000c moveal %fp@(12),%a0 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 48d1a: b280 cmpl %d0,%d1 48d1c: 653e bcss 48d5c 48d1e: 303b 0a08 movew %pc@(48d28 ,%d0:l:2),%d0 48d22: 48c0 extl %d0 48d24: 4efb 0802 jmp %pc@(48d28 ,%d0:l) 48d28: 000c 014 <== NOT EXECUTED 48d2a: 0034 064 <== NOT EXECUTED 48d2c: 0026 046 <== NOT EXECUTED 48d2e: 001c 034 <== NOT EXECUTED 48d30: 001c 034 <== NOT EXECUTED 48d32: 0026 046 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 48d34: 2029 0050 movel %a1@(80),%d0 48d38: 2169 004c 0016 movel %a1@(76),%a0@(22) 48d3e: 2140 001a movel %d0,%a0@(26) break; 48d42: 602a bras 48d6e case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 48d44: 2029 004c movel %a1@(76),%d0 48d48: 2229 0050 movel %a1@(80),%d1 48d4c: 6004 bras 48d52 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 48d4e: 4280 clrl %d0 <== NOT EXECUTED 48d50: 4281 clrl %d1 <== NOT EXECUTED 48d52: 2140 001e movel %d0,%a0@(30) 48d56: 2141 0022 movel %d1,%a0@(34) break; 48d5a: 6012 bras 48d6e default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 48d5c: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 48d62: 2040 moveal %d0,%a0 <== NOT EXECUTED 48d64: 70ff moveq #-1,%d0 <== NOT EXECUTED 48d66: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 48d6c: 6032 bras 48da0 <== NOT EXECUTED buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 48d6e: 4280 clrl %d0 break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 48d70: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 48d76: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 48d7c: 2169 0040 002e movel %a1@(64),%a0@(46) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 48d82: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 48d88: 2169 0044 0036 movel %a1@(68),%a0@(54) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 48d8e: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 48d94: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 48d9a: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 48da0: 4e5e unlk %fp 48da2: 4e75 rts 00042cdc : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 42cdc: 4e56 ffc4 linkw %fp,#-60 42ce0: 2f03 movel %d3,%sp@- 42ce2: 262e 0010 movel %fp@(16),%d3 42ce6: 2f02 movel %d2,%sp@- int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 42ce8: 240e movel %fp,%d2 42cea: 0682 ffff ffc7 addil #-57,%d2 42cf0: 2f03 movel %d3,%sp@- 42cf2: 4eb9 0005 27a0 jsr 527a0 42cf8: 588f addql #4,%sp 42cfa: 486e fffc pea %fp@(-4) 42cfe: 2f02 movel %d2,%sp@- 42d00: 2f00 movel %d0,%sp@- 42d02: 2f03 movel %d3,%sp@- 42d04: 4eb9 0004 d3a0 jsr 4d3a0 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 42d0a: 2f2e 000c movel %fp@(12),%sp@- 42d0e: 4eb9 0005 2310 jsr 52310 if (info.sym_link.name == NULL) { 42d14: 4fef 0014 lea %sp@(20),%sp IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 42d18: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 42d1c: 6608 bnes 42d26 rtems_set_errno_and_return_minus_one(ENOMEM); 42d1e: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 42d24: 6038 bras 42d5e <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 42d26: 486e ffe8 pea %fp@(-24) 42d2a: 2f3c 0000 a1ff movel #41471,%sp@- 42d30: 2f02 movel %d2,%sp@- 42d32: 4878 0004 pea 4 42d36: 2f2e 0008 movel %fp@(8),%sp@- 42d3a: 4eb9 0004 c898 jsr 4c898 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 42d40: 4fef 0014 lea %sp@(20),%sp 42d44: 4a80 tstl %d0 42d46: 6704 beqs 42d4c 42d48: 4281 clrl %d1 42d4a: 601a bras 42d66 free(info.sym_link.name); 42d4c: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 42d50: 4eb9 0004 34dc jsr 434dc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 42d56: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 42d5c: 588f addql #4,%sp <== NOT EXECUTED 42d5e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d60: 700c moveq #12,%d0 <== NOT EXECUTED 42d62: 72ff moveq #-1,%d1 <== NOT EXECUTED 42d64: 2080 movel %d0,%a0@ <== NOT EXECUTED } return 0; } 42d66: 242e ffbc movel %fp@(-68),%d2 42d6a: 2001 movel %d1,%d0 42d6c: 262e ffc0 movel %fp@(-64),%d3 42d70: 4e5e unlk %fp 42d72: 4e75 rts 00042d74 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42d74: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 42d76: 4e56 ffd0 linkw %fp,#-48 42d7a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42d7e: 246e 000c moveal %fp@(12),%a2 42d82: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 42d86: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42d88: b0ab 0048 cmpl %a3@(72),%d0 42d8c: 6600 0086 bnew 42e14 if ( !node->info.hard_link.link_node ) 42d90: 282b 004c movel %a3@(76),%d4 42d94: 6610 bnes 42da6 rtems_set_errno_and_return_minus_one( EINVAL ); 42d96: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 42d9c: 7216 moveq #22,%d1 <== NOT EXECUTED 42d9e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42da0: 70ff moveq #-1,%d0 <== NOT EXECUTED 42da2: 2081 movel %d1,%a0@ <== NOT EXECUTED 42da4: 607e bras 42e24 <== NOT EXECUTED the_link = *loc; 42da6: 4878 0014 pea 14 42daa: 240e movel %fp,%d2 42dac: 0682 ffff ffe4 addil #-28,%d2 42db2: 2f0a movel %a2,%sp@- 42db4: 2f02 movel %d2,%sp@- 42db6: 4eb9 0005 1c44 jsr 51c44 the_link.node_access = node->info.hard_link.link_node; 42dbc: 2d44 ffe4 movel %d4,%fp@(-28) /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 42dc0: 7801 moveq #1,%d4 if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 42dc2: 2f02 movel %d2,%sp@- 42dc4: 4eb9 0004 c9a8 jsr 4c9a8 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 42dca: 206b 004c moveal %a3@(76),%a0 42dce: 4281 clrl %d1 42dd0: 4fef 0010 lea %sp@(16),%sp 42dd4: 3028 0032 movew %a0@(50),%d0 42dd8: 3200 movew %d0,%d1 42dda: b881 cmpl %d1,%d4 42ddc: 6618 bnes 42df6 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 42dde: 2f02 movel %d2,%sp@- 42de0: 206e ffec moveal %fp@(-20),%a0 42de4: 2f03 movel %d3,%sp@- 42de6: 2068 0034 moveal %a0@(52),%a0 42dea: 4e90 jsr %a0@ if ( result != 0 ) 42dec: 508f addql #8,%sp 42dee: 4a80 tstl %d0 42df0: 6722 beqs 42e14 42df2: 70ff moveq #-1,%d0 42df4: 602e bras 42e24 return -1; } else { node->info.hard_link.link_node->st_nlink --; 42df6: 5380 subql #1,%d0 42df8: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 42dfc: 42a7 clrl %sp@- 42dfe: 486e fff8 pea %fp@(-8) 42e02: 4eb9 0004 3564 jsr 43564 42e08: 206b 004c moveal %a3@(76),%a0 42e0c: 508f addql #8,%sp 42e0e: 216e fff8 0044 movel %fp@(-8),%a0@(68) /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 42e14: 2f0a movel %a2,%sp@- 42e16: 206a 0008 moveal %a2@(8),%a0 42e1a: 2f03 movel %d3,%sp@- 42e1c: 2068 0034 moveal %a0@(52),%a0 42e20: 4e90 jsr %a0@ return result; 42e22: 508f addql #8,%sp } 42e24: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 42e2a: 4e5e unlk %fp 42e2c: 4e75 rts ... 00042e30 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42e30: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42e32: 4e56 0000 linkw %fp,#0 42e36: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42e3a: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42e3e: b0a8 0048 cmpl %a0@(72),%d0 42e42: 6710 beqs 42e54 rtems_set_errno_and_return_minus_one( ENOTDIR ); 42e44: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 42e4a: 72ff moveq #-1,%d1 <== NOT EXECUTED 42e4c: 2040 moveal %d0,%a0 <== NOT EXECUTED 42e4e: 7014 moveq #20,%d0 <== NOT EXECUTED 42e50: 2080 movel %d0,%a0@ <== NOT EXECUTED 42e52: 601c bras 42e70 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 42e54: 4aa8 0058 tstl %a0@(88) 42e58: 6610 bnes 42e6a rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42e5a: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 42e60: 72ff moveq #-1,%d1 <== NOT EXECUTED 42e62: 2040 moveal %d0,%a0 <== NOT EXECUTED 42e64: 7016 moveq #22,%d0 <== NOT EXECUTED 42e66: 2080 movel %d0,%a0@ <== NOT EXECUTED 42e68: 6006 bras 42e70 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 42e6a: 42a8 0058 clrl %a0@(88) 42e6e: 4281 clrl %d1 return 0; } 42e70: 2001 movel %d1,%d0 42e72: 4e5e unlk %fp 42e74: 4e75 rts ... 00042394 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 42394: 4e56 0000 linkw %fp,#0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 42398: 2079 0005 bac6 moveal 5bac6 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 4239e: 2f03 movel %d3,%sp@- 423a0: 262e 0008 movel %fp@(8),%d3 423a4: 2f02 movel %d2,%sp@- 423a6: 242e 000c movel %fp@(12),%d2 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 423aa: 4a88 tstl %a0 423ac: 6704 beqs 423b2 (*rtems_malloc_statistics_helpers->initialize)(); 423ae: 2050 moveal %a0@,%a0 <== NOT EXECUTED 423b0: 4e90 jsr %a0@ <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 423b2: 4eb9 0004 93aa jsr 493aa /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 423b8: 2079 0005 baca moveal 5baca ,%a0 423be: 4a88 tstl %a0 423c0: 6712 beqs 423d4 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 423c2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 423c6: d483 addl %d3,%d2 <== NOT EXECUTED /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 423c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423ca: 2050 moveal %a0@,%a0 <== NOT EXECUTED 423cc: 4e90 jsr %a0@ <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 423ce: 508f addql #8,%sp <== NOT EXECUTED 423d0: 9480 subl %d0,%d2 <== NOT EXECUTED 423d2: 2600 movel %d0,%d3 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 423d4: 4a39 0005 bac5 tstb 5bac5 423da: 6618 bnes 423f4 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 423dc: 4a39 0005 b50c tstb 5b50c 423e2: 6710 beqs 423f4 ) { memset( heap_begin, 0, heap_size ); 423e4: 2f02 movel %d2,%sp@- 423e6: 42a7 clrl %sp@- 423e8: 2f03 movel %d3,%sp@- 423ea: 4eb9 0004 d2ac jsr 4d2ac 423f0: 4fef 000c lea %sp@(12),%sp * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 423f4: 4a39 0005 bac5 tstb 5bac5 423fa: 6626 bnes 42422 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 423fc: 4878 0004 pea 4 42400: 2f02 movel %d2,%sp@- 42402: 2f03 movel %d3,%sp@- 42404: 2f39 0005 b440 movel 5b440 ,%sp@- 4240a: 4eb9 0004 5d00 jsr 45d00 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42410: 4fef 0010 lea %sp@(16),%sp 42414: 4a80 tstl %d0 42416: 660a bnes 42422 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 42418: 4878 001a pea 1a <== NOT EXECUTED 4241c: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42422: 2f39 0005 b440 movel 5b440 ,%sp@- 42428: 2439 0005 cb40 movel 5cb40 ,%d2 4242e: 4eb9 0004 6788 jsr 46788 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42434: 262e fffc movel %fp@(-4),%d3 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42438: d082 addl %d2,%d0 4243a: 588f addql #4,%sp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 4243c: 242e fff8 movel %fp@(-8),%d2 42440: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42442: 23c0 0005 cb40 movel %d0,5cb40 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42448: 4e75 rts ... 00043da2 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 43da2: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 43da6: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 43daa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 43dae: 4a8a tstl %a2 <== NOT EXECUTED 43db0: 6700 0100 beqw 43eb2 <== NOT EXECUTED return; if ( !print_handler ) 43db4: 2879 0009 8bc8 moveal 98bc8 ,%a4 <== NOT EXECUTED 43dba: 4a8c tstl %a4 <== NOT EXECUTED 43dbc: 6700 00f4 beqw 43eb2 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 43dc0: 70ff moveq #-1,%d0 <== NOT EXECUTED 43dc2: b08a cmpl %a2,%d0 <== NOT EXECUTED 43dc4: 6616 bnes 43ddc <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 43dc6: 4ab9 0009 bb14 tstl 9bb14 <== NOT EXECUTED 43dcc: 6700 00e4 beqw 43eb2 <== NOT EXECUTED 43dd0: 47f9 0009 bb10 lea 9bb10 ,%a3 <== NOT EXECUTED 43dd6: 4284 clrl %d4 <== NOT EXECUTED 43dd8: 95ca subal %a2,%a2 <== NOT EXECUTED 43dda: 6008 bras 43de4 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 43ddc: 282a 00fe movel %a2@(254),%d4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 43de0: 47ea 00be lea %a2@(190),%a3 <== 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); 43de4: 2613 movel %a3@,%d3 <== NOT EXECUTED 43de6: 0683 ffff fff0 addil #-16,%d3 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 43dec: 242b 0004 movel %a3@(4),%d2 <== NOT EXECUTED 43df0: 0682 0000 0010 addil #16,%d2 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 43df6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43df8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43dfa: 4eb9 0004 3d72 jsr 43d72 <== NOT EXECUTED if ( high_water_mark ) 43e00: 508f addql #8,%sp <== NOT EXECUTED 43e02: 4a80 tstl %d0 <== NOT EXECUTED 43e04: 6604 bnes 43e0a <== NOT EXECUTED 43e06: 4282 clrl %d2 <== NOT EXECUTED 43e08: 6004 bras 43e0e <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 43e0a: d483 addl %d3,%d2 <== NOT EXECUTED 43e0c: 9480 subl %d0,%d2 <== NOT EXECUTED else used = 0; if ( the_thread ) { 43e0e: 4a8a tstl %a2 <== NOT EXECUTED 43e10: 672c beqs 43e3e <== NOT EXECUTED (*print_handler)( 43e12: 486e fffb pea %fp@(-5) <== NOT EXECUTED 43e16: 4878 0005 pea 5 <== NOT EXECUTED 43e1a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 43e1e: 4eb9 0004 8ee0 jsr 48ee0 <== NOT EXECUTED 43e24: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e26: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 43e2a: 4879 0008 e352 pea 8e352 <== NOT EXECUTED 43e30: 2f39 0009 8bc4 movel 98bc4 ,%sp@- <== NOT EXECUTED 43e36: 4e94 jsr %a4@ <== NOT EXECUTED 43e38: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 43e3c: 6016 bras 43e54 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 43e3e: 4878 ffff pea ffffffff <== NOT EXECUTED 43e42: 4879 0008 e35f pea 8e35f <== NOT EXECUTED 43e48: 2f39 0009 8bc4 movel 98bc4 ,%sp@- <== NOT EXECUTED 43e4e: 4e94 jsr %a4@ <== NOT EXECUTED 43e50: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 43e54: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED 43e58: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43e5a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 43e5c: 2013 movel %a3@,%d0 <== NOT EXECUTED 43e5e: 5380 subql #1,%d0 <== NOT EXECUTED 43e60: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 43e64: 2f08 movel %a0,%sp@- <== NOT EXECUTED 43e66: 4879 0008 e36d pea 8e36d <== NOT EXECUTED 43e6c: 2f39 0009 8bc4 movel 98bc4 ,%sp@- <== NOT EXECUTED 43e72: 2079 0009 8bc8 moveal 98bc8 ,%a0 <== NOT EXECUTED 43e78: 4e90 jsr %a0@ <== NOT EXECUTED 43e7a: 2079 0009 8bc8 moveal 98bc8 ,%a0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 43e80: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 43e84: 4ab9 0009 8bc0 tstl 98bc0 <== NOT EXECUTED 43e8a: 6612 bnes 43e9e <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 43e8c: 4879 0008 e38b pea 8e38b <== NOT EXECUTED 43e92: 2f39 0009 8bc4 movel 98bc4 ,%sp@- <== NOT EXECUTED 43e98: 4e90 jsr %a0@ <== NOT EXECUTED 43e9a: 508f addql #8,%sp <== NOT EXECUTED 43e9c: 6014 bras 43eb2 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 43e9e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43ea0: 4879 0008 e398 pea 8e398 <== NOT EXECUTED 43ea6: 2f39 0009 8bc4 movel 98bc4 ,%sp@- <== NOT EXECUTED 43eac: 4e90 jsr %a0@ <== NOT EXECUTED 43eae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 43eb2: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 43eb8: 4e5e unlk %fp <== NOT EXECUTED 43eba: 4e75 rts 00043d72 : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 43d72: 70fc moveq #-4,%d0 <== NOT EXECUTED */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 43d74: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 43d78: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 43d7c: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 43d80: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 43d84: d088 addl %a0,%d0 <== NOT EXECUTED 43d86: 6010 bras 43d98 <== NOT EXECUTED if (*base != U32_PATTERN) 43d88: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 43d8e: b290 cmpl %a0@,%d1 <== NOT EXECUTED 43d90: 6704 beqs 43d96 <== NOT EXECUTED return (void *) base; 43d92: 2008 movel %a0,%d0 <== NOT EXECUTED 43d94: 6008 bras 43d9e <== 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++) 43d96: 5888 addql #4,%a0 <== NOT EXECUTED 43d98: b088 cmpl %a0,%d0 <== NOT EXECUTED 43d9a: 62ec bhis 43d88 <== NOT EXECUTED 43d9c: 4280 clrl %d0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 43d9e: 4e5e unlk %fp <== NOT EXECUTED 43da0: 4e75 rts 00043f36 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 43f36: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 43f3a: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 43f3e: 4879 0008 e3ff pea 8e3ff <== NOT EXECUTED 43f44: 45f9 0004 6804 lea 46804 ,%a2 <== NOT EXECUTED * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 43f4a: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED 43f4e: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 43f52: 286b 00c2 moveal %a3@(194),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 43f56: 4e92 jsr %a2@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 43f58: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43f5a: 4879 0008 e40f pea 8e40f <== NOT EXECUTED 43f60: 4e92 jsr %a2@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 43f62: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 43f66: 4879 0008 e42c pea 8e42c <== NOT EXECUTED 43f6c: 4e92 jsr %a2@ <== NOT EXECUTED printk( 43f6e: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 43f72: 4879 0008 e43e pea 8e43e <== NOT EXECUTED 43f78: 4e92 jsr %a2@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 43f7a: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 43f7e: 4878 0020 pea 20 <== NOT EXECUTED 43f82: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 43f86: 4eb9 0004 8ee0 jsr 48ee0 <== NOT EXECUTED 43f8c: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 43f90: 2e80 movel %d0,%sp@ <== NOT EXECUTED 43f92: 4879 0008 e452 pea 8e452 <== NOT EXECUTED 43f98: 4e92 jsr %a2@ <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 43f9a: 202b 00be movel %a3@(190),%d0 <== NOT EXECUTED 43f9e: 206b 00c2 moveal %a3@(194),%a0 <== NOT EXECUTED 43fa2: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 43fa6: 2f08 movel %a0,%sp@- <== NOT EXECUTED 43fa8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43faa: 4879 0008 e468 pea 8e468 <== NOT EXECUTED 43fb0: 4e92 jsr %a2@ <== 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) { 43fb2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 43fb6: 4a02 tstb %d2 <== NOT EXECUTED 43fb8: 6618 bnes 43fd2 <== NOT EXECUTED printk( 43fba: 486c 0018 pea %a4@(24) <== NOT EXECUTED 43fbe: 486c 0008 pea %a4@(8) <== NOT EXECUTED 43fc2: 4878 0010 pea 10 <== NOT EXECUTED 43fc6: 4879 0008 e499 pea 8e499 <== NOT EXECUTED 43fcc: 4e92 jsr %a2@ <== NOT EXECUTED 43fce: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 43fd2: 4878 0081 pea 81 <== NOT EXECUTED 43fd6: 4eb9 0004 9764 jsr 49764 <== NOT EXECUTED 0004af70 : uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4af70: 41f9 0006 2100 lea 62100 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4af76: 4e56 0000 linkw %fp,#0 return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4af7a: 202e 0008 movel %fp@(8),%d0 4af7e: 4e5e unlk %fp 4af80: 4c50 0000 remul %a0@,%d0,%d0 4af84: 4e75 rts ... 000464c8 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 464c8: 4e56 0000 linkw %fp,#0 464cc: 2039 0005 c660 movel 5c660 ,%d0 464d2: 2f02 movel %d2,%sp@- 464d4: 243c 0000 03e8 movel #1000,%d2 464da: 4c42 0000 remul %d2,%d0,%d0 return (milliseconds / rtems_configuration_get_milliseconds_per_tick()); } 464de: 242e 0008 movel %fp@(8),%d2 464e2: 4c40 2002 remul %d0,%d2,%d2 464e6: 2002 movel %d2,%d0 464e8: 241f movel %sp@+,%d2 464ea: 4e5e unlk %fp 464ec: 4e75 rts ... 0004583c <_API_Mutex_Lock>: API_Mutex_Control *the_mutex ) { ISR_Level level; _ISR_Disable( level ); 4583c: 203c 0000 0700 movel #1792,%d0 #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 45842: 4e56 0000 linkw %fp,#0 45846: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 4584a: 40c1 movew %sr,%d1 4584c: 8081 orl %d1,%d0 4584e: 46c0 movew %d0,%sr _CORE_mutex_Seize( 45850: 2f01 movel %d1,%sp@- 45852: 42a7 clrl %sp@- 45854: 4878 0001 pea 1 45858: 2f28 0008 movel %a0@(8),%sp@- 4585c: 4868 0010 pea %a0@(16) 45860: 4eb9 0004 5a20 jsr 45a20 <_CORE_mutex_Seize> 45866: 4fef 0014 lea %sp@(20),%sp the_mutex->Object.id, true, 0, level ); } 4586a: 4e5e unlk %fp 4586c: 4e75 rts ... 0004589c <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 4589c: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 458a0: 2039 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d0 458a6: 5280 addql #1,%d0 458a8: 206e 0008 moveal %fp@(8),%a0 458ac: 23c0 0005 cc94 movel %d0,5cc94 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 458b2: 42a7 clrl %sp@- 458b4: 2f28 0008 movel %a0@(8),%sp@- 458b8: 4868 0010 pea %a0@(16) 458bc: 4eb9 0004 5ac8 jsr 45ac8 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 458c2: 4fef 000c lea %sp@(12),%sp } 458c6: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 458c8: 4ef9 0004 6ce2 jmp 46ce2 <_Thread_Enable_dispatch> ... 000457b4 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 457b4: 4e56 0000 linkw %fp,#0 _Chain_Append( &_API_extensions_List, &the_extension->Node ); 457b8: 2f2e 0008 movel %fp@(8),%sp@- 457bc: 4879 0005 ce34 pea 5ce34 <_API_extensions_List> 457c2: 4eb9 0004 58d0 jsr 458d0 <_Chain_Append> 457c8: 508f addql #8,%sp } 457ca: 4e5e unlk %fp 457cc: 4e75 rts ... 0004c9d4 <_Barrier_Translate_core_barrier_return_code>: }; rtems_status_code _Barrier_Translate_core_barrier_return_code ( CORE_barrier_Status the_barrier_status ) { 4c9d4: 41f9 0005 b5fc lea 5b5fc <_Barrier_Translate_core_barrier_return_code_>,%a0 4c9da: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Barrier_Translate_core_barrier_return_code_[the_barrier_status]; } 4c9de: 202e 0008 movel %fp@(8),%d0 4c9e2: 4e5e unlk %fp 4c9e4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4c9e8: 4e75 rts ... 000478a8 <_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 ); 478a8: 223c 0000 0700 movel #1792,%d1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 478ae: 4e56 fff4 linkw %fp,#-12 478b2: 226e 0008 moveal %fp@(8),%a1 478b6: 48d7 001c moveml %d2-%d4,%sp@ 478ba: 262e 000c movel %fp@(12),%d3 478be: 282e 0010 movel %fp@(16),%d4 478c2: 242e 0014 movel %fp@(20),%d2 ISR_Level level; Thread_Control *executing = _Thread_Executing; 478c6: 2079 0005 f6f2 moveal 5f6f2 <_Thread_Executing>,%a0 * 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 ); 478cc: 40c0 movew %sr,%d0 478ce: 8280 orl %d0,%d1 478d0: 46c1 movew %d1,%sr switch ( the_rwlock->current_state ) { 478d2: 4aa9 0044 tstl %a1@(68) 478d6: 660e bnes 478e6 <_CORE_RWLock_Obtain_for_writing+0x3e> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 478d8: 7202 moveq #2,%d1 478da: 2341 0044 movel %d1,%a1@(68) _ISR_Enable( level ); 478de: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 478e0: 42a8 0034 clrl %a0@(52) return; 478e4: 6044 bras 4792a <_CORE_RWLock_Obtain_for_writing+0x82> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 478e6: 4a04 tstb %d4 478e8: 660a bnes 478f4 <_CORE_RWLock_Obtain_for_writing+0x4c> _ISR_Enable( level ); 478ea: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 478ec: 7002 moveq #2,%d0 478ee: 2140 0034 movel %d0,%a0@(52) 478f2: 6036 bras 4792a <_CORE_RWLock_Obtain_for_writing+0x82> */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 478f4: 7201 moveq #1,%d1 * 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; executing->Wait.id = id; 478f6: 2143 0020 movel %d3,%a0@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 478fa: 42a8 0034 clrl %a0@(52) /* * 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; 478fe: 2149 0044 movel %a1,%a0@(68) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 47902: 2141 0030 movel %d1,%a0@(48) 47906: 2341 0030 movel %d1,%a1@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 4790a: 46c0 movew %d0,%sr _Thread_queue_Enqueue_with_handler( 4790c: 2d42 000c movel %d2,%fp@(12) 47910: 203c 0004 79e8 movel #293352,%d0 47916: 2d49 0008 movel %a1,%fp@(8) 4791a: 2d40 0010 movel %d0,%fp@(16) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4791e: 4cd7 001c moveml %sp@,%d2-%d4 47922: 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( 47924: 4ef9 0004 8ff0 jmp 48ff0 <_Thread_queue_Enqueue_with_handler> _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4792a: 4cd7 001c moveml %sp@,%d2-%d4 4792e: 4e5e unlk %fp 47930: 4e75 rts ... 00047934 <_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 ); 47934: 223c 0000 0700 movel #1792,%d1 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 4793a: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 4793e: 2079 0005 f6f2 moveal 5f6f2 <_Thread_Executing>,%a0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 47944: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47948: 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 ); 4794c: 40c0 movew %sr,%d0 4794e: 8280 orl %d0,%d1 47950: 46c1 movew %d1,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 47952: 222a 0044 movel %a2@(68),%d1 47956: 660a bnes 47962 <_CORE_RWLock_Release+0x2e> _ISR_Enable( level ); 47958: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4795a: 7002 moveq #2,%d0 4795c: 2140 0034 movel %d0,%a0@(52) return CORE_RWLOCK_SUCCESSFUL; 47960: 6078 bras 479da <_CORE_RWLock_Release+0xa6> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 47962: 7401 moveq #1,%d2 47964: b481 cmpl %d1,%d2 47966: 6610 bnes 47978 <_CORE_RWLock_Release+0x44> the_rwlock->number_of_readers -= 1; 47968: 222a 0048 movel %a2@(72),%d1 4796c: 5381 subql #1,%d1 4796e: 2541 0048 movel %d1,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 47972: 6704 beqs 47978 <_CORE_RWLock_Release+0x44> /* must be unlocked again */ _ISR_Enable( level ); 47974: 46c0 movew %d0,%sr return CORE_RWLOCK_SUCCESSFUL; 47976: 6062 bras 479da <_CORE_RWLock_Release+0xa6> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 47978: 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; 4797c: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 47980: 46c0 movew %d0,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 47982: 2f0a movel %a2,%sp@- 47984: 4eb9 0004 8eb0 jsr 48eb0 <_Thread_queue_Dequeue> if ( next ) { 4798a: 588f addql #4,%sp 4798c: 4a80 tstl %d0 4798e: 674a beqs 479da <_CORE_RWLock_Release+0xa6> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 47990: 7201 moveq #1,%d1 47992: 2040 moveal %d0,%a0 47994: b2a8 0030 cmpl %a0@(48),%d1 47998: 6608 bnes 479a2 <_CORE_RWLock_Release+0x6e> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 4799a: 7002 moveq #2,%d0 4799c: 2540 0044 movel %d0,%a2@(68) return CORE_RWLOCK_SUCCESSFUL; 479a0: 6038 bras 479da <_CORE_RWLock_Release+0xa6> /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 479a2: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 479a4: 52aa 0048 addql #1,%a2@(72) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 479a8: 49f9 0004 92f0 lea 492f0 <_Thread_queue_First>,%a4 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 ); 479ae: 47f9 0004 91c4 lea 491c4 <_Thread_queue_Extract>,%a3 /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 479b4: 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 ); 479b8: 2f0a movel %a2,%sp@- 479ba: 4e94 jsr %a4@ if ( !next || 479bc: 588f addql #4,%sp 479be: 4a80 tstl %d0 479c0: 6718 beqs 479da <_CORE_RWLock_Release+0xa6> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 479c2: 7401 moveq #1,%d2 479c4: 2040 moveal %d0,%a0 479c6: b4a8 0030 cmpl %a0@(48),%d2 479ca: 670e beqs 479da <_CORE_RWLock_Release+0xa6> return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 479cc: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 479d0: 2f00 movel %d0,%sp@- 479d2: 2f0a movel %a2,%sp@- 479d4: 4e93 jsr %a3@ } 479d6: 508f addql #8,%sp 479d8: 60de bras 479b8 <_CORE_RWLock_Release+0x84> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 479da: 4280 clrl %d0 479dc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 479e2: 4e5e unlk %fp 479e4: 4e75 rts ... 000479e8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 479e8: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 479ec: 486e fffc pea %fp@(-4) 479f0: 2f2e 0008 movel %fp@(8),%sp@- 479f4: 4eb9 0004 8b8c jsr 48b8c <_Thread_Get> switch ( location ) { 479fa: 508f addql #8,%sp 479fc: 4aae fffc tstl %fp@(-4) 47a00: 6618 bnes 47a1a <_CORE_RWLock_Timeout+0x32> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 47a02: 2f00 movel %d0,%sp@- 47a04: 4eb9 0004 93d4 jsr 493d4 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47a0a: 588f addql #4,%sp 47a0c: 2039 0005 f638 movel 5f638 <_Thread_Dispatch_disable_level>,%d0 47a12: 5380 subql #1,%d0 47a14: 23c0 0005 f638 movel %d0,5f638 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 47a1a: 4e5e unlk %fp 47a1c: 4e75 rts ... 0004bf0c <_CORE_barrier_Initialize>: void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4bf0c: 4e56 0000 linkw %fp,#0 the_barrier->Attributes = *the_barrier_attributes; 4bf10: 226e 000c moveal %fp@(12),%a1 the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4bf14: 4878 0003 pea 3 void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4bf18: 206e 0008 moveal %fp@(8),%a0 the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4bf1c: 2f3c 0001 0000 movel #65536,%sp@- 4bf22: 42a7 clrl %sp@- CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; 4bf24: 2011 movel %a1@,%d0 4bf26: 2229 0004 movel %a1@(4),%d1 4bf2a: 2140 0040 movel %d0,%a0@(64) 4bf2e: 2141 0044 movel %d1,%a0@(68) the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4bf32: 2f08 movel %a0,%sp@- CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; 4bf34: 42a8 0048 clrl %a0@(72) _Thread_queue_Initialize( 4bf38: 4eb9 0004 739c jsr 4739c <_Thread_queue_Initialize> 4bf3e: 4fef 0010 lea %sp@(16),%sp &the_barrier->Wait_queue, THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_BARRIER, CORE_BARRIER_TIMEOUT ); } 4bf42: 4e5e unlk %fp 4bf44: 4e75 rts ... 0004bf48 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 4bf48: 4e56 fff4 linkw %fp,#-12 4bf4c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4bf50: 246e 0008 moveal %fp@(8),%a2 Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4bf54: 4282 clrl %d2 4bf56: 47f9 0004 702c lea 4702c <_Thread_queue_Dequeue>,%a3 4bf5c: 6002 bras 4bf60 <_CORE_barrier_Release+0x18> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; 4bf5e: 5282 addql #1,%d2 { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4bf60: 2f0a movel %a2,%sp@- 4bf62: 4e93 jsr %a3@ 4bf64: 588f addql #4,%sp 4bf66: 4a80 tstl %d0 4bf68: 66f4 bnes 4bf5e <_CORE_barrier_Release+0x16> #endif count++; } the_barrier->number_of_waiting_threads = 0; return count; } 4bf6a: 2002 movel %d2,%d0 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0; 4bf6c: 42aa 0048 clrl %a2@(72) return count; } 4bf70: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4bf76: 4e5e unlk %fp 4bf78: 4e75 rts ... 0004bf7c <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4bf7c: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4bf82: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4bf86: 2279 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4bf8c: 48d7 001c moveml %d2-%d4,%sp@ 4bf90: 242e 000c movel %fp@(12),%d2 4bf94: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4bf98: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4bf9c: 206e 0008 moveal %fp@(8),%a0 4bfa0: 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 ); 4bfa4: 40c1 movew %sr,%d1 4bfa6: 8081 orl %d1,%d0 4bfa8: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4bfaa: 2028 0048 movel %a0@(72),%d0 4bfae: 5280 addql #1,%d0 4bfb0: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4bfb4: 4aa8 0040 tstl %a0@(64) 4bfb8: 6626 bnes 4bfe0 <_CORE_barrier_Wait+0x64> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4bfba: b0a8 0044 cmpl %a0@(68),%d0 4bfbe: 6620 bnes 4bfe0 <_CORE_barrier_Wait+0x64> executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4bfc0: 7001 moveq #1,%d0 4bfc2: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4bfc6: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4bfc8: 2d44 0010 movel %d4,%fp@(16) 4bfcc: 2d42 000c movel %d2,%fp@(12) 4bfd0: 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 ); } 4bfd4: 4cd7 001c moveml %sp@,%d2-%d4 4bfd8: 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 ); 4bfda: 4ef9 0004 bf48 jmp 4bf48 <_CORE_barrier_Release> 4bfe0: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4bfe2: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4bfe6: 2348 0044 movel %a0,%a1@(68) 4bfea: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4bfee: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4bff0: 2d43 000c movel %d3,%fp@(12) 4bff4: 203c 0004 7458 movel #291928,%d0 4bffa: 2d48 0008 movel %a0,%fp@(8) 4bffe: 2d40 0010 movel %d0,%fp@(16) } 4c002: 4cd7 001c moveml %sp@,%d2-%d4 4c006: 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 ); 4c008: 4ef9 0004 716c jmp 4716c <_Thread_queue_Enqueue_with_handler> ... 00052088 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 52088: 4e56 ffe0 linkw %fp,#-32 5208c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 52090: 246e 0008 moveal %fp@(8),%a2 52094: 2a2e 000c movel %fp@(12),%d5 52098: 262e 0010 movel %fp@(16),%d3 5209c: 286e 001c moveal %fp@(28),%a4 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 520a0: b6aa 004c cmpl %a2@(76),%d3 520a4: 6304 blss 520aa <_CORE_message_queue_Broadcast+0x22> 520a6: 7001 moveq #1,%d0 <== NOT EXECUTED 520a8: 6042 bras 520ec <_CORE_message_queue_Broadcast+0x64><== NOT EXECUTED * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 520aa: 4aaa 0048 tstl %a2@(72) 520ae: 6610 bnes 520c0 <_CORE_message_queue_Broadcast+0x38> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 520b0: 4282 clrl %d2 520b2: 283c 0005 438c movel #344972,%d4 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 520b8: 4bf9 0005 a388 lea 5a388 ,%a5 520be: 601a bras 520da <_CORE_message_queue_Broadcast+0x52> * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 520c0: 4294 clrl %a4@ 520c2: 6026 bras 520ea <_CORE_message_queue_Broadcast+0x62> 520c4: 2f03 movel %d3,%sp@- */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 520c6: 5282 addql #1,%d2 520c8: 2f05 movel %d5,%sp@- 520ca: 2f2b 002c movel %a3@(44),%sp@- 520ce: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 520d0: 206b 0028 moveal %a3@(40),%a0 520d4: 4fef 000c lea %sp@(12),%sp 520d8: 2083 movel %d3,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 520da: 2f0a movel %a2,%sp@- 520dc: 2044 moveal %d4,%a0 520de: 4e90 jsr %a0@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 520e0: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 520e2: 2640 moveal %d0,%a3 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 520e4: 4a80 tstl %d0 520e6: 66dc bnes 520c4 <_CORE_message_queue_Broadcast+0x3c> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 520e8: 2882 movel %d2,%a4@ 520ea: 4280 clrl %d0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 520ec: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 520f2: 4e5e unlk %fp 520f4: 4e75 rts ... 0004dc30 <_CORE_message_queue_Initialize>: /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4dc30: 7003 moveq #3,%d0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 4dc32: 4e56 fff4 linkw %fp,#-12 4dc36: 222e 0014 movel %fp@(20),%d1 4dc3a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4dc3e: 246e 0008 moveal %fp@(8),%a2 4dc42: 242e 0010 movel %fp@(16),%d2 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4dc46: c081 andl %d1,%d0 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4dc48: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4dc4c: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4dc50: 2541 004c movel %d1,%a2@(76) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4dc54: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 4dc58: 42aa 0064 clrl %a2@(100) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4dc5c: 4a80 tstl %d0 4dc5e: 6604 bnes 4dc64 <_CORE_message_queue_Initialize+0x34> 4dc60: 2001 movel %d1,%d0 4dc62: 600c bras 4dc70 <_CORE_message_queue_Initialize+0x40> allocated_message_size += sizeof(uint32_t); 4dc64: 2001 movel %d1,%d0 4dc66: 5880 addql #4,%d0 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4dc68: 76fc moveq #-4,%d3 4dc6a: c083 andl %d3,%d0 } if (allocated_message_size < maximum_message_size) 4dc6c: b280 cmpl %d0,%d1 4dc6e: 626e bhis 4dcde <_CORE_message_queue_Initialize+0xae> /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4dc70: 2600 movel %d0,%d3 4dc72: 0683 0000 0014 addil #20,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4dc78: 2203 movel %d3,%d1 4dc7a: 4c02 1800 mulsl %d2,%d1 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4dc7e: b081 cmpl %d1,%d0 4dc80: 625c bhis 4dcde <_CORE_message_queue_Initialize+0xae> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dc82: 2f01 movel %d1,%sp@- 4dc84: 4eb9 0005 05e8 jsr 505e8 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dc8a: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dc8c: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dc90: 674c beqs 4dcde <_CORE_message_queue_Initialize+0xae> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4dc92: 2f03 movel %d3,%sp@- 4dc94: 2f02 movel %d2,%sp@- 4dc96: 2f00 movel %d0,%sp@- 4dc98: 486a 0068 pea %a2@(104) 4dc9c: 4eb9 0005 2534 jsr 52534 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4dca2: 4878 0006 pea 6 4dca6: 7001 moveq #1,%d0 4dca8: 206e 000c moveal %fp@(12),%a0 4dcac: b090 cmpl %a0@,%d0 4dcae: 57c0 seq %d0 4dcb0: 4878 0080 pea 80 4dcb4: 49c0 extbl %d0 4dcb6: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4dcb8: 41ea 0054 lea %a2@(84),%a0 4dcbc: 2f00 movel %d0,%sp@- 4dcbe: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4dcc2: 41ea 0050 lea %a2@(80),%a0 4dcc6: 2548 0058 movel %a0,%a2@(88) 4dcca: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4dccc: 42aa 0054 clrl %a2@(84) 4dcd0: 4eb9 0004 faf4 jsr 4faf4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dcd6: 4fef 0020 lea %sp@(32),%sp allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4dcda: 7001 moveq #1,%d0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dcdc: 6002 bras 4dce0 <_CORE_message_queue_Initialize+0xb0> 4dcde: 4200 clrb %d0 } 4dce0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4dce6: 4e5e unlk %fp 4dce8: 4e75 rts ... 00052574 <_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 ) { 52574: 4e56 0000 linkw %fp,#0 52578: 226e 000c moveal %fp@(12),%a1 5257c: 2f0b movel %a3,%sp@- 5257e: 202e 0010 movel %fp@(16),%d0 52582: 206e 0008 moveal %fp@(8),%a0 52586: 2f0a movel %a2,%sp@- 52588: 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 ) { 5258c: 0c80 7fff ffff cmpil #2147483647,%d0 52592: 6628 bnes 525bc <_CORE_message_queue_Insert_message+0x48> _ISR_Disable( level ); 52594: 203c 0000 0700 movel #1792,%d0 5259a: 40c1 movew %sr,%d1 5259c: 8081 orl %d1,%d0 5259e: 46c0 movew %d0,%sr Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 525a0: 45e8 0054 lea %a0@(84),%a2 SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 525a4: 52a8 0048 addql #1,%a0@(72) 525a8: 228a movel %a2,%a1@ old_last_node = the_chain->last; 525aa: 2468 0058 moveal %a0@(88),%a2 the_chain->last = the_node; 525ae: 2149 0058 movel %a1,%a0@(88) old_last_node->next = the_node; the_node->previous = old_last_node; 525b2: 234a 0004 movel %a2,%a1@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 525b6: 2489 movel %a1,%a2@ _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 525b8: 46c1 movew %d1,%sr 525ba: 606c bras 52628 <_CORE_message_queue_Insert_message+0xb4> } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 525bc: 0c80 8000 0000 cmpil #-2147483648,%d0 525c2: 6626 bnes 525ea <_CORE_message_queue_Insert_message+0x76> _ISR_Disable( level ); 525c4: 203c 0000 0700 movel #1792,%d0 525ca: 40c1 movew %sr,%d1 525cc: 8081 orl %d1,%d0 525ce: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 525d0: 45e8 0050 lea %a0@(80),%a2 SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 525d4: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 525d8: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 525da: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 525de: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 525e0: 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; 525e4: 228b movel %a3,%a1@ _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 525e6: 46c1 movew %d1,%sr 525e8: 603e bras 52628 <_CORE_message_queue_Insert_message+0xb4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 525ea: 2208 movel %a0,%d1 525ec: 0681 0000 0054 addil #84,%d1 Chain_Control *the_header; int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 525f2: 2468 0050 moveal %a0@(80),%a2 while ( !_Chain_Is_tail( the_header, the_node ) ) { 525f6: 6008 bras 52600 <_CORE_message_queue_Insert_message+0x8c> RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority ( CORE_message_queue_Buffer_control *the_message ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) return the_message->priority; 525f8: b0aa 0008 cmpl %a2@(8),%d0 525fc: 6d06 blts 52604 <_CORE_message_queue_Insert_message+0x90> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { the_node = the_node->next; 525fe: 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 = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 52600: b28a cmpl %a2,%d1 52602: 66f4 bnes 525f8 <_CORE_message_queue_Insert_message+0x84> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 52604: 203c 0000 0700 movel #1792,%d0 5260a: 40c1 movew %sr,%d1 5260c: 8081 orl %d1,%d0 5260e: 46c0 movew %d0,%sr SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 52610: 246a 0004 moveal %a2@(4),%a2 } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 52614: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 52618: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 5261a: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 5261e: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 52620: 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; 52624: 228b movel %a3,%a1@ _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 52626: 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 ) 52628: 2268 0060 moveal %a0@(96),%a1 5262c: 4a89 tstl %a1 5262e: 670e beqs 5263e <_CORE_message_queue_Insert_message+0xca> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 52630: 2d68 0064 0008 movel %a0@(100),%fp@(8) #endif } 52636: 245f moveal %sp@+,%a2 52638: 265f moveal %sp@+,%a3 5263a: 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); 5263c: 4ed1 jmp %a1@ #endif } 5263e: 245f moveal %sp@+,%a2 52640: 265f moveal %sp@+,%a3 52642: 4e5e unlk %fp 52644: 4e75 rts ... 0004dcec <_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 ); 4dcec: 223c 0000 0700 movel #1792,%d1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4dcf2: 4e56 ffe0 linkw %fp,#-32 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4dcf6: 2079 0006 6302 moveal 66302 <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4dcfc: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4dd00: 282e 000c movel %fp@(12),%d4 4dd04: 242e 001c movel %fp@(28),%d2 4dd08: 246e 0008 moveal %fp@(8),%a2 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; 4dd0c: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4dd10: 262e 0010 movel %fp@(16),%d3 4dd14: 226e 0014 moveal %fp@(20),%a1 4dd18: 1a2e 001b moveb %fp@(27),%d5 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 ); 4dd1c: 40c0 movew %sr,%d0 4dd1e: 8280 orl %d0,%d1 4dd20: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4dd22: 220a movel %a2,%d1 4dd24: 0681 0000 0054 addil #84,%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4dd2a: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4dd2e: b28b cmpl %a3,%d1 4dd30: 6700 00a6 beqw 4ddd8 <_CORE_message_queue_Seize+0xec> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4dd34: 2853 moveal %a3@,%a4 the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4dd36: 4bea 0050 lea %a2@(80),%a5 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4dd3a: 254c 0050 movel %a4,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4dd3e: 294d 0004 movel %a5,%a4@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 4dd42: 4a8b tstl %a3 4dd44: 6700 0092 beqw 4ddd8 <_CORE_message_queue_Seize+0xec> the_message_queue->number_of_pending_messages -= 1; 4dd48: 53aa 0048 subql #1,%a2@(72) _ISR_Enable( level ); 4dd4c: 46c0 movew %d0,%sr *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 4dd4e: 2079 0006 6302 moveal 66302 <_Thread_Executing>,%a0 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; 4dd54: 22ab 000c movel %a3@(12),%a1@ _Thread_Executing->Wait.count = _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 4dd58: 240b movel %a3,%d2 4dd5a: 0682 0000 0010 addil #16,%d2 if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 4dd60: 216b 0008 0024 movel %a3@(8),%a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4dd66: 49f9 0005 5548 lea 55548 ,%a4 4dd6c: 2f11 movel %a1@,%sp@- 4dd6e: 2f02 movel %d2,%sp@- 4dd70: 2f03 movel %d3,%sp@- 4dd72: 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 ); 4dd74: 2f0a movel %a2,%sp@- 4dd76: 4eb9 0004 f784 jsr 4f784 <_Thread_queue_Dequeue> if ( !the_thread ) { 4dd7c: 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 ); 4dd80: 2040 moveal %d0,%a0 if ( !the_thread ) { 4dd82: 4a80 tstl %d0 4dd84: 661a bnes 4dda0 <_CORE_message_queue_Seize+0xb4> 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 ); 4dd86: 45ea 0068 lea %a2@(104),%a2 4dd8a: 2d4b 000c movel %a3,%fp@(12) 4dd8e: 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 ); } 4dd92: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4dd98: 4e5e unlk %fp 4dd9a: 4ef9 0004 db6c jmp 4db6c <_Chain_Append> */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 4dda0: 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; 4dda4: 2768 0024 0008 movel %a0@(36),%a3@(8) 4ddaa: 2740 000c movel %d0,%a3@(12) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ddae: 2f00 movel %d0,%sp@- 4ddb0: 2f28 002c movel %a0@(44),%sp@- 4ddb4: 2f02 movel %d2,%sp@- 4ddb6: 4e94 jsr %a4@ the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 4ddb8: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 4ddbe: 4fef 000c lea %sp@(12),%sp 4ddc2: 2d4b 000c movel %a3,%fp@(12) 4ddc6: 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 ); } 4ddca: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4ddd0: 4e5e unlk %fp the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 4ddd2: 4ef9 0005 2574 jmp 52574 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 4ddd8: 4a05 tstb %d5 4ddda: 6612 bnes 4ddee <_CORE_message_queue_Seize+0x102> _ISR_Enable( level ); 4dddc: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4ddde: 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 ); } 4dde0: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4dde6: 2140 0034 movel %d0,%a0@(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 ); } 4ddea: 4e5e unlk %fp 4ddec: 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; 4ddee: 7201 moveq #1,%d1 4ddf0: 2541 0030 movel %d1,%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; executing->Wait.return_argument = size_p; 4ddf4: 2149 0028 movel %a1,%a0@(40) } _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; 4ddf8: 2143 002c movel %d3,%a0@(44) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 4ddfc: 2144 0020 movel %d4,%a0@(32) 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; 4de00: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; 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 ); 4de04: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4de06: 4bf9 0004 fbb0 lea 4fbb0 <_Thread_queue_Timeout>,%a5 4de0c: 2d42 000c movel %d2,%fp@(12) 4de10: 2d4d 0010 movel %a5,%fp@(16) 4de14: 2d4a 0008 movel %a2,%fp@(8) } 4de18: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4de1e: 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 ); 4de20: 4ef9 0004 f8c4 jmp 4f8c4 <_Thread_queue_Enqueue_with_handler> ... 0004de28 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 4de28: 4e56 ffe8 linkw %fp,#-24 4de2c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4de30: 246e 0008 moveal %fp@(8),%a2 4de34: 282e 000c movel %fp@(12),%d4 4de38: 242e 0010 movel %fp@(16),%d2 4de3c: 262e 001c movel %fp@(28),%d3 4de40: 1a2e 0023 moveb %fp@(35),%d5 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 4de44: b4aa 004c cmpl %a2@(76),%d2 4de48: 6306 blss 4de50 <_CORE_message_queue_Submit+0x28> 4de4a: 7001 moveq #1,%d0 4de4c: 6000 00d6 braw 4df24 <_CORE_message_queue_Submit+0xfc> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 4de50: 4aaa 0048 tstl %a2@(72) 4de54: 6632 bnes 4de88 <_CORE_message_queue_Submit+0x60> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4de56: 2f0a movel %a2,%sp@- 4de58: 4eb9 0004 f784 jsr 4f784 <_Thread_queue_Dequeue> if ( the_thread ) { 4de5e: 588f addql #4,%sp /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4de60: 2640 moveal %d0,%a3 if ( the_thread ) { 4de62: 4a80 tstl %d0 4de64: 6722 beqs 4de88 <_CORE_message_queue_Submit+0x60> 4de66: 2f02 movel %d2,%sp@- 4de68: 2f04 movel %d4,%sp@- 4de6a: 2f2b 002c movel %a3@(44),%sp@- 4de6e: 4eb9 0005 5548 jsr 55548 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 4de74: 206b 0028 moveal %a3@(40),%a0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4de78: 4fef 000c lea %sp@(12),%sp buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; the_thread->Wait.count = (uint32_t) submit_type; 4de7c: 4280 clrl %d0 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 4de7e: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 4de80: 2743 0024 movel %d3,%a3@(36) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4de84: 6000 009e braw 4df24 <_CORE_message_queue_Submit+0xfc> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 4de88: 202a 0044 movel %a2@(68),%d0 4de8c: b0aa 0048 cmpl %a2@(72),%d0 4de90: 6336 blss 4dec8 <_CORE_message_queue_Submit+0xa0> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 4de92: 486a 0068 pea %a2@(104) 4de96: 4eb9 0004 dbcc jsr 4dbcc <_Chain_Get> 4de9c: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4de9e: 2f02 movel %d2,%sp@- 4dea0: 2f04 movel %d4,%sp@- 4dea2: 486b 0010 pea %a3@(16) 4dea6: 4eb9 0005 5548 jsr 55548 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 4deac: 2742 000c movel %d2,%a3@(12) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 4deb0: 2743 0008 movel %d3,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 4deb4: 2f03 movel %d3,%sp@- 4deb6: 2f0b movel %a3,%sp@- 4deb8: 2f0a movel %a2,%sp@- 4deba: 4eb9 0005 2574 jsr 52574 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4dec0: 4fef 001c lea %sp@(28),%sp size ); the_message->Contents.size = size; _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 4dec4: 4280 clrl %d0 the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4dec6: 605c bras 4df24 <_CORE_message_queue_Submit+0xfc> /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 4dec8: 4a05 tstb %d5 4deca: 6604 bnes 4ded0 <_CORE_message_queue_Submit+0xa8> 4decc: 7002 moveq #2,%d0 4dece: 6054 bras 4df24 <_CORE_message_queue_Submit+0xfc> /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 4ded0: 2039 0006 62e2 movel 662e2 <_ISR_Nest_level>,%d0 4ded6: 6704 beqs 4dedc <_CORE_message_queue_Submit+0xb4> 4ded8: 7003 moveq #3,%d0 4deda: 6048 bras 4df24 <_CORE_message_queue_Submit+0xfc> * Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 4dedc: 2079 0006 6302 moveal 66302 <_Thread_Executing>,%a0 ISR_Level level; _ISR_Disable( level ); 4dee2: 203c 0000 0700 movel #1792,%d0 4dee8: 40c1 movew %sr,%d1 4deea: 8081 orl %d1,%d0 4deec: 46c0 movew %d0,%sr 4deee: 7001 moveq #1,%d0 _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 4def0: 216e 0014 0020 movel %fp@(20),%a0@(32) 4def6: 2540 0030 movel %d0,%a2@(48) executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 4defa: 2143 0024 movel %d3,%a0@(36) _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; 4defe: 2144 002c movel %d4,%a0@(44) executing->Wait.option = (uint32_t) size; 4df02: 2142 0030 movel %d2,%a0@(48) Thread_Control *executing = _Thread_Executing; ISR_Level level; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 4df06: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 4df0a: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4df0c: 4879 0004 fbb0 pea 4fbb0 <_Thread_queue_Timeout> 4df12: 2f2e 0024 movel %fp@(36),%sp@- 4df16: 2f0a movel %a2,%sp@- 4df18: 4eb9 0004 f8c4 jsr 4f8c4 <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 4df1e: 4fef 000c lea %sp@(12),%sp executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4df22: 7007 moveq #7,%d0 } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 4df24: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4df2a: 4e5e unlk %fp 4df2c: 4e75 rts ... 00045a20 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 45a20: 4e56 0000 linkw %fp,#0 45a24: 202e 0010 movel %fp@(16),%d0 45a28: 2f0a movel %a2,%sp@- 45a2a: 246e 0008 moveal %fp@(8),%a2 45a2e: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 45a30: 2239 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 45a36: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 45a38: 4a81 tstl %d1 45a3a: 671c beqs 45a58 <_CORE_mutex_Seize+0x38> 45a3c: 4a00 tstb %d0 45a3e: 6718 beqs 45a58 <_CORE_mutex_Seize+0x38> 45a40: 7001 moveq #1,%d0 45a42: b0b9 0005 ce1c cmpl 5ce1c <_System_state_Current>,%d0 45a48: 640e bccs 45a58 <_CORE_mutex_Seize+0x38> 45a4a: 4878 0013 pea 13 45a4e: 42a7 clrl %sp@- 45a50: 42a7 clrl %sp@- 45a52: 4eb9 0004 5fd8 jsr 45fd8 <_Internal_error_Occurred> 45a58: 486e 0018 pea %fp@(24) 45a5c: 2f0a movel %a2,%sp@- 45a5e: 4eb9 0004 a07c jsr 4a07c <_CORE_mutex_Seize_interrupt_trylock> 45a64: 508f addql #8,%sp 45a66: 4a80 tstl %d0 45a68: 6750 beqs 45aba <_CORE_mutex_Seize+0x9a> 45a6a: 4a02 tstb %d2 45a6c: 6614 bnes 45a82 <_CORE_mutex_Seize+0x62> 45a6e: 202e 0018 movel %fp@(24),%d0 45a72: 46c0 movew %d0,%sr 45a74: 2079 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a0 45a7a: 7001 moveq #1,%d0 45a7c: 2140 0034 movel %d0,%a0@(52) 45a80: 6038 bras 45aba <_CORE_mutex_Seize+0x9a> 45a82: 2039 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d0 45a88: 5280 addql #1,%d0 45a8a: 2079 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a0 45a90: 216e 000c 0020 movel %fp@(12),%a0@(32) 45a96: 23c0 0005 cc94 movel %d0,5cc94 <_Thread_Dispatch_disable_level> 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; 45a9c: 7001 moveq #1,%d0 45a9e: 214a 0044 movel %a2,%a0@(68) 45aa2: 2540 0030 movel %d0,%a2@(48) 45aa6: 202e 0018 movel %fp@(24),%d0 45aaa: 46c0 movew %d0,%sr 45aac: 2f2e 0014 movel %fp@(20),%sp@- 45ab0: 2f0a movel %a2,%sp@- 45ab2: 4eb9 0004 59bc jsr 459bc <_CORE_mutex_Seize_interrupt_blocking> 45ab8: 508f addql #8,%sp } 45aba: 242e fff8 movel %fp@(-8),%d2 45abe: 246e fffc moveal %fp@(-4),%a2 45ac2: 4e5e unlk %fp 45ac4: 4e75 rts ... 00045ac8 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 45ac8: 4e56 0000 linkw %fp,#0 45acc: 2f0a movel %a2,%sp@- 45ace: 246e 0008 moveal %fp@(8),%a2 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 45ad2: 206a 005a moveal %a2@(90),%a0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 45ad6: 4a2a 0044 tstb %a2@(68) 45ada: 670e beqs 45aea <_CORE_mutex_Surrender+0x22> if ( !_Thread_Is_executing( holder ) ) 45adc: b1f9 0005 cd4e cmpal 5cd4e <_Thread_Executing>,%a0 45ae2: 6706 beqs 45aea <_CORE_mutex_Surrender+0x22> 45ae4: 7003 moveq #3,%d0 45ae6: 6000 00ce braw 45bb6 <_CORE_mutex_Surrender+0xee> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 45aea: 202a 0052 movel %a2@(82),%d0 45aee: 6700 00c4 beqw 45bb4 <_CORE_mutex_Surrender+0xec> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 45af2: 5380 subql #1,%d0 45af4: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 45af8: 6600 00ba bnew 45bb4 <_CORE_mutex_Surrender+0xec> 45afc: 202a 0046 movel %a2@(70),%d0 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 45b00: 7202 moveq #2,%d1 45b02: b280 cmpl %d0,%d1 45b04: 6708 beqs 45b0e <_CORE_mutex_Surrender+0x46> 45b06: 123c 0003 moveb #3,%d1 45b0a: b280 cmpl %d0,%d1 45b0c: 6604 bnes 45b12 <_CORE_mutex_Surrender+0x4a> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 45b0e: 53a8 001c subql #1,%a0@(28) 45b12: 202a 0046 movel %a2@(70),%d0 /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 45b16: 7202 moveq #2,%d1 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 45b18: 42aa 005a clrl %a2@(90) the_mutex->holder_id = 0; 45b1c: 42aa 005e clrl %a2@(94) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 45b20: b280 cmpl %d0,%d1 45b22: 6708 beqs 45b2c <_CORE_mutex_Surrender+0x64> 45b24: 123c 0003 moveb #3,%d1 45b28: b280 cmpl %d0,%d1 45b2a: 6622 bnes 45b4e <_CORE_mutex_Surrender+0x86> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 45b2c: 4aa8 001c tstl %a0@(28) 45b30: 661c bnes 45b4e <_CORE_mutex_Surrender+0x86> holder->real_priority != holder->current_priority ) { 45b32: 2028 0018 movel %a0@(24),%d0 45b36: b0a8 0014 cmpl %a0@(20),%d0 45b3a: 6712 beqs 45b4e <_CORE_mutex_Surrender+0x86> _Thread_Change_priority( holder, holder->real_priority, true ); 45b3c: 4878 0001 pea 1 45b40: 2f00 movel %d0,%sp@- 45b42: 2f08 movel %a0,%sp@- 45b44: 4eb9 0004 67e8 jsr 467e8 <_Thread_Change_priority> 45b4a: 4fef 000c lea %sp@(12),%sp /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 45b4e: 2f0a movel %a2,%sp@- 45b50: 4eb9 0004 702c jsr 4702c <_Thread_queue_Dequeue> 45b56: 588f addql #4,%sp 45b58: 2040 moveal %d0,%a0 45b5a: 4a80 tstl %d0 45b5c: 674c beqs 45baa <_CORE_mutex_Surrender+0xe2> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 45b5e: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 45b60: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 45b66: 202a 0046 movel %a2@(70),%d0 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 45b6a: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 45b6e: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 45b72: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 45b76: b280 cmpl %d0,%d1 45b78: 670a beqs 45b84 <_CORE_mutex_Surrender+0xbc> 45b7a: 123c 0003 moveb #3,%d1 45b7e: b280 cmpl %d0,%d1 45b80: 6632 bnes 45bb4 <_CORE_mutex_Surrender+0xec> 45b82: 6006 bras 45b8a <_CORE_mutex_Surrender+0xc2> case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 45b84: 52a8 001c addql #1,%a0@(28) 45b88: 602a bras 45bb4 <_CORE_mutex_Surrender+0xec> case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 45b8a: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 45b8e: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 45b92: b0a8 0014 cmpl %a0@(20),%d0 45b96: 641c bccs 45bb4 <_CORE_mutex_Surrender+0xec> _Thread_Change_priority( 45b98: 42a7 clrl %sp@- 45b9a: 2f00 movel %d0,%sp@- 45b9c: 2f08 movel %a0,%sp@- 45b9e: 4eb9 0004 67e8 jsr 467e8 <_Thread_Change_priority> 45ba4: 4fef 000c lea %sp@(12),%sp 45ba8: 600a bras 45bb4 <_CORE_mutex_Surrender+0xec> } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 45baa: 7001 moveq #1,%d0 45bac: 2540 004e movel %d0,%a2@(78) 45bb0: 4200 clrb %d0 45bb2: 6002 bras 45bb6 <_CORE_mutex_Surrender+0xee> 45bb4: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 45bb6: 246e fffc moveal %fp@(-4),%a2 45bba: 4e5e unlk %fp 45bbc: 4e75 rts ... 00045bcc <_CORE_semaphore_Initialize>: void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 45bcc: 4e56 0000 linkw %fp,#0 45bd0: 226e 000c moveal %fp@(12),%a1 the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; _Thread_queue_Initialize( 45bd4: 4878 0003 pea 3 45bd8: 4878 0200 pea 200 void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 45bdc: 206e 0008 moveal %fp@(8),%a0 the_semaphore->Attributes = *the_semaphore_attributes; 45be0: 2011 movel %a1@,%d0 45be2: 2229 0004 movel %a1@(4),%d1 the_semaphore->count = initial_value; 45be6: 216e 0010 0048 movel %fp@(16),%a0@(72) CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { the_semaphore->Attributes = *the_semaphore_attributes; 45bec: 2140 0040 movel %d0,%a0@(64) 45bf0: 2141 0044 movel %d1,%a0@(68) the_semaphore->count = initial_value; _Thread_queue_Initialize( 45bf4: 7201 moveq #1,%d1 45bf6: b2a9 0004 cmpl %a1@(4),%d1 45bfa: 57c0 seq %d0 45bfc: 49c0 extbl %d0 45bfe: 4480 negl %d0 45c00: 2f00 movel %d0,%sp@- 45c02: 2f08 movel %a0,%sp@- 45c04: 4eb9 0004 739c jsr 4739c <_Thread_queue_Initialize> 45c0a: 4fef 0010 lea %sp@(16),%sp _CORE_semaphore_Is_priority( the_semaphore_attributes ) ? THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_SEMAPHORE, CORE_SEMAPHORE_TIMEOUT ); } 45c0e: 4e5e unlk %fp 45c10: 4e75 rts ... 0004dcc0 <_CORE_semaphore_Seize>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4dcc0: 223c 0000 0700 movel #1792,%d1 CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 4dcc6: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4dcca: 2279 0006 1b4a moveal 61b4a <_Thread_Executing>,%a1 CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 4dcd0: 48d7 001c moveml %d2-%d4,%sp@ 4dcd4: 262e 000c movel %fp@(12),%d3 4dcd8: 242e 0014 movel %fp@(20),%d2 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 4dcdc: 42a9 0034 clrl %a1@(52) CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 4dce0: 206e 0008 moveal %fp@(8),%a0 4dce4: 282e 0010 movel %fp@(16),%d4 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4dce8: 40c0 movew %sr,%d0 4dcea: 8280 orl %d0,%d1 4dcec: 46c1 movew %d1,%sr if ( the_semaphore->count != 0 ) { 4dcee: 2228 0048 movel %a0@(72),%d1 4dcf2: 670a beqs 4dcfe <_CORE_semaphore_Seize+0x3e> the_semaphore->count -= 1; 4dcf4: 5381 subql #1,%d1 4dcf6: 2141 0048 movel %d1,%a0@(72) _ISR_Enable( level ); 4dcfa: 46c0 movew %d0,%sr return; 4dcfc: 603c bras 4dd3a <_CORE_semaphore_Seize+0x7a> /* * If the semaphore was not available and the caller was not willing * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { 4dcfe: 4a04 tstb %d4 4dd00: 660a bnes 4dd0c <_CORE_semaphore_Seize+0x4c> _ISR_Enable( level ); 4dd02: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 4dd04: 7001 moveq #1,%d0 4dd06: 2340 0034 movel %d0,%a1@(52) 4dd0a: 602e bras 4dd3a <_CORE_semaphore_Seize+0x7a> 4dd0c: 7201 moveq #1,%d1 * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; 4dd0e: 2343 0020 movel %d3,%a1@(32) /* * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 4dd12: 2348 0044 movel %a0,%a1@(68) 4dd16: 2141 0030 movel %d1,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4dd1a: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 4dd1c: 2d42 000c movel %d2,%fp@(12) 4dd20: 203c 0004 aa68 movel #305768,%d0 4dd26: 2d48 0008 movel %a0,%fp@(8) 4dd2a: 2d40 0010 movel %d0,%fp@(16) } 4dd2e: 4cd7 001c moveml %sp@,%d2-%d4 4dd32: 4e5e unlk %fp */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 4dd34: 4ef9 0004 a77c jmp 4a77c <_Thread_queue_Enqueue_with_handler> } 4dd3a: 4cd7 001c moveml %sp@,%d2-%d4 4dd3e: 4e5e unlk %fp 4dd40: 4e75 rts ... 00045c14 <_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 ) { 45c14: 4e56 0000 linkw %fp,#0 45c18: 2f0a movel %a2,%sp@- 45c1a: 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)) ) { 45c1e: 2f0a movel %a2,%sp@- 45c20: 4eb9 0004 702c jsr 4702c <_Thread_queue_Dequeue> 45c26: 588f addql #4,%sp 45c28: 4a80 tstl %d0 45c2a: 6704 beqs 45c30 <_CORE_semaphore_Surrender+0x1c> 45c2c: 4280 clrl %d0 45c2e: 6024 bras 45c54 <_CORE_semaphore_Surrender+0x40> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 45c30: 203c 0000 0700 movel #1792,%d0 45c36: 40c1 movew %sr,%d1 45c38: 8081 orl %d1,%d0 45c3a: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 45c3c: 202a 0048 movel %a2@(72),%d0 45c40: b0aa 0040 cmpl %a2@(64),%d0 45c44: 6504 bcss 45c4a <_CORE_semaphore_Surrender+0x36> 45c46: 7004 moveq #4,%d0 <== NOT EXECUTED 45c48: 6008 bras 45c52 <_CORE_semaphore_Surrender+0x3e> <== NOT EXECUTED the_semaphore->count += 1; 45c4a: 5280 addql #1,%d0 45c4c: 2540 0048 movel %d0,%a2@(72) 45c50: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 45c52: 46c1 movew %d1,%sr } return status; } 45c54: 246e fffc moveal %fp@(-4),%a2 45c58: 4e5e unlk %fp 45c5a: 4e75 rts 00046558 <_CORE_spinlock_Initialize>: void _CORE_spinlock_Initialize( CORE_spinlock_Control *the_spinlock, CORE_spinlock_Attributes *the_spinlock_attributes ) { 46558: 4e56 0000 linkw %fp,#0 4655c: 206e 0008 moveal %fp@(8),%a0 46560: 226e 000c moveal %fp@(12),%a1 the_spinlock->Attributes = *the_spinlock_attributes; the_spinlock->lock = 0; the_spinlock->users = 0; the_spinlock->holder = 0; } 46564: 4e5e unlk %fp CORE_spinlock_Control *the_spinlock, CORE_spinlock_Attributes *the_spinlock_attributes ) { the_spinlock->Attributes = *the_spinlock_attributes; 46566: 2091 movel %a1@,%a0@ the_spinlock->lock = 0; 46568: 42a8 0004 clrl %a0@(4) the_spinlock->users = 0; 4656c: 42a8 0008 clrl %a0@(8) the_spinlock->holder = 0; 46570: 42a8 000c clrl %a0@(12) } 46574: 4e75 rts ... 000465c8 <_CORE_spinlock_Wait>: ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 465c8: 223c 0000 0700 movel #1792,%d1 CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 465ce: 4e56 fff0 linkw %fp,#-16 465d2: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 465d6: 246e 0008 moveal %fp@(8),%a2 465da: 162e 000f moveb %fp@(15),%d3 ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 465de: 40c0 movew %sr,%d0 465e0: 8280 orl %d0,%d1 465e2: 46c1 movew %d1,%sr if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 465e4: 222a 0004 movel %a2@(4),%d1 465e8: 7401 moveq #1,%d2 465ea: b481 cmpl %d1,%d2 465ec: 6616 bnes 46604 <_CORE_spinlock_Wait+0x3c> (the_spinlock->holder == _Thread_Executing->Object.id) ) { 465ee: 222a 000c movel %a2@(12),%d1 465f2: 2079 0005 dd2e moveal 5dd2e <_Thread_Executing>,%a0 465f8: b2a8 0008 cmpl %a0@(8),%d1 465fc: 6606 bnes 46604 <_CORE_spinlock_Wait+0x3c> _ISR_Enable( level ); 465fe: 46c0 movew %d0,%sr 46600: 7001 moveq #1,%d0 return CORE_SPINLOCK_HOLDER_RELOCKING; 46602: 6068 bras 4666c <_CORE_spinlock_Wait+0xa4> } the_spinlock->users += 1; 46604: 222a 0008 movel %a2@(8),%d1 46608: 5281 addql #1,%d1 */ _ISR_Enable( level ); /* An ISR could occur here */ _Thread_Enable_dispatch(); 4660a: 47f9 0004 768e lea 4768e <_Thread_Enable_dispatch>,%a3 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 46610: 243c 0000 0700 movel #1792,%d2 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 46616: 2541 0008 movel %d1,%a2@(8) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 4661a: 222a 0004 movel %a2@(4),%d1 4661e: 661c bnes 4663c <_CORE_spinlock_Wait+0x74> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 46620: 123c 0001 moveb #1,%d1 the_spinlock->holder = _Thread_Executing->Object.id; 46624: 2079 0005 dd2e moveal 5dd2e <_Thread_Executing>,%a0 return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 4662a: 2541 0004 movel %d1,%a2@(4) the_spinlock->holder = _Thread_Executing->Object.id; 4662e: 2228 0008 movel %a0@(8),%d1 46632: 2541 000c movel %d1,%a2@(12) _ISR_Enable( level ); 46636: 46c0 movew %d0,%sr 46638: 4280 clrl %d0 return CORE_SPINLOCK_SUCCESSFUL; 4663a: 6030 bras 4666c <_CORE_spinlock_Wait+0xa4> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 4663c: 4a03 tstb %d3 4663e: 6610 bnes 46650 <_CORE_spinlock_Wait+0x88> the_spinlock->users -= 1; 46640: 222a 0008 movel %a2@(8),%d1 46644: 5381 subql #1,%d1 46646: 2541 0008 movel %d1,%a2@(8) _ISR_Enable( level ); 4664a: 46c0 movew %d0,%sr 4664c: 7005 moveq #5,%d0 return CORE_SPINLOCK_UNAVAILABLE; 4664e: 601c bras 4666c <_CORE_spinlock_Wait+0xa4> * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 46650: 46c0 movew %d0,%sr /* An ISR could occur here */ _Thread_Enable_dispatch(); 46652: 4e93 jsr %a3@ 46654: 2039 0005 dc74 movel 5dc74 <_Thread_Dispatch_disable_level>,%d0 4665a: 5280 addql #1,%d0 4665c: 23c0 0005 dc74 movel %d0,5dc74 <_Thread_Dispatch_disable_level> /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 46662: 2202 movel %d2,%d1 46664: 40c0 movew %sr,%d0 46666: 8280 orl %d0,%d1 46668: 46c1 movew %d1,%sr } 4666a: 60ae bras 4661a <_CORE_spinlock_Wait+0x52> } 4666c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46672: 4e5e unlk %fp 46674: 4e75 rts ... 000458d0 <_Chain_Append>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 458d0: 203c 0000 0700 movel #1792,%d0 void _Chain_Append( Chain_Control *the_chain, Chain_Node *node ) { 458d6: 4e56 0000 linkw %fp,#0 458da: 206e 000c moveal %fp@(12),%a0 458de: 2f0a movel %a2,%sp@- 458e0: 226e 0008 moveal %fp@(8),%a1 ISR_Level level; _ISR_Disable( level ); 458e4: 40c1 movew %sr,%d1 458e6: 8081 orl %d1,%d0 458e8: 46c0 movew %d0,%sr Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 458ea: 2009 movel %a1,%d0 458ec: 5880 addql #4,%d0 458ee: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 458f0: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 458f4: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 458f8: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 458fc: 2488 movel %a0,%a2@ _Chain_Append_unprotected( the_chain, node ); _ISR_Enable( level ); 458fe: 46c1 movew %d1,%sr } 45900: 245f moveal %sp@+,%a2 45902: 4e5e unlk %fp 45904: 4e75 rts ... 00049fe0 <_Chain_Extract>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 49fe0: 203c 0000 0700 movel #1792,%d0 */ void _Chain_Extract( Chain_Node *node ) { 49fe6: 4e56 0000 linkw %fp,#0 49fea: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 49fee: 40c1 movew %sr,%d1 49ff0: 8081 orl %d1,%d0 49ff2: 46c0 movew %d0,%sr { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 49ff4: 2268 0004 moveal %a0@(4),%a1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 49ff8: 2050 moveal %a0@,%a0 previous = the_node->previous; next->previous = previous; previous->next = next; 49ffa: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 49ffc: 2149 0004 movel %a1,%a0@(4) _Chain_Extract_unprotected( node ); _ISR_Enable( level ); 4a000: 46c1 movew %d1,%sr } 4a002: 4e5e unlk %fp 4a004: 4e75 rts ... 0004a03c <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4a03c: 4e56 0000 linkw %fp,#0 4a040: 202e 0010 movel %fp@(16),%d0 4a044: 2f0a movel %a2,%sp@- 4a046: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4a04a: 204a moveal %a2,%a0 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 4a04c: 42aa 0004 clrl %a2@(4) Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4a050: 222e 0014 movel %fp@(20),%d1 Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 4a054: 226e 000c moveal %fp@(12),%a1 while ( count-- ) { 4a058: 600c bras 4a066 <_Chain_Initialize+0x2a> current->next = next; next->previous = current; 4a05a: 2348 0004 movel %a0,%a1@(4) current = next; next = (Chain_Node *) 4a05e: 5380 subql #1,%d0 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 4a060: 2089 movel %a1,%a0@ next->previous = current; current = next; next = (Chain_Node *) 4a062: 2049 moveal %a1,%a0 4a064: d3c1 addal %d1,%a1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4a066: 4a80 tstl %d0 4a068: 66f0 bnes 4a05a <_Chain_Initialize+0x1e> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 4a06a: 200a movel %a2,%d0 4a06c: 5880 addql #4,%d0 4a06e: 2080 movel %d0,%a0@ the_chain->last = current; 4a070: 2548 0008 movel %a0,%a2@(8) } 4a074: 245f moveal %sp@+,%a2 4a076: 4e5e unlk %fp 4a078: 4e75 rts ... 00049bd8 <_Event_Manager_initialization>: * * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { 49bd8: 4e56 0000 linkw %fp,#0 */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 49bdc: 4e5e unlk %fp * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 49bde: 42b9 0005 d4e2 clrl 5d4e2 <_Event_Sync_state> */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 49be4: 4e75 rts ... 000449d8 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 449d8: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449de: 4e56 ffec linkw %fp,#-20 449e2: 226e 0010 moveal %fp@(16),%a1 449e6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 449ea: 2479 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449f0: 242e 0008 movel %fp@(8),%d2 449f4: 262e 000c movel %fp@(12),%d3 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 449f8: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449fc: 206e 0014 moveal %fp@(20),%a0 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 44a00: 266a 010a moveal %a2@(266),%a3 _ISR_Disable( level ); 44a04: 40c1 movew %sr,%d1 44a06: 8081 orl %d1,%d0 44a08: 46c0 movew %d0,%sr pending_events = api->pending_events; 44a0a: 2813 movel %a3@,%d4 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 ); 44a0c: 2002 movel %d2,%d0 44a0e: c084 andl %d4,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 44a10: 6716 beqs 44a28 <_Event_Seize+0x50> 44a12: b480 cmpl %d0,%d2 44a14: 6706 beqs 44a1c <_Event_Seize+0x44> 44a16: 0803 0001 btst #1,%d3 44a1a: 670c beqs 44a28 <_Event_Seize+0x50> (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 44a1c: 2400 movel %d0,%d2 44a1e: 4682 notl %d2 44a20: c484 andl %d4,%d2 44a22: 2682 movel %d2,%a3@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 44a24: 46c1 movew %d1,%sr 44a26: 600e bras 44a36 <_Event_Seize+0x5e> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 44a28: 0803 0000 btst #0,%d3 44a2c: 670e beqs 44a3c <_Event_Seize+0x64> _ISR_Enable( level ); 44a2e: 46c1 movew %d1,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 44a30: 720d moveq #13,%d1 44a32: 2541 0034 movel %d1,%a2@(52) *event_out = seized_events; 44a36: 2080 movel %d0,%a0@ return; 44a38: 6000 0096 braw 44ad0 <_Event_Seize+0xf8> * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 44a3c: 2542 0024 movel %d2,%a2@(36) executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 44a40: 7401 moveq #1,%d2 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 44a42: 2543 0030 movel %d3,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; 44a46: 2548 0028 movel %a0,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 44a4a: 23c2 0005 d4e2 movel %d2,5d4e2 <_Event_Sync_state> _ISR_Enable( level ); 44a50: 46c1 movew %d1,%sr if ( ticks ) { 44a52: 4a89 tstl %a1 44a54: 6730 beqs 44a86 <_Event_Seize+0xae> _Watchdog_Initialize( 44a56: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44a5a: 223c 0004 4c38 movel #281656,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 44a60: 2549 0054 movel %a1,%a2@(84) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44a64: 2541 0064 movel %d1,%a2@(100) the_watchdog->id = id; 44a68: 2540 0068 movel %d0,%a2@(104) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 44a6c: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 44a70: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44a74: 486a 0048 pea %a2@(72) 44a78: 4879 0005 cd6c pea 5cd6c <_Watchdog_Ticks_chain> 44a7e: 4eb9 0004 7c48 jsr 47c48 <_Watchdog_Insert> 44a84: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 44a86: 4878 0100 pea 100 44a8a: 2f0a movel %a2,%sp@- 44a8c: 4eb9 0004 7500 jsr 47500 <_Thread_Set_state> _ISR_Disable( level ); 44a92: 203c 0000 0700 movel #1792,%d0 44a98: 40c1 movew %sr,%d1 44a9a: 8081 orl %d1,%d0 44a9c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 44a9e: 7401 moveq #1,%d2 44aa0: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 44aa2: 2039 0005 d4e2 movel 5d4e2 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 44aa8: 42b9 0005 d4e2 clrl 5d4e2 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 44aae: b480 cmpl %d0,%d2 44ab0: 6604 bnes 44ab6 <_Event_Seize+0xde> _ISR_Enable( level ); 44ab2: 46c1 movew %d1,%sr 44ab4: 601a bras 44ad0 <_Event_Seize+0xf8> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 44ab6: 2d4a 000c movel %a2,%fp@(12) 44aba: 2d41 0010 movel %d1,%fp@(16) } 44abe: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 44ac4: 2d40 0008 movel %d0,%fp@(8) } 44ac8: 4e5e unlk %fp * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 44aca: 4ef9 0004 6798 jmp 46798 <_Thread_blocking_operation_Cancel> } 44ad0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 44ad6: 4e5e unlk %fp 44ad8: 4e75 rts ... 00044b30 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 44b30: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 44b36: 4e56 ffe8 linkw %fp,#-24 44b3a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 44b3e: 246e 0008 moveal %fp@(8),%a2 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 44b42: 206a 010a moveal %a2@(266),%a0 option_set = (rtems_option) the_thread->Wait.option; 44b46: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 44b4a: 40c1 movew %sr,%d1 44b4c: 8081 orl %d1,%d0 44b4e: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 44b50: 262a 0024 movel %a2@(36),%d3 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 ); 44b54: 2003 movel %d3,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 44b56: 2410 movel %a0@,%d2 44b58: c082 andl %d2,%d0 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 44b5a: 6606 bnes 44b62 <_Event_Surrender+0x32> _ISR_Enable( level ); 44b5c: 46c1 movew %d1,%sr return; 44b5e: 6000 00cc braw 44c2c <_Event_Surrender+0xfc> /* * 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() && 44b62: 2279 0005 cd2e moveal 5cd2e <_ISR_Nest_level>,%a1 44b68: 4a89 tstl %a1 44b6a: 674a beqs 44bb6 <_Event_Surrender+0x86> 44b6c: b5f9 0005 cd4e cmpal 5cd4e <_Thread_Executing>,%a2 44b72: 6642 bnes 44bb6 <_Event_Surrender+0x86> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 44b74: 2279 0005 d4e2 moveal 5d4e2 <_Event_Sync_state>,%a1 /* * 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() && 44b7a: 7a02 moveq #2,%d5 44b7c: ba89 cmpl %a1,%d5 44b7e: 670e beqs 44b8e <_Event_Surrender+0x5e> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 44b80: 2279 0005 d4e2 moveal 5d4e2 <_Event_Sync_state>,%a1 /* * 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() && 44b86: 1a3c 0001 moveb #1,%d5 44b8a: ba89 cmpl %a1,%d5 44b8c: 6628 bnes 44bb6 <_Event_Surrender+0x86> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 44b8e: b680 cmpl %d0,%d3 44b90: 6706 beqs 44b98 <_Event_Surrender+0x68> 44b92: 0804 0001 btst #1,%d4 44b96: 671a beqs 44bb2 <_Event_Surrender+0x82> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 44b98: 2600 movel %d0,%d3 44b9a: 4683 notl %d3 44b9c: c682 andl %d2,%d3 44b9e: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44ba0: 206a 0028 moveal %a2@(40),%a0 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 44ba4: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44ba8: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 44baa: 7003 moveq #3,%d0 44bac: 23c0 0005 d4e2 movel %d0,5d4e2 <_Event_Sync_state> } _ISR_Enable( level ); 44bb2: 46c1 movew %d1,%sr return; 44bb4: 6076 bras 44c2c <_Event_Surrender+0xfc> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 44bb6: 2a2a 0010 movel %a2@(16),%d5 44bba: 0285 0000 0100 andil #256,%d5 44bc0: 6768 beqs 44c2a <_Event_Surrender+0xfa> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 44bc2: b680 cmpl %d0,%d3 44bc4: 6706 beqs 44bcc <_Event_Surrender+0x9c> 44bc6: 0804 0001 btst #1,%d4 44bca: 675e beqs 44c2a <_Event_Surrender+0xfa> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 44bcc: 2600 movel %d0,%d3 44bce: 4683 notl %d3 44bd0: c682 andl %d2,%d3 44bd2: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44bd4: 206a 0028 moveal %a2@(40),%a0 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 44bd8: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44bdc: 2080 movel %d0,%a0@ _ISR_Flash( level ); 44bde: 203c 0000 0700 movel #1792,%d0 44be4: 46c1 movew %d1,%sr 44be6: 8081 orl %d1,%d0 44be8: 46c0 movew %d0,%sr 44bea: 47f9 0004 6928 lea 46928 <_Thread_Clear_state>,%a3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 44bf0: 7a02 moveq #2,%d5 44bf2: baaa 0050 cmpl %a2@(80),%d5 44bf6: 6710 beqs 44c08 <_Event_Surrender+0xd8> _ISR_Enable( level ); 44bf8: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 44bfa: 2f3c 1003 fff8 movel #268697592,%sp@- 44c00: 2f0a movel %a2,%sp@- 44c02: 4e93 jsr %a3@ 44c04: 508f addql #8,%sp 44c06: 6024 bras 44c2c <_Event_Surrender+0xfc> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 44c08: 7003 moveq #3,%d0 44c0a: 2540 0050 movel %d0,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 44c0e: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 44c10: 486a 0048 pea %a2@(72) 44c14: 4eb9 0004 7d64 jsr 47d64 <_Watchdog_Remove> 44c1a: 2f3c 1003 fff8 movel #268697592,%sp@- 44c20: 2f0a movel %a2,%sp@- 44c22: 4e93 jsr %a3@ 44c24: 4fef 000c lea %sp@(12),%sp 44c28: 6002 bras 44c2c <_Event_Surrender+0xfc> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 44c2a: 46c1 movew %d1,%sr } 44c2c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 44c32: 4e5e unlk %fp 44c34: 4e75 rts ... 00045ee2 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45ee2: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45ee4: 4e56 ffe0 linkw %fp,#-32 45ee8: 222e 0010 movel %fp@(16),%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 45eec: 2241 moveal %d1,%a1 45eee: 5189 subql #8,%a1 45ef0: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 45ef4: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45ef8: 7601 moveq #1,%d3 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 45efa: 2a49 moveal %a1,%a5 45efc: 240a movel %a2,%d2 45efe: 9bca subal %a2,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45f00: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45f04: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45f08: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45f0c: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45f10: 4a03 tstb %d3 45f12: 6626 bnes 45f3a <_Heap_Block_allocate+0x58> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 45f14: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 45f18: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 45f1a: 52ab 0040 addql #1,%a3@(64) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 45f1e: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 45f22: 2840 moveal %d0,%a4 stats->free_size -= _Heap_Block_size( block ); 45f24: c6aa 0004 andl %a2@(4),%d3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 45f28: 206a 000c moveal %a2@(12),%a0 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 45f2c: 97ab 0030 subl %d3,%a3@(48) 45f30: 2948 000c movel %a0,%a4@(12) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 45f34: 2140 0008 movel %d0,%a0@(8) 45f38: 6002 bras 45f3c <_Heap_Block_allocate+0x5a> } else { free_list_anchor = _Heap_Free_list_head( heap ); 45f3a: 204b moveal %a3,%a0 } if ( alloc_area_offset < heap->page_size ) { 45f3c: 202b 0010 movel %a3@(16),%d0 45f40: b08d cmpl %a5,%d0 45f42: 630a blss 45f4e <_Heap_Block_allocate+0x6c> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 45f44: 4875 5800 pea %a5@(00000000,%d5:l) 45f48: 2f08 movel %a0,%sp@- 45f4a: 2f0a movel %a2,%sp@- 45f4c: 6062 bras 45fb0 <_Heap_Block_allocate+0xce> - 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; 45f4e: 262a 0004 movel %a2@(4),%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 45f52: 4c40 1004 remul %d0,%d4,%d1 _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; if ( _Heap_Is_prev_used( block ) ) { 45f56: 7201 moveq #1,%d1 45f58: 93c4 subal %d4,%a1 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 45f5a: 2009 movel %a1,%d0 45f5c: 908a subl %a2,%d0 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 45f5e: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 45f62: c2aa 0004 andl %a2@(4),%d1 45f66: 671c beqs 45f84 <_Heap_Block_allocate+0xa2> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 45f68: 2a68 0008 moveal %a0@(8),%a5 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 45f6c: 52ab 0038 addql #1,%a3@(56) 45f70: 220a movel %a2,%d1 new_block->next = next; 45f72: 254d 0008 movel %a5,%a2@(8) new_block->prev = block_before; 45f76: 2548 000c movel %a0,%a2@(12) block_before->next = new_block; 45f7a: 214a 0008 movel %a2,%a0@(8) next->prev = new_block; 45f7e: 2b4a 000c movel %a2,%a5@(12) 45f82: 600c bras 45f90 <_Heap_Block_allocate+0xae> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 45f84: 95d2 subal %a2@,%a2 Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 45f86: 78fe moveq #-2,%d4 45f88: 2208 movel %a0,%d1 45f8a: c8aa 0004 andl %a2@(4),%d4 45f8e: d084 addl %d4,%d0 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 45f90: 78fe moveq #-2,%d4 45f92: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 45f94: 7801 moveq #1,%d4 45f96: 8880 orl %d0,%d4 new_block->prev_size = block_size; 45f98: 2280 movel %d0,%a1@ new_block->size_and_flag = new_block_size; 45f9a: 2002 movel %d2,%d0 45f9c: d083 addl %d3,%d0 45f9e: 9089 subl %a1,%d0 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 45fa0: 2544 0004 movel %d4,%a2@(4) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45fa4: 2449 moveal %a1,%a2 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 45fa6: 2340 0004 movel %d0,%a1@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45faa: 2f05 movel %d5,%sp@- 45fac: 2f01 movel %d1,%sp@- 45fae: 2f09 movel %a1,%sp@- 45fb0: 2f0b movel %a3,%sp@- 45fb2: 4eb9 0004 5e14 jsr 45e14 <_Heap_Block_split> alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 45fb8: 202b 0030 movel %a3@(48),%d0 block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45fbc: 4fef 0010 lea %sp@(16),%sp Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 45fc0: b0ab 0034 cmpl %a3@(52),%d0 45fc4: 6404 bccs 45fca <_Heap_Block_allocate+0xe8> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 45fc6: 2740 0034 movel %d0,%a3@(52) } return block; } 45fca: 200a movel %a2,%d0 45fcc: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 45fd2: 4e5e unlk %fp 45fd4: 4e75 rts ... 0004a39c <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4a39c: 4e56 ffe8 linkw %fp,#-24 4a3a0: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4a3a4: 2240 moveal %d0,%a1 4a3a6: 5189 subql #8,%a1 4a3a8: 206e 0008 moveal %fp@(8),%a0 4a3ac: 4c68 0001 0010 remul %a0@(16),%d1,%d0 4a3b2: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 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; 4a3b6: 2828 0020 movel %a0@(32),%d4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4a3ba: 93c1 subal %d1,%a1 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 4a3bc: b889 cmpl %a1,%d4 4a3be: 6200 0140 bhiw 4a500 <_Heap_Free+0x164> 4a3c2: b3e8 0024 cmpal %a0@(36),%a1 4a3c6: 53c0 sls %d0 4a3c8: 49c0 extbl %d0 4a3ca: 4480 negl %d0 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 4a3cc: 4a00 tstb %d0 4a3ce: 6700 0130 beqw 4a500 <_Heap_Free+0x164> - 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; 4a3d2: 2629 0004 movel %a1@(4),%d3 4a3d6: 70fe moveq #-2,%d0 4a3d8: c083 andl %d3,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4a3da: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 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 4a3de: b88a cmpl %a2,%d4 4a3e0: 6200 011e bhiw 4a500 <_Heap_Free+0x164> 4a3e4: b5e8 0024 cmpal %a0@(36),%a2 4a3e8: 53c1 sls %d1 4a3ea: 49c1 extbl %d1 4a3ec: 4481 negl %d1 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 4a3ee: 4a01 tstb %d1 4a3f0: 6700 010e beqw 4a500 <_Heap_Free+0x164> 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; 4a3f4: 222a 0004 movel %a2@(4),%d1 _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4a3f8: 7401 moveq #1,%d2 4a3fa: c481 andl %d1,%d2 4a3fc: 4a02 tstb %d2 4a3fe: 6700 0100 beqw 4a500 <_Heap_Free+0x164> - 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; 4a402: 74fe moveq #-2,%d2 return false; } 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 )); 4a404: 2668 0024 moveal %a0@(36),%a3 4a408: c282 andl %d2,%d1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4a40a: b7ca cmpal %a2,%a3 4a40c: 6604 bnes 4a412 <_Heap_Free+0x76> 4a40e: 4282 clrl %d2 4a410: 6010 bras 4a422 <_Heap_Free+0x86> 4a412: 7401 moveq #1,%d2 4a414: 7a01 moveq #1,%d5 4a416: c4b2 1804 andl %a2@(00000004,%d1:l),%d2 4a41a: bb82 eorl %d5,%d2 4a41c: 0282 0000 00ff andil #255,%d2 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4a422: 7a01 moveq #1,%d5 4a424: c685 andl %d5,%d3 4a426: 4a03 tstb %d3 4a428: 6662 bnes 4a48c <_Heap_Free+0xf0> uintptr_t const prev_size = block->prev_size; 4a42a: 2611 movel %a1@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4a42c: 93c3 subal %d3,%a1 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 4a42e: b889 cmpl %a1,%d4 4a430: 6200 00ce bhiw 4a500 <_Heap_Free+0x164> 4a434: b3cb cmpal %a3,%a1 4a436: 53c4 sls %d4 4a438: 49c4 extbl %d4 4a43a: 4484 negl %d4 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 4a43c: 4a04 tstb %d4 4a43e: 6700 00c0 beqw 4a500 <_Heap_Free+0x164> 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) ) { 4a442: 7801 moveq #1,%d4 4a444: c8a9 0004 andl %a1@(4),%d4 4a448: 4a04 tstb %d4 4a44a: 6700 00b4 beqw 4a500 <_Heap_Free+0x164> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4a44e: 4a02 tstb %d2 4a450: 6726 beqs 4a478 <_Heap_Free+0xdc> uintptr_t const size = block_size + prev_size + next_block_size; 4a452: d280 addl %d0,%d1 4a454: d681 addl %d1,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4a456: 53a8 0038 subql #1,%a0@(56) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a45a: 7201 moveq #1,%d1 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4a45c: 266a 000c moveal %a2@(12),%a3 4a460: 8283 orl %d3,%d1 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4a462: 246a 0008 moveal %a2@(8),%a2 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4a466: 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; 4a46a: 2341 0004 movel %d1,%a1@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4a46e: 254b 000c movel %a3,%a2@(12) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4a472: 274a 0008 movel %a2,%a3@(8) 4a476: 6078 bras 4a4f0 <_Heap_Free+0x154> 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; 4a478: d680 addl %d0,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a47a: 7401 moveq #1,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a47c: 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; 4a47e: 8483 orl %d3,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4a480: 2483 movel %d3,%a2@ 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; 4a482: 2342 0004 movel %d2,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a486: cbaa 0004 andl %d5,%a2@(4) 4a48a: 6064 bras 4a4f0 <_Heap_Free+0x154> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4a48c: 4a02 tstb %d2 4a48e: 6728 beqs 4a4b8 <_Heap_Free+0x11c> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4a490: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4a494: d280 addl %d0,%d1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a496: 7401 moveq #1,%d2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4a498: 246a 0008 moveal %a2@(8),%a2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4a49c: 234b 000c movel %a3,%a1@(12) 4a4a0: 8481 orl %d1,%d2 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4a4a2: 234a 0008 movel %a2,%a1@(8) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4a4a6: 2381 1800 movel %d1,%a1@(00000000,%d1:l) 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; 4a4aa: 2342 0004 movel %d2,%a1@(4) new_block->prev = prev; next->prev = new_block; 4a4ae: 2549 000c movel %a1,%a2@(12) prev->next = new_block; 4a4b2: 2749 0008 movel %a1,%a3@(8) 4a4b6: 6038 bras 4a4f0 <_Heap_Free+0x154> 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; 4a4b8: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a4ba: 72fe moveq #-2,%d1 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; 4a4bc: 8a80 orl %d0,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4a4be: 2668 0008 moveal %a0@(8),%a3 4a4c2: 2345 0004 movel %d5,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a4c6: c3aa 0004 andl %d1,%a2@(4) next_block->prev_size = block_size; 4a4ca: 2480 movel %d0,%a2@ /* Statistics */ ++stats->free_blocks; 4a4cc: 2228 0038 movel %a0@(56),%d1 4a4d0: 5281 addql #1,%d1 new_block->next = next; 4a4d2: 234b 0008 movel %a3,%a1@(8) new_block->prev = block_before; 4a4d6: 2348 000c movel %a0,%a1@(12) block_before->next = new_block; 4a4da: 2149 0008 movel %a1,%a0@(8) next->prev = new_block; 4a4de: 2749 000c movel %a1,%a3@(12) 4a4e2: 2141 0038 movel %d1,%a0@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4a4e6: b2a8 003c cmpl %a0@(60),%d1 4a4ea: 6304 blss 4a4f0 <_Heap_Free+0x154> 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; 4a4ec: 2141 003c movel %d1,%a0@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4a4f0: d1a8 0030 addl %d0,%a0@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4a4f4: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4a4f8: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4a4fc: 7001 moveq #1,%d0 return( true ); 4a4fe: 6002 bras 4a502 <_Heap_Free+0x166> 4a500: 4200 clrb %d0 } 4a502: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4a506: 4e5e unlk %fp 4a508: 4e75 rts ... 00063b88 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 63b88: 4e56 0000 linkw %fp,#0 63b8c: 206e 000c moveal %fp@(12),%a0 63b90: 2f0a movel %a2,%sp@- 63b92: 246e 0008 moveal %fp@(8),%a2 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 63b96: 4290 clrl %a0@ return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 63b98: 226a 0008 moveal %a2@(8),%a1 info->largest = 0; 63b9c: 42a8 0004 clrl %a0@(4) info->total = 0; 63ba0: 42a8 0008 clrl %a0@(8) for(the_block = _Heap_Free_list_first(the_heap); 63ba4: 601a bras 63bc0 <_Heap_Get_free_information+0x38> - 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; 63ba6: 70fe moveq #-2,%d0 63ba8: c0a9 0004 andl %a1@(4),%d0 uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 63bac: 5290 addql #1,%a0@ info->total += the_size; 63bae: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 63bb2: b0a8 0004 cmpl %a0@(4),%d0 63bb6: 6304 blss 63bbc <_Heap_Get_free_information+0x34> info->largest = the_size; 63bb8: 2140 0004 movel %d0,%a0@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 63bbc: 2269 0008 moveal %a1@(8),%a1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 63bc0: b5c9 cmpal %a1,%a2 63bc2: 66e2 bnes 63ba6 <_Heap_Get_free_information+0x1e> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 63bc4: 245f moveal %sp@+,%a2 63bc6: 4e5e unlk %fp 63bc8: 4e75 rts ... 00059754 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 59754: 4e56 ffe0 linkw %fp,#-32 59758: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5975c: 242e 000c movel %fp@(12),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 59760: 2202 movel %d2,%d1 59762: 2042 moveal %d2,%a0 59764: 5188 subql #8,%a0 59766: 246e 0008 moveal %fp@(8),%a2 5976a: 286e 0014 moveal %fp@(20),%a4 5976e: 4c6a 1000 0010 remul %a2@(16),%d0,%d1 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 59774: 4294 clrl %a4@ void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 59776: 266e 0018 moveal %fp@(24),%a3 5977a: 91c0 subal %d0,%a0 5977c: 2a2e 0010 movel %fp@(16),%d5 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; *new_size = 0; 59780: 4293 clrl %a3@ 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 59782: b1ea 0020 cmpal %a2@(32),%a0 59786: 6500 0096 bcsw 5981e <_Heap_Resize_block+0xca> 5978a: b1ea 0024 cmpal %a2@(36),%a0 5978e: 6200 008e bhiw 5981e <_Heap_Resize_block+0xca> - 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; 59792: 70fe moveq #-2,%d0 59794: 72fe moveq #-2,%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 59796: 7801 moveq #1,%d4 59798: 7c01 moveq #1,%d6 uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5979a: 7604 moveq #4,%d3 5979c: 9682 subl %d2,%d3 - 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; 5979e: c0a8 0004 andl %a0@(4),%d0 { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 597a2: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 597a6: d689 addl %a1,%d3 597a8: c2a9 0004 andl %a1@(4),%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 597ac: c8b1 1804 andl %a1@(00000004,%d1:l),%d4 bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 597b0: 2883 movel %d3,%a4@ 597b2: bd84 eorl %d6,%d4 597b4: 1c04 moveb %d4,%d6 if ( next_block_is_free ) { 597b6: 6704 beqs 597bc <_Heap_Resize_block+0x68> block_size += next_block_size; 597b8: d081 addl %d1,%d0 alloc_size += next_block_size; 597ba: d681 addl %d1,%d3 } if ( new_alloc_size > alloc_size ) { 597bc: b685 cmpl %d5,%d3 597be: 6404 bccs 597c4 <_Heap_Resize_block+0x70> 597c0: 7001 moveq #1,%d0 597c2: 605c bras 59820 <_Heap_Resize_block+0xcc> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 597c4: 4a06 tstb %d6 597c6: 672a beqs 597f2 <_Heap_Resize_block+0x9e> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 597c8: 7601 moveq #1,%d3 597ca: c6a8 0004 andl %a0@(4),%d3 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 597ce: 2869 000c moveal %a1@(12),%a4 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 597d2: 8680 orl %d0,%d3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 597d4: 2269 0008 moveal %a1@(8),%a1 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 597d8: 2143 0004 movel %d3,%a0@(4) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 597dc: 7601 moveq #1,%d3 597de: 87b0 0804 orl %d3,%a0@(00000004,%d0:l) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 597e2: 234c 000c movel %a4,%a1@(12) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; 597e6: 93aa 0030 subl %d1,%a2@(48) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; 597ea: 53aa 0038 subql #1,%a2@(56) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 597ee: 2949 0008 movel %a1,%a4@(8) stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 597f2: 2f05 movel %d5,%sp@- 597f4: 2f02 movel %d2,%sp@- 597f6: 2f08 movel %a0,%sp@- 597f8: 2f0a movel %a2,%sp@- 597fa: 4eb9 0004 5ee2 jsr 45ee2 <_Heap_Block_allocate> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 59800: 4fef 0010 lea %sp@(16),%sp block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 59804: 72fe moveq #-2,%d1 /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 59806: 2040 moveal %d0,%a0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 59808: 2240 moveal %d0,%a1 5980a: 93c2 subal %d2,%a1 /* Statistics */ ++stats->resizes; 5980c: 4280 clrl %d0 block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5980e: c2a8 0004 andl %a0@(4),%d1 59812: 43f1 1804 lea %a1@(00000004,%d1:l),%a1 59816: 2689 movel %a1,%a3@ /* Statistics */ ++stats->resizes; 59818: 52aa 0054 addql #1,%a2@(84) 5981c: 6002 bras 59820 <_Heap_Resize_block+0xcc> 5981e: 7002 moveq #2,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 59820: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 59826: 4e5e unlk %fp 59828: 4e75 rts ... 00046cc4 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 46cc4: 41f9 0004 3474 lea 43474 ,%a0 46cca: 4e56 0000 linkw %fp,#0 46cce: 202e 0008 movel %fp@(8),%d0 va_list ap; if ( error ) { 46cd2: 4a2e 000f tstb %fp@(15) 46cd6: 670a beqs 46ce2 <_Heap_Walk_print+0x1e> printk( "FAIL[%d]: ", source ); 46cd8: 2f00 movel %d0,%sp@- 46cda: 4879 0005 b723 pea 5b723 46ce0: 6008 bras 46cea <_Heap_Walk_print+0x26> } else { printk( "PASS[%d]: ", source ); 46ce2: 2f00 movel %d0,%sp@- 46ce4: 4879 0005 b72e pea 5b72e 46cea: 4e90 jsr %a0@ 46cec: 508f addql #8,%sp } va_start( ap, fmt ); vprintk( fmt, ap ); 46cee: 486e 0014 pea %fp@(20) 46cf2: 2f2e 0010 movel %fp@(16),%sp@- 46cf6: 4eb9 0004 4df8 jsr 44df8 46cfc: 508f addql #8,%sp va_end( ap ); } 46cfe: 4e5e unlk %fp 46d00: 4e75 rts ... 00045fd8 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fd8: 4e56 0000 linkw %fp,#0 45fdc: 222e 000c movel %fp@(12),%d1 45fe0: 2f03 movel %d3,%sp@- _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45fe2: 4283 clrl %d3 45fe4: 1601 moveb %d1,%d3 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fe6: 2f02 movel %d2,%sp@- 45fe8: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45fec: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fee: 202e 0008 movel %fp@(8),%d0 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45ff2: 2f03 movel %d3,%sp@- _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 45ff4: 263c 0000 0700 movel #1792,%d3 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45ffa: 2f00 movel %d0,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 45ffc: 13c1 0005 cd3e moveb %d1,5cd3e <_Internal_errors_What_happened+0x4> bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46002: 23c0 0005 cd3a movel %d0,5cd3a <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46008: 23c2 0005 cd40 movel %d2,5cd40 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 4600e: 4eb9 0004 7b02 jsr 47b02 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46014: 40c0 movew %sr,%d0 46016: 8083 orl %d3,%d0 46018: 46c0 movew %d0,%sr 4601a: 2002 movel %d2,%d0 <== NOT EXECUTED 4601c: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46022: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46024: 7005 moveq #5,%d0 46026: 4fef 000c lea %sp@(12),%sp 4602a: 23c0 0005 ce1c movel %d0,5ce1c <_System_state_Current> 46030: 60fe bras 46030 <_Internal_error_Occurred+0x58> ... 0004cc78 <_Message_queue_Translate_core_message_queue_return_code>: }; rtems_status_code _Message_queue_Translate_core_message_queue_return_code ( uint32_t status ) { 4cc78: 41f9 0006 49e4 lea 649e4 <_Message_queue_Translate_core_return_code_>,%a0 4cc7e: 4e56 0000 linkw %fp,#0 if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ) return RTEMS_INTERNAL_ERROR; #endif return _Message_queue_Translate_core_return_code_[status]; } 4cc82: 202e 0008 movel %fp@(8),%d0 4cc86: 4e5e unlk %fp 4cc88: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4cc8c: 4e75 rts ... 0004a50c <_Objects_API_maximum_class>: case OBJECTS_NO_API: default: break; } return 0; } 4a50c: 7203 moveq #3,%d1 #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 4a50e: 4e56 0000 linkw %fp,#0 case OBJECTS_NO_API: default: break; } return 0; } 4a512: 202e 0008 movel %fp@(8),%d0 4a516: 5380 subql #1,%d0 4a518: b280 cmpl %d0,%d1 4a51a: 6404 bccs 4a520 <_Objects_API_maximum_class+0x14> 4a51c: 4280 clrl %d0 4a51e: 600a bras 4a52a <_Objects_API_maximum_class+0x1e> 4a520: 41f9 0005 a984 lea 5a984 ,%a0 4a526: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4a52a: 4e5e unlk %fp 4a52c: 4e75 rts ... 0004609c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 4609c: 4e56 fff0 linkw %fp,#-16 460a0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 460a4: 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 ) 460a8: 4aaa 0014 tstl %a2@(20) 460ac: 6604 bnes 460b2 <_Objects_Allocate+0x16> 460ae: 4280 clrl %d0 <== NOT EXECUTED 460b0: 605e bras 46110 <_Objects_Allocate+0x74> <== NOT EXECUTED /* * 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 ); 460b2: 240a movel %a2,%d2 460b4: 0682 0000 001c addil #28,%d2 460ba: 47f9 0004 a008 lea 4a008 <_Chain_Get>,%a3 460c0: 2f02 movel %d2,%sp@- 460c2: 4e93 jsr %a3@ if ( information->auto_extend ) { 460c4: 588f addql #4,%sp 460c6: 4a2a 0010 tstb %a2@(16) 460ca: 6744 beqs 46110 <_Objects_Allocate+0x74> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 460cc: 4a80 tstl %d0 460ce: 6612 bnes 460e2 <_Objects_Allocate+0x46> _Objects_Extend_information( information ); 460d0: 2f0a movel %a2,%sp@- 460d2: 4eb9 0004 6148 jsr 46148 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 460d8: 2f02 movel %d2,%sp@- 460da: 4e93 jsr %a3@ } if ( the_object ) { 460dc: 508f addql #8,%sp 460de: 4a80 tstl %d0 460e0: 672e beqs 46110 <_Objects_Allocate+0x74> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460e2: 2040 moveal %d0,%a0 460e4: 4281 clrl %d1 460e6: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460e8: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460ea: 362a 0008 movew %a2@(8),%d3 460ee: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460f2: 342a 0012 movew %a2@(18),%d2 information->inactive--; 460f6: 306a 0028 moveaw %a2@(40),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460fa: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460fc: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 46100: 5388 subql #1,%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46102: e589 lsll #2,%d1 information->inactive--; 46104: 3548 0028 movew %a0,%a2@(40) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46108: 206a 002a moveal %a2@(42),%a0 4610c: d1c1 addal %d1,%a0 4610e: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 46110: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46116: 4e5e unlk %fp 46118: 4e75 rts ... 0004611c <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4611c: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 4611e: 4e56 0000 linkw %fp,#0 46122: 226e 000c moveal %fp@(12),%a1 46126: 206e 0008 moveal %fp@(8),%a0 4612a: 2f0a movel %a2,%sp@- 4612c: 2468 0018 moveal %a0@(24),%a2 46130: 3029 000a movew %a1@(10),%d0 46134: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46138: 2d49 000c movel %a1,%fp@(12) } 4613c: 245f moveal %sp@+,%a2 4613e: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46140: 4ef9 0004 6640 jmp 46640 <_Objects_Namespace_remove> ... 00046148 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 46148: 4e56 ffc8 linkw %fp,#-56 4614c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 46150: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 46154: 4283 clrl %d3 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 46156: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 4615a: 362a 0008 movew %a2@(8),%d3 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4615e: 4a88 tstl %a0 46160: 6608 bnes 4616a <_Objects_Extend_information+0x22> 46162: 2403 movel %d3,%d2 46164: 4284 clrl %d4 46166: 4285 clrl %d5 46168: 602a bras 46194 <_Objects_Extend_information+0x4c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 4616a: 4280 clrl %d0 4616c: 2403 movel %d3,%d2 4616e: 4284 clrl %d4 46170: 302a 0012 movew %a2@(18),%d0 46174: 3a2a 000e movew %a2@(14),%d5 46178: 0285 0000 ffff andil #65535,%d5 4617e: 8ac0 divuw %d0,%d5 46180: 0285 0000 ffff andil #65535,%d5 for ( ; block < block_count; block++ ) { 46186: 6008 bras 46190 <_Objects_Extend_information+0x48> if ( information->object_blocks[ block ] == NULL ) 46188: 4a98 tstl %a0@+ 4618a: 6708 beqs 46194 <_Objects_Extend_information+0x4c> 4618c: d480 addl %d0,%d2 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 4618e: 5284 addql #1,%d4 46190: ba84 cmpl %d4,%d5 46192: 62f4 bhis 46188 <_Objects_Extend_information+0x40> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 46194: 4280 clrl %d0 46196: 4287 clrl %d7 46198: 302a 0012 movew %a2@(18),%d0 4619c: 3e2a 000e movew %a2@(14),%d7 461a0: 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 ) { 461a2: 0c87 0000 ffff cmpil #65535,%d7 461a8: 6200 01da bhiw 46384 <_Objects_Extend_information+0x23c> /* * 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; 461ac: 41ea 0014 lea %a2@(20),%a0 461b0: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 461b4: 4a2a 0010 tstb %a2@(16) 461b8: 6712 beqs 461cc <_Objects_Extend_information+0x84> new_object_block = _Workspace_Allocate( block_size ); 461ba: 2f00 movel %d0,%sp@- 461bc: 4eb9 0004 7e90 jsr 47e90 <_Workspace_Allocate> if ( !new_object_block ) 461c2: 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 ); 461c4: 2c00 movel %d0,%d6 if ( !new_object_block ) 461c6: 6610 bnes 461d8 <_Objects_Extend_information+0x90> 461c8: 6000 01ba braw 46384 <_Objects_Extend_information+0x23c> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 461cc: 2f00 movel %d0,%sp@- 461ce: 4eb9 0004 7e5c jsr 47e5c <_Workspace_Allocate_or_fatal_error> 461d4: 588f addql #4,%sp 461d6: 2c00 movel %d0,%d6 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 461d8: 4280 clrl %d0 461da: 302a 000e movew %a2@(14),%d0 461de: b082 cmpl %d2,%d0 461e0: 6200 0112 bhiw 462f4 <_Objects_Extend_information+0x1ac> */ /* * Up the block count and maximum */ block_count++; 461e4: 2845 moveal %d5,%a4 461e6: 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 *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 461e8: 2007 movel %d7,%d0 461ea: d083 addl %d3,%d0 461ec: 41f4 ca00 lea %a4@(00000000,%a4:l:2),%a0 461f0: d088 addl %a0,%d0 461f2: e588 lsll #2,%d0 461f4: 2f00 movel %d0,%sp@- 461f6: 4eb9 0004 7e90 jsr 47e90 <_Workspace_Allocate> if ( !object_blocks ) { 461fc: 588f addql #4,%sp * 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 *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 461fe: 2640 moveal %d0,%a3 if ( !object_blocks ) { 46200: 4a80 tstl %d0 46202: 660e bnes 46212 <_Objects_Extend_information+0xca> _Workspace_Free( new_object_block ); 46204: 2f06 movel %d6,%sp@- 46206: 4eb9 0004 7eac jsr 47eac <_Workspace_Free> return; 4620c: 588f addql #4,%sp 4620e: 6000 0174 braw 46384 <_Objects_Extend_information+0x23c> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 46212: 200c movel %a4,%d0 46214: e588 lsll #2,%d0 46216: 2840 moveal %d0,%a4 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 46218: 4280 clrl %d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 4621a: 4bf3 c800 lea %a3@(00000000,%a4:l),%a5 4621e: 49f5 c800 lea %a5@(00000000,%a4:l),%a4 46222: 302a 000e movew %a2@(14),%d0 46226: b680 cmpl %d0,%d3 46228: 6506 bcss 46230 <_Objects_Extend_information+0xe8> 4622a: 204c moveal %a4,%a0 4622c: 4280 clrl %d0 4622e: 604a bras 4627a <_Objects_Extend_information+0x132> /* * 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, 46230: 2205 movel %d5,%d1 46232: e589 lsll #2,%d1 46234: 2f01 movel %d1,%sp@- 46236: 2f2a 002e movel %a2@(46),%sp@- 4623a: 2d41 fff0 movel %d1,%fp@(-16) 4623e: 2f0b movel %a3,%sp@- 46240: 4eb9 0004 d23c jsr 4d23c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 46246: 222e fff0 movel %fp@(-16),%d1 4624a: 2f01 movel %d1,%sp@- 4624c: 2f2a 002a movel %a2@(42),%sp@- 46250: 2f0d movel %a5,%sp@- 46252: 4eb9 0004 d23c jsr 4d23c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 46258: 4280 clrl %d0 4625a: 302a 000e movew %a2@(14),%d0 4625e: d680 addl %d0,%d3 46260: e58b lsll #2,%d3 46262: 2f03 movel %d3,%sp@- 46264: 2f2a 0018 movel %a2@(24),%sp@- 46268: 2f0c movel %a4,%sp@- 4626a: 4eb9 0004 d23c jsr 4d23c 46270: 4fef 0024 lea %sp@(36),%sp 46274: 6008 bras 4627e <_Objects_Extend_information+0x136> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 46276: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 46278: 5280 addql #1,%d0 4627a: b680 cmpl %d0,%d3 4627c: 62f8 bhis 46276 <_Objects_Extend_information+0x12e> */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 4627e: 4281 clrl %d1 46280: 2002 movel %d2,%d0 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 46282: e58d lsll #2,%d5 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 46284: 322a 0012 movew %a2@(18),%d1 46288: 41f4 2c00 lea %a4@(00000000,%d2:l:4),%a0 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 4628c: 42b5 5800 clrl %a5@(00000000,%d5:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 46290: d282 addl %d2,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 46292: 42b3 5800 clrl %a3@(00000000,%d5:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 46296: 6004 bras 4629c <_Objects_Extend_information+0x154> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 46298: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 4629a: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 4629c: b280 cmpl %d0,%d1 4629e: 62f8 bhis 46298 <_Objects_Extend_information+0x150> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 462a0: 203c 0000 0700 movel #1792,%d0 462a6: 40c3 movew %sr,%d3 462a8: 8083 orl %d3,%d0 462aa: 46c0 movew %d0,%sr 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( 462ac: 2012 movel %a2@,%d0 462ae: 7218 moveq #24,%d1 462b0: 4285 clrl %d5 462b2: e3a8 lsll %d1,%d0 462b4: 3a07 movew %d7,%d5 462b6: 4281 clrl %d1 462b8: 2245 moveal %d5,%a1 462ba: 7a1b moveq #27,%d5 462bc: 322a 0004 movew %a2@(4),%d1 462c0: 08c0 0010 bset #16,%d0 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 462c4: 3547 000e movew %d7,%a2@(14) information->maximum_id = _Objects_Build_id( 462c8: eba9 lsll %d5,%d1 462ca: 2e09 movel %a1,%d7 462cc: 8081 orl %d1,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 462ce: 206a 002e moveal %a2@(46),%a0 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( 462d2: 8e80 orl %d0,%d7 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 462d4: 254b 002e movel %a3,%a2@(46) information->inactive_per_block = inactive_per_block; 462d8: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 462dc: 2547 000a movel %d7,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 462e0: 254c 0018 movel %a4,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 462e4: 46c3 movew %d3,%sr if ( old_tables ) 462e6: 4a88 tstl %a0 462e8: 670a beqs 462f4 <_Objects_Extend_information+0x1ac> _Workspace_Free( old_tables ); 462ea: 2f08 movel %a0,%sp@- 462ec: 4eb9 0004 7eac jsr 47eac <_Workspace_Free> 462f2: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 462f4: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 462f8: 4281 clrl %d1 462fa: 200e movel %fp,%d0 462fc: 0680 ffff fff4 addil #-12,%d0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 46302: 2a00 movel %d0,%d5 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 46304: 260a movel %a2,%d3 46306: 0683 0000 001c addil #28,%d3 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 4630c: 49f9 0004 a008 lea 4a008 <_Chain_Get>,%a4 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 46312: 47f9 0004 58d0 lea 458d0 <_Chain_Append>,%a3 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 46318: e58c lsll #2,%d4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4631a: 322a 0012 movew %a2@(18),%d1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4631e: 2186 4800 movel %d6,%a0@(00000000,%d4:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 46322: 2f2a 0014 movel %a2@(20),%sp@- 46326: 2f01 movel %d1,%sp@- 46328: 2f06 movel %d6,%sp@- 4632a: 2f00 movel %d0,%sp@- 4632c: 4eb9 0004 a03c jsr 4a03c <_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 ) { 46332: 4fef 0010 lea %sp@(16),%sp 46336: 6028 bras 46360 <_Objects_Extend_information+0x218> the_object->id = _Objects_Build_id( 46338: 2212 movel %a2@,%d1 4633a: 7c18 moveq #24,%d6 4633c: 7e1b moveq #27,%d7 4633e: 2040 moveal %d0,%a0 46340: eda9 lsll %d6,%d1 46342: 4286 clrl %d6 46344: 3c2a 0004 movew %a2@(4),%d6 46348: 08c1 0010 bset #16,%d1 4634c: efae lsll %d7,%d6 4634e: 8286 orl %d6,%d1 46350: 8282 orl %d2,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 46352: 5282 addql #1,%d2 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 46354: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 46358: 2f00 movel %d0,%sp@- 4635a: 2f03 movel %d3,%sp@- 4635c: 4e93 jsr %a3@ index++; 4635e: 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 ) { 46360: 2f05 movel %d5,%sp@- 46362: 4e94 jsr %a4@ 46364: 588f addql #4,%sp 46366: 4a80 tstl %d0 46368: 66ce bnes 46338 <_Objects_Extend_information+0x1f0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4636a: 4280 clrl %d0 information->inactive = 4636c: 322a 0028 movew %a2@(40),%d1 46370: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 46374: 206a 002a moveal %a2@(42),%a0 information->inactive = 46378: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4637a: 3009 movew %a1,%d0 information->inactive = 4637c: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 46380: 2180 4800 movel %d0,%a0@(00000000,%d4:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 46384: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4638a: 4e5e unlk %fp 4638c: 4e75 rts ... 00046440 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 46440: 4e56 0000 linkw %fp,#0 46444: 2f03 movel %d3,%sp@- 46446: 262e 0008 movel %fp@(8),%d3 4644a: 2f02 movel %d2,%sp@- 4644c: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 46450: 672e beqs 46480 <_Objects_Get_information+0x40> /* * 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 ); 46452: 2f03 movel %d3,%sp@- 46454: 4eb9 0004 a50c jsr 4a50c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 4645a: 588f addql #4,%sp 4645c: 4a80 tstl %d0 4645e: 6720 beqs 46480 <_Objects_Get_information+0x40> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 46460: b082 cmpl %d2,%d0 46462: 651c bcss 46480 <_Objects_Get_information+0x40> return NULL; if ( !_Objects_Information_table[ the_api ] ) 46464: 41f9 0005 cc4c lea 5cc4c <_Objects_Information_table>,%a0 4646a: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 4646e: 4a88 tstl %a0 46470: 670e beqs 46480 <_Objects_Get_information+0x40> return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 46472: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 46476: 670a beqs 46482 <_Objects_Get_information+0x42> * 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 ) 46478: 2040 moveal %d0,%a0 4647a: 4a68 000e tstw %a0@(14) 4647e: 6602 bnes 46482 <_Objects_Get_information+0x42> 46480: 4280 clrl %d0 return NULL; #endif return info; } 46482: 242e fff8 movel %fp@(-8),%d2 46486: 262e fffc movel %fp@(-4),%d3 4648a: 4e5e unlk %fp 4648c: 4e75 rts ... 00053090 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 53090: 4e56 ffec linkw %fp,#-20 53094: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 53098: 266e 0008 moveal %fp@(8),%a3 5309c: 242e 000c movel %fp@(12),%d2 530a0: 246e 0010 moveal %fp@(16),%a2 530a4: 286e 0014 moveal %fp@(20),%a4 Objects_Control *object; Objects_Id next_id; if ( !information ) 530a8: 4a8b tstl %a3 530aa: 6746 beqs 530f2 <_Objects_Get_next+0x62> return NULL; if ( !location_p ) 530ac: 4a8a tstl %a2 530ae: 6742 beqs 530f2 <_Objects_Get_next+0x62> return NULL; if ( !next_id_p ) 530b0: 4a8c tstl %a4 530b2: 673e beqs 530f2 <_Objects_Get_next+0x62> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 530b4: 4a42 tstw %d2 530b6: 6604 bnes 530bc <_Objects_Get_next+0x2c> next_id = information->minimum_id; 530b8: 242b 0006 movel %a3@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 530bc: 4bf9 0004 9e20 lea 49e20 <_Objects_Get>,%a5 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 530c2: 4281 clrl %d1 530c4: 4280 clrl %d0 530c6: 322b 000e movew %a3@(14),%d1 530ca: 3002 movew %d2,%d0 530cc: b081 cmpl %d1,%d0 530ce: 630c blss 530dc <_Objects_Get_next+0x4c> { *location_p = OBJECTS_ERROR; 530d0: 7401 moveq #1,%d2 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 530d2: 72ff moveq #-1,%d1 530d4: 4280 clrl %d0 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 530d6: 2482 movel %d2,%a2@ *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 530d8: 2881 movel %d1,%a4@ return 0; 530da: 6018 bras 530f4 <_Objects_Get_next+0x64> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 530dc: 2f0a movel %a2,%sp@- 530de: 2f02 movel %d2,%sp@- next_id++; 530e0: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 530e2: 2f0b movel %a3,%sp@- 530e4: 4e95 jsr %a5@ next_id++; } while (*location_p != OBJECTS_LOCAL); 530e6: 4fef 000c lea %sp@(12),%sp 530ea: 4a92 tstl %a2@ 530ec: 66d4 bnes 530c2 <_Objects_Get_next+0x32> *next_id_p = next_id; 530ee: 2882 movel %d2,%a4@ return object; 530f0: 6002 bras 530f4 <_Objects_Get_next+0x64> final: *next_id_p = OBJECTS_ID_FINAL; return 0; 530f2: 4280 clrl %d0 } 530f4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 530fa: 4e5e unlk %fp 530fc: 4e75 rts ... 00049e80 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 49e80: 4e56 fffc linkw %fp,#-4 49e84: 222e 0008 movel %fp@(8),%d1 49e88: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49e8a: 4a81 tstl %d1 49e8c: 660a bnes 49e98 <_Objects_Id_to_name+0x18> 49e8e: 2079 0006 85a6 moveal 685a6 <_Thread_Executing>,%a0 49e94: 2228 0008 movel %a0@(8),%d1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 49e98: 7418 moveq #24,%d2 49e9a: 2001 movel %d1,%d0 49e9c: e4a8 lsrl %d2,%d0 49e9e: 143c 0007 moveb #7,%d2 49ea2: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 49ea4: 143c 0003 moveb #3,%d2 49ea8: 2040 moveal %d0,%a0 49eaa: 5388 subql #1,%a0 49eac: b488 cmpl %a0,%d2 49eae: 6540 bcss 49ef0 <_Objects_Id_to_name+0x70> 49eb0: 6048 bras 49efa <_Objects_Id_to_name+0x7a> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 49eb2: 2001 movel %d1,%d0 49eb4: 741b moveq #27,%d2 49eb6: e4a8 lsrl %d2,%d0 49eb8: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 49ebc: 4a88 tstl %a0 49ebe: 6730 beqs 49ef0 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 49ec0: 4a28 0032 tstb %a0@(50) 49ec4: 662a bnes 49ef0 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 49ec6: 486e fffc pea %fp@(-4) 49eca: 2f01 movel %d1,%sp@- 49ecc: 2f08 movel %a0,%sp@- 49ece: 4eb9 0004 9e20 jsr 49e20 <_Objects_Get> if ( !the_object ) 49ed4: 4fef 000c lea %sp@(12),%sp 49ed8: 4a80 tstl %d0 49eda: 6714 beqs 49ef0 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; *name = the_object->name; 49edc: 206e 000c moveal %fp@(12),%a0 49ee0: 2240 moveal %d0,%a1 49ee2: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 49ee6: 4eb9 0004 a71e jsr 4a71e <_Thread_Enable_dispatch> 49eec: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 49eee: 6002 bras 49ef2 <_Objects_Id_to_name+0x72> 49ef0: 7003 moveq #3,%d0 } 49ef2: 242e fff8 movel %fp@(-8),%d2 49ef6: 4e5e unlk %fp 49ef8: 4e75 rts the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 49efa: 41f9 0006 84a4 lea 684a4 <_Objects_Information_table>,%a0 49f00: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 49f04: 4a88 tstl %a0 49f06: 66aa bnes 49eb2 <_Objects_Id_to_name+0x32> 49f08: 60e6 bras 49ef0 <_Objects_Id_to_name+0x70> ... 00050684 <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 50684: 4e56 ffe4 linkw %fp,#-28 50688: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5068c: 266e 0008 moveal %fp@(8),%a3 50690: 262e 000c movel %fp@(12),%d3 50694: 286e 0010 moveal %fp@(16),%a4 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 50698: 4a8c tstl %a4 5069a: 6604 bnes 506a0 <_Objects_Name_to_id_string+0x1c> 5069c: 7002 moveq #2,%d0 5069e: 6050 bras 506f0 <_Objects_Name_to_id_string+0x6c> return OBJECTS_INVALID_ADDRESS; if ( !name ) 506a0: 4a83 tstl %d3 506a2: 674a beqs 506ee <_Objects_Name_to_id_string+0x6a> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 506a4: 382b 000e movew %a3@(14),%d4 506a8: 6744 beqs 506ee <_Objects_Name_to_id_string+0x6a> 506aa: 7401 moveq #1,%d2 continue; if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 506ac: 4bf9 0005 4274 lea 54274 ,%a5 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 506b2: 0284 0000 ffff andil #65535,%d4 506b8: 6030 bras 506ea <_Objects_Name_to_id_string+0x66> the_object = information->local_table[ index ]; 506ba: 206b 0018 moveal %a3@(24),%a0 506be: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 506c2: 5282 addql #1,%d2 the_object = information->local_table[ index ]; if ( !the_object ) 506c4: 4a8a tstl %a2 506c6: 6722 beqs 506ea <_Objects_Name_to_id_string+0x66> continue; if ( !the_object->name.name_p ) 506c8: 202a 000c movel %a2@(12),%d0 506cc: 671c beqs 506ea <_Objects_Name_to_id_string+0x66> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 506ce: 4281 clrl %d1 506d0: 322b 0034 movew %a3@(52),%d1 506d4: 2f01 movel %d1,%sp@- 506d6: 2f00 movel %d0,%sp@- 506d8: 2f03 movel %d3,%sp@- 506da: 4e95 jsr %a5@ 506dc: 4fef 000c lea %sp@(12),%sp 506e0: 4a80 tstl %d0 506e2: 6606 bnes 506ea <_Objects_Name_to_id_string+0x66> *id = the_object->id; 506e4: 28aa 0008 movel %a2@(8),%a4@ return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 506e8: 6006 bras 506f0 <_Objects_Name_to_id_string+0x6c> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 506ea: b882 cmpl %d2,%d4 506ec: 64cc bccs 506ba <_Objects_Name_to_id_string+0x36> 506ee: 7001 moveq #1,%d0 } } } return OBJECTS_INVALID_NAME; } 506f0: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 506f6: 4e5e unlk %fp 506f8: 4e75 rts ... 00046a50 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a50: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a52: 4e56 ffe0 linkw %fp,#-32 46a56: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46a5a: 2a6e 0008 moveal %fp@(8),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a5e: 302d 0034 movew %a5@(52),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a62: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a66: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a68: 286e 000c moveal %fp@(12),%a4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a6c: 2f0a movel %a2,%sp@- 46a6e: 4eb9 0004 e554 jsr 4e554 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 46a74: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a76: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 46a78: 4a2d 0032 tstb %a5@(50) 46a7c: 6748 beqs 46ac6 <_Objects_Set_name+0x76> char *d; d = _Workspace_Allocate( length + 1 ); 46a7e: 486b 0001 pea %a3@(1) 46a82: 4eb9 0004 82d4 jsr 482d4 <_Workspace_Allocate> if ( !d ) 46a88: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 46a8a: 2a40 moveal %d0,%a5 if ( !d ) 46a8c: 4a80 tstl %d0 46a8e: 6604 bnes 46a94 <_Objects_Set_name+0x44> 46a90: 4200 clrb %d0 <== NOT EXECUTED 46a92: 6076 bras 46b0a <_Objects_Set_name+0xba> <== NOT EXECUTED return false; if ( the_object->name.name_p ) { 46a94: 202c 000c movel %a4@(12),%d0 46a98: 670e beqs 46aa8 <_Objects_Set_name+0x58> _Workspace_Free( (void *)the_object->name.name_p ); 46a9a: 2f00 movel %d0,%sp@- 46a9c: 4eb9 0004 82f0 jsr 482f0 <_Workspace_Free> the_object->name.name_p = NULL; 46aa2: 588f addql #4,%sp 46aa4: 42ac 000c clrl %a4@(12) } strncpy( d, name, length ); 46aa8: 2f0b movel %a3,%sp@- 46aaa: 2f0a movel %a2,%sp@- 46aac: 2f0d movel %a5,%sp@- 46aae: 4eb9 0004 e4cc jsr 4e4cc d[length] = '\0'; the_object->name.name_p = d; 46ab4: 4fef 000c lea %sp@(12),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0'; 46ab8: 4200 clrb %d0 46aba: 1b80 b800 moveb %d0,%a5@(00000000,%a3:l) the_object->name.name_p = d; 46abe: 7001 moveq #1,%d0 46ac0: 294d 000c movel %a5,%a4@(12) 46ac4: 6044 bras 46b0a <_Objects_Set_name+0xba> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 46ac6: 7201 moveq #1,%d1 46ac8: 1012 moveb %a2@,%d0 46aca: b28b cmpl %a3,%d1 46acc: 6446 bccs 46b14 <_Objects_Set_name+0xc4> 46ace: 7602 moveq #2,%d3 46ad0: 142a 0001 moveb %a2@(1),%d2 46ad4: 49c2 extbl %d2 46ad6: 4842 swap %d2 46ad8: 4242 clrw %d2 46ada: b68b cmpl %a3,%d3 46adc: 643a bccs 46b18 <_Objects_Set_name+0xc8> 46ade: 7a03 moveq #3,%d5 46ae0: 122a 0002 moveb %a2@(2),%d1 46ae4: 49c1 extbl %d1 46ae6: e189 lsll #8,%d1 46ae8: ba8b cmpl %a3,%d5 46aea: 6506 bcss 46af2 <_Objects_Set_name+0xa2> 46aec: 163c 0020 moveb #32,%d3 46af0: 6006 bras 46af8 <_Objects_Set_name+0xa8> 46af2: 162a 0003 moveb %a2@(3),%d3 46af6: 49c3 extbl %d3 46af8: 2800 movel %d0,%d4 46afa: 7a18 moveq #24,%d5 46afc: ebac lsll %d5,%d4 46afe: 7001 moveq #1,%d0 46b00: 8484 orl %d4,%d2 46b02: 8481 orl %d1,%d2 46b04: 8483 orl %d3,%d2 46b06: 2942 000c movel %d2,%a4@(12) ); } return true; } 46b0a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46b10: 4e5e unlk %fp 46b12: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 46b14: 7420 moveq #32,%d2 46b16: 4842 swap %d2 46b18: 223c 0000 2000 movel #8192,%d1 46b1e: 7620 moveq #32,%d3 46b20: 60d6 bras 46af8 <_Objects_Set_name+0xa8> ... 000466e0 <_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) / 466e0: 4280 clrl %d0 466e2: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 466e4: 4e56 ffec linkw %fp,#-20 466e8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 466ec: 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 ); 466f0: 4283 clrl %d3 block_count = (information->maximum - index_base) / 466f2: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 466f4: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 466f8: 302a 000e movew %a2@(14),%d0 466fc: 322a 0012 movew %a2@(18),%d1 46700: 9083 subl %d3,%d0 46702: 4c41 0000 remul %d1,%d0,%d0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 46706: 6070 bras 46778 <_Objects_Shrink_information+0x98> 46708: 2404 movel %d4,%d2 4670a: 5284 addql #1,%d4 4670c: e58a lsll #2,%d2 if ( information->inactive_per_block[ block ] == 4670e: 206a 002a moveal %a2@(42),%a0 46712: b2b0 2800 cmpl %a0@(00000000,%d2:l),%d1 46716: 665e bnes 46776 <_Objects_Shrink_information+0x96> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 46718: 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 ); 4671c: 47f9 0004 9fe0 lea 49fe0 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 46722: 4280 clrl %d0 46724: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 46728: 2810 movel %a0@,%d4 if ((index >= index_base) && 4672a: b680 cmpl %d0,%d3 4672c: 6212 bhis 46740 <_Objects_Shrink_information+0x60> (index < (index_base + information->allocation_size))) { 4672e: 4281 clrl %d1 46730: 322a 0012 movew %a2@(18),%d1 46734: d283 addl %d3,%d1 46736: b280 cmpl %d0,%d1 46738: 6306 blss 46740 <_Objects_Shrink_information+0x60> _Chain_Extract( &extract_me->Node ); 4673a: 2f08 movel %a0,%sp@- 4673c: 4e93 jsr %a3@ 4673e: 588f addql #4,%sp } } while ( the_object ); 46740: 2044 moveal %d4,%a0 46742: 4a84 tstl %d4 46744: 66dc bnes 46722 <_Objects_Shrink_information+0x42> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 46746: 206a 002e moveal %a2@(46),%a0 4674a: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 4674e: 4eb9 0004 7eac jsr 47eac <_Workspace_Free> information->object_blocks[ block ] = NULL; 46754: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 46758: 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; information->inactive_per_block[ block ] = 0; 4675a: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 4675e: 302a 0028 movew %a2@(40),%d0 46762: 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; 46766: 42b1 2800 clrl %a1@(00000000,%d2:l) information->inactive -= information->allocation_size; 4676a: 9081 subl %d1,%d0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 4676c: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 46770: 3540 0028 movew %d0,%a2@(40) return; 46774: 6006 bras 4677c <_Objects_Shrink_information+0x9c> } index_base += information->allocation_size; 46776: d681 addl %d1,%d3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 46778: b084 cmpl %d4,%d0 4677a: 628c bhis 46708 <_Objects_Shrink_information+0x28> return; } index_base += information->allocation_size; } } 4677c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 46782: 4e5e unlk %fp 46784: 4e75 rts ... 000495f8 <_POSIX_Barrier_Manager_initialization>: /** * @brief _POSIX_Barrier_Manager_initialization */ void _POSIX_Barrier_Manager_initialization(void) { 495f8: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 495fc: 4878 00ff pea ff 49600: 4878 0001 pea 1 49604: 4878 005c pea 5c 49608: 2f39 0005 baf6 movel 5baf6 ,%sp@- 4960e: 4878 000a pea a 49612: 4878 0003 pea 3 49616: 4879 0005 cfd6 pea 5cfd6 <_POSIX_Barrier_Information> 4961c: 4eb9 0004 6548 jsr 46548 <_Objects_Initialize_information> 49622: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 49626: 4e5e unlk %fp 49628: 4e75 rts ... 0004a76c <_POSIX_Barrier_Translate_core_barrier_return_code>: int _POSIX_Barrier_Translate_core_barrier_return_code( CORE_barrier_Status the_barrier_status ) { 4a76c: 41f9 0005 bcb0 lea 5bcb0 <_POSIX_Barrier_Return_codes>,%a0 4a772: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return EINVAL; #endif return _POSIX_Barrier_Return_codes[the_barrier_status]; } 4a776: 202e 0008 movel %fp@(8),%d0 4a77a: 4e5e unlk %fp 4a77c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4a780: 4e75 rts ... 000459ec <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 459ec: 4e56 0000 linkw %fp,#0 459f0: 2f0b movel %a3,%sp@- 459f2: 266e 000c moveal %fp@(12),%a3 459f6: 2f0a movel %a2,%sp@- 459f8: 246e 0008 moveal %fp@(8),%a2 int status; if ( !cond ) { 459fc: 4a8a tstl %a2 459fe: 6716 beqs 45a16 <_POSIX_Condition_variables_Get+0x2a> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 45a00: 70ff moveq #-1,%d0 45a02: b092 cmpl %a2@,%d0 45a04: 6618 bnes 45a1e <_POSIX_Condition_variables_Get+0x32> /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 45a06: 42a7 clrl %sp@- 45a08: 2f0a movel %a2,%sp@- 45a0a: 4eb9 0004 5a40 jsr 45a40 if ( status ) { 45a10: 508f addql #8,%sp 45a12: 4a80 tstl %d0 45a14: 6708 beqs 45a1e <_POSIX_Condition_variables_Get+0x32> *location = OBJECTS_ERROR; 45a16: 7001 moveq #1,%d0 45a18: 2680 movel %d0,%a3@ 45a1a: 4280 clrl %d0 return (POSIX_Condition_variables_Control *) 0; 45a1c: 6014 bras 45a32 <_POSIX_Condition_variables_Get+0x46> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 45a1e: 2f0b movel %a3,%sp@- 45a20: 2f12 movel %a2@,%sp@- 45a22: 4879 0005 f592 pea 5f592 <_POSIX_Condition_variables_Information> 45a28: 4eb9 0004 821c jsr 4821c <_Objects_Get> 45a2e: 4fef 000c lea %sp@(12),%sp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 45a32: 246e fff8 moveal %fp@(-8),%a2 45a36: 266e fffc moveal %fp@(-4),%a3 45a3a: 4e5e unlk %fp 45a3c: 4e75 rts ... 000494d0 <_POSIX_Condition_variables_Manager_initialization>: * * Output parameters: NONE */ void _POSIX_Condition_variables_Manager_initialization(void) { 494d0: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 494d4: 4878 00ff pea ff 494d8: 4878 0001 pea 1 494dc: 4878 0058 pea 58 494e0: 2f39 0005 bada movel 5bada ,%sp@- 494e6: 4878 0008 pea 8 494ea: 4878 0003 pea 3 494ee: 4879 0005 d062 pea 5d062 <_POSIX_Condition_variables_Information> 494f4: 4eb9 0004 6548 jsr 46548 <_Objects_Initialize_information> 494fa: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 494fe: 4e5e unlk %fp 49500: 4e75 rts ... 00045af8 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 45af8: 4e56 ffec linkw %fp,#-20 45afc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45b00: 486e fffc pea %fp@(-4) 45b04: 2f2e 0008 movel %fp@(8),%sp@- int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 45b08: 162e 000f moveb %fp@(15),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45b0c: 4eb9 0004 59ec jsr 459ec <_POSIX_Condition_variables_Get> switch ( location ) { 45b12: 508f addql #8,%sp { register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45b14: 2440 moveal %d0,%a2 switch ( location ) { 45b16: 4aae fffc tstl %fp@(-4) 45b1a: 6704 beqs 45b20 <_POSIX_Condition_variables_Signal_support+0x28> 45b1c: 7016 moveq #22,%d0 45b1e: 602c bras 45b4c <_POSIX_Condition_variables_Signal_support+0x54> case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 45b20: 2400 movel %d0,%d2 45b22: 0682 0000 0018 addil #24,%d2 45b28: 47f9 0004 8cf0 lea 48cf0 <_Thread_queue_Dequeue>,%a3 45b2e: 2f02 movel %d2,%sp@- 45b30: 4e93 jsr %a3@ if ( !the_thread ) 45b32: 588f addql #4,%sp 45b34: 4a80 tstl %d0 45b36: 6604 bnes 45b3c <_POSIX_Condition_variables_Signal_support+0x44> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 45b38: 42aa 0014 clrl %a2@(20) } while ( is_broadcast && the_thread ); 45b3c: 4a03 tstb %d3 45b3e: 6704 beqs 45b44 <_POSIX_Condition_variables_Signal_support+0x4c> 45b40: 4a80 tstl %d0 45b42: 66ea bnes 45b2e <_POSIX_Condition_variables_Signal_support+0x36> _Thread_Enable_dispatch(); 45b44: 4eb9 0004 89a6 jsr 489a6 <_Thread_Enable_dispatch> 45b4a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 45b4c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 45b52: 4e5e unlk %fp 45b54: 4e75 rts ... 00049504 <_POSIX_Key_Manager_initialization>: * * Output parameters: NONE */ void _POSIX_Key_Manager_initialization(void) { 49504: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 49508: 4878 00ff pea ff 4950c: 4878 0001 pea 1 49510: 4878 0028 pea 28 49514: 2f39 0005 bade movel 5bade ,%sp@- 4951a: 4878 0002 pea 2 4951e: 4878 0003 pea 3 49522: 4879 0005 d028 pea 5d028 <_POSIX_Keys_Information> 49528: 4eb9 0004 6548 jsr 46548 <_Objects_Initialize_information> 4952e: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 49532: 4e5e unlk %fp 49534: 4e75 rts ... 0004b794 <_POSIX_Keys_Run_destructors>: */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4b794: 7218 moveq #24,%d1 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4b796: 4e56 ffe8 linkw %fp,#-24 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4b79a: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4b79e: 48d7 047c moveml %d2-%d6/%a2,%sp@ uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4b7a2: 2428 0008 movel %a0@(8),%d2 4b7a6: 2002 movel %d2,%d0 4b7a8: e2a8 lsrl %d1,%d0 4b7aa: 123c 0007 moveb #7,%d1 if ( !the_key ) continue; if ( !the_key->destructor ) continue; value = the_key->Values[ thread_api ][ thread_index ]; 4b7ae: 4284 clrl %d4 4b7b0: 0282 0000 ffff andil #65535,%d2 4b7b6: c081 andl %d1,%d0 4b7b8: e58a lsll #2,%d2 4b7ba: 2c00 movel %d0,%d6 4b7bc: 5a86 addql #5,%d6 4b7be: 7601 moveq #1,%d3 4b7c0: 7a01 moveq #1,%d5 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4b7c2: 6034 bras 4b7f8 <_POSIX_Keys_Run_destructors+0x64> the_key = (POSIX_Keys_Control *) 4b7c4: 2079 0005 d040 moveal 5d040 <_POSIX_Keys_Information+0x18>,%a0 4b7ca: 2470 3c00 moveal %a0@(00000000,%d3:l:4),%a2 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4b7ce: 5283 addql #1,%d3 the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; if ( !the_key ) 4b7d0: 4a8a tstl %a2 4b7d2: 6724 beqs 4b7f8 <_POSIX_Keys_Run_destructors+0x64> continue; if ( !the_key->destructor ) 4b7d4: 206a 0010 moveal %a2@(16),%a0 4b7d8: 4a88 tstl %a0 4b7da: 671c beqs 4b7f8 <_POSIX_Keys_Run_destructors+0x64> continue; value = the_key->Values[ thread_api ][ thread_index ]; 4b7dc: 2272 6c00 moveal %a2@(00000000,%d6:l:4),%a1 4b7e0: 2031 2800 movel %a1@(00000000,%d2:l),%d0 if ( value ) { 4b7e4: 6712 beqs 4b7f8 <_POSIX_Keys_Run_destructors+0x64> (*the_key->destructor)( value ); 4b7e6: 2f00 movel %d0,%sp@- 4b7e8: 4e90 jsr %a0@ if ( the_key->Values[ thread_api ][ thread_index ] ) 4b7ea: 588f addql #4,%sp 4b7ec: 2072 6c00 moveal %a2@(00000000,%d6:l:4),%a0 4b7f0: 4ab0 2800 tstl %a0@(00000000,%d2:l) 4b7f4: 57c0 seq %d0 4b7f6: ca80 andl %d0,%d5 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4b7f8: 4280 clrl %d0 4b7fa: 3039 0005 d036 movew 5d036 <_POSIX_Keys_Information+0xe>,%d0 4b800: b083 cmpl %d3,%d0 4b802: 64c0 bccs 4b7c4 <_POSIX_Keys_Run_destructors+0x30> if ( the_key->Values[ thread_api ][ thread_index ] ) are_all_null = false; } } if ( are_all_null == true ) 4b804: 4a05 tstb %d5 4b806: 6608 bnes 4b810 <_POSIX_Keys_Run_destructors+0x7c> return; iterations++; 4b808: 5284 addql #1,%d4 * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 4b80a: 7004 moveq #4,%d0 4b80c: b084 cmpl %d4,%d0 4b80e: 66ae bnes 4b7be <_POSIX_Keys_Run_destructors+0x2a> return; } } 4b810: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4b816: 4e5e unlk %fp 4b818: 4e75 rts ... 00049134 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 49134: 4e56 0000 linkw %fp,#0 49138: 2f0a movel %a2,%sp@- 4913a: 246e 0008 moveal %fp@(8),%a2 if ( !the_mq->linked && !the_mq->open_count ) { 4913e: 4a2a 0015 tstb %a2@(21) 49142: 6636 bnes 4917a <_POSIX_Message_queue_Delete+0x46> 49144: 4aaa 0016 tstl %a2@(22) 49148: 6630 bnes 4917a <_POSIX_Message_queue_Delete+0x46> ); _Workspace_Free( (void *)the_object->name.name_p ); } #endif _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 4914a: 2f0a movel %a2,%sp@- 4914c: 4879 0006 4e7e pea 64e7e <_POSIX_Message_queue_Information> 49152: 4eb9 0004 bdbc jsr 4bdbc <_Objects_Close> _CORE_message_queue_Close( 49158: 4878 0005 pea 5 4915c: 42a7 clrl %sp@- 4915e: 486a 001a pea %a2@(26) 49162: 4eb9 0004 b234 jsr 4b234 <_CORE_message_queue_Close> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 49168: 2f0a movel %a2,%sp@- 4916a: 4879 0006 4e7e pea 64e7e <_POSIX_Message_queue_Information> 49170: 4eb9 0004 c030 jsr 4c030 <_Objects_Free> 49176: 4fef 001c lea %sp@(28),%sp ); _POSIX_Message_queue_Free( the_mq ); } } 4917a: 246e fffc moveal %fp@(-4),%a2 4917e: 4e5e unlk %fp 49180: 4e75 rts ... 0004948c <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4948c: 4e56 ffe4 linkw %fp,#-28 49490: 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( 49494: 486e fffc pea %fp@(-4) 49498: 242e 0008 movel %fp@(8),%d2 4949c: 2f02 movel %d2,%sp@- 4949e: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 494a4: 246e 0014 moveal %fp@(20),%a2 494a8: 262e 0018 movel %fp@(24),%d3 494ac: 4eb9 0004 c188 jsr 4c188 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 494b2: 4fef 000c lea %sp@(12),%sp 494b6: 4aae fffc tstl %fp@(-4) 494ba: 6600 00c4 bnew 49580 <_POSIX_Message_queue_Receive_support+0xf4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 494be: 2040 moveal %d0,%a0 494c0: 7803 moveq #3,%d4 494c2: 7a01 moveq #1,%d5 494c4: 2228 0014 movel %a0@(20),%d1 494c8: c881 andl %d1,%d4 494ca: ba84 cmpl %d4,%d5 494cc: 660a bnes 494d8 <_POSIX_Message_queue_Receive_support+0x4c> _Thread_Enable_dispatch(); 494ce: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> 494d4: 6000 00aa braw 49580 <_POSIX_Message_queue_Receive_support+0xf4> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 494d8: 2240 moveal %d0,%a1 494da: 2069 0010 moveal %a1@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 494de: 2028 0066 movel %a0@(102),%d0 494e2: b0ae 0010 cmpl %fp@(16),%d0 494e6: 6318 blss 49500 <_POSIX_Message_queue_Receive_support+0x74> _Thread_Enable_dispatch(); 494e8: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 494ee: 747a moveq #122,%d2 494f0: 4eb9 0005 2858 jsr 52858 <__errno> 494f6: 72ff moveq #-1,%d1 494f8: 2040 moveal %d0,%a0 494fa: 2082 movel %d2,%a0@ 494fc: 6000 0090 braw 4958e <_POSIX_Message_queue_Receive_support+0x102> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 49500: 4a03 tstb %d3 49502: 6604 bnes 49508 <_POSIX_Message_queue_Receive_support+0x7c> 49504: 4200 clrb %d0 <== NOT EXECUTED 49506: 600c bras 49514 <_POSIX_Message_queue_Receive_support+0x88><== NOT EXECUTED do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 49508: 2001 movel %d1,%d0 4950a: 760e moveq #14,%d3 4950c: 7a01 moveq #1,%d5 4950e: e6a8 lsrl %d3,%d0 49510: bb80 eorl %d5,%d0 49512: c085 andl %d5,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 49514: 2f2e 001c movel %fp@(28),%sp@- 49518: 7201 moveq #1,%d1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4951a: 76ff moveq #-1,%d3 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4951c: c280 andl %d0,%d1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4951e: 2d43 fff8 movel %d3,%fp@(-8) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 49522: 2f01 movel %d1,%sp@- 49524: 486e fff8 pea %fp@(-8) 49528: 2f2e 000c movel %fp@(12),%sp@- 4952c: 2f02 movel %d2,%sp@- 4952e: 4868 001a pea %a0@(26) 49532: 4eb9 0004 b2d0 jsr 4b2d0 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 49538: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4953e: 2079 0006 4c6a moveal 64c6a <_Thread_Executing>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 49544: 24a8 0024 movel %a0@(36),%a2@ 49548: 6c06 bges 49550 <_POSIX_Message_queue_Receive_support+0xc4> 4954a: 2a12 movel %a2@,%d5 4954c: 4485 negl %d5 4954e: 2485 movel %d5,%a2@ _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 49550: 4fef 0018 lea %sp@(24),%sp 49554: 4aa8 0034 tstl %a0@(52) 49558: 6606 bnes 49560 <_POSIX_Message_queue_Receive_support+0xd4> return length_out; 4955a: 222e fff8 movel %fp@(-8),%d1 4955e: 602e bras 4958e <_POSIX_Message_queue_Receive_support+0x102> rtems_set_errno_and_return_minus_one( 49560: 4eb9 0005 2858 jsr 52858 <__errno> 49566: 2079 0006 4c6a moveal 64c6a <_Thread_Executing>,%a0 4956c: 2440 moveal %d0,%a2 4956e: 2f28 0034 movel %a0@(52),%sp@- 49572: 4eb9 0004 97b8 jsr 497b8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 49578: 588f addql #4,%sp 4957a: 72ff moveq #-1,%d1 4957c: 2480 movel %d0,%a2@ 4957e: 600e bras 4958e <_POSIX_Message_queue_Receive_support+0x102> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 49580: 4eb9 0005 2858 jsr 52858 <__errno> 49586: 72ff moveq #-1,%d1 49588: 2040 moveal %d0,%a0 4958a: 7009 moveq #9,%d0 4958c: 2080 movel %d0,%a0@ } 4958e: 2001 movel %d1,%d0 49590: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 49596: 4e5e unlk %fp 49598: 4e75 rts ... 000495c0 <_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 ) 495c0: 7020 moveq #32,%d0 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 495c2: 4e56 ffe8 linkw %fp,#-24 495c6: 48d7 043c moveml %d2-%d5/%a2,%sp@ 495ca: 242e 0008 movel %fp@(8),%d2 495ce: 262e 0014 movel %fp@(20),%d3 495d2: 282e 0018 movel %fp@(24),%d4 /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 495d6: b083 cmpl %d3,%d0 495d8: 6412 bccs 495ec <_POSIX_Message_queue_Send_support+0x2c> rtems_set_errno_and_return_minus_one( EINVAL ); 495da: 4eb9 0005 2858 jsr 52858 <__errno> 495e0: 7416 moveq #22,%d2 495e2: 72ff moveq #-1,%d1 495e4: 2040 moveal %d0,%a0 495e6: 2082 movel %d2,%a0@ 495e8: 6000 00bc braw 496a6 <_POSIX_Message_queue_Send_support+0xe6> 495ec: 486e fffc pea %fp@(-4) 495f0: 2f02 movel %d2,%sp@- 495f2: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 495f8: 4eb9 0004 c188 jsr 4c188 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 495fe: 4fef 000c lea %sp@(12),%sp 49602: 4aae fffc tstl %fp@(-4) 49606: 6600 0090 bnew 49698 <_POSIX_Message_queue_Send_support+0xd8> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4960a: 2240 moveal %d0,%a1 4960c: 7a03 moveq #3,%d5 4960e: 2229 0014 movel %a1@(20),%d1 49612: ca81 andl %d1,%d5 49614: 6608 bnes 4961e <_POSIX_Message_queue_Send_support+0x5e> _Thread_Enable_dispatch(); 49616: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> 4961c: 607a bras 49698 <_POSIX_Message_queue_Send_support+0xd8> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4961e: 2240 moveal %d0,%a1 49620: 2069 0010 moveal %a1@(16),%a0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 49624: 4a04 tstb %d4 49626: 6604 bnes 4962c <_POSIX_Message_queue_Send_support+0x6c> 49628: 4200 clrb %d0 4962a: 600c bras 49638 <_POSIX_Message_queue_Send_support+0x78> do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 4962c: 2001 movel %d1,%d0 4962e: 780e moveq #14,%d4 49630: 7201 moveq #1,%d1 49632: e8a8 lsrl %d4,%d0 49634: b380 eorl %d1,%d0 49636: c081 andl %d1,%d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 49638: 2f2e 001c movel %fp@(28),%sp@- 4963c: 7801 moveq #1,%d4 4963e: 4483 negl %d3 49640: c880 andl %d0,%d4 49642: 2f04 movel %d4,%sp@- 49644: 2f03 movel %d3,%sp@- 49646: 42a7 clrl %sp@- 49648: 2f02 movel %d2,%sp@- 4964a: 2f2e 0010 movel %fp@(16),%sp@- 4964e: 2f2e 000c movel %fp@(12),%sp@- 49652: 4868 001a pea %a0@(26) 49656: 4eb9 0004 b40c jsr 4b40c <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4965c: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 49660: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 49662: 4eb9 0004 c9da jsr 4c9da <_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 ) 49668: 7007 moveq #7,%d0 4966a: b082 cmpl %d2,%d0 4966c: 660a bnes 49678 <_POSIX_Message_queue_Send_support+0xb8> msg_status = _Thread_Executing->Wait.return_code; 4966e: 2079 0006 4c6a moveal 64c6a <_Thread_Executing>,%a0 49674: 2428 0034 movel %a0@(52),%d2 if ( !msg_status ) 49678: 4a82 tstl %d2 4967a: 6604 bnes 49680 <_POSIX_Message_queue_Send_support+0xc0> 4967c: 4281 clrl %d1 4967e: 6026 bras 496a6 <_POSIX_Message_queue_Send_support+0xe6> return msg_status; rtems_set_errno_and_return_minus_one( 49680: 4eb9 0005 2858 jsr 52858 <__errno> 49686: 2440 moveal %d0,%a2 49688: 2f02 movel %d2,%sp@- 4968a: 4eb9 0004 97b8 jsr 497b8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 49690: 588f addql #4,%sp 49692: 72ff moveq #-1,%d1 49694: 2480 movel %d0,%a2@ 49696: 600e bras 496a6 <_POSIX_Message_queue_Send_support+0xe6> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 49698: 4eb9 0005 2858 jsr 52858 <__errno> 4969e: 72ff moveq #-1,%d1 496a0: 2040 moveal %d0,%a0 496a2: 7009 moveq #9,%d0 496a4: 2080 movel %d0,%a0@ } 496a6: 2001 movel %d1,%d0 496a8: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 496ae: 4e5e unlk %fp 496b0: 4e75 rts ... 000497b8 <_POSIX_Message_queue_Translate_core_message_queue_return_code>: int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { 497b8: 41f9 0006 1c98 lea 61c98 <_POSIX_Message_queue_Return_codes>,%a0 497be: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_message_queue_status > CORE_MESSAGE_QUEUE_STATUS_LAST ) return EINVAL; #endif return _POSIX_Message_queue_Return_codes[the_message_queue_status]; } 497c2: 202e 0008 movel %fp@(8),%d0 497c6: 4e5e unlk %fp 497c8: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 497cc: 4e75 rts ... 00046c38 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 46c38: 4e56 fff8 linkw %fp,#-8 46c3c: 2f02 movel %d2,%sp@- register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); 46c3e: 486e fff8 pea %fp@(-8) 46c42: 486e fffc pea %fp@(-4) 46c46: 2f2e 0008 movel %fp@(8),%sp@- int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 46c4a: 142e 000f moveb %fp@(15),%d2 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); 46c4e: 4eb9 0004 6a14 jsr 46a14 <_POSIX_Mutex_Get_interrupt_disable> switch ( location ) { 46c54: 4fef 000c lea %sp@(12),%sp 46c58: 4aae fffc tstl %fp@(-4) 46c5c: 6704 beqs 46c62 <_POSIX_Mutex_Lock_support+0x2a> 46c5e: 7016 moveq #22,%d0 46c60: 6034 bras 46c96 <_POSIX_Mutex_Lock_support+0x5e> case OBJECTS_LOCAL: _CORE_mutex_Seize( 46c62: 2f2e fff8 movel %fp@(-8),%sp@- 46c66: 2040 moveal %d0,%a0 46c68: 2f2e 0010 movel %fp@(16),%sp@- 46c6c: 0282 0000 00ff andil #255,%d2 46c72: 2f02 movel %d2,%sp@- 46c74: 2f28 0008 movel %a0@(8),%sp@- 46c78: 4868 0014 pea %a0@(20) 46c7c: 4eb9 0004 8698 jsr 48698 <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 46c82: 2079 0006 184e moveal 6184e <_Thread_Executing>,%a0 46c88: 2f28 0034 movel %a0@(52),%sp@- 46c8c: 4eb9 0004 6d60 jsr 46d60 <_POSIX_Mutex_Translate_core_mutex_return_code> 46c92: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return EINVAL; } 46c96: 242e fff4 movel %fp@(-12),%d2 46c9a: 4e5e unlk %fp 46c9c: 4e75 rts ... 00046d60 <_POSIX_Mutex_Translate_core_mutex_return_code>: int _POSIX_Mutex_Translate_core_mutex_return_code( CORE_mutex_Status the_mutex_status ) { 46d60: 41f9 0005 ed58 lea 5ed58 <_POSIX_Mutex_Return_codes>,%a0 46d66: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_mutex_status > CORE_MUTEX_STATUS_LAST ) return EINVAL; #endif return _POSIX_Mutex_Return_codes[the_mutex_status]; } 46d6a: 202e 0008 movel %fp@(8),%d0 46d6e: 4e5e unlk %fp 46d70: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 46d74: 4e75 rts ... 0004a88c <_POSIX_Priority_Is_valid>: #include bool _POSIX_Priority_Is_valid( int priority ) { 4a88c: 4e56 0000 linkw %fp,#0 4a890: 202e 0008 movel %fp@(8),%d0 return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) && 4a894: 6e04 bgts 4a89a <_POSIX_Priority_Is_valid+0xe> 4a896: 4280 clrl %d0 4a898: 6010 bras 4a8aa <_POSIX_Priority_Is_valid+0x1e> 4a89a: 4281 clrl %d1 4a89c: 1239 0005 c516 moveb 5c516 ,%d1 4a8a2: b081 cmpl %d1,%d0 4a8a4: 5dc0 slt %d0 4a8a6: 49c0 extbl %d0 4a8a8: 4480 negl %d0 (priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY)); } 4a8aa: 4e5e unlk %fp 4a8ac: 4e75 rts ... 0004962c <_POSIX_RWLock_Manager_initialization>: /** * @brief _POSIX_RWLock_Manager_initialization */ void _POSIX_RWLock_Manager_initialization(void) { 4962c: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 49630: 4878 00ff pea ff 49634: 4878 0001 pea 1 49638: 4878 005c pea 5c 4963c: 2f39 0005 bafa movel 5bafa ,%sp@- 49642: 4878 000b pea b 49646: 4878 0003 pea 3 4964a: 4879 0005 ce40 pea 5ce40 <_POSIX_RWLock_Information> 49650: 4eb9 0004 6548 jsr 46548 <_Objects_Initialize_information> 49656: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4965a: 4e5e unlk %fp 4965c: 4e75 rts ... 00045e4c <_POSIX_RWLock_Translate_core_RWLock_return_code>: int _POSIX_RWLock_Translate_core_RWLock_return_code( CORE_RWLock_Status the_rwlock_status ) { 45e4c: 41f9 0005 cd1a lea 5cd1a <_POSIX_RWLock_Return_codes>,%a0 45e52: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_rwlock_status > CORE_RWLOCK_STATUS_LAST ) return EINVAL; #endif return _POSIX_RWLock_Return_codes[the_rwlock_status]; } 45e56: 202e 0008 movel %fp@(8),%d0 45e5a: 4e5e unlk %fp 45e5c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 45e60: 4e75 rts ... 0004d448 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4d448: 4e56 0000 linkw %fp,#0 4d44c: 2f0a movel %a2,%sp@- 4d44e: 2f02 movel %d2,%sp@- 4d450: 242e 0008 movel %fp@(8),%d2 POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 4d454: 4aae 000c tstl %fp@(12) 4d458: 6712 beqs 4d46c <_POSIX_Semaphore_Create_support+0x24> rtems_set_errno_and_return_minus_one( ENOSYS ); 4d45a: 4eb9 0005 07a0 jsr 507a0 <__errno> 4d460: 72ff moveq #-1,%d1 4d462: 2040 moveal %d0,%a0 4d464: 7058 moveq #88,%d0 4d466: 2080 movel %d0,%a0@ 4d468: 6000 00c6 braw 4d530 <_POSIX_Semaphore_Create_support+0xe8> if ( name ) { 4d46c: 4a82 tstl %d2 4d46e: 6728 beqs 4d498 <_POSIX_Semaphore_Create_support+0x50> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 4d470: 4878 00ff pea ff 4d474: 2f02 movel %d2,%sp@- 4d476: 4eb9 0005 1cb0 jsr 51cb0 4d47c: 508f addql #8,%sp 4d47e: 0c80 0000 00fe cmpil #254,%d0 4d484: 6312 blss 4d498 <_POSIX_Semaphore_Create_support+0x50> rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4d486: 4eb9 0005 07a0 jsr 507a0 <__errno> 4d48c: 745b moveq #91,%d2 4d48e: 72ff moveq #-1,%d1 4d490: 2040 moveal %d0,%a0 4d492: 2082 movel %d2,%a0@ 4d494: 6000 009a braw 4d530 <_POSIX_Semaphore_Create_support+0xe8> 4d498: 2039 0006 1a90 movel 61a90 <_Thread_Dispatch_disable_level>,%d0 4d49e: 5280 addql #1,%d0 4d4a0: 23c0 0006 1a90 movel %d0,61a90 <_Thread_Dispatch_disable_level> * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4d4a6: 4879 0006 1cea pea 61cea <_POSIX_Semaphore_Information> 4d4ac: 4eb9 0004 9654 jsr 49654 <_Objects_Allocate> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4d4b2: 588f addql #4,%sp 4d4b4: 2440 moveal %d0,%a2 4d4b6: 4a80 tstl %d0 4d4b8: 6616 bnes 4d4d0 <_POSIX_Semaphore_Create_support+0x88> _Thread_Enable_dispatch(); 4d4ba: 4eb9 0004 a2f2 jsr 4a2f2 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 4d4c0: 4eb9 0005 07a0 jsr 507a0 <__errno> 4d4c6: 72ff moveq #-1,%d1 4d4c8: 2040 moveal %d0,%a0 4d4ca: 701c moveq #28,%d0 4d4cc: 2080 movel %d0,%a0@ 4d4ce: 6060 bras 4d530 <_POSIX_Semaphore_Create_support+0xe8> } the_semaphore->process_shared = pshared; 4d4d0: 42aa 0010 clrl %a2@(16) if ( name ) { 4d4d4: 4a82 tstl %d2 4d4d6: 6708 beqs 4d4e0 <_POSIX_Semaphore_Create_support+0x98> the_semaphore->named = true; the_semaphore->open_count = 1; 4d4d8: 7001 moveq #1,%d0 4d4da: 2540 0016 movel %d0,%a2@(22) 4d4de: 6006 bras 4d4e6 <_POSIX_Semaphore_Create_support+0x9e> the_semaphore->linked = true; } else { the_semaphore->named = false; the_semaphore->open_count = 0; 4d4e0: 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; 4d4e4: 4200 clrb %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; 4d4e6: 42aa 005e clrl %a2@(94) if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 4d4ea: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 0; the_semaphore->linked = false; 4d4ee: 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; 4d4f2: 70ff moveq #-1,%d0 4d4f4: 2540 005a movel %d0,%a2@(90) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4d4f8: 2f2e 0010 movel %fp@(16),%sp@- 4d4fc: 486a 005a pea %a2@(90) 4d500: 486a 001a pea %a2@(26) 4d504: 4eb9 0004 9184 jsr 49184 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4d50a: 2079 0006 1d02 moveal 61d02 <_POSIX_Semaphore_Information+0x18>,%a0 4d510: 4280 clrl %d0 4d512: 302a 000a movew %a2@(10),%d0 4d516: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4d51a: 2542 000c movel %d2,%a2@(12) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4d51e: 206e 0014 moveal %fp@(20),%a0 4d522: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4d524: 4eb9 0004 a2f2 jsr 4a2f2 <_Thread_Enable_dispatch> return 0; 4d52a: 4fef 000c lea %sp@(12),%sp name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch(); 4d52e: 4281 clrl %d1 return 0; } 4d530: 242e fff8 movel %fp@(-8),%d2 4d534: 2001 movel %d1,%d0 4d536: 246e fffc moveal %fp@(-4),%a2 4d53a: 4e5e unlk %fp 4d53c: 4e75 rts ... 0004d540 <_POSIX_Semaphore_Delete>: */ void _POSIX_Semaphore_Delete( POSIX_Semaphore_Control *the_semaphore ) { 4d540: 4e56 0000 linkw %fp,#0 4d544: 2f0a movel %a2,%sp@- 4d546: 246e 0008 moveal %fp@(8),%a2 if ( !the_semaphore->linked && !the_semaphore->open_count ) { 4d54a: 4a2a 0015 tstb %a2@(21) 4d54e: 6636 bnes 4d586 <_POSIX_Semaphore_Delete+0x46> 4d550: 4aaa 0016 tstl %a2@(22) 4d554: 6630 bnes 4d586 <_POSIX_Semaphore_Delete+0x46> _Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 4d556: 2f0a movel %a2,%sp@- 4d558: 4879 0006 1cea pea 61cea <_POSIX_Semaphore_Information> 4d55e: 4eb9 0004 96d4 jsr 496d4 <_Objects_Close> _CORE_semaphore_Flush( 4d564: 4878 ffff pea ffffffff 4d568: 42a7 clrl %sp@- 4d56a: 486a 001a pea %a2@(26) 4d56e: 4eb9 0004 9178 jsr 49178 <_CORE_semaphore_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 4d574: 2f0a movel %a2,%sp@- 4d576: 4879 0006 1cea pea 61cea <_POSIX_Semaphore_Information> 4d57c: 4eb9 0004 9948 jsr 49948 <_Objects_Free> 4d582: 4fef 001c lea %sp@(28),%sp -1 ); _POSIX_Semaphore_Free( the_semaphore ); } } 4d586: 246e fffc moveal %fp@(-4),%a2 4d58a: 4e5e unlk %fp 4d58c: 4e75 rts ... 00049b20 <_POSIX_Semaphore_Manager_initialization>: * * Output parameters: NONE */ void _POSIX_Semaphore_Manager_initialization(void) { 49b20: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 49b24: 4878 00ff pea ff 49b28: 4878 0001 pea 1 49b2c: 4878 0066 pea 66 49b30: 2f39 0005 baf2 movel 5baf2 ,%sp@- 49b36: 4878 0007 pea 7 49b3a: 4878 0003 pea 3 49b3e: 4879 0005 ceee pea 5ceee <_POSIX_Semaphore_Information> 49b44: 4eb9 0004 6548 jsr 46548 <_Objects_Initialize_information> 49b4a: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 49b4e: 4e5e unlk %fp 49b50: 4e75 rts ... 0004f7b4 <_POSIX_Semaphore_Translate_core_semaphore_return_code>: int _POSIX_Semaphore_Translate_core_semaphore_return_code( CORE_semaphore_Status the_semaphore_status ) { 4f7b4: 41f9 0005 f610 lea 5f610 <_POSIX_Semaphore_Return_codes>,%a0 4f7ba: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_semaphore_status > CORE_SEMAPHORE_STATUS_LAST ) return EINVAL; #endif return _POSIX_Semaphore_Return_codes[the_semaphore_status]; } 4f7be: 202e 0008 movel %fp@(8),%d0 4f7c2: 4e5e unlk %fp 4f7c4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4f7c8: 4e75 rts ... 0004d604 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 4d604: 4e56 fffc linkw %fp,#-4 4d608: 206e 0008 moveal %fp@(8),%a0 4d60c: 2f0a movel %a2,%sp@- 4d60e: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 4d610: 486e fffc pea %fp@(-4) 4d614: 2f10 movel %a0@,%sp@- 4d616: 4879 0006 1cea pea 61cea <_POSIX_Semaphore_Information> 4d61c: 142e 000f moveb %fp@(15),%d2 4d620: 4eb9 0004 9aa0 jsr 49aa0 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4d626: 4fef 000c lea %sp@(12),%sp 4d62a: 4aae fffc tstl %fp@(-4) 4d62e: 6656 bnes 4d686 <_POSIX_Semaphore_Wait_support+0x82> case OBJECTS_LOCAL: _CORE_semaphore_Seize( 4d630: 2f2e 0010 movel %fp@(16),%sp@- 4d634: 2040 moveal %d0,%a0 4d636: 0282 0000 00ff andil #255,%d2 4d63c: 2f02 movel %d2,%sp@- 4d63e: 2f28 0008 movel %a0@(8),%sp@- 4d642: 4868 001a pea %a0@(26) 4d646: 4eb9 0004 dcc0 jsr 4dcc0 <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 4d64c: 4eb9 0004 a2f2 jsr 4a2f2 <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 4d652: 2079 0006 1b4a moveal 61b4a <_Thread_Executing>,%a0 4d658: 4fef 0010 lea %sp@(16),%sp 4d65c: 4aa8 0034 tstl %a0@(52) 4d660: 6604 bnes 4d666 <_POSIX_Semaphore_Wait_support+0x62> 4d662: 4281 clrl %d1 4d664: 602e bras 4d694 <_POSIX_Semaphore_Wait_support+0x90> return 0; rtems_set_errno_and_return_minus_one( 4d666: 4eb9 0005 07a0 jsr 507a0 <__errno> 4d66c: 2079 0006 1b4a moveal 61b4a <_Thread_Executing>,%a0 4d672: 2440 moveal %d0,%a2 4d674: 2f28 0034 movel %a0@(52),%sp@- 4d678: 4eb9 0004 f7b4 jsr 4f7b4 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 4d67e: 588f addql #4,%sp 4d680: 72ff moveq #-1,%d1 4d682: 2480 movel %d0,%a2@ 4d684: 600e bras 4d694 <_POSIX_Semaphore_Wait_support+0x90> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 4d686: 4eb9 0005 07a0 jsr 507a0 <__errno> 4d68c: 72ff moveq #-1,%d1 4d68e: 2040 moveal %d0,%a0 4d690: 7016 moveq #22,%d0 4d692: 2080 movel %d0,%a0@ } 4d694: 242e fff4 movel %fp@(-12),%d2 4d698: 2001 movel %d1,%d0 4d69a: 246e fff8 moveal %fp@(-8),%a2 4d69e: 4e5e unlk %fp 4d6a0: 4e75 rts ... 000497e4 <_POSIX_Spinlock_Manager_initialization>: /** * @brief _POSIX_Spinlock_Manager_initialization */ void _POSIX_Spinlock_Manager_initialization(void) { 497e4: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 497e8: 4878 00ff pea ff 497ec: 4878 0001 pea 1 497f0: 4878 0020 pea 20 497f4: 2f39 0005 bafe movel 5bafe ,%sp@- 497fa: 4878 000b pea b 497fe: 4878 0003 pea 3 49802: 4879 0005 ceb4 pea 5ceb4 <_POSIX_Spinlock_Information> 49808: 4eb9 0004 6548 jsr 46548 <_Objects_Initialize_information> 4980e: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 49812: 4e5e unlk %fp 49814: 4e75 rts ... 00045178 <_POSIX_Spinlock_Translate_core_spinlock_return_code>: int _POSIX_Spinlock_Translate_core_spinlock_return_code( CORE_spinlock_Status the_spinlock_status ) { 45178: 41f9 0005 b356 lea 5b356 <_POSIX_Spinlock_Return_codes>,%a0 4517e: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_spinlock_status > CORE_SPINLOCK_STATUS_LAST ) return EINVAL; #endif return _POSIX_Spinlock_Return_codes[the_spinlock_status]; } 45182: 202e 0008 movel %fp@(8),%d0 45186: 4e5e unlk %fp 45188: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4518c: 4e75 rts ... 0004a8b0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4a8b0: 4e56 ffec linkw %fp,#-20 4a8b4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a8b8: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4a8bc: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4a8be: 242e 0008 movel %fp@(8),%d2 4a8c2: 266e 0010 moveal %fp@(16),%a3 4a8c6: 286e 0014 moveal %fp@(20),%a4 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4a8ca: 4eb9 0004 a88c jsr 4a88c <_POSIX_Priority_Is_valid> 4a8d0: 588f addql #4,%sp 4a8d2: 4a00 tstb %d0 4a8d4: 677c beqs 4a952 <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4a8d6: 4293 clrl %a3@ *budget_callout = NULL; 4a8d8: 4294 clrl %a4@ if ( policy == SCHED_OTHER ) { 4a8da: 4a82 tstl %d2 4a8dc: 6608 bnes 4a8e6 <_POSIX_Thread_Translate_sched_param+0x36> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4a8de: 7201 moveq #1,%d1 4a8e0: 4280 clrl %d0 4a8e2: 2681 movel %d1,%a3@ return 0; 4a8e4: 606e bras 4a954 <_POSIX_Thread_Translate_sched_param+0xa4> } if ( policy == SCHED_FIFO ) { 4a8e6: 7001 moveq #1,%d0 4a8e8: b082 cmpl %d2,%d0 4a8ea: 6604 bnes 4a8f0 <_POSIX_Thread_Translate_sched_param+0x40> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4a8ec: 4293 clrl %a3@ 4a8ee: 6008 bras 4a8f8 <_POSIX_Thread_Translate_sched_param+0x48> return 0; } if ( policy == SCHED_RR ) { 4a8f0: 7002 moveq #2,%d0 4a8f2: b082 cmpl %d2,%d0 4a8f4: 6606 bnes 4a8fc <_POSIX_Thread_Translate_sched_param+0x4c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4a8f6: 2680 movel %d0,%a3@ 4a8f8: 4200 clrb %d0 return 0; 4a8fa: 6058 bras 4a954 <_POSIX_Thread_Translate_sched_param+0xa4> } if ( policy == SCHED_SPORADIC ) { 4a8fc: 7004 moveq #4,%d0 4a8fe: b082 cmpl %d2,%d0 4a900: 6650 bnes 4a952 <_POSIX_Thread_Translate_sched_param+0xa2> if ( (param->sched_ss_repl_period.tv_sec == 0) && 4a902: 4aaa 0008 tstl %a2@(8) 4a906: 6606 bnes 4a90e <_POSIX_Thread_Translate_sched_param+0x5e> (param->sched_ss_repl_period.tv_nsec == 0) ) 4a908: 4aaa 000c tstl %a2@(12) 4a90c: 6744 beqs 4a952 <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 4a90e: 4aaa 0010 tstl %a2@(16) 4a912: 6606 bnes 4a91a <_POSIX_Thread_Translate_sched_param+0x6a> (param->sched_ss_init_budget.tv_nsec == 0) ) 4a914: 4aaa 0014 tstl %a2@(20) 4a918: 6738 beqs 4a952 <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4a91a: 486a 0008 pea %a2@(8) 4a91e: 4bf9 0004 88d4 lea 488d4 <_Timespec_To_ticks>,%a5 4a924: 4e95 jsr %a5@ 4a926: 486a 0010 pea %a2@(16) 4a92a: 2400 movel %d0,%d2 4a92c: 4e95 jsr %a5@ 4a92e: 508f addql #8,%sp 4a930: b082 cmpl %d2,%d0 4a932: 621e bhis 4a952 <_POSIX_Thread_Translate_sched_param+0xa2> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 4a934: 2f2a 0004 movel %a2@(4),%sp@- 4a938: 4eb9 0004 a88c jsr 4a88c <_POSIX_Priority_Is_valid> 4a93e: 588f addql #4,%sp 4a940: 4a00 tstb %d0 4a942: 670e beqs 4a952 <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4a944: 7003 moveq #3,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4a946: 28bc 0004 5568 movel #284008,%a4@ return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4a94c: 2680 movel %d0,%a3@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4a94e: 4280 clrl %d0 return 0; 4a950: 6002 bras 4a954 <_POSIX_Thread_Translate_sched_param+0xa4> 4a952: 7016 moveq #22,%d0 } return EINVAL; } 4a954: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a95a: 4e5e unlk %fp 4a95c: 4e75 rts ... 0004b730 <_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; 4b730: 7001 moveq #1,%d0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4b732: 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 ]; 4b736: 206e 0008 moveal %fp@(8),%a0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4b73a: 48d7 3c04 moveml %d2/%a2-%a5,%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 ]; 4b73e: 2468 010e moveal %a0@(270),%a2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4b742: 243c 0000 0700 movel #1792,%d2 _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); (*handler->routine)( handler->arg ); _Workspace_Free( handler ); 4b748: 49f9 0004 7eac lea 47eac <_Workspace_Free>,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b74e: 47ea 00e4 lea %a2@(228),%a3 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4b752: 2540 00d4 movel %d0,%a2@(212) while ( !_Chain_Is_empty( handler_stack ) ) { 4b756: 6028 bras 4b780 <_POSIX_Threads_cancel_run+0x50> _ISR_Disable( level ); 4b758: 40c1 movew %sr,%d1 4b75a: 8081 orl %d1,%d0 4b75c: 46c0 movew %d0,%sr handler = (POSIX_Cancel_Handler_control *) 4b75e: 2a6b 0004 moveal %a3@(4),%a5 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4b762: 2055 moveal %a5@,%a0 previous = the_node->previous; 4b764: 226d 0004 moveal %a5@(4),%a1 next->previous = previous; previous->next = next; 4b768: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4b76a: 2149 0004 movel %a1,%a0@(4) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4b76e: 46c1 movew %d1,%sr (*handler->routine)( handler->arg ); 4b770: 2f2d 000c movel %a5@(12),%sp@- 4b774: 206d 0008 moveal %a5@(8),%a0 4b778: 4e90 jsr %a0@ _Workspace_Free( handler ); 4b77a: 2f0d movel %a5,%sp@- 4b77c: 4e94 jsr %a4@ 4b77e: 508f addql #8,%sp handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4b780: 2002 movel %d2,%d0 POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 4b782: b7ea 00e0 cmpal %a2@(224),%a3 4b786: 66d0 bnes 4b758 <_POSIX_Threads_cancel_run+0x28> (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4b788: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b78e: 4e5e unlk %fp 4b790: 4e75 rts ... 0004a3a0 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4a3a0: 4e56 0000 linkw %fp,#0 4a3a4: 2f0a movel %a2,%sp@- 4a3a6: 246e 0008 moveal %fp@(8),%a2 4a3aa: 2f02 movel %d2,%sp@- ISR_Level level; (void) _Watchdog_Remove( timer ); 4a3ac: 2f0a movel %a2,%sp@- 4a3ae: 4eb9 0004 84cc jsr 484cc <_Watchdog_Remove> _ISR_Disable( level ); 4a3b4: 203c 0000 0700 movel #1792,%d0 4a3ba: 40c2 movew %sr,%d2 4a3bc: 8082 orl %d2,%d0 4a3be: 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 ( timer->state != WATCHDOG_INACTIVE ) { 4a3c0: 588f addql #4,%sp 4a3c2: 4aaa 0008 tstl %a2@(8) 4a3c6: 6706 beqs 4a3ce <_POSIX_Timer_Insert_helper+0x2e> _ISR_Enable( level ); 4a3c8: 46c2 movew %d2,%sr 4a3ca: 4200 clrb %d0 return false; 4a3cc: 6030 bras 4a3fe <_POSIX_Timer_Insert_helper+0x5e> 4a3ce: 2f0a movel %a2,%sp@- 4a3d0: 4879 0005 d8cc pea 5d8cc <_Watchdog_Ticks_chain> void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4a3d6: 256e 0010 0020 movel %fp@(16),%a2@(32) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4a3dc: 256e 0014 001c movel %fp@(20),%a2@(28) the_watchdog->id = id; the_watchdog->user_data = user_data; 4a3e2: 256e 0018 0024 movel %fp@(24),%a2@(36) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4a3e8: 256e 000c 000c movel %fp@(12),%a2@(12) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4a3ee: 42aa 0008 clrl %a2@(8) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4a3f2: 4eb9 0004 83b0 jsr 483b0 <_Watchdog_Insert> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 4a3f8: 46c2 movew %d2,%sr return true; 4a3fa: 508f addql #8,%sp * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 4a3fc: 7001 moveq #1,%d0 return true; } 4a3fe: 242e fff8 movel %fp@(-8),%d2 4a402: 246e fffc moveal %fp@(-4),%a2 4a406: 4e5e unlk %fp 4a408: 4e75 rts ... 00049aec <_POSIX_Timer_Manager_initialization>: * Initialize the internal structure in which the data of all * the timers are stored */ void _POSIX_Timer_Manager_initialization(void) { 49aec: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 49af0: 4878 00ff pea ff 49af4: 4878 0001 pea 1 49af8: 4878 0072 pea 72 49afc: 2f39 0005 bae2 movel 5bae2 ,%sp@- 49b02: 4878 0009 pea 9 49b06: 4878 0003 pea 3 49b0a: 4879 0005 cf28 pea 5cf28 <_POSIX_Timer_Information> 49b10: 4eb9 0004 6548 jsr 46548 <_Objects_Initialize_information> 49b16: 4fef 001c lea %sp@(28),%sp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 49b1a: 4e5e unlk %fp 49b1c: 4e75 rts ... 00044e70 <_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) { 44e70: 4e56 0000 linkw %fp,#0 44e74: 2f0a movel %a2,%sp@- 44e76: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 44e7a: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 44e7e: 4aaa 0052 tstl %a2@(82) 44e82: 6606 bnes 44e8a <_POSIX_Timer_TSR+0x1a> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 44e84: 4aaa 0056 tstl %a2@(86) 44e88: 6732 beqs 44ebc <_POSIX_Timer_TSR+0x4c> activated = _POSIX_Timer_Insert_helper( 44e8a: 2f0a movel %a2,%sp@- 44e8c: 4879 0004 4e70 pea 44e70 <_POSIX_Timer_TSR> 44e92: 2f2a 0008 movel %a2@(8),%sp@- 44e96: 2f2a 0062 movel %a2@(98),%sp@- 44e9a: 486a 0010 pea %a2@(16) 44e9e: 4eb9 0004 a3a0 jsr 4a3a0 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 44ea4: 4fef 0014 lea %sp@(20),%sp 44ea8: 4a00 tstb %d0 44eaa: 672a beqs 44ed6 <_POSIX_Timer_TSR+0x66> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 44eac: 486a 006a pea %a2@(106) 44eb0: 4eb9 0004 6348 jsr 46348 <_TOD_Get> /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 44eb6: 588f addql #4,%sp /* 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; 44eb8: 7003 moveq #3,%d0 44eba: 6002 bras 44ebe <_POSIX_Timer_TSR+0x4e> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 44ebc: 7004 moveq #4,%d0 <== NOT EXECUTED 44ebe: 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 ) ) { 44ec2: 2f2a 0042 movel %a2@(66),%sp@- 44ec6: 2f2a 0038 movel %a2@(56),%sp@- 44eca: 4eb9 0004 9f80 jsr 49f80 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 44ed0: 508f addql #8,%sp 44ed2: 42aa 0066 clrl %a2@(102) } 44ed6: 246e fffc moveal %fp@(-4),%a2 44eda: 4e5e unlk %fp 44edc: 4e75 rts ... 0004c76c <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4c76c: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4c772: 4e56 0000 linkw %fp,#0 4c776: 222e 0008 movel %fp@(8),%d1 4c77a: 2f03 movel %d3,%sp@- 4c77c: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4c77e: 40c2 movew %sr,%d2 4c780: 8082 orl %d2,%d0 4c782: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4c784: 2601 movel %d1,%d3 4c786: 2001 movel %d1,%d0 4c788: 41f9 0005 d142 lea 5d142 <_POSIX_signals_Vectors>,%a0 4c78e: e58b lsll #2,%d3 4c790: e988 lsll #4,%d0 4c792: 9083 subl %d3,%d0 4c794: 7602 moveq #2,%d3 4c796: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4c79a: 6610 bnes 4c7ac <_POSIX_signals_Clear_process_signals+0x40> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4c79c: 2040 moveal %d0,%a0 4c79e: d1fc 0005 d33a addal #381754,%a0 4c7a4: 2008 movel %a0,%d0 4c7a6: 5880 addql #4,%d0 4c7a8: b090 cmpl %a0@,%d0 4c7aa: 661c bnes 4c7c8 <_POSIX_signals_Clear_process_signals+0x5c> clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4c7ac: 5381 subql #1,%d1 4c7ae: 7001 moveq #1,%d0 4c7b0: e3a8 lsll %d1,%d0 4c7b2: 4680 notl %d0 4c7b4: c0b9 0005 d336 andl 5d336 <_POSIX_signals_Pending>,%d0 4c7ba: 23c0 0005 d336 movel %d0,5d336 <_POSIX_signals_Pending> if ( !_POSIX_signals_Pending ) 4c7c0: 6606 bnes 4c7c8 <_POSIX_signals_Clear_process_signals+0x5c> _Thread_Do_post_task_switch_extension--; 4c7c2: 53b9 0005 cd36 subql #1,5cd36 <_Thread_Do_post_task_switch_extension> } _ISR_Enable( level ); 4c7c8: 46c2 movew %d2,%sr } 4c7ca: 241f movel %sp@+,%d2 4c7cc: 261f movel %sp@+,%d3 4c7ce: 4e5e unlk %fp 4c7d0: 4e75 rts ... 0004c7d4 <_POSIX_signals_Set_process_signals>: sigset_t mask ) { ISR_Level level; _ISR_Disable( level ); 4c7d4: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Set_process_signals( sigset_t mask ) { 4c7da: 4e56 0000 linkw %fp,#0 ISR_Level level; _ISR_Disable( level ); 4c7de: 40c1 movew %sr,%d1 4c7e0: 8081 orl %d1,%d0 4c7e2: 46c0 movew %d0,%sr if ( !_POSIX_signals_Pending ) 4c7e4: 2039 0005 d336 movel 5d336 <_POSIX_signals_Pending>,%d0 4c7ea: 6606 bnes 4c7f2 <_POSIX_signals_Set_process_signals+0x1e> _Thread_Do_post_task_switch_extension++; 4c7ec: 52b9 0005 cd36 addql #1,5cd36 <_Thread_Do_post_task_switch_extension> _POSIX_signals_Pending |= mask; 4c7f2: 80ae 0008 orl %fp@(8),%d0 4c7f6: 23c0 0005 d336 movel %d0,5d336 <_POSIX_signals_Pending> _ISR_Enable( level ); 4c7fc: 46c1 movew %d1,%sr } 4c7fe: 4e5e unlk %fp 4c800: 4e75 rts ... 00044e4c <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 44e4c: 4e56 0000 linkw %fp,#0 /* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM ); 44e50: 4eb9 0004 24e8 jsr 424e8 44e56: 4878 000e pea e 44e5a: 2f00 movel %d0,%sp@- 44e5c: 4eb9 0004 4b6c jsr 44b6c RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 44e62: 4879 0005 ec5a pea 5ec5a <_POSIX_signals_Ualarm_timer> 44e68: 4eb9 0004 8330 jsr 48330 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44e6e: 4fef 000c lea %sp@(12),%sp 44e72: 203c 0005 ec5a movel #388186,%d0 44e78: 2d40 000c movel %d0,%fp@(12) 44e7c: 203c 0005 e50c movel #386316,%d0 44e82: 2d40 0008 movel %d0,%fp@(8) /* * If the reset interval is non-zero, reschedule ourselves. */ _Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); } 44e86: 4e5e unlk %fp 44e88: 4ef9 0004 8214 jmp 48214 <_Watchdog_Insert> ... 0004a530 <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { 4a530: 4e56 fffc linkw %fp,#-4 void *p; _RTEMS_Lock_allocator(); 4a534: 2f39 0005 cd46 movel 5cd46 <_RTEMS_Allocator_Mutex>,%sp@- 4a53a: 4eb9 0004 583c jsr 4583c <_API_Mutex_Lock> p = _Heap_Allocate_aligned_with_boundary( 4a540: 2f2e 0014 movel %fp@(20),%sp@- 4a544: 2f2e 0010 movel %fp@(16),%sp@- 4a548: 2f2e 000c movel %fp@(12),%sp@- 4a54c: 2f2e 0008 movel %fp@(8),%sp@- 4a550: 4eb9 0004 a248 jsr 4a248 <_Heap_Allocate_aligned_with_boundary> heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); 4a556: 2f39 0005 cd46 movel 5cd46 <_RTEMS_Allocator_Mutex>,%sp@- 4a55c: 2d40 fffc movel %d0,%fp@(-4) 4a560: 4eb9 0004 589c jsr 4589c <_API_Mutex_Unlock> return p; } 4a566: 202e fffc movel %fp@(-4),%d0 4a56a: 4e5e unlk %fp 4a56c: 4e75 rts ... 0004a570 <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 4a570: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 4a574: 2f39 0005 cd46 movel 5cd46 <_RTEMS_Allocator_Mutex>,%sp@- 4a57a: 4eb9 0004 583c jsr 4583c <_API_Mutex_Lock> status = _Heap_Free( the_heap, start_address ); 4a580: 2f2e 000c movel %fp@(12),%sp@- 4a584: 2f2e 0008 movel %fp@(8),%sp@- 4a588: 4eb9 0004 a39c jsr 4a39c <_Heap_Free> _RTEMS_Unlock_allocator(); 4a58e: 2f39 0005 cd46 movel 5cd46 <_RTEMS_Allocator_Mutex>,%sp@- 4a594: 2d40 fffc movel %d0,%fp@(-4) 4a598: 4eb9 0004 589c jsr 4589c <_API_Mutex_Unlock> return status; } 4a59e: 202e fffc movel %fp@(-4),%d0 4a5a2: 4e5e unlk %fp 4a5a4: 4e75 rts ... 000596cc <_Protected_heap_Get_block_size>: bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { 596cc: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 596d0: 2f39 0005 cd46 movel 5cd46 <_RTEMS_Allocator_Mutex>,%sp@- 596d6: 4eb9 0004 583c jsr 4583c <_API_Mutex_Lock> status = _Heap_Size_of_alloc_area( the_heap, starting_address, size ); 596dc: 2f2e 0010 movel %fp@(16),%sp@- 596e0: 2f2e 000c movel %fp@(12),%sp@- 596e4: 2f2e 0008 movel %fp@(8),%sp@- 596e8: 4eb9 0005 982c jsr 5982c <_Heap_Size_of_alloc_area> _RTEMS_Unlock_allocator(); 596ee: 2f39 0005 cd46 movel 5cd46 <_RTEMS_Allocator_Mutex>,%sp@- 596f4: 2d40 fffc movel %d0,%fp@(-4) 596f8: 4eb9 0004 589c jsr 4589c <_API_Mutex_Unlock> return status; } 596fe: 202e fffc movel %fp@(-4),%d0 59702: 4e5e unlk %fp 59704: 4e75 rts ... 00063da8 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 63da8: 4e56 0000 linkw %fp,#0 63dac: 2f03 movel %d3,%sp@- 63dae: 262e 000c movel %fp@(12),%d3 63db2: 2f02 movel %d2,%sp@- 63db4: 242e 0008 movel %fp@(8),%d2 if ( !the_heap ) 63db8: 672e beqs 63de8 <_Protected_heap_Get_information+0x40> return false; if ( !the_info ) 63dba: 4a83 tstl %d3 63dbc: 672a beqs 63de8 <_Protected_heap_Get_information+0x40> return false; _RTEMS_Lock_allocator(); 63dbe: 2f39 0009 bd3a movel 9bd3a <_RTEMS_Allocator_Mutex>,%sp@- 63dc4: 4eb9 0004 99e4 jsr 499e4 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 63dca: 2f03 movel %d3,%sp@- 63dcc: 2f02 movel %d2,%sp@- 63dce: 4eb9 0007 1e44 jsr 71e44 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 63dd4: 2f39 0009 bd3a movel 9bd3a <_RTEMS_Allocator_Mutex>,%sp@- 63dda: 4eb9 0004 9a44 jsr 49a44 <_API_Mutex_Unlock> return true; 63de0: 4fef 0010 lea %sp@(16),%sp if ( !the_info ) return false; _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); 63de4: 7001 moveq #1,%d0 return true; 63de6: 6002 bras 63dea <_Protected_heap_Get_information+0x42> 63de8: 4200 clrb %d0 } 63dea: 242e fff8 movel %fp@(-8),%d2 63dee: 262e fffc movel %fp@(-4),%d3 63df2: 4e5e unlk %fp 63df4: 4e75 rts ... 000572f8 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 572f8: 4e56 ffe4 linkw %fp,#-28 572fc: 2039 0007 53e8 movel 753e8 <_Thread_Dispatch_disable_level>,%d0 57302: 5280 addql #1,%d0 57304: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 57308: 266e 0008 moveal %fp@(8),%a3 5730c: 23c0 0007 53e8 movel %d0,753e8 <_Thread_Dispatch_disable_level> * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 57312: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 57318: 240b movel %a3,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 5731a: 280b movel %a3,%d4 5731c: 0682 0000 0010 addil #16,%d2 57322: 0684 0000 0068 addil #104,%d4 57328: 4bf9 0005 2a14 lea 52a14 <_Heap_Allocate_aligned_with_boundary>,%a5 if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 5732e: 49f9 0005 7a04 lea 57a04 <_Thread_queue_Extract>,%a4 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 57334: 4eb9 0005 1fa8 jsr 51fa8 <_API_Mutex_Unlock> 5733a: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5733c: 263c 0005 7b08 movel #359176,%d3 57342: 2f02 movel %d2,%sp@- 57344: 2043 moveal %d3,%a0 57346: 4e90 jsr %a0@ if ( the_thread == NULL ) 57348: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5734a: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 5734c: 4a80 tstl %d0 5734e: 672c beqs 5737c <_Region_Process_queue+0x84> 57350: 42a7 clrl %sp@- 57352: 42a7 clrl %sp@- 57354: 2f2a 0024 movel %a2@(36),%sp@- 57358: 2f04 movel %d4,%sp@- 5735a: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 5735c: 4fef 0010 lea %sp@(16),%sp 57360: 4a80 tstl %d0 57362: 6718 beqs 5737c <_Region_Process_queue+0x84> break; *(void **)the_thread->Wait.return_argument = the_segment; 57364: 206a 0028 moveal %a2@(40),%a0 the_region->number_of_used_blocks += 1; 57368: 52ab 0064 addql #1,%a3@(100) ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 5736c: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 5736e: 2f0a movel %a2,%sp@- 57370: 2f02 movel %d2,%sp@- 57372: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 57374: 508f addql #8,%sp break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 57376: 42aa 0034 clrl %a2@(52) } 5737a: 60c6 bras 57342 <_Region_Process_queue+0x4a> _Thread_Enable_dispatch(); } 5737c: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 57382: 4e5e unlk %fp *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 57384: 4ef9 0005 4012 jmp 54012 <_Thread_Enable_dispatch> ... 0004a170 <_TOD_Get>: /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 4a170: 203c 0000 0700 movel #1792,%d0 */ void _TOD_Get( struct timespec *time ) { 4a176: 4e56 fff0 linkw %fp,#-16 4a17a: 2f02 movel %d2,%sp@- /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 4a17c: 40c2 movew %sr,%d2 4a17e: 8082 orl %d2,%d0 4a180: 46c0 movew %d0,%sr now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 4a182: 2079 0005 ce20 moveal 5ce20 <_Watchdog_Nanoseconds_since_tick_handler>,%a0 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 4a188: 2039 0005 cd26 movel 5cd26 <_TOD_Now>,%d0 4a18e: 2239 0005 cd2a movel 5cd2a <_TOD_Now+0x4>,%d1 4a194: 2d40 fff0 movel %d0,%fp@(-16) 4a198: 2d41 fff4 movel %d1,%fp@(-12) if ( _Watchdog_Nanoseconds_since_tick_handler ) 4a19c: 4a88 tstl %a0 4a19e: 6604 bnes 4a1a4 <_TOD_Get+0x34> 4a1a0: 4280 clrl %d0 4a1a2: 6002 bras 4a1a6 <_TOD_Get+0x36> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 4a1a4: 4e90 jsr %a0@ _ISR_Enable( level ); 4a1a6: 46c2 movew %d2,%sr _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); 4a1a8: 486e fff8 pea %fp@(-8) 4a1ac: 486e fff0 pea %fp@(-16) now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 4a1b0: 2d40 fffc movel %d0,%fp@(-4) 4a1b4: 42ae fff8 clrl %fp@(-8) _Timestamp_Add_to( &now, &offset ); 4a1b8: 4eb9 0004 7958 jsr 47958 <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 4a1be: 206e 0008 moveal %fp@(8),%a0 4a1c2: 508f addql #8,%sp 4a1c4: 202e fff0 movel %fp@(-16),%d0 4a1c8: 222e fff4 movel %fp@(-12),%d1 } 4a1cc: 242e ffec movel %fp@(-20),%d2 4a1d0: 4e5e unlk %fp nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); 4a1d2: 2080 movel %d0,%a0@ 4a1d4: 2141 0004 movel %d1,%a0@(4) } 4a1d8: 4e75 rts ... 0004a1dc <_TOD_Get_uptime>: /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 4a1dc: 203c 0000 0700 movel #1792,%d0 */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 4a1e2: 4e56 fff0 linkw %fp,#-16 4a1e6: 2f02 movel %d2,%sp@- /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 4a1e8: 40c2 movew %sr,%d2 4a1ea: 8082 orl %d2,%d0 4a1ec: 46c0 movew %d0,%sr up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 4a1ee: 2079 0005 ce20 moveal 5ce20 <_Watchdog_Nanoseconds_since_tick_handler>,%a0 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 4a1f4: 2039 0005 cd12 movel 5cd12 <_TOD_Uptime>,%d0 4a1fa: 2239 0005 cd16 movel 5cd16 <_TOD_Uptime+0x4>,%d1 4a200: 2d40 fff0 movel %d0,%fp@(-16) 4a204: 2d41 fff4 movel %d1,%fp@(-12) if ( _Watchdog_Nanoseconds_since_tick_handler ) 4a208: 4a88 tstl %a0 4a20a: 6604 bnes 4a210 <_TOD_Get_uptime+0x34> 4a20c: 4280 clrl %d0 4a20e: 6002 bras 4a212 <_TOD_Get_uptime+0x36> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 4a210: 4e90 jsr %a0@ _ISR_Enable( level ); 4a212: 46c2 movew %d2,%sr _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); 4a214: 486e fff8 pea %fp@(-8) 4a218: 486e fff0 pea %fp@(-16) up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 4a21c: 2d40 fffc movel %d0,%fp@(-4) 4a220: 42ae fff8 clrl %fp@(-8) _Timestamp_Add_to( &up, &offset ); 4a224: 4eb9 0004 7958 jsr 47958 <_Timespec_Add_to> *uptime = up; 4a22a: 206e 0008 moveal %fp@(8),%a0 4a22e: 508f addql #8,%sp 4a230: 202e fff0 movel %fp@(-16),%d0 4a234: 222e fff4 movel %fp@(-12),%d1 } 4a238: 242e ffec movel %fp@(-20),%d2 4a23c: 4e5e unlk %fp nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; 4a23e: 2080 movel %d0,%a0@ 4a240: 2141 0004 movel %d1,%a0@(4) } 4a244: 4e75 rts ... 00063834 <_TOD_Get_uptime_as_timespec>: */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { 63834: 4e56 fff8 linkw %fp,#-8 Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); 63838: 486e fff8 pea %fp@(-8) 6383c: 4eb9 0006 37c8 jsr 637c8 <_TOD_Get_uptime> _Timestamp_To_timespec( &uptime_ts, uptime ); 63842: 206e 0008 moveal %fp@(8),%a0 63846: 588f addql #4,%sp 63848: 202e fff8 movel %fp@(-8),%d0 6384c: 222e fffc movel %fp@(-4),%d1 } 63850: 4e5e unlk %fp { Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); _Timestamp_To_timespec( &uptime_ts, uptime ); 63852: 2080 movel %d0,%a0@ 63854: 2141 0004 movel %d1,%a0@(4) } 63858: 4e75 rts ... 00045c5c <_TOD_Handler_initialization>: * * Output parameters: NONE */ void _TOD_Handler_initialization(void) { 45c5c: 4e56 0000 linkw %fp,#0 /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 45c60: 4200 clrb %d0 _TOD_Activate(); } 45c62: 4e5e unlk %fp /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 45c64: 13c0 0005 cca8 moveb %d0,5cca8 <_TOD_Is_set> */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); 45c6a: 203c 21da e500 movel #567993600,%d0 45c70: 42b9 0005 cd2a clrl 5cd2a <_TOD_Now+0x4> 45c76: 23c0 0005 cd26 movel %d0,5cd26 <_TOD_Now> /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); 45c7c: 42b9 0005 cd12 clrl 5cd12 <_TOD_Uptime> 45c82: 42b9 0005 cd16 clrl 5cd16 <_TOD_Uptime+0x4> /* TOD has not been set */ _TOD_Is_set = false; _TOD_Activate(); } 45c88: 4e75 rts ... 00045844 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 45844: 43f9 0005 c3c2 lea 5c3c2 <_TOD_Days_to_date>,%a1 4584a: 4e56 fff0 linkw %fp,#-16 4584e: 206e 0008 moveal %fp@(8),%a0 45852: 48d7 041c moveml %d2-%d4/%a2,%sp@ uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; 45856: 2210 movel %a0@,%d1 45858: 7603 moveq #3,%d3 ) { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 4585a: 2028 0008 movel %a0@(8),%d0 4585e: 5380 subql #1,%d0 year_mod_4 = the_tod->year & 3; 45860: c681 andl %d1,%d3 if ( year_mod_4 == 0 ) 45862: 660c bnes 45870 <_TOD_To_seconds+0x2c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 45864: 2428 0004 movel %a0@(4),%d2 45868: 0682 0000 000d addil #13,%d2 4586e: 6004 bras 45874 <_TOD_To_seconds+0x30> else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45870: 2428 0004 movel %a0@(4),%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45874: 45f9 0005 c3f6 lea 5c3f6 <_TOD_Days_since_last_leap_year>,%a2 4587a: 283c 0000 05b5 movel #1461,%d4 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45880: 3431 2a00 movew %a1@(00000000,%d2:l:2),%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45884: 3632 3a00 movew %a2@(00000000,%d3:l:2),%d3 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45888: 0282 0000 ffff andil #65535,%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 4588e: 0283 0000 ffff andil #65535,%d3 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45894: 2242 moveal %d2,%a1 45896: d3c0 addal %d0,%a1 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45898: 2001 movel %d1,%d0 4589a: 0680 ffff f83c addil #-1988,%d0 458a0: e488 lsrl #2,%d0 458a2: 4c04 0800 mulsl %d4,%d0 time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 458a6: 2428 000c movel %a0@(12),%d2 458aa: 2202 movel %d2,%d1 if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 458ac: d083 addl %d3,%d0 ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; 458ae: 263c 0001 5180 movel #86400,%d3 time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 458b4: d089 addl %a1,%d0 time *= TOD_SECONDS_PER_DAY; 458b6: 4c03 0800 mulsl %d3,%d0 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 458ba: e58a lsll #2,%d2 458bc: ed89 lsll #6,%d1 458be: 9282 subl %d2,%d1 458c0: d2a8 0010 addl %a0@(16),%d1 458c4: 2401 movel %d1,%d2 458c6: e589 lsll #2,%d1 458c8: ed8a lsll #6,%d2 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 458ca: 2068 0014 moveal %a0@(20),%a0 * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 458ce: 9481 subl %d1,%d2 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 458d0: d1fc 21da e500 addal #567993600,%a0 * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 458d6: d488 addl %a0,%d2 time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 458d8: d082 addl %d2,%d0 458da: 4cd7 041c moveml %sp@,%d2-%d4/%a2 458de: 4e5e unlk %fp 458e0: 4e75 rts ... 000458e4 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 458e4: 4e56 0000 linkw %fp,#0 458e8: 206e 0008 moveal %fp@(8),%a0 458ec: 2f03 movel %d3,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 458ee: 2039 0005 d630 movel 5d630 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 458f4: 2f02 movel %d2,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 458f6: 4a88 tstl %a0 458f8: 6762 beqs 4595c <_TOD_Validate+0x78> (the_tod->ticks >= ticks_per_second) || 458fa: 243c 000f 4240 movel #1000000,%d2 45900: 4c40 2002 remul %d0,%d2,%d2 45904: b4a8 0018 cmpl %a0@(24),%d2 45908: 6352 blss 4595c <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 4590a: 763b moveq #59,%d3 4590c: b6a8 0014 cmpl %a0@(20),%d3 45910: 654a bcss 4595c <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 45912: b6a8 0010 cmpl %a0@(16),%d3 45916: 6544 bcss 4595c <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || 45918: 7017 moveq #23,%d0 4591a: b0a8 000c cmpl %a0@(12),%d0 4591e: 653c bcss 4595c <_TOD_Validate+0x78> (the_tod->month == 0) || 45920: 2028 0004 movel %a0@(4),%d0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 45924: 6736 beqs 4595c <_TOD_Validate+0x78> 45926: 720c moveq #12,%d1 45928: b280 cmpl %d0,%d1 4592a: 6530 bcss 4595c <_TOD_Validate+0x78> (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) || 4592c: 2410 movel %a0@,%d2 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 4592e: 0c82 0000 07c3 cmpil #1987,%d2 45934: 6326 blss 4595c <_TOD_Validate+0x78> (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) || (the_tod->day == 0) ) 45936: 2228 0008 movel %a0@(8),%d1 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 4593a: 6720 beqs 4595c <_TOD_Validate+0x78> (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 ) 4593c: 163c 0003 moveb #3,%d3 45940: 41f9 0005 c3fe lea 5c3fe <_TOD_Days_per_month>,%a0 45946: c483 andl %d3,%d2 45948: 6606 bnes 45950 <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 4594a: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 4594e: 6004 bras 45954 <_TOD_Validate+0x70> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 45950: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 45954: b081 cmpl %d1,%d0 45956: 54c0 scc %d0 45958: 4480 negl %d0 4595a: 6002 bras 4595e <_TOD_Validate+0x7a> 4595c: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 4595e: 241f movel %sp@+,%d2 45960: 261f movel %sp@+,%d3 45962: 4e5e unlk %fp 45964: 4e75 rts ... 000467e8 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 467e8: 4e56 fff0 linkw %fp,#-16 467ec: 48d7 041c moveml %d2-%d4/%a2,%sp@ 467f0: 246e 0008 moveal %fp@(8),%a2 /* * 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 ); 467f4: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 467f6: 262e 000c movel %fp@(12),%d3 */ /* * Save original state */ original_state = the_thread->current_state; 467fa: 242a 0010 movel %a2@(16),%d2 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 467fe: 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 ); 46802: 4eb9 0004 75e8 jsr 475e8 <_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 ) 46808: 588f addql #4,%sp 4680a: b6aa 0014 cmpl %a2@(20),%d3 4680e: 670c beqs 4681c <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 46810: 2f03 movel %d3,%sp@- 46812: 2f0a movel %a2,%sp@- 46814: 4eb9 0004 7490 jsr 47490 <_Thread_Set_priority> 4681a: 508f addql #8,%sp _ISR_Disable( level ); 4681c: 223c 0000 0700 movel #1792,%d1 46822: 40c0 movew %sr,%d0 46824: 8280 orl %d0,%d1 46826: 46c1 movew %d1,%sr 46828: 7604 moveq #4,%d3 /* * 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; 4682a: 222a 0010 movel %a2@(16),%d1 4682e: c483 andl %d3,%d2 if ( state != STATES_TRANSIENT ) { 46830: b681 cmpl %d1,%d3 46832: 6730 beqs 46864 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 46834: 4a82 tstl %d2 46836: 6608 bnes 46840 <_Thread_Change_priority+0x58> the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 46838: 74fb moveq #-5,%d2 4683a: c481 andl %d1,%d2 4683c: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 46840: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 46842: 0281 0003 bee0 andil #245472,%d1 46848: 6700 00d2 beqw 4691c <_Thread_Change_priority+0x134> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 4684c: 2d4a 000c movel %a2,%fp@(12) 46850: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 46856: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4685c: 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 ); 4685e: 4ef9 0004 73f4 jmp 473f4 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 46864: 4a82 tstl %d2 46866: 6650 bnes 468b8 <_Thread_Change_priority+0xd0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 46868: 226a 008e moveal %a2@(142),%a1 4686c: 322a 0094 movew %a2@(148),%d1 46870: 3411 movew %a1@,%d2 46872: 206a 008a moveal %a2@(138),%a0 46876: 8282 orl %d2,%d1 * 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 ); 46878: 42aa 0010 clrl %a2@(16) 4687c: 3281 movew %d1,%a1@ _Priority_Major_bit_map |= the_priority_map->ready_major; 4687e: 3239 0005 cd44 movew 5cd44 <_Priority_Major_bit_map>,%d1 46884: 342a 0092 movew %a2@(146),%d2 46888: 8282 orl %d2,%d1 4688a: 33c1 0005 cd44 movew %d1,5cd44 <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 46890: 4a04 tstb %d4 46892: 6710 beqs 468a4 <_Thread_Change_priority+0xbc> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 46894: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 46896: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 4689a: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 4689c: 234a 0004 movel %a2,%a1@(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; 468a0: 2489 movel %a1,%a2@ 468a2: 6014 bras 468b8 <_Thread_Change_priority+0xd0> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 468a4: 2608 movel %a0,%d3 468a6: 5883 addql #4,%d3 468a8: 2483 movel %d3,%a2@ old_last_node = the_chain->last; 468aa: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 468ae: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 468b2: 2549 0004 movel %a1,%a2@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 468b6: 228a movel %a2,%a1@ _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 468b8: 223c 0000 0700 movel #1792,%d1 468be: 46c0 movew %d0,%sr 468c0: 8280 orl %d0,%d1 468c2: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 468c4: 3239 0005 cd44 movew 5cd44 <_Priority_Major_bit_map>,%d1 468ca: 4841 swap %d1 468cc: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 468ce: 4282 clrl %d2 468d0: 41f9 0005 cdb4 lea 5cdb4 <_Priority_Bit_map>,%a0 468d6: 3401 movew %d1,%d2 468d8: 3230 2a00 movew %a0@(00000000,%d2:l:2),%d1 468dc: 4841 swap %d1 468de: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 468e0: 4283 clrl %d3 468e2: e98a lsll #4,%d2 468e4: 3601 movew %d1,%d3 468e6: 2279 0005 cc40 moveal 5cc40 <_Thread_Ready_chain>,%a1 468ec: 2202 movel %d2,%d1 468ee: d283 addl %d3,%d1 468f0: 2401 movel %d1,%d2 468f2: e58a lsll #2,%d2 468f4: e989 lsll #4,%d1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 468f6: 2079 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 468fc: 93c2 subal %d2,%a1 468fe: 2231 1800 movel %a1@(00000000,%d1:l),%d1 46902: 23c1 0005 cd22 movel %d1,5cd22 <_Thread_Heir> * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 46908: b288 cmpl %a0,%d1 4690a: 670e beqs 4691a <_Thread_Change_priority+0x132> _Thread_Executing->is_preemptible ) 4690c: 4a28 0075 tstb %a0@(117) 46910: 6708 beqs 4691a <_Thread_Change_priority+0x132> _Context_Switch_necessary = true; 46912: 7201 moveq #1,%d1 46914: 13c1 0005 cd5e moveb %d1,5cd5e <_Context_Switch_necessary> _ISR_Enable( level ); 4691a: 46c0 movew %d0,%sr } 4691c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 46922: 4e5e unlk %fp 46924: 4e75 rts ... 00046928 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 46928: 4e56 ffec linkw %fp,#-20 4692c: 206e 0008 moveal %fp@(8),%a0 46930: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 46934: 263c 0000 0700 movel #1792,%d3 4693a: 2203 movel %d3,%d1 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 4693c: 202e 000c movel %fp@(12),%d0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 46940: 40c2 movew %sr,%d2 46942: 8282 orl %d2,%d1 46944: 46c1 movew %d1,%sr current_state = the_thread->current_state; 46946: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 4694a: 2800 movel %d0,%d4 4694c: c881 andl %d1,%d4 4694e: 6778 beqs 469c8 <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 46950: 4680 notl %d0 46952: c081 andl %d1,%d0 current_state = 46954: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 46958: 666e bnes 469c8 <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4695a: 2668 008e moveal %a0@(142),%a3 4695e: 3028 0094 movew %a0@(148),%d0 46962: 3213 movew %a3@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 46964: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 46968: 2809 movel %a1,%d4 4696a: 5884 addql #4,%d4 4696c: 8081 orl %d1,%d0 4696e: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 46970: 2469 0008 moveal %a1@(8),%a2 46974: 3680 movew %d0,%a3@ the_chain->last = the_node; 46976: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4697a: 3039 0005 cd44 movew 5cd44 <_Priority_Major_bit_map>,%d0 46980: 3228 0092 movew %a0@(146),%d1 old_last_node->next = the_node; the_node->previous = old_last_node; 46984: 214a 0004 movel %a2,%a0@(4) 46988: 8081 orl %d1,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4698a: 2488 movel %a0,%a2@ 4698c: 33c0 0005 cd44 movew %d0,5cd44 <_Priority_Major_bit_map> _ISR_Flash( level ); 46992: 2003 movel %d3,%d0 46994: 46c2 movew %d2,%sr 46996: 8082 orl %d2,%d0 46998: 46c0 movew %d0,%sr * 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 ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4699a: 2028 0014 movel %a0@(20),%d0 4699e: 2279 0005 cd22 moveal 5cd22 <_Thread_Heir>,%a1 469a4: b0a9 0014 cmpl %a1@(20),%d0 469a8: 641e bccs 469c8 <_Thread_Clear_state+0xa0> _Thread_Heir = the_thread; 469aa: 23c8 0005 cd22 movel %a0,5cd22 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 469b0: 2079 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a0 469b6: 4a28 0075 tstb %a0@(117) 469ba: 6604 bnes 469c0 <_Thread_Clear_state+0x98> 469bc: 4a80 tstl %d0 469be: 6608 bnes 469c8 <_Thread_Clear_state+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 469c0: 7001 moveq #1,%d0 469c2: 13c0 0005 cd5e moveb %d0,5cd5e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 469c8: 46c2 movew %d2,%sr } 469ca: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 469ce: 4e5e unlk %fp 469d0: 4e75 rts ... 00046aa4 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 46aa4: 4e56 0000 linkw %fp,#0 46aa8: 2f02 movel %d2,%sp@- * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 46aaa: 4879 0005 cde2 pea 5cde2 <_Thread_Internal_information> 46ab0: 4eb9 0004 609c jsr 4609c <_Objects_Allocate> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46ab6: 2239 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d1 46abc: 5281 addql #1,%d1 /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 46abe: 23c0 0005 ce24 movel %d0,5ce24 <_Thread_Idle> 46ac4: 23c1 0005 cc94 movel %d1,5cc94 <_Thread_Dispatch_disable_level> * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 46aca: 4282 clrl %d2 46acc: 1439 0005 b4e2 moveb 5b4e2 ,%d2 46ad2: 2f3c 4944 4c45 movel #1229212741,%sp@- 46ad8: 2239 0005 b4fc movel 5b4fc ,%d1 46ade: 42a7 clrl %sp@- 46ae0: 2039 0005 b4de movel 5b4de ,%d0 46ae6: 42a7 clrl %sp@- 46ae8: 42a7 clrl %sp@- 46aea: 4878 0001 pea 1 46aee: 2f02 movel %d2,%sp@- 46af0: 42a7 clrl %sp@- 46af2: b280 cmpl %d0,%d1 46af4: 6302 blss 46af8 <_Thread_Create_idle+0x54> 46af6: 2001 movel %d1,%d0 46af8: 2f00 movel %d0,%sp@- 46afa: 42a7 clrl %sp@- 46afc: 2f39 0005 ce24 movel 5ce24 <_Thread_Idle>,%sp@- 46b02: 4879 0005 cde2 pea 5cde2 <_Thread_Internal_information> 46b08: 4eb9 0004 6d94 jsr 46d94 <_Thread_Initialize> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 46b0e: 4fef 002c lea %sp@(44),%sp 46b12: 4297 clrl %sp@ */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 46b14: 2239 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d1 46b1a: 5381 subql #1,%d1 46b1c: 42a7 clrl %sp@- 46b1e: 2f39 0005 b4f8 movel 5b4f8 ,%sp@- /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 46b24: 2039 0005 ce24 movel 5ce24 <_Thread_Idle>,%d0 _Thread_Start( 46b2a: 42a7 clrl %sp@- 46b2c: 23c1 0005 cc94 movel %d1,5cc94 <_Thread_Dispatch_disable_level> 46b32: 2f00 movel %d0,%sp@- /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 46b34: 23c0 0005 cd4e movel %d0,5cd4e <_Thread_Executing> 46b3a: 23c0 0005 cd22 movel %d0,5cd22 <_Thread_Heir> _Thread_Executing = _Thread_Idle; _Thread_Start( 46b40: 4eb9 0004 7734 jsr 47734 <_Thread_Start> Configuration.idle_task, NULL, 0 ); } 46b46: 242e fffc movel %fp@(-4),%d2 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 46b4a: 4fef 0014 lea %sp@(20),%sp Configuration.idle_task, NULL, 0 ); } 46b4e: 4e5e unlk %fp 46b50: 4e75 rts ... 0004c028 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4c028: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4c02c: 2079 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4c032: 4aa8 0010 tstl %a0@(16) 4c036: 660e bnes 4c046 <_Thread_Evaluate_mode+0x1e> 4c038: b1f9 0005 cd22 cmpal 5cd22 <_Thread_Heir>,%a0 4c03e: 6710 beqs 4c050 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4c040: 4a28 0075 tstb %a0@(117) 4c044: 670a beqs 4c050 <_Thread_Evaluate_mode+0x28> _Context_Switch_necessary = true; 4c046: 7001 moveq #1,%d0 4c048: 13c0 0005 cd5e moveb %d0,5cd5e <_Context_Switch_necessary> return true; 4c04e: 6002 bras 4c052 <_Thread_Evaluate_mode+0x2a> 4c050: 4200 clrb %d0 } return false; } 4c052: 4e5e unlk %fp 4c054: 4e75 rts ... 0004a84c <_Thread_Ready>: */ void _Thread_Ready( Thread_Control *the_thread ) { 4a84c: 4e56 ffec linkw %fp,#-20 4a850: 206e 0008 moveal %fp@(8),%a0 4a854: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); 4a858: 243c 0000 0700 movel #1792,%d2 4a85e: 2002 movel %d2,%d0 4a860: 40c1 movew %sr,%d1 4a862: 8081 orl %d1,%d0 4a864: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4a866: 2668 008e moveal %a0@(142),%a3 4a86a: 3028 0094 movew %a0@(148),%d0 4a86e: 3613 movew %a3@,%d3 the_thread->current_state = STATES_READY; _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 4a870: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4a874: 2809 movel %a1,%d4 4a876: 5884 addql #4,%d4 4a878: 8083 orl %d3,%d0 4a87a: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4a87c: 2469 0008 moveal %a1@(8),%a2 4a880: 3680 movew %d0,%a3@ the_chain->last = the_node; 4a882: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4a886: 3039 0005 cd44 movew 5cd44 <_Priority_Major_bit_map>,%d0 4a88c: 3628 0092 movew %a0@(146),%d3 old_last_node->next = the_node; the_node->previous = old_last_node; 4a890: 214a 0004 movel %a2,%a0@(4) 4a894: 8083 orl %d3,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4a896: 2488 movel %a0,%a2@ 4a898: 33c0 0005 cd44 movew %d0,5cd44 <_Priority_Major_bit_map> ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); the_thread->current_state = STATES_READY; 4a89e: 42a8 0010 clrl %a0@(16) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); _ISR_Flash( level ); 4a8a2: 2002 movel %d2,%d0 4a8a4: 46c1 movew %d1,%sr 4a8a6: 8081 orl %d1,%d0 4a8a8: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 4a8aa: 3039 0005 cd44 movew 5cd44 <_Priority_Major_bit_map>,%d0 4a8b0: 4840 swap %d0 4a8b2: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4a8b4: 4282 clrl %d2 4a8b6: 41f9 0005 cdb4 lea 5cdb4 <_Priority_Bit_map>,%a0 4a8bc: 3400 movew %d0,%d2 4a8be: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 4a8c2: 4840 swap %d0 4a8c4: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4a8c6: 4283 clrl %d3 4a8c8: e98a lsll #4,%d2 4a8ca: 3600 movew %d0,%d3 4a8cc: 2279 0005 cc40 moveal 5cc40 <_Thread_Ready_chain>,%a1 4a8d2: 2002 movel %d2,%d0 4a8d4: d083 addl %d3,%d0 4a8d6: 2400 movel %d0,%d2 4a8d8: e58a lsll #2,%d2 4a8da: e988 lsll #4,%d0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 4a8dc: 2079 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4a8e2: 93c2 subal %d2,%a1 4a8e4: 2031 0800 movel %a1@(00000000,%d0:l),%d0 4a8e8: 23c0 0005 cd22 movel %d0,5cd22 <_Thread_Heir> _Thread_Calculate_heir(); heir = _Thread_Heir; if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible ) 4a8ee: b1c0 cmpal %d0,%a0 4a8f0: 670e beqs 4a900 <_Thread_Ready+0xb4> 4a8f2: 4a28 0075 tstb %a0@(117) 4a8f6: 6708 beqs 4a900 <_Thread_Ready+0xb4> _Context_Switch_necessary = true; 4a8f8: 7001 moveq #1,%d0 4a8fa: 13c0 0005 cd5e moveb %d0,5cd5e <_Context_Switch_necessary> _ISR_Enable( level ); 4a900: 46c1 movew %d1,%sr } 4a902: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4a906: 4e5e unlk %fp 4a908: 4e75 rts ... 00047c04 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 47c04: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 47c06: 4e56 0000 linkw %fp,#0 47c0a: 2f0a movel %a2,%sp@- 47c0c: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 47c10: c0aa 0010 andl %a2@(16),%d0 47c14: 4a00 tstb %d0 47c16: 6704 beqs 47c1c <_Thread_Restart+0x18> 47c18: 4200 clrb %d0 47c1a: 6064 bras 47c80 <_Thread_Restart+0x7c> _Thread_Set_transient( the_thread ); 47c1c: 2f0a movel %a2,%sp@- 47c1e: 4eb9 0004 7de0 jsr 47de0 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 47c24: 2f2e 0010 movel %fp@(16),%sp@- 47c28: 2f2e 000c movel %fp@(12),%sp@- 47c2c: 2f0a movel %a2,%sp@- 47c2e: 4eb9 0004 b144 jsr 4b144 <_Thread_Reset> _Thread_Load_environment( the_thread ); 47c34: 2f0a movel %a2,%sp@- 47c36: 4eb9 0004 ade0 jsr 4ade0 <_Thread_Load_environment> _Thread_Ready( the_thread ); 47c3c: 2f0a movel %a2,%sp@- 47c3e: 4eb9 0004 b084 jsr 4b084 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 47c44: 2f0a movel %a2,%sp@- 47c46: 4eb9 0004 83c8 jsr 483c8 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 47c4c: 4fef 001c lea %sp@(28),%sp 47c50: b5f9 0005 d826 cmpal 5d826 <_Thread_Executing>,%a2 47c56: 6626 bnes 47c7e <_Thread_Restart+0x7a> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 47c58: 4aaa 0102 tstl %a2@(258) 47c5c: 670c beqs 47c6a <_Thread_Restart+0x66> _Context_Restore_fp( &_Thread_Executing->fp_context ); 47c5e: 486a 0102 pea %a2@(258) 47c62: 4eb9 0004 88b8 jsr 488b8 <_CPU_Context_restore_fp> 47c68: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 47c6a: 2079 0005 d826 moveal 5d826 <_Thread_Executing>,%a0 47c70: 41e8 00ce lea %a0@(206),%a0 47c74: 2f08 movel %a0,%sp@- 47c76: 4eb9 0004 8776 jsr 48776 <_CPU_Context_Restart_self> 47c7c: 588f addql #4,%sp <== NOT EXECUTED 47c7e: 7001 moveq #1,%d0 return true; } return false; } 47c80: 246e fffc moveal %fp@(-4),%a2 47c84: 4e5e unlk %fp 47c86: 4e75 rts 0004abe4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4abe4: 4e56 ffec linkw %fp,#-20 4abe8: 206e 0008 moveal %fp@(8),%a0 4abec: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4abf0: 243c 0000 0700 movel #1792,%d2 4abf6: 2002 movel %d2,%d0 4abf8: 40c1 movew %sr,%d1 4abfa: 8081 orl %d1,%d0 4abfc: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4abfe: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4ac02: 0800 0001 btst #1,%d0 4ac06: 6778 beqs 4ac80 <_Thread_Resume+0x9c> 4ac08: 76fd moveq #-3,%d3 4ac0a: c083 andl %d3,%d0 current_state = 4ac0c: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4ac10: 666e bnes 4ac80 <_Thread_Resume+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4ac12: 2668 008e moveal %a0@(142),%a3 4ac16: 3028 0094 movew %a0@(148),%d0 4ac1a: 3613 movew %a3@,%d3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4ac1c: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4ac20: 2809 movel %a1,%d4 4ac22: 5884 addql #4,%d4 4ac24: 8083 orl %d3,%d0 4ac26: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4ac28: 2469 0008 moveal %a1@(8),%a2 4ac2c: 3680 movew %d0,%a3@ the_chain->last = the_node; 4ac2e: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4ac32: 3039 0006 1e6c movew 61e6c <_Priority_Major_bit_map>,%d0 4ac38: 3628 0092 movew %a0@(146),%d3 old_last_node->next = the_node; the_node->previous = old_last_node; 4ac3c: 214a 0004 movel %a2,%a0@(4) 4ac40: 8083 orl %d3,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4ac42: 2488 movel %a0,%a2@ 4ac44: 33c0 0006 1e6c movew %d0,61e6c <_Priority_Major_bit_map> _ISR_Flash( level ); 4ac4a: 2002 movel %d2,%d0 4ac4c: 46c1 movew %d1,%sr 4ac4e: 8081 orl %d1,%d0 4ac50: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4ac52: 2028 0014 movel %a0@(20),%d0 4ac56: 2279 0006 1e4a moveal 61e4a <_Thread_Heir>,%a1 4ac5c: b0a9 0014 cmpl %a1@(20),%d0 4ac60: 641e bccs 4ac80 <_Thread_Resume+0x9c> _Thread_Heir = the_thread; 4ac62: 23c8 0006 1e4a movel %a0,61e4a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4ac68: 2079 0006 1e76 moveal 61e76 <_Thread_Executing>,%a0 4ac6e: 4a28 0075 tstb %a0@(117) 4ac72: 6604 bnes 4ac78 <_Thread_Resume+0x94> 4ac74: 4a80 tstl %d0 4ac76: 6608 bnes 4ac80 <_Thread_Resume+0x9c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4ac78: 7001 moveq #1,%d0 4ac7a: 13c0 0006 1e86 moveb %d0,61e86 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4ac80: 46c1 movew %d1,%sr } 4ac82: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4ac86: 4e5e unlk %fp 4ac88: 4e75 rts ... 00047500 <_Thread_Set_state>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 47500: 223c 0000 0700 movel #1792,%d1 void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 47506: 4e56 fff4 linkw %fp,#-12 4750a: 206e 0008 moveal %fp@(8),%a0 4750e: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47512: 242e 000c movel %fp@(12),%d2 ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 47516: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4751a: 40c0 movew %sr,%d0 4751c: 8280 orl %d0,%d1 4751e: 46c1 movew %d1,%sr if ( !_States_Is_ready( the_thread->current_state ) ) { 47520: 2228 0010 movel %a0@(16),%d1 47524: 670c beqs 47532 <_Thread_Set_state+0x32> the_thread->current_state = 47526: 8481 orl %d1,%d2 47528: 2142 0010 movel %d2,%a0@(16) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 4752c: 46c0 movew %d0,%sr return; 4752e: 6000 00ae braw 475de <_Thread_Set_state+0xde> } the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { 47532: 2229 0008 movel %a1@(8),%d1 _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 47536: 2142 0010 movel %d2,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 4753a: b291 cmpl %a1@,%d1 4753c: 6632 bnes 47570 <_Thread_Set_state+0x70> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4753e: 2209 movel %a1,%d1 47540: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 47542: 2468 008e moveal %a0@(142),%a2 47546: 2281 movel %d1,%a1@ 47548: 3412 movew %a2@,%d2 4754a: 3228 0098 movew %a0@(152),%d1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4754e: 2349 0008 movel %a1,%a1@(8) 47552: c282 andl %d2,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47554: 42a9 0004 clrl %a1@(4) 47558: 3481 movew %d1,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 4755a: 6620 bnes 4757c <_Thread_Set_state+0x7c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 4755c: 3239 0005 cd44 movew 5cd44 <_Priority_Major_bit_map>,%d1 47562: 3428 0096 movew %a0@(150),%d2 47566: c282 andl %d2,%d1 47568: 33c1 0005 cd44 movew %d1,5cd44 <_Priority_Major_bit_map> 4756e: 600c bras 4757c <_Thread_Set_state+0x7c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47570: 2250 moveal %a0@,%a1 previous = the_node->previous; 47572: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 47576: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47578: 234a 0004 movel %a2,%a1@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 4757c: 223c 0000 0700 movel #1792,%d1 47582: 46c0 movew %d0,%sr 47584: 8280 orl %d0,%d1 47586: 46c1 movew %d1,%sr if ( _Thread_Is_heir( the_thread ) ) 47588: b1f9 0005 cd22 cmpal 5cd22 <_Thread_Heir>,%a0 4758e: 663c bnes 475cc <_Thread_Set_state+0xcc> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 47590: 3239 0005 cd44 movew 5cd44 <_Priority_Major_bit_map>,%d1 47596: 4841 swap %d1 47598: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4759a: 4282 clrl %d2 4759c: 43f9 0005 cdb4 lea 5cdb4 <_Priority_Bit_map>,%a1 475a2: 3401 movew %d1,%d2 475a4: 3231 2a00 movew %a1@(00000000,%d2:l:2),%d1 475a8: 4841 swap %d1 475aa: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 475ac: 4283 clrl %d3 475ae: e98a lsll #4,%d2 475b0: 3601 movew %d1,%d3 475b2: 2279 0005 cc40 moveal 5cc40 <_Thread_Ready_chain>,%a1 475b8: 2202 movel %d2,%d1 475ba: d283 addl %d3,%d1 475bc: 2401 movel %d1,%d2 475be: e58a lsll #2,%d2 475c0: e989 lsll #4,%d1 475c2: 93c2 subal %d2,%a1 475c4: d3c1 addal %d1,%a1 475c6: 23d1 0005 cd22 movel %a1@,5cd22 <_Thread_Heir> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 475cc: b1f9 0005 cd4e cmpal 5cd4e <_Thread_Executing>,%a0 475d2: 6608 bnes 475dc <_Thread_Set_state+0xdc> _Context_Switch_necessary = true; 475d4: 7201 moveq #1,%d1 475d6: 13c1 0005 cd5e moveb %d1,5cd5e <_Context_Switch_necessary> _ISR_Enable( level ); 475dc: 46c0 movew %d0,%sr } 475de: 4cd7 040c moveml %sp@,%d2-%d3/%a2 475e2: 4e5e unlk %fp 475e4: 4e75 rts ... 00047664 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 47664: 4e56 0000 linkw %fp,#0 47668: 2039 0005 b4de movel 5b4de ,%d0 4766e: 2f02 movel %d2,%sp@- 47670: 242e 000c movel %fp@(12),%d2 47674: b082 cmpl %d2,%d0 47676: 6302 blss 4767a <_Thread_Stack_Allocate+0x16> 47678: 2400 movel %d0,%d2 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 4767a: 2079 0005 b504 moveal 5b504 ,%a0 47680: 4a88 tstl %a0 47682: 6706 beqs 4768a <_Thread_Stack_Allocate+0x26> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 47684: 2f02 movel %d2,%sp@- 47686: 4e90 jsr %a0@ 47688: 6008 bras 47692 <_Thread_Stack_Allocate+0x2e> * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 4768a: 2f02 movel %d2,%sp@- 4768c: 4eb9 0004 7e90 jsr 47e90 <_Workspace_Allocate> } if ( !stack_addr ) 47692: 4a80 tstl %d0 47694: 56c1 sne %d1 the_stack_size = 0; the_thread->Start.stack = stack_addr; 47696: 206e 0008 moveal %fp@(8),%a0 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 4769a: 588f addql #4,%sp } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4769c: 2140 00ca movel %d0,%a0@(202) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 476a0: 1001 moveb %d1,%d0 476a2: 49c0 extbl %d0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 476a4: c082 andl %d2,%d0 476a6: 242e fffc movel %fp@(-4),%d2 476aa: 4e5e unlk %fp 476ac: 4e75 rts ... 00047784 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 47784: 223c 0000 0700 movel #1792,%d1 */ void _Thread_Suspend( Thread_Control *the_thread ) { 4778a: 4e56 fff4 linkw %fp,#-12 4778e: 206e 0008 moveal %fp@(8),%a0 47792: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 47796: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4779a: 40c0 movew %sr,%d0 4779c: 8280 orl %d0,%d1 4779e: 46c1 movew %d1,%sr #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 477a0: 2228 0010 movel %a0@(16),%d1 477a4: 670e beqs 477b4 <_Thread_Suspend+0x30> the_thread->current_state = 477a6: 7402 moveq #2,%d2 477a8: 8481 orl %d1,%d2 477aa: 2142 0010 movel %d2,%a0@(16) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 477ae: 46c0 movew %d0,%sr return; 477b0: 6000 00b0 braw 47862 <_Thread_Suspend+0xde> } the_thread->current_state = STATES_SUSPENDED; 477b4: 7202 moveq #2,%d1 if ( _Chain_Has_only_one_node( ready ) ) { 477b6: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 477ba: 2141 0010 movel %d1,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 477be: b491 cmpl %a1@,%d2 477c0: 6632 bnes 477f4 <_Thread_Suspend+0x70> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 477c2: 2209 movel %a1,%d1 477c4: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 477c6: 2468 008e moveal %a0@(142),%a2 477ca: 2281 movel %d1,%a1@ 477cc: 3412 movew %a2@,%d2 477ce: 3228 0098 movew %a0@(152),%d1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 477d2: 2349 0008 movel %a1,%a1@(8) 477d6: c282 andl %d2,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 477d8: 42a9 0004 clrl %a1@(4) 477dc: 3481 movew %d1,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 477de: 6620 bnes 47800 <_Thread_Suspend+0x7c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 477e0: 3239 0005 cd44 movew 5cd44 <_Priority_Major_bit_map>,%d1 477e6: 3428 0096 movew %a0@(150),%d2 477ea: c282 andl %d2,%d1 477ec: 33c1 0005 cd44 movew %d1,5cd44 <_Priority_Major_bit_map> 477f2: 600c bras 47800 <_Thread_Suspend+0x7c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 477f4: 2250 moveal %a0@,%a1 previous = the_node->previous; 477f6: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 477fa: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 477fc: 234a 0004 movel %a2,%a1@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 47800: 223c 0000 0700 movel #1792,%d1 47806: 46c0 movew %d0,%sr 47808: 8280 orl %d0,%d1 4780a: 46c1 movew %d1,%sr if ( _Thread_Is_heir( the_thread ) ) 4780c: b1f9 0005 cd22 cmpal 5cd22 <_Thread_Heir>,%a0 47812: 663c bnes 47850 <_Thread_Suspend+0xcc> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 47814: 3239 0005 cd44 movew 5cd44 <_Priority_Major_bit_map>,%d1 4781a: 4841 swap %d1 4781c: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4781e: 4282 clrl %d2 47820: 43f9 0005 cdb4 lea 5cdb4 <_Priority_Bit_map>,%a1 47826: 3401 movew %d1,%d2 47828: 3231 2a00 movew %a1@(00000000,%d2:l:2),%d1 4782c: 4841 swap %d1 4782e: 04c1 ff1 %d1 47830: 4283 clrl %d3 47832: e98a lsll #4,%d2 47834: 3601 movew %d1,%d3 47836: 2279 0005 cc40 moveal 5cc40 <_Thread_Ready_chain>,%a1 4783c: 2202 movel %d2,%d1 4783e: d283 addl %d3,%d1 47840: 2401 movel %d1,%d2 47842: e58a lsll #2,%d2 47844: e989 lsll #4,%d1 47846: 93c2 subal %d2,%a1 47848: d3c1 addal %d1,%a1 4784a: 23d1 0005 cd22 movel %a1@,5cd22 <_Thread_Heir> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 47850: b1f9 0005 cd4e cmpal 5cd4e <_Thread_Executing>,%a0 47856: 6608 bnes 47860 <_Thread_Suspend+0xdc> _Context_Switch_necessary = true; 47858: 7401 moveq #1,%d2 4785a: 13c2 0005 cd5e moveb %d2,5cd5e <_Context_Switch_necessary> _ISR_Enable( level ); 47860: 46c0 movew %d0,%sr } 47862: 4cd7 040c moveml %sp@,%d2-%d3/%a2 47866: 4e5e unlk %fp 47868: 4e75 rts ... 000478dc <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 478dc: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 478e0: 2079 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 478e6: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 478ea: 243c 0000 0700 movel #1792,%d2 478f0: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 478f2: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 478f6: 40c1 movew %sr,%d1 478f8: 8081 orl %d1,%d0 478fa: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 478fc: 2029 0008 movel %a1@(8),%d0 47900: b091 cmpl %a1@,%d0 47902: 6738 beqs 4793c <_Thread_Yield_processor+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47904: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47906: 2009 movel %a1,%d0 47908: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4790a: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4790e: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47910: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47914: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 47916: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4791a: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4791e: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 47922: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 47924: 2002 movel %d2,%d0 47926: 46c1 movew %d1,%sr 47928: 8081 orl %d1,%d0 4792a: 46c0 movew %d0,%sr if ( _Thread_Is_heir( executing ) ) 4792c: b1f9 0005 cd22 cmpal 5cd22 <_Thread_Heir>,%a0 47932: 6610 bnes 47944 <_Thread_Yield_processor+0x68> _Thread_Heir = (Thread_Control *) ready->first; 47934: 23d1 0005 cd22 movel %a1@,5cd22 <_Thread_Heir> 4793a: 6008 bras 47944 <_Thread_Yield_processor+0x68> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 4793c: b1f9 0005 cd22 cmpal 5cd22 <_Thread_Heir>,%a0 47942: 6708 beqs 4794c <_Thread_Yield_processor+0x70> _Context_Switch_necessary = true; 47944: 7001 moveq #1,%d0 47946: 13c0 0005 cd5e moveb %d0,5cd5e <_Context_Switch_necessary> _ISR_Enable( level ); 4794c: 46c1 movew %d1,%sr } 4794e: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 47952: 4e5e unlk %fp 47954: 4e75 rts ... 00046798 <_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 ) ) { 46798: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 4679a: 4e56 0000 linkw %fp,#0 4679e: 202e 0010 movel %fp@(16),%d0 467a2: 2f0a movel %a2,%sp@- 467a4: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 467a8: 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 ) ) { 467ac: b2aa 0050 cmpl %a2@(80),%d1 467b0: 6618 bnes 467ca <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 467b2: 123c 0003 moveb #3,%d1 467b6: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 467ba: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 467bc: 486a 0048 pea %a2@(72) 467c0: 4eb9 0004 7d64 jsr 47d64 <_Watchdog_Remove> 467c6: 588f addql #4,%sp 467c8: 6002 bras 467cc <_Thread_blocking_operation_Cancel+0x34> } else _ISR_Enable( level ); 467ca: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 467cc: 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 } 467d0: 246e fffc moveal %fp@(-4),%a2 467d4: 203c 1003 fff8 movel #268697592,%d0 467da: 2d40 000c movel %d0,%fp@(12) 467de: 4e5e unlk %fp 467e0: 4ef9 0004 6928 jmp 46928 <_Thread_Clear_state> ... 0004702c <_Thread_queue_Dequeue>: Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 4702c: 41f9 0004 7088 lea 47088 <_Thread_queue_Dequeue_priority>,%a0 47032: 7001 moveq #1,%d0 */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 47034: 4e56 fff4 linkw %fp,#-12 47038: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4703c: 246e 0008 moveal %fp@(8),%a2 Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 47040: b0aa 0034 cmpl %a2@(52),%d0 47044: 6706 beqs 4704c <_Thread_queue_Dequeue+0x20> 47046: 41f9 0004 a62c lea 4a62c <_Thread_queue_Dequeue_fifo>,%a0 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 4704c: 2f0a movel %a2,%sp@- 4704e: 4e90 jsr %a0@ _ISR_Disable( level ); 47050: 223c 0000 0700 movel #1792,%d1 47056: 40c2 movew %sr,%d2 47058: 8282 orl %d2,%d1 4705a: 46c1 movew %d1,%sr if ( !the_thread ) { 4705c: 588f addql #4,%sp 4705e: 4a80 tstl %d0 47060: 6618 bnes 4707a <_Thread_queue_Dequeue+0x4e> sync_state = the_thread_queue->sync_state; 47062: 222a 0030 movel %a2@(48),%d1 47066: 7601 moveq #1,%d3 47068: 5381 subql #1,%d1 4706a: b681 cmpl %d1,%d3 4706c: 650c bcss 4707a <_Thread_queue_Dequeue+0x4e> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4706e: 7203 moveq #3,%d1 the_thread = _Thread_Executing; 47070: 2039 0005 cd4e movel 5cd4e <_Thread_Executing>,%d0 _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 47076: 2541 0030 movel %d1,%a2@(48) the_thread = _Thread_Executing; } } _ISR_Enable( level ); 4707a: 46c2 movew %d2,%sr return the_thread; } 4707c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47082: 4e5e unlk %fp 47084: 4e75 rts ... 0004a62c <_Thread_queue_Dequeue_fifo>: ) { ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4a62c: 223c 0000 0700 movel #1792,%d1 */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 4a632: 4e56 fff4 linkw %fp,#-12 4a636: 206e 0008 moveal %fp@(8),%a0 4a63a: 48d7 1c00 moveml %a2-%a4,%sp@ ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4a63e: 40c0 movew %sr,%d0 4a640: 8280 orl %d0,%d1 4a642: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a644: 2248 moveal %a0,%a1 4a646: 2459 moveal %a1@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a648: b3ca cmpal %a2,%a1 4a64a: 674e beqs 4a69a <_Thread_queue_Dequeue_fifo+0x6e> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4a64c: 2252 moveal %a2@,%a1 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) 4a64e: 264a moveal %a2,%a3 4a650: 49f9 0004 6928 lea 46928 <_Thread_Clear_state>,%a4 _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4a656: 7202 moveq #2,%d1 the_chain->first = new_first; 4a658: 2089 movel %a1,%a0@ new_first->previous = _Chain_Head(the_chain); 4a65a: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; 4a65e: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4a662: b2aa 0050 cmpl %a2@(80),%d1 4a666: 6710 beqs 4a678 <_Thread_queue_Dequeue_fifo+0x4c> _ISR_Enable( level ); 4a668: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4a66a: 2f3c 1003 fff8 movel #268697592,%sp@- 4a670: 2f0a movel %a2,%sp@- 4a672: 4e94 jsr %a4@ 4a674: 508f addql #8,%sp 4a676: 6026 bras 4a69e <_Thread_queue_Dequeue_fifo+0x72> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4a678: 7203 moveq #3,%d1 4a67a: 2541 0050 movel %d1,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4a67e: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4a680: 486a 0048 pea %a2@(72) 4a684: 4eb9 0004 7d64 jsr 47d64 <_Watchdog_Remove> 4a68a: 2f3c 1003 fff8 movel #268697592,%sp@- 4a690: 2f0a movel %a2,%sp@- 4a692: 4e94 jsr %a4@ 4a694: 4fef 000c lea %sp@(12),%sp 4a698: 6004 bras 4a69e <_Thread_queue_Dequeue_fifo+0x72> #endif return the_thread; } _ISR_Enable( level ); 4a69a: 46c0 movew %d0,%sr 4a69c: 97cb subal %a3,%a3 return NULL; } 4a69e: 200b movel %a3,%d0 4a6a0: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4a6a6: 4e5e unlk %fp 4a6a8: 4e75 rts ... 00047088 <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 47088: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4708e: 4e56 ffec linkw %fp,#-20 47092: 226e 0008 moveal %fp@(8),%a1 47096: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4709a: 40c1 movew %sr,%d1 4709c: 8081 orl %d1,%d0 4709e: 46c0 movew %d0,%sr 470a0: 4280 clrl %d0 470a2: 2049 moveal %a1,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 470a4: 2408 movel %a0,%d2 470a6: 5882 addql #4,%d2 470a8: b490 cmpl %a0@,%d2 470aa: 6728 beqs 470d4 <_Thread_queue_Dequeue_priority+0x4c> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 470ac: 2400 movel %d0,%d2 470ae: e588 lsll #2,%d0 470b0: e98a lsll #4,%d2 470b2: 9480 subl %d0,%d2 470b4: 2471 2800 moveal %a1@(00000000,%d2:l),%a2 470b8: 200a movel %a2,%d0 470ba: 0680 0000 003c addil #60,%d0 _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; 470c0: 206a 0038 moveal %a2@(56),%a0 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 470c4: 2652 moveal %a2@,%a3 previous_node = the_thread->Object.Node.previous; 470c6: 226a 0004 moveal %a2@(4),%a1 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 470ca: 42aa 0044 clrl %a2@(68) 470ce: b088 cmpl %a0,%d0 470d0: 6614 bnes 470e6 <_Thread_queue_Dequeue_priority+0x5e> 470d2: 6046 bras 4711a <_Thread_queue_Dequeue_priority+0x92> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 470d4: 5280 addql #1,%d0 470d6: 41e8 000c lea %a0@(12),%a0 Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 470da: 7404 moveq #4,%d2 470dc: b480 cmpl %d0,%d2 470de: 66c4 bnes 470a4 <_Thread_queue_Dequeue_priority+0x1c> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 470e0: 46c1 movew %d1,%sr 470e2: 95ca subal %a2,%a2 return NULL; 470e4: 6078 bras 4715e <_Thread_queue_Dequeue_priority+0xd6> 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 ) ) { last_node = the_thread->Wait.Block2n.last; 470e6: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 470ea: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 470ec: 2748 0004 movel %a0,%a3@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 470f0: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 470f2: 2149 0004 movel %a1,%a0@(4) last_node = the_thread->Wait.Block2n.last; 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; 470f6: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 470f8: 226a 0040 moveal %a2@(64),%a1 470fc: b3ea 0038 cmpal %a2@(56),%a1 47100: 671e beqs 47120 <_Thread_queue_Dequeue_priority+0x98> /* > two threads on 2-n */ new_second_node->previous = 47102: 43e8 0038 lea %a0@(56),%a1 47106: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4710a: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4710e: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 47112: 41e8 003c lea %a0@(60),%a0 47116: 2888 movel %a0,%a4@ 47118: 6006 bras 47120 <_Thread_queue_Dequeue_priority+0x98> } } else { previous_node->next = next_node; next_node->previous = previous_node; 4711a: 2749 0004 movel %a1,%a3@(4) new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4711e: 228b movel %a3,%a1@ 47120: 47f9 0004 6928 lea 46928 <_Thread_Clear_state>,%a3 next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 47126: 7002 moveq #2,%d0 47128: b0aa 0050 cmpl %a2@(80),%d0 4712c: 6710 beqs 4713e <_Thread_queue_Dequeue_priority+0xb6> _ISR_Enable( level ); 4712e: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47130: 2f3c 1003 fff8 movel #268697592,%sp@- 47136: 2f0a movel %a2,%sp@- 47138: 4e93 jsr %a3@ 4713a: 508f addql #8,%sp 4713c: 6020 bras 4715e <_Thread_queue_Dequeue_priority+0xd6> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4713e: 7403 moveq #3,%d2 47140: 2542 0050 movel %d2,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 47144: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 47146: 486a 0048 pea %a2@(72) 4714a: 4eb9 0004 7d64 jsr 47d64 <_Watchdog_Remove> 47150: 2f3c 1003 fff8 movel #268697592,%sp@- 47156: 2f0a movel %a2,%sp@- 47158: 4e93 jsr %a3@ 4715a: 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 ); } 4715e: 200a movel %a2,%d0 47160: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 47166: 4e5e unlk %fp 47168: 4e75 rts ... 00047204 <_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 ) { 47204: 4e56 ffe4 linkw %fp,#-28 47208: 206e 000c moveal %fp@(12),%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4720c: 43e8 003c lea %a0@(60),%a1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 47210: 2028 0014 movel %a0@(20),%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47214: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ _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 ]; 47218: 2400 movel %d0,%d2 4721a: ec8a lsrl #6,%d2 4721c: 2202 movel %d2,%d1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4721e: 283c 0000 0700 movel #1792,%d4 _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 ]; 47224: e989 lsll #4,%d1 47226: 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 ) { 47228: 246e 0008 moveal %fp@(8),%a2 _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 ]; 4722c: 9282 subl %d2,%d1 4722e: 47f2 1800 lea %a2@(00000000,%d1:l),%a3 47232: 2149 0038 movel %a1,%a0@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47236: 43e8 0038 lea %a0@(56),%a1 block_state = the_thread_queue->state; 4723a: 2a2a 0038 movel %a2@(56),%d5 4723e: 2149 0040 movel %a1,%a0@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47242: 42a8 003c clrl %a0@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 47246: 0800 0005 btst #5,%d0 4724a: 6660 bnes 472ac <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4724c: 2c0b movel %a3,%d6 4724e: 5886 addql #4,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 47250: 2404 movel %d4,%d2 47252: 40c1 movew %sr,%d1 47254: 8481 orl %d1,%d2 47256: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->first; 47258: 2253 moveal %a3@,%a1 4725a: 76ff moveq #-1,%d3 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4725c: 601e bras 4727c <_Thread_queue_Enqueue_priority+0x78> search_priority = search_thread->current_priority; 4725e: 2629 0014 movel %a1@(20),%d3 if ( priority <= search_priority ) 47262: b680 cmpl %d0,%d3 47264: 641a bccs 47280 <_Thread_queue_Enqueue_priority+0x7c> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 47266: 2404 movel %d4,%d2 47268: 46c1 movew %d1,%sr 4726a: 8481 orl %d1,%d2 4726c: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4726e: 2405 movel %d5,%d2 47270: c4a9 0010 andl %a1@(16),%d2 47274: 6604 bnes 4727a <_Thread_queue_Enqueue_priority+0x76> _ISR_Enable( level ); 47276: 46c1 movew %d1,%sr <== NOT EXECUTED goto restart_forward_search; 47278: 60d6 bras 47250 <_Thread_queue_Enqueue_priority+0x4c><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 4727a: 2251 moveal %a1@,%a1 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4727c: bc89 cmpl %a1,%d6 4727e: 66de bnes 4725e <_Thread_queue_Enqueue_priority+0x5a> 47280: 2401 movel %d1,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 47282: 7801 moveq #1,%d4 47284: b8aa 0030 cmpl %a2@(48),%d4 47288: 6600 00a4 bnew 4732e <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4728c: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 47290: b680 cmpl %d0,%d3 47292: 677e beqs 47312 <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 47294: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 47298: 2089 movel %a1,%a0@ the_node->previous = previous_node; 4729a: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4729e: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 472a2: 2688 movel %a0,%a3@ search_node->previous = the_node; 472a4: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 472a8: 46c1 movew %d1,%sr 472aa: 6062 bras 4730e <_Thread_queue_Enqueue_priority+0x10a> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 472ac: 4283 clrl %d3 472ae: 1639 0005 b4e2 moveb 5b4e2 ,%d3 _ISR_Disable( level ); 472b4: 2404 movel %d4,%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; 472b6: 5283 addql #1,%d3 _ISR_Disable( level ); 472b8: 40c1 movew %sr,%d1 472ba: 8481 orl %d1,%d2 472bc: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->last; 472be: 226b 0008 moveal %a3@(8),%a1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 472c2: 6020 bras 472e4 <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 472c4: 2629 0014 movel %a1@(20),%d3 if ( priority >= search_priority ) 472c8: b680 cmpl %d0,%d3 472ca: 631c blss 472e8 <_Thread_queue_Enqueue_priority+0xe4> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 472cc: 2404 movel %d4,%d2 472ce: 46c1 movew %d1,%sr 472d0: 8481 orl %d1,%d2 472d2: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 472d4: 2405 movel %d5,%d2 472d6: c4a9 0010 andl %a1@(16),%d2 472da: 6604 bnes 472e0 <_Thread_queue_Enqueue_priority+0xdc> _ISR_Enable( level ); 472dc: 46c1 movew %d1,%sr goto restart_reverse_search; 472de: 60cc bras 472ac <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 472e0: 2269 0004 moveal %a1@(4),%a1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 472e4: b7c9 cmpal %a1,%a3 472e6: 66dc bnes 472c4 <_Thread_queue_Enqueue_priority+0xc0> 472e8: 2401 movel %d1,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 472ea: 7801 moveq #1,%d4 472ec: b8aa 0030 cmpl %a2@(48),%d4 472f0: 663c bnes 4732e <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 472f2: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 472f6: b680 cmpl %d0,%d3 472f8: 6718 beqs 47312 <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 472fa: 2651 moveal %a1@,%a3 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 472fc: 2149 0004 movel %a1,%a0@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 47300: 208b movel %a3,%a0@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47302: 214a 0044 movel %a2,%a0@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 47306: 2288 movel %a0,%a1@ next_node->previous = the_node; 47308: 2748 0004 movel %a0,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4730c: 46c1 movew %d1,%sr 4730e: 7001 moveq #1,%d0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 47310: 6026 bras 47338 <_Thread_queue_Enqueue_priority+0x134> 47312: 43e9 003c lea %a1@(60),%a1 equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 47316: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4731a: 2089 movel %a1,%a0@ the_node->previous = previous_node; 4731c: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47320: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 47324: 2688 movel %a0,%a3@ search_node->previous = the_node; 47326: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4732a: 46c2 movew %d2,%sr 4732c: 60e0 bras 4730e <_Thread_queue_Enqueue_priority+0x10a> * 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; 4732e: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 47332: 202a 0030 movel %a2@(48),%d0 * 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; 47336: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 47338: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4733c: 4e5e unlk %fp 4733e: 4e75 rts 0004c100 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4c100: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4c106: 4e56 0000 linkw %fp,#0 4c10a: 2f0a movel %a2,%sp@- 4c10c: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4c110: 40c0 movew %sr,%d0 4c112: 8280 orl %d0,%d1 4c114: 46c1 movew %d1,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4c116: 222a 0010 movel %a2@(16),%d1 4c11a: 0281 0003 bee0 andil #245472,%d1 4c120: 660a bnes 4c12c <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4c122: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c124: 246e fffc moveal %fp@(-4),%a2 4c128: 4e5e unlk %fp 4c12a: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4c12c: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c12e: 7202 moveq #2,%d1 previous = the_node->previous; 4c130: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4c134: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4c138: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4c13a: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c13e: b2aa 0050 cmpl %a2@(80),%d1 4c142: 6704 beqs 4c148 <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4c144: 46c0 movew %d0,%sr 4c146: 6014 bras 4c15c <_Thread_queue_Extract_fifo+0x5c> 4c148: 7203 moveq #3,%d1 4c14a: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4c14e: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4c150: 486a 0048 pea %a2@(72) 4c154: 4eb9 0004 7d64 jsr 47d64 <_Watchdog_Remove> 4c15a: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4c15c: 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 } 4c160: 246e fffc moveal %fp@(-4),%a2 4c164: 203c 1003 fff8 movel #268697592,%d0 4c16a: 2d40 000c movel %d0,%fp@(12) 4c16e: 4e5e unlk %fp 4c170: 4ef9 0004 6928 jmp 46928 <_Thread_Clear_state> ... 00047368 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 47368: 4e56 fff4 linkw %fp,#-12 4736c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47370: 262e 0008 movel %fp@(8),%d3 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 47374: 45f9 0004 702c lea 4702c <_Thread_queue_Dequeue>,%a2 #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 4737a: 242e 0010 movel %fp@(16),%d2 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 4737e: 6006 bras 47386 <_Thread_queue_Flush+0x1e> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 47380: 2040 moveal %d0,%a0 47382: 2142 0034 movel %d2,%a0@(52) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 47386: 2f03 movel %d3,%sp@- 47388: 4e92 jsr %a2@ 4738a: 588f addql #4,%sp 4738c: 4a80 tstl %d0 4738e: 66f0 bnes 47380 <_Thread_queue_Flush+0x18> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 47390: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47396: 4e5e unlk %fp 47398: 4e75 rts ... 0004a804 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4a804: 4e56 0000 linkw %fp,#0 4a808: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4a80c: 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 && 4a810: 2029 0030 movel %a1@(48),%d0 4a814: 671c beqs 4a832 <_Thread_queue_Process_timeout+0x2e> 4a816: b1f9 0005 cd4e cmpal 5cd4e <_Thread_Executing>,%a0 4a81c: 6614 bnes 4a832 <_Thread_queue_Process_timeout+0x2e> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4a81e: 7203 moveq #3,%d1 4a820: b280 cmpl %d0,%d1 4a822: 6722 beqs 4a846 <_Thread_queue_Process_timeout+0x42> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a824: 7002 moveq #2,%d0 */ 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; 4a826: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a82c: 2340 0030 movel %d0,%a1@(48) 4a830: 6014 bras 4a846 <_Thread_queue_Process_timeout+0x42> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a832: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4a838: 2f08 movel %a0,%sp@- 4a83a: 2f28 0044 movel %a0@(68),%sp@- 4a83e: 4eb9 0004 a700 jsr 4a700 <_Thread_queue_Extract> 4a844: 508f addql #8,%sp } } 4a846: 4e5e unlk %fp 4a848: 4e75 rts ... 00047458 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 47458: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4745c: 486e fffc pea %fp@(-4) 47460: 2f2e 0008 movel %fp@(8),%sp@- 47464: 4eb9 0004 6d08 jsr 46d08 <_Thread_Get> switch ( location ) { 4746a: 508f addql #8,%sp 4746c: 4aae fffc tstl %fp@(-4) 47470: 6618 bnes 4748a <_Thread_queue_Timeout+0x32> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 47472: 2f00 movel %d0,%sp@- 47474: 4eb9 0004 a804 jsr 4a804 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4747a: 588f addql #4,%sp 4747c: 2039 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d0 47482: 5380 subql #1,%d0 47484: 23c0 0005 cc94 movel %d0,5cc94 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 4748a: 4e5e unlk %fp 4748c: 4e75 rts ... 00049ca8 <_Timer_Manager_initialization>: * * Output parameters: NONE */ void _Timer_Manager_initialization(void) { 49ca8: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 49cac: 4878 0004 pea 4 49cb0: 42a7 clrl %sp@- 49cb2: 4878 003c pea 3c 49cb6: 2f39 0005 b4b6 movel 5b4b6 ,%sp@- 49cbc: 4878 0002 pea 2 49cc0: 4878 0002 pea 2 49cc4: 4879 0005 d684 pea 5d684 <_Timer_Information> 49cca: 4eb9 0004 6548 jsr 46548 <_Objects_Initialize_information> /* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL; 49cd0: 4fef 001c lea %sp@(28),%sp } 49cd4: 4e5e unlk %fp /* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL; 49cd6: 42b9 0005 d6be clrl 5d6be <_Timer_server> } 49cdc: 4e75 rts ... 00051644 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 51644: 4e56 ffb4 linkw %fp,#-76 51648: 200e movel %fp,%d0 5164a: 0680 ffff fff4 addil #-12,%d0 51650: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 51654: 246e 0008 moveal %fp@(8),%a2 51658: 240e movel %fp,%d2 5165a: 2a0e movel %fp,%d5 5165c: 260e movel %fp,%d3 5165e: 0682 ffff ffe8 addil #-24,%d2 51664: 5185 subql #8,%d5 51666: 0683 ffff ffec addil #-20,%d3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5166c: 41ea 0008 lea %a2@(8),%a0 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 51670: 4bea 0040 lea %a2@(64),%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51674: 2e0a movel %a2,%d7 /* * 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 ); 51676: 280a movel %a2,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51678: 0687 0000 0030 addil #48,%d7 /* * 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 ); 5167e: 0684 0000 0068 addil #104,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51684: 49f9 0005 51f4 lea 551f4 <_Watchdog_Adjust_to_chain>,%a4 ) { 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 ); 5168a: 47f9 0005 5284 lea 55284 <_Watchdog_Insert>,%a3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 51690: 2d48 ffe4 movel %a0,%fp@(-28) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 51694: 2d45 fff4 movel %d5,%fp@(-12) the_chain->permanent_null = NULL; 51698: 42ae fff8 clrl %fp@(-8) the_chain->last = _Chain_Head(the_chain); 5169c: 2d40 fffc movel %d0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 516a0: 2d43 ffe8 movel %d3,%fp@(-24) the_chain->permanent_null = NULL; 516a4: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 516a8: 2d42 fff0 movel %d2,%fp@(-16) 516ac: 2d4d ffe0 movel %a5,%fp@(-32) { /* * 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; 516b0: 41ee fff4 lea %fp@(-12),%a0 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 516b4: 3a7c 0700 moveaw #1792,%a5 { /* * 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; 516b8: 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; 516bc: 2039 0007 552c movel 7552c <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 516c2: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 516c6: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 516ca: 486e ffe8 pea %fp@(-24) 516ce: 9081 subl %d1,%d0 516d0: 2f00 movel %d0,%sp@- 516d2: 2f07 movel %d7,%sp@- 516d4: 4e94 jsr %a4@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 516d6: 2039 0007 547a movel 7547a <_TOD_Now>,%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 ) { 516dc: 4fef 000c lea %sp@(12),%sp Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 516e0: 222a 0074 movel %a2@(116),%d1 /* * 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 ) { 516e4: b280 cmpl %d0,%d1 516e6: 6414 bccs 516fc <_Timer_server_Body+0xb8> /* * 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 ); 516e8: 486e ffe8 pea %fp@(-24) 516ec: 2c00 movel %d0,%d6 516ee: 9c81 subl %d1,%d6 516f0: 2f06 movel %d6,%sp@- 516f2: 2d40 ffdc movel %d0,%fp@(-36) 516f6: 2f04 movel %d4,%sp@- 516f8: 4e94 jsr %a4@ 516fa: 6018 bras 51714 <_Timer_server_Body+0xd0> } else if ( snapshot < last_snapshot ) { 516fc: b280 cmpl %d0,%d1 516fe: 631c blss 5171c <_Timer_server_Body+0xd8> /* * 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 ); 51700: 9280 subl %d0,%d1 51702: 2f01 movel %d1,%sp@- 51704: 4878 0001 pea 1 51708: 2d40 ffdc movel %d0,%fp@(-36) 5170c: 2f04 movel %d4,%sp@- 5170e: 4eb9 0005 5174 jsr 55174 <_Watchdog_Adjust> 51714: 202e ffdc movel %fp@(-36),%d0 51718: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 5171c: 2540 0074 movel %d0,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 51720: 202a 0078 movel %a2@(120),%d0 51724: 2f00 movel %d0,%sp@- 51726: 4eb9 0005 2014 jsr 52014 <_Chain_Get> if ( timer == NULL ) { 5172c: 588f addql #4,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5172e: 2040 moveal %d0,%a0 if ( timer == NULL ) { 51730: 4a80 tstl %d0 51732: 6724 beqs 51758 <_Timer_server_Body+0x114> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51734: 2028 0038 movel %a0@(56),%d0 51738: 7201 moveq #1,%d1 5173a: b280 cmpl %d0,%d1 5173c: 6608 bnes 51746 <_Timer_server_Body+0x102> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 5173e: 4868 0010 pea %a0@(16) 51742: 2f07 movel %d7,%sp@- 51744: 600c bras 51752 <_Timer_server_Body+0x10e> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51746: 7c03 moveq #3,%d6 51748: bc80 cmpl %d0,%d6 5174a: 66d4 bnes 51720 <_Timer_server_Body+0xdc> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5174c: 4868 0010 pea %a0@(16) 51750: 2f04 movel %d4,%sp@- 51752: 4e93 jsr %a3@ 51754: 508f addql #8,%sp 51756: 60c8 bras 51720 <_Timer_server_Body+0xdc> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 51758: 200d movel %a5,%d0 5175a: 40c1 movew %sr,%d1 5175c: 8081 orl %d1,%d0 5175e: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 51760: baae fff4 cmpl %fp@(-12),%d5 51764: 6612 bnes 51778 <_Timer_server_Body+0x134> ts->insert_chain = NULL; 51766: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 5176a: 46c1 movew %d1,%sr /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 5176c: 3a7c 0700 moveaw #1792,%a5 _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 ) ) { 51770: b6ae ffe8 cmpl %fp@(-24),%d3 51774: 6608 bnes 5177e <_Timer_server_Body+0x13a> 51776: 6042 bras 517ba <_Timer_server_Body+0x176> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 51778: 46c1 movew %d1,%sr <== NOT EXECUTED 5177a: 6000 ff40 braw 516bc <_Timer_server_Body+0x78> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 5177e: 220d movel %a5,%d1 51780: 40c0 movew %sr,%d0 51782: 8280 orl %d0,%d1 51784: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 51786: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 5178a: b688 cmpl %a0,%d3 5178c: 6726 beqs 517b4 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 5178e: 2250 moveal %a0@,%a1 the_chain->first = new_first; 51790: 2d49 ffe8 movel %a1,%fp@(-24) new_first->previous = _Chain_Head(the_chain); 51794: 2342 0004 movel %d2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 51798: 4a88 tstl %a0 5179a: 6718 beqs 517b4 <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 5179c: 42a8 0008 clrl %a0@(8) _ISR_Enable( level ); 517a0: 46c0 movew %d0,%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 ); 517a2: 2f28 0024 movel %a0@(36),%sp@- 517a6: 2f28 0020 movel %a0@(32),%sp@- 517aa: 2068 001c moveal %a0@(28),%a0 517ae: 4e90 jsr %a0@ } 517b0: 508f addql #8,%sp 517b2: 60ca bras 5177e <_Timer_server_Body+0x13a> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 517b4: 46c0 movew %d0,%sr 517b6: 6000 fef8 braw 516b0 <_Timer_server_Body+0x6c> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 517ba: 4200 clrb %d0 517bc: 1540 007c moveb %d0,%a2@(124) 517c0: 2039 0007 53e8 movel 753e8 <_Thread_Dispatch_disable_level>,%d0 517c6: 5280 addql #1,%d0 517c8: 23c0 0007 53e8 movel %d0,753e8 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 517ce: 4878 0008 pea 8 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 517d2: 4bf9 0005 53a0 lea 553a0 <_Watchdog_Remove>,%a5 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 517d8: 2f12 movel %a2@,%sp@- 517da: 4eb9 0005 498c jsr 5498c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 517e0: 2f0a movel %a2,%sp@- 517e2: 4eba fd9c jsr %pc@(51580 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 517e6: 2f0a movel %a2,%sp@- 517e8: 4eba fdf6 jsr %pc@(515e0 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 517ec: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> ts->active = true; 517f2: 7201 moveq #1,%d1 517f4: 1541 007c moveb %d1,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 517f8: 2f2e ffe4 movel %fp@(-28),%sp@- 517fc: 4e95 jsr %a5@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 517fe: 2f2e ffe0 movel %fp@(-32),%sp@- 51802: 4e95 jsr %a5@ 51804: 4fef 0018 lea %sp@(24),%sp 51808: 6000 fea6 braw 516b0 <_Timer_server_Body+0x6c> 0005180c <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 5180c: 4e56 fff0 linkw %fp,#-16 51810: 206e 000c moveal %fp@(12),%a0 51814: 48d7 041c moveml %d2-%d4/%a2,%sp@ 51818: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 5181c: 202a 0078 movel %a2@(120),%d0 51820: 6600 00f8 bnew 5191a <_Timer_server_Schedule_operation_method+0x10e> 51824: 2039 0007 53e8 movel 753e8 <_Thread_Dispatch_disable_level>,%d0 5182a: 5280 addql #1,%d0 5182c: 23c0 0007 53e8 movel %d0,753e8 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51832: 2028 0038 movel %a0@(56),%d0 51836: 7201 moveq #1,%d1 51838: b280 cmpl %d0,%d1 5183a: 6660 bnes 5189c <_Timer_server_Schedule_operation_method+0x90> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5183c: 203c 0000 0700 movel #1792,%d0 51842: 40c3 movew %sr,%d3 51844: 8083 orl %d3,%d0 51846: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 51848: 2039 0007 552c movel 7552c <_Watchdog_Ticks_since_boot>,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5184e: 220a movel %a2,%d1 51850: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 51856: 242a 003c movel %a2@(60),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5185a: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5185e: b289 cmpl %a1,%d1 51860: 6716 beqs 51878 <_Timer_server_Schedule_operation_method+0x6c> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 51862: 2800 movel %d0,%d4 51864: 9882 subl %d2,%d4 delta_interval = first_watchdog->delta_interval; 51866: 2229 0010 movel %a1@(16),%d1 if (delta_interval > delta) { 5186a: b881 cmpl %d1,%d4 5186c: 6504 bcss 51872 <_Timer_server_Schedule_operation_method+0x66> 5186e: 4281 clrl %d1 51870: 6002 bras 51874 <_Timer_server_Schedule_operation_method+0x68> delta_interval -= delta; 51872: 9284 subl %d4,%d1 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 51874: 2341 0010 movel %d1,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 51878: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 5187c: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 5187e: 4868 0010 pea %a0@(16) 51882: 486a 0030 pea %a2@(48) 51886: 4eb9 0005 5284 jsr 55284 <_Watchdog_Insert> if ( !ts->active ) { 5188c: 508f addql #8,%sp 5188e: 102a 007c moveb %a2@(124),%d0 51892: 6678 bnes 5190c <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_interval_system_watchdog( ts ); 51894: 2f0a movel %a2,%sp@- 51896: 4eba fce8 jsr %pc@(51580 <_Timer_server_Reset_interval_system_watchdog>) 5189a: 606e bras 5190a <_Timer_server_Schedule_operation_method+0xfe> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 5189c: 7203 moveq #3,%d1 5189e: b280 cmpl %d0,%d1 518a0: 666a bnes 5190c <_Timer_server_Schedule_operation_method+0x100> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 518a2: 203c 0000 0700 movel #1792,%d0 518a8: 40c3 movew %sr,%d3 518aa: 8083 orl %d3,%d0 518ac: 46c0 movew %d0,%sr 518ae: 200a movel %a2,%d0 518b0: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 518b6: 2239 0007 547a movel 7547a <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 518bc: 242a 0074 movel %a2@(116),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 518c0: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 518c4: b089 cmpl %a1,%d0 518c6: 6720 beqs 518e8 <_Timer_server_Schedule_operation_method+0xdc> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 518c8: 2029 0010 movel %a1@(16),%d0 if ( snapshot > last_snapshot ) { 518cc: b481 cmpl %d1,%d2 518ce: 6410 bccs 518e0 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; 518d0: 2801 movel %d1,%d4 518d2: 9882 subl %d2,%d4 if (delta_interval > delta) { 518d4: b880 cmpl %d0,%d4 518d6: 6504 bcss 518dc <_Timer_server_Schedule_operation_method+0xd0> 518d8: 4280 clrl %d0 <== NOT EXECUTED 518da: 6008 bras 518e4 <_Timer_server_Schedule_operation_method+0xd8><== NOT EXECUTED delta_interval -= delta; 518dc: 9084 subl %d4,%d0 518de: 6004 bras 518e4 <_Timer_server_Schedule_operation_method+0xd8> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 518e0: d082 addl %d2,%d0 delta_interval += delta; 518e2: 9081 subl %d1,%d0 } first_watchdog->delta_interval = delta_interval; 518e4: 2340 0010 movel %d0,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 518e8: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 518ec: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 518ee: 4868 0010 pea %a0@(16) 518f2: 486a 0068 pea %a2@(104) 518f6: 4eb9 0005 5284 jsr 55284 <_Watchdog_Insert> if ( !ts->active ) { 518fc: 508f addql #8,%sp 518fe: 102a 007c moveb %a2@(124),%d0 51902: 6608 bnes 5190c <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_tod_system_watchdog( ts ); 51904: 2f0a movel %a2,%sp@- 51906: 4eba fcd8 jsr %pc@(515e0 <_Timer_server_Reset_tod_system_watchdog>) 5190a: 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 ); } } 5190c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 51912: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 51914: 4ef9 0005 4012 jmp 54012 <_Thread_Enable_dispatch> * 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 ); 5191a: 202a 0078 movel %a2@(120),%d0 5191e: 2d48 000c movel %a0,%fp@(12) } } 51922: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 * 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 ); 51928: 2d40 0008 movel %d0,%fp@(8) } } 5192c: 4e5e unlk %fp * 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 ); 5192e: 4ef9 0005 1fdc jmp 51fdc <_Chain_Append> 00047958 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 47958: 4e56 0000 linkw %fp,#0 4795c: 206e 0008 moveal %fp@(8),%a0 47960: 2f0a movel %a2,%sp@- 47962: 246e 000c moveal %fp@(12),%a2 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 47966: 226a 0004 moveal %a2@(4),%a1 4796a: d3e8 0004 addal %a0@(4),%a1 4796e: 2209 movel %a1,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 47970: 2012 movel %a2@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 47972: d190 addl %d0,%a0@ time->tv_nsec += add->tv_nsec; 47974: 2149 0004 movel %a1,%a0@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 47978: 600a bras 47984 <_Timespec_Add_to+0x2c> time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 4797a: 5290 addql #1,%a0@ seconds++; 4797c: 5280 addql #1,%d0 4797e: 0681 c465 3600 addil #-1000000000,%d1 /* 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 ) { 47984: 0c81 3b9a c9ff cmpil #999999999,%d1 4798a: 62ee bhis 4797a <_Timespec_Add_to+0x22> time->tv_sec++; seconds++; } return seconds; } 4798c: 245f moveal %sp@+,%a2 4798e: 4e5e unlk %fp /* 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 ) { 47990: 2141 0004 movel %d1,%a0@(4) time->tv_sec++; seconds++; } return seconds; } 47994: 4e75 rts ... 0004a980 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 4a980: 4e56 fff4 linkw %fp,#-12 4a984: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a988: 246e 0008 moveal %fp@(8),%a2 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 4a98c: 2412 movel %a2@,%d2 4a98e: 660a bnes 4a99a <_Timespec_To_ticks+0x1a> 4a990: 4aaa 0004 tstl %a2@(4) 4a994: 6604 bnes 4a99a <_Timespec_To_ticks+0x1a> 4a996: 4280 clrl %d0 4a998: 602a bras 4a9c4 <_Timespec_To_ticks+0x44> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 4a99a: 4eb9 0004 c010 jsr 4c010 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 4a9a0: 2239 0005 b4f0 movel 5b4f0 ,%d1 4a9a6: 263c 0000 03e8 movel #1000,%d3 4a9ac: 4c03 1800 mulsl %d3,%d1 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 4a9b0: 4c02 0800 mulsl %d2,%d0 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 4a9b4: 262a 0004 movel %a2@(4),%d3 4a9b8: 4c41 3003 remul %d1,%d3,%d3 4a9bc: d083 addl %d3,%d0 if (ticks) 4a9be: 6604 bnes 4a9c4 <_Timespec_To_ticks+0x44> 4a9c0: 103c 0001 moveb #1,%d0 return ticks; return 1; } 4a9c4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4a9ca: 4e5e unlk %fp 4a9cc: 4e75 rts ... 0004a9d0 <_User_extensions_Add_set>: #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4a9d0: 4e56 0000 linkw %fp,#0 4a9d4: 2f0b movel %a3,%sp@- _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4a9d6: 47f9 0004 58d0 lea 458d0 <_Chain_Append>,%a3 #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4a9dc: 2f0a movel %a2,%sp@- 4a9de: 246e 0008 moveal %fp@(8),%a2 _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4a9e2: 2f0a movel %a2,%sp@- 4a9e4: 4879 0005 ce28 pea 5ce28 <_User_extensions_List> 4a9ea: 4e93 jsr %a3@ /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4a9ec: 202a 0024 movel %a2@(36),%d0 4a9f0: 508f addql #8,%sp 4a9f2: 6712 beqs 4aa06 <_User_extensions_Add_set+0x36> the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; _Chain_Append( 4a9f4: 486a 0008 pea %a2@(8) 4a9f8: 4879 0005 cc98 pea 5cc98 <_User_extensions_Switches_list> /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { the_extension->Switch.thread_switch = 4a9fe: 2540 0010 movel %d0,%a2@(16) the_extension->Callouts.thread_switch; _Chain_Append( 4aa02: 4e93 jsr %a3@ 4aa04: 508f addql #8,%sp &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } 4aa06: 246e fff8 moveal %fp@(-8),%a2 4aa0a: 266e fffc moveal %fp@(-4),%a3 4aa0e: 4e5e unlk %fp 4aa10: 4e75 rts ... 00047b02 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47b02: 4e56 fff0 linkw %fp,#-16 47b06: 48d7 041c moveml %d2-%d4/%a2,%sp@ the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 47b0a: 4282 clrl %d2 47b0c: 142e 000f moveb %fp@(15),%d2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47b10: 282e 0008 movel %fp@(8),%d4 47b14: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47b18: 2479 0005 ce30 moveal 5ce30 <_User_extensions_List+0x8>,%a2 47b1e: 6018 bras 47b38 <_User_extensions_Fatal+0x36> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 47b20: 206a 0030 moveal %a2@(48),%a0 47b24: 4a88 tstl %a0 47b26: 670c beqs 47b34 <_User_extensions_Fatal+0x32> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 47b28: 2f03 movel %d3,%sp@- 47b2a: 2f02 movel %d2,%sp@- 47b2c: 2f04 movel %d4,%sp@- 47b2e: 4e90 jsr %a0@ 47b30: 4fef 000c lea %sp@(12),%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 47b34: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 47b38: b5fc 0005 ce28 cmpal #380456,%a2 47b3e: 66e0 bnes 47b20 <_User_extensions_Fatal+0x1e> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 47b40: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47b46: 4e5e unlk %fp 47b48: 4e75 rts ... 000479e0 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 479e0: 4e56 ffe4 linkw %fp,#-28 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 479e4: 203c 0005 ce2c movel #380460,%d0 479ea: 23c0 0005 ce28 movel %d0,5ce28 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 479f0: 203c 0005 ce28 movel #380456,%d0 479f6: 23c0 0005 ce30 movel %d0,5ce30 <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 479fc: 203c 0005 cc9c movel #380060,%d0 47a02: 23c0 0005 cc98 movel %d0,5cc98 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47a08: 203c 0005 cc98 movel #380056,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47a0e: 42b9 0005 ce2c clrl 5ce2c <_User_extensions_List+0x4> 47a14: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 47a18: 2a39 0005 b51a movel 5b51a ,%d5 initial_extensions = Configuration.User_extension_table; 47a1e: 2639 0005 b51e movel 5b51e ,%d3 47a24: 42b9 0005 cc9c clrl 5cc9c <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 47a2a: 23c0 0005 cca0 movel %d0,5cca0 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 47a30: 4a83 tstl %d3 47a32: 6750 beqs 47a84 <_User_extensions_Handler_initialization+0xa4> extension = (User_extensions_Control *) 47a34: 7834 moveq #52,%d4 47a36: 4c05 4800 mulsl %d5,%d4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 47a3a: 4282 clrl %d2 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 47a3c: 49f9 0004 d23c lea 4d23c ,%a4 _User_extensions_Add_set( extension ); 47a42: 47f9 0004 a9d0 lea 4a9d0 <_User_extensions_Add_set>,%a3 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 47a48: 2f04 movel %d4,%sp@- 47a4a: 4eb9 0004 7e5c jsr 47e5c <_Workspace_Allocate_or_fatal_error> 47a50: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 47a52: 2f04 movel %d4,%sp@- 47a54: 42a7 clrl %sp@- 47a56: 2f00 movel %d0,%sp@- 47a58: 4eb9 0004 d2ac jsr 4d2ac 47a5e: 601c bras 47a7c <_User_extensions_Handler_initialization+0x9c> RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 47a60: 4878 0020 pea 20 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 47a64: 5282 addql #1,%d2 47a66: 2f03 movel %d3,%sp@- 47a68: 486a 0014 pea %a2@(20) 47a6c: 0683 0000 0020 addil #32,%d3 47a72: 4e94 jsr %a4@ _User_extensions_Add_set( extension ); 47a74: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 47a76: 45ea 0034 lea %a2@(52),%a2 47a7a: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 47a7c: 4fef 0010 lea %sp@(16),%sp 47a80: ba82 cmpl %d2,%d5 47a82: 62dc bhis 47a60 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 47a84: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 47a8a: 4e5e unlk %fp 47a8c: 4e75 rts ... 000483c8 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 483c8: 4e56 0000 linkw %fp,#0 483cc: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 483ce: 2479 0005 d900 moveal 5d900 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 483d4: 2f02 movel %d2,%sp@- 483d6: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 483da: 6016 bras 483f2 <_User_extensions_Thread_restart+0x2a> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 483dc: 206a 001c moveal %a2@(28),%a0 483e0: 4a88 tstl %a0 483e2: 670c beqs 483f0 <_User_extensions_Thread_restart+0x28> (*the_extension->Callouts.thread_restart)( 483e4: 2f02 movel %d2,%sp@- 483e6: 2f39 0005 d826 movel 5d826 <_Thread_Executing>,%sp@- 483ec: 4e90 jsr %a0@ 483ee: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 483f0: 2452 moveal %a2@,%a2 483f2: b5fc 0005 d904 cmpal #383236,%a2 483f8: 66e2 bnes 483dc <_User_extensions_Thread_restart+0x14> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 483fa: 242e fff8 movel %fp@(-8),%d2 483fe: 246e fffc moveal %fp@(-4),%a2 48402: 4e5e unlk %fp 48404: 4e75 rts ... 00047bd0 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 47bd0: 4e56 0000 linkw %fp,#0 47bd4: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47bd6: 2479 0005 ce28 moveal 5ce28 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 47bdc: 2f02 movel %d2,%sp@- 47bde: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47be2: 6016 bras 47bfa <_User_extensions_Thread_start+0x2a> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 47be4: 206a 0018 moveal %a2@(24),%a0 47be8: 4a88 tstl %a0 47bea: 670c beqs 47bf8 <_User_extensions_Thread_start+0x28> (*the_extension->Callouts.thread_start)( 47bec: 2f02 movel %d2,%sp@- 47bee: 2f39 0005 cd4e movel 5cd4e <_Thread_Executing>,%sp@- 47bf4: 4e90 jsr %a0@ 47bf6: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 47bf8: 2452 moveal %a2@,%a2 47bfa: b5fc 0005 ce2c cmpal #380460,%a2 47c00: 66e2 bnes 47be4 <_User_extensions_Thread_start+0x14> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 47c02: 242e fff8 movel %fp@(-8),%d2 47c06: 246e fffc moveal %fp@(-4),%a2 47c0a: 4e5e unlk %fp 47c0c: 4e75 rts ... 00047d18 <_Watchdog_Handler_initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47d18: 43f9 0005 cd6c lea 5cd6c <_Watchdog_Ticks_chain>,%a1 47d1e: 41f9 0005 cd60 lea 5cd60 <_Watchdog_Seconds_chain>,%a0 * * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { 47d24: 4e56 0000 linkw %fp,#0 _Watchdog_Sync_level = 0; _Watchdog_Ticks_since_boot = 0; _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } 47d28: 4e5e unlk %fp * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { _Watchdog_Sync_count = 0; 47d2a: 42b9 0005 cdd4 clrl 5cdd4 <_Watchdog_Sync_count> _Watchdog_Sync_level = 0; 47d30: 42b9 0005 cd4a clrl 5cd4a <_Watchdog_Sync_level> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47d36: 23c9 0005 cd74 movel %a1,5cd74 <_Watchdog_Ticks_chain+0x8> 47d3c: 23c8 0005 cd68 movel %a0,5cd68 <_Watchdog_Seconds_chain+0x8> _Watchdog_Ticks_since_boot = 0; 47d42: 42b9 0005 cdd8 clrl 5cdd8 <_Watchdog_Ticks_since_boot> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47d48: 22bc 0005 cd70 movel #380272,%a1@ the_chain->permanent_null = NULL; 47d4e: 42b9 0005 cd70 clrl 5cd70 <_Watchdog_Ticks_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47d54: 20bc 0005 cd64 movel #380260,%a0@ the_chain->permanent_null = NULL; 47d5a: 42b9 0005 cd64 clrl 5cd64 <_Watchdog_Seconds_chain+0x4> _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } 47d60: 4e75 rts ... 00047c48 <_Watchdog_Insert>: Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 47c48: 327c 0700 moveaw #1792,%a1 47c4c: 2009 movel %a1,%d0 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 47c4e: 4e56 ffec linkw %fp,#-20 47c52: 206e 000c moveal %fp@(12),%a0 47c56: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47c5a: 266e 0008 moveal %fp@(8),%a3 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 47c5e: 2439 0005 cd2e movel 5cd2e <_ISR_Nest_level>,%d2 _ISR_Disable( level ); 47c64: 40c1 movew %sr,%d1 47c66: 8081 orl %d1,%d0 47c68: 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 ) { 47c6a: 4aa8 0008 tstl %a0@(8) 47c6e: 6706 beqs 47c76 <_Watchdog_Insert+0x2e> _ISR_Enable( level ); 47c70: 46c1 movew %d1,%sr return; 47c72: 6000 009a braw 47d0e <_Watchdog_Insert+0xc6> } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 47c76: 2039 0005 cdd4 movel 5cdd4 <_Watchdog_Sync_count>,%d0 47c7c: 5280 addql #1,%d0 * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 47c7e: 2449 moveal %a1,%a2 _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 47c80: 23c0 0005 cdd4 movel %d0,5cdd4 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 47c86: 7001 moveq #1,%d0 47c88: 2140 0008 movel %d0,%a0@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 47c8c: 2028 000c movel %a0@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 47c90: 2253 moveal %a3@,%a1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 47c92: 4a80 tstl %d0 47c94: 673c beqs 47cd2 <_Watchdog_Insert+0x8a> 47c96: 4a91 tstl %a1@ 47c98: 6738 beqs 47cd2 <_Watchdog_Insert+0x8a> break; if ( delta_interval < after->delta_interval ) { 47c9a: 2629 0010 movel %a1@(16),%d3 47c9e: b680 cmpl %d0,%d3 47ca0: 6308 blss 47caa <_Watchdog_Insert+0x62> after->delta_interval -= delta_interval; 47ca2: 9680 subl %d0,%d3 47ca4: 2343 0010 movel %d3,%a1@(16) break; 47ca8: 6028 bras 47cd2 <_Watchdog_Insert+0x8a> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 47caa: 280a movel %a2,%d4 47cac: 46c1 movew %d1,%sr 47cae: 8881 orl %d1,%d4 47cb0: 46c4 movew %d4,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 47cb2: 9083 subl %d3,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 47cb4: 7601 moveq #1,%d3 47cb6: b6a8 0008 cmpl %a0@(8),%d3 47cba: 663c bnes 47cf8 <_Watchdog_Insert+0xb0> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 47cbc: 2639 0005 cd4a movel 5cd4a <_Watchdog_Sync_level>,%d3 47cc2: b483 cmpl %d3,%d2 47cc4: 6408 bccs 47cce <_Watchdog_Insert+0x86> _Watchdog_Sync_level = insert_isr_nest_level; 47cc6: 23c2 0005 cd4a movel %d2,5cd4a <_Watchdog_Sync_level> goto restart; 47ccc: 60be bras 47c8c <_Watchdog_Insert+0x44> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 47cce: 2251 moveal %a1@,%a1 } } 47cd0: 60c0 bras 47c92 <_Watchdog_Insert+0x4a> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 47cd2: 2269 0004 moveal %a1@(4),%a1 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 47cd6: 2639 0005 cdd8 movel 5cdd8 <_Watchdog_Ticks_since_boot>,%d3 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 47cdc: 2451 moveal %a1@,%a2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 47cde: 2149 0004 movel %a1,%a0@(4) before_node = after_node->next; after_node->next = the_node; 47ce2: 2288 movel %a0,%a1@ } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 47ce4: 2140 0010 movel %d0,%a0@(16) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 47ce8: 7002 moveq #2,%d0 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 47cea: 2143 0014 movel %d3,%a0@(20) the_node->next = before_node; before_node->previous = the_node; 47cee: 2548 0004 movel %a0,%a2@(4) 47cf2: 2140 0008 movel %d0,%a0@(8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 47cf6: 208a movel %a2,%a0@ exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 47cf8: 23c2 0005 cd4a movel %d2,5cd4a <_Watchdog_Sync_level> _Watchdog_Sync_count--; 47cfe: 2039 0005 cdd4 movel 5cdd4 <_Watchdog_Sync_count>,%d0 47d04: 5380 subql #1,%d0 47d06: 23c0 0005 cdd4 movel %d0,5cdd4 <_Watchdog_Sync_count> _ISR_Enable( level ); 47d0c: 46c1 movew %d1,%sr } 47d0e: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 47d12: 4e5e unlk %fp 47d14: 4e75 rts ... 00047de0 <_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 ); 47de0: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 47de6: 4e56 ffe8 linkw %fp,#-24 47dea: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 47dee: 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 ); 47df2: 40c2 movew %sr,%d2 47df4: 8082 orl %d2,%d0 47df6: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 47df8: 264c moveal %a4,%a3 47dfa: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 47dfc: b7ca cmpal %a2,%a3 47dfe: 674e beqs 47e4e <_Watchdog_Tickle+0x6e> * 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) { 47e00: 202a 0010 movel %a2@(16),%d0 47e04: 6708 beqs 47e0e <_Watchdog_Tickle+0x2e> the_watchdog->delta_interval--; 47e06: 5380 subql #1,%d0 47e08: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 47e0c: 6640 bnes 47e4e <_Watchdog_Tickle+0x6e> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 47e0e: 4bf9 0004 7d64 lea 47d64 <_Watchdog_Remove>,%a5 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 47e14: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 47e1a: 2f0a movel %a2,%sp@- 47e1c: 4e95 jsr %a5@ _ISR_Enable( level ); 47e1e: 46c2 movew %d2,%sr switch( watchdog_state ) { 47e20: 7202 moveq #2,%d1 47e22: 588f addql #4,%sp 47e24: b280 cmpl %d0,%d1 47e26: 6610 bnes 47e38 <_Watchdog_Tickle+0x58> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 47e28: 2f2a 0024 movel %a2@(36),%sp@- 47e2c: 2f2a 0020 movel %a2@(32),%sp@- 47e30: 206a 001c moveal %a2@(28),%a0 47e34: 4e90 jsr %a0@ 47e36: 508f addql #8,%sp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 47e38: 2003 movel %d3,%d0 47e3a: 40c2 movew %sr,%d2 47e3c: 8082 orl %d2,%d0 47e3e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 47e40: 2014 movel %a4@,%d0 47e42: 2440 moveal %d0,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 47e44: b7c0 cmpal %d0,%a3 47e46: 6706 beqs 47e4e <_Watchdog_Tickle+0x6e> 47e48: 4aaa 0010 tstl %a2@(16) 47e4c: 67cc beqs 47e1a <_Watchdog_Tickle+0x3a> leave: _ISR_Enable(level); 47e4e: 46c2 movew %d2,%sr } 47e50: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47e56: 4e5e unlk %fp 47e58: 4e75 rts ... 000591dc <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 591dc: 4e56 0000 linkw %fp,#0 591e0: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 591e4: 2d6e 0010 000c movel %fp@(16),%fp@(12) 591ea: 2d40 0008 movel %d0,%fp@(8) } 591ee: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 591f0: 4ef9 0004 8e68 jmp 48e68 ... 0005a41c <_execve>: int _execve( const char *path __attribute__((unused)), char *const argv[] __attribute__((unused)), char *const envp[] __attribute__((unused)) ) { 5a41c: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 5a420: 4eb9 0004 d430 jsr 4d430 <__errno> 5a426: 7258 moveq #88,%d1 5a428: 2040 moveal %d0,%a0 } 5a42a: 70ff moveq #-1,%d0 5a42c: 4e5e unlk %fp const char *path __attribute__((unused)), char *const argv[] __attribute__((unused)), char *const envp[] __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 5a42e: 2081 movel %d1,%a0@ } 5a430: 4e75 rts ... 00042828 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 42828: 4e56 0000 linkw %fp,#0 4282c: 4eb9 0005 9948 jsr 59948 <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 42832: 4eb9 0004 27c4 jsr 427c4 rtems_shutdown_executive(status); 42838: 2f2e 0008 movel %fp@(8),%sp@- 4283c: 4eb9 0004 5560 jsr 45560 42842: 588f addql #4,%sp <== NOT EXECUTED 42844: 60fe bras 42844 <_exit+0x1c> <== NOT EXECUTED ... 00070ad6 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 70ad6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 70ada: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 70ade: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 70ae2: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 70ae8: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 70aec: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 70af0: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 70af2: 4ef9 0007 0968 jmp 70968 <== NOT EXECUTED 000591f8 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 591f8: 4e56 0000 linkw %fp,#0 free( ptr ); 591fc: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59202: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 59204: 4ef9 0004 8f48 jmp 48f48 ... 0004b726 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4b726: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 4b728: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 4b72c: 4e5e unlk %fp <== NOT EXECUTED 4b72e: 4e75 rts 0004912c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 4912c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 49130: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 49132: 4ef9 0004 90d0 jmp 490d0 <== NOT EXECUTED 00049138 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 49138: 4e56 0000 linkw %fp,#0 4913c: 202e 000c movel %fp@(12),%d0 return gettimeofday( tp, tzp ); 49140: 2d6e 0010 000c movel %fp@(16),%fp@(12) 49146: 2d40 0008 movel %d0,%fp@(8) } 4914a: 4e5e unlk %fp struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4914c: 4ef9 0004 90d0 jmp 490d0 ... 000592d0 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 592d0: 4e56 0000 linkw %fp,#0 return isatty( fd ); 592d4: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 592da: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 592dc: 4ef9 0005 989c jmp 5989c ... 000611ea <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 611ea: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 611ee: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 611f2: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 611f8: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 611fc: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 611fe: 4ef9 0006 1000 jmp 61000 <== NOT EXECUTED 000593d0 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 593d0: 4e56 0000 linkw %fp,#0 593d4: 202e 000c movel %fp@(12),%d0 593d8: 2f02 movel %d2,%sp@- 593da: 222e 0010 movel %fp@(16),%d1 593de: 242e 0014 movel %fp@(20),%d2 return lseek( fd, offset, whence ); 593e2: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 593e8: 2d41 000c movel %d1,%fp@(12) 593ec: 2d42 0010 movel %d2,%fp@(16) 593f0: 2d40 0008 movel %d0,%fp@(8) } 593f4: 241f movel %sp@+,%d2 593f6: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 593f8: 4ef9 0005 92e4 jmp 592e4 ... 000613e6 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 613e6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 613ea: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 613ee: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 613f4: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 613f8: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 613fa: 4ef9 0006 1320 jmp 61320 <== NOT EXECUTED 00059400 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 59400: 4e56 0000 linkw %fp,#0 return malloc( size ); 59404: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5940a: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5940c: 4ef9 0004 941c jmp 4941c ... 00042d0c <_open_r>: struct _reent *ptr __attribute__((unused)), const char *buf, int flags, int mode ) { 42d0c: 4e56 0000 linkw %fp,#0 42d10: 222e 0010 movel %fp@(16),%d1 42d14: 202e 000c movel %fp@(12),%d0 return open( buf, flags, mode ); 42d18: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 42d1e: 2d41 000c movel %d1,%fp@(12) 42d22: 2d40 0008 movel %d0,%fp@(8) } 42d26: 4e5e unlk %fp const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 42d28: 4ef9 0004 2b10 jmp 42b10 ... 000594c0 <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 594c0: 4e56 0000 linkw %fp,#0 594c4: 222e 0010 movel %fp@(16),%d1 594c8: 202e 000c movel %fp@(12),%d0 return read( fd, buf, nbytes ); 594cc: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 594d2: 2d41 000c movel %d1,%fp@(12) 594d6: 2d40 0008 movel %d0,%fp@(8) } 594da: 4e5e unlk %fp int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 594dc: 4ef9 0005 9414 jmp 59414 ... 000594e4 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 594e4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 594e8: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 594ec: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 594f2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 594f6: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 594f8: 4ef9 0005 9540 jmp 59540 <== NOT EXECUTED ... 0008cfcc <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 8cfcc: 4e56 ffa4 linkw %fp,#-92 <== NOT EXECUTED 8cfd0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 8cfd4: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 8cfd8: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 8cfdc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 8cfde: 4eb9 0004 565c jsr 4565c <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 8cfe4: 588f addql #4,%sp <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 8cfe6: 2600 movel %d0,%d3 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 8cfe8: 664a bnes 8d034 <_rename_r+0x68> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 8cfea: 742f moveq #47,%d2 <== NOT EXECUTED 8cfec: 1012 moveb %a2@,%d0 <== NOT EXECUTED 8cfee: 1200 moveb %d0,%d1 <== NOT EXECUTED 8cff0: 49c1 extbl %d1 <== NOT EXECUTED 8cff2: b481 cmpl %d1,%d2 <== NOT EXECUTED 8cff4: 670c beqs 8d002 <_rename_r+0x36> <== NOT EXECUTED 8cff6: 143c 005c moveb #92,%d2 <== NOT EXECUTED 8cffa: b481 cmpl %d1,%d2 <== NOT EXECUTED 8cffc: 6704 beqs 8d002 <_rename_r+0x36> <== NOT EXECUTED 8cffe: 4a00 tstb %d0 <== NOT EXECUTED 8d000: 6612 bnes 8d014 <_rename_r+0x48> <== NOT EXECUTED 8d002: 4878 0014 pea 14 <== NOT EXECUTED 8d006: 2079 0009 717c moveal 9717c ,%a0 <== NOT EXECUTED 8d00c: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 8d010: 2f08 movel %a0,%sp@- <== NOT EXECUTED 8d012: 600e bras 8d022 <_rename_r+0x56> <== NOT EXECUTED 8d014: 4878 0014 pea 14 <== NOT EXECUTED 8d018: 2039 0009 717c movel 9717c ,%d0 <== NOT EXECUTED 8d01e: 5880 addql #4,%d0 <== NOT EXECUTED 8d020: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8d022: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d026: 4202 clrb %d2 <== NOT EXECUTED 8d028: 4eb9 0007 8fec jsr 78fec <== NOT EXECUTED 8d02e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 8d032: 6024 bras 8d058 <_rename_r+0x8c> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 8d034: 42a7 clrl %sp@- <== NOT EXECUTED 8d036: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d03a: 4878 0002 pea 2 <== NOT EXECUTED 8d03e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8d040: 2f0a movel %a2,%sp@- <== NOT EXECUTED 8d042: 4eb9 0004 5772 jsr 45772 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 8d048: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 8d04c: 4a80 tstl %d0 <== NOT EXECUTED 8d04e: 6706 beqs 8d056 <_rename_r+0x8a> <== NOT EXECUTED 8d050: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d052: 6000 0286 braw 8d2da <_rename_r+0x30e> <== NOT EXECUTED 8d056: 7401 moveq #1,%d2 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8d058: 4878 0014 pea 14 <== NOT EXECUTED 8d05c: 2a0e movel %fp,%d5 <== NOT EXECUTED 8d05e: 0685 ffff ffd4 addil #-44,%d5 <== NOT EXECUTED 8d064: 280e movel %fp,%d4 <== NOT EXECUTED 8d066: 0684 ffff ffe8 addil #-24,%d4 <== NOT EXECUTED 8d06c: 49f9 0007 8fec lea 78fec ,%a4 <== NOT EXECUTED name = old + old_parent_pathlen; 8d072: d68a addl %a2,%d3 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8d074: 45f9 0007 c05c lea 7c05c ,%a2 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8d07a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 8d07c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d07e: 4e94 jsr %a4@ <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8d080: 2f03 movel %d3,%sp@- <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 8d082: 2d43 fffc movel %d3,%fp@(-4) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8d086: 4e92 jsr %a2@ <== NOT EXECUTED 8d088: 2e80 movel %d0,%sp@ <== NOT EXECUTED 8d08a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 8d08c: 4eb9 0004 5624 jsr 45624 <== NOT EXECUTED 8d092: d680 addl %d0,%d3 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8d094: 2f03 movel %d3,%sp@- <== NOT EXECUTED * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8d096: 2d43 fffc movel %d3,%fp@(-4) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8d09a: 4e92 jsr %a2@ <== NOT EXECUTED 8d09c: 4297 clrl %sp@ <== NOT EXECUTED 8d09e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d0a0: 42a7 clrl %sp@- <== NOT EXECUTED 8d0a2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8d0a4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 8d0a6: 4eb9 0004 56a2 jsr 456a2 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 8d0ac: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8d0b0: 2800 movel %d0,%d4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 8d0b2: 672a beqs 8d0de <_rename_r+0x112> <== NOT EXECUTED if ( free_old_parentloc ) 8d0b4: 4a02 tstb %d2 <== NOT EXECUTED 8d0b6: 6716 beqs 8d0ce <_rename_r+0x102> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d0b8: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d0bc: 4a88 tstl %a0 <== NOT EXECUTED 8d0be: 670e beqs 8d0ce <_rename_r+0x102> <== NOT EXECUTED 8d0c0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d0c4: 4a88 tstl %a0 <== NOT EXECUTED 8d0c6: 6706 beqs 8d0ce <_rename_r+0x102> <== NOT EXECUTED 8d0c8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 8d0ca: 4e90 jsr %a0@ <== NOT EXECUTED 8d0cc: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8d0ce: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 8d0d4: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d0d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 8d0d8: 2084 movel %d4,%a0@ <== NOT EXECUTED 8d0da: 6000 01fe braw 8d2da <_rename_r+0x30e> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 8d0de: 762f moveq #47,%d3 <== NOT EXECUTED 8d0e0: 1013 moveb %a3@,%d0 <== NOT EXECUTED 8d0e2: 1200 moveb %d0,%d1 <== NOT EXECUTED 8d0e4: 49c1 extbl %d1 <== NOT EXECUTED 8d0e6: b681 cmpl %d1,%d3 <== NOT EXECUTED 8d0e8: 670c beqs 8d0f6 <_rename_r+0x12a> <== NOT EXECUTED 8d0ea: 163c 005c moveb #92,%d3 <== NOT EXECUTED 8d0ee: b681 cmpl %d1,%d3 <== NOT EXECUTED 8d0f0: 6704 beqs 8d0f6 <_rename_r+0x12a> <== NOT EXECUTED 8d0f2: 4a00 tstb %d0 <== NOT EXECUTED 8d0f4: 6622 bnes 8d118 <_rename_r+0x14c> <== NOT EXECUTED 8d0f6: 4878 0014 pea 14 <== NOT EXECUTED 8d0fa: 2079 0009 717c moveal 9717c ,%a0 <== NOT EXECUTED 8d100: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 8d104: 2f08 movel %a0,%sp@- <== NOT EXECUTED 8d106: 486e ffc0 pea %fp@(-64) <== NOT EXECUTED 8d10a: 4eb9 0007 8fec jsr 78fec <== NOT EXECUTED 8d110: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 8d114: 7001 moveq #1,%d0 <== NOT EXECUTED 8d116: 601a bras 8d132 <_rename_r+0x166> <== NOT EXECUTED 8d118: 4878 0014 pea 14 <== NOT EXECUTED 8d11c: 2039 0009 717c movel 9717c ,%d0 <== NOT EXECUTED 8d122: 5880 addql #4,%d0 <== NOT EXECUTED 8d124: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8d126: 486e ffc0 pea %fp@(-64) <== NOT EXECUTED 8d12a: 4e94 jsr %a4@ <== NOT EXECUTED 8d12c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 8d130: 4280 clrl %d0 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 8d132: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 8d136: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 8d13a: 4a88 tstl %a0 <== NOT EXECUTED 8d13c: 6700 00f6 beqw 8d234 <_rename_r+0x268> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 8d140: 486e fffc pea %fp@(-4) <== NOT EXECUTED 8d144: 280e movel %fp,%d4 <== NOT EXECUTED 8d146: 0684 ffff ffc0 addil #-64,%d4 <== NOT EXECUTED 8d14c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d14e: 4873 0800 pea %a3@(00000000,%d0:l) <== NOT EXECUTED 8d152: 4e90 jsr %a0@ <== NOT EXECUTED if ( result != 0 ) { 8d154: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 8d158: 2440 moveal %d0,%a2 <== NOT EXECUTED if ( result != 0 ) { 8d15a: 4a80 tstl %d0 <== NOT EXECUTED 8d15c: 675a beqs 8d1b8 <_rename_r+0x1ec> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d15e: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 8d162: 4a88 tstl %a0 <== NOT EXECUTED 8d164: 670e beqs 8d174 <_rename_r+0x1a8> <== NOT EXECUTED 8d166: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d16a: 4a88 tstl %a0 <== NOT EXECUTED 8d16c: 6706 beqs 8d174 <_rename_r+0x1a8> <== NOT EXECUTED 8d16e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d170: 4e90 jsr %a0@ <== NOT EXECUTED 8d172: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8d174: 4a02 tstb %d2 <== NOT EXECUTED 8d176: 6718 beqs 8d190 <_rename_r+0x1c4> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d178: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d17c: 4a88 tstl %a0 <== NOT EXECUTED 8d17e: 6710 beqs 8d190 <_rename_r+0x1c4> <== NOT EXECUTED 8d180: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d184: 4a88 tstl %a0 <== NOT EXECUTED 8d186: 6708 beqs 8d190 <_rename_r+0x1c4> <== NOT EXECUTED 8d188: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d18c: 4e90 jsr %a0@ <== NOT EXECUTED 8d18e: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8d190: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8d194: 4a88 tstl %a0 <== NOT EXECUTED 8d196: 6710 beqs 8d1a8 <_rename_r+0x1dc> <== NOT EXECUTED 8d198: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d19c: 4a88 tstl %a0 <== NOT EXECUTED 8d19e: 6708 beqs 8d1a8 <_rename_r+0x1dc> <== NOT EXECUTED 8d1a0: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d1a4: 4e90 jsr %a0@ <== NOT EXECUTED 8d1a6: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8d1a8: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 8d1ae: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d1b0: 2040 moveal %d0,%a0 <== NOT EXECUTED 8d1b2: 208a movel %a2,%a0@ <== NOT EXECUTED 8d1b4: 6000 0124 braw 8d2da <_rename_r+0x30e> <== NOT EXECUTED 8d1b8: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 8d1bc: 202e ffd0 movel %fp@(-48),%d0 <== NOT EXECUTED 8d1c0: b0ae ffe4 cmpl %fp@(-28),%d0 <== NOT EXECUTED 8d1c4: 6758 beqs 8d21e <_rename_r+0x252> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d1c6: 4a88 tstl %a0 <== NOT EXECUTED 8d1c8: 670e beqs 8d1d8 <_rename_r+0x20c> <== NOT EXECUTED 8d1ca: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d1ce: 4a88 tstl %a0 <== NOT EXECUTED 8d1d0: 6706 beqs 8d1d8 <_rename_r+0x20c> <== NOT EXECUTED 8d1d2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d1d4: 4e90 jsr %a0@ <== NOT EXECUTED 8d1d6: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8d1d8: 4a02 tstb %d2 <== NOT EXECUTED 8d1da: 6718 beqs 8d1f4 <_rename_r+0x228> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d1dc: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d1e0: 4a88 tstl %a0 <== NOT EXECUTED 8d1e2: 6710 beqs 8d1f4 <_rename_r+0x228> <== NOT EXECUTED 8d1e4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d1e8: 4a88 tstl %a0 <== NOT EXECUTED 8d1ea: 6708 beqs 8d1f4 <_rename_r+0x228> <== NOT EXECUTED 8d1ec: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d1f0: 4e90 jsr %a0@ <== NOT EXECUTED 8d1f2: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8d1f4: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8d1f8: 4a88 tstl %a0 <== NOT EXECUTED 8d1fa: 6710 beqs 8d20c <_rename_r+0x240> <== NOT EXECUTED 8d1fc: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d200: 4a88 tstl %a0 <== NOT EXECUTED 8d202: 6708 beqs 8d20c <_rename_r+0x240> <== NOT EXECUTED 8d204: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d208: 4e90 jsr %a0@ <== NOT EXECUTED 8d20a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 8d20c: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 8d212: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d214: 2040 moveal %d0,%a0 <== NOT EXECUTED 8d216: 7012 moveq #18,%d0 <== NOT EXECUTED 8d218: 2080 movel %d0,%a0@ <== NOT EXECUTED 8d21a: 6000 00be braw 8d2da <_rename_r+0x30e> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 8d21e: 2268 0040 moveal %a0@(64),%a1 <== NOT EXECUTED 8d222: 4a89 tstl %a1 <== NOT EXECUTED 8d224: 6654 bnes 8d27a <_rename_r+0x2ae> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d226: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d22a: 4a88 tstl %a0 <== NOT EXECUTED 8d22c: 6706 beqs 8d234 <_rename_r+0x268> <== NOT EXECUTED 8d22e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d230: 4e90 jsr %a0@ <== NOT EXECUTED 8d232: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8d234: 4a02 tstb %d2 <== NOT EXECUTED 8d236: 6718 beqs 8d250 <_rename_r+0x284> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d238: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d23c: 4a88 tstl %a0 <== NOT EXECUTED 8d23e: 6710 beqs 8d250 <_rename_r+0x284> <== NOT EXECUTED 8d240: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d244: 4a88 tstl %a0 <== NOT EXECUTED 8d246: 6708 beqs 8d250 <_rename_r+0x284> <== NOT EXECUTED 8d248: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d24c: 4e90 jsr %a0@ <== NOT EXECUTED 8d24e: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8d250: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8d254: 4a88 tstl %a0 <== NOT EXECUTED 8d256: 6710 beqs 8d268 <_rename_r+0x29c> <== NOT EXECUTED 8d258: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d25c: 4a88 tstl %a0 <== NOT EXECUTED 8d25e: 6708 beqs 8d268 <_rename_r+0x29c> <== NOT EXECUTED 8d260: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d264: 4e90 jsr %a0@ <== NOT EXECUTED 8d266: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8d268: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 8d26e: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d270: 2040 moveal %d0,%a0 <== NOT EXECUTED 8d272: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 8d278: 6060 bras 8d2da <_rename_r+0x30e> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 8d27a: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 8d27e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d280: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d284: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d288: 4e91 jsr %a1@ <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d28a: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 8d28e: 2600 movel %d0,%d3 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d290: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 8d294: 4a88 tstl %a0 <== NOT EXECUTED 8d296: 670e beqs 8d2a6 <_rename_r+0x2da> <== NOT EXECUTED 8d298: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d29c: 4a88 tstl %a0 <== NOT EXECUTED 8d29e: 6706 beqs 8d2a6 <_rename_r+0x2da> <== NOT EXECUTED 8d2a0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d2a2: 4e90 jsr %a0@ <== NOT EXECUTED 8d2a4: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8d2a6: 4a02 tstb %d2 <== NOT EXECUTED 8d2a8: 6718 beqs 8d2c2 <_rename_r+0x2f6> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d2aa: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d2ae: 4a88 tstl %a0 <== NOT EXECUTED 8d2b0: 6710 beqs 8d2c2 <_rename_r+0x2f6> <== NOT EXECUTED 8d2b2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d2b6: 4a88 tstl %a0 <== NOT EXECUTED 8d2b8: 6708 beqs 8d2c2 <_rename_r+0x2f6> <== NOT EXECUTED 8d2ba: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d2be: 4e90 jsr %a0@ <== NOT EXECUTED 8d2c0: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8d2c2: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8d2c6: 4a88 tstl %a0 <== NOT EXECUTED 8d2c8: 6710 beqs 8d2da <_rename_r+0x30e> <== NOT EXECUTED 8d2ca: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d2ce: 4a88 tstl %a0 <== NOT EXECUTED 8d2d0: 6708 beqs 8d2da <_rename_r+0x30e> <== NOT EXECUTED 8d2d2: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d2d6: 4e90 jsr %a0@ <== NOT EXECUTED 8d2d8: 588f addql #4,%sp <== NOT EXECUTED return result; } 8d2da: 2003 movel %d3,%d0 <== NOT EXECUTED 8d2dc: 4cee 1c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a4 <== NOT EXECUTED 8d2e2: 4e5e unlk %fp <== NOT EXECUTED 8d2e4: 4e75 rts <== NOT EXECUTED ... 00046aac <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 46aac: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 46ab0: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 46ab4: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 46aba: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 46abe: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 46ac0: 4ef9 0004 69e4 jmp 469e4 <== NOT EXECUTED ... 0004c536 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4c536: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4c53a: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4c540: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4c542: 4ef9 0004 c34c jmp 4c34c <== NOT EXECUTED 00059500 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 59500: 4e56 0000 linkw %fp,#0 59504: 222e 0010 movel %fp@(16),%d1 59508: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 5950c: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 59512: 2d41 000c movel %d1,%fp@(12) 59516: 2d40 0008 movel %d0,%fp@(8) } 5951a: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5951c: 4ef9 0005 9620 jmp 59620 ... 00044e40 : int aio_cancel( int filedes __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { 44e40: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44e44: 4eb9 0004 d430 jsr 4d430 <__errno> 44e4a: 7258 moveq #88,%d1 44e4c: 2040 moveal %d0,%a0 } 44e4e: 70ff moveq #-1,%d0 44e50: 4e5e unlk %fp int aio_cancel( int filedes __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44e52: 2081 movel %d1,%a0@ } 44e54: 4e75 rts ... 00044e58 : #include int aio_error( const struct aiocb *aiocbp __attribute__((unused)) ) { 44e58: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44e5c: 4eb9 0004 d430 jsr 4d430 <__errno> 44e62: 7258 moveq #88,%d1 44e64: 2040 moveal %d0,%a0 } 44e66: 70ff moveq #-1,%d0 44e68: 4e5e unlk %fp int aio_error( const struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44e6a: 2081 movel %d1,%a0@ } 44e6c: 4e75 rts ... 00044e70 : int aio_fsync( int op __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { 44e70: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44e74: 4eb9 0004 d430 jsr 4d430 <__errno> 44e7a: 7258 moveq #88,%d1 44e7c: 2040 moveal %d0,%a0 } 44e7e: 70ff moveq #-1,%d0 44e80: 4e5e unlk %fp int aio_fsync( int op __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44e82: 2081 movel %d1,%a0@ } 44e84: 4e75 rts ... 00044e88 : #include int aio_read( struct aiocb *aiocbp __attribute__((unused)) ) { 44e88: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44e8c: 4eb9 0004 d430 jsr 4d430 <__errno> 44e92: 7258 moveq #88,%d1 44e94: 2040 moveal %d0,%a0 } 44e96: 70ff moveq #-1,%d0 44e98: 4e5e unlk %fp int aio_read( struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44e9a: 2081 movel %d1,%a0@ } 44e9c: 4e75 rts ... 00044ea0 : #include int aio_return( const struct aiocb *aiocbp __attribute__((unused)) ) { 44ea0: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44ea4: 4eb9 0004 d430 jsr 4d430 <__errno> 44eaa: 7258 moveq #88,%d1 44eac: 2040 moveal %d0,%a0 } 44eae: 70ff moveq #-1,%d0 44eb0: 4e5e unlk %fp int aio_return( const struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44eb2: 2081 movel %d1,%a0@ } 44eb4: 4e75 rts ... 00044eb8 : int aio_suspend( const struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), const struct timespec *timeout __attribute__((unused)) ) { 44eb8: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44ebc: 4eb9 0004 d430 jsr 4d430 <__errno> 44ec2: 7258 moveq #88,%d1 44ec4: 2040 moveal %d0,%a0 } 44ec6: 70ff moveq #-1,%d0 44ec8: 4e5e unlk %fp const struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), const struct timespec *timeout __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44eca: 2081 movel %d1,%a0@ } 44ecc: 4e75 rts ... 00044ed0 : #include int aio_write( struct aiocb *aiocbp __attribute__((unused)) ) { 44ed0: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44ed4: 4eb9 0004 d430 jsr 4d430 <__errno> 44eda: 7258 moveq #88,%d1 44edc: 2040 moveal %d0,%a0 } 44ede: 70ff moveq #-1,%d0 44ee0: 4e5e unlk %fp int aio_write( struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44ee2: 2081 movel %d1,%a0@ } 44ee4: 4e75 rts ... 0006017c : #include int chdir( const char *pathname ) { 6017c: 4e56 ffec linkw %fp,#-20 60180: 2f03 movel %d3,%sp@- 60182: 262e 0008 movel %fp@(8),%d3 60186: 2f02 movel %d2,%sp@- rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 60188: 4a83 tstl %d3 6018a: 6612 bnes 6019e rtems_set_errno_and_return_minus_one( EFAULT ); 6018c: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 60192: 740e moveq #14,%d2 60194: 72ff moveq #-1,%d1 60196: 2040 moveal %d0,%a0 60198: 2082 movel %d2,%a0@ 6019a: 6000 00ce braw 6026a /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 6019e: 2f03 movel %d3,%sp@- rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 601a0: 240e movel %fp,%d2 601a2: 0682 ffff ffec addil #-20,%d2 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 601a8: 4eb9 0007 c05c jsr 7c05c rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 601ae: 7201 moveq #1,%d1 601b0: 2e81 movel %d1,%sp@ 601b2: 2f02 movel %d2,%sp@- 601b4: 4878 0001 pea 1 601b8: 2f00 movel %d0,%sp@- 601ba: 2f03 movel %d3,%sp@- 601bc: 4eb9 0004 5772 jsr 45772 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 601c2: 4fef 0014 lea %sp@(20),%sp 601c6: 4a80 tstl %d0 601c8: 6706 beqs 601d0 601ca: 72ff moveq #-1,%d1 601cc: 6000 009c braw 6026a return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 601d0: 226e fff8 moveal %fp@(-8),%a1 601d4: 2069 0010 moveal %a1@(16),%a0 601d8: 4a88 tstl %a0 601da: 6620 bnes 601fc rtems_filesystem_freenode( &loc ); 601dc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 601e0: 4a88 tstl %a0 <== NOT EXECUTED 601e2: 6706 beqs 601ea <== NOT EXECUTED 601e4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 601e6: 4e90 jsr %a0@ <== NOT EXECUTED 601e8: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 601ea: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 601f0: 72ff moveq #-1,%d1 <== NOT EXECUTED 601f2: 2040 moveal %d0,%a0 <== NOT EXECUTED 601f4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 601fa: 606e bras 6026a <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 601fc: 2f02 movel %d2,%sp@- 601fe: 4e90 jsr %a0@ 60200: 588f addql #4,%sp 60202: 7201 moveq #1,%d1 60204: b280 cmpl %d0,%d1 60206: 6726 beqs 6022e rtems_filesystem_freenode( &loc ); 60208: 206e fff8 moveal %fp@(-8),%a0 6020c: 4a88 tstl %a0 6020e: 670e beqs 6021e 60210: 2068 001c moveal %a0@(28),%a0 60214: 4a88 tstl %a0 60216: 6706 beqs 6021e 60218: 2f02 movel %d2,%sp@- 6021a: 4e90 jsr %a0@ 6021c: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 6021e: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 60224: 72ff moveq #-1,%d1 60226: 2040 moveal %d0,%a0 60228: 7014 moveq #20,%d0 6022a: 2080 movel %d0,%a0@ 6022c: 603c bras 6026a } rtems_filesystem_freenode( &rtems_filesystem_current ); 6022e: 2279 0009 717c moveal 9717c ,%a1 60234: 2069 0010 moveal %a1@(16),%a0 60238: 4a88 tstl %a0 6023a: 6710 beqs 6024c 6023c: 2068 001c moveal %a0@(28),%a0 60240: 4a88 tstl %a0 60242: 6708 beqs 6024c 60244: 4869 0004 pea %a1@(4) 60248: 4e90 jsr %a0@ 6024a: 588f addql #4,%sp rtems_filesystem_current = loc; 6024c: 4878 0014 pea 14 60250: 486e ffec pea %fp@(-20) 60254: 2039 0009 717c movel 9717c ,%d0 6025a: 5880 addql #4,%d0 6025c: 2f00 movel %d0,%sp@- 6025e: 4eb9 0007 8fec jsr 78fec return 0; 60264: 4fef 000c lea %sp@(12),%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 60268: 4281 clrl %d1 return 0; } 6026a: 242e ffe4 movel %fp@(-28),%d2 6026e: 2001 movel %d1,%d0 60270: 262e ffe8 movel %fp@(-24),%d3 60274: 4e5e unlk %fp 60276: 4e75 rts 000452f0 : int chmod( const char *path, mode_t mode ) { 452f0: 4e56 ffec linkw %fp,#-20 452f4: 2f03 movel %d3,%sp@- 452f6: 262e 0008 movel %fp@(8),%d3 452fa: 2f02 movel %d2,%sp@- int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 452fc: 240e movel %fp,%d2 452fe: 0682 ffff ffec addil #-20,%d2 45304: 2f03 movel %d3,%sp@- 45306: 4eb9 0007 c05c jsr 7c05c 4530c: 7201 moveq #1,%d1 4530e: 2e81 movel %d1,%sp@ 45310: 2f02 movel %d2,%sp@- 45312: 42a7 clrl %sp@- 45314: 2f00 movel %d0,%sp@- 45316: 2f03 movel %d3,%sp@- 45318: 4eb9 0004 5772 jsr 45772 if ( status != 0 ) 4531e: 4fef 0014 lea %sp@(20),%sp 45322: 4a80 tstl %d0 45324: 6706 beqs 4532c 45326: 76ff moveq #-1,%d3 45328: 6000 0082 braw 453ac return -1; if ( !loc.handlers ){ 4532c: 206e fff4 moveal %fp@(-12),%a0 45330: 4a88 tstl %a0 45332: 6626 bnes 4535a rtems_filesystem_freenode( &loc ); 45334: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 45338: 4a88 tstl %a0 <== NOT EXECUTED 4533a: 670e beqs 4534a <== NOT EXECUTED 4533c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 45340: 4a88 tstl %a0 <== NOT EXECUTED 45342: 6706 beqs 4534a <== NOT EXECUTED 45344: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45346: 4e90 jsr %a0@ <== NOT EXECUTED 45348: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4534a: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 45350: 76ff moveq #-1,%d3 <== NOT EXECUTED 45352: 2040 moveal %d0,%a0 <== NOT EXECUTED 45354: 7009 moveq #9,%d0 <== NOT EXECUTED 45356: 2080 movel %d0,%a0@ <== NOT EXECUTED 45358: 6052 bras 453ac <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 4535a: 2068 001c moveal %a0@(28),%a0 4535e: 4a88 tstl %a0 45360: 6628 bnes 4538a rtems_filesystem_freenode( &loc ); 45362: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 45366: 4a88 tstl %a0 <== NOT EXECUTED 45368: 670e beqs 45378 <== NOT EXECUTED 4536a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4536e: 4a88 tstl %a0 <== NOT EXECUTED 45370: 6706 beqs 45378 <== NOT EXECUTED 45372: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45374: 4e90 jsr %a0@ <== NOT EXECUTED 45376: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 45378: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 4537e: 76ff moveq #-1,%d3 <== NOT EXECUTED 45380: 2040 moveal %d0,%a0 <== NOT EXECUTED 45382: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 45388: 6022 bras 453ac <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4538a: 2f2e 000c movel %fp@(12),%sp@- 4538e: 2f02 movel %d2,%sp@- 45390: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 45392: 206e fff8 moveal %fp@(-8),%a0 if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 45396: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 45398: 508f addql #8,%sp 4539a: 4a88 tstl %a0 4539c: 670e beqs 453ac 4539e: 2068 001c moveal %a0@(28),%a0 453a2: 4a88 tstl %a0 453a4: 6706 beqs 453ac 453a6: 2f02 movel %d2,%sp@- 453a8: 4e90 jsr %a0@ 453aa: 588f addql #4,%sp return result; } 453ac: 2003 movel %d3,%d0 453ae: 242e ffe4 movel %fp@(-28),%d2 453b2: 262e ffe8 movel %fp@(-24),%d3 453b6: 4e5e unlk %fp 453b8: 4e75 rts ... 00060278 : int chown( const char *path, uid_t owner, gid_t group ) { 60278: 4e56 ffdc linkw %fp,#-36 6027c: 48d7 003c moveml %d2-%d5,%sp@ 60280: 262e 0008 movel %fp@(8),%d3 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 60284: 240e movel %fp,%d2 60286: 0682 ffff ffec addil #-20,%d2 6028c: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 6028e: 382e 000e movew %fp@(14),%d4 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 60292: 4eb9 0007 c05c jsr 7c05c 60298: 7201 moveq #1,%d1 6029a: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 6029c: 3a2e 0012 movew %fp@(18),%d5 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 602a0: 2f02 movel %d2,%sp@- 602a2: 42a7 clrl %sp@- 602a4: 2f00 movel %d0,%sp@- 602a6: 2f03 movel %d3,%sp@- 602a8: 4eb9 0004 5772 jsr 45772 602ae: 4fef 0014 lea %sp@(20),%sp 602b2: 4a80 tstl %d0 602b4: 6704 beqs 602ba 602b6: 76ff moveq #-1,%d3 602b8: 6054 bras 6030e return -1; if ( !loc.ops->chown_h ) { 602ba: 226e fff8 moveal %fp@(-8),%a1 602be: 2069 0018 moveal %a1@(24),%a0 602c2: 4a88 tstl %a0 602c4: 6620 bnes 602e6 rtems_filesystem_freenode( &loc ); 602c6: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 602ca: 4a88 tstl %a0 <== NOT EXECUTED 602cc: 6706 beqs 602d4 <== NOT EXECUTED 602ce: 2f02 movel %d2,%sp@- <== NOT EXECUTED 602d0: 4e90 jsr %a0@ <== NOT EXECUTED 602d2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 602d4: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 602da: 76ff moveq #-1,%d3 <== NOT EXECUTED 602dc: 2040 moveal %d0,%a0 <== NOT EXECUTED 602de: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 602e4: 6028 bras 6030e <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 602e6: 3f05 movew %d5,%sp@- 602e8: 4267 clrw %sp@- 602ea: 3f04 movew %d4,%sp@- 602ec: 4267 clrw %sp@- 602ee: 2f02 movel %d2,%sp@- 602f0: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 602f2: 206e fff8 moveal %fp@(-8),%a0 if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 602f6: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 602f8: 4fef 000c lea %sp@(12),%sp 602fc: 4a88 tstl %a0 602fe: 670e beqs 6030e 60300: 2068 001c moveal %a0@(28),%a0 60304: 4a88 tstl %a0 60306: 6706 beqs 6030e 60308: 2f02 movel %d2,%sp@- 6030a: 4e90 jsr %a0@ 6030c: 588f addql #4,%sp return result; } 6030e: 2003 movel %d3,%d0 60310: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 60316: 4e5e unlk %fp 60318: 4e75 rts ... 0006031c : #include int chroot( const char *pathname ) { 6031c: 4e56 ffec linkw %fp,#-20 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 60320: 203c 0009 bb78 movel #637816,%d0 #include int chroot( const char *pathname ) { 60326: 2f0b movel %a3,%sp@- 60328: 2f0a movel %a2,%sp@- int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 6032a: b0b9 0009 717c cmpl 9717c ,%d0 60330: 6628 bnes 6035a rtems_libio_set_private_env(); /* try to set a new private env*/ 60332: 4eb9 0006 163e jsr 6163e if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 60338: 41f9 0009 bb78 lea 9bb78 ,%a0 6033e: b1f9 0009 717c cmpal 9717c ,%a0 60344: 6614 bnes 6035a rtems_set_errno_and_return_minus_one( ENOTSUP ); 60346: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 6034c: 72ff moveq #-1,%d1 <== NOT EXECUTED 6034e: 2040 moveal %d0,%a0 <== NOT EXECUTED 60350: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 60356: 6000 0084 braw 603dc <== NOT EXECUTED } result = chdir(pathname); 6035a: 2f2e 0008 movel %fp@(8),%sp@- 6035e: 4eb9 0006 017c jsr 6017c if (result) { 60364: 588f addql #4,%sp 60366: 4a80 tstl %d0 60368: 6620 bnes 6038a rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 6036a: 42a7 clrl %sp@- 6036c: 486e ffec pea %fp@(-20) 60370: 42a7 clrl %sp@- 60372: 4878 0001 pea 1 60376: 4879 0008 fdab pea 8fdab 6037c: 4eb9 0004 5772 jsr 45772 60382: 4fef 0014 lea %sp@(20),%sp 60386: 4a80 tstl %d0 60388: 6714 beqs 6039e /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 6038a: 45f9 0007 5fb4 lea 75fb4 <__errno>,%a2 <== NOT EXECUTED 60390: 4e92 jsr %a2@ <== NOT EXECUTED 60392: 2640 moveal %d0,%a3 <== NOT EXECUTED 60394: 4e92 jsr %a2@ <== NOT EXECUTED 60396: 72ff moveq #-1,%d1 <== NOT EXECUTED 60398: 2040 moveal %d0,%a0 <== NOT EXECUTED 6039a: 2690 movel %a0@,%a3@ <== NOT EXECUTED 6039c: 603e bras 603dc <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 6039e: 2279 0009 717c moveal 9717c ,%a1 603a4: 2069 0024 moveal %a1@(36),%a0 603a8: 4a88 tstl %a0 603aa: 6710 beqs 603bc 603ac: 2068 001c moveal %a0@(28),%a0 603b0: 4a88 tstl %a0 603b2: 6708 beqs 603bc 603b4: 4869 0018 pea %a1@(24) 603b8: 4e90 jsr %a0@ 603ba: 588f addql #4,%sp rtems_filesystem_root = loc; 603bc: 4878 0014 pea 14 603c0: 486e ffec pea %fp@(-20) 603c4: 2079 0009 717c moveal 9717c ,%a0 603ca: 41e8 0018 lea %a0@(24),%a0 603ce: 2f08 movel %a0,%sp@- 603d0: 4eb9 0007 8fec jsr 78fec return 0; 603d6: 4fef 000c lea %sp@(12),%sp if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; 603da: 4281 clrl %d1 return 0; } 603dc: 246e ffe4 moveal %fp@(-28),%a2 603e0: 2001 movel %d1,%d0 603e2: 266e ffe8 moveal %fp@(-24),%a3 603e6: 4e5e unlk %fp 603e8: 4e75 rts ... 00044ee8 : int clock_getcpuclockid( pid_t pid, clockid_t *clock_id ) { 44ee8: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44eec: 4eb9 0004 d430 jsr 4d430 <__errno> 44ef2: 7258 moveq #88,%d1 44ef4: 2040 moveal %d0,%a0 } 44ef6: 70ff moveq #-1,%d0 44ef8: 4e5e unlk %fp int clock_getcpuclockid( pid_t pid, clockid_t *clock_id ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44efa: 2081 movel %d1,%a0@ } 44efc: 4e75 rts ... 00044f00 : int clock_getenable_attr( clockid_t clock_id, int *attr ) { 44f00: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44f04: 4eb9 0004 d430 jsr 4d430 <__errno> 44f0a: 7258 moveq #88,%d1 44f0c: 2040 moveal %d0,%a0 } 44f0e: 70ff moveq #-1,%d0 44f10: 4e5e unlk %fp int clock_getenable_attr( clockid_t clock_id, int *attr ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44f12: 2081 movel %d1,%a0@ } 44f14: 4e75 rts ... 00044f18 : int clock_setenable_attr( clockid_t clock_id, int attr ) { 44f18: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44f1c: 4eb9 0004 d430 jsr 4d430 <__errno> 44f22: 7258 moveq #88,%d1 44f24: 2040 moveal %d0,%a0 } 44f26: 70ff moveq #-1,%d0 44f28: 4e5e unlk %fp int clock_setenable_attr( clockid_t clock_id, int attr ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44f2a: 2081 movel %d1,%a0@ } 44f2c: 4e75 rts ... 00048eb4 : #include int close( int fd ) { 48eb4: 4e56 0000 linkw %fp,#0 48eb8: 202e 0008 movel %fp@(8),%d0 48ebc: 2f0a movel %a2,%sp@- 48ebe: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 48ec0: b0b9 0005 b434 cmpl 5b434 ,%d0 48ec6: 6416 bccs 48ede iop = rtems_libio_iop(fd); 48ec8: 2479 0005 cb34 moveal 5cb34 ,%a2 48ece: ed88 lsll #6,%d0 48ed0: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 48ed2: 202a 0014 movel %a2@(20),%d0 48ed6: 0280 0000 0100 andil #256,%d0 48edc: 6610 bnes 48eee 48ede: 4eb9 0004 ca1c jsr 4ca1c <__errno> 48ee4: 74ff moveq #-1,%d2 48ee6: 2040 moveal %d0,%a0 48ee8: 7009 moveq #9,%d0 48eea: 2080 movel %d0,%a0@ 48eec: 603a bras 48f28 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 48eee: 206a 003c moveal %a2@(60),%a0 48ef2: 2068 0004 moveal %a0@(4),%a0 48ef6: 4a88 tstl %a0 48ef8: 6604 bnes 48efe 48efa: 4282 clrl %d2 <== NOT EXECUTED 48efc: 6008 bras 48f06 <== NOT EXECUTED rc = (*iop->handlers->close_h)( iop ); 48efe: 2f0a movel %a2,%sp@- 48f00: 4e90 jsr %a0@ 48f02: 588f addql #4,%sp 48f04: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 48f06: 206a 0024 moveal %a2@(36),%a0 48f0a: 4a88 tstl %a0 48f0c: 6710 beqs 48f1e 48f0e: 2068 001c moveal %a0@(28),%a0 48f12: 4a88 tstl %a0 48f14: 6708 beqs 48f1e 48f16: 486a 0018 pea %a2@(24) 48f1a: 4e90 jsr %a0@ 48f1c: 588f addql #4,%sp rtems_libio_free( iop ); 48f1e: 2f0a movel %a2,%sp@- 48f20: 4eb9 0004 9280 jsr 49280 return rc; 48f26: 588f addql #4,%sp } 48f28: 2002 movel %d2,%d0 48f2a: 242e fff8 movel %fp@(-8),%d2 48f2e: 246e fffc moveal %fp@(-4),%a2 48f32: 4e5e unlk %fp 48f34: 4e75 rts 00048400 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 48400: 4e56 fff4 linkw %fp,#-12 48404: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 48408: 486e fff4 pea %fp@(-12) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 4840c: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 48410: 42ae fff8 clrl %fp@(-8) args.mode = 0; 48414: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 48418: 2f29 000c movel %a1@(12),%sp@- 4841c: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 48420: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 48424: 4eb9 0004 9640 jsr 49640 np->major, np->minor, (void *) &args ); if ( status ) { 4842a: 4fef 000c lea %sp@(12),%sp 4842e: 4a80 tstl %d0 48430: 670a beqs 4843c return rtems_deviceio_errno(status); 48432: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48434: 4eb9 0004 84f0 jsr 484f0 <== NOT EXECUTED 4843a: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4843c: 4e5e unlk %fp 4843e: 4e75 rts 00048452 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 48452: 4e56 ffe4 linkw %fp,#-28 48456: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4845a: 246e 0014 moveal %fp@(20),%a2 4845e: 282e 0008 movel %fp@(8),%d4 48462: 262e 000c movel %fp@(12),%d3 assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 48466: 2652 moveal %a2@,%a3 if (!device_name_table) 48468: 4a8b tstl %a3 4846a: 670a beqs 48476 4846c: 4282 clrl %d2 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4846e: 4bf9 0004 baac lea 4baac ,%a5 48474: 6058 bras 484ce } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 48476: 4eb9 0004 a7a4 jsr 4a7a4 <__errno> <== NOT EXECUTED 4847c: 740e moveq #14,%d2 <== NOT EXECUTED 4847e: 72ff moveq #-1,%d1 <== NOT EXECUTED 48480: 2040 moveal %d0,%a0 <== NOT EXECUTED 48482: 2082 movel %d2,%a0@ <== NOT EXECUTED 48484: 605e bras 484e4 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 48486: 2853 moveal %a3@,%a4 48488: 4a8c tstl %a4 4848a: 673c beqs 484c8 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4848c: 2f03 movel %d3,%sp@- 4848e: 2f0c movel %a4,%sp@- 48490: 2f04 movel %d4,%sp@- 48492: 4e95 jsr %a5@ 48494: 4fef 000c lea %sp@(12),%sp 48498: 4a80 tstl %d0 4849a: 662c bnes 484c8 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4849c: 4a34 3800 tstb %a4@(00000000,%d3:l) 484a0: 6626 bnes 484c8 /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 484a2: 2079 0005 93d0 moveal 593d0 ,%a0 484a8: 4281 clrl %d1 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 484aa: 203c 0005 9384 movel #365444,%d0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 484b0: 2568 0028 0010 movel %a0@(40),%a2@(16) continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 484b6: 41f9 0005 933c lea 5933c ,%a0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 484bc: 2540 0008 movel %d0,%a2@(8) pathloc->ops = &devFS_ops; 484c0: 2548 000c movel %a0,%a2@(12) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 484c4: 248b movel %a3,%a2@ pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 484c6: 601c bras 484e4 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 484c8: 5282 addql #1,%d2 484ca: 47eb 0014 lea %a3@(20),%a3 484ce: b4b9 0005 9258 cmpl 59258 ,%d2 484d4: 65b0 bcss 48486 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 484d6: 4eb9 0004 a7a4 jsr 4a7a4 <__errno> 484dc: 72ff moveq #-1,%d1 484de: 2040 moveal %d0,%a0 484e0: 7002 moveq #2,%d0 484e2: 2080 movel %d0,%a0@ } 484e4: 2001 movel %d1,%d0 484e6: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 484ec: 4e5e unlk %fp 484ee: 4e75 rts 00041c80 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 41c80: 4e56 0000 linkw %fp,#0 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41c84: 2039 0005 9258 movel 59258 ,%d0 41c8a: 2200 movel %d0,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 41c8c: 2f0a movel %a2,%sp@- 41c8e: 246e 0008 moveal %fp@(8),%a2 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41c92: e989 lsll #4,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 41c94: 2f02 movel %d2,%sp@- rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41c96: 2041 moveal %d1,%a0 41c98: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41c9c: 4eb9 0004 81ec jsr 481ec <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca2: 588f addql #4,%sp ) { rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41ca4: 2400 movel %d0,%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca6: 6610 bnes 41cb8 rtems_set_errno_and_return_minus_one( ENOMEM ); 41ca8: 4eb9 0004 a7a4 jsr 4a7a4 <__errno> <== NOT EXECUTED 41cae: 720c moveq #12,%d1 <== NOT EXECUTED 41cb0: 2040 moveal %d0,%a0 <== NOT EXECUTED 41cb2: 70ff moveq #-1,%d0 <== NOT EXECUTED 41cb4: 2081 movel %d1,%a0@ <== NOT EXECUTED 41cb6: 6038 bras 41cf0 <== NOT EXECUTED memset( 41cb8: 2039 0005 9258 movel 59258 ,%d0 41cbe: 2200 movel %d0,%d1 41cc0: e989 lsll #4,%d1 41cc2: 2041 moveal %d1,%a0 41cc4: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41cc8: 42a7 clrl %sp@- 41cca: 2f02 movel %d2,%sp@- 41ccc: 4eb9 0004 aff4 jsr 4aff4 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; 41cd2: 4fef 000c lea %sp@(12),%sp device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 41cd6: 203c 0005 9384 movel #365444,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41cdc: 41f9 0005 933c lea 5933c ,%a0 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 41ce2: 2540 0024 movel %d0,%a2@(36) temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 41ce6: 4280 clrl %d0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41ce8: 2548 0028 movel %a0,%a2@(40) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 41cec: 2542 001c movel %d2,%a2@(28) return 0; } 41cf0: 242e fff8 movel %fp@(-8),%d2 41cf4: 246e fffc moveal %fp@(-4),%a2 41cf8: 4e5e unlk %fp 41cfa: 4e75 rts 00041e30 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 41e30: 4e56 fff0 linkw %fp,#-16 41e34: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e38: 486e fff0 pea %fp@(-16) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; 41e3c: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41e42: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e46: 2f29 000c movel %a1@(12),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; args.buffer = buffer; 41e4a: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) status = rtems_io_control( 41e50: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41e54: 2d48 fff0 movel %a0,%fp@(-16) args.command = command; args.buffer = buffer; status = rtems_io_control( 41e58: 4eb9 0004 583c jsr 4583c np->major, np->minor, (void *) &args ); if ( status ) 41e5e: 4fef 000c lea %sp@(12),%sp 41e62: 4a80 tstl %d0 41e64: 670c beqs 41e72 return rtems_deviceio_errno(status); 41e66: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41e68: 4eb9 0004 84f0 jsr 484f0 <== NOT EXECUTED 41e6e: 588f addql #4,%sp <== NOT EXECUTED 41e70: 6004 bras 41e76 <== NOT EXECUTED return args.ioctl_return; 41e72: 202e fffc movel %fp@(-4),%d0 } 41e76: 4e5e unlk %fp 41e78: 4e75 rts ... 00041cfc : * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41cfc: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41cfe: 4e56 ffdc linkw %fp,#-36 41d02: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 41d06: 246e 0008 moveal %fp@(8),%a2 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41d0a: 1012 moveb %a2@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d0c: 282e 000c movel %fp@(12),%d4 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41d10: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d12: 2c2e 0010 movel %fp@(16),%d6 41d16: 2a2e 0014 movel %fp@(20),%d5 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41d1a: b280 cmpl %d0,%d1 41d1c: 6628 bnes 41d46 41d1e: 123c 0065 moveb #101,%d1 41d22: 102a 0001 moveb %a2@(1),%d0 41d26: 49c0 extbl %d0 41d28: b280 cmpl %d0,%d1 41d2a: 661a bnes 41d46 (path[2] == 'v') && (path[3] == '\0')) 41d2c: 123c 0076 moveb #118,%d1 41d30: 102a 0002 moveb %a2@(2),%d0 41d34: 49c0 extbl %d0 41d36: b280 cmpl %d0,%d1 41d38: 660c bnes 41d46 41d3a: 4a2a 0003 tstb %a2@(3) 41d3e: 6606 bnes 41d46 41d40: 4201 clrb %d1 41d42: 6000 00d2 braw 41e16 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 41d46: 2004 movel %d4,%d0 41d48: 0280 0000 f000 andil #61440,%d0 41d4e: 0c80 0000 6000 cmpil #24576,%d0 41d54: 671a beqs 41d70 41d56: 0c80 0000 2000 cmpil #8192,%d0 41d5c: 6712 beqs 41d70 rtems_set_errno_and_return_minus_one( EINVAL ); 41d5e: 4eb9 0004 a7a4 jsr 4a7a4 <__errno> <== NOT EXECUTED 41d64: 7816 moveq #22,%d4 <== NOT EXECUTED 41d66: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d68: 2040 moveal %d0,%a0 <== NOT EXECUTED 41d6a: 2084 movel %d4,%a0@ <== NOT EXECUTED 41d6c: 6000 00a8 braw 41e16 <== NOT EXECUTED else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 41d70: 206e 0018 moveal %fp@(24),%a0 41d74: 2650 moveal %a0@,%a3 if (!device_name_table) 41d76: 4a8b tstl %a3 41d78: 670e beqs 41d88 41d7a: 284b moveal %a3,%a4 41d7c: 74ff moveq #-1,%d2 41d7e: 4283 clrl %d3 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 41d80: 4bf9 0004 b5d0 lea 4b5d0 ,%a5 41d86: 6038 bras 41dc0 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 41d88: 4eb9 0004 a7a4 jsr 4a7a4 <__errno> <== NOT EXECUTED 41d8e: 760e moveq #14,%d3 <== NOT EXECUTED 41d90: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d92: 2240 moveal %d0,%a1 <== NOT EXECUTED 41d94: 2283 movel %d3,%a1@ <== NOT EXECUTED 41d96: 607e bras 41e16 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 41d98: 2014 movel %a4@,%d0 41d9a: 671c beqs 41db8 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 41d9c: 2f00 movel %d0,%sp@- 41d9e: 2f0a movel %a2,%sp@- 41da0: 4e95 jsr %a5@ 41da2: 508f addql #8,%sp 41da4: 4a80 tstl %d0 41da6: 6612 bnes 41dba rtems_set_errno_and_return_minus_one( EEXIST ); 41da8: 4eb9 0004 a7a4 jsr 4a7a4 <__errno> <== NOT EXECUTED 41dae: 7411 moveq #17,%d2 <== NOT EXECUTED 41db0: 72ff moveq #-1,%d1 <== NOT EXECUTED 41db2: 2040 moveal %d0,%a0 <== NOT EXECUTED 41db4: 2082 movel %d2,%a0@ <== NOT EXECUTED 41db6: 605e bras 41e16 <== NOT EXECUTED 41db8: 2403 movel %d3,%d2 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 41dba: 5283 addql #1,%d3 41dbc: 49ec 0014 lea %a4@(20),%a4 41dc0: b6b9 0005 9258 cmpl 59258 ,%d3 41dc6: 65d0 bcss 41d98 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 41dc8: 70ff moveq #-1,%d0 41dca: b082 cmpl %d2,%d0 41dcc: 6610 bnes 41dde rtems_set_errno_and_return_minus_one( ENOMEM ); 41dce: 4eb9 0004 a7a4 jsr 4a7a4 <__errno> <== NOT EXECUTED 41dd4: 72ff moveq #-1,%d1 <== NOT EXECUTED 41dd6: 2040 moveal %d0,%a0 <== NOT EXECUTED 41dd8: 700c moveq #12,%d0 <== NOT EXECUTED 41dda: 2080 movel %d0,%a0@ <== NOT EXECUTED 41ddc: 6038 bras 41e16 <== NOT EXECUTED _ISR_Disable(level); 41dde: 203c 0000 0700 movel #1792,%d0 41de4: 40c3 movew %sr,%d3 41de6: 8083 orl %d3,%d0 41de8: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 41dea: 2002 movel %d2,%d0 41dec: e988 lsll #4,%d0 41dee: 2240 moveal %d0,%a1 41df0: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 41df4: d7c8 addal %a0,%a3 41df6: 268a movel %a2,%a3@ device_name_table[slot].device_name_length = strlen(path); 41df8: 2f0a movel %a2,%sp@- 41dfa: 4eb9 0004 ba94 jsr 4ba94 41e00: 588f addql #4,%sp device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 41e02: 2744 0010 movel %d4,%a3@(16) if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 41e06: 2740 0004 movel %d0,%a3@(4) device_name_table[slot].major = major; 41e0a: 2746 0008 movel %d6,%a3@(8) device_name_table[slot].minor = minor; 41e0e: 2745 000c movel %d5,%a3@(12) device_name_table[slot].mode = mode; _ISR_Enable(level); 41e12: 46c3 movew %d3,%sr 41e14: 4281 clrl %d1 return 0; } 41e16: 2001 movel %d1,%d0 41e18: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 41e1e: 4e5e unlk %fp 41e20: 4e75 rts ... 00041e24 : /* * There is only one type of node: device */ return RTEMS_FILESYSTEM_DEVICE; } 41e24: 7002 moveq #2,%d0 #include "devfs.h" int devFS_node_type( rtems_filesystem_location_info_t *pathloc ) { 41e26: 4e56 0000 linkw %fp,#0 /* * There is only one type of node: device */ return RTEMS_FILESYSTEM_DEVICE; } 41e2a: 4e5e unlk %fp 41e2c: 4e75 rts ... 00041e7c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 41e7c: 4e56 fff4 linkw %fp,#-12 41e80: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41e84: 486e fff4 pea %fp@(-12) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 41e88: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41e8e: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 41e92: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) status = rtems_io_open( 41e98: 2f29 000c movel %a1@(12),%sp@- 41e9c: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41ea0: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41ea4: 4eb9 0004 595c jsr 4595c np->major, np->minor, (void *) &args ); if ( status ) 41eaa: 4fef 000c lea %sp@(12),%sp 41eae: 4a80 tstl %d0 41eb0: 670a beqs 41ebc return rtems_deviceio_errno(status); 41eb2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41eb4: 4eb9 0004 84f0 jsr 484f0 <== NOT EXECUTED 41eba: 588f addql #4,%sp <== NOT EXECUTED return 0; } 41ebc: 4e5e unlk %fp 41ebe: 4e75 rts 00041ec0 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 41ec0: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 41ec4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 41ec8: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 41ecc: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41ed2: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 41ed6: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 41edc: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41ee2: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 41ee6: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 41eea: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41eee: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 41ef2: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41ef6: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 41efa: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 41efe: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 41f02: 4eb9 0004 59b4 jsr 459b4 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 41f08: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 41f0c: 4a80 tstl %d0 <== NOT EXECUTED 41f0e: 670c beqs 41f1c <== NOT EXECUTED return rtems_deviceio_errno(status); 41f10: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41f12: 4eb9 0004 84f0 jsr 484f0 <== NOT EXECUTED 41f18: 588f addql #4,%sp <== NOT EXECUTED 41f1a: 6004 bras 41f20 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41f1c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 41f20: 4e5e unlk %fp <== NOT EXECUTED 41f22: 4e75 rts 00041f24 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 41f24: 4e56 0000 linkw %fp,#0 41f28: 206e 0008 moveal %fp@(8),%a0 41f2c: 226e 000c moveal %fp@(12),%a1 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 41f30: 2050 moveal %a0@,%a0 if (!the_dev) 41f32: 4a88 tstl %a0 41f34: 6610 bnes 41f46 rtems_set_errno_and_return_minus_one( EFAULT ); 41f36: 4eb9 0004 a7a4 jsr 4a7a4 <__errno> <== NOT EXECUTED 41f3c: 720e moveq #14,%d1 <== NOT EXECUTED 41f3e: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f40: 70ff moveq #-1,%d0 <== NOT EXECUTED 41f42: 2081 movel %d1,%a0@ <== NOT EXECUTED 41f44: 6016 bras 41f5c <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 41f46: 2228 000c movel %a0@(12),%d1 buf->st_mode = the_dev->mode; 41f4a: 4280 clrl %d0 41f4c: 2368 0010 000c movel %a0@(16),%a1@(12) the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 41f52: 2368 0008 0016 movel %a0@(8),%a1@(22) 41f58: 2341 001a movel %d1,%a1@(26) buf->st_mode = the_dev->mode; return 0; } 41f5c: 4e5e unlk %fp 41f5e: 4e75 rts 00041f60 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 41f60: 4e56 ffe4 linkw %fp,#-28 41f64: 206e 0008 moveal %fp@(8),%a0 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 41f68: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 41f6c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41f72: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 41f76: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 41f7c: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41f82: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 41f86: 2f29 000c movel %a1@(12),%sp@- 41f8a: 2f29 0008 movel %a1@(8),%sp@- rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41f8e: 2028 000c movel %a0@(12),%d0 41f92: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41f96: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 41f9a: 2d40 ffe8 movel %d0,%fp@(-24) 41f9e: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 41fa2: 4eb9 0004 5a0c jsr 45a0c np->major, np->minor, (void *) &args ); if ( status ) 41fa8: 4fef 000c lea %sp@(12),%sp 41fac: 4a80 tstl %d0 41fae: 670c beqs 41fbc return rtems_deviceio_errno(status); 41fb0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fb2: 4eb9 0004 84f0 jsr 484f0 <== NOT EXECUTED 41fb8: 588f addql #4,%sp <== NOT EXECUTED 41fba: 6004 bras 41fc0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41fbc: 202e fffc movel %fp@(-4),%d0 } 41fc0: 4e5e unlk %fp 41fc2: 4e75 rts 00044f30 : int filedes __attribute__((unused)), void *dev_data_ptr __attribute__((unused)), size_t nbyte __attribute__((unused)), int *dev_info_ptr __attribute__((unused)) ) { 44f30: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44f34: 4eb9 0004 d430 jsr 4d430 <__errno> 44f3a: 7258 moveq #88,%d1 44f3c: 2040 moveal %d0,%a0 } 44f3e: 70ff moveq #-1,%d0 44f40: 4e5e unlk %fp void *dev_data_ptr __attribute__((unused)), size_t nbyte __attribute__((unused)), int *dev_info_ptr __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44f42: 2081 movel %d1,%a0@ } 44f44: 4e75 rts ... 0004ab40 : */ int device_close( rtems_libio_t *iop ) { 4ab40: 4e56 fff4 linkw %fp,#-12 4ab44: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4ab48: 486e fff4 pea %fp@(-12) { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4ab4c: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4ab50: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4ab54: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4ab58: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4ab5c: 2f28 0050 movel %a0@(80),%sp@- 4ab60: 2f28 004c movel %a0@(76),%sp@- 4ab64: 4eb9 0004 bd54 jsr 4bd54 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4ab6a: 4fef 000c lea %sp@(12),%sp 4ab6e: 4a80 tstl %d0 4ab70: 670a beqs 4ab7c return rtems_deviceio_errno(status); 4ab72: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ab74: 4eb9 0004 c2d8 jsr 4c2d8 <== NOT EXECUTED 4ab7a: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4ab7c: 4e5e unlk %fp 4ab7e: 4e75 rts 0004aa2e : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4aa2e: 4e56 fff0 linkw %fp,#-16 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4aa32: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) the_jnode = iop->file_info; status = rtems_io_control( 4aa38: 486e fff0 pea %fp@(-16) int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4aa3c: 226e 0008 moveal %fp@(8),%a1 rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4aa40: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4aa46: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4aa4a: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4aa4e: 2f28 0050 movel %a0@(80),%sp@- 4aa52: 2f28 004c movel %a0@(76),%sp@- 4aa56: 4eb9 0004 bdac jsr 4bdac the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4aa5c: 4fef 000c lea %sp@(12),%sp 4aa60: 4a80 tstl %d0 4aa62: 670c beqs 4aa70 return rtems_deviceio_errno(status); 4aa64: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4aa66: 4eb9 0004 c2d8 jsr 4c2d8 <== NOT EXECUTED 4aa6c: 588f addql #4,%sp <== NOT EXECUTED 4aa6e: 6004 bras 4aa74 <== NOT EXECUTED return args.ioctl_return; 4aa70: 202e fffc movel %fp@(-4),%d0 } 4aa74: 4e5e unlk %fp 4aa76: 4e75 rts 0004ab80 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4ab80: 4e56 fff4 linkw %fp,#-12 4ab84: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4ab88: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4ab8c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4ab92: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4ab96: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4ab9c: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4aba0: 2f29 0050 movel %a1@(80),%sp@- 4aba4: 2f29 004c movel %a1@(76),%sp@- 4aba8: 4eb9 0004 be04 jsr 4be04 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4abae: 4fef 000c lea %sp@(12),%sp 4abb2: 4a80 tstl %d0 4abb4: 670a beqs 4abc0 return rtems_deviceio_errno(status); 4abb6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4abb8: 4eb9 0004 c2d8 jsr 4c2d8 <== NOT EXECUTED 4abbe: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4abc0: 4e5e unlk %fp 4abc2: 4e75 rts 0004aadc : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4aadc: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4aae0: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 4aae4: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4aae8: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4aaee: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4aaf4: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4aafa: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4aafe: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4ab02: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4ab06: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4ab0a: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4ab0e: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4ab12: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4ab16: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4ab1a: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4ab1e: 4eb9 0004 be5c jsr 4be5c <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4ab24: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ab28: 4a80 tstl %d0 <== NOT EXECUTED 4ab2a: 670c beqs 4ab38 <== NOT EXECUTED return rtems_deviceio_errno(status); 4ab2c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ab2e: 4eb9 0004 c2d8 jsr 4c2d8 <== NOT EXECUTED 4ab34: 588f addql #4,%sp <== NOT EXECUTED 4ab36: 6004 bras 4ab3c <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4ab38: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4ab3c: 4e5e unlk %fp <== NOT EXECUTED 4ab3e: 4e75 rts 0004aa78 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4aa78: 4e56 ffe4 linkw %fp,#-28 4aa7c: 206e 0008 moveal %fp@(8),%a0 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 4aa80: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4aa84: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4aa8a: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4aa90: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4aa96: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4aa9a: 2028 000c movel %a0@(12),%d0 4aa9e: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4aaa2: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4aaa6: 2d40 ffe8 movel %d0,%fp@(-24) 4aaaa: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4aaae: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4aab2: 2f29 0050 movel %a1@(80),%sp@- 4aab6: 2f29 004c movel %a1@(76),%sp@- 4aaba: 4eb9 0004 beb4 jsr 4beb4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4aac0: 4fef 000c lea %sp@(12),%sp 4aac4: 4a80 tstl %d0 4aac6: 670c beqs 4aad4 return rtems_deviceio_errno(status); 4aac8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4aaca: 4eb9 0004 c2d8 jsr 4c2d8 <== NOT EXECUTED 4aad0: 588f addql #4,%sp <== NOT EXECUTED 4aad2: 6004 bras 4aad8 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4aad4: 202e fffc movel %fp@(-4),%d0 } 4aad8: 4e5e unlk %fp 4aada: 4e75 rts 00043a3a : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 43a3a: 4e56 fff4 linkw %fp,#-12 43a3e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43a42: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 43a46: 4aaa 00b4 tstl %a2@(180) 43a4a: 674e beqs 43a9a rtems_interrupt_disable (level); 43a4c: 243c 0000 0700 movel #1792,%d2 43a52: 2202 movel %d2,%d1 43a54: 40c0 movew %sr,%d0 43a56: 8280 orl %d0,%d1 43a58: 46c1 movew %d1,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43a5a: 47f9 0004 4f30 lea 44f30 ,%a3 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) { 43a60: 602a bras 43a8c tty->rawOutBufState = rob_wait; 43a62: 7202 moveq #2,%d1 43a64: 2541 0094 movel %d1,%a2@(148) rtems_interrupt_enable (level); 43a68: 46c0 movew %d0,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43a6a: 42a7 clrl %sp@- 43a6c: 42a7 clrl %sp@- 43a6e: 2f2a 008c movel %a2@(140),%sp@- 43a72: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43a74: 4fef 000c lea %sp@(12),%sp 43a78: 4a80 tstl %d0 43a7a: 6708 beqs 43a84 rtems_fatal_error_occurred (sc); 43a7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43a7e: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED rtems_interrupt_disable (level); 43a84: 2202 movel %d2,%d1 43a86: 40c0 movew %sr,%d0 43a88: 8280 orl %d0,%d1 43a8a: 46c1 movew %d1,%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) { 43a8c: 206a 0084 moveal %a2@(132),%a0 43a90: 222a 0080 movel %a2@(128),%d1 43a94: b288 cmpl %a0,%d1 43a96: 66ca bnes 43a62 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 43a98: 46c0 movew %d0,%sr } } 43a9a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 43aa0: 4e5e unlk %fp 43aa2: 4e75 rts 00042d74 : #include int dup( int fildes ) { 42d74: 4e56 0000 linkw %fp,#0 return fcntl( fildes, F_DUPFD, 0 ); 42d78: 42a7 clrl %sp@- 42d7a: 42a7 clrl %sp@- 42d7c: 2f2e 0008 movel %fp@(8),%sp@- 42d80: 4eb9 0004 3178 jsr 43178 } 42d86: 4e5e unlk %fp 42d88: 4e75 rts ... 00042d1c : int dup2( int fildes, int fildes2 ) { 42d1c: 4e56 ffa8 linkw %fp,#-88 42d20: 48d7 041c moveml %d2-%d4/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d24: 280e movel %fp,%d4 42d26: 0684 ffff ffba addil #-70,%d4 42d2c: 45f9 0004 34c8 lea 434c8 ,%a2 42d32: 2f04 movel %d4,%sp@- int dup2( int fildes, int fildes2 ) { 42d34: 242e 0008 movel %fp@(8),%d2 42d38: 262e 000c movel %fp@(12),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d3c: 2f02 movel %d2,%sp@- 42d3e: 4e92 jsr %a2@ if ( status == -1 ) 42d40: 508f addql #8,%sp 42d42: 72ff moveq #-1,%d1 42d44: b280 cmpl %d0,%d1 42d46: 6720 beqs 42d68 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 42d48: 2f04 movel %d4,%sp@- 42d4a: 2f03 movel %d3,%sp@- 42d4c: 4e92 jsr %a2@ if ( status == -1 ) 42d4e: 508f addql #8,%sp 42d50: 72ff moveq #-1,%d1 42d52: b280 cmpl %d0,%d1 42d54: 6712 beqs 42d68 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 42d56: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42d58: 42a7 clrl %sp@- <== NOT EXECUTED 42d5a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42d5c: 4eb9 0004 3178 jsr 43178 <== NOT EXECUTED 42d62: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42d66: 6002 bras 42d6a <== NOT EXECUTED 42d68: 70ff moveq #-1,%d0 } 42d6a: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 42d70: 4e5e unlk %fp 42d72: 4e75 rts 000435a0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 435a0: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 435a4: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 435a8: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 435ac: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 435b0: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 435b4: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 435ba: 1202 moveb %d2,%d1 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 435bc: 4a80 tstl %d0 <== NOT EXECUTED 435be: 674c beqs 4360c <== NOT EXECUTED 435c0: 4280 clrl %d0 <== NOT EXECUTED 435c2: 1002 moveb %d2,%d0 <== NOT EXECUTED 435c4: 2079 0005 b60c moveal 5b60c <__ctype_ptr__>,%a0 <== NOT EXECUTED 435ca: 1630 0801 moveb %a0@(00000001,%d0:l),%d3 <== NOT EXECUTED 435ce: 49c3 extbl %d3 <== NOT EXECUTED 435d0: 0803 0005 btst #5,%d3 <== NOT EXECUTED 435d4: 6736 beqs 4360c <== NOT EXECUTED 435d6: 7609 moveq #9,%d3 <== NOT EXECUTED 435d8: b680 cmpl %d0,%d3 <== NOT EXECUTED 435da: 6730 beqs 4360c <== NOT EXECUTED 435dc: 163c 000a moveb #10,%d3 <== NOT EXECUTED 435e0: b680 cmpl %d0,%d3 <== NOT EXECUTED 435e2: 6728 beqs 4360c <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 435e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435e6: 4878 0002 pea 2 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 435ea: 7040 moveq #64,%d0 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 435ec: 486e fffe pea %fp@(-2) <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 435f0: b182 eorl %d0,%d2 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 435f2: 765e moveq #94,%d3 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 435f4: 1d42 ffff moveb %d2,%fp@(-1) <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 435f8: 1d43 fffe moveb %d3,%fp@(-2) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 435fc: 4eb9 0004 335e jsr 4335e <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43602: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 43606: 54aa 0028 addql #2,%a2@(40) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 4360a: 6010 bras 4361c <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 4360c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4360e: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 43614: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43616: 4eba fe40 jsr %pc@(43458 ) <== NOT EXECUTED 4361a: 508f addql #8,%sp <== NOT EXECUTED } } 4361c: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED 43622: 4e5e unlk %fp <== NOT EXECUTED 43624: 4e75 rts 00060778 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 60778: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 6077c: 2039 0009 b2ae movel 9b2ae ,%d0 <== NOT EXECUTED 60782: 670a beqs 6078e <== NOT EXECUTED fclose(group_fp); 60784: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60786: 4eb9 0007 60f2 jsr 760f2 <== NOT EXECUTED 6078c: 588f addql #4,%sp <== NOT EXECUTED } 6078e: 4e5e unlk %fp <== NOT EXECUTED 60790: 4e75 rts 00060792 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 60792: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 60796: 2039 0009 b1c6 movel 9b1c6 ,%d0 <== NOT EXECUTED 6079c: 670a beqs 607a8 <== NOT EXECUTED fclose(passwd_fp); 6079e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 607a0: 4eb9 0007 60f2 jsr 760f2 <== NOT EXECUTED 607a6: 588f addql #4,%sp <== NOT EXECUTED } 607a8: 4e5e unlk %fp <== NOT EXECUTED 607aa: 4e75 rts 00043626 : * 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) { 43626: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4362a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 4362e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 43632: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED if (tty->ccount == 0) 43636: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 4363a: 6700 0178 beqw 437b4 <== NOT EXECUTED return; if (lineFlag) { 4363e: 4a83 tstl %d3 <== NOT EXECUTED 43640: 6700 0162 beqw 437a4 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 43644: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43648: 44c0 movew %d0,%ccr <== NOT EXECUTED 4364a: 6b08 bmis 43654 <== NOT EXECUTED tty->ccount = 0; 4364c: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED return; 43650: 6000 0162 braw 437b4 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 43654: 0800 0004 btst #4,%d0 <== NOT EXECUTED 43658: 6600 014a bnew 437a4 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 4365c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4365e: 4280 clrl %d0 <== NOT EXECUTED 43660: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 43664: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 43668: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4366a: 4eba ff34 jsr %pc@(435a0 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 4366e: 508f addql #8,%sp <== NOT EXECUTED 43670: 7020 moveq #32,%d0 <== NOT EXECUTED 43672: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43676: 6700 013c beqw 437b4 <== NOT EXECUTED echo ('\n', tty); 4367a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4367e: 700a moveq #10,%d0 <== NOT EXECUTED 43680: 602c bras 436ae <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 43682: 5388 subql #1,%a0 <== NOT EXECUTED 43684: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43688: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 4368c: 2548 0020 movel %a0,%a2@(32) <== NOT EXECUTED 43690: 1431 8800 moveb %a1@(00000000,%a0:l),%d2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43694: 44c0 movew %d0,%ccr <== NOT EXECUTED 43696: 6a00 0106 bplw 4379e <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 4369a: 4a83 tstl %d3 <== NOT EXECUTED 4369c: 6620 bnes 436be <== NOT EXECUTED 4369e: 0800 0004 btst #4,%d0 <== NOT EXECUTED 436a2: 661a bnes 436be <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 436a4: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 436a8: 4280 clrl %d0 <== NOT EXECUTED 436aa: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED 436ae: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 436b2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 436b8: 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); 436ba: 6000 fee4 braw 435a0 <== NOT EXECUTED 436be: 2279 0005 b60c moveal 5b60c <__ctype_ptr__>,%a1 <== NOT EXECUTED } else if (c == '\t') { 436c4: 7209 moveq #9,%d1 <== NOT EXECUTED 436c6: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 436cc: b282 cmpl %d2,%d1 <== NOT EXECUTED 436ce: 6660 bnes 43730 <== NOT EXECUTED int col = tty->read_start_column; 436d0: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 436d4: 4201 clrb %d1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 436d6: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 436dc: 602e bras 4370c <== NOT EXECUTED c = tty->cbuf[i++]; 436de: 286a 001c moveal %a2@(28),%a4 <== NOT EXECUTED if (c == '\t') { 436e2: 4284 clrl %d4 <== NOT EXECUTED 436e4: 1834 1800 moveb %a4@(00000000,%d1:l),%d4 <== NOT EXECUTED 436e8: 7a09 moveq #9,%d5 <== NOT EXECUTED 436ea: ba84 cmpl %d4,%d5 <== NOT EXECUTED 436ec: 6606 bnes 436f4 <== NOT EXECUTED col = (col | 7) + 1; 436ee: 7807 moveq #7,%d4 <== NOT EXECUTED 436f0: 8484 orl %d4,%d2 <== NOT EXECUTED 436f2: 6014 bras 43708 <== NOT EXECUTED } else if (iscntrl (c)) { 436f4: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 <== NOT EXECUTED 436f8: 49c4 extbl %d4 <== NOT EXECUTED 436fa: 0804 0005 btst #5,%d4 <== NOT EXECUTED 436fe: 6708 beqs 43708 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43700: 4a80 tstl %d0 <== NOT EXECUTED 43702: 6706 beqs 4370a <== NOT EXECUTED col += 2; 43704: 5482 addql #2,%d2 <== NOT EXECUTED 43706: 6002 bras 4370a <== NOT EXECUTED } else { col++; 43708: 5282 addql #1,%d2 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 4370a: 5281 addql #1,%d1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4370c: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4370e: 66ce bnes 436de <== NOT EXECUTED 43710: 6016 bras 43728 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 43712: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43714: 4878 0001 pea 1 <== NOT EXECUTED 43718: 4879 0005 a37d pea 5a37d <== NOT EXECUTED 4371e: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43720: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43724: 53aa 0028 subql #1,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43728: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 4372c: 6de4 blts 43712 <== NOT EXECUTED 4372e: 606e bras 4379e <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 43730: 5282 addql #1,%d2 <== NOT EXECUTED 43732: 1231 2800 moveb %a1@(00000000,%d2:l),%d1 <== NOT EXECUTED 43736: 49c1 extbl %d1 <== NOT EXECUTED 43738: 0801 0005 btst #5,%d1 <== NOT EXECUTED 4373c: 6724 beqs 43762 <== NOT EXECUTED 4373e: 0800 0009 btst #9,%d0 <== NOT EXECUTED 43742: 671e beqs 43762 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43744: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43746: 4878 0003 pea 3 <== NOT EXECUTED 4374a: 4879 0005 a37b pea 5a37b <== NOT EXECUTED 43750: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 43752: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43756: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4375a: 6706 beqs 43762 <== NOT EXECUTED tty->column--; 4375c: 5380 subql #1,%d0 <== NOT EXECUTED 4375e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 43762: 2079 0005 b60c moveal 5b60c <__ctype_ptr__>,%a0 <== NOT EXECUTED 43768: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 4376c: 49c0 extbl %d0 <== NOT EXECUTED 4376e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43772: 670c beqs 43780 <== NOT EXECUTED 43774: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43778: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 4377e: 671e beqs 4379e <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43780: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43782: 4878 0003 pea 3 <== NOT EXECUTED 43786: 4879 0005 a37b pea 5a37b <== NOT EXECUTED 4378c: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 4378e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43792: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43796: 6706 beqs 4379e <== NOT EXECUTED tty->column--; 43798: 5380 subql #1,%d0 <== NOT EXECUTED 4379a: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } } } if (!lineFlag) 4379e: 4a83 tstl %d3 <== NOT EXECUTED 437a0: 6608 bnes 437aa <== NOT EXECUTED 437a2: 6010 bras 437b4 <== NOT EXECUTED 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); 437a4: 47f9 0004 335e lea 4335e ,%a3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 437aa: 206a 0020 moveal %a2@(32),%a0 <== NOT EXECUTED 437ae: 4a88 tstl %a0 <== NOT EXECUTED 437b0: 6600 fed0 bnew 43682 <== NOT EXECUTED } } if (!lineFlag) break; } } 437b4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 437ba: 4e5e unlk %fp <== NOT EXECUTED 437bc: 4e75 rts 00070828 : #include int fchdir( int fd ) { 70828: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 7082c: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED 70830: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 70834: b8b9 0009 6e74 cmpl 96e74 ,%d4 <== NOT EXECUTED 7083a: 6414 bccs 70850 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 7083c: 2079 0009 bb1c moveal 9bb1c ,%a0 <== NOT EXECUTED 70842: ed8c lsll #6,%d4 <== NOT EXECUTED 70844: d1c4 addal %d4,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 70846: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 7084a: 0800 0008 btst #8,%d0 <== NOT EXECUTED 7084e: 6612 bnes 70862 <== NOT EXECUTED 70850: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 70856: 7609 moveq #9,%d3 <== NOT EXECUTED 70858: 72ff moveq #-1,%d1 <== NOT EXECUTED 7085a: 2040 moveal %d0,%a0 <== NOT EXECUTED 7085c: 2083 movel %d3,%a0@ <== NOT EXECUTED 7085e: 6000 00fc braw 7095c <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 70862: 0800 0001 btst #1,%d0 <== NOT EXECUTED 70866: 6612 bnes 7087a <== NOT EXECUTED 70868: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 7086e: 7416 moveq #22,%d2 <== NOT EXECUTED 70870: 72ff moveq #-1,%d1 <== NOT EXECUTED 70872: 2040 moveal %d0,%a0 <== NOT EXECUTED 70874: 2082 movel %d2,%a0@ <== NOT EXECUTED 70876: 6000 00e4 braw 7095c <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 7087a: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 7087e: 4a89 tstl %a1 <== NOT EXECUTED 70880: 6708 beqs 7088a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 70882: 2269 0010 moveal %a1@(16),%a1 <== NOT EXECUTED 70886: 4a89 tstl %a1 <== NOT EXECUTED 70888: 6614 bnes 7089e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 7088a: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 70890: 72ff moveq #-1,%d1 <== NOT EXECUTED 70892: 2040 moveal %d0,%a0 <== NOT EXECUTED 70894: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 7089a: 6000 00c0 braw 7095c <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 7089e: 2808 movel %a0,%d4 <== NOT EXECUTED 708a0: 0684 0000 0018 addil #24,%d4 <== NOT EXECUTED 708a6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 708a8: 4e91 jsr %a1@ <== NOT EXECUTED 708aa: 588f addql #4,%sp <== NOT EXECUTED 708ac: 7201 moveq #1,%d1 <== NOT EXECUTED 708ae: b280 cmpl %d0,%d1 <== NOT EXECUTED 708b0: 6712 beqs 708c4 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 708b2: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 708b8: 72ff moveq #-1,%d1 <== NOT EXECUTED 708ba: 2040 moveal %d0,%a0 <== NOT EXECUTED 708bc: 7014 moveq #20,%d0 <== NOT EXECUTED 708be: 2080 movel %d0,%a0@ <== NOT EXECUTED 708c0: 6000 009a braw 7095c <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 708c4: 4878 0014 pea 14 <== NOT EXECUTED 708c8: 240e movel %fp,%d2 <== NOT EXECUTED 708ca: 0682 ffff ffd8 addil #-40,%d2 <== NOT EXECUTED 708d0: 45f9 0007 8fec lea 78fec ,%a2 <== NOT EXECUTED 708d6: 2639 0009 717c movel 9717c ,%d3 <== NOT EXECUTED 708dc: 5883 addql #4,%d3 <== NOT EXECUTED 708de: 2f03 movel %d3,%sp@- <== NOT EXECUTED 708e0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 708e2: 4e92 jsr %a2@ <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 708e4: 4878 0014 pea 14 <== NOT EXECUTED 708e8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 708ea: 2f03 movel %d3,%sp@- <== NOT EXECUTED 708ec: 4e92 jsr %a2@ <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 708ee: 42a7 clrl %sp@- <== NOT EXECUTED 708f0: 486e ffec pea %fp@(-20) <== NOT EXECUTED 708f4: 42a7 clrl %sp@- <== NOT EXECUTED 708f6: 4878 0001 pea 1 <== NOT EXECUTED 708fa: 4879 0008 fdab pea 8fdab <== NOT EXECUTED 70900: 4eb9 0004 5772 jsr 45772 <== NOT EXECUTED 70906: 4fef 002c lea %sp@(44),%sp <== NOT EXECUTED 7090a: 4a80 tstl %d0 <== NOT EXECUTED 7090c: 671a beqs 70928 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 7090e: 4878 0014 pea 14 <== NOT EXECUTED 70912: 2039 0009 717c movel 9717c ,%d0 <== NOT EXECUTED 70918: 5880 addql #4,%d0 <== NOT EXECUTED 7091a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 7091c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 7091e: 4e92 jsr %a2@ <== NOT EXECUTED return -1; 70920: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 70924: 72ff moveq #-1,%d1 <== NOT EXECUTED return -1; 70926: 6034 bras 7095c <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 70928: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 7092c: 4a88 tstl %a0 <== NOT EXECUTED 7092e: 670e beqs 7093e <== NOT EXECUTED 70930: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 70934: 4a88 tstl %a0 <== NOT EXECUTED 70936: 6706 beqs 7093e <== NOT EXECUTED 70938: 2f02 movel %d2,%sp@- <== NOT EXECUTED 7093a: 4e90 jsr %a0@ <== NOT EXECUTED 7093c: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_current = loc; 7093e: 4878 0014 pea 14 <== NOT EXECUTED 70942: 486e ffec pea %fp@(-20) <== NOT EXECUTED 70946: 2239 0009 717c movel 9717c ,%d1 <== NOT EXECUTED 7094c: 5881 addql #4,%d1 <== NOT EXECUTED 7094e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 70950: 4eb9 0007 8fec jsr 78fec <== NOT EXECUTED return 0; 70956: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; 7095a: 4281 clrl %d1 <== NOT EXECUTED return 0; } 7095c: 2001 movel %d1,%d0 <== NOT EXECUTED 7095e: 4cee 041c ffc8 moveml %fp@(-56),%d2-%d4/%a2 <== NOT EXECUTED 70964: 4e5e unlk %fp <== NOT EXECUTED 70966: 4e75 rts 000603ec : int fchmod( int fd, mode_t mode ) { 603ec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 603f0: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 603f4: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 603f8: b0b9 0009 6e74 cmpl 96e74 ,%d0 <== NOT EXECUTED 603fe: 6414 bccs 60414 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 60400: 2079 0009 bb1c moveal 9bb1c ,%a0 <== NOT EXECUTED 60406: ed88 lsll #6,%d0 <== NOT EXECUTED 60408: d1c0 addal %d0,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 6040a: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 6040e: 0800 0008 btst #8,%d0 <== NOT EXECUTED 60412: 660e bnes 60422 <== NOT EXECUTED 60414: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 6041a: 7209 moveq #9,%d1 <== NOT EXECUTED 6041c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6041e: 2081 movel %d1,%a0@ <== NOT EXECUTED 60420: 6044 bras 60466 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 60422: 44c0 movew %d0,%ccr <== NOT EXECUTED 60424: 670e beqs 60434 <== NOT EXECUTED 60426: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 6042c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6042e: 7016 moveq #22,%d0 <== NOT EXECUTED 60430: 2080 movel %d0,%a0@ <== NOT EXECUTED 60432: 6032 bras 60466 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 60434: 2268 003c moveal %a0@(60),%a1 <== NOT EXECUTED 60438: 4aa9 001c tstl %a1@(28) <== NOT EXECUTED 6043c: 6610 bnes 6044e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6043e: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 60444: 2040 moveal %d0,%a0 <== NOT EXECUTED 60446: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 6044c: 6018 bras 60466 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 6044e: 2268 0020 moveal %a0@(32),%a1 <== NOT EXECUTED 60452: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 60456: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 6045a: 2269 001c moveal %a1@(28),%a1 <== NOT EXECUTED 6045e: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED } 60462: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 60464: 4ed1 jmp %a1@ <== NOT EXECUTED } 60466: 70ff moveq #-1,%d0 <== NOT EXECUTED 60468: 4e5e unlk %fp <== NOT EXECUTED 6046a: 4e75 rts 0006046c : int fchown( int fd, uid_t owner, gid_t group ) { 6046c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 60470: 302e 000e movew %fp@(14),%d0 <== NOT EXECUTED 60474: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60476: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 6047a: 322e 0012 movew %fp@(18),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 6047e: b4b9 0009 6e74 cmpl 96e74 ,%d2 <== NOT EXECUTED 60484: 6414 bccs 6049a <== NOT EXECUTED iop = rtems_libio_iop( fd ); 60486: 2079 0009 bb1c moveal 9bb1c ,%a0 <== NOT EXECUTED 6048c: ed8a lsll #6,%d2 <== NOT EXECUTED 6048e: d1c2 addal %d2,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 60490: 2428 0014 movel %a0@(20),%d2 <== NOT EXECUTED 60494: 0802 0008 btst #8,%d2 <== NOT EXECUTED 60498: 660e bnes 604a8 <== NOT EXECUTED 6049a: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 604a0: 7209 moveq #9,%d1 <== NOT EXECUTED 604a2: 2040 moveal %d0,%a0 <== NOT EXECUTED 604a4: 2081 movel %d1,%a0@ <== NOT EXECUTED 604a6: 6052 bras 604fa <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 604a8: 44c2 movew %d2,%ccr <== NOT EXECUTED 604aa: 670e beqs 604ba <== NOT EXECUTED 604ac: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 604b2: 2040 moveal %d0,%a0 <== NOT EXECUTED 604b4: 7016 moveq #22,%d0 <== NOT EXECUTED 604b6: 2080 movel %d0,%a0@ <== NOT EXECUTED 604b8: 6040 bras 604fa <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 604ba: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 604be: 2269 0018 moveal %a1@(24),%a1 <== NOT EXECUTED 604c2: 4a89 tstl %a1 <== NOT EXECUTED 604c4: 6610 bnes 604d6 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 604c6: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 604cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 604ce: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 604d4: 6024 bras 604fa <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 604d6: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 604da: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 604e0: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED } 604e6: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 604ea: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED 604ee: 2d41 0010 movel %d1,%fp@(16) <== NOT EXECUTED 604f2: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } 604f6: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 604f8: 4ed1 jmp %a1@ <== NOT EXECUTED } 604fa: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 604fe: 70ff moveq #-1,%d0 <== NOT EXECUTED 60500: 4e5e unlk %fp <== NOT EXECUTED 60502: 4e75 rts 00070968 : int fcntl( int fd, int cmd, ... ) { 70968: 4e56 fff0 linkw %fp,#-16 7096c: 202e 0008 movel %fp@(8),%d0 #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 70970: 41ee 0010 lea %fp@(16),%a0 70974: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 70978: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 7097c: 2279 0009 6e74 moveal 96e74 ,%a1 70982: b3c0 cmpal %d0,%a1 70984: 6316 blss 7099c iop = rtems_libio_iop( fd ); 70986: 2239 0009 bb1c movel 9bb1c ,%d1 7098c: 2441 moveal %d1,%a2 7098e: ed88 lsll #6,%d0 70990: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 70992: 202a 0014 movel %a2@(20),%d0 70996: 0800 0008 btst #8,%d0 7099a: 6612 bnes 709ae 7099c: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 709a2: 74ff moveq #-1,%d2 <== NOT EXECUTED 709a4: 7209 moveq #9,%d1 <== NOT EXECUTED 709a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 709a8: 2081 movel %d1,%a0@ <== NOT EXECUTED 709aa: 6000 011e braw 70aca <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 709ae: 7409 moveq #9,%d2 709b0: b483 cmpl %d3,%d2 709b2: 6500 00de bcsw 70a92 709b6: 343b 3a08 movew %pc@(709c0 ,%d3:l:2),%d2 709ba: 48c2 extl %d2 709bc: 4efb 2802 jmp %pc@(709c0 ,%d2:l) 709c0: 0014 024 <== NOT EXECUTED 709c2: 006e 0156 <== NOT EXECUTED 709c4: 007a 0172 <== NOT EXECUTED 709c6: 0092 00a0 00c0 oril #10485952,%d2 <== NOT EXECUTED 709cc: 00c0 bitrev %d0 <== NOT EXECUTED 709ce: 00c0 bitrev %d0 <== NOT EXECUTED 709d0: 00c0 bitrev %d0 <== NOT EXECUTED 709d2: 00c0 bitrev %d0 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 709d4: 2410 movel %a0@,%d2 if ( fd2 ) 709d6: 6710 beqs 709e8 diop = rtems_libio_iop( fd2 ); 709d8: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 709da: 6204 bhis 709e0 <== NOT EXECUTED 709dc: 97cb subal %a3,%a3 <== NOT EXECUTED 709de: 601a bras 709fa <== NOT EXECUTED 709e0: 2641 moveal %d1,%a3 <== NOT EXECUTED 709e2: ed8a lsll #6,%d2 <== NOT EXECUTED 709e4: d7c2 addal %d2,%a3 <== NOT EXECUTED 709e6: 6012 bras 709fa <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 709e8: 4eb9 0004 5b6a jsr 45b6a 709ee: 2640 moveal %d0,%a3 if ( diop == 0 ) { 709f0: 4a80 tstl %d0 709f2: 6606 bnes 709fa 709f4: 74ff moveq #-1,%d2 <== NOT EXECUTED 709f6: 6000 00d2 braw 70aca <== NOT EXECUTED diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 709fa: 240b movel %a3,%d2 ret = -1; break; } } diop->handlers = iop->handlers; 709fc: 276a 003c 003c movel %a2@(60),%a3@(60) diop->file_info = iop->file_info; 70a02: 276a 0038 0038 movel %a2@(56),%a3@(56) diop->flags = iop->flags; 70a08: 276a 0014 0014 movel %a2@(20),%a3@(20) diop->pathinfo = iop->pathinfo; 70a0e: 4878 0014 pea 14 70a12: 486a 0018 pea %a2@(24) 70a16: 486b 0018 pea %a3@(24) 70a1a: 4eb9 0007 8fec jsr 78fec ret = (int) (diop - rtems_libio_iops); 70a20: 4fef 000c lea %sp@(12),%sp 70a24: 94b9 0009 bb1c subl 9bb1c ,%d2 70a2a: ec82 asrl #6,%d2 70a2c: 6074 bras 70aa2 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 70a2e: 2400 movel %d0,%d2 70a30: 720b moveq #11,%d1 70a32: e2aa lsrl %d1,%d2 70a34: 7001 moveq #1,%d0 70a36: c480 andl %d0,%d2 70a38: 606c bras 70aa6 * 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 ) ) 70a3a: 4a90 tstl %a0@ 70a3c: 6708 beqs 70a46 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 70a3e: 4282 clrl %d2 70a40: 08c0 000b bset #11,%d0 70a44: 6006 bras 70a4c else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 70a46: 4282 clrl %d2 <== NOT EXECUTED 70a48: 0880 000b bclr #11,%d0 <== NOT EXECUTED 70a4c: 2540 0014 movel %d0,%a2@(20) 70a50: 6054 bras 70aa6 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 70a52: 2f00 movel %d0,%sp@- 70a54: 4eb9 0004 59fc jsr 459fc 70a5a: 588f addql #4,%sp 70a5c: 2400 movel %d0,%d2 70a5e: 6042 bras 70aa2 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 70a60: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 70a62: 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 ) ); 70a64: 4eb9 0004 5bf2 jsr 45bf2 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 70a6a: 222a 0014 movel %a2@(20),%d1 70a6e: 588f addql #4,%sp 70a70: 0280 0000 0201 andil #513,%d0 70a76: 0281 ffff fdfe andil #-514,%d1 70a7c: 8081 orl %d1,%d0 70a7e: 60cc bras 70a4c errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 70a80: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 70a86: 74ff moveq #-1,%d2 70a88: 2040 moveal %d0,%a0 70a8a: 20bc 0000 0086 movel #134,%a0@ 70a90: 6038 bras 70aca ret = -1; break; default: errno = EINVAL; 70a92: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 70a98: 74ff moveq #-1,%d2 70a9a: 2040 moveal %d0,%a0 70a9c: 7016 moveq #22,%d0 70a9e: 2080 movel %d0,%a0@ 70aa0: 6028 bras 70aca /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 70aa2: 4a82 tstl %d2 70aa4: 6d24 blts 70aca if (iop->handlers->fcntl_h) { 70aa6: 206a 003c moveal %a2@(60),%a0 70aaa: 2068 0030 moveal %a0@(48),%a0 70aae: 4a88 tstl %a0 70ab0: 6718 beqs 70aca int err = (*iop->handlers->fcntl_h)( cmd, iop ); 70ab2: 2f0a movel %a2,%sp@- 70ab4: 2f03 movel %d3,%sp@- 70ab6: 4e90 jsr %a0@ if (err) { 70ab8: 508f addql #8,%sp * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); 70aba: 2600 movel %d0,%d3 if (err) { 70abc: 670c beqs 70aca errno = err; 70abe: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 70ac4: 74ff moveq #-1,%d2 <== NOT EXECUTED 70ac6: 2040 moveal %d0,%a0 <== NOT EXECUTED 70ac8: 2083 movel %d3,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 70aca: 2002 movel %d2,%d0 70acc: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 70ad2: 4e5e unlk %fp 70ad4: 4e75 rts 00043308 : #include int fdatasync( int fd ) { 43308: 4e56 0000 linkw %fp,#0 4330c: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43310: b0b9 0005 ede4 cmpl 5ede4 ,%d0 43316: 6414 bccs 4332c iop = rtems_libio_iop( fd ); 43318: 2079 0006 04e8 moveal 604e8 ,%a0 4331e: ed88 lsll #6,%d0 43320: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43322: 2028 0014 movel %a0@(20),%d0 43326: 0800 0008 btst #8,%d0 4332a: 660e bnes 4333a 4332c: 4eb9 0004 edec jsr 4edec <__errno> 43332: 7209 moveq #9,%d1 43334: 2040 moveal %d0,%a0 43336: 2081 movel %d1,%a0@ 43338: 6036 bras 43370 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4333a: 44c0 movew %d0,%ccr 4333c: 670e beqs 4334c 4333e: 4eb9 0004 edec jsr 4edec <__errno> 43344: 2040 moveal %d0,%a0 43346: 7016 moveq #22,%d0 43348: 2080 movel %d0,%a0@ 4334a: 6024 bras 43370 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 4334c: 2268 003c moveal %a0@(60),%a1 43350: 2269 002c moveal %a1@(44),%a1 43354: 4a89 tstl %a1 43356: 6610 bnes 43368 rtems_set_errno_and_return_minus_one( ENOTSUP ); 43358: 4eb9 0004 edec jsr 4edec <__errno> 4335e: 2040 moveal %d0,%a0 43360: 20bc 0000 0086 movel #134,%a0@ 43366: 6008 bras 43370 return (*iop->handlers->fdatasync_h)( iop ); 43368: 2d48 0008 movel %a0,%fp@(8) } 4336c: 4e5e unlk %fp */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 4336e: 4ed1 jmp %a1@ } 43370: 70ff moveq #-1,%d0 43372: 4e5e unlk %fp 43374: 4e75 rts ... 0004b084 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b084: 4e56 ffd8 linkw %fp,#-40 4b088: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4b08c: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b08e: 286e 0008 moveal %fp@(8),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4b092: 42a7 clrl %sp@- 4b094: 2f39 0005 c440 movel 5c440 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b09a: 2a6e 000c moveal %fp@(12),%a5 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4b09e: 4eb9 0004 4f30 jsr 44f30 4b0a4: 4fef 000c lea %sp@(12),%sp 4b0a8: 4a80 tstl %d0 4b0aa: 6706 beqs 4b0b2 4b0ac: 74fc moveq #-4,%d2 4b0ae: 6000 034e braw 4b3fe RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4b0b2: 2454 moveal %a4@,%a2 <== NOT EXECUTED if (pipe == NULL) { 4b0b4: 4a8a tstl %a2 <== NOT EXECUTED 4b0b6: 6600 016c bnew 4b224 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b0ba: 4878 0034 pea 34 <== NOT EXECUTED 4b0be: 243c 0004 941c movel #300060,%d2 <== NOT EXECUTED 4b0c4: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b0c6: 4e90 jsr %a0@ <== NOT EXECUTED if (pipe == NULL) 4b0c8: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b0ca: 2640 moveal %d0,%a3 <== NOT EXECUTED 4b0cc: 2440 moveal %d0,%a2 <== NOT EXECUTED if (pipe == NULL) 4b0ce: 4a80 tstl %d0 <== NOT EXECUTED 4b0d0: 6606 bnes 4b0d8 <== NOT EXECUTED 4b0d2: 74f4 moveq #-12,%d2 <== NOT EXECUTED 4b0d4: 6000 017e braw 4b254 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 4b0d8: 4878 0034 pea 34 <== NOT EXECUTED 4b0dc: 42a7 clrl %sp@- <== NOT EXECUTED 4b0de: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b0e0: 4eb9 0004 d2ac jsr 4d2ac <== NOT EXECUTED pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4b0e6: 4878 0200 pea 200 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4b0ea: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4b0f0: 2042 moveal %d2,%a0 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4b0f2: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4b0f6: 4e90 jsr %a0@ <== NOT EXECUTED if (! pipe->Buffer) 4b0f8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4b0fc: 2680 movel %d0,%a3@ <== NOT EXECUTED if (! pipe->Buffer) 4b0fe: 6606 bnes 4b106 <== NOT EXECUTED 4b100: 74f4 moveq #-12,%d2 <== NOT EXECUTED 4b102: 6000 0116 braw 4b21a <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4b106: 486b 002c pea %a3@(44) <== NOT EXECUTED 4b10a: 243c 0004 ba48 movel #309832,%d2 <== NOT EXECUTED 4b110: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b112: 1039 0005 b5d0 moveb 5b5d0 ,%d0 <== NOT EXECUTED 4b118: 42a7 clrl %sp@- <== NOT EXECUTED 4b11a: 49c0 extbl %d0 <== NOT EXECUTED 4b11c: 42a7 clrl %sp@- <== NOT EXECUTED 4b11e: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4b124: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b126: 4e90 jsr %a0@ <== NOT EXECUTED 4b128: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b12c: 4a80 tstl %d0 <== NOT EXECUTED 4b12e: 6600 00de bnew 4b20e <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4b132: 486b 0030 pea %a3@(48) <== NOT EXECUTED 4b136: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b138: 1039 0005 b5d0 moveb 5b5d0 ,%d0 <== NOT EXECUTED 4b13e: 42a7 clrl %sp@- <== NOT EXECUTED 4b140: 49c0 extbl %d0 <== NOT EXECUTED 4b142: 42a7 clrl %sp@- <== NOT EXECUTED 4b144: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4b14a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b14c: 4e90 jsr %a0@ <== NOT EXECUTED 4b14e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b152: 4a80 tstl %d0 <== NOT EXECUTED 4b154: 6600 00ac bnew 4b202 <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4b158: 486b 0028 pea %a3@(40) <== NOT EXECUTED 4b15c: 1039 0005 b5d0 moveb 5b5d0 ,%d0 <== NOT EXECUTED 4b162: 42a7 clrl %sp@- <== NOT EXECUTED 4b164: 4878 0010 pea 10 <== NOT EXECUTED 4b168: 49c0 extbl %d0 <== NOT EXECUTED 4b16a: 4878 0001 pea 1 <== NOT EXECUTED 4b16e: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4b174: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b176: 4eb9 0004 4cf8 jsr 44cf8 <== NOT EXECUTED 4b17c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4b180: 4a80 tstl %d0 <== NOT EXECUTED 4b182: 6672 bnes 4b1f6 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4b184: 260e movel %fp,%d3 <== NOT EXECUTED 4b186: 5183 subql #8,%d3 <== NOT EXECUTED 4b188: 243c 0004 64e8 movel #287976,%d2 <== NOT EXECUTED 4b18e: 2042 moveal %d2,%a0 <== NOT EXECUTED { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b190: 47f9 0004 6ce2 lea 46ce2 <_Thread_Enable_dispatch>,%a3 <== NOT EXECUTED 4b196: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b198: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b19c: 4879 0005 d528 pea 5d528 <_Barrier_Information> <== NOT EXECUTED 4b1a2: 4e90 jsr %a0@ <== NOT EXECUTED /* 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 4b1a4: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4b1aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b1ac: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b1b0: 4e93 jsr %a3@ <== NOT EXECUTED 4b1b2: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b1b4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b1b6: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b1ba: 4879 0005 d528 pea 5d528 <_Barrier_Information> <== NOT EXECUTED 4b1c0: 4e90 jsr %a0@ <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 4b1c2: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4b1c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b1ca: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b1ce: 4e93 jsr %a3@ <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4b1d0: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4b1d4: 1039 0005 b5d0 moveb 5b5d0 ,%d0 <== NOT EXECUTED 4b1da: 49c0 extbl %d0 <== NOT EXECUTED 4b1dc: 2200 movel %d0,%d1 <== NOT EXECUTED 4b1de: 5281 addql #1,%d1 <== NOT EXECUTED 4b1e0: 13c1 0005 b5d0 moveb %d1,5b5d0 <== NOT EXECUTED 4b1e6: 727a moveq #122,%d1 <== NOT EXECUTED 4b1e8: b280 cmpl %d0,%d1 <== NOT EXECUTED 4b1ea: 6638 bnes 4b224 <== NOT EXECUTED c = 'a'; 4b1ec: 7661 moveq #97,%d3 <== NOT EXECUTED 4b1ee: 13c3 0005 b5d0 moveb %d3,5b5d0 <== NOT EXECUTED 4b1f4: 602e bras 4b224 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4b1f6: 2f2b 0030 movel %a3@(48),%sp@- <== NOT EXECUTED 4b1fa: 4eb9 0004 bafc jsr 4bafc <== NOT EXECUTED 4b200: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4b202: 2f2b 002c movel %a3@(44),%sp@- <== NOT EXECUTED 4b206: 4eb9 0004 bafc jsr 4bafc <== NOT EXECUTED 4b20c: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4b20e: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 4b210: 74fc moveq #-4,%d2 <== NOT EXECUTED 4b212: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED 4b218: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 4b21a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4b21c: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED 4b222: 602a bras 4b24e <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4b224: 42a7 clrl %sp@- <== NOT EXECUTED 4b226: 42a7 clrl %sp@- <== NOT EXECUTED 4b228: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b22c: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4b232: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b236: 4a80 tstl %d0 <== NOT EXECUTED 4b238: 6704 beqs 4b23e <== NOT EXECUTED 4b23a: 74fc moveq #-4,%d2 <== NOT EXECUTED 4b23c: 6002 bras 4b240 <== NOT EXECUTED 4b23e: 4282 clrl %d2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4b240: 4a94 tstl %a4@ <== NOT EXECUTED 4b242: 6610 bnes 4b254 <== NOT EXECUTED if (err) 4b244: 4a82 tstl %d2 <== NOT EXECUTED 4b246: 670a beqs 4b252 <== NOT EXECUTED pipe_free(pipe); 4b248: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b24a: 4eba fd28 jsr %pc@(4af74 ) <== NOT EXECUTED 4b24e: 588f addql #4,%sp <== NOT EXECUTED 4b250: 6002 bras 4b254 <== NOT EXECUTED else *pipep = pipe; 4b252: 288a movel %a2,%a4@ <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 4b254: 2f39 0005 c440 movel 5c440 ,%sp@- <== NOT EXECUTED 4b25a: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4b260: 588f addql #4,%sp <== NOT EXECUTED 4b262: 4a82 tstl %d2 <== NOT EXECUTED 4b264: 6600 0198 bnew 4b3fe <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4b268: 222d 0014 movel %a5@(20),%d1 <== NOT EXECUTED 4b26c: 7006 moveq #6,%d0 <== NOT EXECUTED 4b26e: 7604 moveq #4,%d3 <== NOT EXECUTED 4b270: c081 andl %d1,%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4b272: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4b274: b680 cmpl %d0,%d3 <== NOT EXECUTED 4b276: 6700 009a beqw 4b312 <== NOT EXECUTED 4b27a: 7206 moveq #6,%d1 <== NOT EXECUTED 4b27c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4b27e: 6700 011a beqw 4b39a <== NOT EXECUTED 4b282: 163c 0002 moveb #2,%d3 <== NOT EXECUTED 4b286: b680 cmpl %d0,%d3 <== NOT EXECUTED 4b288: 6600 0158 bnew 4b3e2 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b28c: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4b290: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b292: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4b294: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4b298: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4b29c: 4a80 tstl %d0 <== NOT EXECUTED 4b29e: 6610 bnes 4b2b0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4b2a0: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b2a4: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b2a8: 4eb9 0004 bb68 jsr 4bb68 <== NOT EXECUTED 4b2ae: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Writers == 0) { 4b2b0: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4b2b4: 6600 012c bnew 4b3e2 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4b2b8: 7001 moveq #1,%d0 <== NOT EXECUTED 4b2ba: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4b2be: 6600 0122 bnew 4b3e2 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4b2c2: 2a2a 0024 movel %a2@(36),%d5 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4b2c6: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b2cc: 283c 0004 5034 movel #282676,%d4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4b2d2: 263c 0004 bbcc movel #310220,%d3 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b2d8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b2dc: 2044 moveal %d4,%a0 <== NOT EXECUTED 4b2de: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4b2e0: 2043 moveal %d3,%a0 <== NOT EXECUTED 4b2e2: 42a7 clrl %sp@- <== NOT EXECUTED 4b2e4: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b2e8: 4e90 jsr %a0@ <== NOT EXECUTED 4b2ea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b2ee: 4a80 tstl %d0 <== NOT EXECUTED 4b2f0: 6600 00fe bnew 4b3f0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4b2f4: 42a7 clrl %sp@- <== NOT EXECUTED 4b2f6: 42a7 clrl %sp@- <== NOT EXECUTED 4b2f8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b2fc: 4e93 jsr %a3@ <== NOT EXECUTED 4b2fe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b302: 4a80 tstl %d0 <== NOT EXECUTED 4b304: 6600 00ea bnew 4b3f0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4b308: baaa 0024 cmpl %a2@(36),%d5 <== NOT EXECUTED 4b30c: 67ca beqs 4b2d8 <== NOT EXECUTED 4b30e: 6000 00d2 braw 4b3e2 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4b312: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b316: 660c bnes 4b324 <== NOT EXECUTED 4b318: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4b31c: 6706 beqs 4b324 <== NOT EXECUTED 4b31e: 74fa moveq #-6,%d2 <== NOT EXECUTED 4b320: 6000 00d0 braw 4b3f2 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b324: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4b328: 2200 movel %d0,%d1 <== NOT EXECUTED 4b32a: 5281 addql #1,%d1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4b32c: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4b330: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4b334: 4a80 tstl %d0 <== NOT EXECUTED 4b336: 6610 bnes 4b348 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b338: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b33c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b340: 4eb9 0004 bb68 jsr 4bb68 <== NOT EXECUTED 4b346: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Readers == 0) { 4b348: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b34c: 6600 0094 bnew 4b3e2 <== NOT EXECUTED prevCounter = pipe->readerCounter; 4b350: 2a2a 0020 movel %a2@(32),%d5 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4b354: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b35a: 283c 0004 5034 movel #282676,%d4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4b360: 263c 0004 bbcc movel #310220,%d3 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b366: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b36a: 2044 moveal %d4,%a0 <== NOT EXECUTED 4b36c: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4b36e: 2043 moveal %d3,%a0 <== NOT EXECUTED 4b370: 42a7 clrl %sp@- <== NOT EXECUTED 4b372: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b376: 4e90 jsr %a0@ <== NOT EXECUTED 4b378: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b37c: 4a80 tstl %d0 <== NOT EXECUTED 4b37e: 6670 bnes 4b3f0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4b380: 42a7 clrl %sp@- <== NOT EXECUTED 4b382: 42a7 clrl %sp@- <== NOT EXECUTED 4b384: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b388: 4e93 jsr %a3@ <== NOT EXECUTED 4b38a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b38e: 4a80 tstl %d0 <== NOT EXECUTED 4b390: 665e bnes 4b3f0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4b392: baaa 0020 cmpl %a2@(32),%d5 <== NOT EXECUTED 4b396: 67ce beqs 4b366 <== NOT EXECUTED 4b398: 6048 bras 4b3e2 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b39a: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4b39e: 2200 movel %d0,%d1 <== NOT EXECUTED 4b3a0: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4b3a2: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4b3a6: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4b3aa: 4a80 tstl %d0 <== NOT EXECUTED 4b3ac: 6610 bnes 4b3be <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4b3ae: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b3b2: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b3b6: 4eb9 0004 bb68 jsr 4bb68 <== NOT EXECUTED 4b3bc: 508f addql #8,%sp <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b3be: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4b3c2: 2600 movel %d0,%d3 <== NOT EXECUTED 4b3c4: 5283 addql #1,%d3 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4b3c6: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4b3ca: 2543 0014 movel %d3,%a2@(20) <== NOT EXECUTED 4b3ce: 4a80 tstl %d0 <== NOT EXECUTED 4b3d0: 6610 bnes 4b3e2 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b3d2: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b3d6: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b3da: 4eb9 0004 bb68 jsr 4bb68 <== NOT EXECUTED 4b3e0: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4b3e2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b3e6: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return 0; 4b3ec: 588f addql #4,%sp <== NOT EXECUTED 4b3ee: 600e bras 4b3fe <== NOT EXECUTED 4b3f0: 74fc moveq #-4,%d2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4b3f2: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4b3f4: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4b3f6: 4eb9 0004 afbc jsr 4afbc <== NOT EXECUTED return err; 4b3fc: 508f addql #8,%sp <== NOT EXECUTED } 4b3fe: 2002 movel %d2,%d0 4b400: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5 4b406: 4e5e unlk %fp 4b408: 4e75 rts ... 00061d20 : bool file_systems_below_this_mountpoint( const char *path __attribute__((unused)), rtems_filesystem_location_info_t *fs_root_loc, rtems_filesystem_mount_table_entry_t *fs_to_unmount __attribute__((unused)) ) { 61d20: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 61d24: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 61d28: 2079 0009 bb60 moveal 9bb60 ,%a0<== NOT EXECUTED 61d2e: 6010 bras 61d40 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 61d30: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 61d34: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 61d38: 6604 bnes 61d3e <== NOT EXECUTED 61d3a: 7001 moveq #1,%d0 <== NOT EXECUTED 61d3c: 600c bras 61d4a <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 61d3e: 2050 moveal %a0@,%a0 <== NOT EXECUTED 61d40: b1fc 0009 bb64 cmpal #637796,%a0 <== NOT EXECUTED 61d46: 66e8 bnes 61d30 <== NOT EXECUTED 61d48: 4200 clrb %d0 <== NOT EXECUTED return true; } } return false; } 61d4a: 4e5e unlk %fp <== NOT EXECUTED 61d4c: 4e75 rts 00044f48 : #include #include int fork( void ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44f48: 4e56 0000 linkw %fp,#0 44f4c: 4eb9 0004 d430 jsr 4d430 <__errno> 44f52: 7258 moveq #88,%d1 44f54: 2040 moveal %d0,%a0 } 44f56: 70ff moveq #-1,%d0 44f58: 4e5e unlk %fp #include #include int fork( void ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44f5a: 2081 movel %d1,%a0@ } 44f5c: 4e75 rts ... 00043378 : long fpathconf( int fd, int name ) { 43378: 4e56 0000 linkw %fp,#0 4337c: 222e 0008 movel %fp@(8),%d1 43380: 202e 000c movel %fp@(12),%d0 long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43384: b2b9 0005 ede4 cmpl 5ede4 ,%d1 4338a: 6414 bccs 433a0 iop = rtems_libio_iop(fd); 4338c: 2079 0006 04e8 moveal 604e8 ,%a0 43392: ed89 lsll #6,%d1 43394: d1c1 addal %d1,%a0 rtems_libio_check_is_open(iop); 43396: 2228 0014 movel %a0@(20),%d1 4339a: 0801 0008 btst #8,%d1 4339e: 6612 bnes 433b2 433a0: 4eb9 0004 edec jsr 4edec <__errno> 433a6: 72ff moveq #-1,%d1 433a8: 2040 moveal %d0,%a0 433aa: 7009 moveq #9,%d0 433ac: 2080 movel %d0,%a0@ 433ae: 6000 008a braw 4343a rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 433b2: 0801 0001 btst #1,%d1 433b6: 6774 beqs 4342c /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 433b8: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 433bc: 720b moveq #11,%d1 433be: b280 cmpl %d0,%d1 433c0: 656a bcss 4342c 433c2: 303b 0a08 movew %pc@(433cc ,%d0:l:2),%d0 433c6: 48c0 extl %d0 433c8: 4efb 0802 jmp %pc@(433cc ,%d0:l) 433cc: 0018 030 <== NOT EXECUTED 433ce: 001e 036 <== NOT EXECUTED 433d0: 0024 044 <== NOT EXECUTED 433d2: 002a 052 <== NOT EXECUTED 433d4: 0030 060 <== NOT EXECUTED 433d6: 0036 066 <== NOT EXECUTED 433d8: 003c 074 <== NOT EXECUTED 433da: 0042 0102 <== NOT EXECUTED 433dc: 0048 0110 <== NOT EXECUTED 433de: 004e 0116 <== NOT EXECUTED 433e0: 0054 0124 <== NOT EXECUTED 433e2: 005a 0132 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 433e4: 2228 0038 movel %a0@(56),%d1 break; 433e8: 6050 bras 4343a case _PC_MAX_CANON: return_value = the_limits->max_canon; 433ea: 2228 003c movel %a0@(60),%d1 break; 433ee: 604a bras 4343a case _PC_MAX_INPUT: return_value = the_limits->max_input; 433f0: 2228 0040 movel %a0@(64),%d1 break; 433f4: 6044 bras 4343a case _PC_NAME_MAX: return_value = the_limits->name_max; 433f6: 2228 0044 movel %a0@(68),%d1 break; 433fa: 603e bras 4343a case _PC_PATH_MAX: return_value = the_limits->path_max; 433fc: 2228 0048 movel %a0@(72),%d1 break; 43400: 6038 bras 4343a case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43402: 2228 004c movel %a0@(76),%d1 break; 43406: 6032 bras 4343a case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43408: 2228 0054 movel %a0@(84),%d1 break; 4340c: 602c bras 4343a case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 4340e: 2228 0058 movel %a0@(88),%d1 break; 43412: 6026 bras 4343a case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43414: 2228 0064 movel %a0@(100),%d1 break; 43418: 6020 bras 4343a case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 4341a: 2228 0050 movel %a0@(80),%d1 break; 4341e: 601a bras 4343a case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 43420: 2228 005c movel %a0@(92),%d1 break; 43424: 6014 bras 4343a case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43426: 2228 0060 movel %a0@(96),%d1 break; 4342a: 600e bras 4343a default: rtems_set_errno_and_return_minus_one( EINVAL ); 4342c: 4eb9 0004 edec jsr 4edec <__errno> 43432: 72ff moveq #-1,%d1 43434: 2040 moveal %d0,%a0 43436: 7016 moveq #22,%d0 43438: 2080 movel %d0,%a0@ break; } return return_value; } 4343a: 2001 movel %d1,%d0 4343c: 4e5e unlk %fp 4343e: 4e75 rts 00048f48 : void free( void *ptr ) { MSBUMP(free_calls, 1); 48f48: 4e56 0000 linkw %fp,#0 48f4c: 52b9 0005 cb4c addql #1,5cb4c 48f52: 2f02 movel %d2,%sp@- 48f54: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 48f58: 676c beqs 48fc6 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 48f5a: 7003 moveq #3,%d0 48f5c: b0b9 0005 ce1c cmpl 5ce1c <_System_state_Current>,%d0 48f62: 661a bnes 48f7e 48f64: 4eb9 0004 938c jsr 4938c 48f6a: 4a00 tstb %d0 48f6c: 6610 bnes 48f7e !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 48f6e: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 48f72: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48f76: 4e5e unlk %fp <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 48f78: 4ef9 0004 93ca jmp 493ca <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 48f7e: 2079 0005 bac6 moveal 5bac6 ,%a0 48f84: 4a88 tstl %a0 48f86: 670a beqs 48f92 (*rtems_malloc_statistics_helpers->at_free)(ptr); 48f88: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48f8a: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 48f8e: 4e90 jsr %a0@ <== NOT EXECUTED 48f90: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 48f92: 2f02 movel %d2,%sp@- 48f94: 2f39 0005 b440 movel 5b440 ,%sp@- 48f9a: 4eb9 0004 a570 jsr 4a570 <_Protected_heap_Free> 48fa0: 508f addql #8,%sp 48fa2: 4a00 tstb %d0 48fa4: 6620 bnes 48fc6 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 48fa6: 2079 0005 b440 moveal 5b440 ,%a0 <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 48fac: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 48fb0: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 48fb4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48fb6: 4879 0005 a6d0 pea 5a6d0 <== NOT EXECUTED 48fbc: 4eb9 0004 2d30 jsr 42d30 <== NOT EXECUTED 48fc2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 48fc6: 242e fffc movel %fp@(-4),%d2 48fca: 4e5e unlk %fp 48fcc: 4e75 rts ... 00061548 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 61548: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 6154c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6154e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 61552: b5fc 0009 bb78 cmpal #637816,%a2 <== NOT EXECUTED 61558: 6740 beqs 6159a <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 6155a: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 6155e: 4a88 tstl %a0 <== NOT EXECUTED 61560: 6710 beqs 61572 <== NOT EXECUTED 61562: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61566: 4a88 tstl %a0 <== NOT EXECUTED 61568: 6708 beqs 61572 <== NOT EXECUTED 6156a: 486a 0004 pea %a2@(4) <== NOT EXECUTED 6156e: 4e90 jsr %a0@ <== NOT EXECUTED 61570: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 61572: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 61576: 4a88 tstl %a0 <== NOT EXECUTED 61578: 6710 beqs 6158a <== NOT EXECUTED 6157a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6157e: 4a88 tstl %a0 <== NOT EXECUTED 61580: 6708 beqs 6158a <== NOT EXECUTED 61582: 486a 0018 pea %a2@(24) <== NOT EXECUTED 61586: 4e90 jsr %a0@ <== NOT EXECUTED 61588: 588f addql #4,%sp <== NOT EXECUTED free(env); 6158a: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 6158e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 61592: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 61594: 4ef9 0004 583c jmp 4583c <== NOT EXECUTED } } 6159a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 6159e: 4e5e unlk %fp <== NOT EXECUTED 615a0: 4e75 rts 0005920c : int fstat( int fd, struct stat *sbuf ) { 5920c: 4e56 0000 linkw %fp,#0 59210: 202e 0008 movel %fp@(8),%d0 59214: 2f0a movel %a2,%sp@- 59216: 2f02 movel %d2,%sp@- 59218: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 5921c: 660e bnes 5922c rtems_set_errno_and_return_minus_one( EFAULT ); 5921e: 4eb9 0004 ca1c jsr 4ca1c <__errno> 59224: 720e moveq #14,%d1 59226: 2040 moveal %d0,%a0 59228: 2081 movel %d1,%a0@ 5922a: 607c bras 592a8 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 5922c: b0b9 0005 b434 cmpl 5b434 ,%d0 59232: 641e bccs 59252 59234: 2479 0005 cb34 moveal 5cb34 ,%a2 5923a: ed88 lsll #6,%d0 5923c: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5923e: 202a 0014 movel %a2@(20),%d0 59242: 0280 0000 0100 andil #256,%d0 59248: 6708 beqs 59252 if ( !iop->handlers ) 5924a: 206a 003c moveal %a2@(60),%a0 5924e: 4a88 tstl %a0 59250: 660e bnes 59260 rtems_set_errno_and_return_minus_one( EBADF ); 59252: 4eb9 0004 ca1c jsr 4ca1c <__errno> 59258: 2040 moveal %d0,%a0 5925a: 7009 moveq #9,%d0 5925c: 2080 movel %d0,%a0@ 5925e: 6048 bras 592a8 if ( !iop->handlers->fstat_h ) 59260: 4aa8 0018 tstl %a0@(24) 59264: 6610 bnes 59276 rtems_set_errno_and_return_minus_one( ENOTSUP ); 59266: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 5926c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5926e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 59274: 6032 bras 592a8 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 59276: 4878 0046 pea 46 5927a: 42a7 clrl %sp@- 5927c: 2f02 movel %d2,%sp@- 5927e: 4eb9 0004 d2ac jsr 4d2ac return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 59284: 206a 003c moveal %a2@(60),%a0 59288: 45ea 0018 lea %a2@(24),%a2 5928c: 4fef 000c lea %sp@(12),%sp 59290: 2d42 000c movel %d2,%fp@(12) } 59294: 242e fff8 movel %fp@(-8),%d2 * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 59298: 2d4a 0008 movel %a2,%fp@(8) } 5929c: 246e fffc moveal %fp@(-4),%a2 592a0: 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->handlers->fstat_h)( &iop->pathinfo, sbuf ); 592a2: 2268 0018 moveal %a0@(24),%a1 592a6: 4ed1 jmp %a1@ } 592a8: 242e fff8 movel %fp@(-8),%d2 592ac: 70ff moveq #-1,%d0 592ae: 246e fffc moveal %fp@(-4),%a2 592b2: 4e5e unlk %fp 592b4: 4e75 rts 000605c8 : #include int fsync( int fd ) { 605c8: 4e56 0000 linkw %fp,#0 605cc: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 605d0: b0b9 0009 6e74 cmpl 96e74 ,%d0 605d6: 642e bccs 60606 iop = rtems_libio_iop( fd ); 605d8: 2079 0009 bb1c moveal 9bb1c ,%a0 605de: ed88 lsll #6,%d0 605e0: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 605e2: 2028 0014 movel %a0@(20),%d0 605e6: 0800 0008 btst #8,%d0 605ea: 671a beqs 60606 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 605ec: 44c0 movew %d0,%ccr 605ee: 670e beqs 605fe 605f0: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 605f6: 7216 moveq #22,%d1 605f8: 2040 moveal %d0,%a0 605fa: 2081 movel %d1,%a0@ 605fc: 6036 bras 60634 /* * Now process the fsync(). */ if ( !iop->handlers ) 605fe: 2268 003c moveal %a0@(60),%a1 60602: 4a89 tstl %a1 60604: 660e bnes 60614 rtems_set_errno_and_return_minus_one( EBADF ); 60606: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 6060c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6060e: 7009 moveq #9,%d0 <== NOT EXECUTED 60610: 2080 movel %d0,%a0@ <== NOT EXECUTED 60612: 6020 bras 60634 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 60614: 2269 0028 moveal %a1@(40),%a1 60618: 4a89 tstl %a1 6061a: 6610 bnes 6062c rtems_set_errno_and_return_minus_one( ENOTSUP ); 6061c: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 60622: 2040 moveal %d0,%a0 60624: 20bc 0000 0086 movel #134,%a0@ 6062a: 6008 bras 60634 return (*iop->handlers->fsync_h)( iop ); 6062c: 2d48 0008 movel %a0,%fp@(8) } 60630: 4e5e unlk %fp rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 60632: 4ed1 jmp %a1@ } 60634: 70ff moveq #-1,%d0 60636: 4e5e unlk %fp 60638: 4e75 rts ... 00048fd0 : int ftruncate( int fd, off_t length ) { 48fd0: 4e56 ffec linkw %fp,#-20 48fd4: 202e 0008 movel %fp@(8),%d0 48fd8: 2f0a movel %a2,%sp@- 48fda: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 48fdc: b0b9 0005 b434 cmpl 5b434 ,%d0 48fe2: 6416 bccs 48ffa iop = rtems_libio_iop( fd ); 48fe4: 2479 0005 cb34 moveal 5cb34 ,%a2 48fea: ed88 lsll #6,%d0 48fec: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 48fee: 202a 0014 movel %a2@(20),%d0 48ff2: 0280 0000 0100 andil #256,%d0 48ff8: 6612 bnes 4900c 48ffa: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 49000: 72ff moveq #-1,%d1 <== NOT EXECUTED 49002: 2040 moveal %d0,%a0 <== NOT EXECUTED 49004: 7009 moveq #9,%d0 <== NOT EXECUTED 49006: 2080 movel %d0,%a0@ <== NOT EXECUTED 49008: 6000 008e braw 49098 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4900c: 4878 0014 pea 14 49010: 240e movel %fp,%d2 49012: 486a 0018 pea %a2@(24) 49016: 0682 ffff ffec addil #-20,%d2 4901c: 2f02 movel %d2,%sp@- 4901e: 4eb9 0004 d23c jsr 4d23c if ( !loc.ops->node_type_h ) 49024: 206e fff8 moveal %fp@(-8),%a0 49028: 4fef 000c lea %sp@(12),%sp 4902c: 2068 0010 moveal %a0@(16),%a0 49030: 4a88 tstl %a0 49032: 6740 beqs 49074 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 49034: 2f02 movel %d2,%sp@- 49036: 4e90 jsr %a0@ 49038: 588f addql #4,%sp 4903a: 7201 moveq #1,%d1 4903c: b280 cmpl %d0,%d1 4903e: 6610 bnes 49050 rtems_set_errno_and_return_minus_one( EISDIR ); 49040: 4eb9 0004 ca1c jsr 4ca1c <__errno> 49046: 7415 moveq #21,%d2 49048: 72ff moveq #-1,%d1 4904a: 2040 moveal %d0,%a0 4904c: 2082 movel %d2,%a0@ 4904e: 6048 bras 49098 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 49050: 7004 moveq #4,%d0 49052: c0aa 0014 andl %a2@(20),%d0 49056: 6610 bnes 49068 49058: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4905e: 72ff moveq #-1,%d1 <== NOT EXECUTED 49060: 2040 moveal %d0,%a0 <== NOT EXECUTED 49062: 7016 moveq #22,%d0 <== NOT EXECUTED 49064: 2080 movel %d0,%a0@ <== NOT EXECUTED 49066: 6030 bras 49098 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 49068: 206a 003c moveal %a2@(60),%a0 4906c: 2068 0020 moveal %a0@(32),%a0 49070: 4a88 tstl %a0 49072: 6612 bnes 49086 rtems_set_errno_and_return_minus_one( ENOTSUP ); 49074: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4907a: 72ff moveq #-1,%d1 <== NOT EXECUTED 4907c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4907e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 49084: 6012 bras 49098 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); 49086: 2f2e 0010 movel %fp@(16),%sp@- 4908a: 2f2e 000c movel %fp@(12),%sp@- 4908e: 2f0a movel %a2,%sp@- 49090: 4e90 jsr %a0@ 49092: 4fef 000c lea %sp@(12),%sp 49096: 2200 movel %d0,%d1 } 49098: 242e ffe4 movel %fp@(-28),%d2 4909c: 2001 movel %d1,%d0 4909e: 246e ffe8 moveal %fp@(-24),%a2 490a2: 4e5e unlk %fp 490a4: 4e75 rts ... 0008cee4 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 8cee4: 4e56 ffec linkw %fp,#-20 8cee8: 202e 0008 movel %fp@(8),%d0 8ceec: 2f0a movel %a2,%sp@- 8ceee: 2f02 movel %d2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8cef0: b0b9 0009 6e74 cmpl 96e74 ,%d0 8cef6: 6504 bcss 8cefc 8cef8: 95ca subal %a2,%a2 <== NOT EXECUTED 8cefa: 600a bras 8cf06 <== NOT EXECUTED 8cefc: 2479 0009 bb1c moveal 9bb1c ,%a2 8cf02: ed88 lsll #6,%d0 8cf04: d5c0 addal %d0,%a2 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 8cf06: 4878 0014 pea 14 8cf0a: 240e movel %fp,%d2 8cf0c: 486a 0018 pea %a2@(24) 8cf10: 0682 ffff ffec addil #-20,%d2 8cf16: 2f02 movel %d2,%sp@- 8cf18: 4eb9 0007 8fec jsr 78fec if ( !loc.ops->node_type_h ) 8cf1e: 206e fff8 moveal %fp@(-8),%a0 8cf22: 4fef 000c lea %sp@(12),%sp 8cf26: 2068 0010 moveal %a0@(16),%a0 8cf2a: 4a88 tstl %a0 8cf2c: 6728 beqs 8cf56 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 8cf2e: 2f02 movel %d2,%sp@- 8cf30: 4e90 jsr %a0@ 8cf32: 588f addql #4,%sp 8cf34: 7201 moveq #1,%d1 8cf36: b280 cmpl %d0,%d1 8cf38: 6710 beqs 8cf4a rtems_set_errno_and_return_minus_one( ENOTDIR ); 8cf3a: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 8cf40: 72ff moveq #-1,%d1 8cf42: 2040 moveal %d0,%a0 8cf44: 7014 moveq #20,%d0 8cf46: 2080 movel %d0,%a0@ 8cf48: 6030 bras 8cf7a /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 8cf4a: 206a 003c moveal %a2@(60),%a0 8cf4e: 2068 0008 moveal %a0@(8),%a0 8cf52: 4a88 tstl %a0 8cf54: 6612 bnes 8cf68 rtems_set_errno_and_return_minus_one( ENOTSUP ); 8cf56: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 8cf5c: 72ff moveq #-1,%d1 <== NOT EXECUTED 8cf5e: 2040 moveal %d0,%a0 <== NOT EXECUTED 8cf60: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 8cf66: 6012 bras 8cf7a <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 8cf68: 2f2e 0010 movel %fp@(16),%sp@- 8cf6c: 2f2e 000c movel %fp@(12),%sp@- 8cf70: 2f0a movel %a2,%sp@- 8cf72: 4e90 jsr %a0@ 8cf74: 4fef 000c lea %sp@(12),%sp 8cf78: 2200 movel %d0,%d1 } 8cf7a: 242e ffe4 movel %fp@(-28),%d2 8cf7e: 2001 movel %d1,%d0 8cf80: 246e ffe8 moveal %fp@(-24),%a2 8cf84: 4e5e unlk %fp 8cf86: 4e75 rts 000490a8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getegid( void ) { 490a8: 4e56 0000 linkw %fp,#0 490ac: 2079 0005 b544 moveal 5b544 ,%a0 return _POSIX_types_Egid; } 490b2: 4e5e unlk %fp 490b4: 3028 0038 movew %a0@(56),%d0 490b8: 4e75 rts ... 000490bc : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t geteuid( void ) { 490bc: 4e56 0000 linkw %fp,#0 490c0: 2079 0005 b544 moveal 5b544 ,%a0 return _POSIX_types_Euid; } 490c6: 4e5e unlk %fp 490c8: 3028 0036 movew %a0@(54),%d0 490cc: 4e75 rts ... 0006073c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 6073c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 60740: 2079 0009 717c moveal 9717c ,%a0 <== NOT EXECUTED return _POSIX_types_Gid; } 60746: 4e5e unlk %fp <== NOT EXECUTED 60748: 3028 0034 movew %a0@(52),%d0 <== NOT EXECUTED 6074c: 4e75 rts 00060c66 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 60c66: 4e56 ffe0 linkw %fp,#-32 60c6a: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 60c6e: 262e 0008 movel %fp@(8),%d3 60c72: 282e 000c movel %fp@(12),%d4 60c76: 246e 0010 moveal %fp@(16),%a2 60c7a: 2a2e 0014 movel %fp@(20),%d5 60c7e: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 60c82: 4eb9 0006 0b4c jsr 60b4c if ((fp = fopen("/etc/group", "r")) == NULL) { 60c88: 4879 0008 f52b pea 8f52b 60c8e: 4879 0008 ddd5 pea 8ddd5 <_rodata_start+0x845> 60c94: 4eb9 0007 6958 jsr 76958 60c9a: 508f addql #8,%sp 60c9c: 2400 movel %d0,%d2 60c9e: 6610 bnes 60cb0 errno = EINVAL; 60ca0: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 60ca6: 7216 moveq #22,%d1 <== NOT EXECUTED 60ca8: 2040 moveal %d0,%a0 <== NOT EXECUTED 60caa: 70ff moveq #-1,%d0 <== NOT EXECUTED 60cac: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 60cae: 606a bras 60d1a <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 60cb0: 49fa fc3c lea %pc@(608ee ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 60cb4: 47f9 0007 bae4 lea 7bae4 ,%a3 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 60cba: 2f06 movel %d6,%sp@- 60cbc: 2f05 movel %d5,%sp@- 60cbe: 2f0a movel %a2,%sp@- 60cc0: 2f02 movel %d2,%sp@- 60cc2: 4e94 jsr %a4@ 60cc4: 4fef 0010 lea %sp@(16),%sp 60cc8: 4a80 tstl %d0 60cca: 661a bnes 60ce6 errno = EINVAL; 60ccc: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 60cd2: 2040 moveal %d0,%a0 <== NOT EXECUTED 60cd4: 7016 moveq #22,%d0 <== NOT EXECUTED 60cd6: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 60cd8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60cda: 4eb9 0007 60f2 jsr 760f2 <== NOT EXECUTED return -1; 60ce0: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 60ce2: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 60ce4: 6034 bras 60d1a <== NOT EXECUTED } if (name) { 60ce6: 4a83 tstl %d3 60ce8: 670e beqs 60cf8 match = (strcmp(grp->gr_name, name) == 0); 60cea: 2f03 movel %d3,%sp@- 60cec: 2f12 movel %a2@,%sp@- 60cee: 4e93 jsr %a3@ 60cf0: 508f addql #8,%sp 60cf2: 4a80 tstl %d0 60cf4: 57c0 seq %d0 60cf6: 600a bras 60d02 } else { match = (grp->gr_gid == gid); 60cf8: 4280 clrl %d0 <== NOT EXECUTED 60cfa: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 60cfe: b880 cmpl %d0,%d4 <== NOT EXECUTED 60d00: 57c0 seq %d0 <== NOT EXECUTED 60d02: 49c0 extbl %d0 60d04: 4480 negl %d0 } if (match) { 60d06: 67b2 beqs 60cba fclose(fp); 60d08: 2f02 movel %d2,%sp@- 60d0a: 4eb9 0007 60f2 jsr 760f2 *result = grp; 60d10: 206e 001c moveal %fp@(28),%a0 return 0; 60d14: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 60d16: 4280 clrl %d0 60d18: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 60d1a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 60d20: 4e5e unlk %fp 60d22: 4e75 rts 000609f4 : return NULL; return p; } struct group *getgrent(void) { 609f4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 609f8: 2039 0009 b2ae movel 9b2ae ,%d0 <== NOT EXECUTED 609fe: 6724 beqs 60a24 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 60a00: 4878 00c8 pea c8 <== NOT EXECUTED 60a04: 4879 0009 b2b2 pea 9b2b2 <== NOT EXECUTED 60a0a: 4879 0009 b37a pea 9b37a <== NOT EXECUTED 60a10: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60a12: 4eba feda jsr %pc@(608ee ) <== NOT EXECUTED 60a16: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 60a1a: 223c 0009 b37a movel #635770,%d1 <== NOT EXECUTED 60a20: 4a80 tstl %d0 <== NOT EXECUTED 60a22: 6602 bnes 60a26 <== NOT EXECUTED 60a24: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 60a26: 2001 movel %d1,%d0 <== NOT EXECUTED 60a28: 4e5e unlk %fp <== NOT EXECUTED 60a2a: 4e75 rts 00060d4a : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 60d4a: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 60d4c: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 60d50: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 60d54: 486e fffc pea %fp@(-4) <== NOT EXECUTED 60d58: 4878 00c8 pea c8 <== NOT EXECUTED 60d5c: 4879 0009 b2b2 pea 9b2b2 <== NOT EXECUTED 60d62: 4879 0009 b37a pea 9b37a <== NOT EXECUTED 60d68: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60d6a: 4eb9 0006 0d24 jsr 60d24 <== NOT EXECUTED 60d70: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 60d74: 4a80 tstl %d0 <== NOT EXECUTED 60d76: 6704 beqs 60d7c <== NOT EXECUTED 60d78: 4280 clrl %d0 <== NOT EXECUTED 60d7a: 6004 bras 60d80 <== NOT EXECUTED return NULL; return p; 60d7c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 60d80: 4e5e unlk %fp <== NOT EXECUTED 60d82: 4e75 rts 00060d24 : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 60d24: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 60d26: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 60d2a: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 60d2e: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 60d32: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 60d36: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 60d3a: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 60d3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60d40: 42a7 clrl %sp@- <== NOT EXECUTED 60d42: 4eba ff22 jsr %pc@(60c66 ) <== NOT EXECUTED } 60d46: 4e5e unlk %fp <== NOT EXECUTED 60d48: 4e75 rts 00060da6 : struct group *getgrnam( const char *name ) { 60da6: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 60daa: 486e fffc pea %fp@(-4) 60dae: 4878 00c8 pea c8 60db2: 4879 0009 b2b2 pea 9b2b2 60db8: 4879 0009 b37a pea 9b37a 60dbe: 2f2e 0008 movel %fp@(8),%sp@- 60dc2: 4eb9 0006 0d84 jsr 60d84 60dc8: 4fef 0014 lea %sp@(20),%sp 60dcc: 4a80 tstl %d0 60dce: 6704 beqs 60dd4 60dd0: 4280 clrl %d0 <== NOT EXECUTED 60dd2: 6004 bras 60dd8 <== NOT EXECUTED return NULL; return p; 60dd4: 202e fffc movel %fp@(-4),%d0 } 60dd8: 4e5e unlk %fp 60dda: 4e75 rts 00044bc0 : int getitimer( int which, struct itimerval *value ) { 44bc0: 4e56 0000 linkw %fp,#0 if ( !value ) 44bc4: 4aae 000c tstl %fp@(12) 44bc8: 660e bnes 44bd8 rtems_set_errno_and_return_minus_one( EFAULT ); 44bca: 4eb9 0004 d024 jsr 4d024 <__errno> 44bd0: 2040 moveal %d0,%a0 44bd2: 700e moveq #14,%d0 44bd4: 2080 movel %d0,%a0@ 44bd6: 6020 bras 44bf8 44bd8: 41f9 0004 d024 lea 4d024 <__errno>,%a0 switch ( which ) { 44bde: 7002 moveq #2,%d0 44be0: b0ae 0008 cmpl %fp@(8),%d0 44be4: 650a bcss 44bf0 case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 44be6: 4e90 jsr %a0@ 44be8: 7258 moveq #88,%d1 44bea: 2040 moveal %d0,%a0 44bec: 2081 movel %d1,%a0@ 44bee: 6008 bras 44bf8 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 44bf0: 4e90 jsr %a0@ 44bf2: 2040 moveal %d0,%a0 44bf4: 7016 moveq #22,%d0 44bf6: 2080 movel %d0,%a0@ } 44bf8: 70ff moveq #-1,%d0 44bfa: 4e5e unlk %fp 44bfc: 4e75 rts ... 0004249c : * return a reasonable value. */ int getpagesize(void) { return PAGE_SIZE; } 4249c: 203c 0000 1000 movel #4096,%d0 * This is not a functional version but the SPARC backend for at least * gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to be there and * return a reasonable value. */ int getpagesize(void) { 424a2: 4e56 0000 linkw %fp,#0 return PAGE_SIZE; } 424a6: 4e5e unlk %fp 424a8: 4e75 rts ... 00060e16 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 60e16: 4e56 ffe0 linkw %fp,#-32 60e1a: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 60e1e: 262e 0008 movel %fp@(8),%d3 60e22: 282e 000c movel %fp@(12),%d4 60e26: 246e 0010 moveal %fp@(16),%a2 60e2a: 2a2e 0014 movel %fp@(20),%d5 60e2e: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 60e32: 4eb9 0006 0b4c jsr 60b4c if ((fp = fopen("/etc/passwd", "r")) == NULL) { 60e38: 4879 0008 f52b pea 8f52b 60e3e: 4879 0008 dd90 pea 8dd90 <_rodata_start+0x800> 60e44: 4eb9 0007 6958 jsr 76958 60e4a: 508f addql #8,%sp 60e4c: 2400 movel %d0,%d2 60e4e: 6610 bnes 60e60 errno = EINVAL; 60e50: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 60e56: 7816 moveq #22,%d4 <== NOT EXECUTED 60e58: 2040 moveal %d0,%a0 <== NOT EXECUTED 60e5a: 70ff moveq #-1,%d0 <== NOT EXECUTED 60e5c: 2084 movel %d4,%a0@ <== NOT EXECUTED return -1; 60e5e: 606a bras 60eca <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 60e60: 49fa fbca lea %pc@(60a2c ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 60e64: 47f9 0007 bae4 lea 7bae4 ,%a3 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 60e6a: 2f06 movel %d6,%sp@- 60e6c: 2f05 movel %d5,%sp@- 60e6e: 2f0a movel %a2,%sp@- 60e70: 2f02 movel %d2,%sp@- 60e72: 4e94 jsr %a4@ 60e74: 4fef 0010 lea %sp@(16),%sp 60e78: 4a80 tstl %d0 60e7a: 661a bnes 60e96 errno = EINVAL; 60e7c: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 60e82: 7616 moveq #22,%d3 <== NOT EXECUTED 60e84: 2040 moveal %d0,%a0 <== NOT EXECUTED 60e86: 2083 movel %d3,%a0@ <== NOT EXECUTED fclose(fp); 60e88: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60e8a: 4eb9 0007 60f2 jsr 760f2 <== NOT EXECUTED return -1; 60e90: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 60e92: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 60e94: 6034 bras 60eca <== NOT EXECUTED } if (name) { 60e96: 4a83 tstl %d3 60e98: 670e beqs 60ea8 match = (strcmp(pwd->pw_name, name) == 0); 60e9a: 2f03 movel %d3,%sp@- 60e9c: 2f12 movel %a2@,%sp@- 60e9e: 4e93 jsr %a3@ 60ea0: 508f addql #8,%sp 60ea2: 4a80 tstl %d0 60ea4: 57c0 seq %d0 60ea6: 600a bras 60eb2 } else { match = (pwd->pw_uid == uid); 60ea8: 4280 clrl %d0 <== NOT EXECUTED 60eaa: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 60eae: b880 cmpl %d0,%d4 <== NOT EXECUTED 60eb0: 57c0 seq %d0 <== NOT EXECUTED 60eb2: 49c0 extbl %d0 60eb4: 4480 negl %d0 } if (match) { 60eb6: 67b2 beqs 60e6a fclose(fp); 60eb8: 2f02 movel %d2,%sp@- 60eba: 4eb9 0007 60f2 jsr 760f2 *result = pwd; 60ec0: 206e 001c moveal %fp@(28),%a0 return 0; 60ec4: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 60ec6: 4280 clrl %d0 60ec8: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 60eca: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 60ed0: 4e5e unlk %fp 60ed2: 4e75 rts 00060b14 : return NULL; return p; } struct passwd *getpwent(void) { 60b14: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 60b18: 2039 0009 b1c6 movel 9b1c6 ,%d0 <== NOT EXECUTED 60b1e: 6724 beqs 60b44 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 60b20: 4878 00c8 pea c8 <== NOT EXECUTED 60b24: 4879 0009 b1ca pea 9b1ca <== NOT EXECUTED 60b2a: 4879 0009 b292 pea 9b292 <== NOT EXECUTED 60b30: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60b32: 4eba fef8 jsr %pc@(60a2c ) <== NOT EXECUTED 60b36: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 60b3a: 223c 0009 b292 movel #635538,%d1 <== NOT EXECUTED 60b40: 4a80 tstl %d0 <== NOT EXECUTED 60b42: 6602 bnes 60b46 <== NOT EXECUTED 60b44: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 60b46: 2001 movel %d1,%d0 <== NOT EXECUTED 60b48: 4e5e unlk %fp <== NOT EXECUTED 60b4a: 4e75 rts 00060f56 : struct passwd *getpwnam( const char *name ) { 60f56: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 60f5a: 486e fffc pea %fp@(-4) 60f5e: 4878 00c8 pea c8 60f62: 4879 0009 b1ca pea 9b1ca 60f68: 4879 0009 b292 pea 9b292 60f6e: 2f2e 0008 movel %fp@(8),%sp@- 60f72: 4eb9 0006 0f34 jsr 60f34 60f78: 4fef 0014 lea %sp@(20),%sp 60f7c: 4a80 tstl %d0 60f7e: 6704 beqs 60f84 60f80: 4280 clrl %d0 <== NOT EXECUTED 60f82: 6004 bras 60f88 <== NOT EXECUTED return NULL; return p; 60f84: 202e fffc movel %fp@(-4),%d0 } 60f88: 4e5e unlk %fp 60f8a: 4e75 rts 00060efa : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 60efa: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 60efc: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 60f00: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 60f04: 486e fffc pea %fp@(-4) <== NOT EXECUTED 60f08: 4878 00c8 pea c8 <== NOT EXECUTED 60f0c: 4879 0009 b1ca pea 9b1ca <== NOT EXECUTED 60f12: 4879 0009 b292 pea 9b292 <== NOT EXECUTED 60f18: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60f1a: 4eb9 0006 0ed4 jsr 60ed4 <== NOT EXECUTED 60f20: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 60f24: 4a80 tstl %d0 <== NOT EXECUTED 60f26: 6704 beqs 60f2c <== NOT EXECUTED 60f28: 4280 clrl %d0 <== NOT EXECUTED 60f2a: 6004 bras 60f30 <== NOT EXECUTED return NULL; return p; 60f2c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 60f30: 4e5e unlk %fp <== NOT EXECUTED 60f32: 4e75 rts 00060ed4 : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 60ed4: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 60ed6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 60eda: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 60ede: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 60ee2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 60ee6: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 60eea: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 60eee: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60ef0: 42a7 clrl %sp@- <== NOT EXECUTED 60ef2: 4eba ff22 jsr %pc@(60e16 ) <== NOT EXECUTED } 60ef6: 4e5e unlk %fp <== NOT EXECUTED 60ef8: 4e75 rts 000490d0 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 490d0: 4e56 ffec linkw %fp,#-20 490d4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 490d8: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 490dc: 4a8a tstl %a2 490de: 6610 bnes 490f0 errno = EFAULT; 490e0: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 490e6: 720e moveq #14,%d1 <== NOT EXECUTED 490e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 490ea: 70ff moveq #-1,%d0 <== NOT EXECUTED 490ec: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 490ee: 6032 bras 49122 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 490f0: 203c 0000 0700 movel #1792,%d0 490f6: 40c2 movew %sr,%d2 490f8: 8082 orl %d2,%d0 490fa: 46c0 movew %d0,%sr _TOD_Get( &now ); 490fc: 486e fff8 pea %fp@(-8) 49100: 4eb9 0004 a170 jsr 4a170 <_TOD_Get> _ISR_Enable(level); 49106: 46c2 movew %d2,%sr useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 49108: 263c 0000 03e8 movel #1000,%d3 * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 4910e: 588f addql #4,%sp 49110: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 49112: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 49116: 4c43 1801 remsl %d3,%d1,%d1 4911a: 2541 0004 movel %d1,%a2@(4) _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 4911e: 24ae fff8 movel %fp@(-8),%a2@ } 49122: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 49128: 4e5e unlk %fp 4912a: 4e75 rts 00045948 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 45948: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4594c: 2079 0009 717c moveal 9717c ,%a0 <== NOT EXECUTED return _POSIX_types_Uid; } 45952: 4e5e unlk %fp <== NOT EXECUTED 45954: 3028 0032 movew %a0@(50),%d0 <== NOT EXECUTED 45958: 4e75 rts 00050490 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 50490: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 50492: 4e56 0000 linkw %fp,#0 50496: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 5049a: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 5049e: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 504a0: b0a9 0048 cmpl %a1@(72),%d0 504a4: 6704 beqs 504aa 504a6: 70ff moveq #-1,%d0 <== NOT EXECUTED 504a8: 600e bras 504b8 <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 504aa: 4280 clrl %d0 504ac: 4281 clrl %d1 504ae: 4282 clrl %d2 504b0: 2141 000c movel %d1,%a0@(12) 504b4: 2142 0010 movel %d2,%a0@(16) return 0; } 504b8: 241f movel %sp@+,%d2 504ba: 4e5e unlk %fp 504bc: 4e75 rts 000506a4 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 506a4: 4e56 fec0 linkw %fp,#-320 506a8: 202e 0010 movel %fp@(16),%d0 506ac: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 506b0: 266e 0008 moveal %fp@(8),%a3 int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 506b4: 206b 0038 moveal %a3@(56),%a0 506b8: 2c08 movel %a0,%d6 506ba: 0686 0000 0050 addil #80,%d6 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 506c0: 2468 004c moveal %a0@(76),%a2 the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 506c4: bc8a cmpl %a2,%d6 506c6: 6606 bnes 506ce 506c8: 4282 clrl %d2 506ca: 6000 00be braw 5078a bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 506ce: 2e3c 0000 0110 movel #272,%d7 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 506d4: 2a0e movel %fp,%d5 506d6: 0685 ffff fef0 addil #-272,%d5 506dc: 2045 moveal %d5,%a0 506de: 41e8 0010 lea %a0@(16),%a0 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 506e2: 4283 clrl %d3 506e4: 4282 clrl %d2 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 506e6: 4bf9 0005 22f4 lea 522f4 ,%a5 memcpy( 506ec: 49f9 0005 1c44 lea 51c44 ,%a4 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 506f2: 4c47 0000 remul %d7,%d0,%d0 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 506f6: 282b 0010 movel %a3@(16),%d4 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 506fa: 2200 movel %d0,%d1 506fc: e988 lsll #4,%d0 506fe: e189 lsll #8,%d1 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 50700: 2d48 fee8 movel %a0,%fp@(-280) bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 50704: d081 addl %d1,%d0 50706: d084 addl %d4,%d0 50708: 2d40 feec movel %d0,%fp@(-276) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 5070c: 6076 bras 50784 current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 5070e: bc8a cmpl %a2,%d6 50710: 6778 beqs 5078a /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 50712: b883 cmpl %d3,%d4 50714: 6e66 bgts 5077c /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 50716: 2e0a movel %a2,%d7 50718: 0687 0000 000c addil #12,%d7 if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 5071e: 2d6a 0034 fef0 movel %a2@(52),%fp@(-272) } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 50724: 323c 0110 movew #272,%d1 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 50728: 2f07 movel %d7,%sp@- } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 5072a: 3d41 fefc movew %d1,%fp@(-260) /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 5072e: 2d43 fef8 movel %d3,%fp@(-264) 50732: 5bc0 smi %d0 50734: 49c0 extbl %d0 50736: 2d40 fef4 movel %d0,%fp@(-268) tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 5073a: 4eb9 0005 27a0 jsr 527a0 strcpy( tmp_dirent.d_name, the_jnode->name ); 50740: 2e87 movel %d7,%sp@ 50742: 2f2e fee8 movel %fp@(-280),%sp@- /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 50746: 3d40 fefe movew %d0,%fp@(-258) strcpy( tmp_dirent.d_name, the_jnode->name ); 5074a: 4e95 jsr %a5@ memcpy( 5074c: 4878 0110 pea 110 50750: 206e 000c moveal %fp@(12),%a0 50754: 2f05 movel %d5,%sp@- 50756: 4870 2800 pea %a0@(00000000,%d2:l) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 5075a: 0682 0000 0110 addil #272,%d2 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy( 50760: 4e94 jsr %a4@ buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 50762: 4fef 0014 lea %sp@(20),%sp memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 50766: 4280 clrl %d0 50768: 223c 0000 0110 movel #272,%d1 5076e: d3ab 0010 addl %d1,%a3@(16) 50772: 2e2b 000c movel %a3@(12),%d7 50776: df80 addxl %d0,%d7 50778: 2747 000c movel %d7,%a3@(12) bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 5077c: 2452 moveal %a2@,%a2 * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 5077e: 0683 0000 0110 addil #272,%d3 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 50784: b6ae feec cmpl %fp@(-276),%d3 50788: 6d84 blts 5070e the_node = the_node->next; } /* Success */ return bytes_transferred; } 5078a: 2002 movel %d2,%d0 5078c: 4cee 3cfc fec0 moveml %fp@(-320),%d2-%d7/%a2-%a5 50792: 4e5e unlk %fp 50794: 4e75 rts ... 000505e4 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 505e4: 4e56 fff8 linkw %fp,#-8 505e8: 2f0b movel %a3,%sp@- 505ea: 266e 000c moveal %fp@(12),%a3 505ee: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 505f0: 2453 moveal %a3@,%a2 505f2: 200a movel %a2,%d0 505f4: 0680 0000 0050 addil #80,%d0 505fa: b0aa 004c cmpl %a2@(76),%d0 505fe: 6712 beqs 50612 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 50600: 4eb9 0005 1424 jsr 51424 <__errno> 50606: 72ff moveq #-1,%d1 50608: 2040 moveal %d0,%a0 5060a: 705a moveq #90,%d0 5060c: 2080 movel %d0,%a0@ 5060e: 6000 0086 braw 50696 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 50612: 206b 0010 moveal %a3@(16),%a0 50616: b5e8 001c cmpal %a0@(28),%a2 5061a: 6706 beqs 50622 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 5061c: 4aaa 0058 tstl %a2@(88) 50620: 6710 beqs 50632 rtems_set_errno_and_return_minus_one( EBUSY ); 50622: 4eb9 0005 1424 jsr 51424 <__errno> 50628: 72ff moveq #-1,%d1 5062a: 2040 moveal %d0,%a0 5062c: 7010 moveq #16,%d0 5062e: 2080 movel %d0,%a0@ 50630: 6064 bras 50696 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 50632: 4aaa 0008 tstl %a2@(8) 50636: 670e beqs 50646 50638: 2f0a movel %a2,%sp@- 5063a: 4eb9 0004 7140 jsr 47140 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 50640: 588f addql #4,%sp 50642: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 50646: 302a 0032 movew %a2@(50),%d0 5064a: 5380 subql #1,%d0 5064c: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 50650: 42a7 clrl %sp@- 50652: 486e fff8 pea %fp@(-8) 50656: 4eb9 0004 3564 jsr 43564 5065c: 256e fff8 0044 movel %fp@(-8),%a2@(68) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 50662: 2f0a movel %a2,%sp@- 50664: 4eb9 0004 d87c jsr 4d87c 5066a: 4fef 000c lea %sp@(12),%sp 5066e: 4a80 tstl %d0 50670: 6622 bnes 50694 50672: 4a6a 0032 tstw %a2@(50) 50676: 661c bnes 50694 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 50678: 2079 0006 07dc moveal 607dc ,%a0 5067e: 2653 moveal %a3@,%a3 50680: b7e8 0004 cmpal %a0@(4),%a3 50684: 6604 bnes 5068a rtems_filesystem_current.node_access = NULL; 50686: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 5068a: 2f0a movel %a2,%sp@- 5068c: 4eb9 0004 34dc jsr 434dc 50692: 588f addql #4,%sp 50694: 4281 clrl %d1 } return 0; } 50696: 246e fff0 moveal %fp@(-16),%a2 5069a: 2001 movel %d1,%d0 5069c: 266e fff4 moveal %fp@(-12),%a3 506a0: 4e5e unlk %fp 506a2: 4e75 rts 00060b4c : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 60b4c: 4e56 0000 linkw %fp,#0 60b50: 2f0a movel %a2,%sp@- 60b52: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 60b54: 4a39 0009 b1c4 tstb 9b1c4 60b5a: 6600 00c4 bnew 60c20 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 60b5e: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 60b62: 45f9 0007 6958 lea 76958 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 60b68: 4879 0008 dc76 pea 8dc76 <_rodata_start+0x6e6> FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 60b6e: 7001 moveq #1,%d0 60b70: 13c0 0009 b1c4 moveb %d0,9b1c4 mkdir("/etc", 0777); 60b76: 4eb9 0004 5f20 jsr 45f20 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 60b7c: 4879 0008 f52b pea 8f52b 60b82: 4879 0008 dd90 pea 8dd90 <_rodata_start+0x800> 60b88: 4e92 jsr %a2@ 60b8a: 4fef 0010 lea %sp@(16),%sp 60b8e: 4a80 tstl %d0 60b90: 670c beqs 60b9e fclose(fp); 60b92: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60b94: 4eb9 0007 60f2 jsr 760f2 <== NOT EXECUTED 60b9a: 588f addql #4,%sp <== NOT EXECUTED 60b9c: 602e bras 60bcc <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 60b9e: 4879 0008 f19c pea 8f19c 60ba4: 4879 0008 dd90 pea 8dd90 <_rodata_start+0x800> 60baa: 4e92 jsr %a2@ 60bac: 508f addql #8,%sp 60bae: 2400 movel %d0,%d2 60bb0: 671a beqs 60bcc fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 60bb2: 2f00 movel %d0,%sp@- 60bb4: 4879 0009 2436 pea 92436 60bba: 4eb9 0007 6ae0 jsr 76ae0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 60bc0: 2f02 movel %d2,%sp@- 60bc2: 4eb9 0007 60f2 jsr 760f2 60bc8: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 60bcc: 4879 0008 f52b pea 8f52b 60bd2: 45f9 0007 6958 lea 76958 ,%a2 60bd8: 4879 0008 ddd5 pea 8ddd5 <_rodata_start+0x845> 60bde: 4e92 jsr %a2@ 60be0: 508f addql #8,%sp 60be2: 4a80 tstl %d0 60be4: 670c beqs 60bf2 fclose(fp); 60be6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60be8: 4eb9 0007 60f2 jsr 760f2 <== NOT EXECUTED 60bee: 588f addql #4,%sp <== NOT EXECUTED 60bf0: 602e bras 60c20 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 60bf2: 4879 0008 f19c pea 8f19c 60bf8: 4879 0008 ddd5 pea 8ddd5 <_rodata_start+0x845> 60bfe: 4e92 jsr %a2@ 60c00: 508f addql #8,%sp 60c02: 2400 movel %d0,%d2 60c04: 671a beqs 60c20 fprintf( fp, "root:x:0:root\n" 60c06: 2f00 movel %d0,%sp@- 60c08: 4879 0009 249d pea 9249d 60c0e: 4eb9 0007 6ae0 jsr 76ae0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 60c14: 2f02 movel %d2,%sp@- 60c16: 4eb9 0007 60f2 jsr 760f2 60c1c: 4fef 000c lea %sp@(12),%sp } } 60c20: 242e fff8 movel %fp@(-8),%d2 60c24: 246e fffc moveal %fp@(-4),%a2 60c28: 4e5e unlk %fp 60c2a: 4e75 rts 000455e4 : int ioctl( int fd, ioctl_command_t command, ... ) { 455e4: 4e56 0000 linkw %fp,#0 455e8: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 455ec: b0b9 0006 0944 cmpl 60944 ,%d0 455f2: 6422 bccs 45616 iop = rtems_libio_iop( fd ); 455f4: 2079 0006 2114 moveal 62114 ,%a0 455fa: ed88 lsll #6,%d0 455fc: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 455fe: 2028 0014 movel %a0@(20),%d0 45602: 0280 0000 0100 andil #256,%d0 45608: 670c beqs 45616 va_start(ap, command); buffer = va_arg(ap, void *); 4560a: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4560e: 2268 003c moveal %a0@(60),%a1 45612: 4a89 tstl %a1 45614: 6610 bnes 45626 rtems_set_errno_and_return_minus_one( EBADF ); 45616: 4eb9 0005 162c jsr 5162c <__errno> 4561c: 72ff moveq #-1,%d1 4561e: 2040 moveal %d0,%a0 45620: 7009 moveq #9,%d0 45622: 2080 movel %d0,%a0@ 45624: 602a bras 45650 if ( !iop->handlers->ioctl_h ) 45626: 2269 0010 moveal %a1@(16),%a1 4562a: 4a89 tstl %a1 4562c: 6612 bnes 45640 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4562e: 4eb9 0005 162c jsr 5162c <__errno> <== NOT EXECUTED 45634: 72ff moveq #-1,%d1 <== NOT EXECUTED 45636: 2040 moveal %d0,%a0 <== NOT EXECUTED 45638: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4563e: 6010 bras 45650 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 45640: 2f00 movel %d0,%sp@- 45642: 2f2e 000c movel %fp@(12),%sp@- 45646: 2f08 movel %a0,%sp@- 45648: 4e91 jsr %a1@ return rc; 4564a: 4fef 000c lea %sp@(12),%sp rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4564e: 2200 movel %d0,%d1 return rc; } 45650: 2001 movel %d1,%d0 45652: 4e5e unlk %fp 45654: 4e75 rts ... 000437be : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 437be: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 437c2: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED 437c6: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 437ca: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 437ce: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 437d2: 1401 moveb %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 437d4: 0800 0005 btst #5,%d0 <== NOT EXECUTED 437d8: 6704 beqs 437de <== NOT EXECUTED c &= 0x7f; 437da: 747f moveq #127,%d2 <== NOT EXECUTED 437dc: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 437de: 0800 0009 btst #9,%d0 <== NOT EXECUTED 437e2: 6724 beqs 43808 <== NOT EXECUTED c = tolower (c); 437e4: 2079 0005 b60c moveal 5b60c <__ctype_ptr__>,%a0 <== NOT EXECUTED 437ea: 7603 moveq #3,%d3 <== NOT EXECUTED 437ec: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 437f2: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 437f6: 49c1 extbl %d1 <== NOT EXECUTED 437f8: c283 andl %d3,%d1 <== NOT EXECUTED 437fa: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 437fe: b681 cmpl %d1,%d3 <== NOT EXECUTED 43800: 6606 bnes 43808 <== NOT EXECUTED 43802: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED if (c == '\r') { 43808: 4281 clrl %d1 <== NOT EXECUTED 4380a: 1202 moveb %d2,%d1 <== NOT EXECUTED 4380c: 760d moveq #13,%d3 <== NOT EXECUTED 4380e: b681 cmpl %d1,%d3 <== NOT EXECUTED 43810: 6610 bnes 43822 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 43812: 4a00 tstb %d0 <== NOT EXECUTED 43814: 6d00 00f8 bltw 4390e <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 43818: 0800 0008 btst #8,%d0 <== NOT EXECUTED 4381c: 671a beqs 43838 <== NOT EXECUTED 4381e: 740a moveq #10,%d2 <== NOT EXECUTED 43820: 6016 bras 43838 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 43822: 760a moveq #10,%d3 <== NOT EXECUTED 43824: b681 cmpl %d1,%d3 <== NOT EXECUTED 43826: 660a bnes 43832 <== NOT EXECUTED 43828: 0800 0006 btst #6,%d0 <== NOT EXECUTED 4382c: 670a beqs 43838 <== NOT EXECUTED 4382e: 740d moveq #13,%d2 <== NOT EXECUTED 43830: 6006 bras 43838 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 43832: 4a02 tstb %d2 <== NOT EXECUTED 43834: 6700 009e beqw 438d4 <== NOT EXECUTED 43838: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 4383c: 0801 0001 btst #1,%d1 <== NOT EXECUTED 43840: 6700 0092 beqw 438d4 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 43844: 4283 clrl %d3 <== NOT EXECUTED 43846: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 4384a: 4280 clrl %d0 <== NOT EXECUTED 4384c: 1002 moveb %d2,%d0 <== NOT EXECUTED 4384e: b680 cmpl %d0,%d3 <== NOT EXECUTED 43850: 6604 bnes 43856 <== NOT EXECUTED erase (tty, 0); 43852: 42a7 clrl %sp@- <== NOT EXECUTED 43854: 600e bras 43864 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 43856: 4283 clrl %d3 <== NOT EXECUTED 43858: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 4385c: b680 cmpl %d0,%d3 <== NOT EXECUTED 4385e: 6610 bnes 43870 <== NOT EXECUTED erase (tty, 1); 43860: 4878 0001 pea 1 <== NOT EXECUTED 43864: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43866: 4eba fdbe jsr %pc@(43626 ) <== NOT EXECUTED return 0; 4386a: 508f addql #8,%sp <== NOT EXECUTED 4386c: 6000 00a0 braw 4390e <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { 43870: 4283 clrl %d3 <== NOT EXECUTED 43872: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 43876: b680 cmpl %d0,%d3 <== NOT EXECUTED 43878: 6606 bnes 43880 <== NOT EXECUTED 4387a: 7001 moveq #1,%d0 <== NOT EXECUTED 4387c: 6000 0092 braw 43910 <== NOT EXECUTED return 1; } else if (c == '\n') { 43880: 760a moveq #10,%d3 <== NOT EXECUTED 43882: b680 cmpl %d0,%d3 <== NOT EXECUTED 43884: 6620 bnes 438a6 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 43886: 7048 moveq #72,%d0 <== NOT EXECUTED 43888: c280 andl %d0,%d1 <== NOT EXECUTED 4388a: 670c beqs 43898 <== NOT EXECUTED echo (c, tty); 4388c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4388e: 4878 000a pea a <== NOT EXECUTED 43892: 4eba fd0c jsr %pc@(435a0 ) <== NOT EXECUTED 43896: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 43898: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 4389c: 7001 moveq #1,%d0 <== NOT EXECUTED 4389e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 438a2: 740a moveq #10,%d2 <== NOT EXECUTED 438a4: 605c bras 43902 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 438a6: 4283 clrl %d3 <== NOT EXECUTED 438a8: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 438ac: b680 cmpl %d0,%d3 <== NOT EXECUTED 438ae: 670a beqs 438ba <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 438b0: 4283 clrl %d3 <== NOT EXECUTED 438b2: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 438b6: b680 cmpl %d0,%d3 <== NOT EXECUTED 438b8: 661a bnes 438d4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 438ba: 44c1 movew %d1,%ccr <== NOT EXECUTED 438bc: 6a0e bpls 438cc <== NOT EXECUTED echo (c, tty); 438be: 2f0a movel %a2,%sp@- <== NOT EXECUTED 438c0: 4280 clrl %d0 <== NOT EXECUTED 438c2: 1002 moveb %d2,%d0 <== NOT EXECUTED 438c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438c6: 4eba fcd8 jsr %pc@(435a0 ) <== NOT EXECUTED 438ca: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 438cc: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 438d0: 7001 moveq #1,%d0 <== NOT EXECUTED 438d2: 602a bras 438fe <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 438d4: 2039 0005 b534 movel 5b534 ,%d0 <== NOT EXECUTED 438da: 5380 subql #1,%d0 <== NOT EXECUTED 438dc: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 438e0: 6f2c bles 4390e <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 438e2: 7008 moveq #8,%d0 <== NOT EXECUTED 438e4: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 438e8: 670e beqs 438f8 <== NOT EXECUTED echo (c, tty); 438ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 438ec: 4280 clrl %d0 <== NOT EXECUTED 438ee: 1002 moveb %d2,%d0 <== NOT EXECUTED 438f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438f2: 4eba fcac jsr %pc@(435a0 ) <== NOT EXECUTED 438f6: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 438f8: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 438fc: 4280 clrl %d0 <== NOT EXECUTED 438fe: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 43902: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 43906: 5281 addql #1,%d1 <== NOT EXECUTED 43908: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 4390c: 6002 bras 43910 <== NOT EXECUTED 4390e: 4280 clrl %d0 <== NOT EXECUTED } return 0; } 43910: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43916: 4e5e unlk %fp <== NOT EXECUTED 43918: 4e75 rts 00061000 : int link( const char *existing, const char *new ) { 61000: 4e56 ffc8 linkw %fp,#-56 61004: 48d7 040c moveml %d2-%d3/%a2,%sp@ 61008: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 6100c: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 6100e: 246e 000c moveal %fp@(12),%a2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 61012: 4eb9 0007 c05c jsr 7c05c 61018: 7201 moveq #1,%d1 6101a: 2e81 movel %d1,%sp@ 6101c: 486e ffe8 pea %fp@(-24) 61020: 42a7 clrl %sp@- 61022: 2f00 movel %d0,%sp@- 61024: 2f02 movel %d2,%sp@- 61026: 4eb9 0004 5772 jsr 45772 0, &existing_loc, true ); if ( result != 0 ) 6102c: 4fef 0014 lea %sp@(20),%sp 61030: 4a80 tstl %d0 61032: 6706 beqs 6103a 61034: 74ff moveq #-1,%d2 61036: 6000 01a6 braw 611de /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 6103a: 742f moveq #47,%d2 6103c: 1012 moveb %a2@,%d0 6103e: 1200 moveb %d0,%d1 61040: 49c1 extbl %d1 61042: b481 cmpl %d1,%d2 61044: 670c beqs 61052 61046: 143c 005c moveb #92,%d2 6104a: b481 cmpl %d1,%d2 6104c: 6704 beqs 61052 6104e: 4a00 tstb %d0 61050: 6622 bnes 61074 61052: 4878 0014 pea 14 61056: 2079 0009 717c moveal 9717c ,%a0 6105c: 41e8 0018 lea %a0@(24),%a0 61060: 2f08 movel %a0,%sp@- 61062: 486e ffd4 pea %fp@(-44) 61066: 4eb9 0007 8fec jsr 78fec 6106c: 4fef 000c lea %sp@(12),%sp 61070: 7001 moveq #1,%d0 61072: 601e bras 61092 61074: 4878 0014 pea 14 61078: 2039 0009 717c movel 9717c ,%d0 6107e: 5880 addql #4,%d0 61080: 2f00 movel %d0,%sp@- 61082: 486e ffd4 pea %fp@(-44) 61086: 4eb9 0007 8fec jsr 78fec 6108c: 4fef 000c lea %sp@(12),%sp 61090: 4280 clrl %d0 if ( !parent_loc.ops->evalformake_h ) { 61092: 206e ffe0 moveal %fp@(-32),%a0 61096: 2068 0004 moveal %a0@(4),%a0 6109a: 4a88 tstl %a0 6109c: 661c bnes 610ba rtems_filesystem_freenode( &existing_loc ); 6109e: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 610a2: 4a88 tstl %a0 <== NOT EXECUTED 610a4: 6700 00e0 beqw 61186 <== NOT EXECUTED 610a8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 610ac: 4a88 tstl %a0 <== NOT EXECUTED 610ae: 6700 00d6 beqw 61186 <== NOT EXECUTED 610b2: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 610b6: 6000 00ca braw 61182 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 610ba: 486e fffc pea %fp@(-4) 610be: 240e movel %fp,%d2 610c0: 0682 ffff ffd4 addil #-44,%d2 610c6: 2f02 movel %d2,%sp@- 610c8: 4872 0800 pea %a2@(00000000,%d0:l) 610cc: 4e90 jsr %a0@ if ( result != 0 ) { 610ce: 4fef 000c lea %sp@(12),%sp if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 610d2: 2600 movel %d0,%d3 if ( result != 0 ) { 610d4: 6728 beqs 610fe rtems_filesystem_freenode( &existing_loc ); 610d6: 206e fff4 moveal %fp@(-12),%a0 610da: 4a88 tstl %a0 610dc: 6710 beqs 610ee 610de: 2068 001c moveal %a0@(28),%a0 610e2: 4a88 tstl %a0 610e4: 6708 beqs 610ee 610e6: 486e ffe8 pea %fp@(-24) 610ea: 4e90 jsr %a0@ 610ec: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 610ee: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 610f4: 74ff moveq #-1,%d2 610f6: 2040 moveal %d0,%a0 610f8: 2083 movel %d3,%a0@ 610fa: 6000 00e2 braw 611de /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 610fe: 202e fff8 movel %fp@(-8),%d0 61102: b0ae ffe4 cmpl %fp@(-28),%d0 61106: 6742 beqs 6114a rtems_filesystem_freenode( &existing_loc ); 61108: 206e fff4 moveal %fp@(-12),%a0 6110c: 4a88 tstl %a0 6110e: 6710 beqs 61120 61110: 2068 001c moveal %a0@(28),%a0 61114: 4a88 tstl %a0 61116: 6708 beqs 61120 61118: 486e ffe8 pea %fp@(-24) 6111c: 4e90 jsr %a0@ 6111e: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 61120: 206e ffe0 moveal %fp@(-32),%a0 61124: 4a88 tstl %a0 61126: 6710 beqs 61138 61128: 2068 001c moveal %a0@(28),%a0 6112c: 4a88 tstl %a0 6112e: 6708 beqs 61138 61130: 486e ffd4 pea %fp@(-44) 61134: 4e90 jsr %a0@ 61136: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 61138: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 6113e: 74ff moveq #-1,%d2 61140: 2040 moveal %d0,%a0 61142: 7012 moveq #18,%d0 61144: 2080 movel %d0,%a0@ 61146: 6000 0096 braw 611de } if ( !parent_loc.ops->link_h ) { 6114a: 206e ffe0 moveal %fp@(-32),%a0 6114e: 2068 0008 moveal %a0@(8),%a0 61152: 4a88 tstl %a0 61154: 6642 bnes 61198 rtems_filesystem_freenode( &existing_loc ); 61156: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 6115a: 4a88 tstl %a0 <== NOT EXECUTED 6115c: 6710 beqs 6116e <== NOT EXECUTED 6115e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61162: 4a88 tstl %a0 <== NOT EXECUTED 61164: 6708 beqs 6116e <== NOT EXECUTED 61166: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 6116a: 4e90 jsr %a0@ <== NOT EXECUTED 6116c: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 6116e: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 61172: 4a88 tstl %a0 <== NOT EXECUTED 61174: 6710 beqs 61186 <== NOT EXECUTED 61176: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6117a: 4a88 tstl %a0 <== NOT EXECUTED 6117c: 6708 beqs 61186 <== NOT EXECUTED 6117e: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 61182: 4e90 jsr %a0@ <== NOT EXECUTED 61184: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61186: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 6118c: 74ff moveq #-1,%d2 <== NOT EXECUTED 6118e: 2040 moveal %d0,%a0 <== NOT EXECUTED 61190: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61196: 6046 bras 611de <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 61198: 2f2e fffc movel %fp@(-4),%sp@- 6119c: 260e movel %fp,%d3 6119e: 0683 ffff ffe8 addil #-24,%d3 611a4: 2f02 movel %d2,%sp@- 611a6: 2f03 movel %d3,%sp@- 611a8: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 611aa: 206e fff4 moveal %fp@(-12),%a0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 611ae: 2400 movel %d0,%d2 rtems_filesystem_freenode( &existing_loc ); 611b0: 4fef 000c lea %sp@(12),%sp 611b4: 4a88 tstl %a0 611b6: 670e beqs 611c6 611b8: 2068 001c moveal %a0@(28),%a0 611bc: 4a88 tstl %a0 611be: 6706 beqs 611c6 611c0: 2f03 movel %d3,%sp@- 611c2: 4e90 jsr %a0@ 611c4: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 611c6: 206e ffe0 moveal %fp@(-32),%a0 611ca: 4a88 tstl %a0 611cc: 6710 beqs 611de 611ce: 2068 001c moveal %a0@(28),%a0 611d2: 4a88 tstl %a0 611d4: 6708 beqs 611de 611d6: 486e ffd4 pea %fp@(-44) 611da: 4e90 jsr %a0@ 611dc: 588f addql #4,%sp return result; } 611de: 2002 movel %d2,%d0 611e0: 4cee 040c ffc8 moveml %fp@(-56),%d2-%d3/%a2 611e6: 4e5e unlk %fp 611e8: 4e75 rts 00044f60 : int mode __attribute__((unused)), struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), struct sigevent *sig __attribute__((unused)) ) { 44f60: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44f64: 4eb9 0004 d430 jsr 4d430 <__errno> 44f6a: 7258 moveq #88,%d1 44f6c: 2040 moveal %d0,%a0 } 44f6e: 70ff moveq #-1,%d0 44f70: 4e5e unlk %fp struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), struct sigevent *sig __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44f72: 2081 movel %d1,%a0@ } 44f74: 4e75 rts ... 000592e4 : off_t lseek( int fd, off_t offset, int whence ) { 592e4: 4e56 ffec linkw %fp,#-20 592e8: 206e 0014 moveal %fp@(20),%a0 592ec: 48d7 043c moveml %d2-%d5/%a2,%sp@ 592f0: 242e 0008 movel %fp@(8),%d2 592f4: 202e 000c movel %fp@(12),%d0 592f8: 222e 0010 movel %fp@(16),%d1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 592fc: b4b9 0005 b434 cmpl 5b434 ,%d2 59302: 6416 bccs 5931a iop = rtems_libio_iop( fd ); 59304: 2479 0005 cb34 moveal 5cb34 ,%a2 5930a: ed8a lsll #6,%d2 5930c: d5c2 addal %d2,%a2 rtems_libio_check_is_open(iop); 5930e: 242a 0014 movel %a2@(20),%d2 59312: 0282 0000 0100 andil #256,%d2 59318: 660e bnes 59328 5931a: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 59320: 7209 moveq #9,%d1 <== NOT EXECUTED 59322: 2040 moveal %d0,%a0 <== NOT EXECUTED 59324: 2081 movel %d1,%a0@ <== NOT EXECUTED 59326: 6068 bras 59390 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 59328: 226a 003c moveal %a2@(60),%a1 5932c: 4aa9 0014 tstl %a1@(20) 59330: 6610 bnes 59342 rtems_set_errno_and_return_minus_one( ENOTSUP ); 59332: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 59338: 2040 moveal %d0,%a0 <== NOT EXECUTED 5933a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 59340: 604e bras 59390 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 59342: 7801 moveq #1,%d4 /* * Now process the lseek(). */ old_offset = iop->offset; 59344: 242a 000c movel %a2@(12),%d2 59348: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 5934c: b888 cmpl %a0,%d4 5934e: 6714 beqs 59364 59350: 7a02 moveq #2,%d5 59352: ba88 cmpl %a0,%d5 59354: 6718 beqs 5936e 59356: 4a88 tstl %a0 59358: 662a bnes 59384 case SEEK_SET: iop->offset = offset; 5935a: 2540 000c movel %d0,%a2@(12) 5935e: 2541 0010 movel %d1,%a2@(16) break; 59362: 6032 bras 59396 case SEEK_CUR: iop->offset += offset; 59364: 2800 movel %d0,%d4 59366: 2a01 movel %d1,%d5 59368: da83 addl %d3,%d5 5936a: d982 addxl %d2,%d4 5936c: 600c bras 5937a break; case SEEK_END: iop->offset = iop->size + offset; 5936e: 282a 0004 movel %a2@(4),%d4 59372: 2a2a 0008 movel %a2@(8),%d5 59376: da81 addl %d1,%d5 59378: d980 addxl %d0,%d4 5937a: 2544 000c movel %d4,%a2@(12) 5937e: 2545 0010 movel %d5,%a2@(16) break; 59382: 6012 bras 59396 default: rtems_set_errno_and_return_minus_one( EINVAL ); 59384: 4eb9 0004 ca1c jsr 4ca1c <__errno> 5938a: 2040 moveal %d0,%a0 5938c: 7016 moveq #22,%d0 5938e: 2080 movel %d0,%a0@ 59390: 78ff moveq #-1,%d4 59392: 7aff moveq #-1,%d5 59394: 602c bras 593c2 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 59396: 226a 003c moveal %a2@(60),%a1 5939a: 2f08 movel %a0,%sp@- 5939c: 2f01 movel %d1,%sp@- 5939e: 2f00 movel %d0,%sp@- 593a0: 2f0a movel %a2,%sp@- 593a2: 2069 0014 moveal %a1@(20),%a0 593a6: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 593a8: 4fef 0010 lea %sp@(16),%sp /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 593ac: 2800 movel %d0,%d4 593ae: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 593b0: 70ff moveq #-1,%d0 593b2: 72ff moveq #-1,%d1 593b4: 9285 subl %d5,%d1 593b6: 9184 subxl %d4,%d0 593b8: 6608 bnes 593c2 iop->offset = old_offset; 593ba: 2542 000c movel %d2,%a2@(12) 593be: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 593c2: 2205 movel %d5,%d1 593c4: 2004 movel %d4,%d0 593c6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 593cc: 4e5e unlk %fp 593ce: 4e75 rts 00061320 : int _STAT_NAME( const char *path, struct stat *buf ) { 61320: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 61324: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 61328: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED 6132c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 61330: 6612 bnes 61344 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 61332: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 61338: 74ff moveq #-1,%d2 <== NOT EXECUTED 6133a: 2040 moveal %d0,%a0 <== NOT EXECUTED 6133c: 700e moveq #14,%d0 <== NOT EXECUTED 6133e: 2080 movel %d0,%a0@ <== NOT EXECUTED 61340: 6000 0098 braw 613da <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 61344: 2f04 movel %d4,%sp@- <== NOT EXECUTED 61346: 260e movel %fp,%d3 <== NOT EXECUTED 61348: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 6134e: 4eb9 0007 c05c jsr 7c05c <== NOT EXECUTED 61354: 4297 clrl %sp@ <== NOT EXECUTED 61356: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61358: 42a7 clrl %sp@- <== NOT EXECUTED 6135a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6135c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 6135e: 4eb9 0004 5772 jsr 45772 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 61364: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61368: 4a80 tstl %d0 <== NOT EXECUTED 6136a: 6704 beqs 61370 <== NOT EXECUTED 6136c: 74ff moveq #-1,%d2 <== NOT EXECUTED 6136e: 606a bras 613da <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 61370: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 61374: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 61378: 6628 bnes 613a2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 6137a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 6137e: 4a88 tstl %a0 <== NOT EXECUTED 61380: 670e beqs 61390 <== NOT EXECUTED 61382: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61386: 4a88 tstl %a0 <== NOT EXECUTED 61388: 6706 beqs 61390 <== NOT EXECUTED 6138a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 6138c: 4e90 jsr %a0@ <== NOT EXECUTED 6138e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61390: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 61396: 74ff moveq #-1,%d2 <== NOT EXECUTED 61398: 2040 moveal %d0,%a0 <== NOT EXECUTED 6139a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 613a0: 6038 bras 613da <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 613a2: 4878 0046 pea 46 <== NOT EXECUTED 613a6: 42a7 clrl %sp@- <== NOT EXECUTED 613a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 613aa: 4eb9 0007 9158 jsr 79158 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 613b0: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 613b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 613b6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 613b8: 2068 0018 moveal %a0@(24),%a0 <== NOT EXECUTED 613bc: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 613be: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 613c2: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 613c4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 613c8: 4a88 tstl %a0 <== NOT EXECUTED 613ca: 670e beqs 613da <== NOT EXECUTED 613cc: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 613d0: 4a88 tstl %a0 <== NOT EXECUTED 613d2: 6706 beqs 613da <== NOT EXECUTED 613d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 613d6: 4e90 jsr %a0@ <== NOT EXECUTED 613d8: 588f addql #4,%sp <== NOT EXECUTED return status; } 613da: 2002 movel %d2,%d0 <== NOT EXECUTED 613dc: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 613e2: 4e5e unlk %fp <== NOT EXECUTED 613e4: 4e75 rts 0004941c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4941c: 4e56 fff4 linkw %fp,#-12 49420: 52b9 0005 cb44 addql #1,5cb44 49426: 48d7 001c moveml %d2-%d4,%sp@ 4942a: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4942e: 4eb9 0004 93e4 jsr 493e4 /* * Validate the parameters */ if ( !size ) 49434: 4a83 tstl %d3 49436: 6700 0088 beqw 494c0 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4943a: 7003 moveq #3,%d0 4943c: b0b9 0005 ce1c cmpl 5ce1c <_System_state_Current>,%d0 49442: 660a bnes 4944e 49444: 4eb9 0004 938c jsr 4938c 4944a: 4a00 tstb %d0 4944c: 6772 beqs 494c0 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4944e: 42a7 clrl %sp@- 49450: 42a7 clrl %sp@- 49452: 2f03 movel %d3,%sp@- 49454: 2f39 0005 b440 movel 5b440 ,%sp@- 4945a: 4eb9 0004 a530 jsr 4a530 <_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 ) { 49460: 4fef 0010 lea %sp@(16),%sp 49464: 2400 movel %d0,%d2 49466: 6626 bnes 4948e if (rtems_malloc_sbrk_helpers) 49468: 2079 0005 baca moveal 5baca ,%a0 4946e: 4a88 tstl %a0 49470: 670e beqs 49480 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 49472: 2f03 movel %d3,%sp@- <== NOT EXECUTED 49474: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 49478: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 4947a: 588f addql #4,%sp <== NOT EXECUTED return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4947c: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 4947e: 6610 bnes 49490 <== NOT EXECUTED errno = ENOMEM; 49480: 4eb9 0004 ca1c jsr 4ca1c <__errno> 49486: 2040 moveal %d0,%a0 49488: 700c moveq #12,%d0 4948a: 2080 movel %d0,%a0@ return (void *) 0; 4948c: 6034 bras 494c2 4948e: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 49490: 2079 0005 bace moveal 5bace ,%a0 49496: 4a88 tstl %a0 49498: 670a beqs 494a4 (*rtems_malloc_dirty_helper)( return_this, size ); 4949a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4949c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4949e: 2050 moveal %a0@,%a0 <== NOT EXECUTED 494a0: 4e90 jsr %a0@ <== NOT EXECUTED 494a2: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 494a4: 2079 0005 bac6 moveal 5bac6 ,%a0 494aa: 4a88 tstl %a0 494ac: 6604 bnes 494b2 494ae: 2404 movel %d4,%d2 494b0: 6010 bras 494c2 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 494b2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 494b4: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 494b8: 2404 movel %d4,%d2 <== NOT EXECUTED 494ba: 4e90 jsr %a0@ <== NOT EXECUTED 494bc: 588f addql #4,%sp <== NOT EXECUTED 494be: 6002 bras 494c2 <== NOT EXECUTED 494c0: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 494c2: 2002 movel %d2,%d0 494c4: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 494ca: 4e5e unlk %fp 494cc: 4e75 rts ... 000493ca : } void malloc_deferred_free( void *pointer ) { 493ca: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 493ce: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 493d2: 4879 0005 d136 pea 5d136 <== NOT EXECUTED 493d8: 4eb9 0004 58d0 jsr 458d0 <_Chain_Append> <== NOT EXECUTED 493de: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 493e0: 4e5e unlk %fp <== NOT EXECUTED 493e2: 4e75 rts 000493e4 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 493e4: 4e56 0000 linkw %fp,#0 493e8: 2f0b movel %a3,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 493ea: 47f9 0004 a008 lea 4a008 <_Chain_Get>,%a3 493f0: 2f0a movel %a2,%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); 493f2: 45f9 0004 8f48 lea 48f48 ,%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) 493f8: 6006 bras 49400 free(to_be_freed); 493fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 493fc: 4e92 jsr %a2@ <== NOT EXECUTED 493fe: 588f addql #4,%sp <== NOT EXECUTED 49400: 4879 0005 d136 pea 5d136 49406: 4e93 jsr %a3@ 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) 49408: 588f addql #4,%sp 4940a: 4a80 tstl %d0 4940c: 66ec bnes 493fa free(to_be_freed); } 4940e: 246e fff8 moveal %fp@(-8),%a2 49412: 266e fffc moveal %fp@(-4),%a3 49416: 4e5e unlk %fp 49418: 4e75 rts ... 0004938c : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 4938c: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 49390: 2039 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d0 49396: 6704 beqs 4939c 49398: 4200 clrb %d0 <== NOT EXECUTED 4939a: 600a bras 493a6 <== NOT EXECUTED return false; if ( _ISR_Nest_level > 0 ) 4939c: 2039 0005 cd2e movel 5cd2e <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 493a2: 57c0 seq %d0 493a4: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 493a6: 4e5e unlk %fp 493a8: 4e75 rts 00061424 : s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)( 61424: 720a moveq #10,%d1 void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 61426: 4e56 ffe0 linkw %fp,#-32 rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 6142a: 2079 0009 bb50 moveal 9bb50 ,%a0 61430: 2279 0009 bb54 moveal 9bb54 ,%a1 void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 61436: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ s->space_available / 1024, allocated / 1024, /* avoid float! */ (allocated * 100) / s->space_available, s->max_depth / 1024, (s->max_depth * 100) / s->space_available, 6143a: 2479 0009 bb4c moveal 9bb4c ,%a2 s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)( 61440: 200a movel %a2,%d0 61442: e2a8 lsrl %d1,%d0 61444: 2640 moveal %d0,%a3 61446: 7016 moveq #22,%d0 61448: 2e09 movel %a1,%d7 6144a: e2af lsrl %d1,%d7 rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 6144c: 2639 0009 bb58 movel 9bb58 ,%d3 61452: 2839 0009 bb5c movel 9bb5c ,%d4 (*print)( 61458: 2439 0009 bb34 movel 9bb34 ,%d2 6145e: 2c03 movel %d3,%d6 61460: 2a04 movel %d4,%d5 61462: e2ad lsrl %d1,%d5 61464: 123c 0064 moveb #100,%d1 61468: e1ae lsll %d0,%d6 6146a: 200a movel %a2,%d0 6146c: 4c01 0800 mulsl %d1,%d0 61470: 8c85 orl %d5,%d6 61472: 2a08 movel %a0,%d5 61474: 2f06 movel %d6,%sp@- 61476: 7c16 moveq #22,%d6 61478: edad lsll %d6,%d5 void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 6147a: 2c2e 0008 movel %fp@(8),%d6 s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)( 6147e: 8a87 orl %d7,%d5 61480: 2e02 movel %d2,%d7 61482: 2f05 movel %d5,%sp@- void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 61484: 246e 000c moveal %fp@(12),%a2 s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)( 61488: 4c42 0000 remul %d2,%d0,%d0 6148c: 2f00 movel %d0,%sp@- rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 6148e: 2008 movel %a0,%d0 61490: 2209 movel %a1,%d1 (*print)( 61492: 2f0b movel %a3,%sp@- 61494: 4878 0064 pea 64 rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 61498: 9284 subl %d4,%d1 6149a: 9183 subxl %d3,%d0 (*print)( 6149c: 42a7 clrl %sp@- 6149e: 760a moveq #10,%d3 614a0: e6af lsrl %d3,%d7 614a2: 7616 moveq #22,%d3 rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 614a4: 2800 movel %d0,%d4 614a6: 2a01 movel %d1,%d5 (*print)( 614a8: 2f05 movel %d5,%sp@- 614aa: 2f00 movel %d0,%sp@- 614ac: 4eb9 0008 bd80 jsr 8bd80 <__muldi3> 614b2: 4fef 000c lea %sp@(12),%sp 614b6: 2e82 movel %d2,%sp@ 614b8: 2404 movel %d4,%d2 614ba: 42a7 clrl %sp@- 614bc: e7aa lsll %d3,%d2 614be: 2f01 movel %d1,%sp@- 614c0: 2605 movel %d5,%d3 614c2: 2f00 movel %d0,%sp@- 614c4: 4eb9 0008 c780 jsr 8c780 <__udivdi3> 614ca: 4fef 0010 lea %sp@(16),%sp 614ce: 2f01 movel %d1,%sp@- 614d0: 2f00 movel %d0,%sp@- 614d2: 700a moveq #10,%d0 614d4: e0ab lsrl %d0,%d3 614d6: 8682 orl %d2,%d3 614d8: 2404 movel %d4,%d2 614da: e0aa lsrl %d0,%d2 614dc: 2f03 movel %d3,%sp@- 614de: 2f02 movel %d2,%sp@- 614e0: 2f07 movel %d7,%sp@- 614e2: 4879 0009 24c8 pea 924c8 614e8: 2f06 movel %d6,%sp@- 614ea: 4e92 jsr %a2@ s->max_depth / 1024, (s->max_depth * 100) / s->space_available, (uint32_t) (s->lifetime_allocated / 1024), (uint32_t) (s->lifetime_freed / 1024) ); (*print)( 614ec: 4fef 0028 lea %sp@(40),%sp 614f0: 2eb9 0009 bb48 movel 9bb48 ,%sp@ 614f6: 2f39 0009 bb44 movel 9bb44 ,%sp@- 614fc: 2f39 0009 bb40 movel 9bb40 ,%sp@- 61502: 2f39 0009 bb3c movel 9bb3c ,%sp@- 61508: 2f39 0009 bb38 movel 9bb38 ,%sp@- 6150e: 4879 0009 252a pea 9252a 61514: 2f06 movel %d6,%sp@- 61516: 4e92 jsr %a2@ 61518: 4fef 001c lea %sp@(28),%sp s->memalign_calls, s->free_calls, s->realloc_calls, s->calloc_calls ); } 6151c: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 61522: 4e5e unlk %fp 61524: 4e75 rts ... 0004f8ae : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4f8ae: 4e56 0000 linkw %fp,#0 4f8b2: 2f0a movel %a2,%sp@- 4f8b4: 246e 0008 moveal %fp@(8),%a2 /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 4f8b8: 2f0a movel %a2,%sp@- 4f8ba: 4eb9 0004 d87c jsr 4d87c 4f8c0: 588f addql #4,%sp 4f8c2: 4a80 tstl %d0 4f8c4: 6632 bnes 4f8f8 4f8c6: 4a6a 0032 tstw %a2@(50) 4f8ca: 662c bnes 4f8f8 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 4f8cc: 2079 0006 07dc moveal 607dc ,%a0 4f8d2: b5e8 0004 cmpal %a0@(4),%a2 4f8d6: 6604 bnes 4f8dc rtems_filesystem_current.node_access = NULL; 4f8d8: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 4f8dc: 7006 moveq #6,%d0 4f8de: b0aa 0048 cmpl %a2@(72),%d0 4f8e2: 670a beqs 4f8ee IMFS_memfile_remove( the_jnode ); 4f8e4: 2f0a movel %a2,%sp@- 4f8e6: 4eb9 0004 f794 jsr 4f794 4f8ec: 588f addql #4,%sp free( the_jnode ); 4f8ee: 2f0a movel %a2,%sp@- 4f8f0: 4eb9 0004 34dc jsr 434dc 4f8f6: 588f addql #4,%sp } return 0; } 4f8f8: 246e fffc moveal %fp@(-4),%a2 4f8fc: 4280 clrl %d0 4f8fe: 4e5e unlk %fp 4f900: 4e75 rts 0004f6e2 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4f6e2: 4e56 ffec linkw %fp,#-20 4f6e6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4f6ea: 246e 0008 moveal %fp@(8),%a2 4f6ee: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 4f6f2: 4a8a tstl %a2 4f6f4: 661c bnes 4f712 4f6f6: 4879 0005 fb92 pea 5fb92 <== NOT EXECUTED 4f6fc: 4879 0005 fc79 pea 5fc79 <__FUNCTION__.6061> <== NOT EXECUTED 4f702: 4878 01b3 pea 1b3 <== NOT EXECUTED 4f706: 4879 0005 fb28 pea 5fb28 <== NOT EXECUTED 4f70c: 4eb9 0004 d590 jsr 4d590 <__assert_func> <== NOT EXECUTED 4f712: 2652 moveal %a2@,%a3 4f714: 4282 clrl %d2 b = *block_table; for ( i=0 ; i,%a4 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i if ( b[i] ) { 4f71e: 2013 movel %a3@,%d0 4f720: 6708 beqs 4f72a memfile_free_block( b[i] ); 4f722: 2f00 movel %d0,%sp@- 4f724: 4e94 jsr %a4@ b[i] = 0; 4f726: 588f addql #4,%sp 4f728: 4293 clrl %a3@ * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4f732: 2f12 movel %a2@,%sp@- 4f734: 4eb9 0004 f50a jsr 4f50a *block_table = 0; 4f73a: 588f addql #4,%sp 4f73c: 4292 clrl %a2@ } 4f73e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4f744: 4e5e unlk %fp 4f746: 4e75 rts 0004fb26 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4fb26: 4e56 ffec linkw %fp,#-20 4fb2a: 206e 0008 moveal %fp@(8),%a0 4fb2e: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4fb32: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4fb36: 202e 000c movel %fp@(12),%d0 4fb3a: 222e 0010 movel %fp@(16),%d1 * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 4fb3e: 242a 004c movel %a2@(76),%d2 4fb42: 262a 0050 movel %a2@(80),%d3 4fb46: 9681 subl %d1,%d3 4fb48: 9580 subxl %d0,%d2 4fb4a: 6c12 bges 4fb5e return IMFS_memfile_extend( the_jnode, length ); 4fb4c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4fb4e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4fb50: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fb52: 4eb9 0004 f9fe jsr 4f9fe <== NOT EXECUTED 4fb58: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fb5c: 6026 bras 4fb84 <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 4fb5e: 2540 004c movel %d0,%a2@(76) 4fb62: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 4fb66: 2140 0004 movel %d0,%a0@(4) 4fb6a: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 4fb6e: 42a7 clrl %sp@- 4fb70: 486e fff8 pea %fp@(-8) 4fb74: 4eb9 0004 3564 jsr 43564 4fb7a: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 4fb80: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 4fb82: 4280 clrl %d0 return 0; } 4fb84: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4fb8a: 4e5e unlk %fp 4fb8c: 4e75 rts 0004fb8e : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 4fb8e: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4fb90: 4e56 fff0 linkw %fp,#-16 4fb94: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4fb98: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4fb9c: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4fba0: b0ab 0048 cmpl %a3@(72),%d0 4fba4: 6620 bnes 4fbc6 if (iop->offset > the_jnode->info.linearfile.size) 4fba6: 202b 004c movel %a3@(76),%d0 <== NOT EXECUTED 4fbaa: 222b 0050 movel %a3@(80),%d1 <== NOT EXECUTED 4fbae: 242a 000c movel %a2@(12),%d2 <== NOT EXECUTED 4fbb2: 262a 0010 movel %a2@(16),%d3 <== NOT EXECUTED 4fbb6: 9681 subl %d1,%d3 <== NOT EXECUTED 4fbb8: 9580 subxl %d0,%d2 <== NOT EXECUTED 4fbba: 6f48 bles 4fc04 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 4fbbc: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 4fbc0: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4fbc4: 603e bras 4fc04 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4fbc6: 2f2a 0010 movel %a2@(16),%sp@- 4fbca: 2f2a 000c movel %a2@(12),%sp@- 4fbce: 2f0b movel %a3,%sp@- 4fbd0: 4eb9 0004 f9fe jsr 4f9fe 4fbd6: 4fef 000c lea %sp@(12),%sp 4fbda: 4a80 tstl %d0 4fbdc: 6716 beqs 4fbf4 rtems_set_errno_and_return_minus_one( ENOSPC ); 4fbde: 4eb9 0005 1424 jsr 51424 <__errno> <== NOT EXECUTED 4fbe4: 761c moveq #28,%d3 <== NOT EXECUTED 4fbe6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fbe8: 2083 movel %d3,%a0@ <== NOT EXECUTED 4fbea: 307c ffff moveaw #-1,%a0 <== NOT EXECUTED 4fbee: 327c ffff moveaw #-1,%a1 <== NOT EXECUTED 4fbf2: 6018 bras 4fc0c <== NOT EXECUTED iop->size = the_jnode->info.file.size; 4fbf4: 202b 004c movel %a3@(76),%d0 4fbf8: 222b 0050 movel %a3@(80),%d1 4fbfc: 2540 0004 movel %d0,%a2@(4) 4fc00: 2541 0008 movel %d1,%a2@(8) } return iop->offset; 4fc04: 206a 000c moveal %a2@(12),%a0 4fc08: 226a 0010 moveal %a2@(16),%a1 } 4fc0c: 2209 movel %a1,%d1 4fc0e: 2008 movel %a0,%d0 4fc10: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4fc16: 4e5e unlk %fp 4fc18: 4e75 rts 0004fe66 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4fe66: 4e56 fff0 linkw %fp,#-16 4fe6a: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4fe6e: 266e 0008 moveal %fp@(8),%a3 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4fe72: 202b 0014 movel %a3@(20),%d0 4fe76: 0280 0000 0204 andil #516,%d0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4fe7c: 246b 0038 moveal %a3@(56),%a2 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4fe80: 6750 beqs 4fed2 && (the_jnode->type == IMFS_LINEAR_FILE)) { 4fe82: 7006 moveq #6,%d0 4fe84: b0aa 0048 cmpl %a2@(72),%d0 4fe88: 6648 bnes 4fed2 uint32_t count = the_jnode->info.linearfile.size; 4fe8a: 202a 0050 movel %a2@(80),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4fe8e: 4282 clrl %d2 <== NOT EXECUTED 4fe90: 4283 clrl %d3 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 4fe92: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4fe96: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED 4fe9a: 2543 0050 movel %d3,%a2@(80) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4fe9e: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 4fea0: 42aa 0054 clrl %a2@(84) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4fea4: 2543 0048 movel %d3,%a2@(72) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4fea8: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4feac: 42aa 005c clrl %a2@(92) <== NOT EXECUTED if ((count != 0) 4feb0: 4a80 tstl %d0 <== NOT EXECUTED 4feb2: 671e beqs 4fed2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4feb4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4feb6: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4feb8: 42a7 clrl %sp@- <== NOT EXECUTED 4feba: 42a7 clrl %sp@- <== NOT EXECUTED 4febc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4febe: 4eb9 0004 fc1a jsr 4fc1a <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 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) 4fec4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4fec8: 72ff moveq #-1,%d1 <== NOT EXECUTED 4feca: b280 cmpl %d0,%d1 <== NOT EXECUTED 4fecc: 6604 bnes 4fed2 <== NOT EXECUTED 4fece: 70ff moveq #-1,%d0 <== NOT EXECUTED 4fed0: 602e bras 4ff00 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4fed2: 202b 0014 movel %a3@(20),%d0 4fed6: 0280 0000 0200 andil #512,%d0 4fedc: 6710 beqs 4feee iop->offset = the_jnode->info.file.size; 4fede: 242a 004c movel %a2@(76),%d2 4fee2: 262a 0050 movel %a2@(80),%d3 4fee6: 2742 000c movel %d2,%a3@(12) 4feea: 2743 0010 movel %d3,%a3@(16) iop->size = the_jnode->info.file.size; 4feee: 4280 clrl %d0 4fef0: 222a 004c movel %a2@(76),%d1 4fef4: 242a 0050 movel %a2@(80),%d2 4fef8: 2741 0004 movel %d1,%a3@(4) 4fefc: 2742 0008 movel %d2,%a3@(8) return 0; } 4ff00: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4ff06: 4e5e unlk %fp 4ff08: 4e75 rts 0004246c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 4246c: 4e56 ffdc linkw %fp,#-36 42470: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42474: 242e 000c movel %fp@(12),%d2 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 42478: 2002 movel %d2,%d0 4247a: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42480: 246e 0008 moveal %fp@(8),%a2 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 42484: 6612 bnes 42498 rtems_set_errno_and_return_minus_one( EINVAL ); 42486: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4248c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4248e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42490: 7016 moveq #22,%d0 <== NOT EXECUTED 42492: 2080 movel %d0,%a0@ <== NOT EXECUTED 42494: 6000 00e0 braw 42576 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42498: 762f moveq #47,%d3 4249a: 1012 moveb %a2@,%d0 4249c: 1200 moveb %d0,%d1 4249e: 49c1 extbl %d1 424a0: b681 cmpl %d1,%d3 424a2: 670c beqs 424b0 424a4: 163c 005c moveb #92,%d3 424a8: b681 cmpl %d1,%d3 424aa: 6704 beqs 424b0 424ac: 4a00 tstb %d0 424ae: 6622 bnes 424d2 424b0: 4878 0014 pea 14 424b4: 2079 0005 b544 moveal 5b544 ,%a0 424ba: 41e8 0018 lea %a0@(24),%a0 424be: 2f08 movel %a0,%sp@- 424c0: 486e ffe8 pea %fp@(-24) 424c4: 4eb9 0004 d23c jsr 4d23c 424ca: 4fef 000c lea %sp@(12),%sp 424ce: 7001 moveq #1,%d0 424d0: 601e bras 424f0 424d2: 4878 0014 pea 14 424d6: 2039 0005 b544 movel 5b544 ,%d0 424dc: 5880 addql #4,%d0 424de: 2f00 movel %d0,%sp@- 424e0: 486e ffe8 pea %fp@(-24) 424e4: 4eb9 0004 d23c jsr 4d23c 424ea: 4fef 000c lea %sp@(12),%sp 424ee: 4280 clrl %d0 if ( !temp_loc.ops->evalformake_h ) { 424f0: 206e fff4 moveal %fp@(-12),%a0 424f4: 2068 0004 moveal %a0@(4),%a0 424f8: 4a88 tstl %a0 424fa: 673a beqs 42536 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 424fc: 486e fffc pea %fp@(-4) 42500: 260e movel %fp,%d3 42502: 0683 ffff ffe8 addil #-24,%d3 42508: 2f03 movel %d3,%sp@- 4250a: 4872 0800 pea %a2@(00000000,%d0:l) 4250e: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42510: 4fef 000c lea %sp@(12),%sp 42514: 4a80 tstl %d0 42516: 6704 beqs 4251c 42518: 74ff moveq #-1,%d2 4251a: 605a bras 42576 return -1; if ( !temp_loc.ops->mknod_h ) { 4251c: 226e fff4 moveal %fp@(-12),%a1 42520: 2069 0014 moveal %a1@(20),%a0 42524: 4a88 tstl %a0 42526: 6620 bnes 42548 rtems_filesystem_freenode( &temp_loc ); 42528: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4252c: 4a88 tstl %a0 <== NOT EXECUTED 4252e: 6706 beqs 42536 <== NOT EXECUTED 42530: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42532: 4e90 jsr %a0@ <== NOT EXECUTED 42534: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42536: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4253c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4253e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42540: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42546: 602e bras 42576 <== NOT EXECUTED } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42548: 2f03 movel %d3,%sp@- 4254a: 2f2e 0014 movel %fp@(20),%sp@- 4254e: 2f2e 0010 movel %fp@(16),%sp@- 42552: 2f02 movel %d2,%sp@- 42554: 2f2e fffc movel %fp@(-4),%sp@- 42558: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 4255a: 206e fff4 moveal %fp@(-12),%a0 if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 4255e: 2400 movel %d0,%d2 rtems_filesystem_freenode( &temp_loc ); 42560: 4fef 0014 lea %sp@(20),%sp 42564: 4a88 tstl %a0 42566: 670e beqs 42576 42568: 2068 001c moveal %a0@(28),%a0 4256c: 4a88 tstl %a0 4256e: 6706 beqs 42576 42570: 2f03 movel %d3,%sp@- 42572: 4e90 jsr %a0@ 42574: 588f addql #4,%sp return result; } 42576: 2002 movel %d2,%d0 42578: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 4257e: 4e5e unlk %fp 42580: 4e75 rts ... 000425a6 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 425a6: 4e56 ffd0 linkw %fp,#-48 425aa: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 425ae: 2a6e 0008 moveal %fp@(8),%a5 425b2: 286e 000c moveal %fp@(12),%a4 425b6: 282e 0010 movel %fp@(16),%d4 425ba: 266e 0014 moveal %fp@(20),%a3 425be: 242e 0018 movel %fp@(24),%d2 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 425c2: 4a8c tstl %a4 425c4: 6706 beqs 425cc /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 425c6: 7001 moveq #1,%d0 425c8: b084 cmpl %d4,%d0 425ca: 6412 bccs 425de options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 425cc: 4eb9 0004 ca1c jsr 4ca1c <__errno> 425d2: 7416 moveq #22,%d2 425d4: 72ff moveq #-1,%d1 425d6: 2040 moveal %d0,%a0 425d8: 2082 movel %d2,%a0@ return -1; 425da: 6000 01b4 braw 42790 } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 425de: 4aac 0024 tstl %a4@(36) 425e2: 660e bnes 425f2 errno = ENOTSUP; 425e4: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 425ea: 97cb subal %a3,%a3 <== NOT EXECUTED 425ec: 4283 clrl %d3 <== NOT EXECUTED 425ee: 6000 00a8 braw 42698 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 425f2: 4a8b tstl %a3 425f4: 6604 bnes 425fa 425f6: 706c moveq #108,%d0 425f8: 6010 bras 4260a size += strlen( device ) + 1; 425fa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 425fc: 4eb9 0004 dde8 jsr 4dde8 <== NOT EXECUTED 42602: 588f addql #4,%sp <== NOT EXECUTED 42604: 0680 0000 006d addil #109,%d0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4260a: 2f00 movel %d0,%sp@- 4260c: 4eb9 0004 941c jsr 4941c if ( !temp_mt_entry ) { 42612: 588f addql #4,%sp */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 42614: 2440 moveal %d0,%a2 42616: 2600 movel %d0,%d3 if ( !temp_mt_entry ) { 42618: 6612 bnes 4262c errno = ENOMEM; 4261a: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 42620: 72ff moveq #-1,%d1 <== NOT EXECUTED 42622: 2040 moveal %d0,%a0 <== NOT EXECUTED 42624: 700c moveq #12,%d0 <== NOT EXECUTED 42626: 2080 movel %d0,%a0@ <== NOT EXECUTED return -1; 42628: 6000 0166 braw 42790 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 4262c: 2544 0030 movel %d4,%a2@(48) if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 42630: 2540 002c movel %d0,%a2@(44) temp_mt_entry->options = options; if ( device ) { 42634: 4a8b tstl %a3 42636: 6718 beqs 42650 temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42638: 2f0b movel %a3,%sp@- <== NOT EXECUTED temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 4263a: 0680 0000 006c addil #108,%d0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 42640: 2f00 movel %d0,%sp@- <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 42642: 2540 0068 movel %d0,%a2@(104) <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42646: 4eb9 0004 d99c jsr 4d99c <== NOT EXECUTED 4264c: 508f addql #8,%sp <== NOT EXECUTED 4264e: 6004 bras 42654 <== NOT EXECUTED } else temp_mt_entry->dev = 0; 42650: 42aa 0068 clrl %a2@(104) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 42654: 4a82 tstl %d2 42656: 6700 00b6 beqw 4270e if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 4265a: 2f02 movel %d2,%sp@- * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 4265c: 7801 moveq #1,%d4 4265e: 47ee ffec lea %fp@(-20),%a3 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 42662: 4eb9 0004 dde8 jsr 4dde8 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 42668: 2e84 movel %d4,%sp@ 4266a: 2f0b movel %a3,%sp@- 4266c: 4878 0007 pea 7 42670: 2f00 movel %d0,%sp@- 42672: 2f02 movel %d2,%sp@- 42674: 4eb9 0004 223e jsr 4223e 4267a: 4fef 0014 lea %sp@(20),%sp 4267e: 72ff moveq #-1,%d1 42680: b280 cmpl %d0,%d1 42682: 6700 00e4 beqw 42768 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 42686: 206e fff8 moveal %fp@(-8),%a0 4268a: 2068 0010 moveal %a0@(16),%a0 4268e: 4a88 tstl %a0 42690: 6612 bnes 426a4 errno = ENOTSUP; 42692: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 42698: 2040 moveal %d0,%a0 <== NOT EXECUTED 4269a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED goto cleanup_and_bail; 426a0: 6000 00c8 braw 4276a <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 426a4: 2f0b movel %a3,%sp@- 426a6: 4e90 jsr %a0@ 426a8: 588f addql #4,%sp 426aa: 7201 moveq #1,%d1 426ac: b280 cmpl %d0,%d1 426ae: 6710 beqs 426c0 errno = ENOTDIR; 426b0: 4eb9 0004 ca1c jsr 4ca1c <__errno> 426b6: 7214 moveq #20,%d1 426b8: 2040 moveal %d0,%a0 426ba: 2081 movel %d1,%a0@ goto cleanup_and_bail; 426bc: 6000 00ac braw 4276a /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 426c0: 2079 0005 cb6c moveal 5cb6c ,%a0 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 426c6: 202e ffec movel %fp@(-20),%d0 426ca: 6008 bras 426d4 426cc: b0a8 001c cmpl %a0@(28),%d0 426d0: 670e beqs 426e0 * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 426d2: 2050 moveal %a0@,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 426d4: b1fc 0005 cb70 cmpal #379760,%a0 426da: 66f0 bnes 426cc 426dc: 6000 00be braw 4279c /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 426e0: 4eb9 0004 ca1c jsr 4ca1c <__errno> 426e6: 47ee ffec lea %fp@(-20),%a3 426ea: 2040 moveal %d0,%a0 426ec: 7010 moveq #16,%d0 426ee: 2080 movel %d0,%a0@ goto cleanup_and_bail; 426f0: 6078 bras 4276a * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 426f2: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 426f8: 47ee ffec lea %fp@(-20),%a3 <== NOT EXECUTED 426fc: 609a bras 42698 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 426fe: 2f0a movel %a2,%sp@- 42700: 47ee ffec lea %fp@(-20),%a3 42704: 4e90 jsr %a0@ 42706: 588f addql #4,%sp 42708: 4a80 tstl %d0 4270a: 6720 beqs 4272c 4270c: 605c bras 4276a <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4270e: 42aa 001c clrl %a2@(28) temp_mt_entry->mt_fs_root.ops = NULL; temp_mt_entry->mt_point_node.node_access = NULL; temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; 42712: 97cb subal %a3,%a3 * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; temp_mt_entry->mt_fs_root.handlers = NULL; 42714: 42aa 0024 clrl %a2@(36) temp_mt_entry->mt_fs_root.ops = NULL; 42718: 42aa 0028 clrl %a2@(40) temp_mt_entry->mt_point_node.node_access = NULL; 4271c: 42aa 0008 clrl %a2@(8) temp_mt_entry->mt_point_node.handlers = NULL; 42720: 42aa 0010 clrl %a2@(16) temp_mt_entry->mt_point_node.ops = NULL; 42724: 42aa 0014 clrl %a2@(20) temp_mt_entry->mt_point_node.mt_entry = NULL; 42728: 42aa 0018 clrl %a2@(24) } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4272c: 2f0a movel %a2,%sp@- 4272e: 206c 0024 moveal %a4@(36),%a0 42732: 4e90 jsr %a0@ 42734: 588f addql #4,%sp 42736: 4a80 tstl %d0 42738: 6714 beqs 4274e /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4273a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4273e: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 42742: 4a88 tstl %a0 <== NOT EXECUTED 42744: 6724 beqs 4276a <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 42746: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42748: 4e90 jsr %a0@ <== NOT EXECUTED 4274a: 588f addql #4,%sp <== NOT EXECUTED 4274c: 601c bras 4276a <== 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 ); 4274e: 2f0a movel %a2,%sp@- 42750: 4879 0005 cb6c pea 5cb6c 42756: 4eb9 0004 58d0 jsr 458d0 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 4275c: 508f addql #8,%sp 4275e: 4a8d tstl %a5 42760: 6702 beqs 42764 *mt_entry = temp_mt_entry; 42762: 2a8a movel %a2,%a5@ 42764: 4281 clrl %d1 42766: 6028 bras 42790 42768: 97cb subal %a3,%a3 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4276a: 2f03 movel %d3,%sp@- 4276c: 4eb9 0004 8f48 jsr 48f48 if ( loc_to_free ) 42772: 588f addql #4,%sp 42774: 4a8b tstl %a3 42776: 6716 beqs 4278e rtems_filesystem_freenode( loc_to_free ); 42778: 206b 000c moveal %a3@(12),%a0 4277c: 4a88 tstl %a0 4277e: 670e beqs 4278e 42780: 2068 001c moveal %a0@(28),%a0 42784: 4a88 tstl %a0 42786: 6706 beqs 4278e 42788: 2f0b movel %a3,%sp@- 4278a: 4e90 jsr %a0@ 4278c: 588f addql #4,%sp 4278e: 72ff moveq #-1,%d1 return -1; } 42790: 2001 movel %d1,%d0 42792: 4cee 3c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a5 42798: 4e5e unlk %fp 4279a: 4e75 rts * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 4279c: 226e fff8 moveal %fp@(-8),%a1 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 427a0: 256e fff4 0010 movel %fp@(-12),%a2@(16) temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 427a6: 256e fffc 0018 movel %fp@(-4),%a2@(24) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 427ac: 2069 0020 moveal %a1@(32),%a0 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 427b0: 2540 0008 movel %d0,%a2@(8) temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 427b4: 2549 0014 movel %a1,%a2@(20) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 427b8: 4a88 tstl %a0 427ba: 6600 ff42 bnew 426fe 427be: 6000 ff32 braw 426f2 <== NOT EXECUTED ... 00044f78 : const void *addr __attribute__((unused)), size_t len __attribute__((unused)), int prot __attribute__((unused)) ) { return 0; } 44f78: 4280 clrl %d0 int mprotect( const void *addr __attribute__((unused)), size_t len __attribute__((unused)), int prot __attribute__((unused)) ) { 44f7a: 4e56 0000 linkw %fp,#0 return 0; } 44f7e: 4e5e unlk %fp 44f80: 4e75 rts ... 000490bc : */ int mq_close( mqd_t mqdes ) { 490bc: 4e56 fffc linkw %fp,#-4 490c0: 2f0a movel %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( 490c2: 486e fffc pea %fp@(-4) 490c6: 2f2e 0008 movel %fp@(8),%sp@- 490ca: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 490d0: 4eb9 0004 c188 jsr 4c188 <_Objects_Get> POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); if ( location == OBJECTS_LOCAL ) { 490d6: 4fef 000c lea %sp@(12),%sp 490da: 2440 moveal %d0,%a2 490dc: 4aae fffc tstl %fp@(-4) 490e0: 663a bnes 4911c * First update the actual message queue to reflect this descriptor * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; 490e2: 206a 0010 moveal %a2@(16),%a0 the_mq->open_count -= 1; 490e6: 53a8 0016 subql #1,%a0@(22) _POSIX_Message_queue_Delete( the_mq ); 490ea: 2f08 movel %a0,%sp@- 490ec: 4eb9 0004 9134 jsr 49134 <_POSIX_Message_queue_Delete> /* * Now close this file descriptor. */ _Objects_Close( 490f2: 2f0a movel %a2,%sp@- 490f4: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 490fa: 4eb9 0004 bdbc jsr 4bdbc <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 49100: 2f0a movel %a2,%sp@- 49102: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 49108: 4eb9 0004 c030 jsr 4c030 <_Objects_Free> &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4910e: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> return 0; 49114: 4fef 0014 lea %sp@(20),%sp _Objects_Close( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 49118: 4280 clrl %d0 return 0; 4911a: 600e bras 4912a /* * OBJECTS_REMOTE: * OBJECTS_ERROR: */ rtems_set_errno_and_return_minus_one( EBADF ); 4911c: 4eb9 0005 2858 jsr 52858 <__errno> 49122: 7209 moveq #9,%d1 49124: 2040 moveal %d0,%a0 49126: 70ff moveq #-1,%d0 49128: 2081 movel %d1,%a0@ } 4912a: 246e fff8 moveal %fp@(-8),%a2 4912e: 4e5e unlk %fp 49130: 4e75 rts ... 00049184 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 49184: 4e56 fffc linkw %fp,#-4 49188: 2f0a movel %a2,%sp@- 4918a: 246e 000c moveal %fp@(12),%a2 POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 4918e: 4a8a tstl %a2 49190: 6610 bnes 491a2 rtems_set_errno_and_return_minus_one( EINVAL ); 49192: 4eb9 0005 2858 jsr 52858 <__errno> 49198: 72ff moveq #-1,%d1 4919a: 2040 moveal %d0,%a0 4919c: 7016 moveq #22,%d0 4919e: 2080 movel %d0,%a0@ 491a0: 6052 bras 491f4 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( 491a2: 486e fffc pea %fp@(-4) 491a6: 2f2e 0008 movel %fp@(8),%sp@- 491aa: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 491b0: 4eb9 0004 c188 jsr 4c188 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 491b6: 4fef 000c lea %sp@(12),%sp 491ba: 4aae fffc tstl %fp@(-4) 491be: 6626 bnes 491e6 * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 491c0: 2240 moveal %d0,%a1 491c2: 24a9 0014 movel %a1@(20),%a2@ the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 491c6: 2069 0010 moveal %a1@(16),%a0 */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 491ca: 2568 0066 0008 movel %a0@(102),%a2@(8) mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 491d0: 2568 005e 0004 movel %a0@(94),%a2@(4) mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 491d6: 2568 0062 000c movel %a0@(98),%a2@(12) _Thread_Enable_dispatch(); 491dc: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> 491e2: 4281 clrl %d1 return 0; 491e4: 600e bras 491f4 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 491e6: 4eb9 0005 2858 jsr 52858 <__errno> 491ec: 72ff moveq #-1,%d1 491ee: 2040 moveal %d0,%a0 491f0: 7009 moveq #9,%d0 491f2: 2080 movel %d0,%a0@ } 491f4: 246e fff8 moveal %fp@(-8),%a2 491f8: 2001 movel %d1,%d0 491fa: 4e5e unlk %fp 491fc: 4e75 rts ... 000492e0 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 492e0: 4e56 ffdc linkw %fp,#-36 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 492e4: 2039 0006 4bb0 movel 64bb0 <_Thread_Dispatch_disable_level>,%d0 492ea: 5280 addql #1,%d0 492ec: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 492f0: 23c0 0006 4bb0 movel %d0,64bb0 <_Thread_Dispatch_disable_level> 492f6: 262e 0008 movel %fp@(8),%d3 492fa: 242e 000c movel %fp@(12),%d2 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 492fe: 2a02 movel %d2,%d5 49300: 0285 0000 0200 andil #512,%d5 49306: 6604 bnes 4930c 49308: 4284 clrl %d4 4930a: 6004 bras 49310 va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 4930c: 282e 0014 movel %fp@(20),%d4 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 49310: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 49316: 4eb9 0004 bd3c jsr 4bd3c <_Objects_Allocate> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 4931c: 588f addql #4,%sp 4931e: 2440 moveal %d0,%a2 49320: 4a80 tstl %d0 49322: 6618 bnes 4933c _Thread_Enable_dispatch(); 49324: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 4932a: 7417 moveq #23,%d2 4932c: 4eb9 0005 2858 jsr 52858 <__errno> 49332: 72ff moveq #-1,%d1 49334: 2040 moveal %d0,%a0 49336: 2082 movel %d2,%a0@ 49338: 6000 0120 braw 4945a } the_mq_fd->oflag = oflag; 4933c: 2542 0014 movel %d2,%a2@(20) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 49340: 486e fffc pea %fp@(-4) 49344: 2f03 movel %d3,%sp@- 49346: 4eb9 0004 f524 jsr 4f524 <_POSIX_Message_queue_Name_to_id> * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 4934c: 508f addql #8,%sp _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4934e: 2640 moveal %d0,%a3 * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 49350: 4a80 tstl %d0 49352: 6732 beqs 49386 /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 49354: 7002 moveq #2,%d0 49356: b08b cmpl %a3,%d0 49358: 6606 bnes 49360 4935a: 4a85 tstl %d5 4935c: 6600 00a4 bnew 49402 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 49360: 2f0a movel %a2,%sp@- 49362: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 49368: 4eb9 0004 c030 jsr 4c030 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4936e: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 49374: 4eb9 0005 2858 jsr 52858 <__errno> 4937a: 508f addql #8,%sp 4937c: 72ff moveq #-1,%d1 4937e: 2040 moveal %d0,%a0 49380: 208b movel %a3,%a0@ 49382: 6000 00d6 braw 4945a 49386: 47f9 0004 c9da lea 4c9da <_Thread_Enable_dispatch>,%a3 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 4938c: 0282 0000 0a00 andil #2560,%d2 49392: 0c82 0000 0a00 cmpil #2560,%d2 49398: 6624 bnes 493be 4939a: 2f0a movel %a2,%sp@- 4939c: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 493a2: 4eb9 0004 c030 jsr 4c030 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 493a8: 4e93 jsr %a3@ rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 493aa: 4eb9 0005 2858 jsr 52858 <__errno> 493b0: 508f addql #8,%sp 493b2: 72ff moveq #-1,%d1 493b4: 2040 moveal %d0,%a0 493b6: 7011 moveq #17,%d0 493b8: 2080 movel %d0,%a0@ 493ba: 6000 009e braw 4945a RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 493be: 486e fff4 pea %fp@(-12) 493c2: 2f2e fffc movel %fp@(-4),%sp@- 493c6: 4879 0006 4e7e pea 64e7e <_POSIX_Message_queue_Information> 493cc: 4eb9 0004 c188 jsr 4c188 <_Objects_Get> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 493d2: 4281 clrl %d1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; 493d4: 2040 moveal %d0,%a0 493d6: 52a8 0016 addql #1,%a0@(22) 493da: 2079 0006 5004 moveal 65004 <_POSIX_Message_queue_Information_fds+0x18>,%a0 493e0: 322a 000a movew %a2@(10),%d1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 493e4: 2d40 fff8 movel %d0,%fp@(-8) 493e8: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) the_mq->open_count += 1; the_mq_fd->Queue = the_mq; 493ec: 2540 0010 movel %d0,%a2@(16) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 493f0: 42aa 000c clrl %a2@(12) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 493f4: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 493f6: 4e93 jsr %a3@ return (mqd_t)the_mq_fd->Object.id; 493f8: 222a 0008 movel %a2@(8),%d1 493fc: 4fef 000c lea %sp@(12),%sp 49400: 6058 bras 4945a /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 49402: 486e fff8 pea %fp@(-8) 49406: 47f9 0004 c9da lea 4c9da <_Thread_Enable_dispatch>,%a3 4940c: 2f04 movel %d4,%sp@- 4940e: 4878 0001 pea 1 49412: 2f03 movel %d3,%sp@- 49414: 4eb9 0004 f3b0 jsr 4f3b0 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 4941a: 4fef 0010 lea %sp@(16),%sp 4941e: 72ff moveq #-1,%d1 49420: b280 cmpl %d0,%d1 49422: 6616 bnes 4943a RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 49424: 2f0a movel %a2,%sp@- 49426: 4879 0006 4fec pea 64fec <_POSIX_Message_queue_Information_fds> 4942c: 4eb9 0004 c030 jsr 4c030 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 49432: 4e93 jsr %a3@ return (mqd_t) -1; 49434: 508f addql #8,%sp /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 49436: 72ff moveq #-1,%d1 return (mqd_t) -1; 49438: 6020 bras 4945a #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4943a: 4280 clrl %d0 4943c: 2079 0006 5004 moveal 65004 <_POSIX_Message_queue_Information_fds+0x18>,%a0 49442: 302a 000a movew %a2@(10),%d0 } the_mq_fd->Queue = the_mq; 49446: 256e fff8 0010 movel %fp@(-8),%a2@(16) 4944c: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 49450: 42aa 000c clrl %a2@(12) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 49454: 4e93 jsr %a3@ return (mqd_t) the_mq_fd->Object.id; 49456: 222a 0008 movel %a2@(8),%d1 } 4945a: 2001 movel %d1,%d0 4945c: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 49462: 4e5e unlk %fp 49464: 4e75 rts ... 000497d0 : */ int mq_unlink( const char *name ) { 497d0: 4e56 fff0 linkw %fp,#-16 497d4: 2039 0006 4bb0 movel 64bb0 <_Thread_Dispatch_disable_level>,%d0 497da: 5280 addql #1,%d0 497dc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 497e0: 23c0 0006 4bb0 movel %d0,64bb0 <_Thread_Dispatch_disable_level> register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 497e6: 486e fffc pea %fp@(-4) 497ea: 45f9 0004 c9da lea 4c9da <_Thread_Enable_dispatch>,%a2 497f0: 2f2e 0008 movel %fp@(8),%sp@- 497f4: 4eb9 0004 f524 jsr 4f524 <_POSIX_Message_queue_Name_to_id> if ( status != 0 ) { 497fa: 508f addql #8,%sp register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 497fc: 2400 movel %d0,%d2 if ( status != 0 ) { 497fe: 6710 beqs 49810 _Thread_Enable_dispatch(); 49800: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one( status ); 49802: 4eb9 0005 2858 jsr 52858 <__errno> 49808: 2040 moveal %d0,%a0 4980a: 70ff moveq #-1,%d0 4980c: 2082 movel %d2,%a0@ 4980e: 6034 bras 49844 } the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object( 49810: 4280 clrl %d0 49812: 2079 0006 4e96 moveal 64e96 <_POSIX_Message_queue_Information+0x18>,%a0 49818: 302e fffe movew %fp@(-2),%d0 4981c: 2670 0c00 moveal %a0@(00000000,%d0:l:4),%a3 &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); the_mq->linked = false; 49820: 4200 clrb %d0 49822: 1740 0015 moveb %d0,%a3@(21) RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove ( POSIX_Message_queue_Control *the_mq ) { _Objects_Namespace_remove( 49826: 2f0b movel %a3,%sp@- 49828: 4879 0006 4e7e pea 64e7e <_POSIX_Message_queue_Information> 4982e: 4eb9 0004 c2e0 jsr 4c2e0 <_Objects_Namespace_remove> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 49834: 2f0b movel %a3,%sp@- 49836: 4eb9 0004 9134 jsr 49134 <_POSIX_Message_queue_Delete> _Thread_Enable_dispatch(); 4983c: 4e92 jsr %a2@ return 0; 4983e: 4fef 000c lea %sp@(12),%sp the_mq->linked = false; _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); _Thread_Enable_dispatch(); 49842: 4280 clrl %d0 return 0; } 49844: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4984a: 4e5e unlk %fp 4984c: 4e75 rts ... 00062240 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 62240: 4e56 fff4 linkw %fp,#-12 62244: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 62248: 266e 0008 moveal %fp@(8),%a3 6224c: 246e 000c moveal %fp@(12),%a2 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 62250: 2f0b movel %a3,%sp@- 62252: 4eb9 0006 2390 jsr 62390 <_Timespec_Is_valid> 62258: 588f addql #4,%sp 6225a: 4a00 tstb %d0 6225c: 670a beqs 62268 * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 6225e: 4a93 tstl %a3@ 62260: 6d06 blts 62268 62262: 4aab 0004 tstl %a3@(4) 62266: 6c12 bges 6227a rtems_set_errno_and_return_minus_one( EINVAL ); 62268: 4eb9 0005 3ac4 jsr 53ac4 <__errno> 6226e: 7416 moveq #22,%d2 62270: 72ff moveq #-1,%d1 62272: 2040 moveal %d0,%a0 62274: 2082 movel %d2,%a0@ 62276: 6000 00ce braw 62346 ticks = _Timespec_To_ticks( rqtp ); 6227a: 2f0b movel %a3,%sp@- 6227c: 47f9 0004 a71e lea 4a71e <_Thread_Enable_dispatch>,%a3 62282: 4eb9 0005 0ce8 jsr 50ce8 <_Timespec_To_ticks> * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 62288: 588f addql #4,%sp * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 6228a: 2400 movel %d0,%d2 * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 6228c: 6628 bnes 622b6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 6228e: 2039 0006 84ec movel 684ec <_Thread_Dispatch_disable_level>,%d0 62294: 5280 addql #1,%d0 62296: 23c0 0006 84ec movel %d0,684ec <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _Thread_Yield_processor(); 6229c: 4eb9 0004 b348 jsr 4b348 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 622a2: 4e93 jsr %a3@ if ( rmtp ) { 622a4: 4a8a tstl %a2 622a6: 6700 009c beqw 62344 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 622aa: 42aa 0004 clrl %a2@(4) 622ae: 4281 clrl %d1 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 622b0: 4292 clrl %a2@ 622b2: 6000 0092 braw 62346 622b6: 2039 0006 84ec movel 684ec <_Thread_Dispatch_disable_level>,%d0 622bc: 5280 addql #1,%d0 622be: 23c0 0006 84ec movel %d0,684ec <_Thread_Dispatch_disable_level> /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 622c4: 2f3c 1000 0008 movel #268435464,%sp@- 622ca: 2f39 0006 85a6 movel 685a6 <_Thread_Executing>,%sp@- 622d0: 4eb9 0004 af6c jsr 4af6c <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 622d6: 2079 0006 85a6 moveal 685a6 <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 622dc: 203c 0004 a590 movel #304528,%d0 622e2: 2140 0064 movel %d0,%a0@(100) _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 622e6: 2028 0008 movel %a0@(8),%d0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 622ea: 42a8 0050 clrl %a0@(80) the_watchdog->routine = routine; the_watchdog->id = id; 622ee: 2140 0068 movel %d0,%a0@(104) the_watchdog->user_data = user_data; 622f2: 42a8 006c clrl %a0@(108) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 622f6: 2142 0054 movel %d2,%a0@(84) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 622fa: 4868 0048 pea %a0@(72) 622fe: 4879 0006 85c4 pea 685c4 <_Watchdog_Ticks_chain> 62304: 4eb9 0004 b72c jsr 4b72c <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 6230a: 4e93 jsr %a3@ /* calculate time remaining */ if ( rmtp ) { 6230c: 4fef 0010 lea %sp@(16),%sp 62310: 4a8a tstl %a2 62312: 6730 beqs 62344 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 62314: 2079 0006 85a6 moveal 685a6 <_Thread_Executing>,%a0 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 6231a: 2028 005c movel %a0@(92),%d0 6231e: 90a8 0060 subl %a0@(96),%d0 62322: d480 addl %d0,%d2 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 62324: 2f0a movel %a2,%sp@- 62326: 2f02 movel %d2,%sp@- 62328: 4eb9 0006 2354 jsr 62354 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 6232e: 508f addql #8,%sp 62330: 4a82 tstl %d2 62332: 6710 beqs 62344 rtems_set_errno_and_return_minus_one( EINTR ); 62334: 4eb9 0005 3ac4 jsr 53ac4 <__errno> 6233a: 72ff moveq #-1,%d1 6233c: 2040 moveal %d0,%a0 6233e: 7004 moveq #4,%d0 62340: 2080 movel %d0,%a0@ 62342: 6002 bras 62346 62344: 4281 clrl %d1 #endif } return 0; } 62346: 2001 movel %d1,%d0 62348: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 6234e: 4e5e unlk %fp 62350: 4e75 rts ... 00042906 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 42906: 4e56 0000 linkw %fp,#0 4290a: 2f0b movel %a3,%sp@- 4290c: 2f0a movel %a2,%sp@- struct _reent *ptr; if (_Thread_libc_reent == 0) 4290e: 4ab9 0005 cd1e tstl 5cd1e <_Thread_libc_reent> 42914: 6618 bnes 4292e { _REENT = _global_impure_ptr; 42916: 41f9 0005 ac28 lea 5ac28 <_global_impure_ptr>,%a0 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 4291c: 203c 0005 b610 movel #374288,%d0 42922: 23d0 0005 b610 movel %a0@,5b610 <_impure_ptr> 42928: 23c0 0005 cd1e movel %d0,5cd1e <_Thread_libc_reent> ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); #else /* It is OK to allocate from the workspace because these * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); 4292e: 4878 0422 pea 422 42932: 4eb9 0004 7e90 jsr 47e90 <_Workspace_Allocate> #endif if (ptr) { 42938: 588f addql #4,%sp ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); #else /* It is OK to allocate from the workspace because these * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); 4293a: 2440 moveal %d0,%a2 #endif if (ptr) { 4293c: 4a80 tstl %d0 4293e: 6606 bnes 42946 42940: 4200 clrb %d0 42942: 6000 014e braw 42a92 _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 42946: 41ea 02ea lea %a2@(746),%a0 4294a: 47f9 0004 d2ac lea 4d2ac ,%a3 42950: 2548 0004 movel %a0,%a2@(4) 42954: 41ea 0352 lea %a2@(850),%a0 42958: 2548 0008 movel %a0,%a2@(8) 4295c: 41ea 03ba lea %a2@(954),%a0 42960: 4292 clrl %a2@ 42962: 2548 000c movel %a0,%a2@(12) 42966: 42aa 0010 clrl %a2@(16) 4296a: 4878 0019 pea 19 4296e: 42a7 clrl %sp@- 42970: 486a 0014 pea %a2@(20) 42974: 4e93 jsr %a3@ 42976: 4201 clrb %d1 42978: 203c 0005 a36e movel #369518,%d0 4297e: 1541 005e moveb %d1,%a2@(94) 42982: 2540 0032 movel %d0,%a2@(50) 42986: 42aa 002e clrl %a2@(46) 4298a: 42aa 0036 clrl %a2@(54) 4298e: 42aa 003a clrl %a2@(58) 42992: 42aa 003e clrl %a2@(62) 42996: 42aa 0042 clrl %a2@(66) 4299a: 42aa 0046 clrl %a2@(70) 4299e: 42aa 004a clrl %a2@(74) 429a2: 42aa 004e clrl %a2@(78) 429a6: 42aa 0052 clrl %a2@(82) 429aa: 42aa 0056 clrl %a2@(86) 429ae: 42aa 005a clrl %a2@(90) 429b2: 4878 0024 pea 24 429b6: 42a7 clrl %sp@- 429b8: 486a 0078 pea %a2@(120) 429bc: 4e93 jsr %a3@ 429be: 4280 clrl %d0 429c0: 7201 moveq #1,%d1 429c2: 2540 00a0 movel %d0,%a2@(160) 429c6: 2541 00a4 movel %d1,%a2@(164) 429ca: 323c 330e movew #13070,%d1 429ce: 303c 1234 movew #4660,%d0 429d2: 307c abcd moveaw #-21555,%a0 429d6: 42aa 009c clrl %a2@(156) 429da: 3541 00a8 movew %d1,%a2@(168) 429de: 3540 00ac movew %d0,%a2@(172) 429e2: 42aa 00b6 clrl %a2@(182) 429e6: 323c e66d movew #-6547,%d1 429ea: 7005 moveq #5,%d0 429ec: 42aa 00ba clrl %a2@(186) 429f0: 3548 00aa movew %a0,%a2@(170) 429f4: 3541 00ae movew %d1,%a2@(174) 429f8: 42aa 00be clrl %a2@(190) 429fc: 3540 00b2 movew %d0,%a2@(178) 42a00: 307c deec moveaw #-8468,%a0 42a04: 42aa 00c2 clrl %a2@(194) 42a08: 4200 clrb %d0 42a0a: 720b moveq #11,%d1 42a0c: 42aa 00c6 clrl %a2@(198) 42a10: 42aa 00ca clrl %a2@(202) 42a14: 3548 00b0 movew %a0,%a2@(176) 42a18: 42aa 00f2 clrl %a2@(242) 42a1c: 3541 00b4 movew %d1,%a2@(180) 42a20: 42aa 00f6 clrl %a2@(246) 42a24: 42aa 00fa clrl %a2@(250) 42a28: 1540 00ce moveb %d0,%a2@(206) 42a2c: 42aa 00fe clrl %a2@(254) 42a30: 1540 00d6 moveb %d0,%a2@(214) 42a34: 42aa 0102 clrl %a2@(258) 42a38: 42aa 0106 clrl %a2@(262) 42a3c: 42aa 010a clrl %a2@(266) 42a40: 42aa 010e clrl %a2@(270) 42a44: 42aa 0112 clrl %a2@(274) 42a48: 42aa 0116 clrl %a2@(278) 42a4c: 42aa 00ee clrl %a2@(238) 42a50: 42aa 0146 clrl %a2@(326) 42a54: 42aa 014a clrl %a2@(330) 42a58: 42aa 014e clrl %a2@(334) 42a5c: 42aa 0152 clrl %a2@(338) 42a60: 42aa 02d2 clrl %a2@(722) 42a64: 42aa 01d2 clrl %a2@(466) 42a68: 42aa 02da clrl %a2@(730) 42a6c: 42aa 02de clrl %a2@(734) 42a70: 42aa 02e2 clrl %a2@(738) 42a74: 42aa 02e6 clrl %a2@(742) 42a78: 4878 0138 pea 138 42a7c: 42a7 clrl %sp@- 42a7e: 486a 02ea pea %a2@(746) 42a82: 4e93 jsr %a3@ creating_task->libc_reent = ptr; 42a84: 206e 000c moveal %fp@(12),%a0 return TRUE; 42a88: 4fef 0024 lea %sp@(36),%sp ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; 42a8c: 7001 moveq #1,%d0 42a8e: 214a 0106 movel %a2,%a0@(262) return TRUE; } return FALSE; } 42a92: 246e fff8 moveal %fp@(-8),%a2 42a96: 266e fffc moveal %fp@(-4),%a3 42a9a: 4e5e unlk %fp 42a9c: 4e75 rts ... 000428ae : */ int newlib_free_buffers( FILE *fp ) { 428ae: 4e56 0000 linkw %fp,#0 428b2: 2f0a movel %a2,%sp@- 428b4: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 428b8: 2f0a movel %a2,%sp@- 428ba: 4eb9 0004 cdb0 jsr 4cdb0 428c0: 588f addql #4,%sp 428c2: 7202 moveq #2,%d1 428c4: b280 cmpl %d0,%d1 428c6: 652a bcss 428f2 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 428c8: 302a 000c movew %a2@(12),%d0 428cc: 48c0 extl %d0 428ce: 4a00 tstb %d0 428d0: 6c2a bges 428fc free( fp->_bf._base ); 428d2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 428d6: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; 428dc: 588f addql #4,%sp <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 428de: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 428e2: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 428e6: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 428ea: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 428ec: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED 428f0: 600a bras 428fc <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 428f2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 428f4: 4eb9 0004 cb5a jsr 4cb5a <== NOT EXECUTED 428fa: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 428fc: 246e fffc moveal %fp@(-4),%a2 42900: 4280 clrl %d0 42902: 4e5e unlk %fp 42904: 4e75 rts 000427f8 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 427f8: 4e56 0000 linkw %fp,#0 427fc: 2f02 movel %d2,%sp@- 427fe: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 42802: 4a39 0005 d60c tstb 5d60c 42808: 662e bnes 42838 initialized = 1; status = rtems_io_register_name( 4280a: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 4280c: 7001 moveq #1,%d0 status = rtems_io_register_name( 4280e: 2f02 movel %d2,%sp@- 42810: 4879 0005 b164 pea 5b164 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 42816: 13c0 0005 d60c moveb %d0,5d60c status = rtems_io_register_name( 4281c: 4eb9 0004 2918 jsr 42918 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 42822: 4fef 000c lea %sp@(12),%sp 42826: 4a80 tstl %d0 42828: 6708 beqs 42832 rtems_fatal_error_occurred(status); 4282a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4282c: 4eb9 0004 60a8 jsr 460a8 <== NOT EXECUTED NULL_major = major; 42832: 23c2 0005 de2c movel %d2,5de2c } return RTEMS_SUCCESSFUL; } 42838: 242e fffc movel %fp@(-4),%d2 4283c: 4280 clrl %d0 4283e: 4e5e unlk %fp 42840: 4e75 rts ... 000427d6 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 427d6: 4e56 0000 linkw %fp,#0 427da: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 427de: 4a88 tstl %a0 427e0: 6706 beqs 427e8 rw_args->bytes_moved = rw_args->count; 427e2: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED return NULL_SUCCESSFUL; } 427e8: 4280 clrl %d0 427ea: 4e5e unlk %fp 427ec: 4e75 rts 00042b10 : int open( const char *pathname, int flags, ... ) { 42b10: 4e56 ffc8 linkw %fp,#-56 42b14: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 42b18: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 42b1c: 2002 movel %d2,%d0 42b1e: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 42b20: 262e 0008 movel %fp@(8),%d3 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 42b24: 0800 0000 btst #0,%d0 42b28: 6604 bnes 42b2e 42b2a: 4284 clrl %d4 42b2c: 6002 bras 42b30 42b2e: 7804 moveq #4,%d4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 42b30: 0800 0001 btst #1,%d0 42b34: 6704 beqs 42b3a eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 42b36: 7002 moveq #2,%d0 42b38: 8880 orl %d0,%d4 va_start(ap, flags); mode = va_arg( ap, int ); 42b3a: 2a2e 0010 movel %fp@(16),%d5 * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 42b3e: 4eb9 0004 92c2 jsr 492c2 42b44: 2440 moveal %d0,%a2 if ( iop == 0 ) { 42b46: 4a80 tstl %d0 42b48: 6606 bnes 42b50 42b4a: 7417 moveq #23,%d2 42b4c: 6000 0190 braw 42cde /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 42b50: 2f03 movel %d3,%sp@- 42b52: 2c3c 0004 dde8 movel #318952,%d6 42b58: 2046 moveal %d6,%a0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 42b5a: 47ee ffec lea %fp@(-20),%a3 42b5e: 4bf9 0004 223e lea 4223e ,%a5 pathname, strlen( pathname ), eval_flags, &loc, true ); 42b64: 4e90 jsr %a0@ /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 42b66: 7201 moveq #1,%d1 42b68: 2e81 movel %d1,%sp@ 42b6a: 2f0b movel %a3,%sp@- 42b6c: 2f04 movel %d4,%sp@- 42b6e: 2f00 movel %d0,%sp@- 42b70: 2f03 movel %d3,%sp@- 42b72: 4e95 jsr %a5@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 42b74: 4fef 0014 lea %sp@(20),%sp 42b78: 72ff moveq #-1,%d1 42b7a: b280 cmpl %d0,%d1 42b7c: 6666 bnes 42be4 if ( errno != ENOENT ) { 42b7e: 49f9 0004 ca1c lea 4ca1c <__errno>,%a4 42b84: 4e94 jsr %a4@ 42b86: 7202 moveq #2,%d1 42b88: 2040 moveal %d0,%a0 42b8a: b290 cmpl %a0@,%d1 42b8c: 662a bnes 42bb8 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 42b8e: 0802 0009 btst #9,%d2 42b92: 6608 bnes 42b9c 42b94: 97cb subal %a3,%a3 42b96: 7402 moveq #2,%d2 42b98: 6000 011c braw 42cb6 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 42b9c: 42a7 clrl %sp@- 42b9e: 2005 movel %d5,%d0 42ba0: 42a7 clrl %sp@- 42ba2: 08c0 000f bset #15,%d0 42ba6: 2f00 movel %d0,%sp@- 42ba8: 2f03 movel %d3,%sp@- 42baa: 4eb9 0004 246c jsr 4246c if ( rc ) { 42bb0: 4fef 0010 lea %sp@(16),%sp 42bb4: 4a80 tstl %d0 42bb6: 6708 beqs 42bc0 rc = errno; 42bb8: 4e94 jsr %a4@ 42bba: 97cb subal %a3,%a3 42bbc: 6000 009c braw 42c5a goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 42bc0: 2f03 movel %d3,%sp@- 42bc2: 2046 moveal %d6,%a0 42bc4: 4e90 jsr %a0@ 42bc6: 7201 moveq #1,%d1 42bc8: 2e81 movel %d1,%sp@ 42bca: 2f0b movel %a3,%sp@- 42bcc: 42a7 clrl %sp@- 42bce: 2f00 movel %d0,%sp@- 42bd0: 2f03 movel %d3,%sp@- 42bd2: 4e95 jsr %a5@ if ( status != 0 ) { /* The file did not exist */ 42bd4: 4fef 0014 lea %sp@(20),%sp 42bd8: 4a80 tstl %d0 42bda: 671e beqs 42bfa 42bdc: 97cb subal %a3,%a3 <== NOT EXECUTED 42bde: 740d moveq #13,%d2 <== NOT EXECUTED 42be0: 6000 00d4 braw 42cb6 <== NOT EXECUTED rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 42be4: 2002 movel %d2,%d0 42be6: 0280 0000 0a00 andil #2560,%d0 42bec: 0c80 0000 0a00 cmpil #2560,%d0 42bf2: 6606 bnes 42bfa 42bf4: 7411 moveq #17,%d2 42bf6: 6000 00be braw 42cb6 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 42bfa: 282a 0014 movel %a2@(20),%d4 iop->pathinfo = loc; 42bfe: 47ee ffec lea %fp@(-20),%a3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 42c02: 256e fff4 003c movel %fp@(-12),%a2@(60) iop->file_info = loc.node_access; 42c08: 256e ffec 0038 movel %fp@(-20),%a2@(56) iop->flags |= rtems_libio_fcntl_flags( flags ); 42c0e: 2f02 movel %d2,%sp@- 42c10: 4eb9 0004 934a jsr 4934a 42c16: 8084 orl %d4,%d0 42c18: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; 42c1c: 4878 0014 pea 14 42c20: 2f0b movel %a3,%sp@- 42c22: 486a 0018 pea %a2@(24) 42c26: 4eb9 0004 d23c jsr 4d23c if ( !iop->handlers || !iop->handlers->open_h ) { 42c2c: 206a 003c moveal %a2@(60),%a0 42c30: 4fef 0010 lea %sp@(16),%sp 42c34: 4a88 tstl %a0 42c36: 6700 00c8 beqw 42d00 42c3a: 2050 moveal %a0@,%a0 42c3c: 4a88 tstl %a0 42c3e: 6700 00c0 beqw 42d00 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 42c42: 2f05 movel %d5,%sp@- 42c44: 2f02 movel %d2,%sp@- 42c46: 2f03 movel %d3,%sp@- 42c48: 2f0a movel %a2,%sp@- 42c4a: 4e90 jsr %a0@ if ( rc ) { 42c4c: 4fef 0010 lea %sp@(16),%sp 42c50: 4a80 tstl %d0 42c52: 670c beqs 42c60 rc = errno; 42c54: 4eb9 0004 ca1c jsr 4ca1c <__errno> 42c5a: 2040 moveal %d0,%a0 42c5c: 2410 movel %a0@,%d2 goto done; 42c5e: 6052 bras 42cb2 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 42c60: 0802 000a btst #10,%d2 42c64: 6700 0086 beqw 42cec rc = ftruncate( iop - rtems_libio_iops, 0 ); 42c68: 42a7 clrl %sp@- 42c6a: 200a movel %a2,%d0 42c6c: 90b9 0005 cb34 subl 5cb34 ,%d0 42c72: ec80 asrl #6,%d0 42c74: 42a7 clrl %sp@- 42c76: 2f00 movel %d0,%sp@- 42c78: 4eb9 0004 8fd0 jsr 48fd0 if ( rc ) { 42c7e: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 42c82: 2400 movel %d0,%d2 if ( rc ) { 42c84: 6766 beqs 42cec if(errno) rc = errno; 42c86: 47f9 0004 ca1c lea 4ca1c <__errno>,%a3 <== NOT EXECUTED 42c8c: 4e93 jsr %a3@ <== NOT EXECUTED 42c8e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c90: 4a90 tstl %a0@ <== NOT EXECUTED 42c92: 6706 beqs 42c9a <== NOT EXECUTED 42c94: 4e93 jsr %a3@ <== NOT EXECUTED 42c96: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c98: 2410 movel %a0@,%d2 <== NOT EXECUTED close( iop - rtems_libio_iops ); 42c9a: 200a movel %a2,%d0 <== NOT EXECUTED 42c9c: 90b9 0005 cb34 subl 5cb34 ,%d0 <== NOT EXECUTED 42ca2: 97cb subal %a3,%a3 <== NOT EXECUTED 42ca4: ec80 asrl #6,%d0 <== NOT EXECUTED 42ca6: 95ca subal %a2,%a2 <== NOT EXECUTED 42ca8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42caa: 4eb9 0004 8eb4 jsr 48eb4 <== NOT EXECUTED 42cb0: 588f addql #4,%sp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 42cb2: 4a82 tstl %d2 42cb4: 6736 beqs 42cec if ( iop ) 42cb6: 4a8a tstl %a2 42cb8: 670a beqs 42cc4 rtems_libio_free( iop ); 42cba: 2f0a movel %a2,%sp@- 42cbc: 4eb9 0004 9280 jsr 49280 42cc2: 588f addql #4,%sp if ( loc_to_free ) 42cc4: 4a8b tstl %a3 42cc6: 6716 beqs 42cde rtems_filesystem_freenode( loc_to_free ); 42cc8: 206b 000c moveal %a3@(12),%a0 42ccc: 4a88 tstl %a0 42cce: 670e beqs 42cde 42cd0: 2068 001c moveal %a0@(28),%a0 42cd4: 4a88 tstl %a0 42cd6: 6706 beqs 42cde 42cd8: 2f0b movel %a3,%sp@- 42cda: 4e90 jsr %a0@ 42cdc: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 42cde: 4eb9 0004 ca1c jsr 4ca1c <__errno> 42ce4: 2040 moveal %d0,%a0 42ce6: 70ff moveq #-1,%d0 42ce8: 2082 movel %d2,%a0@ 42cea: 600a bras 42cf6 } return iop - rtems_libio_iops; 42cec: 200a movel %a2,%d0 42cee: 90b9 0005 cb34 subl 5cb34 ,%d0 42cf4: ec80 asrl #6,%d0 } 42cf6: 4cee 3c7c ffc8 moveml %fp@(-56),%d2-%d6/%a2-%a5 42cfc: 4e5e unlk %fp 42cfe: 4e75 rts if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 42d00: 47ee ffec lea %fp@(-20),%a3 <== NOT EXECUTED 42d04: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 42d0a: 60aa bras 42cb6 <== NOT EXECUTED 00042aa0 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 42aa0: 4e56 0000 linkw %fp,#0 42aa4: 2f0a movel %a2,%sp@- int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 42aa6: 45f9 0004 2b10 lea 42b10 ,%a2 42aac: 42a7 clrl %sp@- 42aae: 42a7 clrl %sp@- 42ab0: 4879 0005 9e5c pea 59e5c 42ab6: 4e92 jsr %a2@ 42ab8: 4fef 000c lea %sp@(12),%sp 42abc: 72ff moveq #-1,%d1 42abe: b280 cmpl %d0,%d1 42ac0: 6744 beqs 42b06 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 42ac2: 42a7 clrl %sp@- 42ac4: 4878 0001 pea 1 42ac8: 4879 0005 9e5c pea 59e5c 42ace: 4e92 jsr %a2@ 42ad0: 4fef 000c lea %sp@(12),%sp 42ad4: 72ff moveq #-1,%d1 42ad6: b280 cmpl %d0,%d1 42ad8: 6608 bnes 42ae2 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 42ada: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 42ae0: 601e bras 42b00 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 42ae2: 42a7 clrl %sp@- 42ae4: 4878 0001 pea 1 42ae8: 4879 0005 9e5c pea 59e5c 42aee: 4e92 jsr %a2@ 42af0: 4fef 000c lea %sp@(12),%sp 42af4: 72ff moveq #-1,%d1 42af6: b280 cmpl %d0,%d1 42af8: 660c bnes 42b06 rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 42afa: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 42b00: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED } 42b06: 246e fffc moveal %fp@(-4),%a2 42b0a: 4e5e unlk %fp 42b0c: 4e75 rts ... 00043458 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43458: 4e56 fff0 linkw %fp,#-16 4345c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43460: 246e 000c moveal %fp@(12),%a2 43464: 242e 0008 movel %fp@(8),%d2 int i; if (tty->termios.c_oflag & OPOST) { 43468: 202a 0034 movel %a2@(52),%d0 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 4346c: 1d42 fffe moveb %d2,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 43470: 0800 0000 btst #0,%d0 43474: 6700 010c beqw 43582 switch (c) { 43478: 4281 clrl %d1 4347a: 1202 moveb %d2,%d1 4347c: 7609 moveq #9,%d3 4347e: b681 cmpl %d1,%d3 43480: 6776 beqs 434f8 43482: 650e bcss 43492 43484: 163c 0008 moveb #8,%d3 <== NOT EXECUTED 43488: b681 cmpl %d1,%d3 <== NOT EXECUTED 4348a: 6600 00b0 bnew 4353c <== NOT EXECUTED 4348e: 6000 009e braw 4352e <== NOT EXECUTED 43492: 760a moveq #10,%d3 43494: b681 cmpl %d1,%d3 43496: 670c beqs 434a4 43498: 163c 000d moveb #13,%d3 4349c: b681 cmpl %d1,%d3 4349e: 6600 009c bnew 4353c 434a2: 602c bras 434d0 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 434a4: 0800 0005 btst #5,%d0 434a8: 6704 beqs 434ae tty->column = 0; 434aa: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 434ae: 7004 moveq #4,%d0 434b0: c0aa 0034 andl %a2@(52),%d0 434b4: 6700 00cc beqw 43582 rtems_termios_puts ("\r", 1, tty); 434b8: 2f0a movel %a2,%sp@- 434ba: 4878 0001 pea 1 434be: 4879 0005 a370 pea 5a370 434c4: 4eb9 0004 335e jsr 4335e tty->column = 0; 434ca: 4fef 000c lea %sp@(12),%sp 434ce: 6020 bras 434f0 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 434d0: 0800 0004 btst #4,%d0 <== NOT EXECUTED 434d4: 6708 beqs 434de <== NOT EXECUTED 434d6: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 434da: 6700 00ba beqw 43596 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 434de: 44c0 movew %d0,%ccr <== NOT EXECUTED 434e0: 6a0e bpls 434f0 <== NOT EXECUTED c = '\n'; 434e2: 720a moveq #10,%d1 <== NOT EXECUTED 434e4: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 434e8: 0800 0005 btst #5,%d0 <== NOT EXECUTED 434ec: 6700 0094 beqw 43582 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 434f0: 42aa 0028 clrl %a2@(40) break; 434f4: 6000 008c braw 43582 case '\t': i = 8 - (tty->column & 7); 434f8: 222a 0028 movel %a2@(40),%d1 434fc: 7407 moveq #7,%d2 434fe: 307c 0008 moveaw #8,%a0 43502: c481 andl %d1,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43504: 0280 0000 1800 andil #6144,%d0 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 4350a: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 4350c: 0c80 0000 1800 cmpil #6144,%d0 43512: 6612 bnes 43526 tty->column += i; rtems_termios_puts ( " ", i, tty); 43514: 2f0a movel %a2,%sp@- break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 43516: d288 addl %a0,%d1 43518: 2541 0028 movel %d1,%a2@(40) rtems_termios_puts ( " ", i, tty); 4351c: 2f08 movel %a0,%sp@- 4351e: 4879 0005 a372 pea 5a372 43524: 6066 bras 4358c return; } tty->column += i; 43526: d1c1 addal %d1,%a0 <== NOT EXECUTED 43528: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED break; 4352c: 6054 bras 43582 <== NOT EXECUTED case '\b': if (tty->column > 0) 4352e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43532: 6f4e bles 43582 <== NOT EXECUTED tty->column--; 43534: 5380 subql #1,%d0 <== NOT EXECUTED 43536: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 4353a: 6046 bras 43582 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 4353c: 0800 0001 btst #1,%d0 43540: 6724 beqs 43566 c = toupper(c); 43542: 4280 clrl %d0 <== NOT EXECUTED 43544: 1002 moveb %d2,%d0 <== NOT EXECUTED 43546: 7403 moveq #3,%d2 <== NOT EXECUTED 43548: 7602 moveq #2,%d3 <== NOT EXECUTED 4354a: 2079 0005 b60c moveal 5b60c <__ctype_ptr__>,%a0 <== NOT EXECUTED 43550: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 43554: 49c1 extbl %d1 <== NOT EXECUTED 43556: c282 andl %d2,%d1 <== NOT EXECUTED 43558: b681 cmpl %d1,%d3 <== NOT EXECUTED 4355a: 6606 bnes 43562 <== NOT EXECUTED 4355c: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 43562: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (!iscntrl(c)) 43566: 4280 clrl %d0 43568: 102e fffe moveb %fp@(-2),%d0 4356c: 2079 0005 b60c moveal 5b60c <__ctype_ptr__>,%a0 43572: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 43576: 49c0 extbl %d0 43578: 0800 0005 btst #5,%d0 4357c: 6604 bnes 43582 tty->column++; 4357e: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 43582: 2f0a movel %a2,%sp@- 43584: 4878 0001 pea 1 43588: 486e fffe pea %fp@(-2) 4358c: 4eb9 0004 335e jsr 4335e 43592: 4fef 000c lea %sp@(12),%sp } 43596: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4359c: 4e5e unlk %fp 4359e: 4e75 rts 00044544 : long pathconf( const char *path, int name ) { 44544: 4e56 0000 linkw %fp,#0 44548: 2f03 movel %d3,%sp@- 4454a: 2f02 movel %d2,%sp@- int status; int fd; fd = open( path, O_RDONLY ); 4454c: 42a7 clrl %sp@- 4454e: 2f2e 0008 movel %fp@(8),%sp@- 44552: 4eb9 0004 4324 jsr 44324 if ( fd == -1 ) 44558: 508f addql #8,%sp ) { int status; int fd; fd = open( path, O_RDONLY ); 4455a: 2400 movel %d0,%d2 if ( fd == -1 ) 4455c: 70ff moveq #-1,%d0 4455e: b082 cmpl %d2,%d0 44560: 6604 bnes 44566 44562: 76ff moveq #-1,%d3 44564: 601a bras 44580 return -1; status = fpathconf( fd, name ); 44566: 2f2e 000c movel %fp@(12),%sp@- 4456a: 2f02 movel %d2,%sp@- 4456c: 4eb9 0004 3378 jsr 43378 44572: 2600 movel %d0,%d3 (void) close( fd ); 44574: 2f02 movel %d2,%sp@- 44576: 4eb9 0004 2c88 jsr 42c88 return status; 4457c: 4fef 000c lea %sp@(12),%sp } 44580: 2003 movel %d3,%d0 44582: 242e fff8 movel %fp@(-8),%d2 44586: 262e fffc movel %fp@(-4),%d3 4458a: 4e5e unlk %fp 4458c: 4e75 rts ... 00046818 : /* * 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81 */ int pause( void ) { 46818: 4e56 fffc linkw %fp,#-4 4681c: 2f02 movel %d2,%sp@- sigset_t all_signals; int status; (void) sigfillset( &all_signals ); 4681e: 240e movel %fp,%d2 46820: 5982 subql #4,%d2 46822: 2f02 movel %d2,%sp@- 46824: 4eb9 0004 729c jsr 4729c status = sigtimedwait( &all_signals, NULL, NULL ); 4682a: 42a7 clrl %sp@- 4682c: 42a7 clrl %sp@- 4682e: 2f02 movel %d2,%sp@- 46830: 4eb9 0004 7414 jsr 47414 return status; } 46836: 242e fff8 movel %fp@(-8),%d2 4683a: 4e5e unlk %fp 4683c: 4e75 rts ... 0004c178 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4c178: 4e56 ffd0 linkw %fp,#-48 4c17c: 48d7 040c moveml %d2-%d3/%a2,%sp@ rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4c180: 4878 0001 pea 1 4c184: 240e movel %fp,%d2 4c186: 0682 ffff ffdc addil #-36,%d2 4c18c: 2f02 movel %d2,%sp@- 4c18e: 4878 0007 pea 7 4c192: 4878 0003 pea 3 4c196: 4879 0005 aa20 pea 5aa20 <__FUNCTION__.5851+0x11> * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4c19c: 246e 0008 moveal %fp@(8),%a2 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4c1a0: 4eb9 0004 223e jsr 4223e 4c1a6: 4fef 0014 lea %sp@(20),%sp 4c1aa: 4a80 tstl %d0 4c1ac: 672a beqs 4c1d8 != 0) { if (errno != ENOENT) 4c1ae: 4eb9 0004 ca1c jsr 4ca1c <__errno> 4c1b4: 7202 moveq #2,%d1 4c1b6: 2040 moveal %d0,%a0 4c1b8: b290 cmpl %a0@,%d1 4c1ba: 6600 010e bnew 4c2ca return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4c1be: 4878 03ff pea 3ff 4c1c2: 4879 0005 aa20 pea 5aa20 <__FUNCTION__.5851+0x11> 4c1c8: 4eb9 0004 244c jsr 4244c 4c1ce: 508f addql #8,%sp 4c1d0: 4a80 tstl %d0 4c1d2: 671a beqs 4c1ee 4c1d4: 6000 00f4 braw 4c2ca <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 4c1d8: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4c1dc: 4a88 tstl %a0 <== NOT EXECUTED 4c1de: 670e beqs 4c1ee <== NOT EXECUTED 4c1e0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c1e4: 4a88 tstl %a0 <== NOT EXECUTED 4c1e6: 6706 beqs 4c1ee <== NOT EXECUTED 4c1e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c1ea: 4e90 jsr %a0@ <== NOT EXECUTED 4c1ec: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4c1ee: 4878 000a pea a 4c1f2: 240e movel %fp,%d2 4c1f4: 4879 0005 aa25 pea 5aa25 <__FUNCTION__.5851+0x16> 4c1fa: 0682 ffff fff1 addil #-15,%d2 4c200: 2f02 movel %d2,%sp@- 4c202: 4eb9 0004 d23c jsr 4d23c sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4c208: 3039 0005 c448 movew 5c448 ,%d0 4c20e: 2200 movel %d0,%d1 4c210: 5281 addql #1,%d1 4c212: 3f00 movew %d0,%sp@- 4c214: 33c1 0005 c448 movew %d1,5c448 4c21a: 4267 clrw %sp@- 4c21c: 4879 0005 aa30 pea 5aa30 <__FUNCTION__.5851+0x21> 4c222: 486e fffb pea %fp@(-5) 4c226: 4eb9 0004 d714 jsr 4d714 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4c22c: 4878 0180 pea 180 4c230: 2f02 movel %d2,%sp@- 4c232: 4eb9 0004 c32c jsr 4c32c 4c238: 4fef 0020 lea %sp@(32),%sp 4c23c: 4a80 tstl %d0 4c23e: 670a beqs 4c24a if (errno != EEXIST){ 4c240: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4c246: 6000 0082 braw 4c2ca <== NOT EXECUTED return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 4c24a: 4878 4000 pea 4000 4c24e: 2f02 movel %d2,%sp@- 4c250: 4eb9 0004 2b10 jsr 42b10 if (filsdes[0] < 0) { 4c256: 508f addql #8,%sp return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 4c258: 2480 movel %d0,%a2@ if (filsdes[0] < 0) { 4c25a: 6c0e bges 4c26a err = errno; 4c25c: 4eb9 0004 ca1c jsr 4ca1c <__errno> 4c262: 2040 moveal %d0,%a0 4c264: 2610 movel %a0@,%d3 /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); 4c266: 2f02 movel %d2,%sp@- 4c268: 604e bras 4c2b8 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4c26a: b0b9 0005 b434 cmpl 5b434 ,%d0 <== NOT EXECUTED 4c270: 6504 bcss 4c276 <== NOT EXECUTED 4c272: 91c8 subal %a0,%a0 <== NOT EXECUTED 4c274: 600a bras 4c280 <== NOT EXECUTED 4c276: 2079 0005 cb34 moveal 5cb34 ,%a0 <== NOT EXECUTED 4c27c: ed88 lsll #6,%d0 <== NOT EXECUTED 4c27e: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4c280: 70fe moveq #-2,%d0 <== NOT EXECUTED 4c282: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4c286: 4878 0001 pea 1 <== NOT EXECUTED 4c28a: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4c28e: 4eb9 0004 2b10 jsr 42b10 <== NOT EXECUTED if (filsdes[1] < 0) { 4c294: 508f addql #8,%sp <== NOT EXECUTED else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); 4c296: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4c29a: 6d04 blts 4c2a0 <== NOT EXECUTED 4c29c: 4283 clrl %d3 <== NOT EXECUTED 4c29e: 6014 bras 4c2b4 <== NOT EXECUTED err = errno; 4c2a0: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4c2a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c2a8: 2610 movel %a0@,%d3 <== NOT EXECUTED close(filsdes[0]); 4c2aa: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c2ac: 4eb9 0004 8eb4 jsr 48eb4 <== NOT EXECUTED 4c2b2: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4c2b4: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4c2b8: 4eb9 0004 c34c jsr 4c34c 4c2be: 588f addql #4,%sp } rtems_set_errno_and_return_minus_one(err); 4c2c0: 4eb9 0004 ca1c jsr 4ca1c <__errno> 4c2c6: 2040 moveal %d0,%a0 4c2c8: 2083 movel %d3,%a0@ } 4c2ca: 70ff moveq #-1,%d0 4c2cc: 4cee 040c ffd0 moveml %fp@(-48),%d2-%d3/%a2 4c2d2: 4e5e unlk %fp 4c2d4: 4e75 rts ... 0004af74 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4af74: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4af78: 2f0b movel %a3,%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4af7a: 47f9 0004 bafc lea 4bafc ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4af80: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4af82: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4af86: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4af8a: 4e93 jsr %a3@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4af8c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4af90: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4af92: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4af96: 4eb9 0004 4e94 jsr 44e94 <== NOT EXECUTED free(pipe->Buffer); 4af9c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4af9e: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED free(pipe); } 4afa4: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 4afa8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4afac: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } 4afb0: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4afb4: 4e5e unlk %fp <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 4afb6: 4ef9 0004 8f48 jmp 48f48 <== NOT EXECUTED 0004ac1e : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4ac1e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 4ac22: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4ac28: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4ac2a: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED 4ac2e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ac30: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED if (cmd == FIONREAD) { 4ac34: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4ac38: 6704 beqs 4ac3e <== NOT EXECUTED 4ac3a: 70ea moveq #-22,%d0 <== NOT EXECUTED 4ac3c: 6034 bras 4ac72 <== NOT EXECUTED if (buffer == NULL) 4ac3e: 4a8b tstl %a3 <== NOT EXECUTED 4ac40: 6604 bnes 4ac46 <== NOT EXECUTED 4ac42: 70f2 moveq #-14,%d0 <== NOT EXECUTED 4ac44: 602c bras 4ac72 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4ac46: 42a7 clrl %sp@- <== NOT EXECUTED 4ac48: 42a7 clrl %sp@- <== NOT EXECUTED 4ac4a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ac4e: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4ac54: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ac58: 4a80 tstl %d0 <== NOT EXECUTED 4ac5a: 6704 beqs 4ac60 <== NOT EXECUTED 4ac5c: 70fc moveq #-4,%d0 <== NOT EXECUTED 4ac5e: 6012 bras 4ac72 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4ac60: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4ac64: 26aa 000c movel %a2@(12),%a3@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 4ac68: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return 0; 4ac6e: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4ac70: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 4ac72: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4ac76: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 4ac7a: 4e5e unlk %fp <== NOT EXECUTED 4ac7c: 4e75 rts 0004abc4 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4abc4: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 4abc6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 4abca: 4e5e unlk %fp <== NOT EXECUTED 4abcc: 4e75 rts 0004ac7e : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4ac7e: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4ac82: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4ac86: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4ac88: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4ac8c: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED 4ac92: 42a7 clrl %sp@- <== NOT EXECUTED 4ac94: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4ac98: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED 4ac9c: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED 4aca0: 2e2e 0014 movel %fp@(20),%d7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4aca4: 4e93 jsr %a3@ <== NOT EXECUTED 4aca6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4acaa: 4a80 tstl %d0 <== NOT EXECUTED 4acac: 6706 beqs 4acb4 <== NOT EXECUTED 4acae: 74fc moveq #-4,%d2 <== NOT EXECUTED 4acb0: 6000 0128 braw 4adda <== NOT EXECUTED 4acb4: 4282 clrl %d2 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4acb6: 2c3c 0004 5034 movel #282676,%d6 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4acbc: 4bf9 0004 bbcc lea 4bbcc ,%a5 <== NOT EXECUTED 4acc2: 6000 00fc braw 4adc0 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 4acc6: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4acca: 6700 00fa beqw 4adc6 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4acce: 7001 moveq #1,%d0 <== NOT EXECUTED 4acd0: 2047 moveal %d7,%a0 <== NOT EXECUTED 4acd2: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4acd6: 6706 beqs 4acde <== NOT EXECUTED 4acd8: 78f5 moveq #-11,%d4 <== NOT EXECUTED 4acda: 6000 00ec braw 4adc8 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4acde: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 4ace2: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4ace6: 2246 moveal %d6,%a1 <== NOT EXECUTED 4ace8: 4e91 jsr %a1@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4acea: 42a7 clrl %sp@- <== NOT EXECUTED 4acec: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4acf0: 4e95 jsr %a5@ <== NOT EXECUTED 4acf2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4acf6: 4a80 tstl %d0 <== NOT EXECUTED 4acf8: 6602 bnes 4acfc <== NOT EXECUTED 4acfa: 4284 clrl %d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4acfc: 42a7 clrl %sp@- <== NOT EXECUTED 4acfe: 42a7 clrl %sp@- <== NOT EXECUTED 4ad00: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ad04: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4ad0a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ad0e: 4a80 tstl %d0 <== NOT EXECUTED 4ad10: 6706 beqs 4ad18 <== NOT EXECUTED 4ad12: 78fc moveq #-4,%d4 <== NOT EXECUTED 4ad14: 6000 00be braw 4add4 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4ad18: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 4ad1c: 4a84 tstl %d4 <== NOT EXECUTED 4ad1e: 6600 00a8 bnew 4adc8 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4ad22: 262a 000c movel %a2@(12),%d3 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4ad26: 78fc moveq #-4,%d4 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4ad28: 4a83 tstl %d3 <== NOT EXECUTED 4ad2a: 679a beqs 4acc6 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4ad2c: 2005 movel %d5,%d0 <== NOT EXECUTED 4ad2e: 9082 subl %d2,%d0 <== NOT EXECUTED 4ad30: b083 cmpl %d3,%d0 <== NOT EXECUTED 4ad32: 6402 bccs 4ad36 <== NOT EXECUTED 4ad34: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4ad36: 206a 0008 moveal %a2@(8),%a0 <== NOT EXECUTED 4ad3a: 200c movel %a4,%d0 <== NOT EXECUTED 4ad3c: d082 addl %d2,%d0 <== NOT EXECUTED 4ad3e: 47f9 0004 d23c lea 4d23c ,%a3 <== NOT EXECUTED 4ad44: 2212 movel %a2@,%d1 <== NOT EXECUTED 4ad46: d288 addl %a0,%d1 <== NOT EXECUTED 4ad48: 226a 0004 moveal %a2@(4),%a1 <== NOT EXECUTED 4ad4c: 93c8 subal %a0,%a1 <== NOT EXECUTED if (chunk > chunk1) { 4ad4e: b3c3 cmpal %d3,%a1 <== NOT EXECUTED 4ad50: 6c28 bges 4ad7a <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4ad52: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4ad54: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ad56: 2d49 fff8 movel %a1,%fp@(-8) <== NOT EXECUTED 4ad5a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ad5c: 4e93 jsr %a3@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4ad5e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4ad62: 2203 movel %d3,%d1 <== NOT EXECUTED 4ad64: 9288 subl %a0,%d1 <== NOT EXECUTED 4ad66: 2002 movel %d2,%d0 <== NOT EXECUTED 4ad68: d088 addl %a0,%d0 <== NOT EXECUTED 4ad6a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ad6c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4ad6e: 4874 0800 pea %a4@(00000000,%d0:l) <== NOT EXECUTED 4ad72: 4e93 jsr %a3@ <== NOT EXECUTED 4ad74: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4ad78: 600c bras 4ad86 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4ad7a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ad7c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ad7e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ad80: 4e93 jsr %a3@ <== NOT EXECUTED 4ad82: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 4ad86: 2203 movel %d3,%d1 <== NOT EXECUTED 4ad88: d2aa 0008 addl %a2@(8),%d1 <== NOT EXECUTED pipe->Start %= pipe->Size; pipe->Length -= chunk; 4ad8c: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 4ad90: 9083 subl %d3,%d0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4ad92: 4c6a 1004 0004 remul %a2@(4),%d4,%d1 <== NOT EXECUTED pipe->Length -= chunk; 4ad98: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4ad9c: 2544 0008 movel %d4,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4ada0: 4a80 tstl %d0 <== NOT EXECUTED 4ada2: 6604 bnes 4ada8 <== NOT EXECUTED pipe->Start = 0; 4ada4: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 4ada8: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4adac: 6710 beqs 4adbe <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4adae: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4adb2: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4adb6: 4eb9 0004 bb68 jsr 4bb68 <== NOT EXECUTED 4adbc: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 4adbe: d483 addl %d3,%d2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4adc0: ba82 cmpl %d2,%d5 <== NOT EXECUTED 4adc2: 6200 ff5e bhiw 4ad22 <== NOT EXECUTED 4adc6: 4284 clrl %d4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4adc8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4adcc: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 4add2: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 4add4: 4a82 tstl %d2 <== NOT EXECUTED 4add6: 6e02 bgts 4adda <== NOT EXECUTED 4add8: 2404 movel %d4,%d2 <== NOT EXECUTED return read; return ret; } 4adda: 2002 movel %d2,%d0 <== NOT EXECUTED 4addc: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ade2: 4e5e unlk %fp <== NOT EXECUTED 4ade4: 4e75 rts 0004afbc : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4afbc: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 4afc0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4afc4: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4afc8: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4afca: 2453 moveal %a3@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4afcc: 42a7 clrl %sp@- <== NOT EXECUTED 4afce: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4afd2: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4afd8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4afdc: 4a80 tstl %d0 <== NOT EXECUTED 4afde: 6634 bnes 4b014 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4afe0: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4afe4: 7406 moveq #6,%d2 <== NOT EXECUTED 4afe6: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4afea: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4afee: 6704 beqs 4aff4 <== NOT EXECUTED pipe->Readers --; 4aff0: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4aff4: 44c2 movew %d2,%ccr <== NOT EXECUTED 4aff6: 6604 bnes 4affc <== NOT EXECUTED pipe->Writers --; 4aff8: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4affc: 42a7 clrl %sp@- <== NOT EXECUTED 4affe: 42a7 clrl %sp@- <== NOT EXECUTED 4b000: 2f39 0005 c440 movel 5c440 ,%sp@- <== NOT EXECUTED 4b006: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 4b00c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b010: 4a80 tstl %d0 <== NOT EXECUTED 4b012: 6708 beqs 4b01c <== NOT EXECUTED rtems_fatal_error_occurred(sc); 4b014: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b016: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED PIPE_UNLOCK(pipe); 4b01c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b020: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4b026: 588f addql #4,%sp <== NOT EXECUTED 4b028: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b02c: 6622 bnes 4b050 <== NOT EXECUTED 4b02e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4b032: 660c bnes 4b040 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 4b034: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b036: 4eba ff3c jsr %pc@(4af74 ) <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4b03a: 588f addql #4,%sp <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 4b03c: 4293 clrl %a3@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4b03e: 602c bras 4b06c <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4b040: 7004 moveq #4,%d0 <== NOT EXECUTED 4b042: b082 cmpl %d2,%d0 <== NOT EXECUTED 4b044: 670a beqs 4b050 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4b046: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b04a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b04e: 6014 bras 4b064 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4b050: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4b054: 6616 bnes 4b06c <== NOT EXECUTED 4b056: 7002 moveq #2,%d0 <== NOT EXECUTED 4b058: b082 cmpl %d2,%d0 <== NOT EXECUTED 4b05a: 6710 beqs 4b06c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b05c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b060: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b064: 4eb9 0004 bb68 jsr 4bb68 <== NOT EXECUTED 4b06a: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4b06c: 2f39 0005 c440 movel 5c440 ,%sp@- <== NOT EXECUTED 4b072: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4b078: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4b07e: 4280 clrl %d0 <== NOT EXECUTED 4b080: 4e5e unlk %fp <== NOT EXECUTED 4b082: 4e75 rts 0004ade6 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4ade6: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4adea: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4adee: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4adf2: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED 4adf6: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4adfa: 6606 bnes 4ae02 <== NOT EXECUTED 4adfc: 4282 clrl %d2 <== NOT EXECUTED 4adfe: 6000 0168 braw 4af68 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 4ae02: 42a7 clrl %sp@- <== NOT EXECUTED 4ae04: 42a7 clrl %sp@- <== NOT EXECUTED 4ae06: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ae0a: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4ae10: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ae14: 4a80 tstl %d0 <== NOT EXECUTED 4ae16: 6706 beqs 4ae1e <== NOT EXECUTED 4ae18: 74fc moveq #-4,%d2 <== NOT EXECUTED 4ae1a: 6000 014c braw 4af68 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4ae1e: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4ae22: 6608 bnes 4ae2c <== NOT EXECUTED 4ae24: 76e0 moveq #-32,%d3 <== NOT EXECUTED 4ae26: 4282 clrl %d2 <== NOT EXECUTED 4ae28: 6000 0112 braw 4af3c <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4ae2c: b8aa 0004 cmpl %a2@(4),%d4 <== NOT EXECUTED 4ae30: 6304 blss 4ae36 <== NOT EXECUTED 4ae32: 7c01 moveq #1,%d6 <== NOT EXECUTED 4ae34: 6002 bras 4ae38 <== NOT EXECUTED 4ae36: 2c04 movel %d4,%d6 <== NOT EXECUTED 4ae38: 4282 clrl %d2 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4ae3a: 4bf9 0004 bbcc lea 4bbcc ,%a5 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4ae40: 49f9 0004 4f30 lea 44f30 ,%a4 <== NOT EXECUTED 4ae46: 6000 00ec braw 4af34 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 4ae4a: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4ae4e: 7001 moveq #1,%d0 <== NOT EXECUTED 4ae50: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4ae54: 6706 beqs 4ae5c <== NOT EXECUTED 4ae56: 76f5 moveq #-11,%d3 <== NOT EXECUTED 4ae58: 6000 00e2 braw 4af3c <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 4ae5c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 4ae60: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4ae64: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4ae6a: 42a7 clrl %sp@- <== NOT EXECUTED 4ae6c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4ae70: 4e95 jsr %a5@ <== NOT EXECUTED 4ae72: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ae76: 4a80 tstl %d0 <== NOT EXECUTED 4ae78: 6602 bnes 4ae7c <== NOT EXECUTED 4ae7a: 4283 clrl %d3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4ae7c: 42a7 clrl %sp@- <== NOT EXECUTED 4ae7e: 42a7 clrl %sp@- <== NOT EXECUTED 4ae80: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ae84: 4e94 jsr %a4@ <== NOT EXECUTED 4ae86: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ae8a: 4a80 tstl %d0 <== NOT EXECUTED 4ae8c: 6706 beqs 4ae94 <== NOT EXECUTED 4ae8e: 76fc moveq #-4,%d3 <== NOT EXECUTED 4ae90: 6000 00d0 braw 4af62 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4ae94: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 4ae98: 4a83 tstl %d3 <== NOT EXECUTED 4ae9a: 6600 00a0 bnew 4af3c <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4ae9e: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4aea2: 6606 bnes 4aeaa <== NOT EXECUTED 4aea4: 76e0 moveq #-32,%d3 <== NOT EXECUTED 4aea6: 6000 0094 braw 4af3c <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 4aeaa: 2a2a 0004 movel %a2@(4),%d5 <== NOT EXECUTED 4aeae: 2005 movel %d5,%d0 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4aeb0: 76fc moveq #-4,%d3 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 4aeb2: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 4aeb6: 9088 subl %a0,%d0 <== NOT EXECUTED 4aeb8: bc80 cmpl %d0,%d6 <== NOT EXECUTED 4aeba: 628e bhis 4ae4a <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4aebc: 2600 movel %d0,%d3 <== NOT EXECUTED 4aebe: 2004 movel %d4,%d0 <== NOT EXECUTED 4aec0: 9082 subl %d2,%d0 <== NOT EXECUTED 4aec2: b083 cmpl %d3,%d0 <== NOT EXECUTED 4aec4: 6402 bccs 4aec8 <== NOT EXECUTED 4aec6: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4aec8: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED 4aecc: 220b movel %a3,%d1 <== NOT EXECUTED 4aece: 2e08 movel %a0,%d7 <== NOT EXECUTED 4aed0: 2c3c 0004 d23c movel #315964,%d6 <== NOT EXECUTED 4aed6: d282 addl %d2,%d1 <== NOT EXECUTED 4aed8: 4c45 7000 remul %d5,%d0,%d7 <== NOT EXECUTED 4aedc: 9a80 subl %d0,%d5 <== NOT EXECUTED 4aede: d092 addl %a2@,%d0 <== NOT EXECUTED if (chunk > chunk1) { 4aee0: ba83 cmpl %d3,%d5 <== NOT EXECUTED 4aee2: 6c24 bges 4af08 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4aee4: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4aee6: 2046 moveal %d6,%a0 <== NOT EXECUTED 4aee8: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4aeea: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4aeec: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4aeee: 2203 movel %d3,%d1 <== NOT EXECUTED 4aef0: 9285 subl %d5,%d1 <== NOT EXECUTED 4aef2: 2005 movel %d5,%d0 <== NOT EXECUTED 4aef4: d082 addl %d2,%d0 <== NOT EXECUTED 4aef6: 2046 moveal %d6,%a0 <== NOT EXECUTED 4aef8: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4aefa: 4873 0800 pea %a3@(00000000,%d0:l) <== NOT EXECUTED 4aefe: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4af00: 4e90 jsr %a0@ <== NOT EXECUTED 4af02: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4af06: 600e bras 4af16 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4af08: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4af0a: 2046 moveal %d6,%a0 <== NOT EXECUTED 4af0c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4af0e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4af10: 4e90 jsr %a0@ <== NOT EXECUTED 4af12: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 4af16: d7aa 000c addl %d3,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4af1a: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4af1e: 6710 beqs 4af30 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4af20: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4af24: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4af28: 4eb9 0004 bb68 jsr 4bb68 <== NOT EXECUTED 4af2e: 508f addql #8,%sp <== NOT EXECUTED written += chunk; 4af30: d483 addl %d3,%d2 <== NOT EXECUTED 4af32: 7c01 moveq #1,%d6 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4af34: b882 cmpl %d2,%d4 <== NOT EXECUTED 4af36: 6200 ff72 bhiw 4aeaa <== NOT EXECUTED 4af3a: 4283 clrl %d3 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4af3c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4af40: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 4af46: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4af48: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4af4a: b083 cmpl %d3,%d0 <== NOT EXECUTED 4af4c: 6614 bnes 4af62 <== NOT EXECUTED kill(getpid(), SIGPIPE); 4af4e: 4eb9 0004 b71c jsr 4b71c <== NOT EXECUTED 4af54: 4878 000d pea d <== NOT EXECUTED 4af58: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4af5a: 4eb9 0004 b81c jsr 4b81c <== NOT EXECUTED 4af60: 508f addql #8,%sp <== NOT EXECUTED #endif if (written > 0) 4af62: 4a82 tstl %d2 <== NOT EXECUTED 4af64: 6e02 bgts 4af68 <== NOT EXECUTED 4af66: 2403 movel %d3,%d2 <== NOT EXECUTED return written; return ret; } 4af68: 2002 movel %d2,%d0 <== NOT EXECUTED 4af6a: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4af70: 4e5e unlk %fp <== NOT EXECUTED 4af72: 4e75 rts 00044f84 : int pthread_atfork( void (*prepare)(void) __attribute__((unused)), void (*parent)(void) __attribute__((unused)), void (*child)(void) __attribute__((unused)) ) { 44f84: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44f88: 4eb9 0004 d430 jsr 4d430 <__errno> 44f8e: 7258 moveq #88,%d1 44f90: 2040 moveal %d0,%a0 } 44f92: 70ff moveq #-1,%d0 44f94: 4e5e unlk %fp void (*prepare)(void) __attribute__((unused)), void (*parent)(void) __attribute__((unused)), void (*child)(void) __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44f96: 2081 movel %d1,%a0@ } 44f98: 4e75 rts ... 000494bc : int pthread_attr_getcputime( pthread_attr_t *attr, int *clock_allowed ) { 494bc: 4e56 0000 linkw %fp,#0 494c0: 206e 0008 moveal %fp@(8),%a0 494c4: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !clock_allowed ) 494c8: 4a88 tstl %a0 494ca: 6710 beqs 494dc 494cc: 4a90 tstl %a0@ 494ce: 670c beqs 494dc 494d0: 4a89 tstl %a1 494d2: 6708 beqs 494dc return EINVAL; *clock_allowed = attr->cputime_clock_allowed; 494d4: 22a8 0034 movel %a0@(52),%a1@ 494d8: 4280 clrl %d0 return 0; 494da: 6002 bras 494de 494dc: 7016 moveq #22,%d0 } 494de: 4e5e unlk %fp 494e0: 4e75 rts ... 00048f74 : int pthread_attr_getdetachstate( const pthread_attr_t *attr, int *detachstate ) { 48f74: 4e56 0000 linkw %fp,#0 48f78: 206e 0008 moveal %fp@(8),%a0 48f7c: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !detachstate ) 48f80: 4a88 tstl %a0 48f82: 6710 beqs 48f94 48f84: 4a90 tstl %a0@ 48f86: 670c beqs 48f94 48f88: 4a89 tstl %a1 48f8a: 6708 beqs 48f94 return EINVAL; *detachstate = attr->detachstate; 48f8c: 22a8 0038 movel %a0@(56),%a1@ 48f90: 4280 clrl %d0 return 0; 48f92: 6002 bras 48f96 48f94: 7016 moveq #22,%d0 } 48f96: 4e5e unlk %fp 48f98: 4e75 rts ... 00048f9c : int pthread_attr_getinheritsched( const pthread_attr_t *attr, int *inheritsched ) { 48f9c: 4e56 0000 linkw %fp,#0 48fa0: 206e 0008 moveal %fp@(8),%a0 48fa4: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !inheritsched ) 48fa8: 4a88 tstl %a0 48faa: 6710 beqs 48fbc 48fac: 4a90 tstl %a0@ 48fae: 670c beqs 48fbc 48fb0: 4a89 tstl %a1 48fb2: 6708 beqs 48fbc return EINVAL; *inheritsched = attr->inheritsched; 48fb4: 22a8 0010 movel %a0@(16),%a1@ 48fb8: 4280 clrl %d0 return 0; 48fba: 6002 bras 48fbe 48fbc: 7016 moveq #22,%d0 } 48fbe: 4e5e unlk %fp 48fc0: 4e75 rts ... 00048fc4 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 48fc4: 4e56 0000 linkw %fp,#0 48fc8: 206e 0008 moveal %fp@(8),%a0 48fcc: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized || !param ) 48fd0: 4a88 tstl %a0 48fd2: 6720 beqs 48ff4 48fd4: 4a90 tstl %a0@ 48fd6: 671c beqs 48ff4 48fd8: 4a80 tstl %d0 48fda: 6718 beqs 48ff4 return EINVAL; *param = attr->schedparam; 48fdc: 4878 001c pea 1c 48fe0: 4868 0018 pea %a0@(24) 48fe4: 2f00 movel %d0,%sp@- 48fe6: 4eb9 0005 2120 jsr 52120 return 0; 48fec: 4fef 000c lea %sp@(12),%sp ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; *param = attr->schedparam; 48ff0: 4280 clrl %d0 return 0; 48ff2: 6002 bras 48ff6 48ff4: 7016 moveq #22,%d0 } 48ff6: 4e5e unlk %fp 48ff8: 4e75 rts ... 00048ffc : int pthread_attr_getschedpolicy( const pthread_attr_t *attr, int *policy ) { 48ffc: 4e56 0000 linkw %fp,#0 49000: 206e 0008 moveal %fp@(8),%a0 49004: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !policy ) 49008: 4a88 tstl %a0 4900a: 6710 beqs 4901c 4900c: 4a90 tstl %a0@ 4900e: 670c beqs 4901c 49010: 4a89 tstl %a1 49012: 6708 beqs 4901c return EINVAL; *policy = attr->schedpolicy; 49014: 22a8 0014 movel %a0@(20),%a1@ 49018: 4280 clrl %d0 return 0; 4901a: 6002 bras 4901e 4901c: 7016 moveq #22,%d0 } 4901e: 4e5e unlk %fp 49020: 4e75 rts ... 00049024 : int pthread_attr_getscope( const pthread_attr_t *attr, int *contentionscope ) { 49024: 4e56 0000 linkw %fp,#0 49028: 206e 0008 moveal %fp@(8),%a0 4902c: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !contentionscope ) 49030: 4a88 tstl %a0 49032: 6710 beqs 49044 49034: 4a90 tstl %a0@ 49036: 670c beqs 49044 49038: 4a89 tstl %a1 4903a: 6708 beqs 49044 return EINVAL; *contentionscope = attr->contentionscope; 4903c: 22a8 000c movel %a0@(12),%a1@ 49040: 4280 clrl %d0 return 0; 49042: 6002 bras 49046 49044: 7016 moveq #22,%d0 } 49046: 4e5e unlk %fp 49048: 4e75 rts ... 0004904c : int pthread_attr_getstackaddr( const pthread_attr_t *attr, void **stackaddr ) { 4904c: 4e56 0000 linkw %fp,#0 49050: 206e 0008 moveal %fp@(8),%a0 49054: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !stackaddr ) 49058: 4a88 tstl %a0 4905a: 6710 beqs 4906c 4905c: 4a90 tstl %a0@ 4905e: 670c beqs 4906c 49060: 4a89 tstl %a1 49062: 6708 beqs 4906c return EINVAL; *stackaddr = attr->stackaddr; 49064: 22a8 0004 movel %a0@(4),%a1@ 49068: 4280 clrl %d0 return 0; 4906a: 6002 bras 4906e 4906c: 7016 moveq #22,%d0 } 4906e: 4e5e unlk %fp 49070: 4e75 rts ... 00049074 : int pthread_attr_getstacksize( const pthread_attr_t *attr, size_t *stacksize ) { 49074: 4e56 0000 linkw %fp,#0 49078: 206e 0008 moveal %fp@(8),%a0 4907c: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !stacksize ) 49080: 4a88 tstl %a0 49082: 6710 beqs 49094 49084: 4a90 tstl %a0@ 49086: 670c beqs 49094 49088: 4a89 tstl %a1 4908a: 6708 beqs 49094 return EINVAL; *stacksize = attr->stacksize; 4908c: 22a8 0008 movel %a0@(8),%a1@ 49090: 4280 clrl %d0 return 0; 49092: 6002 bras 49096 49094: 7016 moveq #22,%d0 } 49096: 4e5e unlk %fp 49098: 4e75 rts ... 0004a98c : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 4a98c: 4e56 0000 linkw %fp,#0 4a990: 206e 0008 moveal %fp@(8),%a0 4a994: 222e 000c movel %fp@(12),%d1 4a998: 2f02 movel %d2,%sp@- if ( !attr || !attr->is_initialized ) 4a99a: 4a88 tstl %a0 4a99c: 671c beqs 4a9ba 4a99e: 4a90 tstl %a0@ 4a9a0: 6718 beqs 4a9ba return EINVAL; switch ( inheritsched ) { 4a9a2: 2241 moveal %d1,%a1 4a9a4: 5389 subql #1,%a1 4a9a6: 203c 0000 0086 movel #134,%d0 4a9ac: 7401 moveq #1,%d2 4a9ae: b489 cmpl %a1,%d2 4a9b0: 650a bcss 4a9bc case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 4a9b2: 2141 0010 movel %d1,%a0@(16) 4a9b6: 4200 clrb %d0 return 0; 4a9b8: 6002 bras 4a9bc 4a9ba: 7016 moveq #22,%d0 default: return ENOTSUP; } } 4a9bc: 241f movel %sp@+,%d2 4a9be: 4e5e unlk %fp 4a9c0: 4e75 rts ... 00049128 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 49128: 4e56 0000 linkw %fp,#0 4912c: 206e 0008 moveal %fp@(8),%a0 49130: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized || !param ) 49134: 4a88 tstl %a0 49136: 6720 beqs 49158 49138: 4a90 tstl %a0@ 4913a: 671c beqs 49158 4913c: 4a80 tstl %d0 4913e: 6718 beqs 49158 return EINVAL; attr->schedparam = *param; 49140: 4878 001c pea 1c 49144: 2f00 movel %d0,%sp@- 49146: 4868 0018 pea %a0@(24) 4914a: 4eb9 0005 2120 jsr 52120 return 0; 49150: 4fef 000c lea %sp@(12),%sp ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; attr->schedparam = *param; 49154: 4280 clrl %d0 return 0; 49156: 6002 bras 4915a 49158: 7016 moveq #22,%d0 } 4915a: 4e5e unlk %fp 4915c: 4e75 rts ... 000452b4 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 452b4: 4e56 ffe0 linkw %fp,#-32 452b8: 206e 000c moveal %fp@(12),%a0 452bc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 452c0: 266e 0008 moveal %fp@(8),%a3 452c4: 246e 0010 moveal %fp@(16),%a2 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 452c8: 4a8b tstl %a3 452ca: 6700 008e beqw 4535a return EINVAL; if ( count == 0 ) 452ce: 4a8a tstl %a2 452d0: 6700 0088 beqw 4535a return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 452d4: 4a88 tstl %a0 452d6: 6614 bnes 452ec the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 452d8: 240e movel %fp,%d2 452da: 0682 ffff fff0 addil #-16,%d2 452e0: 2f02 movel %d2,%sp@- 452e2: 4eb9 0004 51f8 jsr 451f8 452e8: 588f addql #4,%sp 452ea: 2042 moveal %d2,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 452ec: 4a90 tstl %a0@ 452ee: 676a beqs 4535a return EINVAL; switch ( the_attr->process_shared ) { 452f0: 4aa8 0004 tstl %a0@(4) 452f4: 6664 bnes 4535a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 452f6: 2039 0005 e158 movel 5e158 <_Thread_Dispatch_disable_level>,%d0 452fc: 5280 addql #1,%d0 /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 452fe: 2d4a fffc movel %a2,%fp@(-4) 45302: 23c0 0005 e158 movel %d0,5e158 <_Thread_Dispatch_disable_level> } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 45308: 42ae fff8 clrl %fp@(-8) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 4530c: 4879 0005 e49a pea 5e49a <_POSIX_Barrier_Information> 45312: 45f9 0004 7ca2 lea 47ca2 <_Thread_Enable_dispatch>,%a2 45318: 4eb9 0004 70cc jsr 470cc <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 4531e: 588f addql #4,%sp 45320: 2840 moveal %d0,%a4 45322: 4a80 tstl %d0 45324: 6606 bnes 4532c _Thread_Enable_dispatch(); 45326: 4e92 jsr %a2@ 45328: 700b moveq #11,%d0 return EAGAIN; 4532a: 6030 bras 4535c } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4532c: 486e fff8 pea %fp@(-8) 45330: 486c 0010 pea %a4@(16) 45334: 4eb9 0004 6868 jsr 46868 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4533a: 202c 0008 movel %a4@(8),%d0 4533e: 4281 clrl %d1 45340: 2079 0005 e4b2 moveal 5e4b2 <_POSIX_Barrier_Information+0x18>,%a0 45346: 3200 movew %d0,%d1 45348: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 4534c: 42ac 000c clrl %a4@(12) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 45350: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 45352: 4e92 jsr %a2@ return 0; 45354: 508f addql #8,%sp /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); 45356: 4280 clrl %d0 return 0; 45358: 6002 bras 4535c 4535a: 7016 moveq #22,%d0 } 4535c: 4cee 1c04 ffe0 moveml %fp@(-32),%d2/%a2-%a4 45362: 4e5e unlk %fp 45364: 4e75 rts ... 00045368 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 45368: 4e56 fffc linkw %fp,#-4 4536c: 206e 0008 moveal %fp@(8),%a0 POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 45370: 4a88 tstl %a0 45372: 6750 beqs 453c4 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 45374: 486e fffc pea %fp@(-4) 45378: 2f10 movel %a0@,%sp@- 4537a: 4879 0005 e49a pea 5e49a <_POSIX_Barrier_Information> 45380: 4eb9 0004 7518 jsr 47518 <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 45386: 4fef 000c lea %sp@(12),%sp 4538a: 4aae fffc tstl %fp@(-4) 4538e: 6634 bnes 453c4 case OBJECTS_LOCAL: _CORE_barrier_Wait( 45390: 42a7 clrl %sp@- 45392: 2040 moveal %d0,%a0 45394: 42a7 clrl %sp@- 45396: 4878 0001 pea 1 4539a: 2f28 0008 movel %a0@(8),%sp@- 4539e: 4868 0010 pea %a0@(16) 453a2: 4eb9 0004 68a4 jsr 468a4 <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 453a8: 4eb9 0004 7ca2 jsr 47ca2 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 453ae: 2079 0005 e212 moveal 5e212 <_Thread_Executing>,%a0 453b4: 2f28 0034 movel %a0@(52),%sp@- 453b8: 4eb9 0004 a76c jsr 4a76c <_POSIX_Barrier_Translate_core_barrier_return_code> 453be: 4fef 0018 lea %sp@(24),%sp 453c2: 6002 bras 453c6 453c4: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 453c6: 4e5e unlk %fp 453c8: 4e75 rts ... 000451d4 : int pthread_barrierattr_getpshared( const pthread_barrierattr_t *attr, int *pshared ) { 451d4: 4e56 0000 linkw %fp,#0 451d8: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 451dc: 4a88 tstl %a0 451de: 6710 beqs 451f0 return EINVAL; if ( !attr->is_initialized ) 451e0: 4a90 tstl %a0@ 451e2: 670c beqs 451f0 return EINVAL; *pshared = attr->process_shared; 451e4: 226e 000c moveal %fp@(12),%a1 451e8: 4280 clrl %d0 451ea: 22a8 0004 movel %a0@(4),%a1@ return 0; 451ee: 6002 bras 451f2 451f0: 7016 moveq #22,%d0 } 451f2: 4e5e unlk %fp 451f4: 4e75 rts ... 000451f8 : */ int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { 451f8: 4e56 0000 linkw %fp,#0 451fc: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 45200: 4a88 tstl %a0 45202: 6604 bnes 45208 45204: 7016 moveq #22,%d0 45206: 600a bras 45212 return EINVAL; attr->is_initialized = true; 45208: 7201 moveq #1,%d1 attr->process_shared = PTHREAD_PROCESS_PRIVATE; 4520a: 4280 clrl %d0 4520c: 42a8 0004 clrl %a0@(4) ) { if ( !attr ) return EINVAL; attr->is_initialized = true; 45210: 2081 movel %d1,%a0@ attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 45212: 4e5e unlk %fp 45214: 4e75 rts ... 00044a80 : */ int pthread_cancel( pthread_t thread ) { 44a80: 4e56 fffc linkw %fp,#-4 /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 44a84: 2039 0005 d3c2 movel 5d3c2 <_ISR_Nest_level>,%d0 44a8a: 6704 beqs 44a90 44a8c: 7047 moveq #71,%d0 44a8e: 603a bras 44aca RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 44a90: 486e fffc pea %fp@(-4) 44a94: 2f2e 0008 movel %fp@(8),%sp@- 44a98: 4879 0005 d50e pea 5d50e <_POSIX_Threads_Information> 44a9e: 4eb9 0004 6884 jsr 46884 <_Objects_Get> return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 44aa4: 4fef 000c lea %sp@(12),%sp 44aa8: 4aae fffc tstl %fp@(-4) 44aac: 6704 beqs 44ab2 44aae: 7016 moveq #22,%d0 44ab0: 6018 bras 44aca case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 44ab2: 2240 moveal %d0,%a1 44ab4: 7201 moveq #1,%d1 44ab6: 2069 010e moveal %a1@(270),%a0 44aba: 2141 00dc movel %d1,%a0@(220) /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 44abe: 2f00 movel %d0,%sp@- 44ac0: 4eb9 0004 97fc jsr 497fc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> return 0; 44ac6: 588f addql #4,%sp thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 44ac8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 44aca: 4e5e unlk %fp 44acc: 4e75 rts ... 00044cf8 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 44cf8: 4e56 0000 linkw %fp,#0 44cfc: 2f03 movel %d3,%sp@- 44cfe: 262e 000c movel %fp@(12),%d3 44d02: 2f02 movel %d2,%sp@- 44d04: 242e 0008 movel %fp@(8),%d2 /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 44d08: 6754 beqs 44d5e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44d0a: 2039 0005 dbd0 movel 5dbd0 <_Thread_Dispatch_disable_level>,%d0 44d10: 5280 addql #1,%d0 44d12: 23c0 0005 dbd0 movel %d0,5dbd0 <_Thread_Dispatch_disable_level> return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 44d18: 4878 0010 pea 10 44d1c: 4eb9 0004 896c jsr 4896c <_Workspace_Allocate> if ( handler ) { 44d22: 588f addql #4,%sp 44d24: 4a80 tstl %d0 44d26: 6726 beqs 44d4e thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 44d28: 2079 0005 dc8a moveal 5dc8a <_Thread_Executing>,%a0 44d2e: 2228 010e movel %a0@(270),%d1 handler->routine = routine; 44d32: 2040 moveal %d0,%a0 handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 44d34: 0681 0000 00e0 addil #224,%d1 handler->routine = routine; 44d3a: 2142 0008 movel %d2,%a0@(8) handler->arg = arg; 44d3e: 2143 000c movel %d3,%a0@(12) _Chain_Append( handler_stack, &handler->Node ); 44d42: 2f00 movel %d0,%sp@- 44d44: 2f01 movel %d1,%sp@- 44d46: 4eb9 0004 6388 jsr 46388 <_Chain_Append> 44d4c: 508f addql #8,%sp } _Thread_Enable_dispatch(); } 44d4e: 242e fff8 movel %fp@(-8),%d2 44d52: 262e fffc movel %fp@(-4),%d3 44d56: 4e5e unlk %fp handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 44d58: 4ef9 0004 772a jmp 4772a <_Thread_Enable_dispatch> } 44d5e: 242e fff8 movel %fp@(-8),%d2 44d62: 262e fffc movel %fp@(-4),%d3 44d66: 4e5e unlk %fp 44d68: 4e75 rts ... 00045964 : */ int pthread_cond_broadcast( pthread_cond_t *cond ) { 45964: 4e56 0000 linkw %fp,#0 return _POSIX_Condition_variables_Signal_support( cond, true ); 45968: 4878 0001 pea 1 4596c: 2f2e 0008 movel %fp@(8),%sp@- 45970: 4eb9 0004 5af8 jsr 45af8 <_POSIX_Condition_variables_Signal_support> } 45976: 4e5e unlk %fp 45978: 4e75 rts ... 00045a40 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 45a40: 4e56 fff4 linkw %fp,#-12 45a44: 202e 000c movel %fp@(12),%d0 45a48: 48d7 1c00 moveml %a2-%a4,%sp@ POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 45a4c: 45f9 0005 c89c lea 5c89c <_POSIX_Condition_variables_Default_attributes>,%a2 45a52: 4a80 tstl %d0 45a54: 6702 beqs 45a58 45a56: 2440 moveal %d0,%a2 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 45a58: 7001 moveq #1,%d0 45a5a: b0aa 0004 cmpl %a2@(4),%d0 45a5e: 6776 beqs 45ad6 return EINVAL; if ( !the_attr->is_initialized ) 45a60: 4a92 tstl %a2@ 45a62: 6772 beqs 45ad6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45a64: 2039 0005 f1c4 movel 5f1c4 <_Thread_Dispatch_disable_level>,%d0 45a6a: 5280 addql #1,%d0 45a6c: 23c0 0005 f1c4 movel %d0,5f1c4 <_Thread_Dispatch_disable_level> */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 45a72: 4879 0005 f592 pea 5f592 <_POSIX_Condition_variables_Information> 45a78: 47f9 0004 89a6 lea 489a6 <_Thread_Enable_dispatch>,%a3 45a7e: 4eb9 0004 7dd0 jsr 47dd0 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 45a84: 588f addql #4,%sp 45a86: 2840 moveal %d0,%a4 45a88: 4a80 tstl %d0 45a8a: 6606 bnes 45a92 _Thread_Enable_dispatch(); 45a8c: 4e93 jsr %a3@ 45a8e: 700c moveq #12,%d0 return ENOMEM; 45a90: 6046 bras 45ad8 } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 45a92: 42ac 0014 clrl %a4@(20) if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 45a96: 296a 0004 0010 movel %a2@(4),%a4@(16) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 45a9c: 4878 0074 pea 74 45aa0: 4878 0800 pea 800 45aa4: 42a7 clrl %sp@- 45aa6: 486c 0018 pea %a4@(24) 45aaa: 4eb9 0004 90b8 jsr 490b8 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45ab0: 202c 0008 movel %a4@(8),%d0 45ab4: 4281 clrl %d1 45ab6: 2079 0005 f5aa moveal 5f5aa <_POSIX_Condition_variables_Information+0x18>,%a0 45abc: 3200 movew %d0,%d1 45abe: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45ac2: 42ac 000c clrl %a4@(12) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 45ac6: 206e 0008 moveal %fp@(8),%a0 45aca: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 45acc: 4e93 jsr %a3@ return 0; 45ace: 4fef 0010 lea %sp@(16),%sp 0 ); *cond = the_cond->Object.id; _Thread_Enable_dispatch(); 45ad2: 4280 clrl %d0 return 0; 45ad4: 6002 bras 45ad8 45ad6: 7016 moveq #22,%d0 } 45ad8: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 45ade: 4e5e unlk %fp 45ae0: 4e75 rts ... 00045b58 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 45b58: 4e56 fffc linkw %fp,#-4 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 45b5c: 486e fffc pea %fp@(-4) 45b60: 2f2e 0010 movel %fp@(16),%sp@- 45b64: 4eb9 0004 5fc4 jsr 45fc4 <_POSIX_Absolute_timeout_to_ticks> 45b6a: 508f addql #8,%sp 45b6c: 4a80 tstl %d0 45b6e: 6728 beqs 45b98 45b70: 7202 moveq #2,%d1 45b72: b280 cmpl %d0,%d1 45b74: 55c0 scs %d0 45b76: 5280 addql #1,%d0 default: /* only to silence warnings */ already_timedout = false; break; } return _POSIX_Condition_variables_Wait_support( 45b78: 0280 0000 00ff andil #255,%d0 45b7e: 2f00 movel %d0,%sp@- 45b80: 2f2e fffc movel %fp@(-4),%sp@- 45b84: 2f2e 000c movel %fp@(12),%sp@- 45b88: 2f2e 0008 movel %fp@(8),%sp@- 45b8c: 4eb9 0004 5bbc jsr 45bbc <_POSIX_Condition_variables_Wait_support> 45b92: 4fef 0010 lea %sp@(16),%sp 45b96: 6002 bras 45b9a * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 45b98: 7016 moveq #22,%d0 cond, mutex, ticks, already_timedout ); } 45b9a: 4e5e unlk %fp 45b9c: 4e75 rts ... 00045ba0 : int pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex ) { 45ba0: 4e56 0000 linkw %fp,#0 return _POSIX_Condition_variables_Wait_support( 45ba4: 42a7 clrl %sp@- 45ba6: 42a7 clrl %sp@- 45ba8: 2f2e 000c movel %fp@(12),%sp@- 45bac: 2f2e 0008 movel %fp@(8),%sp@- 45bb0: 4eb9 0004 5bbc jsr 45bbc <_POSIX_Condition_variables_Wait_support> cond, mutex, THREAD_QUEUE_WAIT_FOREVER, false ); } 45bb6: 4e5e unlk %fp 45bb8: 4e75 rts ... 000458f4 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 458f4: 4e56 0000 linkw %fp,#0 458f8: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 458fc: 4a88 tstl %a0 458fe: 6604 bnes 45904 45900: 7016 moveq #22,%d0 45902: 600a bras 4590e return EINVAL; *pshared = attr->process_shared; 45904: 226e 000c moveal %fp@(12),%a1 45908: 4280 clrl %d0 4590a: 22a8 0004 movel %a0@(4),%a1@ return 0; } 4590e: 4e5e unlk %fp 45910: 4e75 rts ... 00045228 : int pthread_equal( pthread_t t1, pthread_t t2 ) { 45228: 4e56 0000 linkw %fp,#0 4522c: 202e 000c movel %fp@(12),%d0 45230: b0ae 0008 cmpl %fp@(8),%d0 45234: 57c0 seq %d0 break; } return status; #endif } 45236: 4e5e unlk %fp int pthread_equal( pthread_t t1, pthread_t t2 ) { 45238: 49c0 extbl %d0 break; } return status; #endif } 4523a: 4480 negl %d0 4523c: 4e75 rts ... 0004ba2c : } void pthread_exit( void *value_ptr ) { 4ba2c: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4ba30: 2f2e 0008 movel %fp@(8),%sp@- 4ba34: 2f39 0005 cd4e movel 5cd4e <_Thread_Executing>,%sp@- 4ba3a: 4eb9 0004 b9bc jsr 4b9bc <_POSIX_Thread_Exit> 4ba40: 508f addql #8,%sp <== NOT EXECUTED } 4ba42: 4e5e unlk %fp <== NOT EXECUTED 4ba44: 4e75 rts <== NOT EXECUTED ... 00044f9c : int pthread_getcpuclockid( pthread_t pid, clockid_t *clock_id ) { 44f9c: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 44fa0: 4eb9 0004 d430 jsr 4d430 <__errno> 44fa6: 7258 moveq #88,%d1 44fa8: 2040 moveal %d0,%a0 } 44faa: 70ff moveq #-1,%d0 44fac: 4e5e unlk %fp int pthread_getcpuclockid( pthread_t pid, clockid_t *clock_id ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 44fae: 2081 movel %d1,%a0@ } 44fb0: 4e75 rts ... 000495ec : int pthread_join( pthread_t thread, void **value_ptr ) { 495ec: 4e56 fff8 linkw %fp,#-8 495f0: 2f0b movel %a3,%sp@- 495f2: 2f0a movel %a2,%sp@- 495f4: 486e fffc pea %fp@(-4) 495f8: 2f2e 0008 movel %fp@(8),%sp@- 495fc: 4879 0006 49a6 pea 649a6 <_POSIX_Threads_Information> 49602: 246e 000c moveal %fp@(12),%a2 49606: 4eb9 0004 b65c jsr 4b65c <_Objects_Get> POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4960c: 4fef 000c lea %sp@(12),%sp 49610: 4aae fffc tstl %fp@(-4) 49614: 6704 beqs 4961a 49616: 7003 moveq #3,%d0 49618: 605c bras 49676 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4961a: 2240 moveal %d0,%a1 4961c: 2069 010e moveal %a1@(270),%a0 if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 49620: 4aa8 003c tstl %a0@(60) 49624: 660a bnes 49630 _Thread_Enable_dispatch(); 49626: 4eb9 0004 bde6 jsr 4bde6 <_Thread_Enable_dispatch> 4962c: 7016 moveq #22,%d0 return EINVAL; 4962e: 6046 bras 49676 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 49630: 2279 0006 487a moveal 6487a <_Thread_Executing>,%a1 49636: 47f9 0004 bde6 lea 4bde6 <_Thread_Enable_dispatch>,%a3 } if ( _Thread_Is_executing( the_thread ) ) { 4963c: b3c0 cmpal %d0,%a1 4963e: 6606 bnes 49646 _Thread_Enable_dispatch(); 49640: 4e93 jsr %a3@ 49642: 702d moveq #45,%d0 return EDEADLK; 49644: 6030 bras 49676 /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 49646: 200e movel %fp,%d0 49648: 5180 subql #8,%d0 4964a: 2340 0028 movel %d0,%a1@(40) 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; 4964e: 7001 moveq #1,%d0 49650: 2140 0070 movel %d0,%a0@(112) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 49654: 4879 0004 c55c pea 4c55c <_Thread_queue_Timeout> 4965a: 42a7 clrl %sp@- 4965c: 4868 0040 pea %a0@(64) 49660: 4eb9 0004 c270 jsr 4c270 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 49666: 4e93 jsr %a3@ if ( value_ptr ) 49668: 4fef 000c lea %sp@(12),%sp 4966c: 4a8a tstl %a2 4966e: 6704 beqs 49674 *value_ptr = return_pointer; 49670: 24ae fff8 movel %fp@(-8),%a2@ 49674: 4280 clrl %d0 case OBJECTS_ERROR: break; } return ESRCH; } 49676: 246e fff0 moveal %fp@(-16),%a2 4967a: 266e fff4 moveal %fp@(-12),%a3 4967e: 4e5e unlk %fp 49680: 4e75 rts ... 00044fc0 : */ int pthread_key_delete( pthread_key_t key ) { 44fc0: 4e56 ffec linkw %fp,#-20 44fc4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 44fc8: 486e fffc pea %fp@(-4) 44fcc: 2f2e 0008 movel %fp@(8),%sp@- 44fd0: 4879 0005 ed18 pea 5ed18 <_POSIX_Keys_Information> 44fd6: 4eb9 0004 729c jsr 4729c <_Objects_Get> register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 44fdc: 4fef 000c lea %sp@(12),%sp 44fe0: 2400 movel %d0,%d2 44fe2: 4aae fffc tstl %fp@(-4) 44fe6: 6704 beqs 44fec 44fe8: 7016 moveq #22,%d0 44fea: 604c bras 45038 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 44fec: 2f00 movel %d0,%sp@- 44fee: 4879 0005 ed18 pea 5ed18 <_POSIX_Keys_Information> 44ff4: 2440 moveal %d0,%a2 44ff6: 45ea 0018 lea %a2@(24),%a2 44ffa: 7601 moveq #1,%d3 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) _Workspace_Free( the_key->Values[ the_api ] ); 44ffc: 47f9 0004 8d04 lea 48d04 <_Workspace_Free>,%a3 the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 45002: 4eb9 0004 6ed0 jsr 46ed0 <_Objects_Close> 45008: 508f addql #8,%sp for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 4500a: 2012 movel %a2@,%d0 switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) 4500c: 5283 addql #1,%d3 4500e: 588a addql #4,%a2 if ( the_key->Values[ the_api ] ) 45010: 4a80 tstl %d0 45012: 6706 beqs 4501a _Workspace_Free( the_key->Values[ the_api ] ); 45014: 2f00 movel %d0,%sp@- 45016: 4e93 jsr %a3@ 45018: 588f addql #4,%sp switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) 4501a: 7005 moveq #5,%d0 4501c: b083 cmpl %d3,%d0 4501e: 66ea bnes 4500a */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 45020: 2f02 movel %d2,%sp@- 45022: 4879 0005 ed18 pea 5ed18 <_POSIX_Keys_Information> 45028: 4eb9 0004 7144 jsr 47144 <_Objects_Free> * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 4502e: 4eb9 0004 7a26 jsr 47a26 <_Thread_Enable_dispatch> return 0; 45034: 508f addql #8,%sp * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 45036: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 45038: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4503e: 4e5e unlk %fp 45040: 4e75 rts ... 0004699c : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 4699c: 4e56 fffc linkw %fp,#-4 469a0: 2f0b movel %a3,%sp@- 469a2: 2f0a movel %a2,%sp@- register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 469a4: 486e fffc pea %fp@(-4) 469a8: 2f2e 0008 movel %fp@(8),%sp@- 469ac: 4eb9 0004 6a6a jsr 46a6a <_POSIX_Mutex_Get> switch ( location ) { 469b2: 508f addql #8,%sp ) { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 469b4: 2440 moveal %d0,%a2 switch ( location ) { 469b6: 4aae fffc tstl %fp@(-4) 469ba: 6704 beqs 469c0 469bc: 7016 moveq #22,%d0 469be: 6046 bras 46a06 469c0: 47f9 0004 99be lea 499be <_Thread_Enable_dispatch>,%a3 /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 469c6: 4aaa 0062 tstl %a2@(98) 469ca: 6606 bnes 469d2 _Thread_Enable_dispatch(); 469cc: 4e93 jsr %a3@ 469ce: 7010 moveq #16,%d0 return EBUSY; 469d0: 6034 bras 46a06 } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 469d2: 2f00 movel %d0,%sp@- 469d4: 4879 0006 1a9c pea 61a9c <_POSIX_Mutex_Information> 469da: 4eb9 0004 8e68 jsr 48e68 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 469e0: 4878 0016 pea 16 469e4: 42a7 clrl %sp@- 469e6: 486a 0014 pea %a2@(20) 469ea: 4eb9 0004 8580 jsr 48580 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 469f0: 2f0a movel %a2,%sp@- 469f2: 4879 0006 1a9c pea 61a9c <_POSIX_Mutex_Information> 469f8: 4eb9 0004 90dc jsr 490dc <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 469fe: 4e93 jsr %a3@ return 0; 46a00: 4fef 001c lea %sp@(28),%sp _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 46a04: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 46a06: 246e fff4 moveal %fp@(-12),%a2 46a0a: 266e fff8 moveal %fp@(-8),%a3 46a0e: 4e5e unlk %fp 46a10: 4e75 rts ... 00046d78 : */ int pthread_mutex_trylock( pthread_mutex_t *mutex ) { 46d78: 4e56 0000 linkw %fp,#0 return _POSIX_Mutex_Lock_support( mutex, false, THREAD_QUEUE_WAIT_FOREVER ); 46d7c: 42a7 clrl %sp@- 46d7e: 42a7 clrl %sp@- 46d80: 2f2e 0008 movel %fp@(8),%sp@- 46d84: 4eb9 0004 6c38 jsr 46c38 <_POSIX_Mutex_Lock_support> } 46d8a: 4e5e unlk %fp 46d8c: 4e75 rts ... 00046d90 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 46d90: 4e56 fffc linkw %fp,#-4 46d94: 2f02 movel %d2,%sp@- register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 46d96: 486e fffc pea %fp@(-4) 46d9a: 2f2e 0008 movel %fp@(8),%sp@- 46d9e: 4eb9 0004 6a6a jsr 46a6a <_POSIX_Mutex_Get> switch ( location ) { 46da4: 508f addql #8,%sp 46da6: 4aae fffc tstl %fp@(-4) 46daa: 6704 beqs 46db0 46dac: 7016 moveq #22,%d0 46dae: 6026 bras 46dd6 case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 46db0: 2040 moveal %d0,%a0 46db2: 42a7 clrl %sp@- 46db4: 2f28 0008 movel %a0@(8),%sp@- 46db8: 4868 0014 pea %a0@(20) 46dbc: 4eb9 0004 8740 jsr 48740 <_CORE_mutex_Surrender> 46dc2: 2400 movel %d0,%d2 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46dc4: 4eb9 0004 99be jsr 499be <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 46dca: 2f02 movel %d2,%sp@- 46dcc: 4eb9 0004 6d60 jsr 46d60 <_POSIX_Mutex_Translate_core_mutex_return_code> 46dd2: 4fef 0010 lea %sp@(16),%sp case OBJECTS_ERROR: break; } return EINVAL; } 46dd6: 242e fff8 movel %fp@(-8),%d2 46dda: 4e5e unlk %fp 46ddc: 4e75 rts ... 0004686c : int pthread_mutexattr_getprioceiling( const pthread_mutexattr_t *attr, int *prioceiling ) { 4686c: 4e56 0000 linkw %fp,#0 46870: 206e 0008 moveal %fp@(8),%a0 46874: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !prioceiling ) 46878: 4a88 tstl %a0 4687a: 6710 beqs 4688c 4687c: 4a90 tstl %a0@ 4687e: 670c beqs 4688c 46880: 4a89 tstl %a1 46882: 6708 beqs 4688c return EINVAL; *prioceiling = attr->prio_ceiling; 46884: 22a8 0008 movel %a0@(8),%a1@ 46888: 4280 clrl %d0 return 0; 4688a: 6002 bras 4688e 4688c: 7016 moveq #22,%d0 } 4688e: 4e5e unlk %fp 46890: 4e75 rts ... 00046894 : int pthread_mutexattr_getprotocol( const pthread_mutexattr_t *attr, int *protocol ) { 46894: 4e56 0000 linkw %fp,#0 46898: 206e 0008 moveal %fp@(8),%a0 4689c: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !protocol ) 468a0: 4a88 tstl %a0 468a2: 6710 beqs 468b4 468a4: 4a90 tstl %a0@ 468a6: 670c beqs 468b4 468a8: 4a89 tstl %a1 468aa: 6708 beqs 468b4 return EINVAL; *protocol = attr->protocol; 468ac: 22a8 000c movel %a0@(12),%a1@ 468b0: 4280 clrl %d0 return 0; 468b2: 6002 bras 468b6 468b4: 7016 moveq #22,%d0 } 468b6: 4e5e unlk %fp 468b8: 4e75 rts ... 000468bc : int pthread_mutexattr_getpshared( const pthread_mutexattr_t *attr, int *pshared ) { 468bc: 4e56 0000 linkw %fp,#0 468c0: 206e 0008 moveal %fp@(8),%a0 468c4: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !pshared ) 468c8: 4a88 tstl %a0 468ca: 6710 beqs 468dc 468cc: 4a90 tstl %a0@ 468ce: 670c beqs 468dc 468d0: 4a89 tstl %a1 468d2: 6708 beqs 468dc return EINVAL; *pshared = attr->process_shared; 468d4: 22a8 0004 movel %a0@(4),%a1@ 468d8: 4280 clrl %d0 return 0; 468da: 6002 bras 468de 468dc: 7016 moveq #22,%d0 } 468de: 4e5e unlk %fp 468e0: 4e75 rts ... 00044b58 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 44b58: 4e56 0000 linkw %fp,#0 44b5c: 206e 0008 moveal %fp@(8),%a0 44b60: 226e 000c moveal %fp@(12),%a1 if ( !attr ) 44b64: 4a88 tstl %a0 44b66: 6710 beqs 44b78 return EINVAL; if ( !attr->is_initialized ) 44b68: 4a90 tstl %a0@ 44b6a: 670c beqs 44b78 return EINVAL; if ( !type ) 44b6c: 4a89 tstl %a1 44b6e: 6708 beqs 44b78 return EINVAL; *type = attr->type; 44b70: 22a8 0010 movel %a0@(16),%a1@ 44b74: 4280 clrl %d0 return 0; 44b76: 6002 bras 44b7a 44b78: 7016 moveq #22,%d0 } 44b7a: 4e5e unlk %fp 44b7c: 4e75 rts ... 00045b74 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 45b74: 4e56 fffc linkw %fp,#-4 45b78: 206e 0008 moveal %fp@(8),%a0 45b7c: 2f0b movel %a3,%sp@- 45b7e: 2f0a movel %a2,%sp@- POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 45b80: 4a88 tstl %a0 45b82: 6760 beqs 45be4 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 45b84: 486e fffc pea %fp@(-4) 45b88: 2f10 movel %a0@,%sp@- 45b8a: 4879 0005 f7e4 pea 5f7e4 <_POSIX_RWLock_Information> 45b90: 4eb9 0004 83dc jsr 483dc <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45b96: 4fef 000c lea %sp@(12),%sp 45b9a: 2440 moveal %d0,%a2 45b9c: 4aae fffc tstl %fp@(-4) 45ba0: 6642 bnes 45be4 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 45ba2: 486a 0010 pea %a2@(16) 45ba6: 47f9 0004 8b66 lea 48b66 <_Thread_Enable_dispatch>,%a3 45bac: 4eb9 0004 92f0 jsr 492f0 <_Thread_queue_First> 45bb2: 588f addql #4,%sp 45bb4: 4a80 tstl %d0 45bb6: 6706 beqs 45bbe _Thread_Enable_dispatch(); 45bb8: 4e93 jsr %a3@ 45bba: 7010 moveq #16,%d0 return EBUSY; 45bbc: 6028 bras 45be6 /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 45bbe: 2f0a movel %a2,%sp@- 45bc0: 4879 0005 f7e4 pea 5f7e4 <_POSIX_RWLock_Information> 45bc6: 4eb9 0004 8010 jsr 48010 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 45bcc: 2f0a movel %a2,%sp@- 45bce: 4879 0005 f7e4 pea 5f7e4 <_POSIX_RWLock_Information> 45bd4: 4eb9 0004 8284 jsr 48284 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 45bda: 4e93 jsr %a3@ return 0; 45bdc: 4fef 0010 lea %sp@(16),%sp _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 45be0: 4280 clrl %d0 return 0; 45be2: 6002 bras 45be6 45be4: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45be6: 246e fff4 moveal %fp@(-12),%a2 45bea: 266e fff8 moveal %fp@(-8),%a3 45bee: 4e5e unlk %fp 45bf0: 4e75 rts ... 00045c8c : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 45c8c: 4e56 fffc linkw %fp,#-4 45c90: 2f0a movel %a2,%sp@- 45c92: 246e 0008 moveal %fp@(8),%a2 POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 45c96: 4a8a tstl %a2 45c98: 674e beqs 45ce8 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 45c9a: 486e fffc pea %fp@(-4) 45c9e: 2f12 movel %a2@,%sp@- 45ca0: 4879 0005 f7e4 pea 5f7e4 <_POSIX_RWLock_Information> 45ca6: 4eb9 0004 83dc jsr 483dc <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45cac: 4fef 000c lea %sp@(12),%sp 45cb0: 4aae fffc tstl %fp@(-4) 45cb4: 6632 bnes 45ce8 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 45cb6: 42a7 clrl %sp@- 45cb8: 2040 moveal %d0,%a0 45cba: 42a7 clrl %sp@- 45cbc: 4878 0001 pea 1 45cc0: 2f12 movel %a2@,%sp@- 45cc2: 4868 0010 pea %a0@(16) 45cc6: 4eb9 0004 77f8 jsr 477f8 <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 45ccc: 4eb9 0004 8b66 jsr 48b66 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 45cd2: 2079 0005 f6f2 moveal 5f6f2 <_Thread_Executing>,%a0 45cd8: 2f28 0034 movel %a0@(52),%sp@- 45cdc: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45ce2: 4fef 0018 lea %sp@(24),%sp 45ce6: 6002 bras 45cea 45ce8: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45cea: 246e fff8 moveal %fp@(-8),%a2 45cee: 4e5e unlk %fp 45cf0: 4e75 rts ... 00045cf4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 45cf4: 4e56 ffec linkw %fp,#-20 45cf8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45cfc: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 45d00: 4a8a tstl %a2 45d02: 6700 008e beqw 45d92 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 45d06: 486e fff8 pea %fp@(-8) 45d0a: 2f2e 000c movel %fp@(12),%sp@- 45d0e: 4eb9 0004 b7d4 jsr 4b7d4 <_POSIX_Absolute_timeout_to_ticks> 45d14: 486e fffc pea %fp@(-4) 45d18: 2400 movel %d0,%d2 45d1a: 2f12 movel %a2@,%sp@- 45d1c: 4879 0005 f7e4 pea 5f7e4 <_POSIX_RWLock_Information> 45d22: 4eb9 0004 83dc jsr 483dc <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45d28: 4fef 0014 lea %sp@(20),%sp 45d2c: 4aae fffc tstl %fp@(-4) 45d30: 6660 bnes 45d92 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 45d32: 7203 moveq #3,%d1 45d34: b282 cmpl %d2,%d1 45d36: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 45d38: 42a7 clrl %sp@- 45d3a: 2f2e fff8 movel %fp@(-8),%sp@- 45d3e: 4483 negl %d3 45d40: 4281 clrl %d1 45d42: 1203 moveb %d3,%d1 45d44: 2040 moveal %d0,%a0 45d46: 2f01 movel %d1,%sp@- 45d48: 2f12 movel %a2@,%sp@- 45d4a: 4868 0010 pea %a0@(16) 45d4e: 4eb9 0004 77f8 jsr 477f8 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 45d54: 4eb9 0004 8b66 jsr 48b66 <_Thread_Enable_dispatch> if ( !do_wait ) { 45d5a: 4fef 0014 lea %sp@(20),%sp 45d5e: 4a03 tstb %d3 45d60: 661c bnes 45d7e if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 45d62: 2079 0005 f6f2 moveal 5f6f2 <_Thread_Executing>,%a0 45d68: 7002 moveq #2,%d0 45d6a: b0a8 0034 cmpl %a0@(52),%d0 45d6e: 660e bnes 45d7e switch (status) { 45d70: 4a82 tstl %d2 45d72: 671e beqs 45d92 45d74: b082 cmpl %d2,%d0 45d76: 6506 bcss 45d7e 45d78: 103c 0074 moveb #116,%d0 45d7c: 6016 bras 45d94 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 45d7e: 2079 0005 f6f2 moveal 5f6f2 <_Thread_Executing>,%a0 45d84: 2f28 0034 movel %a0@(52),%sp@- 45d88: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45d8e: 588f addql #4,%sp 45d90: 6002 bras 45d94 45d92: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45d94: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 45d9a: 4e5e unlk %fp 45d9c: 4e75 rts ... 00045da0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 45da0: 4e56 ffec linkw %fp,#-20 45da4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45da8: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 45dac: 4a8a tstl %a2 45dae: 6700 008e beqw 45e3e * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 45db2: 486e fff8 pea %fp@(-8) 45db6: 2f2e 000c movel %fp@(12),%sp@- 45dba: 4eb9 0004 b7d4 jsr 4b7d4 <_POSIX_Absolute_timeout_to_ticks> 45dc0: 486e fffc pea %fp@(-4) 45dc4: 2400 movel %d0,%d2 45dc6: 2f12 movel %a2@,%sp@- 45dc8: 4879 0005 f7e4 pea 5f7e4 <_POSIX_RWLock_Information> 45dce: 4eb9 0004 83dc jsr 483dc <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45dd4: 4fef 0014 lea %sp@(20),%sp 45dd8: 4aae fffc tstl %fp@(-4) 45ddc: 6660 bnes 45e3e (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 45dde: 7203 moveq #3,%d1 45de0: b282 cmpl %d2,%d1 45de2: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 45de4: 42a7 clrl %sp@- 45de6: 2f2e fff8 movel %fp@(-8),%sp@- 45dea: 4483 negl %d3 45dec: 4281 clrl %d1 45dee: 1203 moveb %d3,%d1 45df0: 2040 moveal %d0,%a0 45df2: 2f01 movel %d1,%sp@- 45df4: 2f12 movel %a2@,%sp@- 45df6: 4868 0010 pea %a0@(16) 45dfa: 4eb9 0004 78a8 jsr 478a8 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 45e00: 4eb9 0004 8b66 jsr 48b66 <_Thread_Enable_dispatch> if ( !do_wait && 45e06: 4fef 0014 lea %sp@(20),%sp 45e0a: 4a03 tstb %d3 45e0c: 661c bnes 45e2a (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 45e0e: 2079 0005 f6f2 moveal 5f6f2 <_Thread_Executing>,%a0 45e14: 7002 moveq #2,%d0 45e16: b0a8 0034 cmpl %a0@(52),%d0 45e1a: 660e bnes 45e2a switch (status) { 45e1c: 4a82 tstl %d2 45e1e: 671e beqs 45e3e 45e20: b082 cmpl %d2,%d0 45e22: 6506 bcss 45e2a 45e24: 103c 0074 moveb #116,%d0 45e28: 6016 bras 45e40 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 45e2a: 2079 0005 f6f2 moveal 5f6f2 <_Thread_Executing>,%a0 45e30: 2f28 0034 movel %a0@(52),%sp@- 45e34: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45e3a: 588f addql #4,%sp 45e3c: 6002 bras 45e40 45e3e: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45e40: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 45e46: 4e5e unlk %fp 45e48: 4e75 rts ... 00045f80 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 45f80: 4e56 fffc linkw %fp,#-4 45f84: 2f0a movel %a2,%sp@- 45f86: 246e 0008 moveal %fp@(8),%a2 POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 45f8a: 4a8a tstl %a2 45f8c: 674e beqs 45fdc 45f8e: 486e fffc pea %fp@(-4) 45f92: 2f12 movel %a2@,%sp@- 45f94: 4879 0005 f7e4 pea 5f7e4 <_POSIX_RWLock_Information> 45f9a: 4eb9 0004 83dc jsr 483dc <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45fa0: 4fef 000c lea %sp@(12),%sp 45fa4: 4aae fffc tstl %fp@(-4) 45fa8: 6632 bnes 45fdc case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 45faa: 42a7 clrl %sp@- 45fac: 2040 moveal %d0,%a0 45fae: 42a7 clrl %sp@- 45fb0: 4878 0001 pea 1 45fb4: 2f12 movel %a2@,%sp@- 45fb6: 4868 0010 pea %a0@(16) 45fba: 4eb9 0004 78a8 jsr 478a8 <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 45fc0: 4eb9 0004 8b66 jsr 48b66 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 45fc6: 2079 0005 f6f2 moveal 5f6f2 <_Thread_Executing>,%a0 45fcc: 2f28 0034 movel %a0@(52),%sp@- 45fd0: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45fd6: 4fef 0018 lea %sp@(24),%sp 45fda: 6002 bras 45fde 45fdc: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45fde: 246e fff8 moveal %fp@(-8),%a2 45fe2: 4e5e unlk %fp 45fe4: 4e75 rts ... 000464dc : int pthread_rwlockattr_getpshared( const pthread_rwlockattr_t *attr, int *pshared ) { 464dc: 4e56 0000 linkw %fp,#0 464e0: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 464e4: 4a88 tstl %a0 464e6: 6710 beqs 464f8 return EINVAL; if ( !attr->is_initialized ) 464e8: 4a90 tstl %a0@ 464ea: 670c beqs 464f8 return EINVAL; *pshared = attr->process_shared; 464ec: 226e 000c moveal %fp@(12),%a1 464f0: 4280 clrl %d0 464f2: 22a8 0004 movel %a0@(4),%a1@ return 0; 464f6: 6002 bras 464fa 464f8: 7016 moveq #22,%d0 } 464fa: 4e5e unlk %fp 464fc: 4e75 rts ... 00046500 : */ int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { 46500: 4e56 0000 linkw %fp,#0 46504: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 46508: 4a88 tstl %a0 4650a: 6604 bnes 46510 4650c: 7016 moveq #22,%d0 4650e: 600a bras 4651a return EINVAL; attr->is_initialized = true; 46510: 7201 moveq #1,%d1 attr->process_shared = PTHREAD_PROCESS_PRIVATE; 46512: 4280 clrl %d0 46514: 42a8 0004 clrl %a0@(4) ) { if ( !attr ) return EINVAL; attr->is_initialized = true; 46518: 2081 movel %d1,%a0@ attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 4651a: 4e5e unlk %fp 4651c: 4e75 rts ... 0004c9c0 : #include #include pthread_t pthread_self( void ) { 4c9c0: 4e56 0000 linkw %fp,#0 4c9c4: 2079 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a0 return _Thread_Executing->Object.id; } 4c9ca: 4e5e unlk %fp 4c9cc: 2028 0008 movel %a0@(8),%d0 4c9d0: 4e75 rts ... 00044b70 : int pthread_setcancelstate( int state, int *oldstate ) { 44b70: 4e56 0000 linkw %fp,#0 44b74: 202e 0008 movel %fp@(8),%d0 44b78: 226e 000c moveal %fp@(12),%a1 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 44b7c: 2239 0005 d3c2 movel 5d3c2 <_ISR_Nest_level>,%d1 44b82: 6704 beqs 44b88 44b84: 7047 moveq #71,%d0 44b86: 603e bras 44bc6 return EPROTO; if ( !oldstate ) 44b88: 4a89 tstl %a1 44b8a: 6738 beqs 44bc4 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 44b8c: 7201 moveq #1,%d1 44b8e: b280 cmpl %d0,%d1 44b90: 6532 bcss 44bc4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44b92: 2239 0005 d328 movel 5d328 <_Thread_Dispatch_disable_level>,%d1 44b98: 5281 addql #1,%d1 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 44b9a: 2079 0005 d3e2 moveal 5d3e2 <_Thread_Executing>,%a0 44ba0: 23c1 0005 d328 movel %d1,5d328 <_Thread_Dispatch_disable_level> 44ba6: 2068 010e moveal %a0@(270),%a0 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 44baa: 22a8 00d4 movel %a0@(212),%a1@ thread_support->cancelability_state = state; 44bae: 2140 00d4 movel %d0,%a0@(212) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44bb2: 2f39 0005 d3e2 movel 5d3e2 <_Thread_Executing>,%sp@- 44bb8: 4eb9 0004 97fc jsr 497fc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44bbe: 588f addql #4,%sp _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44bc0: 4280 clrl %d0 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44bc2: 6002 bras 44bc6 44bc4: 7016 moveq #22,%d0 } 44bc6: 4e5e unlk %fp 44bc8: 4e75 rts ... 00044bcc : int pthread_setcanceltype( int type, int *oldtype ) { 44bcc: 4e56 0000 linkw %fp,#0 44bd0: 202e 0008 movel %fp@(8),%d0 44bd4: 226e 000c moveal %fp@(12),%a1 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 44bd8: 2239 0005 d3c2 movel 5d3c2 <_ISR_Nest_level>,%d1 44bde: 6704 beqs 44be4 44be0: 7047 moveq #71,%d0 44be2: 603e bras 44c22 return EPROTO; if ( !oldtype ) 44be4: 4a89 tstl %a1 44be6: 6738 beqs 44c20 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 44be8: 7201 moveq #1,%d1 44bea: b280 cmpl %d0,%d1 44bec: 6532 bcss 44c20 44bee: 2239 0005 d328 movel 5d328 <_Thread_Dispatch_disable_level>,%d1 44bf4: 5281 addql #1,%d1 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 44bf6: 2079 0005 d3e2 moveal 5d3e2 <_Thread_Executing>,%a0 44bfc: 23c1 0005 d328 movel %d1,5d328 <_Thread_Dispatch_disable_level> 44c02: 2068 010e moveal %a0@(270),%a0 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 44c06: 22a8 00d8 movel %a0@(216),%a1@ thread_support->cancelability_type = type; 44c0a: 2140 00d8 movel %d0,%a0@(216) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44c0e: 2f39 0005 d3e2 movel 5d3e2 <_Thread_Executing>,%sp@- 44c14: 4eb9 0004 97fc jsr 497fc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44c1a: 588f addql #4,%sp _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44c1c: 4280 clrl %d0 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44c1e: 6002 bras 44c22 44c20: 7016 moveq #22,%d0 } 44c22: 4e5e unlk %fp 44c24: 4e75 rts ... 0004abf4 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 4abf4: 4e56 0000 linkw %fp,#0 4abf8: 202e 0008 movel %fp@(8),%d0 4abfc: 2f0b movel %a3,%sp@- 4abfe: 226e 000c moveal %fp@(12),%a1 4ac02: 2f0a movel %a2,%sp@- 4ac04: 246e 0010 moveal %fp@(16),%a2 POSIX_API_Control *api; if ( !set && !oset ) 4ac08: 4a89 tstl %a1 4ac0a: 6604 bnes 4ac10 4ac0c: 4a8a tstl %a2 4ac0e: 6742 beqs 4ac52 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4ac10: 2679 0005 e94e moveal 5e94e <_Thread_Executing>,%a3 4ac16: 206b 010e moveal %a3@(270),%a0 if ( oset ) 4ac1a: 4a8a tstl %a2 4ac1c: 6704 beqs 4ac22 *oset = api->signals_blocked; 4ac1e: 24a8 00cc movel %a0@(204),%a2@ if ( !set ) 4ac22: 4a89 tstl %a1 4ac24: 675c beqs 4ac82 return 0; switch ( how ) { 4ac26: 7201 moveq #1,%d1 4ac28: b280 cmpl %d0,%d1 4ac2a: 670e beqs 4ac3a 4ac2c: 123c 0002 moveb #2,%d1 4ac30: b280 cmpl %d0,%d1 4ac32: 670e beqs 4ac42 4ac34: 4a80 tstl %d0 4ac36: 6714 beqs 4ac4c 4ac38: 6018 bras 4ac52 case SIG_BLOCK: api->signals_blocked |= *set; 4ac3a: 2011 movel %a1@,%d0 4ac3c: 81a8 00cc orl %d0,%a0@(204) break; 4ac40: 6020 bras 4ac62 case SIG_UNBLOCK: api->signals_blocked &= ~*set; 4ac42: 2011 movel %a1@,%d0 4ac44: 4680 notl %d0 4ac46: c1a8 00cc andl %d0,%a0@(204) break; 4ac4a: 6016 bras 4ac62 case SIG_SETMASK: api->signals_blocked = *set; 4ac4c: 2151 00cc movel %a1@,%a0@(204) break; 4ac50: 6010 bras 4ac62 default: rtems_set_errno_and_return_minus_one( EINVAL ); 4ac52: 4eb9 0004 d714 jsr 4d714 <__errno> 4ac58: 72ff moveq #-1,%d1 4ac5a: 2040 moveal %d0,%a0 4ac5c: 7016 moveq #22,%d0 4ac5e: 2080 movel %d0,%a0@ 4ac60: 6022 bras 4ac84 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 4ac62: 2039 0005 ef36 movel 5ef36 <_POSIX_signals_Pending>,%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4ac68: 2228 00cc movel %a0@(204),%d1 4ac6c: 4681 notl %d1 (api->signals_pending | _POSIX_signals_Pending) ) { 4ac6e: 80a8 00d0 orl %a0@(208),%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4ac72: c081 andl %d1,%d0 4ac74: 670c beqs 4ac82 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 4ac76: 7001 moveq #1,%d0 4ac78: 1740 0074 moveb %d0,%a3@(116) _Thread_Dispatch(); 4ac7c: 4eb9 0004 79ac jsr 479ac <_Thread_Dispatch> 4ac82: 4281 clrl %d1 } return 0; } 4ac84: 246e fff8 moveal %fp@(-8),%a2 4ac88: 2001 movel %d1,%d0 4ac8a: 266e fffc moveal %fp@(-4),%a3 4ac8e: 4e5e unlk %fp 4ac90: 4e75 rts ... 0004509c : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 4509c: 4e56 fff0 linkw %fp,#-16 450a0: 48d7 1c00 moveml %a2-%a4,%sp@ 450a4: 266e 0008 moveal %fp@(8),%a3 POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 450a8: 4a8b tstl %a3 450aa: 6762 beqs 4510e return EINVAL; switch ( pshared ) { 450ac: 4aae 000c tstl %fp@(12) 450b0: 665c bnes 4510e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 450b2: 2039 0005 dc74 movel 5dc74 <_Thread_Dispatch_disable_level>,%d0 450b8: 5280 addql #1,%d0 450ba: 23c0 0005 dc74 movel %d0,5dc74 <_Thread_Dispatch_disable_level> * This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) 450c0: 4879 0005 de94 pea 5de94 <_POSIX_Spinlock_Information> 450c6: 45f9 0004 768e lea 4768e <_Thread_Enable_dispatch>,%a2 450cc: 4eb9 0004 6ab8 jsr 46ab8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 450d2: 588f addql #4,%sp 450d4: 2840 moveal %d0,%a4 450d6: 4a80 tstl %d0 450d8: 6606 bnes 450e0 _Thread_Enable_dispatch(); 450da: 4e92 jsr %a2@ 450dc: 700b moveq #11,%d0 return EAGAIN; 450de: 6030 bras 45110 } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 450e0: 486e fffc pea %fp@(-4) 450e4: 486c 0010 pea %a4@(16) 450e8: 4eb9 0004 6558 jsr 46558 <_CORE_spinlock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 450ee: 202c 0008 movel %a4@(8),%d0 450f2: 4281 clrl %d1 450f4: 2079 0005 deac moveal 5deac <_POSIX_Spinlock_Information+0x18>,%a0 450fa: 3200 movew %d0,%d1 450fc: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45100: 42ac 000c clrl %a4@(12) _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 45104: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 45106: 4e92 jsr %a2@ return 0; 45108: 508f addql #8,%sp _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); 4510a: 4280 clrl %d0 return 0; 4510c: 6002 bras 45110 4510e: 7016 moveq #22,%d0 } 45110: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 45116: 4e5e unlk %fp 45118: 4e75 rts ... 00045190 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 45190: 4e56 fffc linkw %fp,#-4 45194: 206e 0008 moveal %fp@(8),%a0 45198: 2f02 movel %d2,%sp@- POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 4519a: 4a88 tstl %a0 4519c: 6742 beqs 451e0 4519e: 486e fffc pea %fp@(-4) 451a2: 2f10 movel %a0@,%sp@- 451a4: 4879 0005 de94 pea 5de94 <_POSIX_Spinlock_Information> 451aa: 4eb9 0004 6f04 jsr 46f04 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 451b0: 4fef 000c lea %sp@(12),%sp 451b4: 4aae fffc tstl %fp@(-4) 451b8: 6626 bnes 451e0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); 451ba: 42a7 clrl %sp@- 451bc: 2040 moveal %d0,%a0 451be: 42a7 clrl %sp@- 451c0: 4868 0010 pea %a0@(16) 451c4: 4eb9 0004 65c8 jsr 465c8 <_CORE_spinlock_Wait> 451ca: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 451cc: 4eb9 0004 768e jsr 4768e <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 451d2: 2f02 movel %d2,%sp@- 451d4: 4eb9 0004 5178 jsr 45178 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 451da: 4fef 0010 lea %sp@(16),%sp 451de: 6002 bras 451e2 451e0: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 451e2: 242e fff8 movel %fp@(-8),%d2 451e6: 4e5e unlk %fp 451e8: 4e75 rts ... 00045420 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 45420: 4e56 0000 linkw %fp,#0 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 45424: 2039 0005 dc6a movel 5dc6a <_ISR_Nest_level>,%d0 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 4542a: 2f02 movel %d2,%sp@- * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 4542c: 4a80 tstl %d0 4542e: 6646 bnes 45476 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 45430: 2079 0005 dc8a moveal 5dc8a <_Thread_Executing>,%a0 45436: 2039 0005 dbd0 movel 5dbd0 <_Thread_Dispatch_disable_level>,%d0 4543c: 5280 addql #1,%d0 4543e: 2068 010e moveal %a0@(270),%a0 45442: 23c0 0005 dbd0 movel %d0,5dbd0 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 45448: 4aa8 00d4 tstl %a0@(212) 4544c: 6704 beqs 45452 4544e: 4202 clrb %d2 <== NOT EXECUTED 45450: 6008 bras 4545a <== NOT EXECUTED /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); 45452: 4aa8 00dc tstl %a0@(220) 45456: 56c2 sne %d2 45458: 4482 negl %d2 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4545a: 4eb9 0004 772a jsr 4772a <_Thread_Enable_dispatch> if ( cancel ) 45460: 4a02 tstb %d2 45462: 6712 beqs 45476 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 45464: 4878 ffff pea ffffffff 45468: 2f39 0005 dc8a movel 5dc8a <_Thread_Executing>,%sp@- 4546e: 4eb9 0004 a594 jsr 4a594 <_POSIX_Thread_Exit> 45474: 508f addql #8,%sp <== NOT EXECUTED } 45476: 242e fffc movel %fp@(-4),%d2 4547a: 4e5e unlk %fp 4547c: 4e75 rts ... 00042484 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 42484: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42488: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4248a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED const char *p = s; for (p=s ; *p ; p++ ) 4248e: 6008 bras 42498 <== NOT EXECUTED BSP_output_char(*p); 42490: 49c0 extbl %d0 <== NOT EXECUTED 42492: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42494: 4e91 jsr %a1@ <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 42496: 588f addql #4,%sp <== NOT EXECUTED 42498: 2279 0005 bb40 moveal 5bb40 ,%a1 <== NOT EXECUTED 4249e: 1012 moveb %a2@,%d0 <== NOT EXECUTED 424a0: 528a addql #1,%a2 <== NOT EXECUTED 424a2: 66ec bnes 42490 <== NOT EXECUTED BSP_output_char(*p); BSP_output_char('\n'); 424a4: 700a moveq #10,%d0 <== NOT EXECUTED } 424a6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 424aa: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 424ae: 4e5e unlk %fp <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 424b0: 4ed1 jmp %a1@ <== NOT EXECUTED ... 00059414 : ssize_t read( int fd, void *buffer, size_t count ) { 59414: 4e56 fff4 linkw %fp,#-12 59418: 202e 000c movel %fp@(12),%d0 5941c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 59420: 242e 0008 movel %fp@(8),%d2 59424: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 59428: b4b9 0005 b434 cmpl 5b434 ,%d2 5942e: 6414 bccs 59444 iop = rtems_libio_iop( fd ); 59430: 2479 0005 cb34 moveal 5cb34 ,%a2 59436: ed8a lsll #6,%d2 59438: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 5943a: 242a 0014 movel %a2@(20),%d2 5943e: 0802 0008 btst #8,%d2 59442: 6610 bnes 59454 59444: 4eb9 0004 ca1c jsr 4ca1c <__errno> 5944a: 7409 moveq #9,%d2 5944c: 72ff moveq #-1,%d1 5944e: 2040 moveal %d0,%a0 59450: 2082 movel %d2,%a0@ 59452: 6060 bras 594b4 rtems_libio_check_buffer( buffer ); 59454: 4a80 tstl %d0 59456: 670a beqs 59462 rtems_libio_check_count( count ); 59458: 4a81 tstl %d1 5945a: 6758 beqs 594b4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5945c: 0802 0001 btst #1,%d2 59460: 6610 bnes 59472 59462: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 59468: 72ff moveq #-1,%d1 <== NOT EXECUTED 5946a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5946c: 7016 moveq #22,%d0 <== NOT EXECUTED 5946e: 2080 movel %d0,%a0@ <== NOT EXECUTED 59470: 6042 bras 594b4 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 59472: 206a 003c moveal %a2@(60),%a0 59476: 2068 0008 moveal %a0@(8),%a0 5947a: 4a88 tstl %a0 5947c: 6612 bnes 59490 rtems_set_errno_and_return_minus_one( ENOTSUP ); 5947e: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 59484: 72ff moveq #-1,%d1 <== NOT EXECUTED 59486: 2040 moveal %d0,%a0 <== NOT EXECUTED 59488: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 5948e: 6024 bras 594b4 <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 59490: 2f01 movel %d1,%sp@- 59492: 2f00 movel %d0,%sp@- 59494: 2f0a movel %a2,%sp@- 59496: 4e90 jsr %a0@ if ( rc > 0 ) 59498: 4fef 000c lea %sp@(12),%sp */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 5949c: 2200 movel %d0,%d1 if ( rc > 0 ) 5949e: 6f14 bles 594b4 iop->offset += rc; 594a0: 2600 movel %d0,%d3 594a2: 5bc2 smi %d2 594a4: 49c2 extbl %d2 594a6: d7aa 0010 addl %d3,%a2@(16) 594aa: 202a 000c movel %a2@(12),%d0 594ae: d182 addxl %d2,%d0 594b0: 2540 000c movel %d0,%a2@(12) return rc; } 594b4: 2001 movel %d1,%d0 594b6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 594bc: 4e5e unlk %fp 594be: 4e75 rts 00061758 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 61758: 4e56 ffe0 linkw %fp,#-32 6175c: 48d7 001c moveml %d2-%d4,%sp@ 61760: 282e 0008 movel %fp@(8),%d4 61764: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t loc; int result; if (!buf) 61768: 6612 bnes 6177c rtems_set_errno_and_return_minus_one( EFAULT ); 6176a: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 61770: 76ff moveq #-1,%d3 <== NOT EXECUTED 61772: 720e moveq #14,%d1 <== NOT EXECUTED 61774: 2040 moveal %d0,%a0 <== NOT EXECUTED 61776: 2081 movel %d1,%a0@ <== NOT EXECUTED 61778: 6000 00c2 braw 6183c <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 6177c: 2f04 movel %d4,%sp@- 6177e: 240e movel %fp,%d2 61780: 0682 ffff ffec addil #-20,%d2 61786: 4eb9 0007 c05c jsr 7c05c 6178c: 4297 clrl %sp@ 6178e: 2f02 movel %d2,%sp@- 61790: 42a7 clrl %sp@- 61792: 2f00 movel %d0,%sp@- 61794: 2f04 movel %d4,%sp@- 61796: 4eb9 0004 5772 jsr 45772 0, &loc, false ); if ( result != 0 ) 6179c: 4fef 0014 lea %sp@(20),%sp 617a0: 4a80 tstl %d0 617a2: 6706 beqs 617aa 617a4: 76ff moveq #-1,%d3 <== NOT EXECUTED 617a6: 6000 0094 braw 6183c <== NOT EXECUTED return -1; if ( !loc.ops->node_type_h ){ 617aa: 226e fff8 moveal %fp@(-8),%a1 617ae: 2069 0010 moveal %a1@(16),%a0 617b2: 4a88 tstl %a0 617b4: 6606 bnes 617bc rtems_filesystem_freenode( &loc ); 617b6: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 617ba: 603e bras 617fa <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 617bc: 2f02 movel %d2,%sp@- 617be: 4e90 jsr %a0@ 617c0: 206e fff8 moveal %fp@(-8),%a0 617c4: 588f addql #4,%sp 617c6: 7204 moveq #4,%d1 617c8: b280 cmpl %d0,%d1 617ca: 6722 beqs 617ee rtems_filesystem_freenode( &loc ); 617cc: 4a88 tstl %a0 617ce: 670e beqs 617de 617d0: 2068 001c moveal %a0@(28),%a0 617d4: 4a88 tstl %a0 617d6: 6706 beqs 617de 617d8: 2f02 movel %d2,%sp@- 617da: 4e90 jsr %a0@ 617dc: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 617de: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 617e4: 76ff moveq #-1,%d3 617e6: 2040 moveal %d0,%a0 617e8: 7016 moveq #22,%d0 617ea: 2080 movel %d0,%a0@ 617ec: 604e bras 6183c } if ( !loc.ops->readlink_h ){ 617ee: 2268 003c moveal %a0@(60),%a1 617f2: 4a89 tstl %a1 617f4: 6620 bnes 61816 rtems_filesystem_freenode( &loc ); 617f6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 617fa: 4a88 tstl %a0 <== NOT EXECUTED 617fc: 6706 beqs 61804 <== NOT EXECUTED 617fe: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61800: 4e90 jsr %a0@ <== NOT EXECUTED 61802: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61804: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 6180a: 76ff moveq #-1,%d3 <== NOT EXECUTED 6180c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6180e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61814: 6026 bras 6183c <== NOT EXECUTED } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 61816: 2f2e 0010 movel %fp@(16),%sp@- 6181a: 2f03 movel %d3,%sp@- 6181c: 2f02 movel %d2,%sp@- 6181e: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 61820: 206e fff8 moveal %fp@(-8),%a0 if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 61824: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 61826: 4fef 000c lea %sp@(12),%sp 6182a: 4a88 tstl %a0 6182c: 670e beqs 6183c 6182e: 2068 001c moveal %a0@(28),%a0 61832: 4a88 tstl %a0 61834: 6706 beqs 6183c 61836: 2f02 movel %d2,%sp@- 61838: 4e90 jsr %a0@ 6183a: 588f addql #4,%sp return result; } 6183c: 2003 movel %d3,%d0 6183e: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 61844: 4e5e unlk %fp 61846: 4e75 rts 0004404c : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 4404c: 4e56 ffe4 linkw %fp,#-28 44050: 202e 0008 movel %fp@(8),%d0 44054: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 44058: 266e 000c moveal %fp@(12),%a3 4405c: 262e 0010 movel %fp@(16),%d3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 44060: b0b9 0005 ec64 cmpl 5ec64 ,%d0 44066: 6414 bccs 4407c iop = rtems_libio_iop( fd ); 44068: 2479 0006 0b38 moveal 60b38 ,%a2 4406e: ed88 lsll #6,%d0 44070: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 44072: 202a 0014 movel %a2@(20),%d0 44076: 0800 0008 btst #8,%d0 4407a: 6612 bnes 4408e 4407c: 4eb9 0004 ead8 jsr 4ead8 <__errno> <== NOT EXECUTED 44082: 74ff moveq #-1,%d2 <== NOT EXECUTED 44084: 7209 moveq #9,%d1 <== NOT EXECUTED 44086: 2040 moveal %d0,%a0 <== NOT EXECUTED 44088: 2081 movel %d1,%a0@ <== NOT EXECUTED 4408a: 6000 00c2 braw 4414e <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4408e: 0800 0001 btst #1,%d0 44092: 674a beqs 440de /* * Argument validation on IO vector */ if ( !iov ) 44094: 4a8b tstl %a3 44096: 6746 beqs 440de rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 44098: 4a83 tstl %d3 4409a: 6f42 bles 440de rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 4409c: 0c83 0000 0400 cmpil #1024,%d3 440a2: 6e3a bgts 440de rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 440a4: 206a 003c moveal %a2@(60),%a0 440a8: 4aa8 0008 tstl %a0@(8) 440ac: 6614 bnes 440c2 rtems_set_errno_and_return_minus_one( ENOTSUP ); 440ae: 4eb9 0004 ead8 jsr 4ead8 <__errno> <== NOT EXECUTED 440b4: 74ff moveq #-1,%d2 <== NOT EXECUTED 440b6: 2040 moveal %d0,%a0 <== NOT EXECUTED 440b8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 440be: 6000 008e braw 4414e <== NOT EXECUTED 440c2: 204b moveal %a3,%a0 440c4: 4281 clrl %d1 440c6: 4280 clrl %d0 440c8: 7801 moveq #1,%d4 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 440ca: 5281 addql #1,%d1 ssize_t old; if ( !iov[v].iov_base ) 440cc: 4a90 tstl %a0@ 440ce: 670e beqs 440de if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 440d0: 2428 0004 movel %a0@(4),%d2 440d4: 2240 moveal %d0,%a1 440d6: d3c2 addal %d2,%a1 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 440d8: 5088 addql #8,%a0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 440da: b089 cmpl %a1,%d0 440dc: 6f10 bles 440ee rtems_set_errno_and_return_minus_one( EINVAL ); 440de: 4eb9 0004 ead8 jsr 4ead8 <__errno> 440e4: 74ff moveq #-1,%d2 440e6: 2040 moveal %d0,%a0 440e8: 7016 moveq #22,%d0 440ea: 2080 movel %d0,%a0@ 440ec: 6060 bras 4414e if ( iov[v].iov_len ) 440ee: 4a82 tstl %d2 440f0: 57c2 seq %d2 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 440f2: 2009 movel %a1,%d0 old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 440f4: c484 andl %d4,%d2 440f6: 1802 moveb %d2,%d4 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 440f8: b681 cmpl %d1,%d3 440fa: 6ece bgts 440ca /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 440fc: 4a02 tstb %d2 440fe: 6704 beqs 44104 44100: 4282 clrl %d2 44102: 604a bras 4414e 44104: 588b addql #4,%a3 44106: 4284 clrl %d4 44108: 4282 clrl %d2 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 4410a: 206a 003c moveal %a2@(60),%a0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4410e: 5284 addql #1,%d4 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 44110: 2f13 movel %a3@,%sp@- 44112: 2f2b fffc movel %a3@(-4),%sp@- 44116: 2f0a movel %a2,%sp@- 44118: 2068 0008 moveal %a0@(8),%a0 4411c: 4e90 jsr %a0@ if ( bytes < 0 ) 4411e: 4fef 000c lea %sp@(12),%sp 44122: 4a80 tstl %d0 44124: 6c04 bges 4412a 44126: 74ff moveq #-1,%d2 <== NOT EXECUTED 44128: 6024 bras 4414e <== NOT EXECUTED return -1; if ( bytes > 0 ) { 4412a: 4a80 tstl %d0 4412c: 6716 beqs 44144 iop->offset += bytes; total += bytes; 4412e: d480 addl %d0,%d2 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 44130: 2c00 movel %d0,%d6 44132: 5bc5 smi %d5 44134: 49c5 extbl %d5 44136: ddaa 0010 addl %d6,%a2@(16) 4413a: 222a 000c movel %a2@(12),%d1 4413e: d385 addxl %d5,%d1 44140: 2541 000c movel %d1,%a2@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 44144: b093 cmpl %a3@,%d0 44146: 6606 bnes 4414e } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44148: 508b addql #8,%a3 4414a: b684 cmpl %d4,%d3 4414c: 6ebc bgts 4410a if (bytes != iov[ v ].iov_len) break; } return total; } 4414e: 2002 movel %d2,%d0 44150: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 44156: 4e5e unlk %fp 44158: 4e75 rts ... 00059540 : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 59540: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 59542: 4e56 fff0 linkw %fp,#-16 59546: 52b9 0005 cb50 addql #1,5cb50 5954c: 48d7 001c moveml %d2-%d4,%sp@ 59550: 242e 0008 movel %fp@(8),%d2 59554: 262e 000c movel %fp@(12),%d3 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 59558: b0b9 0005 ce1c cmpl 5ce1c <_System_state_Current>,%d0 5955e: 6614 bnes 59574 if (_Thread_Dispatch_disable_level > 0) 59560: 2039 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d0 59566: 6600 00aa bnew 59612 return (void *) 0; if (_ISR_Nest_level > 0) 5956a: 2039 0005 cd2e movel 5cd2e <_ISR_Nest_level>,%d0 59570: 6600 00a0 bnew 59612 } /* * Continue with realloc(). */ if ( !ptr ) 59574: 4a82 tstl %d2 59576: 660c bnes 59584 return malloc( size ); 59578: 2f03 movel %d3,%sp@- 5957a: 4eb9 0004 941c jsr 4941c 59580: 2400 movel %d0,%d2 59582: 600e bras 59592 if ( !size ) { 59584: 4a83 tstl %d3 59586: 660e bnes 59596 free( ptr ); 59588: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5958a: 4282 clrl %d2 <== NOT EXECUTED 5958c: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED return (void *) 0; 59592: 588f addql #4,%sp 59594: 607e bras 59614 } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 59596: 486e fffc pea %fp@(-4) 5959a: 2f02 movel %d2,%sp@- 5959c: 2f39 0005 b440 movel 5b440 ,%sp@- 595a2: 4eb9 0005 96cc jsr 596cc <_Protected_heap_Get_block_size> 595a8: 4fef 000c lea %sp@(12),%sp 595ac: 4a00 tstb %d0 595ae: 6610 bnes 595c0 errno = EINVAL; 595b0: 4eb9 0004 ca1c jsr 4ca1c <__errno> 595b6: 4282 clrl %d2 595b8: 2040 moveal %d0,%a0 595ba: 7016 moveq #22,%d0 595bc: 2080 movel %d0,%a0@ return (void *) 0; 595be: 6054 bras 59614 #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { 595c0: 2f03 movel %d3,%sp@- 595c2: 2f02 movel %d2,%sp@- 595c4: 2f39 0005 b440 movel 5b440 ,%sp@- 595ca: 4eb9 0005 9708 jsr 59708 <_Protected_heap_Resize_block> 595d0: 4fef 000c lea %sp@(12),%sp 595d4: 4a00 tstb %d0 595d6: 663c bnes 59614 * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 595d8: 2f03 movel %d3,%sp@- 595da: 4eb9 0004 941c jsr 4941c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 595e0: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 595e2: 53b9 0005 cb44 subql #1,5cb44 * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 595e8: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 595ea: 6726 beqs 59612 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 595ec: 202e fffc movel %fp@(-4),%d0 595f0: b083 cmpl %d3,%d0 595f2: 6402 bccs 595f6 595f4: 2600 movel %d0,%d3 595f6: 2f03 movel %d3,%sp@- 595f8: 2f02 movel %d2,%sp@- 595fa: 2f04 movel %d4,%sp@- 595fc: 4eb9 0004 d23c jsr 4d23c free( ptr ); 59602: 2f02 movel %d2,%sp@- 59604: 2404 movel %d4,%d2 59606: 4eb9 0004 8f48 jsr 48f48 return new_area; 5960c: 4fef 0010 lea %sp@(16),%sp 59610: 6002 bras 59614 59612: 4282 clrl %d2 } 59614: 2002 movel %d2,%d0 59616: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5961c: 4e5e unlk %fp 5961e: 4e75 rts 00061848 : #include int rmdir( const char *pathname ) { 61848: 4e56 ffc0 linkw %fp,#-64 6184c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 61850: 246e 0008 moveal %fp@(8),%a2 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 61854: 2f0a movel %a2,%sp@- 61856: 4eb9 0004 565c jsr 4565c if ( parentpathlen == 0 ) 6185c: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 6185e: 2a00 movel %d0,%d5 if ( parentpathlen == 0 ) 61860: 664a bnes 618ac rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 61862: 742f moveq #47,%d2 61864: 1012 moveb %a2@,%d0 61866: 1200 moveb %d0,%d1 61868: 49c1 extbl %d1 6186a: b481 cmpl %d1,%d2 6186c: 670c beqs 6187a 6186e: 143c 005c moveb #92,%d2 <== NOT EXECUTED 61872: b481 cmpl %d1,%d2 <== NOT EXECUTED 61874: 6704 beqs 6187a <== NOT EXECUTED 61876: 4a00 tstb %d0 <== NOT EXECUTED 61878: 6612 bnes 6188c <== NOT EXECUTED 6187a: 4878 0014 pea 14 6187e: 2079 0009 717c moveal 9717c ,%a0 61884: 41e8 0018 lea %a0@(24),%a0 61888: 2f08 movel %a0,%sp@- 6188a: 600e bras 6189a 6188c: 4878 0014 pea 14 <== NOT EXECUTED 61890: 2039 0009 717c movel 9717c ,%d0 <== NOT EXECUTED 61896: 5880 addql #4,%d0 <== NOT EXECUTED 61898: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6189a: 486e ffec pea %fp@(-20) 6189e: 4203 clrb %d3 618a0: 4eb9 0007 8fec jsr 78fec 618a6: 4fef 000c lea %sp@(12),%sp 618aa: 6020 bras 618cc else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 618ac: 42a7 clrl %sp@- 618ae: 486e ffec pea %fp@(-20) 618b2: 4878 0002 pea 2 618b6: 2f00 movel %d0,%sp@- 618b8: 2f0a movel %a2,%sp@- 618ba: 4eb9 0004 5772 jsr 45772 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 618c0: 4fef 0014 lea %sp@(20),%sp 618c4: 4a80 tstl %d0 618c6: 6600 0168 bnew 61a30 618ca: 7601 moveq #1,%d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 618cc: 4878 0014 pea 14 618d0: 280e movel %fp,%d4 618d2: 0684 ffff ffec addil #-20,%d4 618d8: 240e movel %fp,%d2 618da: 0682 ffff ffd8 addil #-40,%d2 name = pathname + parentpathlen; 618e0: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 618e2: 47f9 0007 c05c lea 7c05c ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 618e8: 2f04 movel %d4,%sp@- 618ea: 2f02 movel %d2,%sp@- 618ec: 4eb9 0007 8fec jsr 78fec name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 618f2: 2f0a movel %a2,%sp@- 618f4: 4e93 jsr %a3@ 618f6: 2e80 movel %d0,%sp@ 618f8: 2f0a movel %a2,%sp@- 618fa: 4eb9 0004 5624 jsr 45624 61900: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 61902: 2f0a movel %a2,%sp@- 61904: 4e93 jsr %a3@ 61906: 4297 clrl %sp@ 61908: 2f02 movel %d2,%sp@- 6190a: 42a7 clrl %sp@- 6190c: 2f00 movel %d0,%sp@- 6190e: 2f0a movel %a2,%sp@- 61910: 4eb9 0004 56a2 jsr 456a2 0, &loc, false ); if ( result != 0 ) { 61916: 4fef 0028 lea %sp@(40),%sp 6191a: 4a80 tstl %d0 6191c: 6722 beqs 61940 if ( free_parentloc ) 6191e: 4a03 tstb %d3 61920: 6700 010e beqw 61a30 rtems_filesystem_freenode( &parentloc ); 61924: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 61928: 4a88 tstl %a0 <== NOT EXECUTED 6192a: 6700 0104 beqw 61a30 <== NOT EXECUTED 6192e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61932: 4a88 tstl %a0 <== NOT EXECUTED 61934: 6700 00fa beqw 61a30 <== NOT EXECUTED 61938: 2f04 movel %d4,%sp@- <== NOT EXECUTED 6193a: 78ff moveq #-1,%d4 <== NOT EXECUTED 6193c: 6000 00ec braw 61a2a <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 61940: 226e ffe4 moveal %fp@(-28),%a1 61944: 2069 0010 moveal %a1@(16),%a0 61948: 4a88 tstl %a0 6194a: 6606 bnes 61952 rtems_filesystem_freenode( &loc ); 6194c: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 61950: 6068 bras 619ba <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 61952: 2f02 movel %d2,%sp@- 61954: 4e90 jsr %a0@ 61956: 588f addql #4,%sp 61958: 7201 moveq #1,%d1 6195a: b280 cmpl %d0,%d1 6195c: 6744 beqs 619a2 rtems_filesystem_freenode( &loc ); 6195e: 206e ffe4 moveal %fp@(-28),%a0 61962: 4a88 tstl %a0 61964: 670e beqs 61974 61966: 2068 001c moveal %a0@(28),%a0 6196a: 4a88 tstl %a0 6196c: 6706 beqs 61974 6196e: 2f02 movel %d2,%sp@- 61970: 4e90 jsr %a0@ 61972: 588f addql #4,%sp if ( free_parentloc ) 61974: 4a03 tstb %d3 61976: 6718 beqs 61990 rtems_filesystem_freenode( &parentloc ); 61978: 206e fff8 moveal %fp@(-8),%a0 6197c: 4a88 tstl %a0 6197e: 6710 beqs 61990 61980: 2068 001c moveal %a0@(28),%a0 61984: 4a88 tstl %a0 61986: 6708 beqs 61990 61988: 486e ffec pea %fp@(-20) 6198c: 4e90 jsr %a0@ 6198e: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 61990: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 61996: 78ff moveq #-1,%d4 61998: 2040 moveal %d0,%a0 6199a: 7014 moveq #20,%d0 6199c: 2080 movel %d0,%a0@ 6199e: 6000 0092 braw 61a32 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 619a2: 206e ffe0 moveal %fp@(-32),%a0 619a6: 2068 0034 moveal %a0@(52),%a0 619aa: 4a88 tstl %a0 619ac: 6644 bnes 619f2 rtems_filesystem_freenode( &loc ); 619ae: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 619b2: 4a88 tstl %a0 <== NOT EXECUTED 619b4: 670e beqs 619c4 <== NOT EXECUTED 619b6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 619ba: 4a88 tstl %a0 <== NOT EXECUTED 619bc: 6706 beqs 619c4 <== NOT EXECUTED 619be: 2f02 movel %d2,%sp@- <== NOT EXECUTED 619c0: 4e90 jsr %a0@ <== NOT EXECUTED 619c2: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 619c4: 4a03 tstb %d3 <== NOT EXECUTED 619c6: 6718 beqs 619e0 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 619c8: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 619cc: 4a88 tstl %a0 <== NOT EXECUTED 619ce: 6710 beqs 619e0 <== NOT EXECUTED 619d0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 619d4: 4a88 tstl %a0 <== NOT EXECUTED 619d6: 6708 beqs 619e0 <== NOT EXECUTED 619d8: 486e ffec pea %fp@(-20) <== NOT EXECUTED 619dc: 4e90 jsr %a0@ <== NOT EXECUTED 619de: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 619e0: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 619e6: 78ff moveq #-1,%d4 <== NOT EXECUTED 619e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 619ea: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 619f0: 6040 bras 61a32 <== NOT EXECUTED } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 619f2: 2f02 movel %d2,%sp@- 619f4: 2f04 movel %d4,%sp@- 619f6: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 619f8: 206e ffe4 moveal %fp@(-28),%a0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 619fc: 2800 movel %d0,%d4 rtems_filesystem_freenode( &loc ); 619fe: 508f addql #8,%sp 61a00: 4a88 tstl %a0 61a02: 670e beqs 61a12 61a04: 2068 001c moveal %a0@(28),%a0 61a08: 4a88 tstl %a0 61a0a: 6706 beqs 61a12 61a0c: 2f02 movel %d2,%sp@- 61a0e: 4e90 jsr %a0@ 61a10: 588f addql #4,%sp if ( free_parentloc ) 61a12: 4a03 tstb %d3 61a14: 671c beqs 61a32 rtems_filesystem_freenode( &parentloc ); 61a16: 206e fff8 moveal %fp@(-8),%a0 61a1a: 4a88 tstl %a0 61a1c: 6714 beqs 61a32 61a1e: 2068 001c moveal %a0@(28),%a0 61a22: 4a88 tstl %a0 61a24: 670c beqs 61a32 61a26: 486e ffec pea %fp@(-20) 61a2a: 4e90 jsr %a0@ 61a2c: 588f addql #4,%sp 61a2e: 6002 bras 61a32 61a30: 78ff moveq #-1,%d4 return result; } 61a32: 2004 movel %d4,%d0 61a34: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 61a3a: 4e5e unlk %fp 61a3c: 4e75 rts ... 0004b698 : uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4b698: 4e56 0000 linkw %fp,#0 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 4b69c: 2f2e 000c movel %fp@(12),%sp@- 4b6a0: 2f2e 0008 movel %fp@(8),%sp@- 4b6a4: 4eb9 0004 b6cc jsr 4b6cc if (nap) 4b6aa: 508f addql #8,%sp 4b6ac: 4a80 tstl %d0 4b6ae: 6706 beqs 4b6b6 return nap->local_value; 4b6b0: 2040 moveal %d0,%a0 4b6b2: 2028 0004 movel %a0@(4),%d0 return 0; } 4b6b6: 4e5e unlk %fp 4b6b8: 4e75 rts ... 0004b654 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4b654: 4e56 ffe8 linkw %fp,#-24 4b658: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4b65c: 2c2e 0008 movel %fp@(8),%d6 4b660: 4284 clrl %d4 4b662: 4283 clrl %d3 4b664: 7401 moveq #1,%d2 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4b666: 45f9 0004 b698 lea 4b698 ,%a2 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4b66c: 2a2e 000c movel %fp@(12),%d5 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) 4b670: 2002 movel %d2,%d0 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4b672: 5284 addql #1,%d4 if (b & remote_value) 4b674: c085 andl %d5,%d0 4b676: 670a beqs 4b682 local_value |= rtems_assoc_local_by_remote(ap, b); 4b678: 2f02 movel %d2,%sp@- 4b67a: 2f06 movel %d6,%sp@- 4b67c: 4e92 jsr %a2@ 4b67e: 508f addql #8,%sp 4b680: 8680 orl %d0,%d3 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4b682: 7020 moveq #32,%d0 4b684: d482 addl %d2,%d2 4b686: b084 cmpl %d4,%d0 4b688: 66e6 bnes 4b670 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 4b68a: 2003 movel %d3,%d0 4b68c: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4b692: 4e5e unlk %fp 4b694: 4e75 rts ... 0004b6bc : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4b6bc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 4b6c0: 203c 0005 b5d4 movel #374228,%d0 <== NOT EXECUTED 4b6c6: 4e5e unlk %fp <== NOT EXECUTED 4b6c8: 4e75 rts <== NOT EXECUTED ... 00048de0 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 48de0: 4e56 0000 linkw %fp,#0 48de4: 2f02 movel %d2,%sp@- 48de6: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 48dea: 2f02 movel %d2,%sp@- 48dec: 2f2e 0008 movel %fp@(8),%sp@- 48df0: 4eb9 0004 8e18 jsr 48e18 if (nap) 48df6: 508f addql #8,%sp 48df8: 4a80 tstl %d0 48dfa: 670c beqs 48e08 return nap->name; return rtems_assoc_name_bad(local_value); } 48dfc: 2040 moveal %d0,%a0 48dfe: 242e fffc movel %fp@(-4),%d2 48e02: 4e5e unlk %fp 48e04: 2010 movel %a0@,%d0 48e06: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 48e08: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 48e0c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48e10: 4e5e unlk %fp <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 48e12: 4ef9 0004 b6bc jmp 4b6bc <== NOT EXECUTED 00048e18 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 48e18: 4e56 0000 linkw %fp,#0 48e1c: 2f0a movel %a2,%sp@- 48e1e: 246e 0008 moveal %fp@(8),%a2 48e22: 2f02 movel %d2,%sp@- 48e24: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 48e28: 2012 movel %a2@,%d0 48e2a: 6718 beqs 48e44 48e2c: 4879 0005 a6c6 pea 5a6c6 48e32: 2f00 movel %d0,%sp@- 48e34: 4eb9 0004 d924 jsr 4d924 48e3a: 508f addql #8,%sp 48e3c: 4a80 tstl %d0 48e3e: 6604 bnes 48e44 default_ap = ap++; 48e40: 200a movel %a2,%d0 <== NOT EXECUTED 48e42: 600a bras 48e4e <== NOT EXECUTED 48e44: 4280 clrl %d0 48e46: 600a bras 48e52 for ( ; ap->name; ap++) if (ap->local_value == local_value) 48e48: b4aa 0004 cmpl %a2@(4),%d2 48e4c: 670a beqs 48e58 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 48e4e: 45ea 000c lea %a2@(12),%a2 48e52: 4a92 tstl %a2@ 48e54: 66f2 bnes 48e48 48e56: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 48e58: 200a movel %a2,%d0 48e5a: 242e fff8 movel %fp@(-8),%d2 48e5e: 246e fffc moveal %fp@(-4),%a2 48e62: 4e5e unlk %fp 48e64: 4e75 rts ... 0004b6cc : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4b6cc: 4e56 0000 linkw %fp,#0 4b6d0: 2f0a movel %a2,%sp@- 4b6d2: 246e 0008 moveal %fp@(8),%a2 4b6d6: 2f02 movel %d2,%sp@- 4b6d8: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4b6dc: 2012 movel %a2@,%d0 4b6de: 6718 beqs 4b6f8 4b6e0: 4879 0005 a6c6 pea 5a6c6 4b6e6: 2f00 movel %d0,%sp@- 4b6e8: 4eb9 0004 d924 jsr 4d924 4b6ee: 508f addql #8,%sp 4b6f0: 4a80 tstl %d0 4b6f2: 6604 bnes 4b6f8 default_ap = ap++; 4b6f4: 200a movel %a2,%d0 <== NOT EXECUTED 4b6f6: 600a bras 4b702 <== NOT EXECUTED 4b6f8: 4280 clrl %d0 4b6fa: 600a bras 4b706 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4b6fc: b4aa 0008 cmpl %a2@(8),%d2 4b700: 670a beqs 4b70c const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4b702: 45ea 000c lea %a2@(12),%a2 4b706: 4a92 tstl %a2@ 4b708: 66f2 bnes 4b6fc 4b70a: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4b70c: 200a movel %a2,%d0 4b70e: 242e fff8 movel %fp@(-8),%d2 4b712: 246e fffc moveal %fp@(-4),%a2 4b716: 4e5e unlk %fp 4b718: 4e75 rts ... 0004c308 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4c308: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4c30c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4c310: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4c314: 4eb9 0004 8e18 jsr 48e18 <== NOT EXECUTED if (nap) 4c31a: 508f addql #8,%sp <== NOT EXECUTED 4c31c: 4a80 tstl %d0 <== NOT EXECUTED 4c31e: 6706 beqs 4c326 <== NOT EXECUTED return nap->remote_value; 4c320: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c322: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4c326: 4e5e unlk %fp <== NOT EXECUTED 4c328: 4e75 rts <== NOT EXECUTED ... 0004ba48 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4ba48: 4e56 ffe4 linkw %fp,#-28 4ba4c: 202e 0010 movel %fp@(16),%d0 4ba50: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4ba54: 242e 0008 movel %fp@(8),%d2 4ba58: 262e 000c movel %fp@(12),%d3 4ba5c: 266e 0014 moveal %fp@(20),%a3 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4ba60: 4a82 tstl %d2 4ba62: 6606 bnes 4ba6a 4ba64: 7003 moveq #3,%d0 4ba66: 6000 0088 braw 4baf0 return RTEMS_INVALID_NAME; if ( !id ) 4ba6a: 4a8b tstl %a3 4ba6c: 6604 bnes 4ba72 4ba6e: 7009 moveq #9,%d0 4ba70: 607e bras 4baf0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4ba72: 0803 0004 btst #4,%d3 4ba76: 6710 beqs 4ba88 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4ba78: 4a80 tstl %d0 4ba7a: 6606 bnes 4ba82 4ba7c: 103c 000a moveb #10,%d0 4ba80: 606e bras 4baf0 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4ba82: 42ae fff8 clrl %fp@(-8) 4ba86: 6006 bras 4ba8e if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 4ba88: 7201 moveq #1,%d1 4ba8a: 2d41 fff8 movel %d1,%fp@(-8) 4ba8e: 2239 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d1 4ba94: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4ba96: 2d40 fffc movel %d0,%fp@(-4) 4ba9a: 23c1 0005 cc94 movel %d1,5cc94 <_Thread_Dispatch_disable_level> * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 4baa0: 4879 0005 d528 pea 5d528 <_Barrier_Information> 4baa6: 45f9 0004 6ce2 lea 46ce2 <_Thread_Enable_dispatch>,%a2 4baac: 4eb9 0004 609c jsr 4609c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4bab2: 588f addql #4,%sp 4bab4: 2840 moveal %d0,%a4 4bab6: 4a80 tstl %d0 4bab8: 6606 bnes 4bac0 _Thread_Enable_dispatch(); 4baba: 4e92 jsr %a2@ 4babc: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4babe: 6030 bras 4baf0 } the_barrier->attribute_set = attribute_set; 4bac0: 2943 0010 movel %d3,%a4@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4bac4: 486e fff8 pea %fp@(-8) 4bac8: 486c 0014 pea %a4@(20) 4bacc: 4eb9 0004 bf0c jsr 4bf0c <_CORE_barrier_Initialize> 4bad2: 202c 0008 movel %a4@(8),%d0 4bad6: 4281 clrl %d1 4bad8: 2079 0005 d540 moveal 5d540 <_Barrier_Information+0x18>,%a0 4bade: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4bae0: 2942 000c movel %d2,%a4@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4bae4: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4bae8: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 4baea: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 4baec: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4baee: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4baf0: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 4baf6: 4e5e unlk %fp 4baf8: 4e75 rts ... 0004bafc : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 4bafc: 4e56 fffc linkw %fp,#-4 4bb00: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4bb02: 486e fffc pea %fp@(-4) 4bb06: 2f2e 0008 movel %fp@(8),%sp@- 4bb0a: 4879 0005 d528 pea 5d528 <_Barrier_Information> 4bb10: 4eb9 0004 64e8 jsr 464e8 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4bb16: 4fef 000c lea %sp@(12),%sp 4bb1a: 2440 moveal %d0,%a2 4bb1c: 4aae fffc tstl %fp@(-4) 4bb20: 6704 beqs 4bb26 4bb22: 7004 moveq #4,%d0 4bb24: 6038 bras 4bb5e case OBJECTS_LOCAL: _CORE_barrier_Flush( 4bb26: 4878 0002 pea 2 4bb2a: 42a7 clrl %sp@- 4bb2c: 486a 0014 pea %a2@(20) 4bb30: 4eb9 0004 7368 jsr 47368 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 4bb36: 2f0a movel %a2,%sp@- 4bb38: 4879 0005 d528 pea 5d528 <_Barrier_Information> 4bb3e: 4eb9 0004 611c jsr 4611c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4bb44: 2f0a movel %a2,%sp@- 4bb46: 4879 0005 d528 pea 5d528 <_Barrier_Information> 4bb4c: 4eb9 0004 6390 jsr 46390 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4bb52: 4eb9 0004 6ce2 jsr 46ce2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4bb58: 4fef 001c lea %sp@(28),%sp _Objects_Close( &_Barrier_Information, &the_barrier->Object ); _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4bb5c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4bb5e: 246e fff8 moveal %fp@(-8),%a2 4bb62: 4e5e unlk %fp 4bb64: 4e75 rts ... 0004bb68 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 4bb68: 4e56 fffc linkw %fp,#-4 4bb6c: 2f0a movel %a2,%sp@- 4bb6e: 246e 000c moveal %fp@(12),%a2 4bb72: 2f02 movel %d2,%sp@- 4bb74: 242e 0008 movel %fp@(8),%d2 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4bb78: 4a8a tstl %a2 4bb7a: 6604 bnes 4bb80 4bb7c: 7009 moveq #9,%d0 4bb7e: 603e bras 4bbbe RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4bb80: 486e fffc pea %fp@(-4) 4bb84: 2f02 movel %d2,%sp@- 4bb86: 4879 0005 d528 pea 5d528 <_Barrier_Information> 4bb8c: 4eb9 0004 64e8 jsr 464e8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4bb92: 4fef 000c lea %sp@(12),%sp 4bb96: 4aae fffc tstl %fp@(-4) 4bb9a: 6704 beqs 4bba0 4bb9c: 7004 moveq #4,%d0 4bb9e: 601e bras 4bbbe case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 4bba0: 42a7 clrl %sp@- 4bba2: 2040 moveal %d0,%a0 4bba4: 2f02 movel %d2,%sp@- 4bba6: 4868 0014 pea %a0@(20) 4bbaa: 4eb9 0004 bf48 jsr 4bf48 <_CORE_barrier_Release> 4bbb0: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4bbb2: 4eb9 0004 6ce2 jsr 46ce2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4bbb8: 4fef 000c lea %sp@(12),%sp the_barrier = _Barrier_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); _Thread_Enable_dispatch(); 4bbbc: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4bbbe: 242e fff4 movel %fp@(-12),%d2 4bbc2: 246e fff8 moveal %fp@(-8),%a2 4bbc6: 4e5e unlk %fp 4bbc8: 4e75 rts ... 00042130 : #include extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get(void) { 42130: 4e56 0000 linkw %fp,#0 return bsp_boot_cmdline; } 42134: 2039 0005 d680 movel 5d680 ,%d0 4213a: 4e5e unlk %fp 4213c: 4e75 rts ... 00042140 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 42140: 4e56 ffe8 linkw %fp,#-24 42144: 202e 0008 movel %fp@(8),%d0 42148: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4214c: 246e 000c moveal %fp@(12),%a2 42150: 242e 0010 movel %fp@(16),%d2 const char *p; if ( !name ) 42154: 4a80 tstl %d0 42156: 6756 beqs 421ae return NULL; if ( !value ) 42158: 4a8a tstl %a2 4215a: 6754 beqs 421b0 return NULL; if ( !length ) 4215c: 4a82 tstl %d2 4215e: 674e beqs 421ae return NULL; value[0] = '\0'; 42160: 4212 clrb %a2@ p = rtems_bsp_cmdline_get_param_raw( name ); 42162: 2f00 movel %d0,%sp@- 42164: 4eb9 0004 21bc jsr 421bc if ( !p ) 4216a: 588f addql #4,%sp 4216c: 4a80 tstl %d0 4216e: 673e beqs 421ae int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; 4217e: 5283 addql #1,%d3 42180: 600c bras 4218e } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42182: 0803 0000 btst #0,%d3 42186: 6606 bnes 4218e 42188: 7c20 moveq #32,%d6 4218a: bc85 cmpl %d5,%d6 4218c: 6722 beqs 421b0 break; value[i++] = *p++; 4218e: 1584 1800 moveb %d4,%a2@(00000000,%d1:l) value[i] = '\0'; 42192: 4204 clrb %d4 for (i=0 ; *p && i 421a8: b481 cmpl %d1,%d2 421aa: 62cc bhis 42178 421ac: 6002 bras 421b0 <== NOT EXECUTED 421ae: 95ca subal %a2,%a2 return NULL; copy_string( p, value, length ); return value; } 421b0: 200a movel %a2,%d0 421b2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 421b8: 4e5e unlk %fp 421ba: 4e75 rts 000421bc : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 421bc: 4e56 0000 linkw %fp,#0 421c0: 222e 0008 movel %fp@(8),%d1 const char *p; if ( !name ) 421c4: 6716 beqs 421dc return NULL; if ( !bsp_boot_cmdline ) 421c6: 2039 0005 d680 movel 5d680 ,%d0 421cc: 670e beqs 421dc return NULL; p = strstr(bsp_boot_cmdline, name); 421ce: 2f01 movel %d1,%sp@- 421d0: 2f00 movel %d0,%sp@- 421d2: 4eb9 0004 e6d8 jsr 4e6d8 421d8: 508f addql #8,%sp /* printf( "raw: %p (%s)\n", p, p ); */ return p; 421da: 6002 bras 421de 421dc: 4280 clrl %d0 } 421de: 4e5e unlk %fp 421e0: 4e75 rts ... 000421e4 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421e4: 4e56 fff4 linkw %fp,#-12 421e8: 48d7 001c moveml %d2-%d4,%sp@ const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 421ec: 2f2e 0010 movel %fp@(16),%sp@- const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421f0: 242e 000c movel %fp@(12),%d2 421f4: 282e 0008 movel %fp@(8),%d4 const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 421f8: 2f02 movel %d2,%sp@- 421fa: 2f04 movel %d4,%sp@- 421fc: 4eb9 0004 2140 jsr 42140 if ( !p ) 42202: 4fef 000c lea %sp@(12),%sp { const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 42206: 2600 movel %d0,%d3 if ( !p ) 42208: 6746 beqs 42250 return NULL; rhs = &p[strlen(name)]; 4220a: 2f04 movel %d4,%sp@- 4220c: 4eb9 0004 e1d0 jsr 4e1d0 42212: 588f addql #4,%sp 42214: 2043 moveal %d3,%a0 42216: d1c0 addal %d0,%a0 if ( *rhs != '=' ) 42218: 723d moveq #61,%d1 4221a: 1010 moveb %a0@,%d0 4221c: 49c0 extbl %d0 4221e: b280 cmpl %d0,%d1 42220: 662e bnes 42250 return NULL; rhs++; 42222: 5288 addql #1,%a0 if ( *rhs == '\"' ) 42224: 123c 0022 moveb #34,%d1 42228: 1010 moveb %a0@,%d0 4222a: 49c0 extbl %d0 4222c: b280 cmpl %d0,%d1 4222e: 6602 bnes 42232 rhs++; 42230: 5288 addql #1,%a0 42232: 2242 moveal %d2,%a1 42234: 6002 bras 42238 for ( d=value ; *rhs ; ) *d++ = *rhs++; 42236: 12c0 moveb %d0,%a1@+ return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42238: 1010 moveb %a0@,%d0 *d++ = *rhs++; 4223a: 5288 addql #1,%a0 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 4223c: 66f8 bnes 42236 *d++ = *rhs++; if ( *(d-1) == '\"' ) 4223e: 2049 moveal %a1,%a0 42240: 7222 moveq #34,%d1 42242: 1020 moveb %a0@-,%d0 42244: 49c0 extbl %d0 42246: b280 cmpl %d0,%d1 42248: 6602 bnes 4224c 4224a: 2248 moveal %a0,%a1 d--; *d = '\0'; 4224c: 4211 clrb %a1@ return value; 4224e: 6002 bras 42252 42250: 4282 clrl %d2 } 42252: 2002 movel %d2,%d0 42254: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4225a: 4e5e unlk %fp 4225c: 4e75 rts ... 00046438 : uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { 46438: 7218 moveq #24,%d1 4643a: 4e56 0000 linkw %fp,#0 4643e: 202e 000c movel %fp@(12),%d0 46442: 2f02 movel %d2,%sp@- 46444: 242e 0008 movel %fp@(8),%d2 46448: e3aa lsll %d1,%d2 4644a: 123c 001b moveb #27,%d1 4644e: e3a8 lsll %d1,%d0 46450: 222e 0010 movel %fp@(16),%d1 46454: 8082 orl %d2,%d0 46456: 4841 swap %d1 46458: 4241 clrw %d1 return _Objects_Build_id( api, class, node, index ); } 4645a: 241f movel %sp@+,%d2 uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { 4645c: 80ae 0014 orl %fp@(20),%d0 return _Objects_Build_id( api, class, node, index ); } 46460: 4e5e unlk %fp 46462: 8081 orl %d1,%d0 46464: 4e75 rts ... 00048920 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 48920: 4e56 0000 linkw %fp,#0 48924: 202e 0008 movel %fp@(8),%d0 48928: 2f0a movel %a2,%sp@- 4892a: 246e 000c moveal %fp@(12),%a2 if ( !time_buffer ) 4892e: 4a8a tstl %a2 48930: 6604 bnes 48936 48932: 7209 moveq #9,%d1 48934: 6066 bras 4899c return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 48936: 4a80 tstl %d0 48938: 6610 bnes 4894a return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 4893a: 2d4a 0008 movel %a2,%fp@(8) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 4893e: 246e fffc moveal %fp@(-4),%a2 48942: 4e5e unlk %fp { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 48944: 4ef9 0004 89f8 jmp 489f8 if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 4894a: 7201 moveq #1,%d1 4894c: b280 cmpl %d0,%d1 4894e: 6610 bnes 48960 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 48950: 2d4a 0008 movel %a2,%fp@(8) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 48954: 246e fffc moveal %fp@(-4),%a2 48958: 4e5e unlk %fp if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 4895a: 4ef9 0004 89a8 jmp 489a8 if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 48960: 7202 moveq #2,%d1 48962: b280 cmpl %d0,%d1 48964: 6608 bnes 4896e rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 48966: 4eb9 0004 89e8 jsr 489e8 4896c: 600c bras 4897a return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 4896e: 7203 moveq #3,%d1 48970: b280 cmpl %d0,%d1 48972: 660c bnes 48980 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 48974: 4eb9 0004 89d0 jsr 489d0 4897a: 2480 movel %d0,%a2@ 4897c: 4281 clrl %d1 return RTEMS_SUCCESSFUL; 4897e: 601c bras 4899c } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 48980: 7204 moveq #4,%d1 48982: b280 cmpl %d0,%d1 48984: 6706 beqs 4898c 48986: 123c 000a moveb #10,%d1 4898a: 6010 bras 4899c return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 4898c: 2d4a 0008 movel %a2,%fp@(8) return RTEMS_INVALID_NUMBER; } 48990: 246e fffc moveal %fp@(-4),%a2 48994: 4e5e unlk %fp *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 48996: 4ef9 0004 8aac jmp 48aac return RTEMS_INVALID_NUMBER; } 4899c: 246e fffc moveal %fp@(-4),%a2 489a0: 2001 movel %d1,%d0 489a2: 4e5e unlk %fp 489a4: 4e75 rts ... 00044910 : #include #include #include rtems_interval rtems_clock_get_ticks_since_boot(void) { 44910: 4e56 0000 linkw %fp,#0 return _Watchdog_Ticks_since_boot; 44914: 2039 0005 cdd8 movel 5cdd8 <_Watchdog_Ticks_since_boot>,%d0 } 4491a: 4e5e unlk %fp 4491c: 4e75 rts ... 000456bc : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 456bc: 4e56 ffcc linkw %fp,#-52 456c0: 2f0a movel %a2,%sp@- 456c2: 246e 0008 moveal %fp@(8),%a2 456c6: 2f02 movel %d2,%sp@- rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 456c8: 4a8a tstl %a2 456ca: 6606 bnes 456d2 456cc: 7009 moveq #9,%d0 456ce: 6000 0092 braw 45762 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 456d2: 4a39 0006 6bb8 tstb 66bb8 <_TOD_Is_set> 456d8: 6606 bnes 456e0 456da: 700b moveq #11,%d0 456dc: 6000 0084 braw 45762 { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 456e0: 203c 0000 0700 movel #1792,%d0 456e6: 40c2 movew %sr,%d2 456e8: 8082 orl %d2,%d0 456ea: 46c0 movew %d0,%sr _TOD_Get( &now ); 456ec: 486e fff0 pea %fp@(-16) 456f0: 4eb9 0004 6e14 jsr 46e14 <_TOD_Get> _ISR_Enable(level); 456f6: 46c2 movew %d2,%sr useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 456f8: 243c 0000 03e8 movel #1000,%d2 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 456fe: 486e ffcc pea %fp@(-52) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 45702: 202e fff4 movel %fp@(-12),%d0 45706: 486e fff8 pea %fp@(-8) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 4570a: 2d6e fff0 fff8 movel %fp@(-16),%fp@(-8) time->tv_usec = useconds; 45710: 4c42 0800 remsl %d2,%d0,%d0 45714: 2d40 fffc movel %d0,%fp@(-4) 45718: 4eb9 0004 e608 jsr 4e608 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; 4571e: 206e ffdc moveal %fp@(-36),%a0 45722: 5288 addql #1,%a0 tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 45724: 4fef 000c lea %sp@(12),%sp tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / 45728: 4280 clrl %d0 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; 4572a: 2548 0004 movel %a0,%a2@(4) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 4572e: 206e ffe0 moveal %fp@(-32),%a0 45732: 41e8 076c lea %a0@(1900),%a0 tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 45736: 256e ffd8 0008 movel %fp@(-40),%a2@(8) tmbuf->hour = time.tm_hour; 4573c: 256e ffd4 000c movel %fp@(-44),%a2@(12) tmbuf->minute = time.tm_min; 45742: 256e ffd0 0010 movel %fp@(-48),%a2@(16) tmbuf->second = time.tm_sec; 45748: 256e ffcc 0014 movel %fp@(-52),%a2@(20) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 4574e: 2488 movel %a0,%a2@ tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / 45750: 242e fffc movel %fp@(-4),%d2 45754: 41f9 0005 d630 lea 5d630 ,%a0 4575a: 4c50 2002 remul %a0@,%d2,%d2 4575e: 2542 0018 movel %d2,%a2@(24) rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 45762: 242e ffc4 movel %fp@(-60),%d2 45766: 246e ffc8 moveal %fp@(-56),%a2 4576a: 4e5e unlk %fp 4576c: 4e75 rts ... 0004493c : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 4493c: 4e56 0000 linkw %fp,#0 _TOD_Tickle_ticks(); 44940: 4eb9 0004 5c8c jsr 45c8c <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 44946: 4879 0005 cd6c pea 5cd6c <_Watchdog_Ticks_chain> 4494c: 4eb9 0004 7de0 jsr 47de0 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 44952: 4eb9 0004 786c jsr 4786c <_Thread_Tickle_timeslice> if ( _Thread_Is_context_switch_necessary() && 44958: 588f addql #4,%sp * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 4495a: 1039 0005 cd5e moveb 5cd5e <_Context_Switch_necessary>,%d0 44960: 670e beqs 44970 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 44962: 2039 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d0 44968: 6606 bnes 44970 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 4496a: 4eb9 0004 6b90 jsr 46b90 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 44970: 4280 clrl %d0 44972: 4e5e unlk %fp 44974: 4e75 rts ... 00049f70 : * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 49f70: 4e56 0000 linkw %fp,#0 49f74: 202e 0008 movel %fp@(8),%d0 return (_Debug_Level & level) ? true : false; } 49f78: 4e5e unlk %fp * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 49f7a: c0b9 0005 cd52 andl 5cd52 <_Debug_Level>,%d0 49f80: 56c0 sne %d0 return (_Debug_Level & level) ? true : false; } 49f82: 4480 negl %d0 49f84: 4e75 rts ... 0004c2d8 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4c2d8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4c2dc: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4c2de: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4c2e2: 4879 0005 aaa2 pea 5aaa2 <== NOT EXECUTED 4c2e8: 4eb9 0004 c308 jsr 4c308 <== NOT EXECUTED 4c2ee: 508f addql #8,%sp <== NOT EXECUTED 4c2f0: 2400 movel %d0,%d2 <== NOT EXECUTED 4c2f2: 670a beqs 4c2fe <== NOT EXECUTED { errno = rc; 4c2f4: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4c2fa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c2fc: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4c2fe: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4c302: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c304: 4e5e unlk %fp <== NOT EXECUTED 4c306: 4e75 rts 000420d8 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 420d8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 420dc: 486e 0010 pea %fp@(16) <== NOT EXECUTED 420e0: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 420e4: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 420e8: 4eba fe4a jsr %pc@(41f34 ) <== NOT EXECUTED va_end(arglist); return chars_written; } 420ec: 4e5e unlk %fp <== NOT EXECUTED 420ee: 4e75 rts 00044978 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 44978: 4e56 0000 linkw %fp,#0 4497c: 202e 0008 movel %fp@(8),%d0 44980: 206e 0014 moveal %fp@(20),%a0 RTEMS_API_Control *api; if ( !event_out ) 44984: 4a88 tstl %a0 44986: 6604 bnes 4498c 44988: 7009 moveq #9,%d0 4498a: 6046 bras 449d2 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 4498c: 2279 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a1 44992: 2269 010a moveal %a1@(266),%a1 if ( _Event_sets_Is_empty( event_in ) ) { 44996: 4a80 tstl %d0 44998: 6604 bnes 4499e *event_out = api->pending_events; 4499a: 2091 movel %a1@,%a0@ return RTEMS_SUCCESSFUL; 4499c: 6034 bras 449d2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4499e: 2239 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d1 449a4: 5281 addql #1,%d1 449a6: 23c1 0005 cc94 movel %d1,5cc94 <_Thread_Dispatch_disable_level> } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 449ac: 2f08 movel %a0,%sp@- 449ae: 2f2e 0010 movel %fp@(16),%sp@- 449b2: 2f2e 000c movel %fp@(12),%sp@- 449b6: 2f00 movel %d0,%sp@- 449b8: 4eb9 0004 49d8 jsr 449d8 <_Event_Seize> _Thread_Enable_dispatch(); 449be: 4eb9 0004 6ce2 jsr 46ce2 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 449c4: 2079 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a0 449ca: 4fef 0010 lea %sp@(16),%sp 449ce: 2028 0034 movel %a0@(52),%d0 } 449d2: 4e5e unlk %fp 449d4: 4e75 rts ... 0004223e : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 4223e: 4e56 ffe8 linkw %fp,#-24 42242: 48d7 047c moveml %d2-%d6/%a2,%sp@ 42246: 246e 0008 moveal %fp@(8),%a2 4224a: 2a2e 000c movel %fp@(12),%d5 4224e: 262e 0010 movel %fp@(16),%d3 42252: 242e 0014 movel %fp@(20),%d2 42256: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 4225a: 4a8a tstl %a2 4225c: 6610 bnes 4226e rtems_set_errno_and_return_minus_one( EFAULT ); 4225e: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 42264: 760e moveq #14,%d3 <== NOT EXECUTED 42266: 2040 moveal %d0,%a0 <== NOT EXECUTED 42268: 2083 movel %d3,%a0@ <== NOT EXECUTED 4226a: 6000 008e braw 422fa <== NOT EXECUTED if ( !pathloc ) 4226e: 4a82 tstl %d2 42270: 660e bnes 42280 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 42272: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 42278: 7405 moveq #5,%d2 <== NOT EXECUTED 4227a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4227c: 2082 movel %d2,%a0@ <== NOT EXECUTED 4227e: 607a bras 422fa <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42280: 7c2f moveq #47,%d6 42282: 1012 moveb %a2@,%d0 42284: 1200 moveb %d0,%d1 42286: 49c1 extbl %d1 42288: bc81 cmpl %d1,%d6 4228a: 670c beqs 42298 4228c: 1c3c 005c moveb #92,%d6 42290: bc81 cmpl %d1,%d6 42292: 6704 beqs 42298 42294: 4a00 tstb %d0 42296: 6620 bnes 422b8 42298: 4878 0014 pea 14 4229c: 2079 0005 b544 moveal 5b544 ,%a0 422a2: 41e8 0018 lea %a0@(24),%a0 422a6: 2f08 movel %a0,%sp@- 422a8: 2f02 movel %d2,%sp@- 422aa: 4eb9 0004 d23c jsr 4d23c 422b0: 4fef 000c lea %sp@(12),%sp 422b4: 7001 moveq #1,%d0 422b6: 601c bras 422d4 422b8: 4878 0014 pea 14 422bc: 2039 0005 b544 movel 5b544 ,%d0 422c2: 5880 addql #4,%d0 422c4: 2f00 movel %d0,%sp@- 422c6: 2f02 movel %d2,%sp@- 422c8: 4eb9 0004 d23c jsr 4d23c 422ce: 4fef 000c lea %sp@(12),%sp 422d2: 4280 clrl %d0 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 422d4: d5c0 addal %d0,%a2 422d6: 9a80 subl %d0,%d5 422d8: 2d4a 0008 movel %a2,%fp@(8) 422dc: 2d45 000c movel %d5,%fp@(12) 422e0: 2d44 0018 movel %d4,%fp@(24) 422e4: 2d42 0014 movel %d2,%fp@(20) 422e8: 2d43 0010 movel %d3,%fp@(16) pathnamelen - i, flags, pathloc, follow_link ); } 422ec: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 422f2: 4e5e unlk %fp rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 422f4: 4ef9 0004 216e jmp 4216e pathnamelen - i, flags, pathloc, follow_link ); } 422fa: 70ff moveq #-1,%d0 <== NOT EXECUTED 422fc: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 42302: 4e5e unlk %fp <== NOT EXECUTED 42304: 4e75 rts <== NOT EXECUTED ... 0004216e : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 4216e: 4e56 fff0 linkw %fp,#-16 42172: 202e 0008 movel %fp@(8),%d0 42176: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4217a: 222e 000c movel %fp@(12),%d1 4217e: 242e 0010 movel %fp@(16),%d2 42182: 246e 0014 moveal %fp@(20),%a2 42186: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 4218a: 4a80 tstl %d0 4218c: 6612 bnes 421a0 rtems_set_errno_and_return_minus_one( EFAULT ); 4218e: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 42194: 76ff moveq #-1,%d3 <== NOT EXECUTED 42196: 720e moveq #14,%d1 <== NOT EXECUTED 42198: 2040 moveal %d0,%a0 <== NOT EXECUTED 4219a: 2081 movel %d1,%a0@ <== NOT EXECUTED 4219c: 6000 0094 braw 42232 <== NOT EXECUTED if ( !pathloc ) 421a0: 4a8a tstl %a2 421a2: 6610 bnes 421b4 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 421a4: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 421aa: 76ff moveq #-1,%d3 <== NOT EXECUTED 421ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 421ae: 7005 moveq #5,%d0 <== NOT EXECUTED 421b0: 2080 movel %d0,%a0@ <== NOT EXECUTED 421b2: 607e bras 42232 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 421b4: 206a 000c moveal %a2@(12),%a0 421b8: 2050 moveal %a0@,%a0 421ba: 4a88 tstl %a0 421bc: 6750 beqs 4220e rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 421be: 2f0a movel %a2,%sp@- 421c0: 2f02 movel %d2,%sp@- 421c2: 2f01 movel %d1,%sp@- 421c4: 2f00 movel %d0,%sp@- 421c6: 4e90 jsr %a0@ /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 421c8: 4fef 0010 lea %sp@(16),%sp rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 421cc: 2600 movel %d0,%d3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 421ce: 6662 bnes 42232 421d0: 4a84 tstl %d4 421d2: 675e beqs 42232 if ( !pathloc->ops->node_type_h ){ 421d4: 226a 000c moveal %a2@(12),%a1 421d8: 2069 0010 moveal %a1@(16),%a0 421dc: 4a88 tstl %a0 421de: 6606 bnes 421e6 rtems_filesystem_freenode( pathloc ); 421e0: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 421e4: 601e bras 42204 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 421e6: 2f0a movel %a2,%sp@- 421e8: 4e90 jsr %a0@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 421ea: 588f addql #4,%sp 421ec: 7201 moveq #1,%d1 421ee: 5780 subql #3,%d0 421f0: b280 cmpl %d0,%d1 421f2: 653e bcss 42232 ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 421f4: 206a 000c moveal %a2@(12),%a0 421f8: 2268 0034 moveal %a0@(52),%a1 421fc: 4a89 tstl %a1 421fe: 6620 bnes 42220 rtems_filesystem_freenode( pathloc ); 42200: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42204: 4a88 tstl %a0 <== NOT EXECUTED 42206: 6706 beqs 4220e <== NOT EXECUTED 42208: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4220a: 4e90 jsr %a0@ <== NOT EXECUTED 4220c: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4220e: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 42214: 76ff moveq #-1,%d3 <== NOT EXECUTED 42216: 2040 moveal %d0,%a0 <== NOT EXECUTED 42218: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4221e: 6012 bras 42232 <== NOT EXECUTED * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 42220: 2d42 000c movel %d2,%fp@(12) 42224: 2d4a 0008 movel %a2,%fp@(8) } } return result; } 42228: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4222e: 4e5e unlk %fp * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 42230: 4ed1 jmp %a1@ } } return result; } 42232: 2003 movel %d3,%d0 42234: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4223a: 4e5e unlk %fp 4223c: 4e75 rts 00041e0c : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 41e0c: 7012 moveq #18,%d0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 41e0e: 4e56 ffdc linkw %fp,#-36 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 41e12: 2079 0005 b544 moveal 5b544 ,%a0 41e18: 2140 002c movel %d0,%a0@(44) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 41e1c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ */ rtems_filesystem_umask = 022; init_fs_mount_table(); 41e20: 4eb9 0004 2584 jsr 42584 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 41e26: 4ab9 0005 9b88 tstl 59b88 41e2c: 6608 bnes 41e36 rtems_fatal_error_occurred( 0xABCD0001 ); 41e2e: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 41e34: 602e bras 41e64 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 41e36: 2079 0005 b43c moveal 5b43c ,%a0 status = mount( 41e3c: 2f28 000c movel %a0@(12),%sp@- 41e40: 2f28 0008 movel %a0@(8),%sp@- 41e44: 2f28 0004 movel %a0@(4),%sp@- 41e48: 2f10 movel %a0@,%sp@- 41e4a: 486e fffc pea %fp@(-4) 41e4e: 4eb9 0004 25a6 jsr 425a6 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 41e54: 4fef 0014 lea %sp@(20),%sp 41e58: 72ff moveq #-1,%d1 41e5a: b280 cmpl %d0,%d1 41e5c: 660c bnes 41e6a rtems_fatal_error_occurred( 0xABCD0002 ); 41e5e: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 41e64: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED rtems_filesystem_link_counts = 0; 41e6a: 2079 0005 b544 moveal 5b544 ,%a0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 41e70: 45f9 0004 d23c lea 4d23c ,%a2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 41e76: 240e movel %fp,%d2 41e78: 0682 ffff ffe8 addil #-24,%d2 41e7e: 47f9 0004 223e lea 4223e ,%a3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 41e84: 4240 clrw %d0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 41e86: 226e fffc moveal %fp@(-4),%a1 41e8a: 43e9 001c lea %a1@(28),%a1 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 41e8e: 3140 0030 movew %d0,%a0@(48) * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 41e92: 4878 0014 pea 14 41e96: 2f09 movel %a1,%sp@- 41e98: 4868 0018 pea %a0@(24) 41e9c: 4e92 jsr %a2@ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 41e9e: 42a7 clrl %sp@- 41ea0: 2f02 movel %d2,%sp@- 41ea2: 42a7 clrl %sp@- 41ea4: 4878 0001 pea 1 41ea8: 4879 0005 9ef2 pea 59ef2 41eae: 4e93 jsr %a3@ rtems_filesystem_root = loc; 41eb0: 4fef 0020 lea %sp@(32),%sp 41eb4: 4878 0014 pea 14 41eb8: 2079 0005 b544 moveal 5b544 ,%a0 41ebe: 41e8 0018 lea %a0@(24),%a0 41ec2: 2f02 movel %d2,%sp@- 41ec4: 2f08 movel %a0,%sp@- 41ec6: 4e92 jsr %a2@ /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 41ec8: 42a7 clrl %sp@- 41eca: 2f02 movel %d2,%sp@- 41ecc: 42a7 clrl %sp@- 41ece: 4878 0001 pea 1 41ed2: 4879 0005 9ef2 pea 59ef2 41ed8: 4e93 jsr %a3@ rtems_filesystem_current = loc; 41eda: 4fef 0020 lea %sp@(32),%sp 41ede: 4878 0014 pea 14 41ee2: 2279 0005 b544 moveal 5b544 ,%a1 41ee8: 5889 addql #4,%a1 41eea: 2f02 movel %d2,%sp@- 41eec: 2f09 movel %a1,%sp@- 41eee: 4e92 jsr %a2@ * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 41ef0: 4878 01ff pea 1ff 41ef4: 4879 0005 9ef4 pea 59ef4 41efa: 4eb9 0004 244c jsr 4244c if ( status != 0 ) 41f00: 4fef 0014 lea %sp@(20),%sp 41f04: 4a80 tstl %d0 41f06: 670a beqs 41f12 rtems_fatal_error_occurred( 0xABCD0003 ); 41f08: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 41f0e: 6000 ff54 braw 41e64 <== NOT EXECUTED * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 41f12: 4cee 0c04 ffdc moveml %fp@(-36),%d2/%a2-%a3 41f18: 4e5e unlk %fp 41f1a: 4e75 rts 00061d08 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 61d08: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 61d0c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 61d10: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 61d14: 4e5e unlk %fp <== NOT EXECUTED ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 61d16: 2050 moveal %a0@,%a0 <== NOT EXECUTED 61d18: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 61d1a: 57c0 seq %d0 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 61d1c: 4480 negl %d0 <== NOT EXECUTED 61d1e: 4e75 rts 00046ff4 : #endif #include const char *rtems_get_version_string(void) { 46ff4: 4e56 0000 linkw %fp,#0 return _RTEMS_version; } 46ff8: 203c 0005 df0a movel #384778,%d0 46ffe: 4e5e unlk %fp 47000: 4e75 rts ... 000454b2 : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { 454b2: 4e56 0000 linkw %fp,#0 454b6: 42b9 0005 ce1c clrl 5ce1c <_System_state_Current> #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 454bc: 4eb9 0004 7fec jsr 47fec <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 454c2: 4eb9 0004 9f3c jsr 49f3c <_Debug_Manager_initialization> _API_extensions_Initialization(); 454c8: 4eb9 0004 5740 jsr 45740 <_API_extensions_Initialization> * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 454ce: 7001 moveq #1,%d0 454d0: 23c0 0005 cc94 movel %d0,5cc94 <_Thread_Dispatch_disable_level> /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization(); 454d6: 4eb9 0004 7ec4 jsr 47ec4 <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 454dc: 4eb9 0004 79e0 jsr 479e0 <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 454e2: 4eb9 0004 6034 jsr 46034 <_ISR_Handler_initialization> /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; _API_Mutex_Initialization( 1 ); 454e8: 4878 0001 pea 1 _ISR_Handler_initialization(); /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 454ec: 203c 0005 ccaa movel #380074,%d0 454f2: 23c0 0005 cc50 movel %d0,5cc50 <_Objects_Information_table+0x4> _API_Mutex_Initialization( 1 ); 454f8: 4eb9 0004 5870 jsr 45870 <_API_Mutex_Initialization> _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 454fe: 4879 0005 cd46 pea 5cd46 <_RTEMS_Allocator_Mutex> 45504: 4eb9 0004 57d0 jsr 457d0 <_API_Mutex_Allocate> #include #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) 4550a: 508f addql #8,%sp RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 4550c: 41f9 0005 cdb4 lea 5cdb4 <_Priority_Bit_map>,%a0 45512: 4240 clrw %d0 45514: 33c0 0005 cd44 movew %d0,5cd44 <_Priority_Major_bit_map> for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 4551a: 4258 clrw %a0@+ RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 4551c: b1fc 0005 cdd4 cmpal #380372,%a0 45522: 66f6 bnes 4551a _API_Mutex_Initialization( 1 ); _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 45524: 4eb9 0004 7d18 jsr 47d18 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 4552a: 4eb9 0004 5c5c jsr 45c5c <_TOD_Handler_initialization> _Thread_Handler_initialization(); 45530: 4eb9 0004 6f50 jsr 46f50 <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 45536: 4eb9 0004 56ec jsr 456ec <_RTEMS_API_Initialize> _Extension_Manager_initialization(); 4553c: 4eb9 0004 558c jsr 4558c <_Extension_Manager_initialization> _IO_Manager_initialization(); 45542: 4eb9 0004 5604 jsr 45604 <_IO_Manager_initialization> #ifdef RTEMS_POSIX_API _POSIX_API_Initialize(); 45548: 4eb9 0004 5698 jsr 45698 <_POSIX_API_Initialize> _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 4554e: 4e5e unlk %fp 45550: 7001 moveq #1,%d0 45552: 23c0 0005 ce1c movel %d0,5ce1c <_System_state_Current> * _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 45558: 4ef9 0004 6aa4 jmp 46aa4 <_Thread_Create_idle> ... 00044cb8 : rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { 44cb8: 4e56 0000 linkw %fp,#0 44cbc: 222e 0008 movel %fp@(8),%d1 44cc0: 202e 000c movel %fp@(12),%d0 44cc4: 206e 0010 moveal %fp@(16),%a0 if ( !_ISR_Is_vector_number_valid( vector ) ) 44cc8: 0c80 0000 00ff cmpil #255,%d0 44cce: 6304 blss 44cd4 44cd0: 700a moveq #10,%d0 44cd2: 601e bras 44cf2 return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) ) 44cd4: 4a81 tstl %d1 44cd6: 6718 beqs 44cf0 return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) 44cd8: 4a88 tstl %a0 44cda: 6714 beqs 44cf0 return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 44cdc: 2f08 movel %a0,%sp@- 44cde: 2f01 movel %d1,%sp@- 44ce0: 2f00 movel %d0,%sp@- 44ce2: 4eb9 0004 8026 jsr 48026 <_CPU_ISR_install_vector> vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 44ce8: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 44cec: 4280 clrl %d0 vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 44cee: 6002 bras 44cf2 44cf0: 7009 moveq #9,%d0 } 44cf2: 4e5e unlk %fp 44cf4: 4e75 rts ... 0004527c : rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { return RTEMS_INTERRUPT_LEVEL(level); } 4527c: 7007 moveq #7,%d0 uint32_t rtems_interrupt_mask = RTEMS_INTERRUPT_MASK; rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { 4527e: 4e56 0000 linkw %fp,#0 return RTEMS_INTERRUPT_LEVEL(level); } 45282: c0ae 0008 andl %fp@(8),%d0 45286: 4e5e unlk %fp 45288: 4e75 rts ... 00041d0c : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 41d0c: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 41d10: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 41d14: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 41d18: 49f9 0004 dde8 lea 4dde8 ,%a4 <== NOT EXECUTED 41d1e: 240e movel %fp,%d2 <== NOT EXECUTED 41d20: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 41d26: 2f03 movel %d3,%sp@- <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 41d28: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 41d2c: 4e94 jsr %a4@ <== NOT EXECUTED 41d2e: 7201 moveq #1,%d1 <== NOT EXECUTED 41d30: 2e81 movel %d1,%sp@ <== NOT EXECUTED 41d32: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d34: 42a7 clrl %sp@- <== NOT EXECUTED 41d36: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41d38: 2f03 movel %d3,%sp@- <== NOT EXECUTED 41d3a: 4eb9 0004 223e jsr 4223e <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 41d40: 226e fff8 moveal %fp@(-8),%a1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 41d44: 2800 movel %d0,%d4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 41d46: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; 41d4a: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 41d4e: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 41d52: 4a88 tstl %a0 <== NOT EXECUTED 41d54: 6620 bnes 41d76 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 41d56: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 41d5a: 4a88 tstl %a0 <== NOT EXECUTED 41d5c: 6706 beqs 41d64 <== NOT EXECUTED 41d5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d60: 4e90 jsr %a0@ <== NOT EXECUTED 41d62: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 41d64: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 41d6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 41d6c: 70ff moveq #-1,%d0 <== NOT EXECUTED 41d6e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 41d74: 6060 bras 41dd6 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 41d76: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d78: 4e90 jsr %a0@ <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 41d7a: 588f addql #4,%sp <== NOT EXECUTED 41d7c: 4a84 tstl %d4 <== NOT EXECUTED 41d7e: 6606 bnes 41d86 <== NOT EXECUTED 41d80: 7202 moveq #2,%d1 <== NOT EXECUTED 41d82: b280 cmpl %d0,%d1 <== NOT EXECUTED 41d84: 671a beqs 41da0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 41d86: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 41d8a: 4a88 tstl %a0 <== NOT EXECUTED 41d8c: 6742 beqs 41dd0 <== NOT EXECUTED 41d8e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 41d92: 4a88 tstl %a0 <== NOT EXECUTED 41d94: 673a beqs 41dd0 <== NOT EXECUTED 41d96: 486e ffec pea %fp@(-20) <== NOT EXECUTED 41d9a: 4e90 jsr %a0@ <== NOT EXECUTED 41d9c: 588f addql #4,%sp <== NOT EXECUTED 41d9e: 6030 bras 41dd0 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 41da0: 2f03 movel %d3,%sp@- <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 41da2: 2483 movel %d3,%a2@ <== NOT EXECUTED device_info->device_name_length = strlen( name ); 41da4: 4e94 jsr %a4@ <== NOT EXECUTED device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 41da6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 41daa: 588f addql #4,%sp <== NOT EXECUTED 41dac: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 41db0: 256b 004c 0008 movel %a3@(76),%a2@(8) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 41db6: 256b 0050 000c movel %a3@(80),%a2@(12) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 41dbc: 4a88 tstl %a0 <== NOT EXECUTED 41dbe: 6714 beqs 41dd4 <== NOT EXECUTED 41dc0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 41dc4: 4a88 tstl %a0 <== NOT EXECUTED 41dc6: 670c beqs 41dd4 <== NOT EXECUTED 41dc8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41dca: 4e90 jsr %a0@ <== NOT EXECUTED 41dcc: 588f addql #4,%sp <== NOT EXECUTED 41dce: 6004 bras 41dd4 <== NOT EXECUTED 41dd0: 700d moveq #13,%d0 <== NOT EXECUTED 41dd2: 6002 bras 41dd6 <== NOT EXECUTED 41dd4: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 41dd6: 4cee 1c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a4 <== NOT EXECUTED 41ddc: 4e5e unlk %fp <== NOT EXECUTED 41dde: 4e75 rts 00046d4c : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 46d4c: 4e56 0000 linkw %fp,#0 46d50: 206e 000c moveal %fp@(12),%a0 46d54: 2f0a movel %a2,%sp@- 46d56: 226e 0010 moveal %fp@(16),%a1 46d5a: 2f02 movel %d2,%sp@- 46d5c: 242e 0008 movel %fp@(8),%d2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 46d60: 2039 0006 28c6 movel 628c6 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 46d66: 2239 0006 20a6 movel 620a6 <_ISR_Nest_level>,%d1 46d6c: 6706 beqs 46d74 46d6e: 7012 moveq #18,%d0 46d70: 6000 00d6 braw 46e48 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 46d74: 4a89 tstl %a1 46d76: 6700 00ce beqw 46e46 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 46d7a: 2280 movel %d0,%a1@ if ( driver_table == NULL ) 46d7c: 4a88 tstl %a0 46d7e: 6700 00c6 beqw 46e46 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46d82: 4a90 tstl %a0@ 46d84: 6600 00ce bnew 46e54 46d88: 4aa8 0004 tstl %a0@(4) 46d8c: 6600 00c6 bnew 46e54 46d90: 6000 00b4 braw 46e46 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46d94: 2039 0006 200c movel 6200c <_Thread_Dispatch_disable_level>,%d0 46d9a: 5280 addql #1,%d0 46d9c: 23c0 0006 200c movel %d0,6200c <_Thread_Dispatch_disable_level> if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 46da2: 4a82 tstl %d2 46da4: 662c bnes 46dd2 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 46da6: 2039 0006 28c6 movel 628c6 <_IO_Number_of_drivers>,%d0 46dac: 2479 0006 28ca moveal 628ca <_IO_Driver_address_table>,%a2 46db2: 6010 bras 46dc4 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46db4: 4a92 tstl %a2@ 46db6: 6600 00a6 bnew 46e5e 46dba: 4aaa 0004 tstl %a2@(4) 46dbe: 6600 009e bnew 46e5e 46dc2: 6004 bras 46dc8 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 46dc4: b082 cmpl %d2,%d0 46dc6: 62ec bhis 46db4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 46dc8: 2282 movel %d2,%a1@ if ( m != n ) 46dca: b082 cmpl %d2,%d0 46dcc: 6634 bnes 46e02 46dce: 6000 0098 braw 46e68 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 46dd2: 2202 movel %d2,%d1 46dd4: 2002 movel %d2,%d0 46dd6: e789 lsll #3,%d1 46dd8: eb88 lsll #5,%d0 46dda: 2479 0006 28ca moveal 628ca <_IO_Driver_address_table>,%a2 46de0: 9081 subl %d1,%d0 46de2: d5c0 addal %d0,%a2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46de4: 4a92 tstl %a2@ 46de6: 660e bnes 46df6 46de8: 4aaa 0004 tstl %a2@(4) 46dec: 57c0 seq %d0 46dee: 49c0 extbl %d0 46df0: 4480 negl %d0 } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { 46df2: 4a00 tstb %d0 46df4: 660a bnes 46e00 _Thread_Enable_dispatch(); 46df6: 4eb9 0004 8672 jsr 48672 <_Thread_Enable_dispatch> 46dfc: 700c moveq #12,%d0 return RTEMS_RESOURCE_IN_USE; 46dfe: 6048 bras 46e48 } *registered_major = major; 46e00: 2282 movel %d2,%a1@ } _IO_Driver_address_table [major] = *driver_table; 46e02: 4878 0018 pea 18 46e06: 2202 movel %d2,%d1 46e08: 2002 movel %d2,%d0 46e0a: e789 lsll #3,%d1 46e0c: eb88 lsll #5,%d0 46e0e: 2f08 movel %a0,%sp@- 46e10: 9081 subl %d1,%d0 46e12: d0b9 0006 28ca addl 628ca <_IO_Driver_address_table>,%d0 46e18: 2f00 movel %d0,%sp@- 46e1a: 4eb9 0005 1c44 jsr 51c44 _Thread_Enable_dispatch(); 46e20: 4eb9 0004 8672 jsr 48672 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); } 46e26: 246e fffc moveal %fp@(-4),%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e2a: 4fef 000c lea %sp@(12),%sp 46e2e: 2d42 0008 movel %d2,%fp@(8) } 46e32: 242e fff8 movel %fp@(-8),%d2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e36: 42ae 0010 clrl %fp@(16) 46e3a: 42ae 000c clrl %fp@(12) } 46e3e: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e40: 4ef9 0004 e908 jmp 4e908 46e46: 7009 moveq #9,%d0 } 46e48: 242e fff8 movel %fp@(-8),%d2 46e4c: 246e fffc moveal %fp@(-4),%a2 46e50: 4e5e unlk %fp 46e52: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 46e54: b082 cmpl %d2,%d0 46e56: 6200 ff3c bhiw 46d94 46e5a: 700a moveq #10,%d0 46e5c: 60ea bras 46e48 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 46e5e: 5282 addql #1,%d2 46e60: 45ea 0018 lea %a2@(24),%a2 46e64: 6000 ff5e braw 46dc4 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 46e68: 4eb9 0004 8672 jsr 48672 <_Thread_Enable_dispatch> 46e6e: 7005 moveq #5,%d0 return sc; 46e70: 60d6 bras 46e48 ... 00046e74 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 46e74: 4e56 0000 linkw %fp,#0 46e78: 222e 0008 movel %fp@(8),%d1 if ( rtems_interrupt_is_in_progress() ) 46e7c: 2039 0006 20a6 movel 620a6 <_ISR_Nest_level>,%d0 46e82: 6704 beqs 46e88 46e84: 7012 moveq #18,%d0 46e86: 6042 bras 46eca return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 46e88: b2b9 0006 28c6 cmpl 628c6 <_IO_Number_of_drivers>,%d1 46e8e: 6504 bcss 46e94 46e90: 700d moveq #13,%d0 46e92: 6036 bras 46eca 46e94: 2039 0006 200c movel 6200c <_Thread_Dispatch_disable_level>,%d0 46e9a: 5280 addql #1,%d0 46e9c: 23c0 0006 200c movel %d0,6200c <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); memset( 46ea2: 2001 movel %d1,%d0 46ea4: 4878 0018 pea 18 46ea8: e789 lsll #3,%d1 46eaa: eb88 lsll #5,%d0 46eac: 42a7 clrl %sp@- 46eae: 9081 subl %d1,%d0 46eb0: d0b9 0006 28ca addl 628ca <_IO_Driver_address_table>,%d0 46eb6: 2f00 movel %d0,%sp@- 46eb8: 4eb9 0005 1cb4 jsr 51cb4 &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 46ebe: 4eb9 0004 8672 jsr 48672 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46ec4: 4fef 000c lea %sp@(12),%sp memset( &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 46ec8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 46eca: 4e5e unlk %fp 46ecc: 4e75 rts ... 00047394 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 47394: 4e56 fff0 linkw %fp,#-16 47398: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4739c: 286e 0008 moveal %fp@(8),%a4 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 473a0: 4a8c tstl %a4 473a2: 6740 beqs 473e4 473a4: 45f9 0006 6b60 lea 66b60 <_Objects_Information_table+0x4>,%a2 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 473aa: 2052 moveal %a2@,%a0 473ac: 4a88 tstl %a0 473ae: 672a beqs 473da continue; information = _Objects_Information_table[ api_index ][ 1 ]; 473b0: 2668 0004 moveal %a0@(4),%a3 if ( !information ) 473b4: 4a8b tstl %a3 473b6: 6722 beqs 473da 473b8: 7401 moveq #1,%d2 473ba: 6014 bras 473d0 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 473bc: 206b 0018 moveal %a3@(24),%a0 473c0: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 473c4: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 473c6: 4a80 tstl %d0 473c8: 6706 beqs 473d0 continue; (*routine)(the_thread); 473ca: 2f00 movel %d0,%sp@- 473cc: 4e94 jsr %a4@ 473ce: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 473d0: 4280 clrl %d0 473d2: 302b 000e movew %a3@(14),%d0 473d6: b082 cmpl %d2,%d0 473d8: 64e2 bccs 473bc 473da: 588a addql #4,%a2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 473dc: b5fc 0006 6b70 cmpal #420720,%a2 473e2: 66c6 bnes 473aa (*routine)(the_thread); } } } 473e4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 473ea: 4e5e unlk %fp 473ec: 4e75 rts ... 0004934a : * Access mode is a small integer */ access_modes = fcntl_flags & O_ACCMODE; fcntl_flags &= ~O_ACCMODE; flags = rtems_assoc_local_by_remote( access_modes_assoc, access_modes ); 4934a: 7003 moveq #3,%d0 }; uint32_t rtems_libio_fcntl_flags( uint32_t fcntl_flags ) { 4934c: 4e56 0000 linkw %fp,#0 49350: 2f03 movel %d3,%sp@- 49352: 2f02 movel %d2,%sp@- 49354: 242e 0008 movel %fp@(8),%d2 * Access mode is a small integer */ access_modes = fcntl_flags & O_ACCMODE; fcntl_flags &= ~O_ACCMODE; flags = rtems_assoc_local_by_remote( access_modes_assoc, access_modes ); 49358: c082 andl %d2,%d0 4935a: 2f00 movel %d0,%sp@- 4935c: 4879 0005 a768 pea 5a768 49362: 4eb9 0004 b698 jsr 4b698 49368: 2600 movel %d0,%d3 /* * Everything else is single bits */ flags |= rtems_assoc_local_by_remote_bitfield(status_flags_assoc, fcntl_flags); 4936a: 70fc moveq #-4,%d0 4936c: c082 andl %d2,%d0 4936e: 2f00 movel %d0,%sp@- 49370: 4879 0005 a798 pea 5a798 49376: 4eb9 0004 b654 jsr 4b654 return flags; } 4937c: 242e fff8 movel %fp@(-8),%d2 49380: 8083 orl %d3,%d0 49382: 262e fffc movel %fp@(-4),%d3 49386: 4e5e unlk %fp 49388: 4e75 rts ... 00042308 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 42308: 4e56 0000 linkw %fp,#0 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 4230c: 2039 0005 b434 movel 5b434 ,%d0 42312: 6742 beqs 42356 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42314: 4878 0040 pea 40 42318: 2f00 movel %d0,%sp@- 4231a: 4eb9 0004 8e68 jsr 48e68 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42320: 508f addql #8,%sp uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42322: 23c0 0005 cb34 movel %d0,5cb34 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42328: 6606 bnes 42330 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 4232a: 4878 001a pea 1a <== NOT EXECUTED 4232e: 604c bras 4237c <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 42330: 23c0 0005 cb38 movel %d0,5cb38 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42336: 2040 moveal %d0,%a0 42338: 4280 clrl %d0 4233a: 2239 0005 b434 movel 5b434 ,%d1 42340: 6004 bras 42346 iop->data1 = iop + 1; 42342: 2148 fff4 movel %a0,%a0@(-12) 42346: 2248 moveal %a0,%a1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42348: 5280 addql #1,%d0 4234a: 41e8 0040 lea %a0@(64),%a0 4234e: b280 cmpl %d0,%d1 42350: 62f0 bhis 42342 iop->data1 = iop + 1; iop->data1 = NULL; 42352: 42a9 0034 clrl %a1@(52) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 42356: 4879 0005 cb3c pea 5cb3c 4235c: 42a7 clrl %sp@- 4235e: 4878 0054 pea 54 42362: 4878 0001 pea 1 42366: 2f3c 4c42 494f movel #1279412559,%sp@- 4236c: 4eb9 0004 4cf8 jsr 44cf8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 42372: 4fef 0014 lea %sp@(20),%sp 42376: 4a80 tstl %d0 42378: 6708 beqs 42382 rtems_fatal_error_occurred( rc ); 4237a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4237c: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 42382: 2279 0005 b430 moveal 5b430 ,%a1 42388: 4a89 tstl %a1 4238a: 6704 beqs 42390 (* rtems_fs_init_helper)(); } 4238c: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 4238e: 4ed1 jmp %a1@ } 42390: 4e5e unlk %fp <== NOT EXECUTED 42392: 4e75 rts 0006163e : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 6163e: 4e56 ffd4 linkw %fp,#-44 61642: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 61646: 486e fffc pea %fp@(-4) 6164a: 42a7 clrl %sp@- 6164c: 42a7 clrl %sp@- 6164e: 4eb9 0006 2fa4 jsr 62fa4 if (sc != RTEMS_SUCCESSFUL) return sc; 61654: 4fef 000c lea %sp@(12),%sp rtems_status_code rtems_libio_set_private_env(void) { rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 61658: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) return sc; 6165a: 6600 00f0 bnew 6174c /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 6165e: 203c 0009 bb78 movel #637816,%d0 61664: b0b9 0009 717c cmpl 9717c ,%d0 6166a: 6648 bnes 616b4 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 6166c: 4878 0048 pea 48 61670: 4eb9 0004 5d98 jsr 45d98 if (!tmp) 61676: 588f addql #4,%sp sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 61678: 2600 movel %d0,%d3 if (!tmp) 6167a: 6608 bnes 61684 6167c: 143c 001a moveb #26,%d2 <== NOT EXECUTED 61680: 6000 00ca braw 6174c <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_envd¸ 61684: 487a fec2 pea %pc@(61548 ) 61688: 4879 0009 717c pea 9717c 6168e: 42a7 clrl %sp@- 61690: 4eb9 0006 3308 jsr 63308 if (sc != RTEMS_SUCCESSFUL) { 61696: 4fef 000c lea %sp@(12),%sp 6169a: 4a80 tstl %d0 6169c: 6710 beqs 616ae /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 6169e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 616a0: 2400 movel %d0,%d2 <== NOT EXECUTED 616a2: 4eb9 0004 583c jsr 4583c <== NOT EXECUTED return sc; 616a8: 588f addql #4,%sp <== NOT EXECUTED 616aa: 6000 00a0 braw 6174c <== NOT EXECUTED } rtems_current_user_env = tmp; 616ae: 23c3 0009 717c movel %d3,9717c }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 616b4: 4878 0048 pea 48 616b8: 45f9 0007 8fec lea 78fec ,%a2 616be: 4879 0009 bb78 pea 9bb78 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 616c4: 260e movel %fp,%d3 616c6: 0683 ffff ffe8 addil #-24,%d3 616cc: 49f9 0004 5772 lea 45772 ,%a4 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 616d2: 2679 0009 717c moveal 9717c ,%a3 616d8: 2f0b movel %a3,%sp@- 616da: 4e92 jsr %a2@ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 616dc: 26ae fffc movel %fp@(-4),%a3@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 616e0: 4878 0014 pea 14 616e4: 2079 0009 bb60 moveal 9bb60 ,%a0 616ea: 41e8 001c lea %a0@(28),%a0 616ee: 2f08 movel %a0,%sp@- 616f0: 486b 0018 pea %a3@(24) 616f4: 4e92 jsr %a2@ * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 616f6: 42a7 clrl %sp@- 616f8: 2f03 movel %d3,%sp@- 616fa: 42a7 clrl %sp@- 616fc: 4878 0001 pea 1 61700: 4879 0009 6bb2 pea 96bb2 61706: 4e94 jsr %a4@ rtems_filesystem_root = loc; 61708: 4fef 002c lea %sp@(44),%sp 6170c: 4878 0014 pea 14 61710: 2079 0009 717c moveal 9717c ,%a0 61716: 41e8 0018 lea %a0@(24),%a0 6171a: 2f03 movel %d3,%sp@- 6171c: 2f08 movel %a0,%sp@- 6171e: 4e92 jsr %a2@ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 61720: 42a7 clrl %sp@- 61722: 2f03 movel %d3,%sp@- 61724: 42a7 clrl %sp@- 61726: 4878 0001 pea 1 6172a: 4879 0009 6bb2 pea 96bb2 61730: 4e94 jsr %a4@ rtems_filesystem_current = loc; 61732: 4fef 0020 lea %sp@(32),%sp 61736: 4878 0014 pea 14 6173a: 2039 0009 717c movel 9717c ,%d0 61740: 5880 addql #4,%d0 61742: 2f03 movel %d3,%sp@- 61744: 2f00 movel %d0,%sp@- 61746: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 61748: 4fef 000c lea %sp@(12),%sp } 6174c: 2002 movel %d2,%d0 6174e: 4cee 1c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a4 61754: 4e5e unlk %fp 61756: 4e75 rts 000615a2 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 615a2: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 615a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 615a8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 615ac: 42a7 clrl %sp@- <== NOT EXECUTED 615ae: 42a7 clrl %sp@- <== NOT EXECUTED 615b0: 4eb9 0006 2fa4 jsr 62fa4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 615b6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 615ba: 4a80 tstl %d0 <== NOT EXECUTED 615bc: 6678 bnes 61636 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 615be: 2479 0009 717c moveal 9717c ,%a2 <== NOT EXECUTED 615c4: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 615c8: b092 cmpl %a2@,%d0 <== NOT EXECUTED 615ca: 661c bnes 615e8 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 615cc: 4879 0009 717c pea 9717c <== NOT EXECUTED 615d2: 42a7 clrl %sp@- <== NOT EXECUTED 615d4: 4eb9 0006 339c jsr 6339c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 615da: 508f addql #8,%sp <== NOT EXECUTED 615dc: 4a80 tstl %d0 <== NOT EXECUTED 615de: 6656 bnes 61636 <== NOT EXECUTED free_user_env(tmp); 615e0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 615e2: 4eba ff64 jsr %pc@(61548 ) <== NOT EXECUTED 615e6: 588f addql #4,%sp <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 615e8: 486e fffc pea %fp@(-4) <== NOT EXECUTED 615ec: 4879 0009 717c pea 9717c <== NOT EXECUTED 615f2: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 615f6: 4eb9 0006 3410 jsr 63410 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 615fc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 61600: 4a80 tstl %d0 <== NOT EXECUTED 61602: 6626 bnes 6162a <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 61604: 487a ff42 pea %pc@(61548 ) <== NOT EXECUTED 61608: 4879 0009 717c pea 9717c <== NOT EXECUTED 6160e: 42a7 clrl %sp@- <== NOT EXECUTED 61610: 4eb9 0006 3308 jsr 63308 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 61616: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 6161a: 4a80 tstl %d0 <== NOT EXECUTED 6161c: 660c bnes 6162a <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 6161e: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED 61622: 23d0 0009 717c movel %a0@,9717c <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 61628: 600c bras 61636 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 6162a: 223c 0009 bb78 movel #637816,%d1 <== NOT EXECUTED 61630: 23c1 0009 717c movel %d1,9717c <== NOT EXECUTED return sc; } 61636: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 6163a: 4e5e unlk %fp <== NOT EXECUTED 6163c: 4e75 rts 00049154 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 49154: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 49156: 4e56 0000 linkw %fp,#0 4915a: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4915e: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 49160: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 49162: 7406 moveq #6,%d2 49164: b480 cmpl %d0,%d2 49166: 6604 bnes 4916c 49168: 7002 moveq #2,%d0 <== NOT EXECUTED 4916a: 6012 bras 4917e <== NOT EXECUTED fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4916c: 0801 0001 btst #1,%d1 49170: 6704 beqs 49176 49172: 4280 clrl %d0 49174: 6008 bras 4917e 49176: 2001 movel %d1,%d0 <== NOT EXECUTED 49178: e488 lsrl #2,%d0 <== NOT EXECUTED 4917a: 7401 moveq #1,%d2 <== NOT EXECUTED 4917c: c082 andl %d2,%d0 <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 4917e: 0801 0000 btst #0,%d1 49182: 6704 beqs 49188 fcntl_flags |= O_NONBLOCK; 49184: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 49188: 0801 0009 btst #9,%d1 4918c: 6704 beqs 49192 fcntl_flags |= O_APPEND; 4918e: 7408 moveq #8,%d2 49190: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 49192: 0801 000a btst #10,%d1 49196: 6704 beqs 4919c fcntl_flags |= O_CREAT; 49198: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 4919c: 241f movel %sp@+,%d2 4919e: 4e5e unlk %fp 491a0: 4e75 rts 00045e4c : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 45e4c: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 45e50: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45e52: 2f02 movel %d2,%sp@- <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 45e54: 486e fffc pea %fp@(-4) <== NOT EXECUTED 45e58: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 45e5c: 2f39 0009 6e80 movel 96e80 ,%sp@- <== NOT EXECUTED 45e62: 4eb9 0004 ab40 jsr 4ab40 <_Protected_heap_Get_block_size> <== NOT EXECUTED 45e68: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45e6c: 4a00 tstb %d0 <== NOT EXECUTED 45e6e: 671a beqs 45e8a <== NOT EXECUTED MSBUMP(lifetime_freed, size); 45e70: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 45e74: 4282 clrl %d2 <== NOT EXECUTED 45e76: d7b9 0009 bb5c addl %d3,9bb5c <== NOT EXECUTED 45e7c: 2039 0009 bb58 movel 9bb58 ,%d0<== NOT EXECUTED 45e82: d182 addxl %d2,%d0 <== NOT EXECUTED 45e84: 23c0 0009 bb58 movel %d0,9bb58 <== NOT EXECUTED } } 45e8a: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 45e8e: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 45e92: 4e5e unlk %fp <== NOT EXECUTED 45e94: 4e75 rts 00045e96 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 45e96: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 45e9a: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 45e9e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45ea0: 2f02 movel %d2,%sp@- <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 45ea2: 4a80 tstl %d0 <== NOT EXECUTED 45ea4: 674e beqs 45ef4 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 45ea6: 204e moveal %fp,%a0 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 45ea8: 4282 clrl %d2 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 45eaa: 42a0 clrl %a0@- <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 45eac: 2f08 movel %a0,%sp@- <== NOT EXECUTED 45eae: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45eb0: 2f39 0009 6e80 movel 96e80 ,%sp@- <== NOT EXECUTED 45eb6: 4eb9 0004 ab40 jsr 4ab40 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 45ebc: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 45ec0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 45ec4: 2039 0009 bb50 movel 9bb50 ,%d0<== NOT EXECUTED 45eca: d6b9 0009 bb54 addl 9bb54 ,%d3<== NOT EXECUTED 45ed0: d580 addxl %d0,%d2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 45ed2: 2003 movel %d3,%d0 <== NOT EXECUTED 45ed4: 90b9 0009 bb5c subl 9bb5c ,%d0<== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 45eda: 23c2 0009 bb50 movel %d2,9bb50 <== NOT EXECUTED 45ee0: 23c3 0009 bb54 movel %d3,9bb54 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 45ee6: b0b9 0009 bb4c cmpl 9bb4c ,%d0<== NOT EXECUTED 45eec: 6306 blss 45ef4 <== NOT EXECUTED s->max_depth = current_depth; 45eee: 23c0 0009 bb4c movel %d0,9bb4c <== NOT EXECUTED } 45ef4: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 45ef8: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 45efc: 4e5e unlk %fp <== NOT EXECUTED 45efe: 4e75 rts 00045f00 : #include #include static void rtems_malloc_statistics_initialize( void ) { 45f00: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 45f04: 4878 002c pea 2c <== NOT EXECUTED 45f08: 42a7 clrl %sp@- <== NOT EXECUTED 45f0a: 4879 0009 bb34 pea 9bb34 <== NOT EXECUTED 45f10: 4eb9 0007 9158 jsr 79158 <== NOT EXECUTED 45f16: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 45f1a: 4e5e unlk %fp <== NOT EXECUTED 45f1c: 4e75 rts <== NOT EXECUTED ... 0004da34 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 4da34: 4e56 0000 linkw %fp,#0 4da38: 2f0a movel %a2,%sp@- 4da3a: 246e 0008 moveal %fp@(8),%a2 4da3e: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 4da40: 4a8a tstl %a2 4da42: 6758 beqs 4da9c return EINVAL; *pointer = NULL; 4da44: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4da46: 7003 moveq #3,%d0 4da48: b0b9 0006 2194 cmpl 62194 <_System_state_Current>,%d0 4da4e: 660a bnes 4da5a 4da50: 4eb9 0004 3674 jsr 43674 4da56: 4a00 tstb %d0 4da58: 6742 beqs 4da9c /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4da5a: 4eb9 0004 36cc jsr 436cc uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 4da60: 42a7 clrl %sp@- 4da62: 2f2e 000c movel %fp@(12),%sp@- 4da66: 2f2e 0010 movel %fp@(16),%sp@- 4da6a: 2f39 0006 06f0 movel 606f0 ,%sp@- 4da70: 4eb9 0004 8018 jsr 48018 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4da76: 4fef 0010 lea %sp@(16),%sp 4da7a: 2400 movel %d0,%d2 4da7c: 6604 bnes 4da82 4da7e: 700c moveq #12,%d0 4da80: 601c bras 4da9e return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4da82: 2079 0006 0d96 moveal 60d96 ,%a0 4da88: 4a88 tstl %a0 4da8a: 670a beqs 4da96 (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4da8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4da8e: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4da92: 4e90 jsr %a0@ <== NOT EXECUTED 4da94: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 4da96: 2482 movel %d2,%a2@ 4da98: 4280 clrl %d0 return 0; 4da9a: 6002 bras 4da9e 4da9c: 7016 moveq #22,%d0 } 4da9e: 242e fff8 movel %fp@(-8),%d2 4daa2: 246e fffc moveal %fp@(-4),%a2 4daa6: 4e5e unlk %fp 4daa8: 4e75 rts ... 0004ed98 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 4ed98: 4e56 fff0 linkw %fp,#-16 4ed9c: 48d7 001c moveml %d2-%d4,%sp@ 4eda0: 262e 0008 movel %fp@(8),%d3 4eda4: 242e 000c movel %fp@(12),%d2 4eda8: 282e 0014 movel %fp@(20),%d4 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 4edac: 4a82 tstl %d2 4edae: 6752 beqs 4ee02 return RTEMS_INVALID_ADDRESS; if ( !count ) 4edb0: 4a84 tstl %d4 4edb2: 674e beqs 4ee02 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4edb4: 486e fffc pea %fp@(-4) 4edb8: 2f03 movel %d3,%sp@- 4edba: 4879 0007 5c42 pea 75c42 <_Message_queue_Information> 4edc0: 4eb9 0005 378c jsr 5378c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4edc6: 4fef 000c lea %sp@(12),%sp 4edca: 4aae fffc tstl %fp@(-4) 4edce: 6704 beqs 4edd4 4edd0: 7004 moveq #4,%d0 4edd2: 6030 bras 4ee04 case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 4edd4: 2f04 movel %d4,%sp@- 4edd6: 2040 moveal %d0,%a0 4edd8: 42a7 clrl %sp@- 4edda: 2f03 movel %d3,%sp@- 4eddc: 2f2e 0010 movel %fp@(16),%sp@- 4ede0: 2f02 movel %d2,%sp@- 4ede2: 4868 0014 pea %a0@(20) 4ede6: 4eb9 0005 2088 jsr 52088 <_CORE_message_queue_Broadcast> 4edec: 2400 movel %d0,%d2 NULL, #endif count ); _Thread_Enable_dispatch(); 4edee: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 4edf4: 2f02 movel %d2,%sp@- 4edf6: 4eb9 0004 f11c jsr 4f11c <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 4edfc: 4fef 001c lea %sp@(28),%sp 4ee00: 6002 bras 4ee04 4ee02: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ee04: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ee0a: 4e5e unlk %fp 4ee0c: 4e75 rts ... 0004ca78 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 4ca78: 4e56 ffe0 linkw %fp,#-32 4ca7c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ca80: 242e 0008 movel %fp@(8),%d2 4ca84: 262e 000c movel %fp@(12),%d3 4ca88: 282e 0010 movel %fp@(16),%d4 4ca8c: 2a2e 0014 movel %fp@(20),%d5 4ca90: 286e 0018 moveal %fp@(24),%a4 CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 4ca94: 4a82 tstl %d2 4ca96: 6606 bnes 4ca9e 4ca98: 7003 moveq #3,%d0 4ca9a: 6000 00a4 braw 4cb40 return RTEMS_INVALID_NAME; if ( !id ) 4ca9e: 4a8c tstl %a4 4caa0: 6606 bnes 4caa8 4caa2: 7009 moveq #9,%d0 4caa4: 6000 009a braw 4cb40 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 4caa8: 4a83 tstl %d3 4caaa: 6606 bnes 4cab2 4caac: 700a moveq #10,%d0 4caae: 6000 0090 braw 4cb40 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 4cab2: 4a84 tstl %d4 4cab4: 6606 bnes 4cabc 4cab6: 7008 moveq #8,%d0 4cab8: 6000 0086 braw 4cb40 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4cabc: 2039 0006 6248 movel 66248 <_Thread_Dispatch_disable_level>,%d0 4cac2: 5280 addql #1,%d0 4cac4: 23c0 0006 6248 movel %d0,66248 <_Thread_Dispatch_disable_level> #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 4caca: 4eb9 0005 2158 jsr 52158 <_Message_queue_Allocate> 4cad0: 2440 moveal %d0,%a2 if ( !the_message_queue ) { 4cad2: 4a80 tstl %d0 4cad4: 660a bnes 4cae0 _Thread_Enable_dispatch(); 4cad6: 4eb9 0004 f40a jsr 4f40a <_Thread_Enable_dispatch> 4cadc: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4cade: 6060 bras 4cb40 #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4cae0: 204e moveal %fp,%a0 4cae2: 47f9 0004 f40a lea 4f40a <_Thread_Enable_dispatch>,%a3 4cae8: 44c5 movew %d5,%ccr 4caea: 56c0 sne %d0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 4caec: 2545 0010 movel %d5,%a2@(16) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4caf0: 49c0 extbl %d0 4caf2: 5280 addql #1,%d0 4caf4: 2100 movel %d0,%a0@- else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 4caf6: 2f04 movel %d4,%sp@- 4caf8: 2f03 movel %d3,%sp@- 4cafa: 2f08 movel %a0,%sp@- 4cafc: 486a 0014 pea %a2@(20) 4cb00: 4eb9 0004 dc30 jsr 4dc30 <_CORE_message_queue_Initialize> 4cb06: 4fef 0010 lea %sp@(16),%sp 4cb0a: 4a00 tstb %d0 4cb0c: 6616 bnes 4cb24 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4cb0e: 2f0a movel %a2,%sp@- 4cb10: 4879 0006 6a8e pea 66a8e <_Message_queue_Information> 4cb16: 4eb9 0004 e9b8 jsr 4e9b8 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 4cb1c: 4e93 jsr %a3@ return RTEMS_UNSATISFIED; 4cb1e: 508f addql #8,%sp _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 4cb20: 700d moveq #13,%d0 return RTEMS_UNSATISFIED; 4cb22: 601c bras 4cb40 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cb24: 202a 0008 movel %a2@(8),%d0 4cb28: 4281 clrl %d1 4cb2a: 2079 0006 6aa6 moveal 66aa6 <_Message_queue_Information+0x18>,%a0 4cb30: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4cb32: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cb36: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 4cb3a: 2880 movel %d0,%a4@ name, 0 ); #endif _Thread_Enable_dispatch(); 4cb3c: 4e93 jsr %a3@ 4cb3e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4cb40: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 4cb46: 4e5e unlk %fp 4cb48: 4e75 rts ... 0004fa24 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 4fa24: 4e56 fffc linkw %fp,#-4 4fa28: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4fa2a: 486e fffc pea %fp@(-4) 4fa2e: 2f2e 0008 movel %fp@(8),%sp@- 4fa32: 4879 0006 8d8c pea 68d8c <_Message_queue_Information> 4fa38: 4eb9 0004 9e20 jsr 49e20 <_Objects_Get> register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4fa3e: 4fef 000c lea %sp@(12),%sp 4fa42: 2440 moveal %d0,%a2 4fa44: 4aae fffc tstl %fp@(-4) 4fa48: 6704 beqs 4fa4e 4fa4a: 7004 moveq #4,%d0 4fa4c: 6038 bras 4fa86 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 4fa4e: 2f00 movel %d0,%sp@- 4fa50: 4879 0006 8d8c pea 68d8c <_Message_queue_Information> 4fa56: 4eb9 0004 9a54 jsr 49a54 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 4fa5c: 4878 0005 pea 5 4fa60: 42a7 clrl %sp@- 4fa62: 486a 0014 pea %a2@(20) 4fa66: 4eb9 0005 0010 jsr 50010 <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4fa6c: 2f0a movel %a2,%sp@- 4fa6e: 4879 0006 8d8c pea 68d8c <_Message_queue_Information> 4fa74: 4eb9 0004 9cc8 jsr 49cc8 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 4fa7a: 4eb9 0004 a71e jsr 4a71e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4fa80: 4fef 001c lea %sp@(28),%sp 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 4fa84: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4fa86: 246e fff8 moveal %fp@(-8),%a2 4fa8a: 4e5e unlk %fp 4fa8c: 4e75 rts ... 0004efa4 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 4efa4: 4e56 fffc linkw %fp,#-4 4efa8: 2f0a movel %a2,%sp@- 4efaa: 246e 000c moveal %fp@(12),%a2 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4efae: 4a8a tstl %a2 4efb0: 6604 bnes 4efb6 4efb2: 7009 moveq #9,%d0 4efb4: 6030 bras 4efe6 4efb6: 486e fffc pea %fp@(-4) 4efba: 2f2e 0008 movel %fp@(8),%sp@- 4efbe: 4879 0007 5c42 pea 75c42 <_Message_queue_Information> 4efc4: 4eb9 0005 378c jsr 5378c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4efca: 4fef 000c lea %sp@(12),%sp 4efce: 4aae fffc tstl %fp@(-4) 4efd2: 6704 beqs 4efd8 4efd4: 7004 moveq #4,%d0 4efd6: 600e bras 4efe6 case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 4efd8: 2040 moveal %d0,%a0 4efda: 24a8 005c movel %a0@(92),%a2@ _Thread_Enable_dispatch(); 4efde: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 4efe4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4efe6: 246e fff8 moveal %fp@(-8),%a2 4efea: 4e5e unlk %fp 4efec: 4e75 rts ... 0004cb4c : rtems_status_code rtems_message_queue_ident( rtems_name name, uint32_t node, rtems_id *id ) { 4cb4c: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( 4cb50: 2f2e 0010 movel %fp@(16),%sp@- 4cb54: 2f2e 000c movel %fp@(12),%sp@- 4cb58: 2f2e 0008 movel %fp@(8),%sp@- 4cb5c: 4879 0006 6a8e pea 66a8e <_Message_queue_Information> 4cb62: 4eb9 0004 ec98 jsr 4ec98 <_Objects_Name_to_id_u32> 4cb68: 41f9 0006 3880 lea 63880 <_Status_Object_name_errors_to_status>,%a0 node, id ); return _Status_Object_name_errors_to_status[ status ]; } 4cb6e: 4e5e unlk %fp 4cb70: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4cb74: 4e75 rts ... 0004cb78 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 4cb78: 4e56 fff0 linkw %fp,#-16 4cb7c: 48d7 001c moveml %d2-%d4,%sp@ 4cb80: 242e 000c movel %fp@(12),%d2 4cb84: 262e 0010 movel %fp@(16),%d3 register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 4cb88: 4a82 tstl %d2 4cb8a: 6766 beqs 4cbf2 return RTEMS_INVALID_ADDRESS; if ( !size ) 4cb8c: 4a83 tstl %d3 4cb8e: 6762 beqs 4cbf2 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4cb90: 486e fffc pea %fp@(-4) 4cb94: 2f2e 0008 movel %fp@(8),%sp@- 4cb98: 4879 0006 6a8e pea 66a8e <_Message_queue_Information> 4cb9e: 4eb9 0004 eb10 jsr 4eb10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4cba4: 4fef 000c lea %sp@(12),%sp 4cba8: 4aae fffc tstl %fp@(-4) 4cbac: 6704 beqs 4cbb2 4cbae: 7004 moveq #4,%d0 4cbb0: 6042 bras 4cbf4 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 4cbb2: 7201 moveq #1,%d1 4cbb4: 7801 moveq #1,%d4 4cbb6: 2040 moveal %d0,%a0 4cbb8: c2ae 0014 andl %fp@(20),%d1 4cbbc: 2f2e 0018 movel %fp@(24),%sp@- 4cbc0: b384 eorl %d1,%d4 4cbc2: 2f04 movel %d4,%sp@- 4cbc4: 2f03 movel %d3,%sp@- 4cbc6: 2f02 movel %d2,%sp@- 4cbc8: 2f28 0008 movel %a0@(8),%sp@- 4cbcc: 4868 0014 pea %a0@(20) 4cbd0: 4eb9 0004 dcec jsr 4dcec <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 4cbd6: 4eb9 0004 f40a jsr 4f40a <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 4cbdc: 2079 0006 6302 moveal 66302 <_Thread_Executing>,%a0 4cbe2: 2f28 0034 movel %a0@(52),%sp@- 4cbe6: 4eb9 0004 cc78 jsr 4cc78 <_Message_queue_Translate_core_message_queue_return_code> 4cbec: 4fef 001c lea %sp@(28),%sp 4cbf0: 6002 bras 4cbf4 4cbf2: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cbf4: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cbfa: 4e5e unlk %fp 4cbfc: 4e75 rts ... 00046584 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 46584: 4e56 0000 linkw %fp,#0 46588: 2f0a movel %a2,%sp@- 4658a: 246e 0010 moveal %fp@(16),%a2 4658e: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 46590: 4a8a tstl %a2 46592: 6604 bnes 46598 46594: 7009 moveq #9,%d0 46596: 6052 bras 465ea return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 46598: 2f2e 000c movel %fp@(12),%sp@- 4659c: 2f2e 0008 movel %fp@(8),%sp@- 465a0: 4eb9 0004 7e98 jsr 47e98 <_Objects_Get_information> if ( !obj_info ) 465a6: 508f addql #8,%sp * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 465a8: 2040 moveal %d0,%a0 if ( !obj_info ) 465aa: 4a80 tstl %d0 465ac: 6604 bnes 465b2 465ae: 700a moveq #10,%d0 465b0: 6038 bras 465ea return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 465b2: 24a8 0006 movel %a0@(6),%a2@ info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 465b6: 4282 clrl %d2 465b8: 7001 moveq #1,%d0 465ba: 4281 clrl %d1 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 465bc: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 465c2: 3428 000e movew %a0@(14),%d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 465c6: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 465cc: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 465d0: 600e bras 465e0 if ( !obj_info->local_table[i] ) 465d2: 2268 0018 moveal %a0@(24),%a1 465d6: 4ab1 0c00 tstl %a1@(00000000,%d0:l:4) 465da: 6602 bnes 465de unallocated++; 465dc: 5281 addql #1,%d1 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 465de: 5280 addql #1,%d0 465e0: b480 cmpl %d0,%d2 465e2: 64ee bccs 465d2 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 465e4: 2541 000e movel %d1,%a2@(14) 465e8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 465ea: 242e fff8 movel %fp@(-8),%d2 465ee: 246e fffc moveal %fp@(-4),%a2 465f2: 4e5e unlk %fp 465f4: 4e75 rts ... 00046604 : #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { return OBJECTS_ITRON_API; } 46604: 7004 moveq #4,%d0 #include #include #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { 46606: 4e56 0000 linkw %fp,#0 return OBJECTS_ITRON_API; } 4660a: 4e5e unlk %fp 4660c: 4e75 rts ... 00046610 : #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { return OBJECTS_INTERNAL_API; } 46610: 7001 moveq #1,%d0 #include #include #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { 46612: 4e56 0000 linkw %fp,#0 return OBJECTS_INTERNAL_API; } 46616: 4e5e unlk %fp 46618: 4e75 rts ... 0004661c : #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 4661c: 4280 clrl %d0 return _Objects_Get_API( id ); } 4661e: 7207 moveq #7,%d1 #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 46620: 4e56 0000 linkw %fp,#0 46624: 102e 0008 moveb %fp@(8),%d0 return _Objects_Get_API( id ); } 46628: 4e5e unlk %fp 4662a: c081 andl %d1,%d0 4662c: 4e75 rts ... 00046640 : int rtems_object_id_get_index( rtems_id id ) { return _Objects_Get_index( id ); } 46640: 4280 clrl %d0 #undef rtems_object_id_get_index int rtems_object_id_get_index( rtems_id id ) { 46642: 4e56 0000 linkw %fp,#0 return _Objects_Get_index( id ); } 46646: 302e 000a movew %fp@(10),%d0 4664a: 4e5e unlk %fp 4664c: 4e75 rts ... 00046650 : int rtems_object_id_get_node( rtems_id id ) { return _Objects_Get_node( id ); } 46650: 4280 clrl %d0 #undef rtems_object_id_get_node int rtems_object_id_get_node( rtems_id id ) { 46652: 4e56 0000 linkw %fp,#0 return _Objects_Get_node( id ); } 46656: 102e 0009 moveb %fp@(9),%d0 4665a: 4e5e unlk %fp 4665c: 4e75 rts ... 000420ba : void rtems_panic( const char *printf_format, ... ) { 420ba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 420be: 486e 000c pea %fp@(12) <== NOT EXECUTED 420c2: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 420c6: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 420cc: 4eba fe66 jsr %pc@(41f34 ) <== NOT EXECUTED 420d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED va_end(arglist); } 420d4: 4e5e unlk %fp <== NOT EXECUTED 420d6: 4e75 rts 0004f28c : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 4f28c: 4e56 fffc linkw %fp,#-4 4f290: 2f0b movel %a3,%sp@- 4f292: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4f294: 486e fffc pea %fp@(-4) 4f298: 2f2e 0008 movel %fp@(8),%sp@- 4f29c: 4879 0007 5272 pea 75272 <_Partition_Information> 4f2a2: 4eb9 0005 378c jsr 5378c <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4f2a8: 4fef 000c lea %sp@(12),%sp 4f2ac: 2440 moveal %d0,%a2 4f2ae: 4aae fffc tstl %fp@(-4) 4f2b2: 6704 beqs 4f2b8 4f2b4: 7004 moveq #4,%d0 4f2b6: 6036 bras 4f2ee 4f2b8: 47f9 0005 4012 lea 54012 <_Thread_Enable_dispatch>,%a3 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 4f2be: 4aaa 0020 tstl %a2@(32) 4f2c2: 6626 bnes 4f2ea _Objects_Close( &_Partition_Information, &the_partition->Object ); 4f2c4: 2f00 movel %d0,%sp@- 4f2c6: 4879 0007 5272 pea 75272 <_Partition_Information> 4f2cc: 4eb9 0005 3388 jsr 53388 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 4f2d2: 2f0a movel %a2,%sp@- 4f2d4: 4879 0007 5272 pea 75272 <_Partition_Information> 4f2da: 4eb9 0005 35fc jsr 535fc <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 4f2e0: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 4f2e2: 4fef 0010 lea %sp@(16),%sp 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 4f2e6: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4f2e8: 6004 bras 4f2ee } _Thread_Enable_dispatch(); 4f2ea: 4e93 jsr %a3@ 4f2ec: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4f2ee: 246e fff4 moveal %fp@(-12),%a2 4f2f2: 266e fff8 moveal %fp@(-8),%a3 4f2f6: 4e5e unlk %fp 4f2f8: 4e75 rts ... 0004f364 : rtems_status_code rtems_partition_ident( rtems_name name, uint32_t node, rtems_id *id ) { 4f364: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); 4f368: 2f2e 0010 movel %fp@(16),%sp@- 4f36c: 2f2e 000c movel %fp@(12),%sp@- 4f370: 2f2e 0008 movel %fp@(8),%sp@- 4f374: 4879 0007 5272 pea 75272 <_Partition_Information> 4f37a: 4eb9 0005 39a0 jsr 539a0 <_Objects_Name_to_id_u32> 4f380: 41f9 0006 e700 lea 6e700 <_Status_Object_name_errors_to_status>,%a0 return _Status_Object_name_errors_to_status[ status ]; } 4f386: 4e5e unlk %fp 4f388: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4f38c: 4e75 rts ... 0004f390 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 4f390: 4e56 fffc linkw %fp,#-4 4f394: 2f0a movel %a2,%sp@- 4f396: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4f398: 486e fffc pea %fp@(-4) 4f39c: 2f2e 0008 movel %fp@(8),%sp@- 4f3a0: 4879 0007 5272 pea 75272 <_Partition_Information> 4f3a6: 242e 000c movel %fp@(12),%d2 4f3aa: 4eb9 0005 378c jsr 5378c <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4f3b0: 4fef 000c lea %sp@(12),%sp 4f3b4: 2440 moveal %d0,%a2 4f3b6: 4aae fffc tstl %fp@(-4) 4f3ba: 6704 beqs 4f3c0 4f3bc: 7004 moveq #4,%d0 4f3be: 603c bras 4f3fc ) { void *starting; void *ending; starting = the_partition->starting_address; 4f3c0: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 4f3c4: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 4f3c8: b082 cmpl %d2,%d0 4f3ca: 623c bhis 4f408 4f3cc: d280 addl %d0,%d1 4f3ce: b282 cmpl %d2,%d1 4f3d0: 6536 bcss 4f408 return ( 4f3d2: 2202 movel %d2,%d1 4f3d4: 9280 subl %d0,%d1 4f3d6: 2001 movel %d1,%d0 4f3d8: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 4f3de: 4a81 tstl %d1 4f3e0: 6626 bnes 4f408 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 4f3e2: 2f02 movel %d2,%sp@- 4f3e4: 486a 0024 pea %a2@(36) 4f3e8: 4eb9 0005 1fdc jsr 51fdc <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 4f3ee: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 4f3f2: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4f3f8: 508f addql #8,%sp case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); 4f3fa: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4f3fc: 242e fff4 movel %fp@(-12),%d2 4f400: 246e fff8 moveal %fp@(-8),%a2 4f404: 4e5e unlk %fp 4f406: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4f408: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 4f40e: 7009 moveq #9,%d0 return RTEMS_INVALID_ADDRESS; 4f410: 60ea bras 4f3fc ... 0004abce : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4abce: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 4abd2: 4a39 0005 bac4 tstb 5bac4 4abd8: 6740 beqs 4ac1a return; if (rtems_pipe_semaphore) 4abda: 4ab9 0005 c440 tstl 5c440 <== NOT EXECUTED 4abe0: 6638 bnes 4ac1a <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4abe2: 4879 0005 c440 pea 5c440 <== NOT EXECUTED 4abe8: 42a7 clrl %sp@- <== NOT EXECUTED 4abea: 4878 0054 pea 54 <== NOT EXECUTED 4abee: 4878 0001 pea 1 <== NOT EXECUTED 4abf2: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4abf8: 4eb9 0004 4cf8 jsr 44cf8 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 4abfe: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4ac02: 4a80 tstl %d0 <== NOT EXECUTED 4ac04: 6708 beqs 4ac0e <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4ac06: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ac08: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4ac0e: 4eb9 0004 4910 jsr 44910 <== NOT EXECUTED rtems_pipe_no = now; 4ac14: 33c0 0005 c448 movew %d0,5c448 <== NOT EXECUTED } 4ac1a: 4e5e unlk %fp 4ac1c: 4e75 rts 0004e8c4 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 4e8c4: 4e56 fffc linkw %fp,#-4 4e8c8: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4e8ca: 486e fffc pea %fp@(-4) 4e8ce: 2f2e 0008 movel %fp@(8),%sp@- 4e8d2: 4879 0007 5238 pea 75238 <_Dual_ported_memory_Information> 4e8d8: 4eb9 0005 378c jsr 5378c <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e8de: 4fef 000c lea %sp@(12),%sp 4e8e2: 2400 movel %d0,%d2 4e8e4: 4aae fffc tstl %fp@(-4) 4e8e8: 6704 beqs 4e8ee 4e8ea: 7004 moveq #4,%d0 4e8ec: 6028 bras 4e916 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 4e8ee: 2f00 movel %d0,%sp@- 4e8f0: 4879 0007 5238 pea 75238 <_Dual_ported_memory_Information> 4e8f6: 4eb9 0005 3388 jsr 53388 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 4e8fc: 2f02 movel %d2,%sp@- 4e8fe: 4879 0007 5238 pea 75238 <_Dual_ported_memory_Information> 4e904: 4eb9 0005 35fc jsr 535fc <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 4e90a: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4e910: 4fef 0010 lea %sp@(16),%sp switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 4e914: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e916: 242e fff8 movel %fp@(-8),%d2 4e91a: 4e5e unlk %fp 4e91c: 4e75 rts ... 0004e920 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 4e920: 4e56 fffc linkw %fp,#-4 4e924: 2f0a movel %a2,%sp@- 4e926: 246e 0010 moveal %fp@(16),%a2 4e92a: 2f02 movel %d2,%sp@- 4e92c: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 4e930: 4a8a tstl %a2 4e932: 6604 bnes 4e938 4e934: 7009 moveq #9,%d0 4e936: 6042 bras 4e97a RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4e938: 486e fffc pea %fp@(-4) 4e93c: 2f2e 0008 movel %fp@(8),%sp@- 4e940: 4879 0007 5238 pea 75238 <_Dual_ported_memory_Information> 4e946: 4eb9 0005 378c jsr 5378c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e94c: 4fef 000c lea %sp@(12),%sp 4e950: 2040 moveal %d0,%a0 4e952: 4aae fffc tstl %fp@(-4) 4e956: 6704 beqs 4e95c 4e958: 7004 moveq #4,%d0 4e95a: 601e bras 4e97a case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 4e95c: 2002 movel %d2,%d0 4e95e: 90a8 0014 subl %a0@(20),%d0 if ( ending > the_port->length ) 4e962: b0a8 0018 cmpl %a0@(24),%d0 4e966: 6304 blss 4e96c *internal = external; 4e968: 2482 movel %d2,%a2@ 4e96a: 6006 bras 4e972 else *internal = _Addresses_Add_offset( the_port->internal_base, 4e96c: d0a8 0010 addl %a0@(16),%d0 4e970: 2480 movel %d0,%a2@ ending ); _Thread_Enable_dispatch(); 4e972: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 4e978: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e97a: 242e fff4 movel %fp@(-12),%d2 4e97e: 246e fff8 moveal %fp@(-8),%a2 4e982: 4e5e unlk %fp 4e984: 4e75 rts ... 0004e9b0 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 4e9b0: 4e56 fffc linkw %fp,#-4 4e9b4: 2f0a movel %a2,%sp@- 4e9b6: 246e 0010 moveal %fp@(16),%a2 4e9ba: 2f02 movel %d2,%sp@- 4e9bc: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 4e9c0: 4a8a tstl %a2 4e9c2: 6604 bnes 4e9c8 4e9c4: 7009 moveq #9,%d0 4e9c6: 6042 bras 4ea0a 4e9c8: 486e fffc pea %fp@(-4) 4e9cc: 2f2e 0008 movel %fp@(8),%sp@- 4e9d0: 4879 0007 5238 pea 75238 <_Dual_ported_memory_Information> 4e9d6: 4eb9 0005 378c jsr 5378c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e9dc: 4fef 000c lea %sp@(12),%sp 4e9e0: 2040 moveal %d0,%a0 4e9e2: 4aae fffc tstl %fp@(-4) 4e9e6: 6704 beqs 4e9ec 4e9e8: 7004 moveq #4,%d0 4e9ea: 601e bras 4ea0a case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 4e9ec: 2002 movel %d2,%d0 4e9ee: 90a8 0010 subl %a0@(16),%d0 if ( ending > the_port->length ) 4e9f2: b0a8 0018 cmpl %a0@(24),%d0 4e9f6: 6304 blss 4e9fc *external = internal; 4e9f8: 2482 movel %d2,%a2@ 4e9fa: 6006 bras 4ea02 else *external = _Addresses_Add_offset( the_port->external_base, 4e9fc: d0a8 0014 addl %a0@(20),%d0 4ea00: 2480 movel %d0,%a2@ ending ); _Thread_Enable_dispatch(); 4ea02: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 4ea08: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ea0a: 242e fff4 movel %fp@(-12),%d2 4ea0e: 246e fff8 moveal %fp@(-8),%a2 4ea12: 4e5e unlk %fp 4ea14: 4e75 rts ... 00045930 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 45930: 4e56 fff0 linkw %fp,#-16 45934: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 45938: 242e 0008 movel %fp@(8),%d2 4593c: 286e 000c moveal %fp@(12),%a4 Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 45940: 6606 bnes 45948 45942: 7003 moveq #3,%d0 45944: 6000 009e braw 459e4 return RTEMS_INVALID_NAME; if ( !id ) 45948: 4a8c tstl %a4 4594a: 6606 bnes 45952 4594c: 7009 moveq #9,%d0 4594e: 6000 0094 braw 459e4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45952: 2039 0005 e8d0 movel 5e8d0 <_Thread_Dispatch_disable_level>,%d0 45958: 5280 addql #1,%d0 4595a: 23c0 0005 e8d0 movel %d0,5e8d0 <_Thread_Dispatch_disable_level> * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 45960: 4879 0005 e7cc pea 5e7cc <_Rate_monotonic_Information> 45966: 47f9 0004 82be lea 482be <_Thread_Enable_dispatch>,%a3 4596c: 4eb9 0004 7594 jsr 47594 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 45972: 588f addql #4,%sp 45974: 2440 moveal %d0,%a2 45976: 4a80 tstl %d0 45978: 6606 bnes 45980 _Thread_Enable_dispatch(); 4597a: 4e93 jsr %a3@ 4597c: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4597e: 6064 bras 459e4 } the_period->owner = _Thread_Executing; 45980: 41f9 0005 e98a lea 5e98a <_Thread_Executing>,%a0 45986: 2550 0040 movel %a0@,%a2@(64) the_period->state = RATE_MONOTONIC_INACTIVE; 4598a: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4598e: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; 45992: 42aa 002c clrl %a2@(44) the_watchdog->id = id; 45996: 42aa 0030 clrl %a2@(48) the_watchdog->user_data = user_data; 4599a: 42aa 0034 clrl %a2@(52) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 4599e: 4878 0038 pea 38 459a2: 42a7 clrl %sp@- 459a4: 486a 0054 pea %a2@(84) 459a8: 4eb9 0004 e964 jsr 4e964 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 459ae: 202a 0008 movel %a2@(8),%d0 459b2: 4281 clrl %d1 459b4: 2079 0005 e7e4 moveal 5e7e4 <_Rate_monotonic_Information+0x18>,%a0 459ba: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 459bc: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 459c0: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) 459c4: 223c 7fff ffff movel #2147483647,%d1 459ca: 2541 005c movel %d1,%a2@(92) 459ce: 2541 0060 movel %d1,%a2@(96) 459d2: 2541 0074 movel %d1,%a2@(116) 459d6: 2541 0078 movel %d1,%a2@(120) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 459da: 2880 movel %d0,%a4@ _Thread_Enable_dispatch(); 459dc: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 459de: 4fef 000c lea %sp@(12),%sp &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; _Thread_Enable_dispatch(); 459e2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 459e4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 459ea: 4e5e unlk %fp 459ec: 4e75 rts ... 000713e4 : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { 713e4: 4e56 fffc linkw %fp,#-4 713e8: 2f0a movel %a2,%sp@- 713ea: 246e 000c moveal %fp@(12),%a2 Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) 713ee: 4a8a tstl %a2 713f0: 6606 bnes 713f8 713f2: 7009 moveq #9,%d0 713f4: 6000 0098 braw 7148e 713f8: 486e fffc pea %fp@(-4) 713fc: 2f2e 0008 movel %fp@(8),%sp@- 71400: 4879 0009 c72c pea 9c72c <_Rate_monotonic_Information> 71406: 4eb9 0004 a898 jsr 4a898 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7140c: 4fef 000c lea %sp@(12),%sp 71410: 2040 moveal %d0,%a0 71412: 4aae fffc tstl %fp@(-4) 71416: 6704 beqs 7141c 71418: 7004 moveq #4,%d0 7141a: 6072 bras 7148e case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; 7141c: 24a8 0054 movel %a0@(84),%a2@ dst->missed_count = src->missed_count; 71420: 2568 0058 0004 movel %a0@(88),%a2@(4) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time ); 71426: 2028 005c movel %a0@(92),%d0 7142a: 2228 0060 movel %a0@(96),%d1 7142e: 2540 0008 movel %d0,%a2@(8) 71432: 2541 000c movel %d1,%a2@(12) _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); 71436: 2028 0064 movel %a0@(100),%d0 7143a: 2228 0068 movel %a0@(104),%d1 7143e: 2540 0010 movel %d0,%a2@(16) 71442: 2541 0014 movel %d1,%a2@(20) _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); 71446: 2028 006c movel %a0@(108),%d0 7144a: 2228 0070 movel %a0@(112),%d1 7144e: 2540 0018 movel %d0,%a2@(24) 71452: 2541 001c movel %d1,%a2@(28) _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); 71456: 2028 0074 movel %a0@(116),%d0 7145a: 2228 0078 movel %a0@(120),%d1 7145e: 2540 0020 movel %d0,%a2@(32) 71462: 2541 0024 movel %d1,%a2@(36) _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); 71466: 2028 007c movel %a0@(124),%d0 7146a: 2228 0080 movel %a0@(128),%d1 7146e: 2540 0028 movel %d0,%a2@(40) 71472: 2541 002c movel %d1,%a2@(44) _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); 71476: 2028 0084 movel %a0@(132),%d0 7147a: 2228 0088 movel %a0@(136),%d1 7147e: 2540 0030 movel %d0,%a2@(48) 71482: 2541 0034 movel %d1,%a2@(52) dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); 71486: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> 7148c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7148e: 246e fff8 moveal %fp@(-8),%a2 71492: 4e5e unlk %fp 71494: 4e75 rts ... 00071498 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 71498: 4e56 ffec linkw %fp,#-20 7149c: 2f0a movel %a2,%sp@- 7149e: 246e 000c moveal %fp@(12),%a2 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 714a2: 4a8a tstl %a2 714a4: 6606 bnes 714ac 714a6: 7009 moveq #9,%d0 714a8: 6000 0094 braw 7153e 714ac: 486e fffc pea %fp@(-4) 714b0: 2f2e 0008 movel %fp@(8),%sp@- 714b4: 4879 0009 c72c pea 9c72c <_Rate_monotonic_Information> 714ba: 4eb9 0004 a898 jsr 4a898 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 714c0: 4fef 000c lea %sp@(12),%sp 714c4: 2040 moveal %d0,%a0 714c6: 4aae fffc tstl %fp@(-4) 714ca: 6704 beqs 714d0 714cc: 7004 moveq #4,%d0 714ce: 606e bras 7153e case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 714d0: 2268 0040 moveal %a0@(64),%a1 status->state = the_period->state; 714d4: 2028 0038 movel %a0@(56),%d0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 714d8: 24a9 0008 movel %a1@(8),%a2@ status->state = the_period->state; 714dc: 2540 0004 movel %d0,%a2@(4) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 714e0: 6612 bnes 714f4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); _Timespec_Set_to_zero( &status->executed_since_last_period ); 714e2: 42aa 0014 clrl %a2@(20) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 714e6: 42aa 0008 clrl %a2@(8) 714ea: 42aa 000c clrl %a2@(12) _Timespec_Set_to_zero( &status->executed_since_last_period ); 714ee: 42aa 0010 clrl %a2@(16) 714f2: 6042 bras 71536 /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 714f4: 486e fff4 pea %fp@(-12) 714f8: 486e ffec pea %fp@(-20) 714fc: 2f08 movel %a0,%sp@- 714fe: 4eb9 0007 15c0 jsr 715c0 <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 71504: 4fef 000c lea %sp@(12),%sp 71508: 4a00 tstb %d0 7150a: 660a bnes 71516 _Thread_Enable_dispatch(); 7150c: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> 71512: 700b moveq #11,%d0 return RTEMS_NOT_DEFINED; 71514: 6028 bras 7153e #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 71516: 202e fff4 movel %fp@(-12),%d0 7151a: 222e fff8 movel %fp@(-8),%d1 7151e: 2540 0010 movel %d0,%a2@(16) 71522: 2541 0014 movel %d1,%a2@(20) _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 71526: 202e ffec movel %fp@(-20),%d0 7152a: 222e fff0 movel %fp@(-16),%d1 7152e: 2540 0008 movel %d0,%a2@(8) 71532: 2541 000c movel %d1,%a2@(12) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 71536: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> 7153c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7153e: 246e ffe8 moveal %fp@(-24),%a2 71542: 4e5e unlk %fp 71544: 4e75 rts ... 0007175c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 7175c: 4e56 ffec linkw %fp,#-20 71760: 48d7 041c moveml %d2-%d4/%a2,%sp@ 71764: 486e fffc pea %fp@(-4) 71768: 262e 0008 movel %fp@(8),%d3 7176c: 2f03 movel %d3,%sp@- 7176e: 4879 0009 c72c pea 9c72c <_Rate_monotonic_Information> 71774: 242e 000c movel %fp@(12),%d2 71778: 4eb9 0004 a898 jsr 4a898 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7177e: 4fef 000c lea %sp@(12),%sp 71782: 2440 moveal %d0,%a2 71784: 4aae fffc tstl %fp@(-4) 71788: 6600 0138 bnew 718c2 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 7178c: 2039 0009 bd42 movel 9bd42 <_Thread_Executing>,%d0 71792: b0aa 0040 cmpl %a2@(64),%d0 71796: 670c beqs 717a4 _Thread_Enable_dispatch(); 71798: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> 7179e: 7817 moveq #23,%d4 return RTEMS_NOT_OWNER_OF_RESOURCE; 717a0: 6000 0122 braw 718c4 } if ( length == RTEMS_PERIOD_STATUS ) { 717a4: 4a82 tstl %d2 717a6: 6622 bnes 717ca switch ( the_period->state ) { 717a8: 202a 0038 movel %a2@(56),%d0 717ac: 7204 moveq #4,%d1 717ae: b280 cmpl %d0,%d1 717b0: 6404 bccs 717b6 717b2: 4284 clrl %d4 <== NOT EXECUTED 717b4: 600a bras 717c0 <== NOT EXECUTED 717b6: 41f9 0009 5cb8 lea 95cb8 ,%a0 717bc: 2830 0c00 movel %a0@(00000000,%d0:l:4),%d4 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 717c0: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> return( return_value ); 717c6: 6000 00fc braw 718c4 } _ISR_Disable( level ); 717ca: 203c 0000 0700 movel #1792,%d0 717d0: 40c4 movew %sr,%d4 717d2: 8084 orl %d4,%d0 717d4: 46c0 movew %d0,%sr switch ( the_period->state ) { 717d6: 202a 0038 movel %a2@(56),%d0 717da: 7202 moveq #2,%d1 717dc: b280 cmpl %d0,%d1 717de: 6740 beqs 71820 717e0: 123c 0004 moveb #4,%d1 717e4: b280 cmpl %d0,%d1 717e6: 6700 00a4 beqw 7188c 717ea: 4a80 tstl %d0 717ec: 6600 00d4 bnew 718c2 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 717f0: 46c4 movew %d4,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 717f2: 2f0a movel %a2,%sp@- ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 717f4: 4284 clrl %d4 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 717f6: 4eb9 0007 1548 jsr 71548 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 717fc: 203c 0007 18d0 movel #465104,%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 71802: 7202 moveq #2,%d1 71804: 2540 002c movel %d0,%a2@(44) the_watchdog->id = id; 71808: 2543 0030 movel %d3,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7180c: 2542 001c movel %d2,%a2@(28) 71810: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 71814: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 71818: 42aa 0034 clrl %a2@(52) 7181c: 6000 0084 braw 718a2 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 71820: 2f0a movel %a2,%sp@- 71822: 4eb9 0007 1668 jsr 71668 <_Rate_monotonic_Update_statistics> * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; 71828: 2542 003c movel %d2,%a2@(60) /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 7182c: 7401 moveq #1,%d2 7182e: 2542 0038 movel %d2,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 71832: 46c4 movew %d4,%sr _Thread_Executing->Wait.id = the_period->Object.id; 71834: 2079 0009 bd42 moveal 9bd42 <_Thread_Executing>,%a0 7183a: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 71840: 4878 4000 pea 4000 71844: 2f08 movel %a0,%sp@- 71846: 4eb9 0004 b970 jsr 4b970 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 7184c: 203c 0000 0700 movel #1792,%d0 71852: 40c1 movew %sr,%d1 71854: 8081 orl %d1,%d0 71856: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 71858: 143c 0002 moveb #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 7185c: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 71860: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 71864: 46c1 movew %d1,%sr /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 71866: 7203 moveq #3,%d1 71868: 4fef 000c lea %sp@(12),%sp 7186c: b280 cmpl %d0,%d1 7186e: 6612 bnes 71882 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 71870: 4878 4000 pea 4000 71874: 2f39 0009 bd42 movel 9bd42 <_Thread_Executing>,%sp@- 7187a: 4eb9 0004 ad98 jsr 4ad98 <_Thread_Clear_state> 71880: 508f addql #8,%sp _Thread_Enable_dispatch(); 71882: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> 71888: 4284 clrl %d4 return RTEMS_SUCCESSFUL; 7188a: 6038 bras 718c4 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 7188c: 2f0a movel %a2,%sp@- 7188e: 4eb9 0007 1668 jsr 71668 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 71894: 46c4 movew %d4,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 71896: 7002 moveq #2,%d0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 71898: 7806 moveq #6,%d4 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7189a: 2542 001c movel %d2,%a2@(28) */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 7189e: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; 718a2: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 718a6: 486a 0010 pea %a2@(16) 718aa: 4879 0009 bd60 pea 9bd60 <_Watchdog_Ticks_chain> 718b0: 4eb9 0004 c0b8 jsr 4c0b8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 718b6: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 718bc: 4fef 000c lea %sp@(12),%sp 718c0: 6002 bras 718c4 718c2: 7804 moveq #4,%d4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 718c4: 2004 movel %d4,%d0 718c6: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 718cc: 4e5e unlk %fp 718ce: 4e75 rts 00062dd6 : void rtems_rate_monotonic_report_statistics( void ) { 62dd6: 4e56 0000 linkw %fp,#0 rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 62dda: 4879 0004 681c pea 4681c 62de0: 42a7 clrl %sp@- 62de2: 4eb9 0006 2c60 jsr 62c60 62de8: 508f addql #8,%sp } 62dea: 4e5e unlk %fp 62dec: 4e75 rts ... 0004fc78 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 4fc78: 4e56 fffc linkw %fp,#-4 4fc7c: 2f0a movel %a2,%sp@- 4fc7e: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 4fc80: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 4fc86: 4eb9 0005 1f48 jsr 51f48 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 4fc8c: 486e fffc pea %fp@(-4) 4fc90: 2f2e 0008 movel %fp@(8),%sp@- 4fc94: 4879 0007 52e6 pea 752e6 <_Region_Information> 4fc9a: 4eb9 0005 3754 jsr 53754 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4fca0: 4fef 0010 lea %sp@(16),%sp 4fca4: 2440 moveal %d0,%a2 4fca6: 4aae fffc tstl %fp@(-4) 4fcaa: 6704 beqs 4fcb0 4fcac: 7404 moveq #4,%d2 4fcae: 602c bras 4fcdc case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 4fcb0: 4aaa 0064 tstl %a2@(100) 4fcb4: 6704 beqs 4fcba 4fcb6: 740c moveq #12,%d2 4fcb8: 6022 bras 4fcdc return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 4fcba: 2f00 movel %d0,%sp@- 4fcbc: 4879 0007 52e6 pea 752e6 <_Region_Information> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 4fcc2: 4282 clrl %d2 4fcc4: 4eb9 0005 3388 jsr 53388 <_Objects_Close> 4fcca: 2f0a movel %a2,%sp@- 4fccc: 4879 0007 52e6 pea 752e6 <_Region_Information> 4fcd2: 4eb9 0005 35fc jsr 535fc <_Objects_Free> 4fcd8: 4fef 0010 lea %sp@(16),%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4fcdc: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 4fce2: 4eb9 0005 1fa8 jsr 51fa8 <_API_Mutex_Unlock> return return_status; } 4fce8: 246e fff8 moveal %fp@(-8),%a2 4fcec: 2002 movel %d2,%d0 4fcee: 242e fff4 movel %fp@(-12),%d2 4fcf2: 4e5e unlk %fp 4fcf4: 4e75 rts ... 0004fe0c : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 4fe0c: 4e56 fffc linkw %fp,#-4 4fe10: 2f02 movel %d2,%sp@- 4fe12: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 4fe16: 6606 bnes 4fe1e 4fe18: 143c 0009 moveb #9,%d2 4fe1c: 604e bras 4fe6c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4fe1e: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 4fe24: 4eb9 0005 1f48 jsr 51f48 <_API_Mutex_Lock> 4fe2a: 486e fffc pea %fp@(-4) 4fe2e: 2f2e 0008 movel %fp@(8),%sp@- 4fe32: 4879 0007 52e6 pea 752e6 <_Region_Information> 4fe38: 4eb9 0005 3754 jsr 53754 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4fe3e: 4fef 0010 lea %sp@(16),%sp 4fe42: 4aae fffc tstl %fp@(-4) 4fe46: 6704 beqs 4fe4c 4fe48: 7404 moveq #4,%d2 4fe4a: 6012 bras 4fe5e case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 4fe4c: 2f02 movel %d2,%sp@- 4fe4e: 2040 moveal %d0,%a0 4fe50: 4868 0068 pea %a0@(104) 4fe54: 4282 clrl %d2 4fe56: 4eb9 0005 2db8 jsr 52db8 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 4fe5c: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4fe5e: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 4fe64: 4eb9 0005 1fa8 jsr 51fa8 <_API_Mutex_Unlock> return return_status; 4fe6a: 588f addql #4,%sp } 4fe6c: 2002 movel %d2,%d0 4fe6e: 242e fff8 movel %fp@(-8),%d2 4fe72: 4e5e unlk %fp 4fe74: 4e75 rts ... 0004ff88 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 4ff88: 4e56 fffc linkw %fp,#-4 4ff8c: 2f03 movel %d3,%sp@- 4ff8e: 262e 0010 movel %fp@(16),%d3 4ff92: 2f02 movel %d2,%sp@- 4ff94: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 4ff98: 6766 beqs 50000 return RTEMS_INVALID_ADDRESS; if ( !size ) 4ff9a: 4a83 tstl %d3 4ff9c: 6762 beqs 50000 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4ff9e: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 4ffa4: 4eb9 0005 1f48 jsr 51f48 <_API_Mutex_Lock> 4ffaa: 486e fffc pea %fp@(-4) 4ffae: 2f2e 0008 movel %fp@(8),%sp@- 4ffb2: 4879 0007 52e6 pea 752e6 <_Region_Information> 4ffb8: 4eb9 0005 3754 jsr 53754 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4ffbe: 222e fffc movel %fp@(-4),%d1 4ffc2: 4fef 0010 lea %sp@(16),%sp 4ffc6: 670a beqs 4ffd2 4ffc8: 7001 moveq #1,%d0 4ffca: b081 cmpl %d1,%d0 4ffcc: 6620 bnes 4ffee 4ffce: 7404 moveq #4,%d2 4ffd0: 601e bras 4fff0 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 4ffd2: 2f03 movel %d3,%sp@- 4ffd4: 2040 moveal %d0,%a0 4ffd6: 2f02 movel %d2,%sp@- 4ffd8: 4868 0068 pea %a0@(104) 4ffdc: 4eb9 0005 31d4 jsr 531d4 <_Heap_Size_of_alloc_area> 4ffe2: 4fef 000c lea %sp@(12),%sp 4ffe6: 4a00 tstb %d0 4ffe8: 6604 bnes 4ffee 4ffea: 7409 moveq #9,%d2 <== NOT EXECUTED 4ffec: 6002 bras 4fff0 <== NOT EXECUTED 4ffee: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4fff0: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 4fff6: 4eb9 0005 1fa8 jsr 51fa8 <_API_Mutex_Unlock> return return_status; 4fffc: 588f addql #4,%sp 4fffe: 6002 bras 50002 50000: 7409 moveq #9,%d2 } 50002: 2002 movel %d2,%d0 50004: 242e fff4 movel %fp@(-12),%d2 50008: 262e fff8 movel %fp@(-8),%d3 5000c: 4e5e unlk %fp 5000e: 4e75 rts 0005003c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 5003c: 4e56 ffe8 linkw %fp,#-24 50040: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50044: 266e 0014 moveal %fp@(20),%a3 uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 50048: 4a8b tstl %a3 5004a: 6700 008e beqw 500da return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 5004e: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 50054: 4eb9 0005 1f48 jsr 51f48 <_API_Mutex_Lock> 5005a: 486e fff8 pea %fp@(-8) 5005e: 2f2e 0008 movel %fp@(8),%sp@- 50062: 4879 0007 52e6 pea 752e6 <_Region_Information> 50068: 4eb9 0005 3754 jsr 53754 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5006e: 4fef 0010 lea %sp@(16),%sp 50072: 2440 moveal %d0,%a2 50074: 4aae fff8 tstl %fp@(-8) 50078: 664e bnes 500c8 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 5007a: 486e fffc pea %fp@(-4) 5007e: 486e fff4 pea %fp@(-12) 50082: 2f2e 0010 movel %fp@(16),%sp@- 50086: 2f2e 000c movel %fp@(12),%sp@- 5008a: 486a 0068 pea %a2@(104) 5008e: 4eb9 0005 30fc jsr 530fc <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 50094: 26ae fff4 movel %fp@(-12),%a3@ case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 50098: 2400 movel %d0,%d2 ); *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 5009a: 4fef 0014 lea %sp@(20),%sp 5009e: 660e bnes 500ae _Region_Process_queue( the_region ); /* unlocks allocator */ 500a0: 2f0a movel %a2,%sp@- 500a2: 4eb9 0005 72f8 jsr 572f8 <_Region_Process_queue> 500a8: 588f addql #4,%sp 500aa: 4280 clrl %d0 500ac: 602e bras 500dc else _RTEMS_Unlock_allocator(); 500ae: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 500b4: 4eb9 0005 1fa8 jsr 51fa8 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 500ba: 588f addql #4,%sp 500bc: 7001 moveq #1,%d0 500be: b082 cmpl %d2,%d0 500c0: 6618 bnes 500da 500c2: 103c 000d moveb #13,%d0 500c6: 6014 bras 500dc default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 500c8: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 500ce: 4eb9 0005 1fa8 jsr 51fa8 <_API_Mutex_Unlock> return return_status; 500d4: 588f addql #4,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 500d6: 7004 moveq #4,%d0 return return_status; 500d8: 6002 bras 500dc 500da: 7009 moveq #9,%d0 } 500dc: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 500e2: 4e5e unlk %fp 500e4: 4e75 rts ... 000500e8 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 500e8: 4e56 fffc linkw %fp,#-4 500ec: 2f0a movel %a2,%sp@- 500ee: 2f02 movel %d2,%sp@- uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 500f0: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 500f6: 4eb9 0005 1f48 jsr 51f48 <_API_Mutex_Lock> 500fc: 486e fffc pea %fp@(-4) 50100: 2f2e 0008 movel %fp@(8),%sp@- 50104: 4879 0007 52e6 pea 752e6 <_Region_Information> 5010a: 4eb9 0005 3754 jsr 53754 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 50110: 4fef 0010 lea %sp@(16),%sp 50114: 2440 moveal %d0,%a2 50116: 4aae fffc tstl %fp@(-4) 5011a: 6704 beqs 50120 5011c: 7404 moveq #4,%d2 5011e: 6026 bras 50146 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 50120: 2f2e 000c movel %fp@(12),%sp@- 50124: 486a 0068 pea %a2@(104) 50128: 4eb9 0005 2c04 jsr 52c04 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 5012e: 508f addql #8,%sp 50130: 4a00 tstb %d0 50132: 6710 beqs 50144 return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 50134: 53aa 0064 subql #1,%a2@(100) _Region_Process_queue(the_region); /* unlocks allocator */ 50138: 4282 clrl %d2 5013a: 2f0a movel %a2,%sp@- 5013c: 4eb9 0005 72f8 jsr 572f8 <_Region_Process_queue> 50142: 600e bras 50152 return RTEMS_SUCCESSFUL; 50144: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 50146: 2f39 0007 549a movel 7549a <_RTEMS_Allocator_Mutex>,%sp@- 5014c: 4eb9 0005 1fa8 jsr 51fa8 <_API_Mutex_Unlock> return return_status; } 50152: 2002 movel %d2,%d0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 50154: 588f addql #4,%sp } 50156: 242e fff4 movel %fp@(-12),%d2 5015a: 246e fff8 moveal %fp@(-8),%a2 5015e: 4e5e unlk %fp 50160: 4e75 rts ... 00050440 : rtems_status_code rtems_semaphore_ident( rtems_name name, uint32_t node, rtems_id *id ) { 50440: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); 50444: 2f2e 0010 movel %fp@(16),%sp@- 50448: 2f2e 000c movel %fp@(12),%sp@- 5044c: 2f2e 0008 movel %fp@(8),%sp@- 50450: 4879 0007 5320 pea 75320 <_Semaphore_Information> 50456: 4eb9 0005 39a0 jsr 539a0 <_Objects_Name_to_id_u32> 5045c: 41f9 0006 e700 lea 6e700 <_Status_Object_name_errors_to_status>,%a0 return _Status_Object_name_errors_to_status[ status ]; } 50462: 4e5e unlk %fp 50464: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 50468: 4e75 rts ... 00045560 : void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 45560: 7004 moveq #4,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 45562: 4e56 0000 linkw %fp,#0 if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 45566: b0b9 0005 ce1c cmpl 5ce1c <_System_state_Current>,%d0 4556c: 6718 beqs 45586 4556e: 23c0 0005 ce1c movel %d0,5ce1c <_System_state_Current> * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 45574: 203c 0005 cc60 movel #380000,%d0 4557a: 2d40 0008 movel %d0,%fp@(8) _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 4557e: 4e5e unlk %fp 45580: 4ef9 0004 7f3e jmp 47f3e <_CPU_Context_Restart_self> 45586: 4e5e unlk %fp 45588: 4e75 rts ... 00045e34 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 45e34: 4e56 0000 linkw %fp,#0 45e38: 2239 0005 e05c movel 5e05c <_Thread_Dispatch_disable_level>,%d1 45e3e: 5281 addql #1,%d1 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 45e40: 2079 0005 e116 moveal 5e116 <_Thread_Executing>,%a0 rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 45e46: 202e 0008 movel %fp@(8),%d0 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 45e4a: 2068 010a moveal %a0@(266),%a0 45e4e: 23c1 0005 e05c movel %d1,5e05c <_Thread_Dispatch_disable_level> asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 45e54: 4a80 tstl %d0 45e56: 670c beqs 45e64 asr->mode_set = mode_set; asr->handler = asr_handler; 45e58: 2140 000a movel %d0,%a0@(10) _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { asr->mode_set = mode_set; 45e5c: 216e 000c 000e movel %fp@(12),%a0@(14) 45e62: 601a bras 45e7e information->is_enabled = false; information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; information->signals_posted = 0; information->signals_pending = 0; information->nest_level = 0; 45e64: 42a8 001a clrl %a0@(26) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 45e68: 4200 clrb %d0 information->handler = NULL; 45e6a: 42a8 000a clrl %a0@(10) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 45e6e: 1140 0008 moveb %d0,%a0@(8) information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; 45e72: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 45e76: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 45e7a: 42a8 0016 clrl %a0@(22) asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 45e7e: 4eb9 0004 7cd2 jsr 47cd2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 45e84: 4280 clrl %d0 45e86: 4e5e unlk %fp 45e88: 4e75 rts ... 00050620 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 50620: 4e56 fffc linkw %fp,#-4 50624: 2f03 movel %d3,%sp@- 50626: 2f02 movel %d2,%sp@- 50628: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 5062c: 6606 bnes 50634 5062e: 700a moveq #10,%d0 50630: 6000 0084 braw 506b6 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 50634: 486e fffc pea %fp@(-4) 50638: 2f2e 0008 movel %fp@(8),%sp@- 5063c: 4eb9 0005 4068 jsr 54068 <_Thread_Get> switch ( location ) { 50642: 508f addql #8,%sp 50644: 4aae fffc tstl %fp@(-4) 50648: 6704 beqs 5064e 5064a: 7004 moveq #4,%d0 5064c: 6068 bras 506b6 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 5064e: 2240 moveal %d0,%a1 50650: 2069 010a moveal %a1@(266),%a0 asr = &api->Signal; 50654: 4aa8 000a tstl %a0@(10) 50658: 6754 beqs 506ae if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 5065a: 4a28 0008 tstb %a0@(8) 5065e: 6732 beqs 50692 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 50660: 223c 0000 0700 movel #1792,%d1 50666: 40c3 movew %sr,%d3 50668: 8283 orl %d3,%d1 5066a: 46c1 movew %d1,%sr *signal_set |= signals; 5066c: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 50670: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 50672: 2239 0007 5482 movel 75482 <_ISR_Nest_level>,%d1 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 50678: 7401 moveq #1,%d2 5067a: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5067e: 4a81 tstl %d1 50680: 6722 beqs 506a4 50682: b0b9 0007 54a2 cmpl 754a2 <_Thread_Executing>,%d0 50688: 661a bnes 506a4 _ISR_Signals_to_thread_executing = true; 5068a: 13c2 0007 5530 moveb %d2,75530 <_ISR_Signals_to_thread_executing> 50690: 6012 bras 506a4 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 50692: 203c 0000 0700 movel #1792,%d0 50698: 40c1 movew %sr,%d1 5069a: 8081 orl %d1,%d0 5069c: 46c0 movew %d0,%sr *signal_set |= signals; 5069e: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 506a2: 46c1 movew %d1,%sr } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 506a4: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 506aa: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 506ac: 6008 bras 506b6 } _Thread_Enable_dispatch(); 506ae: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 506b4: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 506b6: 242e fff4 movel %fp@(-12),%d2 506ba: 262e fff8 movel %fp@(-8),%d3 506be: 4e5e unlk %fp 506c0: 4e75 rts ... 00043fdc : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 43fdc: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 43fe0: 2279 0009 bd42 moveal 9bd42 <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 43fe6: 2069 00c2 moveal %a1@(194),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 43fea: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 43fec: b1ce cmpal %fp,%a0 43fee: 6304 blss 43ff4 43ff0: 4202 clrb %d2 <== NOT EXECUTED 43ff2: 600c bras 44000 <== NOT EXECUTED } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 43ff4: 2008 movel %a0,%d0 43ff6: d0a9 00be addl %a1@(190),%d0 43ffa: b08e cmpl %fp,%d0 43ffc: 54c2 scc %d2 43ffe: 4482 negl %d2 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 44000: 4ab9 0009 8bc0 tstl 98bc0 44006: 6604 bnes 4400c 44008: 7001 moveq #1,%d0 <== NOT EXECUTED 4400a: 601e bras 4402a <== NOT EXECUTED pattern_ok = (!memcmp( 4400c: 4878 0010 pea 10 44010: 4879 0009 bb00 pea 9bb00 44016: 4868 0008 pea %a0@(8) 4401a: 4eb9 0007 8f74 jsr 78f74 44020: 4fef 000c lea %sp@(12),%sp 44024: 4a80 tstl %d0 44026: 57c0 seq %d0 44028: 4480 negl %d0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 4402a: 4a02 tstb %d2 4402c: 6708 beqs 44036 4402e: 4a00 tstb %d0 44030: 6704 beqs 44036 44032: 4200 clrb %d0 44034: 6018 bras 4404e return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 44036: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4403c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4403e: 2f39 0009 bd42 movel 9bd42 <_Thread_Executing>,%sp@- <== NOT EXECUTED 44044: 4eb9 0004 3f36 jsr 43f36 <== NOT EXECUTED return true; 4404a: 508f addql #8,%sp <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 4404c: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } 4404e: 242e fffc movel %fp@(-4),%d2 44052: 4e5e unlk %fp 44054: 4e75 rts 00043f1e : void rtems_stack_checker_report_usage( void ) { 43f1e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 43f22: 4879 0004 681c pea 4681c <== NOT EXECUTED 43f28: 42a7 clrl %sp@- <== NOT EXECUTED 43f2a: 4eb9 0004 3ebc jsr 43ebc <== NOT EXECUTED 43f30: 508f addql #8,%sp <== NOT EXECUTED } 43f32: 4e5e unlk %fp <== NOT EXECUTED 43f34: 4e75 rts 00043ebc : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 43ebc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43ec0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43ec2: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 43ec6: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 43ec8: 4879 0008 e39e pea 8e39e <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 43ece: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED print_context = context; print_handler = print; 43ed2: 23ca 0009 8bc8 movel %a2,98bc8 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 43ed8: 2f02 movel %d2,%sp@- <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 43eda: 23c2 0009 8bc4 movel %d2,98bc4 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 43ee0: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 43ee2: 4879 0008 e3b5 pea 8e3b5 <== NOT EXECUTED 43ee8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43eea: 4e92 jsr %a2@ <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 43eec: 4879 0004 3da2 pea 43da2 <== NOT EXECUTED 43ef2: 4eb9 0004 a30c jsr 4a30c <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 43ef8: 4878 ffff pea ffffffff <== NOT EXECUTED 43efc: 4eb9 0004 3da2 jsr 43da2 <== NOT EXECUTED print_context = NULL; print_handler = NULL; } 43f02: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; print_handler = NULL; 43f06: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } 43f0a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43f0e: 4e5e unlk %fp <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; 43f10: 42b9 0009 8bc4 clrl 98bc4 <== NOT EXECUTED print_handler = NULL; 43f16: 42b9 0009 8bc8 clrl 98bc8 <== NOT EXECUTED } 43f1c: 4e75 rts 00044056 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 44056: 4e56 0000 linkw %fp,#0 4405a: 2f0a movel %a2,%sp@- 4405c: 246e 0008 moveal %fp@(8),%a2 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 44060: 206a 00c2 moveal %a2@(194),%a0 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 44064: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44066: b1ce cmpal %fp,%a0 44068: 6304 blss 4406e 4406a: 4202 clrb %d2 <== NOT EXECUTED 4406c: 600c bras 4407a <== NOT EXECUTED } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 4406e: 2008 movel %a0,%d0 44070: d0aa 00be addl %a2@(190),%d0 44074: b08e cmpl %fp,%d0 44076: 54c2 scc %d2 44078: 4482 negl %d2 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 4407a: 4878 0010 pea 10 4407e: 4879 0009 bb00 pea 9bb00 44084: 4868 0008 pea %a0@(8) 44088: 4eb9 0007 8f74 jsr 78f74 4408e: 4fef 000c lea %sp@(12),%sp 44092: 4a80 tstl %d0 44094: 57c0 seq %d0 44096: 4480 negl %d0 44098: 1200 moveb %d0,%d1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 4409a: 4a02 tstb %d2 4409c: 6704 beqs 440a2 4409e: 4a00 tstb %d0 440a0: 661c bnes 440be Stack_check_report_blown_task( running, pattern_ok ); 440a2: 4280 clrl %d0 <== NOT EXECUTED 440a4: 1001 moveb %d1,%d0 <== NOT EXECUTED 440a6: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 440aa: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 440ae: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 440b2: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 440b6: 4e5e unlk %fp <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 440b8: 4ef9 0004 3f36 jmp 43f36 <== NOT EXECUTED } } 440be: 242e fff8 movel %fp@(-8),%d2 440c2: 246e fffc moveal %fp@(-4),%a2 440c6: 4e5e unlk %fp 440c8: 4e75 rts 0004b5d4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b5d4: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4b5d8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 4b5dc: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4b5e0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4b5e4: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b5e8: 4a8a tstl %a2 <== NOT EXECUTED 4b5ea: 6604 bnes 4b5f0 <== NOT EXECUTED 4b5ec: 7009 moveq #9,%d0 <== NOT EXECUTED 4b5ee: 606e bras 4b65e <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4b5f0: 4eb9 0004 de74 jsr 4de74 <__errno> <== NOT EXECUTED *n = 0; 4b5f6: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b5f8: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4b5fa: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b5fc: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b5fe: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b602: 2480 movel %d0,%a2@ <== NOT EXECUTED 4b604: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b608: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b60a: 4eb9 0005 08c8 jsr 508c8 <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b610: 508f addql #8,%sp <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b612: 2600 movel %d0,%d3 <== NOT EXECUTED 4b614: 2801 movel %d1,%d4 <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b616: 4a8b tstl %a3 <== NOT EXECUTED 4b618: 6704 beqs 4b61e <== NOT EXECUTED *endptr = end; 4b61a: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 4b61e: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4b622: 6604 bnes 4b628 <== NOT EXECUTED 4b624: 700b moveq #11,%d0 <== NOT EXECUTED 4b626: 6036 bras 4b65e <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b628: 4878 ffff pea ffffffff <== NOT EXECUTED 4b62c: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4b632: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4b634: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b636: 4eb9 0005 b708 jsr 5b708 <__gtdf2> <== NOT EXECUTED 4b63c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b640: 4a80 tstl %d0 <== NOT EXECUTED 4b642: 6f12 bles 4b656 <== NOT EXECUTED 4b644: 4eb9 0004 de74 jsr 4de74 <__errno> <== NOT EXECUTED 4b64a: 7222 moveq #34,%d1 <== NOT EXECUTED 4b64c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b64e: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b650: 6604 bnes 4b656 <== NOT EXECUTED 4b652: 700a moveq #10,%d0 <== NOT EXECUTED 4b654: 6008 bras 4b65e <== NOT EXECUTED #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b656: 4280 clrl %d0 <== NOT EXECUTED 4b658: 2483 movel %d3,%a2@ <== NOT EXECUTED 4b65a: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 4b65e: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4b664: 4e5e unlk %fp <== NOT EXECUTED 4b666: 4e75 rts 0004b668 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b668: 4e56 ffec linkw %fp,#-20 4b66c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b670: 262e 0008 movel %fp@(8),%d3 4b674: 246e 000c moveal %fp@(12),%a2 4b678: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b67c: 4a8a tstl %a2 4b67e: 6604 bnes 4b684 4b680: 7009 moveq #9,%d0 4b682: 605c bras 4b6e0 return RTEMS_INVALID_ADDRESS; errno = 0; 4b684: 4eb9 0004 de74 jsr 4de74 <__errno> 4b68a: 2040 moveal %d0,%a0 4b68c: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b68e: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b692: 24bc 0000 0000 movel #0,%a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b698: 2f03 movel %d3,%sp@- 4b69a: 4eb9 0005 086a jsr 5086a #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b6a0: 508f addql #8,%sp errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b6a2: 2400 movel %d0,%d2 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b6a4: 4a8b tstl %a3 4b6a6: 6704 beqs 4b6ac *endptr = end; 4b6a8: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b6ac: b6ae fffc cmpl %fp@(-4),%d3 4b6b0: 6604 bnes 4b6b6 4b6b2: 700b moveq #11,%d0 4b6b4: 602a bras 4b6e0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b6b6: 2f3c 7f7f ffff movel #2139095039,%sp@- 4b6bc: 2f02 movel %d2,%sp@- 4b6be: 4eb9 0005 b798 jsr 5b798 <__gtsf2> 4b6c4: 508f addql #8,%sp 4b6c6: 4a80 tstl %d0 4b6c8: 6f12 bles 4b6dc 4b6ca: 4eb9 0004 de74 jsr 4de74 <__errno> <== NOT EXECUTED 4b6d0: 7222 moveq #34,%d1 <== NOT EXECUTED 4b6d2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b6d4: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b6d6: 6604 bnes 4b6dc <== NOT EXECUTED 4b6d8: 700a moveq #10,%d0 <== NOT EXECUTED 4b6da: 6004 bras 4b6e0 <== NOT EXECUTED #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b6dc: 2482 movel %d2,%a2@ 4b6de: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4b6e0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b6e6: 4e5e unlk %fp 4b6e8: 4e75 rts ... 0004b764 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b764: 4e56 ffe8 linkw %fp,#-24 4b768: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b76c: 242e 0008 movel %fp@(8),%d2 4b770: 246e 000c moveal %fp@(12),%a2 4b774: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b778: 4a8a tstl %a2 4b77a: 6604 bnes 4b780 4b77c: 7009 moveq #9,%d0 4b77e: 6074 bras 4b7f4 return RTEMS_INVALID_ADDRESS; errno = 0; 4b780: 4eb9 0004 de74 jsr 4de74 <__errno> 4b786: 2040 moveal %d0,%a0 *n = 0; 4b788: 4280 clrl %d0 4b78a: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b78c: 4290 clrl %a0@ *n = 0; 4b78e: 2480 movel %d0,%a2@ 4b790: 2541 0004 movel %d1,%a2@(4) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b794: 2f2e 0014 movel %fp@(20),%sp@- 4b798: 486e fffc pea %fp@(-4) 4b79c: 2f02 movel %d2,%sp@- 4b79e: 4eb9 0005 0a6c jsr 50a6c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b7a4: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b7a8: 2600 movel %d0,%d3 4b7aa: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b7ac: 4a8b tstl %a3 4b7ae: 6704 beqs 4b7b4 *endptr = end; 4b7b0: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b7b4: b4ae fffc cmpl %fp@(-4),%d2 4b7b8: 6604 bnes 4b7be 4b7ba: 700b moveq #11,%d0 4b7bc: 6036 bras 4b7f4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b7be: 203c 7fff ffff movel #2147483647,%d0 4b7c4: 72ff moveq #-1,%d1 4b7c6: 9284 subl %d4,%d1 4b7c8: 9183 subxl %d3,%d0 4b7ca: 670e beqs 4b7da return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4b7cc: 203c 8000 0000 movel #-2147483648,%d0 4b7d2: 4281 clrl %d1 4b7d4: 9284 subl %d4,%d1 4b7d6: 9183 subxl %d3,%d0 4b7d8: 660e bnes 4b7e8 4b7da: 4eb9 0004 de74 jsr 4de74 <__errno> 4b7e0: 7222 moveq #34,%d1 4b7e2: 2040 moveal %d0,%a0 4b7e4: b290 cmpl %a0@,%d1 4b7e6: 670a beqs 4b7f2 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b7e8: 4280 clrl %d0 4b7ea: 2483 movel %d3,%a2@ 4b7ec: 2544 0004 movel %d4,%a2@(4) #endif return RTEMS_SUCCESSFUL; 4b7f0: 6002 bras 4b7f4 4b7f2: 700a moveq #10,%d0 } 4b7f4: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4b7fa: 4e5e unlk %fp 4b7fc: 4e75 rts ... 00057efc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 57efc: 4e56 ffec linkw %fp,#-20 57f00: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57f04: 262e 0008 movel %fp@(8),%d3 57f08: 246e 000c moveal %fp@(12),%a2 57f0c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 57f10: 4a8a tstl %a2 57f12: 6604 bnes 57f18 57f14: 7009 moveq #9,%d0 57f16: 6050 bras 57f68 return RTEMS_INVALID_ADDRESS; errno = 0; 57f18: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 57f1e: 2040 moveal %d0,%a0 57f20: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 57f22: 4878 0010 pea 10 57f26: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 57f2a: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 57f2c: 2f03 movel %d3,%sp@- 57f2e: 4eb9 0007 d1a4 jsr 7d1a4 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 57f34: 4fef 000c lea %sp@(12),%sp *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 57f38: 2400 movel %d0,%d2 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 57f3a: 4a8b tstl %a3 57f3c: 6704 beqs 57f42 *endptr = end; 57f3e: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 57f42: b6ae fffc cmpl %fp@(-4),%d3 57f46: 6604 bnes 57f4c 57f48: 700b moveq #11,%d0 57f4a: 601c bras 57f68 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 57f4c: 70ff moveq #-1,%d0 57f4e: b082 cmpl %d2,%d0 57f50: 6612 bnes 57f64 57f52: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 57f58: 7222 moveq #34,%d1 <== NOT EXECUTED 57f5a: 2040 moveal %d0,%a0 <== NOT EXECUTED 57f5c: b290 cmpl %a0@,%d1 <== NOT EXECUTED 57f5e: 6604 bnes 57f64 <== NOT EXECUTED 57f60: 700a moveq #10,%d0 <== NOT EXECUTED 57f62: 6004 bras 57f68 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 57f64: 2482 movel %d2,%a2@ 57f66: 4280 clrl %d0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 57f68: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57f6e: 4e5e unlk %fp 57f70: 4e75 rts ... 00057f74 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 57f74: 4e56 fff0 linkw %fp,#-16 57f78: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 57f7c: 242e 0008 movel %fp@(8),%d2 57f80: 246e 000c moveal %fp@(12),%a2 57f84: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 57f88: 4a8a tstl %a2 57f8a: 6604 bnes 57f90 57f8c: 7009 moveq #9,%d0 57f8e: 6038 bras 57fc8 return RTEMS_INVALID_ADDRESS; errno = 0; 57f90: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 57f96: 2040 moveal %d0,%a0 57f98: 4290 clrl %a0@ *n = 0; 57f9a: 4212 clrb %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 57f9c: 2f2e 0014 movel %fp@(20),%sp@- 57fa0: 486e fffc pea %fp@(-4) 57fa4: 2f02 movel %d2,%sp@- 57fa6: 4eb9 0007 d1a4 jsr 7d1a4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 57fac: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 57fb0: 2200 movel %d0,%d1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 57fb2: 4a8b tstl %a3 57fb4: 6704 beqs 57fba *endptr = end; 57fb6: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 57fba: b4ae fffc cmpl %fp@(-4),%d2 57fbe: 6604 bnes 57fc4 57fc0: 700b moveq #11,%d0 57fc2: 6004 bras 57fc8 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 57fc4: 4280 clrl %d0 57fc6: 1481 moveb %d1,%a2@ #endif return RTEMS_SUCCESSFUL; } 57fc8: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 57fce: 4e5e unlk %fp 57fd0: 4e75 rts ... 0004b958 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b958: 4e56 ffec linkw %fp,#-20 4b95c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b960: 262e 0008 movel %fp@(8),%d3 4b964: 246e 000c moveal %fp@(12),%a2 4b968: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b96c: 4a8a tstl %a2 4b96e: 6604 bnes 4b974 4b970: 7009 moveq #9,%d0 4b972: 6050 bras 4b9c4 return RTEMS_INVALID_ADDRESS; errno = 0; 4b974: 4eb9 0004 de74 jsr 4de74 <__errno> 4b97a: 2040 moveal %d0,%a0 4b97c: 4290 clrl %a0@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b97e: 2f2e 0014 movel %fp@(20),%sp@- 4b982: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b986: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b988: 2f03 movel %d3,%sp@- 4b98a: 4eb9 0005 0e7c jsr 50e7c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b990: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4b994: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b996: 4a8b tstl %a3 4b998: 6704 beqs 4b99e *endptr = end; 4b99a: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b99e: b6ae fffc cmpl %fp@(-4),%d3 4b9a2: 6604 bnes 4b9a8 4b9a4: 700b moveq #11,%d0 4b9a6: 601c bras 4b9c4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b9a8: 70ff moveq #-1,%d0 4b9aa: b082 cmpl %d2,%d0 4b9ac: 6612 bnes 4b9c0 4b9ae: 4eb9 0004 de74 jsr 4de74 <__errno> 4b9b4: 7222 moveq #34,%d1 4b9b6: 2040 moveal %d0,%a0 4b9b8: b290 cmpl %a0@,%d1 4b9ba: 6604 bnes 4b9c0 4b9bc: 700a moveq #10,%d0 4b9be: 6004 bras 4b9c4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b9c0: 2482 movel %d2,%a2@ 4b9c2: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4b9c4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b9ca: 4e5e unlk %fp 4b9cc: 4e75 rts ... 00057fd4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 57fd4: 4e56 ffec linkw %fp,#-20 57fd8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57fdc: 262e 0008 movel %fp@(8),%d3 57fe0: 246e 000c moveal %fp@(12),%a2 57fe4: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 57fe8: 4a8a tstl %a2 57fea: 6604 bnes 57ff0 57fec: 7009 moveq #9,%d0 57fee: 6050 bras 58040 return RTEMS_INVALID_ADDRESS; errno = 0; 57ff0: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 57ff6: 2040 moveal %d0,%a0 57ff8: 4290 clrl %a0@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 57ffa: 2f2e 0014 movel %fp@(20),%sp@- 57ffe: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 58002: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 58004: 2f03 movel %d3,%sp@- 58006: 4eb9 0007 d1a4 jsr 7d1a4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5800c: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 58010: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 58012: 4a8b tstl %a3 58014: 6704 beqs 5801a *endptr = end; 58016: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5801a: b6ae fffc cmpl %fp@(-4),%d3 5801e: 6604 bnes 58024 58020: 700b moveq #11,%d0 58022: 601c bras 58040 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 58024: 70ff moveq #-1,%d0 58026: b082 cmpl %d2,%d0 58028: 6612 bnes 5803c 5802a: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 58030: 7222 moveq #34,%d1 58032: 2040 moveal %d0,%a0 58034: b290 cmpl %a0@,%d1 58036: 6604 bnes 5803c 58038: 700a moveq #10,%d0 5803a: 6004 bras 58040 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 5803c: 2482 movel %d2,%a2@ 5803e: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 58040: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58046: 4e5e unlk %fp 58048: 4e75 rts ... 00045208 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 45208: 4e56 fff0 linkw %fp,#-16 4520c: 48d7 1c00 moveml %a2-%a4,%sp@ register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 45210: 2f39 0005 cd46 movel 5cd46 <_RTEMS_Allocator_Mutex>,%sp@- 45216: 47f9 0004 589c lea 4589c <_API_Mutex_Unlock>,%a3 4521c: 4eb9 0004 583c jsr 4583c <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 45222: 486e fffc pea %fp@(-4) 45226: 2f2e 0008 movel %fp@(8),%sp@- 4522a: 4eb9 0004 6d08 jsr 46d08 <_Thread_Get> switch ( location ) { 45230: 4fef 000c lea %sp@(12),%sp Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); the_thread = _Thread_Get( id, &location ); 45234: 2440 moveal %d0,%a2 switch ( location ) { 45236: 4aae fffc tstl %fp@(-4) 4523a: 663c bnes 45278 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 4523c: 2f2a 0008 movel %a2@(8),%sp@- 45240: 49f9 0004 6414 lea 46414 <_Objects_Get_information_id>,%a4 45246: 4e94 jsr %a4@ 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 45248: 2f0a movel %a2,%sp@- 4524a: 2f00 movel %d0,%sp@- 4524c: 4eb9 0004 69d4 jsr 469d4 <_Thread_Close> 45252: 2f2a 0008 movel %a2@(8),%sp@- 45256: 4e94 jsr %a4@ 45258: 2f0a movel %a2,%sp@- 4525a: 2f00 movel %d0,%sp@- 4525c: 4eb9 0004 6390 jsr 46390 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 45262: 2f39 0005 cd46 movel 5cd46 <_RTEMS_Allocator_Mutex>,%sp@- 45268: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 4526a: 4eb9 0004 6ce2 jsr 46ce2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45270: 4fef 001c lea %sp@(28),%sp _Thread_Close( the_information, the_thread ); _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); 45274: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 45276: 600c bras 45284 case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 45278: 2f39 0005 cd46 movel 5cd46 <_RTEMS_Allocator_Mutex>,%sp@- 4527e: 4e93 jsr %a3@ return RTEMS_INVALID_ID; 45280: 588f addql #4,%sp case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 45282: 7004 moveq #4,%d0 return RTEMS_INVALID_ID; } 45284: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 4528a: 4e5e unlk %fp 4528c: 4e75 rts ... 00046988 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 46988: 4e56 fffc linkw %fp,#-4 4698c: 202e 0008 movel %fp@(8),%d0 46990: 2f0a movel %a2,%sp@- 46992: 246e 0010 moveal %fp@(16),%a2 46996: 2f02 movel %d2,%sp@- 46998: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 4699c: 4a39 0005 db44 tstb 5db44 469a2: 6604 bnes 469a8 469a4: 7016 moveq #22,%d0 469a6: 605e bras 46a06 return RTEMS_NOT_CONFIGURED; if ( !note ) 469a8: 4a8a tstl %a2 469aa: 6604 bnes 469b0 469ac: 7009 moveq #9,%d0 469ae: 6056 bras 46a06 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 469b0: 720f moveq #15,%d1 469b2: b282 cmpl %d2,%d1 469b4: 6404 bccs 469ba 469b6: 700a moveq #10,%d0 469b8: 604c bras 46a06 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 469ba: 4a80 tstl %d0 469bc: 670c beqs 469ca _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 469be: 2079 0005 f64e moveal 5f64e <_Thread_Executing>,%a0 469c4: b0a8 0008 cmpl %a0@(8),%d0 469c8: 6612 bnes 469dc api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 469ca: 2079 0005 f64e moveal 5f64e <_Thread_Executing>,%a0 469d0: 4280 clrl %d0 469d2: 2068 010a moveal %a0@(266),%a0 469d6: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ return RTEMS_SUCCESSFUL; 469da: 602a bras 46a06 } the_thread = _Thread_Get( id, &location ); 469dc: 486e fffc pea %fp@(-4) 469e0: 2f00 movel %d0,%sp@- 469e2: 4eb9 0004 86c8 jsr 486c8 <_Thread_Get> switch ( location ) { 469e8: 508f addql #8,%sp 469ea: 4aae fffc tstl %fp@(-4) 469ee: 6704 beqs 469f4 469f0: 7004 moveq #4,%d0 469f2: 6012 bras 46a06 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 469f4: 2240 moveal %d0,%a1 469f6: 2069 010a moveal %a1@(266),%a0 469fa: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ _Thread_Enable_dispatch(); 469fe: 4eb9 0004 86a2 jsr 486a2 <_Thread_Enable_dispatch> 46a04: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46a06: 242e fff4 movel %fp@(-12),%d2 46a0a: 246e fff8 moveal %fp@(-8),%a2 46a0e: 4e5e unlk %fp 46a10: 4e75 rts ... 00045290 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 45290: 4e56 0000 linkw %fp,#0 45294: 202e 0008 movel %fp@(8),%d0 45298: 206e 0010 moveal %fp@(16),%a0 Objects_Name_or_id_lookup_errors status; if ( !id ) 4529c: 4a88 tstl %a0 4529e: 6604 bnes 452a4 452a0: 7009 moveq #9,%d0 452a2: 6032 bras 452d6 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 452a4: 4a80 tstl %d0 452a6: 660c bnes 452b4 *id = _Thread_Executing->Object.id; 452a8: 2279 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a1 452ae: 20a9 0008 movel %a1@(8),%a0@ return RTEMS_SUCCESSFUL; 452b2: 6022 bras 452d6 } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 452b4: 2f08 movel %a0,%sp@- 452b6: 2f2e 000c movel %fp@(12),%sp@- 452ba: 2f00 movel %d0,%sp@- 452bc: 4879 0005 cc06 pea 5cc06 <_RTEMS_tasks_Information> 452c2: 4eb9 0004 6670 jsr 46670 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 452c8: 4fef 0010 lea %sp@(16),%sp 452cc: 41f9 0005 a40c lea 5a40c <_Status_Object_name_errors_to_status>,%a0 452d2: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 } 452d6: 4e5e unlk %fp 452d8: 4e75 rts ... 0004bc30 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4bc30: 4e56 ffe4 linkw %fp,#-28 4bc34: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4bc38: 262e 0008 movel %fp@(8),%d3 4bc3c: 282e 000c movel %fp@(12),%d4 4bc40: 286e 0010 moveal %fp@(16),%a4 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4bc44: 4a8c tstl %a4 4bc46: 6606 bnes 4bc4e 4bc48: 7009 moveq #9,%d0 4bc4a: 6000 00fc braw 4bd48 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4bc4e: 2479 0005 cd4e moveal 5cd4e <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4bc54: 4a2a 0075 tstb %a2@(117) 4bc58: 57c0 seq %d0 4bc5a: 243c 0000 0100 movel #256,%d2 4bc60: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4bc62: 266a 010a moveal %a2@(266),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4bc66: c480 andl %d0,%d2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4bc68: 4aaa 007a tstl %a2@(122) 4bc6c: 6704 beqs 4bc72 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4bc6e: 08c2 0009 bset #9,%d2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4bc72: 4a2b 0008 tstb %a3@(8) 4bc76: 57c0 seq %d0 4bc78: 2a3c 0000 0400 movel #1024,%d5 4bc7e: 49c0 extbl %d0 4bc80: ca80 andl %d0,%d5 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4bc82: 4eb9 0004 7ff4 jsr 47ff4 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4bc88: 8085 orl %d5,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4bc8a: 8082 orl %d2,%d0 4bc8c: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4bc8e: 0804 0008 btst #8,%d4 4bc92: 670e beqs 4bca2 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4bc94: 2003 movel %d3,%d0 4bc96: 7201 moveq #1,%d1 4bc98: e088 lsrl #8,%d0 4bc9a: b380 eorl %d1,%d0 4bc9c: c081 andl %d1,%d0 4bc9e: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4bca2: 0804 0009 btst #9,%d4 4bca6: 671c beqs 4bcc4 if ( _Modes_Is_timeslice(mode_set) ) { 4bca8: 0803 0009 btst #9,%d3 4bcac: 6712 beqs 4bcc0 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4bcae: 41f9 0005 cc44 lea 5cc44 <_Thread_Ticks_per_timeslice>,%a0 if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4bcb4: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4bcb6: 2550 0076 movel %a0@,%a2@(118) if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4bcba: 2540 007a movel %d0,%a2@(122) 4bcbe: 6004 bras 4bcc4 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4bcc0: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4bcc4: 7007 moveq #7,%d0 4bcc6: c084 andl %d4,%d0 4bcc8: 6712 beqs 4bcdc */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4bcca: 40c0 movew %sr,%d0 4bccc: 7207 moveq #7,%d1 4bcce: c283 andl %d3,%d1 4bcd0: 0280 0000 f8ff andil #63743,%d0 4bcd6: e189 lsll #8,%d1 4bcd8: 8081 orl %d1,%d0 4bcda: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4bcdc: 0804 000a btst #10,%d4 4bce0: 6744 beqs 4bd26 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4bce2: 700a moveq #10,%d0 4bce4: e0ab lsrl %d0,%d3 4bce6: 7201 moveq #1,%d1 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4bce8: 4280 clrl %d0 4bcea: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4bcee: b383 eorl %d1,%d3 4bcf0: c681 andl %d1,%d3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4bcf2: b083 cmpl %d3,%d0 4bcf4: 6730 beqs 4bd26 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4bcf6: 203c 0000 0700 movel #1792,%d0 needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 4bcfc: 1743 0008 moveb %d3,%a3@(8) 4bd00: 40c1 movew %sr,%d1 4bd02: 8081 orl %d1,%d0 4bd04: 46c0 movew %d0,%sr _signals = information->signals_pending; 4bd06: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4bd0a: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4bd10: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4bd14: 46c1 movew %d1,%sr if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4bd16: 4aab 0012 tstl %a3@(18) 4bd1a: 670a beqs 4bd26 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 4bd1c: 7001 moveq #1,%d0 4bd1e: 7401 moveq #1,%d2 4bd20: 1540 0074 moveb %d0,%a2@(116) 4bd24: 6002 bras 4bd28 4bd26: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4bd28: 7203 moveq #3,%d1 4bd2a: b2b9 0005 ce1c cmpl 5ce1c <_System_state_Current>,%d1 4bd30: 6614 bnes 4bd46 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4bd32: 4eb9 0004 c028 jsr 4c028 <_Thread_Evaluate_mode> 4bd38: 4a00 tstb %d0 4bd3a: 6604 bnes 4bd40 4bd3c: 4a02 tstb %d2 4bd3e: 6706 beqs 4bd46 _Thread_Dispatch(); 4bd40: 4eb9 0004 6b90 jsr 46b90 <_Thread_Dispatch> 4bd46: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4bd48: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4bd4e: 4e5e unlk %fp 4bd50: 4e75 rts ... 0004e684 : #include #include rtems_id rtems_task_self(void) { 4e684: 4e56 0000 linkw %fp,#0 4e688: 2079 0006 20c6 moveal 620c6 <_Thread_Executing>,%a0 return _Thread_Executing->Object.id; } 4e68e: 4e5e unlk %fp 4e690: 2028 0008 movel %a0@(8),%d0 4e694: 4e75 rts ... 00046af4 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 46af4: 4e56 fffc linkw %fp,#-4 46af8: 202e 0008 movel %fp@(8),%d0 46afc: 2f03 movel %d3,%sp@- 46afe: 262e 0010 movel %fp@(16),%d3 46b02: 2f02 movel %d2,%sp@- 46b04: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 46b08: 4a39 0005 db44 tstb 5db44 46b0e: 6604 bnes 46b14 46b10: 7016 moveq #22,%d0 46b12: 6056 bras 46b6a /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 46b14: 720f moveq #15,%d1 46b16: b282 cmpl %d2,%d1 46b18: 6404 bccs 46b1e 46b1a: 700a moveq #10,%d0 46b1c: 604c bras 46b6a /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 46b1e: 4a80 tstl %d0 46b20: 670c beqs 46b2e _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 46b22: 2079 0005 f64e moveal 5f64e <_Thread_Executing>,%a0 46b28: b0a8 0008 cmpl %a0@(8),%d0 46b2c: 6612 bnes 46b40 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 46b2e: 2079 0005 f64e moveal 5f64e <_Thread_Executing>,%a0 46b34: 4280 clrl %d0 46b36: 2068 010a moveal %a0@(266),%a0 46b3a: 2183 2c1e movel %d3,%a0@(0000001e,%d2:l:4) return RTEMS_SUCCESSFUL; 46b3e: 602a bras 46b6a } the_thread = _Thread_Get( id, &location ); 46b40: 486e fffc pea %fp@(-4) 46b44: 2f00 movel %d0,%sp@- 46b46: 4eb9 0004 86c8 jsr 486c8 <_Thread_Get> switch ( location ) { 46b4c: 508f addql #8,%sp 46b4e: 4aae fffc tstl %fp@(-4) 46b52: 6704 beqs 46b58 46b54: 7004 moveq #4,%d0 46b56: 6012 bras 46b6a case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 46b58: 2240 moveal %d0,%a1 46b5a: 2069 010a moveal %a1@(266),%a0 46b5e: 2183 2c1e movel %d3,%a0@(0000001e,%d2:l:4) _Thread_Enable_dispatch(); 46b62: 4eb9 0004 86a2 jsr 486a2 <_Thread_Enable_dispatch> 46b68: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46b6a: 242e fff4 movel %fp@(-12),%d2 46b6e: 262e fff8 movel %fp@(-8),%d3 46b72: 4e5e unlk %fp 46b74: 4e75 rts ... 000493f8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 493f8: 4e56 fffc linkw %fp,#-4 493fc: 2f0a movel %a2,%sp@- 493fe: 246e 0010 moveal %fp@(16),%a2 49402: 2f02 movel %d2,%sp@- 49404: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 49408: 6710 beqs 4941a 4940a: 4280 clrl %d0 4940c: 1039 0006 0b42 moveb 60b42 ,%d0 49412: b082 cmpl %d2,%d0 49414: 6404 bccs 4941a 49416: 7013 moveq #19,%d0 49418: 6054 bras 4946e !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4941a: 4a8a tstl %a2 4941c: 6604 bnes 49422 4941e: 7009 moveq #9,%d0 49420: 604c bras 4946e return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 49422: 486e fffc pea %fp@(-4) 49426: 2f2e 0008 movel %fp@(8),%sp@- 4942a: 4eb9 0004 b104 jsr 4b104 <_Thread_Get> switch ( location ) { 49430: 508f addql #8,%sp return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 49432: 2040 moveal %d0,%a0 switch ( location ) { 49434: 4aae fffc tstl %fp@(-4) 49438: 6704 beqs 4943e 4943a: 7004 moveq #4,%d0 4943c: 6030 bras 4946e case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4943e: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 49442: 4a82 tstl %d2 49444: 6720 beqs 49466 the_thread->real_priority = new_priority; 49446: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4944a: 4aa8 001c tstl %a0@(28) 4944e: 6706 beqs 49456 the_thread->current_priority > new_priority ) 49450: b4a8 0014 cmpl %a0@(20),%d2 49454: 6410 bccs 49466 _Thread_Change_priority( the_thread, new_priority, false ); 49456: 42a7 clrl %sp@- 49458: 2f02 movel %d2,%sp@- 4945a: 2f08 movel %a0,%sp@- 4945c: 4eb9 0004 abb4 jsr 4abb4 <_Thread_Change_priority> 49462: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 49466: 4eb9 0004 b0ae jsr 4b0ae <_Thread_Enable_dispatch> 4946c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4946e: 242e fff4 movel %fp@(-12),%d2 49472: 246e fff8 moveal %fp@(-8),%a2 49476: 4e5e unlk %fp 49478: 4e75 rts ... 00063308 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 63308: 4e56 fff0 linkw %fp,#-16 6330c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 63310: 246e 000c moveal %fp@(12),%a2 63314: 242e 0010 movel %fp@(16),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 63318: 4a8a tstl %a2 6331a: 6604 bnes 63320 6331c: 7009 moveq #9,%d0 6331e: 6070 bras 63390 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 63320: 486e fffc pea %fp@(-4) 63324: 2f2e 0008 movel %fp@(8),%sp@- 63328: 4eb9 0004 b178 jsr 4b178 <_Thread_Get> switch (location) { 6332e: 508f addql #8,%sp rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 63330: 2640 moveal %d0,%a3 switch (location) { 63332: 4aae fffc tstl %fp@(-4) 63336: 6704 beqs 6333c 63338: 7004 moveq #4,%d0 6333a: 6054 bras 63390 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 6333c: 206b 011a moveal %a3@(282),%a0 while (tvp) { 63340: 6014 bras 63356 if (tvp->ptr == ptr) { 63342: b5e8 0004 cmpal %a0@(4),%a2 63346: 660c bnes 63354 tvp->dtor = dtor; 63348: 2142 0010 movel %d2,%a0@(16) _Thread_Enable_dispatch(); 6334c: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> 63352: 603a bras 6338e return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 63354: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 63356: 4a88 tstl %a0 63358: 66e8 bnes 63342 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 6335a: 4878 0014 pea 14 6335e: 4eb9 0004 c300 jsr 4c300 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 63364: 588f addql #4,%sp 63366: 43f9 0004 b152 lea 4b152 <_Thread_Enable_dispatch>,%a1 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 6336c: 2040 moveal %d0,%a0 _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 6336e: 4a80 tstl %d0 63370: 6606 bnes 63378 _Thread_Enable_dispatch(); 63372: 4e91 jsr %a1@ 63374: 701a moveq #26,%d0 return RTEMS_NO_MEMORY; 63376: 6018 bras 63390 } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 63378: 20ab 011a movel %a3@(282),%a0@ _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 6337c: 2152 0008 movel %a2@,%a0@(8) new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 63380: 2740 011a movel %d0,%a3@(282) if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; new->ptr = ptr; 63384: 214a 0004 movel %a2,%a0@(4) new->dtor = dtor; 63388: 2142 0010 movel %d2,%a0@(16) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; _Thread_Enable_dispatch(); 6338c: 4e91 jsr %a1@ 6338e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 63390: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 63396: 4e5e unlk %fp 63398: 4e75 rts ... 0006339c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 6339c: 4e56 fffc linkw %fp,#-4 633a0: 2f02 movel %d2,%sp@- 633a2: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 633a6: 675c beqs 63404 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 633a8: 486e fffc pea %fp@(-4) 633ac: 2f2e 0008 movel %fp@(8),%sp@- 633b0: 4eb9 0004 b178 jsr 4b178 <_Thread_Get> switch (location) { 633b6: 508f addql #8,%sp 633b8: 4aae fffc tstl %fp@(-4) 633bc: 6704 beqs 633c2 633be: 7004 moveq #4,%d0 633c0: 6044 bras 63406 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 633c2: 2240 moveal %d0,%a1 633c4: 2069 011a moveal %a1@(282),%a0 633c8: 93c9 subal %a1,%a1 while (tvp) { 633ca: 602e bras 633fa if (tvp->ptr == ptr) { 633cc: b4a8 0004 cmpl %a0@(4),%d2 633d0: 6624 bnes 633f6 if (prev) 633d2: 4a89 tstl %a1 633d4: 6704 beqs 633da prev->next = tvp->next; 633d6: 2290 movel %a0@,%a1@ 633d8: 6006 bras 633e0 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 633da: 2240 moveal %d0,%a1 633dc: 2350 011a movel %a0@,%a1@(282) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 633e0: 2f08 movel %a0,%sp@- 633e2: 2f00 movel %d0,%sp@- 633e4: 4eb9 0006 3478 jsr 63478 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 633ea: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 633f0: 508f addql #8,%sp prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); 633f2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 633f4: 6010 bras 63406 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 633f6: 2248 moveal %a0,%a1 633f8: 2050 moveal %a0@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 633fa: 4a88 tstl %a0 633fc: 66ce bnes 633cc return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 633fe: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> 63404: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 63406: 242e fff8 movel %fp@(-8),%d2 6340a: 4e5e unlk %fp 6340c: 4e75 rts ... 00063410 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 63410: 4e56 fffc linkw %fp,#-4 63414: 2f0a movel %a2,%sp@- 63416: 246e 0010 moveal %fp@(16),%a2 6341a: 2f02 movel %d2,%sp@- 6341c: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 63420: 6746 beqs 63468 return RTEMS_INVALID_ADDRESS; if ( !result ) 63422: 4a8a tstl %a2 63424: 6742 beqs 63468 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 63426: 486e fffc pea %fp@(-4) 6342a: 2f2e 0008 movel %fp@(8),%sp@- 6342e: 4eb9 0004 b178 jsr 4b178 <_Thread_Get> switch (location) { 63434: 508f addql #8,%sp 63436: 4aae fffc tstl %fp@(-4) 6343a: 6704 beqs 63440 6343c: 7004 moveq #4,%d0 6343e: 602a bras 6346a case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 63440: 2240 moveal %d0,%a1 63442: 2069 011a moveal %a1@(282),%a0 while (tvp) { 63446: 6016 bras 6345e if (tvp->ptr == ptr) { 63448: b4a8 0004 cmpl %a0@(4),%d2 6344c: 660e bnes 6345c /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 6344e: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 63452: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> 63458: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 6345a: 600e bras 6346a } tvp = (rtems_task_variable_t *)tvp->next; 6345c: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 6345e: 4a88 tstl %a0 63460: 66e6 bnes 63448 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 63462: 4eb9 0004 b152 jsr 4b152 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 63468: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6346a: 242e fff4 movel %fp@(-12),%d2 6346e: 246e fff8 moveal %fp@(-8),%a2 63472: 4e5e unlk %fp 63474: 4e75 rts ... 00043e50 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 43e50: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 43e52: 4e56 0000 linkw %fp,#0 43e56: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 43e5a: b280 cmpl %d0,%d1 43e5c: 6700 00ce beqw 43f2c 43e60: 6d54 blts 43eb6 43e62: 123c 0004 moveb #4,%d1 43e66: b280 cmpl %d0,%d1 43e68: 6700 00ae beqw 43f18 43e6c: 6d2a blts 43e98 43e6e: 123c 0001 moveb #1,%d1 43e72: b280 cmpl %d0,%d1 43e74: 6700 0092 beqw 43f08 43e78: 6d0a blts 43e84 43e7a: 4a80 tstl %d0 43e7c: 6700 008e beqw 43f0c 43e80: 6000 00d6 braw 43f58 43e84: 7202 moveq #2,%d1 <== NOT EXECUTED 43e86: b280 cmpl %d0,%d1 <== NOT EXECUTED 43e88: 6700 0086 beqw 43f10 <== NOT EXECUTED 43e8c: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 43e90: b280 cmpl %d0,%d1 <== NOT EXECUTED 43e92: 6600 00c4 bnew 43f58 <== NOT EXECUTED 43e96: 607c bras 43f14 <== NOT EXECUTED 43e98: 7206 moveq #6,%d1 <== NOT EXECUTED 43e9a: b280 cmpl %d0,%d1 <== NOT EXECUTED 43e9c: 6700 0082 beqw 43f20 <== NOT EXECUTED 43ea0: 6e7a bgts 43f1c <== NOT EXECUTED 43ea2: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 43ea6: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ea8: 677a beqs 43f24 <== NOT EXECUTED 43eaa: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 43eae: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eb0: 6600 00a6 bnew 43f58 <== NOT EXECUTED 43eb4: 6072 bras 43f28 <== NOT EXECUTED 43eb6: 720e moveq #14,%d1 <== NOT EXECUTED 43eb8: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eba: 6700 0084 beqw 43f40 <== NOT EXECUTED 43ebe: 6d1c blts 43edc <== NOT EXECUTED 43ec0: 123c 000b moveb #11,%d1 <== NOT EXECUTED 43ec4: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ec6: 676c beqs 43f34 <== NOT EXECUTED 43ec8: 6e66 bgts 43f30 <== NOT EXECUTED 43eca: 123c 000c moveb #12,%d1 <== NOT EXECUTED 43ece: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ed0: 6766 beqs 43f38 <== NOT EXECUTED 43ed2: 123c 000d moveb #13,%d1 <== NOT EXECUTED 43ed6: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ed8: 667e bnes 43f58 <== NOT EXECUTED 43eda: 6060 bras 43f3c <== NOT EXECUTED 43edc: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 43ee2: 6768 beqs 43f4c <== NOT EXECUTED 43ee4: 6e10 bgts 43ef6 <== NOT EXECUTED 43ee6: 720f moveq #15,%d1 <== NOT EXECUTED 43ee8: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eea: 6758 beqs 43f44 <== NOT EXECUTED 43eec: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 43ef2: 6664 bnes 43f58 <== NOT EXECUTED 43ef4: 6052 bras 43f48 <== NOT EXECUTED 43ef6: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 43efc: 6752 beqs 43f50 <== NOT EXECUTED 43efe: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 43f04: 6652 bnes 43f58 <== NOT EXECUTED 43f06: 604c bras 43f54 <== NOT EXECUTED 43f08: 7001 moveq #1,%d0 <== NOT EXECUTED 43f0a: 604e bras 43f5a <== NOT EXECUTED 43f0c: 4280 clrl %d0 <== NOT EXECUTED 43f0e: 604a bras 43f5a <== NOT EXECUTED 43f10: 7002 moveq #2,%d0 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 43f12: 6046 bras 43f5a <== NOT EXECUTED 43f14: 7003 moveq #3,%d0 <== NOT EXECUTED case B110: baud_index = 3; break; 43f16: 6042 bras 43f5a <== NOT EXECUTED 43f18: 7004 moveq #4,%d0 <== NOT EXECUTED case B134: baud_index = 4; break; 43f1a: 603e bras 43f5a <== NOT EXECUTED 43f1c: 7005 moveq #5,%d0 <== NOT EXECUTED case B150: baud_index = 5; break; 43f1e: 603a bras 43f5a <== NOT EXECUTED 43f20: 7006 moveq #6,%d0 <== NOT EXECUTED case B200: baud_index = 6; break; 43f22: 6036 bras 43f5a <== NOT EXECUTED 43f24: 7007 moveq #7,%d0 <== NOT EXECUTED case B300: baud_index = 7; break; 43f26: 6032 bras 43f5a <== NOT EXECUTED 43f28: 7008 moveq #8,%d0 <== NOT EXECUTED case B600: baud_index = 8; break; 43f2a: 602e bras 43f5a <== NOT EXECUTED 43f2c: 7009 moveq #9,%d0 <== NOT EXECUTED case B1200: baud_index = 9; break; 43f2e: 602a bras 43f5a <== NOT EXECUTED 43f30: 700a moveq #10,%d0 <== NOT EXECUTED case B1800: baud_index = 10; break; 43f32: 6026 bras 43f5a <== NOT EXECUTED 43f34: 700b moveq #11,%d0 <== NOT EXECUTED case B2400: baud_index = 11; break; 43f36: 6022 bras 43f5a <== NOT EXECUTED 43f38: 700c moveq #12,%d0 <== NOT EXECUTED case B4800: baud_index = 12; break; 43f3a: 601e bras 43f5a <== NOT EXECUTED 43f3c: 700d moveq #13,%d0 <== NOT EXECUTED case B9600: baud_index = 13; break; 43f3e: 601a bras 43f5a <== NOT EXECUTED 43f40: 700e moveq #14,%d0 <== NOT EXECUTED case B19200: baud_index = 14; break; 43f42: 6016 bras 43f5a <== NOT EXECUTED 43f44: 700f moveq #15,%d0 <== NOT EXECUTED case B38400: baud_index = 15; break; 43f46: 6012 bras 43f5a <== NOT EXECUTED 43f48: 7010 moveq #16,%d0 <== NOT EXECUTED case B57600: baud_index = 16; break; 43f4a: 600e bras 43f5a <== NOT EXECUTED 43f4c: 7011 moveq #17,%d0 <== NOT EXECUTED case B115200: baud_index = 17; break; 43f4e: 600a bras 43f5a <== NOT EXECUTED 43f50: 7012 moveq #18,%d0 <== NOT EXECUTED case B230400: baud_index = 18; break; 43f52: 6006 bras 43f5a <== NOT EXECUTED 43f54: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; 43f56: 6002 bras 43f5a <== NOT EXECUTED 43f58: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 43f5a: 4e5e unlk %fp 43f5c: 4e75 rts ... 00042ea8 : { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 42ea8: 4280 clrl %d0 <== NOT EXECUTED rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 42eaa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 42eae: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 42eb2: 23d0 0005 b534 movel %a0@,5b534 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 42eb8: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 42ebc: 23d0 0005 b538 movel %a0@,5b538 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 42ec2: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 42ec6: 4e5e unlk %fp <== NOT EXECUTED int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; 42ec8: 23d0 0005 b53c movel %a0@,5b53c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 42ece: 4e75 rts 00044090 : } } rtems_status_code rtems_termios_close (void *arg) { 44090: 4e56 fff4 linkw %fp,#-12 44094: 48d7 1c00 moveml %a2-%a4,%sp@ 44098: 266e 0008 moveal %fp@(8),%a3 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4409c: 49f9 0004 4f30 lea 44f30 ,%a4 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 440a2: 2053 moveal %a3@,%a0 440a4: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 440a8: 42a7 clrl %sp@- 440aa: 42a7 clrl %sp@- 440ac: 2f39 0005 cb78 movel 5cb78 ,%sp@- 440b2: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 440b4: 4fef 000c lea %sp@(12),%sp 440b8: 4a80 tstl %d0 440ba: 6670 bnes 4412c rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 440bc: 202a 0008 movel %a2@(8),%d0 440c0: 5380 subql #1,%d0 440c2: 2540 0008 movel %d0,%a2@(8) 440c6: 6600 0110 bnew 441d8 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 440ca: 202a 00cc movel %a2@(204),%d0 440ce: 41f9 0005 c334 lea 5c334 ,%a0 440d4: e788 lsll #3,%d0 440d6: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 440da: 4a88 tstl %a0 440dc: 6706 beqs 440e4 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 440de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 440e0: 4e90 jsr %a0@ <== NOT EXECUTED 440e2: 6018 bras 440fc <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 440e4: 42a7 clrl %sp@- 440e6: 42a7 clrl %sp@- 440e8: 2f2a 0018 movel %a2@(24),%sp@- 440ec: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 440ee: 4fef 000c lea %sp@(12),%sp 440f2: 4a80 tstl %d0 440f4: 6636 bnes 4412c rtems_fatal_error_occurred (sc); } drainOutput (tty); 440f6: 2f0a movel %a2,%sp@- 440f8: 4eba f940 jsr %pc@(43a3a ) 440fc: 588f addql #4,%sp } if (tty->device.outputUsesInterrupts 440fe: 7002 moveq #2,%d0 44100: b0aa 00b4 cmpl %a2@(180),%d0 44104: 662e bnes 44134 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 44106: 4878 0001 pea 1 <== NOT EXECUTED 4410a: 49f9 0004 4adc lea 44adc ,%a4 <== NOT EXECUTED 44110: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44114: 4e94 jsr %a4@ <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44116: 508f addql #8,%sp <== NOT EXECUTED 44118: 4a80 tstl %d0 <== NOT EXECUTED 4411a: 6610 bnes 4412c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 4411c: 4878 0001 pea 1 <== NOT EXECUTED 44120: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44124: 4e94 jsr %a4@ <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44126: 508f addql #8,%sp <== NOT EXECUTED 44128: 4a80 tstl %d0 <== NOT EXECUTED 4412a: 6708 beqs 44134 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4412c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4412e: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED } if (tty->device.lastClose) 44134: 206a 009c moveal %a2@(156),%a0 44138: 4a88 tstl %a0 4413a: 6710 beqs 4414c (*tty->device.lastClose)(tty->major, tty->minor, arg); 4413c: 2f0b movel %a3,%sp@- 4413e: 2f2a 0010 movel %a2@(16),%sp@- 44142: 2f2a 000c movel %a2@(12),%sp@- 44146: 4e90 jsr %a0@ 44148: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 4414c: 2052 moveal %a2@,%a0 4414e: 4a88 tstl %a0 44150: 6610 bnes 44162 rtems_termios_ttyTail = tty->back; 44152: 206a 0004 moveal %a2@(4),%a0 44156: 23c8 0005 cb7c movel %a0,5cb7c if ( rtems_termios_ttyTail != NULL ) { 4415c: 670a beqs 44168 rtems_termios_ttyTail->forw = NULL; 4415e: 4290 clrl %a0@ <== NOT EXECUTED 44160: 6006 bras 44168 <== NOT EXECUTED } } else { tty->forw->back = tty->back; 44162: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 44168: 206a 0004 moveal %a2@(4),%a0 4416c: 4a88 tstl %a0 4416e: 6610 bnes 44180 rtems_termios_ttyHead = tty->forw; 44170: 2052 moveal %a2@,%a0 44172: 23c8 0005 cb80 movel %a0,5cb80 if ( rtems_termios_ttyHead != NULL ) { 44178: 6708 beqs 44182 rtems_termios_ttyHead->back = NULL; 4417a: 42a8 0004 clrl %a0@(4) 4417e: 6002 bras 44182 } } else { tty->back->forw = tty->forw; 44180: 2092 movel %a2@,%a0@ <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 44182: 2f2a 0014 movel %a2@(20),%sp@- 44186: 47f9 0004 4e94 lea 44e94 ,%a3 4418c: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 4418e: 2f2a 0018 movel %a2@(24),%sp@- 44192: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 44194: 2f2a 008c movel %a2@(140),%sp@- 44198: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 4419a: 4fef 000c lea %sp@(12),%sp 4419e: 4aaa 00a0 tstl %a2@(160) 441a2: 6708 beqs 441ac (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 441a4: 7002 moveq #2,%d0 441a6: b0aa 00b4 cmpl %a2@(180),%d0 441aa: 660c bnes 441b8 rtems_semaphore_delete (tty->rawInBuf.Semaphore); 441ac: 2f2a 0068 movel %a2@(104),%sp@- 441b0: 4eb9 0004 4e94 jsr 44e94 441b6: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 441b8: 2f2a 0058 movel %a2@(88),%sp@- 441bc: 47f9 0004 8f48 lea 48f48 ,%a3 441c2: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 441c4: 2f2a 007c movel %a2@(124),%sp@- 441c8: 4e93 jsr %a3@ free (tty->cbuf); 441ca: 2f2a 001c movel %a2@(28),%sp@- 441ce: 4e93 jsr %a3@ free (tty); 441d0: 2f0a movel %a2,%sp@- 441d2: 4e93 jsr %a3@ 441d4: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 441d8: 2f39 0005 cb78 movel 5cb78 ,%sp@- 441de: 4eb9 0004 5034 jsr 45034 return RTEMS_SUCCESSFUL; } 441e4: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 441ea: 4280 clrl %d0 441ec: 4e5e unlk %fp 441ee: 4e75 rts 000430a6 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 430a6: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 430aa: 202e 000c movel %fp@(12),%d0 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 430ae: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 430b2: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 430b6: 7002 moveq #2,%d0 430b8: b0a8 00b4 cmpl %a0@(180),%d0 430bc: 661c bnes 430da /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 430be: 4878 0002 pea 2 <== NOT EXECUTED 430c2: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 430c6: 4eb9 0004 4adc jsr 44adc <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 430cc: 508f addql #8,%sp <== NOT EXECUTED 430ce: 4a80 tstl %d0 <== NOT EXECUTED 430d0: 672e beqs 43100 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 430d2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 430d4: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 430da: 7005 moveq #5,%d0 430dc: b0a8 00cc cmpl %a0@(204),%d0 430e0: 6612 bnes 430f4 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 430e2: 2279 0005 c3e8 moveal 5c3e8 ,%a1<== NOT EXECUTED 430e8: 4a89 tstl %a1 <== NOT EXECUTED 430ea: 6714 beqs 43100 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 430ec: 2f08 movel %a0,%sp@- <== NOT EXECUTED 430ee: 4e91 jsr %a1@ <== NOT EXECUTED 430f0: 588f addql #4,%sp <== NOT EXECUTED 430f2: 600c bras 43100 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 430f4: 2d48 0008 movel %a0,%fp@(8) } } 430f8: 4e5e unlk %fp rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 430fa: 4ef9 0004 2eec jmp 42eec } } 43100: 4280 clrl %d0 <== NOT EXECUTED 43102: 4e5e unlk %fp <== NOT EXECUTED 43104: 4e75 rts 00043106 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 43106: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4310a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4310e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43112: 49f9 0005 c334 lea 5c334 ,%a4 <== NOT EXECUTED 43118: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 4311c: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43120: eb88 lsll #5,%d0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 43122: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43126: 4ab4 0810 tstl %a4@(00000010,%d0:l) <== NOT EXECUTED 4312a: 6634 bnes 43160 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4312c: 2802 movel %d2,%d4 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 4312e: 4bea 004a lea %a2@(74),%a5 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43132: 49ea 0030 lea %a2@(48),%a4 <== NOT EXECUTED 43136: 4282 clrl %d2 <== NOT EXECUTED } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); 43138: 2c3c 0000 0700 movel #1792,%d6 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4313e: 4200 clrb %d0 <== NOT EXECUTED 43140: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED 43144: 6000 01f2 braw 43338 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 43148: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 4314c: 5382 subql #1,%d2 <== NOT EXECUTED 4314e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43150: 121b moveb %a3@+,%d1 <== NOT EXECUTED 43152: eb88 lsll #5,%d0 <== NOT EXECUTED 43154: 49c1 extbl %d1 <== NOT EXECUTED 43156: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43158: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED 4315c: 4e90 jsr %a0@ <== NOT EXECUTED 4315e: 508f addql #8,%sp <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 43160: 4a82 tstl %d2 <== NOT EXECUTED 43162: 66e4 bnes 43148 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 43164: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43168: 6600 01e6 bnew 43350 <== NOT EXECUTED 4316c: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43170: 4a88 tstl %a0 <== NOT EXECUTED 43172: 6700 01dc beqw 43350 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43176: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4317a: 7a01 moveq #1,%d5 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4317c: 486a 0030 pea %a2@(48) <== NOT EXECUTED 43180: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43182: 508f addql #8,%sp <== NOT EXECUTED 43184: 2545 00e4 movel %d5,%a2@(228) <== NOT EXECUTED 43188: 6000 01c8 braw 43352 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4318c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43190: 1e13 moveb %a3@,%d7 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 43192: 0800 0009 btst #9,%d0 <== NOT EXECUTED 43196: 6744 beqs 431dc <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 43198: 4283 clrl %d3 <== NOT EXECUTED 4319a: 162a 004a moveb %a2@(74),%d3 <== NOT EXECUTED 4319e: 4281 clrl %d1 <== NOT EXECUTED 431a0: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 431a4: 1007 moveb %d7,%d0 <== NOT EXECUTED 431a6: 49c0 extbl %d0 <== NOT EXECUTED 431a8: b680 cmpl %d0,%d3 <== NOT EXECUTED 431aa: 6622 bnes 431ce <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 431ac: b280 cmpl %d0,%d1 <== NOT EXECUTED 431ae: 660a bnes 431ba <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 431b0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431b4: 7210 moveq #16,%d1 <== NOT EXECUTED 431b6: b380 eorl %d1,%d0 <== NOT EXECUTED 431b8: 6008 bras 431c2 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 431ba: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431be: 7a10 moveq #16,%d5 <== NOT EXECUTED 431c0: 8085 orl %d5,%d0 <== NOT EXECUTED 431c2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 431c6: 7001 moveq #1,%d0 <== NOT EXECUTED 431c8: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED 431cc: 6014 bras 431e2 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 431ce: b280 cmpl %d0,%d1 <== NOT EXECUTED 431d0: 660a bnes 431dc <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 431d2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431d6: 72ef moveq #-17,%d1 <== NOT EXECUTED 431d8: c081 andl %d1,%d0 <== NOT EXECUTED 431da: 60e6 bras 431c2 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 431dc: 4a2e fffb tstb %fp@(-5) <== NOT EXECUTED 431e0: 674c beqs 4322e <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 431e2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431e6: 7a30 moveq #48,%d5 <== NOT EXECUTED 431e8: 7220 moveq #32,%d1 <== NOT EXECUTED 431ea: c085 andl %d5,%d0 <== NOT EXECUTED 431ec: b280 cmpl %d0,%d1 <== NOT EXECUTED 431ee: 6600 0144 bnew 43334 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 431f2: 2006 movel %d6,%d0 <== NOT EXECUTED 431f4: 40c3 movew %sr,%d3 <== NOT EXECUTED 431f6: 8083 orl %d3,%d0 <== NOT EXECUTED 431f8: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 431fa: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431fe: 7adf moveq #-33,%d5 <== NOT EXECUTED 43200: c085 andl %d5,%d0 <== NOT EXECUTED 43202: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 43206: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4320a: 671c beqs 43228 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 4320c: 4878 0001 pea 1 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 43210: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 43214: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43218: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4321a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4321e: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43222: 4e90 jsr %a0@ <== NOT EXECUTED 43224: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43228: 46c3 movew %d3,%sr <== NOT EXECUTED 4322a: 6000 0108 braw 43334 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 4322e: 206a 0060 moveal %a2@(96),%a0 <== NOT EXECUTED 43232: 5288 addql #1,%a0 <== NOT EXECUTED 43234: 2208 movel %a0,%d1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43236: 2006 movel %d6,%d0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 43238: 226a 0064 moveal %a2@(100),%a1 <== NOT EXECUTED 4323c: 2a09 movel %a1,%d5 <== NOT EXECUTED 4323e: 4c45 1003 remul %d5,%d3,%d1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43242: 40c1 movew %sr,%d1 <== NOT EXECUTED 43244: 8081 orl %d1,%d0 <== NOT EXECUTED 43246: 46c0 movew %d0,%sr <== NOT EXECUTED 43248: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4324c: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43250: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43254: 9081 subl %d1,%d0 <== NOT EXECUTED 43256: 2240 moveal %d0,%a1 <== NOT EXECUTED 43258: d3c3 addal %d3,%a1 <== NOT EXECUTED 4325a: 2a09 movel %a1,%d5 <== NOT EXECUTED 4325c: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43260: 4c41 5000 remul %d1,%d0,%d5 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 43264: b0aa 00c0 cmpl %a2@(192),%d0 <== NOT EXECUTED 43268: 6300 008e blsw 432f8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 4326c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 43270: 0800 0000 btst #0,%d0 <== NOT EXECUTED 43274: 6600 0082 bnew 432f8 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 43278: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4327c: 7201 moveq #1,%d1 <== NOT EXECUTED 4327e: 8081 orl %d1,%d0 <== NOT EXECUTED 43280: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 43284: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43288: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 4328e: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 43294: 6632 bnes 432c8 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 43296: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4329a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4329e: 6606 bnes 432a6 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 432a0: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 432a4: 6652 bnes 432f8 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 432a6: 4878 0001 pea 1 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 432aa: 7a02 moveq #2,%d5 <== NOT EXECUTED 432ac: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 432b0: 2f0d movel %a5,%sp@- <== NOT EXECUTED 432b2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 432b6: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 432ba: 8285 orl %d5,%d1 <== NOT EXECUTED 432bc: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 432c0: 4e90 jsr %a0@ <== NOT EXECUTED 432c2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 432c6: 6030 bras 432f8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 432c8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 432cc: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 432d2: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 432d8: 661e bnes 432f8 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 432da: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 432de: 303c 0004 movew #4,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 432e2: 206a 00ac moveal %a2@(172),%a0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 432e6: 8280 orl %d0,%d1 <== NOT EXECUTED 432e8: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 432ec: 4a88 tstl %a0 <== NOT EXECUTED 432ee: 6708 beqs 432f8 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 432f0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 432f4: 4e90 jsr %a0@ <== NOT EXECUTED 432f6: 588f addql #4,%sp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 432f8: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED 432fc: 46c1 movew %d1,%sr <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 432fe: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 43302: b083 cmpl %d3,%d0 <== NOT EXECUTED 43304: 6604 bnes 4330a <== NOT EXECUTED dropped++; 43306: 5282 addql #1,%d2 <== NOT EXECUTED 43308: 602a bras 43334 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 4330a: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4330e: 1187 3800 moveb %d7,%a0@(00000000,%d3:l) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 43312: 2543 0060 movel %d3,%a2@(96) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 43316: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 4331a: 6618 bnes 43334 <== NOT EXECUTED 4331c: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43320: 4a88 tstl %a0 <== NOT EXECUTED 43322: 6710 beqs 43334 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43324: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43328: 7a01 moveq #1,%d5 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4332a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4332c: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4332e: 508f addql #8,%sp <== NOT EXECUTED 43330: 2545 00e4 movel %d5,%a2@(228) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43334: 528b addql #1,%a3 <== NOT EXECUTED 43336: 5384 subql #1,%d4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 43338: 4a84 tstl %d4 <== NOT EXECUTED 4333a: 6600 fe50 bnew 4318c <== NOT EXECUTED } } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); 4333e: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 43342: d5aa 0078 addl %d2,%a2@(120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 43346: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return dropped; 4334c: 588f addql #4,%sp <== NOT EXECUTED 4334e: 6002 bras 43352 <== NOT EXECUTED 43350: 4282 clrl %d2 <== NOT EXECUTED } 43352: 2002 movel %d2,%d0 <== NOT EXECUTED 43354: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4335a: 4e5e unlk %fp <== NOT EXECUTED 4335c: 4e75 rts 00042e6c : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 42e6c: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 42e70: 4ab9 0005 cb78 tstl 5cb78 42e76: 662c bnes 42ea4 sc = rtems_semaphore_create ( 42e78: 4879 0005 cb78 pea 5cb78 42e7e: 42a7 clrl %sp@- 42e80: 4878 0054 pea 54 42e84: 4878 0001 pea 1 42e88: 2f3c 5452 6d69 movel #1414688105,%sp@- 42e8e: 4eb9 0004 4cf8 jsr 44cf8 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 42e94: 4fef 0014 lea %sp@(20),%sp 42e98: 4a80 tstl %d0 42e9a: 6708 beqs 42ea4 rtems_fatal_error_occurred (sc); 42e9c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e9e: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED } } 42ea4: 4e5e unlk %fp 42ea6: 4e75 rts 00043d7a : } } rtems_status_code rtems_termios_ioctl (void *arg) { 43d7a: 4e56 ffec linkw %fp,#-20 43d7e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 43d82: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 43d86: 2053 moveal %a3@,%a0 43d88: 2468 0034 moveal %a0@(52),%a2 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43d8c: 42a7 clrl %sp@- rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 43d8e: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 43d92: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43d96: 42a7 clrl %sp@- 43d98: 2f2a 0018 movel %a2@(24),%sp@- 43d9c: 4eb9 0004 4f30 jsr 44f30 if (sc != RTEMS_SUCCESSFUL) { 43da2: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43da6: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 43da8: 6600 02d6 bnew 44080 args->ioctl_return = sc; return sc; } switch (args->command) { 43dac: 202b 0004 movel %a3@(4),%d0 43db0: 7204 moveq #4,%d1 43db2: b280 cmpl %d0,%d1 43db4: 6700 023c beqw 43ff2 43db8: 6514 bcss 43dce 43dba: 7602 moveq #2,%d3 43dbc: b680 cmpl %d0,%d3 43dbe: 6778 beqs 43e38 43dc0: 6500 0216 bcsw 43fd8 43dc4: 123c 0001 moveb #1,%d1 43dc8: b280 cmpl %d0,%d1 43dca: 662c bnes 43df8 43dcc: 6050 bras 43e1e 43dce: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 43dd4: 6700 027c beqw 44052 <== NOT EXECUTED 43dd8: 620a bhis 43de4 <== NOT EXECUTED 43dda: 7605 moveq #5,%d3 <== NOT EXECUTED 43ddc: b680 cmpl %d0,%d3 <== NOT EXECUTED 43dde: 6618 bnes 43df8 <== NOT EXECUTED 43de0: 6000 01fe braw 43fe0 <== NOT EXECUTED 43de4: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 43dea: 6700 025c beqw 44048 <== NOT EXECUTED 43dee: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 43df4: 6700 020c beqw 44002 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 43df8: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43dfc: eb88 lsll #5,%d0 <== NOT EXECUTED 43dfe: 0680 0005 c34c addil #377676,%d0 <== NOT EXECUTED 43e04: 2240 moveal %d0,%a1 <== NOT EXECUTED 43e06: 2051 moveal %a1@,%a0 <== NOT EXECUTED 43e08: 4a88 tstl %a0 <== NOT EXECUTED 43e0a: 6606 bnes 43e12 <== NOT EXECUTED 43e0c: 740a moveq #10,%d2 <== NOT EXECUTED 43e0e: 6000 0264 braw 44074 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 43e12: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43e14: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e16: 4e90 jsr %a0@ <== NOT EXECUTED 43e18: 2400 movel %d0,%d2 <== NOT EXECUTED 43e1a: 6000 01b6 braw 43fd2 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 43e1e: 4878 0024 pea 24 43e22: 486a 0030 pea %a2@(48) 43e26: 2f2b 0008 movel %a3@(8),%sp@- 43e2a: 4eb9 0004 d23c jsr 4d23c break; 43e30: 4fef 000c lea %sp@(12),%sp 43e34: 6000 023e braw 44074 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 43e38: 4878 0024 pea 24 43e3c: 2f2b 0008 movel %a3@(8),%sp@- 43e40: 486a 0030 pea %a2@(48) 43e44: 4eb9 0004 d23c jsr 4d23c /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 43e4a: 202a 00b8 movel %a2@(184),%d0 43e4e: 4fef 000c lea %sp@(12),%sp 43e52: 0800 0009 btst #9,%d0 43e56: 6760 beqs 43eb8 43e58: 202a 0030 movel %a2@(48),%d0 43e5c: 0280 0000 0400 andil #1024,%d0 43e62: 6654 bnes 43eb8 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 43e64: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e68: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 43e6e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 43e72: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e76: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43e7a: 673c beqs 43eb8 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 43e7c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 43e82: 40c3 movew %sr,%d3 <== NOT EXECUTED 43e84: 8083 orl %d3,%d0 <== NOT EXECUTED 43e86: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 43e88: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e8c: 72df moveq #-33,%d1 <== NOT EXECUTED 43e8e: c081 andl %d1,%d0 <== NOT EXECUTED 43e90: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 43e94: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43e98: 671c beqs 43eb6 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43e9a: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 43e9e: 4878 0001 pea 1 <== NOT EXECUTED 43ea2: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43ea6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ea8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43eac: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43eb0: 4e90 jsr %a0@ <== NOT EXECUTED 43eb2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43eb6: 46c3 movew %d3,%sr <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 43eb8: 202a 00b8 movel %a2@(184),%d0 43ebc: 0800 000a btst #10,%d0 43ec0: 6724 beqs 43ee6 43ec2: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 43ec6: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 43ecc: 6618 bnes 43ee6 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 43ece: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 43ed2: 76fd moveq #-3,%d3 <== NOT EXECUTED } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 43ed4: 0880 000a bclr #10,%d0 <== NOT EXECUTED 43ed8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 43edc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43ee0: c083 andl %d3,%d0 <== NOT EXECUTED 43ee2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 43ee6: 202a 00b8 movel %a2@(184),%d0 43eea: 0800 0008 btst #8,%d0 43eee: 6736 beqs 43f26 43ef0: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 43ef4: 6d30 blts 43f26 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 43ef6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43efa: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 43efe: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 43f02: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f06: 44c0 movew %d0,%ccr <== NOT EXECUTED 43f08: 6610 bnes 43f1a <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 43f0a: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 43f0e: 4a88 tstl %a0 <== NOT EXECUTED 43f10: 6708 beqs 43f1a <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 43f12: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43f16: 4e90 jsr %a0@ <== NOT EXECUTED 43f18: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 43f1a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f1e: 72fb moveq #-5,%d1 <== NOT EXECUTED 43f20: c081 andl %d1,%d0 <== NOT EXECUTED 43f22: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 43f26: 4aaa 0038 tstl %a2@(56) 43f2a: 6c0c bges 43f38 tty->flow_ctrl |= FL_MDRTS; 43f2c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f30: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 43f34: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 43f38: 202a 0030 movel %a2@(48),%d0 43f3c: 0280 0000 1000 andil #4096,%d0 43f42: 670c beqs 43f50 tty->flow_ctrl |= FL_MDXOF; 43f44: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f48: 08c0 000a bset #10,%d0 <== NOT EXECUTED 43f4c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 43f50: 202a 0030 movel %a2@(48),%d0 43f54: 0280 0000 0400 andil #1024,%d0 43f5a: 670c beqs 43f68 tty->flow_ctrl |= FL_MDXON; 43f5c: 202a 00b8 movel %a2@(184),%d0 43f60: 08c0 0009 bset #9,%d0 43f64: 2540 00b8 movel %d0,%a2@(184) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 43f68: 7002 moveq #2,%d0 43f6a: c0aa 003c andl %a2@(60),%d0 43f6e: 663a bnes 43faa tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 43f70: 4283 clrl %d3 <== NOT EXECUTED 43f72: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 43f76: 4eb9 0004 48f8 jsr 448f8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 43f7c: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 43f80: 760a moveq #10,%d3 <== NOT EXECUTED 43f82: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 43f86: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 43f8a: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43f8e: 6714 beqs 43fa4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43f90: 42aa 006c clrl %a2@(108) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 43f94: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 43f98: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43f9c: 6614 bnes 43fb2 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 43f9e: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED 43fa2: 601a bras 43fbe <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 43fa4: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43fa8: 670e beqs 43fb8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43faa: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 43fae: 42aa 0070 clrl %a2@(112) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 43fb2: 42aa 0074 clrl %a2@(116) 43fb6: 6006 bras 43fbe } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 43fb8: 7001 moveq #1,%d0 <== NOT EXECUTED 43fba: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED } } } if (tty->device.setAttributes) 43fbe: 206a 00a8 moveal %a2@(168),%a0 43fc2: 4a88 tstl %a0 43fc4: 6700 00ae beqw 44074 (*tty->device.setAttributes)(tty->minor, &tty->termios); 43fc8: 486a 0030 pea %a2@(48) 43fcc: 2f2a 0010 movel %a2@(16),%sp@- 43fd0: 4e90 jsr %a0@ 43fd2: 508f addql #8,%sp 43fd4: 6000 009e braw 44074 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 43fd8: 2f0a movel %a2,%sp@- 43fda: 4eba fa5e jsr %pc@(43a3a ) 43fde: 6064 bras 44044 break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 43fe0: 2014 movel %a4@,%d0 <== NOT EXECUTED 43fe2: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 43fe6: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 43fea: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED break; 43fee: 6000 0084 braw 44074 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 43ff2: 2014 movel %a4@,%d0 <== NOT EXECUTED 43ff4: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 43ff8: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 43ffc: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED break; 44000: 6072 bras 44074 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44002: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44006: 41f9 0005 c334 lea 5c334 ,%a0 <== NOT EXECUTED 4400c: e788 lsll #3,%d0 <== NOT EXECUTED 4400e: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 44012: 4a88 tstl %a0 <== NOT EXECUTED 44014: 6708 beqs 4401e <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44016: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44018: 4e90 jsr %a0@ <== NOT EXECUTED 4401a: 588f addql #4,%sp <== NOT EXECUTED 4401c: 2400 movel %d0,%d2 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 4401e: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44022: 2010 movel %a0@,%d0 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44024: 2200 movel %d0,%d1 <== NOT EXECUTED 44026: 41f9 0005 c334 lea 5c334 ,%a0 <== NOT EXECUTED 4402c: eb89 lsll #5,%d1 <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 4402e: 2540 00cc movel %d0,%a2@(204) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44032: 2070 1800 moveal %a0@(00000000,%d1:l),%a0 <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 44036: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 4403a: 4a88 tstl %a0 <== NOT EXECUTED 4403c: 6736 beqs 44074 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 4403e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44040: 4e90 jsr %a0@ <== NOT EXECUTED 44042: 2400 movel %d0,%d2 <== NOT EXECUTED 44044: 588f addql #4,%sp 44046: 602c bras 44074 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 44048: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 4404c: 20aa 00cc movel %a2@(204),%a0@ <== NOT EXECUTED break; 44050: 6022 bras 44074 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 44052: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44056: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 4405a: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 4405c: 6a06 bpls 44064 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 4405e: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44062: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 44064: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44068: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 4406c: d280 addl %d0,%d1 <== NOT EXECUTED 4406e: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44072: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 44074: 2f2a 0018 movel %a2@(24),%sp@- 44078: 4eb9 0004 5034 jsr 45034 args->ioctl_return = sc; return sc; 4407e: 588f addql #4,%sp } 44080: 2002 movel %d2,%d0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 44082: 2742 000c movel %d2,%a3@(12) return sc; } 44086: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4408c: 4e5e unlk %fp 4408e: 4e75 rts 000441f0 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 441f0: 4e56 ffe0 linkw %fp,#-32 441f4: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 441f8: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 441fa: 262e 0008 movel %fp@(8),%d3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 441fe: 42a7 clrl %sp@- 44200: 2f39 0005 cb78 movel 5cb78 ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44206: 282e 000c movel %fp@(12),%d4 4420a: 2a6e 0010 moveal %fp@(16),%a5 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 4420e: 4eb9 0004 4f30 jsr 44f30 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44214: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44218: 2400 movel %d0,%d2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4421a: 6600 0394 bnew 445b0 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 4421e: 2479 0005 cb80 moveal 5cb80 ,%a2 44224: 6010 bras 44236 if ((tty->major == major) && (tty->minor == minor)) 44226: b6aa 000c cmpl %a2@(12),%d3 4422a: 6608 bnes 44234 4422c: b8aa 0010 cmpl %a2@(16),%d4 44230: 6700 0308 beqw 4453a */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 44234: 2452 moveal %a2@,%a2 44236: 4a8a tstl %a2 44238: 66ec bnes 44226 4423a: 6000 0380 braw 445bc /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 4423e: 2f39 0005 cb78 movel 5cb78 ,%sp@- <== NOT EXECUTED 44244: 741a moveq #26,%d2 <== NOT EXECUTED 44246: 6000 0360 braw 445a8 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 4424a: 41f9 0005 b538 lea 5b538 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44250: 49f9 0004 941c lea 4941c ,%a4 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44256: 2550 0064 movel %a0@,%a2@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 4425a: 202a 0064 movel %a2@(100),%d0 4425e: 2f00 movel %d0,%sp@- 44260: 4e94 jsr %a4@ if (tty->rawInBuf.theBuf == NULL) { 44262: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44264: 2540 0058 movel %d0,%a2@(88) if (tty->rawInBuf.theBuf == NULL) { 44268: 661c bnes 44286 free(tty); 4426a: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 4426c: 741a moveq #26,%d2 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 4426e: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 44274: 2f39 0005 cb78 movel 5cb78 ,%sp@- <== NOT EXECUTED 4427a: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return RTEMS_NO_MEMORY; 44280: 508f addql #8,%sp <== NOT EXECUTED 44282: 6000 032c braw 445b0 <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 44286: 41f9 0005 b53c lea 5b53c ,%a0 4428c: 2550 0088 movel %a0@,%a2@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44290: 202a 0088 movel %a2@(136),%d0 44294: 2f00 movel %d0,%sp@- 44296: 4e94 jsr %a4@ if (tty->rawOutBuf.theBuf == NULL) { 44298: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 4429a: 2540 007c movel %d0,%a2@(124) if (tty->rawOutBuf.theBuf == NULL) { 4429e: 6626 bnes 442c6 free((void *)(tty->rawInBuf.theBuf)); 442a0: 2f2a 0058 movel %a2@(88),%sp@- <== NOT EXECUTED 442a4: 47f9 0004 8f48 lea 48f48 ,%a3 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 442aa: 741a moveq #26,%d2 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 442ac: 4e93 jsr %a3@ <== NOT EXECUTED free(tty); 442ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442b0: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 442b2: 2f39 0005 cb78 movel 5cb78 ,%sp@- <== NOT EXECUTED 442b8: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return RTEMS_NO_MEMORY; 442be: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 442c2: 6000 02ec braw 445b0 <== NOT EXECUTED } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 442c6: 2f39 0005 b534 movel 5b534 ,%sp@- 442cc: 4e94 jsr %a4@ if (tty->cbuf == NULL) { 442ce: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 442d0: 2540 001c movel %d0,%a2@(28) if (tty->cbuf == NULL) { 442d4: 662c bnes 44302 free((void *)(tty->rawOutBuf.theBuf)); 442d6: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 442da: 47f9 0004 8f48 lea 48f48 ,%a3 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 442e0: 741a moveq #26,%d2 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 442e2: 4e93 jsr %a3@ <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 442e4: 2f2a 0058 movel %a2@(88),%sp@- <== NOT EXECUTED 442e8: 4e93 jsr %a3@ <== NOT EXECUTED free(tty); 442ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442ec: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 442ee: 2f39 0005 cb78 movel 5cb78 ,%sp@- <== NOT EXECUTED 442f4: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return RTEMS_NO_MEMORY; 442fa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 442fe: 6000 02b0 braw 445b0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 44302: 2079 0005 cb80 moveal 5cb80 ,%a0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 44308: 42aa 00d4 clrl %a2@(212) tty->tty_snd.sw_arg = NULL; 4430c: 42aa 00d8 clrl %a2@(216) tty->tty_rcv.sw_pfn = NULL; 44310: 42aa 00dc clrl %a2@(220) tty->tty_rcv.sw_arg = NULL; 44314: 42aa 00e0 clrl %a2@(224) tty->tty_rcvwakeup = 0; 44318: 42aa 00e4 clrl %a2@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 4431c: 2488 movel %a0,%a2@ tty->back = NULL; 4431e: 42aa 0004 clrl %a2@(4) if (rtems_termios_ttyHead != NULL) 44322: 4a88 tstl %a0 44324: 6704 beqs 4432a rtems_termios_ttyHead->back = tty; 44326: 214a 0004 movel %a2,%a0@(4) rtems_termios_ttyHead = tty; 4432a: 23cb 0005 cb80 movel %a3,5cb80 if (rtems_termios_ttyTail == NULL) 44330: 4ab9 0005 cb7c tstl 5cb7c 44336: 6606 bnes 4433e rtems_termios_ttyTail = tty; 44338: 23cb 0005 cb7c movel %a3,5cb7c tty->minor = minor; 4433e: 2744 0010 movel %d4,%a3@(16) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44342: 49f9 0004 4cf8 lea 44cf8 ,%a4 44348: 1039 0005 b540 moveb 5b540 ,%d0 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; 4434e: 2743 000c movel %d3,%a3@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44352: 486b 0014 pea %a3@(20) 44356: 49c0 extbl %d0 44358: 0080 5452 6900 oril #1414686976,%d0 4435e: 42a7 clrl %sp@- 44360: 4878 0054 pea 54 44364: 4878 0001 pea 1 44368: 2f00 movel %d0,%sp@- 4436a: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 4436c: 4fef 0014 lea %sp@(20),%sp 44370: 4a80 tstl %d0 44372: 6600 0226 bnew 4459a rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44376: 486b 0018 pea %a3@(24) 4437a: 1039 0005 b540 moveb 5b540 ,%d0 44380: 42a7 clrl %sp@- 44382: 4878 0054 pea 54 44386: 49c0 extbl %d0 44388: 4878 0001 pea 1 4438c: 0080 5452 6f00 oril #1414688512,%d0 44392: 2f00 movel %d0,%sp@- 44394: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 44396: 4fef 0014 lea %sp@(20),%sp 4439a: 4a80 tstl %d0 4439c: 6600 01fc bnew 4459a rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 443a0: 486b 008c pea %a3@(140) 443a4: 1039 0005 b540 moveb 5b540 ,%d0 443aa: 42a7 clrl %sp@- 443ac: 4878 0020 pea 20 443b0: 49c0 extbl %d0 443b2: 0080 5452 7800 oril #1414690816,%d0 443b8: 42a7 clrl %sp@- 443ba: 2f00 movel %d0,%sp@- 443bc: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 443be: 4fef 0014 lea %sp@(20),%sp 443c2: 4a80 tstl %d0 443c4: 6600 01d4 bnew 4459a rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 443c8: 42ab 0094 clrl %a3@(148) /* * Set callbacks */ tty->device = *callbacks; 443cc: 4878 0020 pea 20 443d0: 2f2e 0014 movel %fp@(20),%sp@- 443d4: 486b 0098 pea %a3@(152) 443d8: 4eb9 0004 d23c jsr 4d23c /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 443de: 4fef 000c lea %sp@(12),%sp 443e2: 7002 moveq #2,%d0 443e4: b0ab 00b4 cmpl %a3@(180),%d0 443e8: 6662 bnes 4444c sc = rtems_task_create ( 443ea: 486b 00c8 pea %a3@(200) <== NOT EXECUTED 443ee: 49f9 0004 50e4 lea 450e4 ,%a4 <== NOT EXECUTED 443f4: 1039 0005 b540 moveb 5b540 ,%d0 <== NOT EXECUTED 443fa: 42a7 clrl %sp@- <== NOT EXECUTED 443fc: 4878 0500 pea 500 <== NOT EXECUTED 44400: 49c0 extbl %d0 <== NOT EXECUTED 44402: 4878 0400 pea 400 <== NOT EXECUTED 44406: 4878 000a pea a <== NOT EXECUTED 4440a: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 44410: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44412: 4e94 jsr %a4@ <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 44414: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44418: 4a80 tstl %d0 <== NOT EXECUTED 4441a: 6600 017e bnew 4459a <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 4441e: 486b 00c4 pea %a3@(196) <== NOT EXECUTED 44422: 1039 0005 b540 moveb 5b540 ,%d0 <== NOT EXECUTED 44428: 42a7 clrl %sp@- <== NOT EXECUTED 4442a: 4878 0500 pea 500 <== NOT EXECUTED 4442e: 49c0 extbl %d0 <== NOT EXECUTED 44430: 4878 0400 pea 400 <== NOT EXECUTED 44434: 4878 0009 pea 9 <== NOT EXECUTED 44438: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 4443e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44440: 4e94 jsr %a4@ <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 44442: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44446: 4a80 tstl %d0 <== NOT EXECUTED 44448: 6600 0150 bnew 4459a <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 4444c: 4aab 00a0 tstl %a3@(160) 44450: 6708 beqs 4445a (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 44452: 7202 moveq #2,%d1 44454: b2ab 00b4 cmpl %a3@(180),%d1 44458: 662c bnes 44486 sc = rtems_semaphore_create ( 4445a: 486b 0068 pea %a3@(104) 4445e: 1039 0005 b540 moveb 5b540 ,%d0 44464: 42a7 clrl %sp@- 44466: 4878 0024 pea 24 4446a: 49c0 extbl %d0 4446c: 0080 5452 7200 oril #1414689280,%d0 44472: 42a7 clrl %sp@- 44474: 2f00 movel %d0,%sp@- 44476: 4eb9 0004 4cf8 jsr 44cf8 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 4447c: 4fef 0014 lea %sp@(20),%sp 44480: 4a80 tstl %d0 44482: 6600 0116 bnew 4459a tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 44486: 42ab 00b8 clrl %a3@(184) /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 4448a: 202b 0064 movel %a3@(100),%d0 4448e: e288 lsrl #1,%d0 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 44490: 7203 moveq #3,%d1 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 44492: 2740 00bc movel %d0,%a3@(188) tty->highwater = tty->rawInBuf.Size * 3/4; 44496: 206b 0064 moveal %a3@(100),%a0 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 4449a: 1741 0041 moveb %d1,%a3@(65) tty->termios.c_cc[VQUIT] = '\034'; 4449e: 721c moveq #28,%d1 tty->termios.c_cc[VERASE] = '\177'; 444a0: 707f moveq #127,%d0 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 444a2: 1741 0042 moveb %d1,%a3@(66) tty->termios.c_cc[VERASE] = '\177'; 444a6: 1740 0043 moveb %d0,%a3@(67) tty->termios.c_cc[VKILL] = '\025'; 444aa: 7215 moveq #21,%d1 tty->termios.c_cc[VEOF] = '\004'; 444ac: 7004 moveq #4,%d0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 444ae: 1741 0044 moveb %d1,%a3@(68) tty->termios.c_cc[VEOF] = '\004'; 444b2: 1740 0045 moveb %d0,%a3@(69) tty->termios.c_cc[VEOL] = '\000'; 444b6: 4201 clrb %d1 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 444b8: 7011 moveq #17,%d0 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 444ba: 1741 004c moveb %d1,%a3@(76) tty->termios.c_cc[VEOL2] = '\000'; 444be: 1741 0051 moveb %d1,%a3@(81) tty->termios.c_cc[VSTART] = '\021'; 444c2: 1740 0049 moveb %d0,%a3@(73) tty->termios.c_cc[VSTOP] = '\023'; 444c6: 7213 moveq #19,%d1 tty->termios.c_cc[VSUSP] = '\032'; 444c8: 701a moveq #26,%d0 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 444ca: 1741 004a moveb %d1,%a3@(74) tty->termios.c_cc[VSUSP] = '\032'; 444ce: 1740 004b moveb %d0,%a3@(75) tty->termios.c_cc[VREPRINT] = '\022'; 444d2: 7212 moveq #18,%d1 tty->termios.c_cc[VDISCARD] = '\017'; 444d4: 700f moveq #15,%d0 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 444d6: 1741 004d moveb %d1,%a3@(77) tty->termios.c_cc[VDISCARD] = '\017'; 444da: 1740 004e moveb %d0,%a3@(78) tty->termios.c_cc[VWERASE] = '\027'; 444de: 7217 moveq #23,%d1 tty->termios.c_cc[VLNEXT] = '\026'; 444e0: 7016 moveq #22,%d0 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 444e2: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 444e6: 1740 0050 moveb %d0,%a3@(80) tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 444ea: 1741 004f moveb %d1,%a3@(79) tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 444ee: 2008 movel %a0,%d0 444f0: e488 lsrl #2,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 444f2: 307c 2502 moveaw #9474,%a0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 444f6: 1239 0005 b540 moveb 5b540 ,%d1 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 444fc: 2740 00c0 movel %d0,%a3@(192) /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 44500: 203c 0000 1805 movel #6149,%d0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44506: 49c1 extbl %d1 44508: 2a01 movel %d1,%d5 4450a: 5285 addql #1,%d5 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 4450c: 2740 0034 movel %d0,%a3@(52) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 44510: 303c 823b movew #-32197,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44514: 2748 0030 movel %a0,%a3@(48) tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 44518: 307c 08bd moveaw #2237,%a0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 4451c: 2740 003c movel %d0,%a3@(60) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44520: 303c 007a movew #122,%d0 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 44524: 2748 0038 movel %a0,%a3@(56) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44528: 13c5 0005 b540 moveb %d5,5b540 4452e: b081 cmpl %d1,%d0 44530: 6608 bnes 4453a c = 'a'; 44532: 7261 moveq #97,%d1 <== NOT EXECUTED 44534: 13c1 0005 b540 moveb %d1,5b540 <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 4453a: 202a 0008 movel %a2@(8),%d0 4453e: 2200 movel %d0,%d1 44540: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44542: 2055 moveal %a5@,%a0 if (!tty->refcount++) { 44544: 2541 0008 movel %d1,%a2@(8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44548: 214a 0034 movel %a2,%a0@(52) if (!tty->refcount++) { 4454c: 4a80 tstl %d0 4454e: 6652 bnes 445a2 if (tty->device.firstOpen) 44550: 206a 0098 moveal %a2@(152),%a0 44554: 4a88 tstl %a0 44556: 670c beqs 44564 (*tty->device.firstOpen)(major, minor, arg); 44558: 2f0d movel %a5,%sp@- 4455a: 2f04 movel %d4,%sp@- 4455c: 2f03 movel %d3,%sp@- 4455e: 4e90 jsr %a0@ 44560: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44564: 7002 moveq #2,%d0 44566: b0aa 00b4 cmpl %a2@(180),%d0 4456a: 6636 bnes 445a2 sc = rtems_task_start(tty->rxTaskId, 4456c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4456e: 487a 00d2 pea %pc@(44642 ) <== NOT EXECUTED 44572: 47f9 0004 5360 lea 45360 ,%a3 <== NOT EXECUTED 44578: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 4457c: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 4457e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44582: 4a80 tstl %d0 <== NOT EXECUTED 44584: 6614 bnes 4459a <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 44586: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44588: 487a 0050 pea %pc@(445da ) <== NOT EXECUTED 4458c: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44590: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44592: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44596: 4a80 tstl %d0 <== NOT EXECUTED 44598: 6708 beqs 445a2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4459a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4459c: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 445a2: 2f39 0005 cb78 movel 5cb78 ,%sp@- 445a8: 4eb9 0004 5034 jsr 45034 return RTEMS_SUCCESSFUL; 445ae: 588f addql #4,%sp } 445b0: 2002 movel %d2,%d0 445b2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 445b8: 4e5e unlk %fp 445ba: 4e75 rts static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 445bc: 4878 00e8 pea e8 445c0: 4878 0001 pea 1 445c4: 4eb9 0004 8e68 jsr 48e68 if (tty == NULL) { 445ca: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 445cc: 2440 moveal %d0,%a2 445ce: 2640 moveal %d0,%a3 if (tty == NULL) { 445d0: 4a80 tstl %d0 445d2: 6600 fc76 bnew 4424a 445d6: 6000 fc66 braw 4423e <== NOT EXECUTED 0004335e : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 4335e: 4e56 ffe0 linkw %fp,#-32 43362: 202e 0008 movel %fp@(8),%d0 43366: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4336a: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 4336e: 2640 moveal %d0,%a3 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43370: 246e 0010 moveal %fp@(16),%a2 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 43374: 4aaa 00b4 tstl %a2@(180) 43378: 661c bnes 43396 (*tty->device.write)(tty->minor, (void *)buf, len); 4337a: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 4337e: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 43384: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43388: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 4338e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43392: 4e5e unlk %fp <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 43394: 4ed1 jmp %a1@ <== NOT EXECUTED return; } newHead = tty->rawOutBuf.Head; 43396: 2c2a 0080 movel %a2@(128),%d6 * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 4339a: 2a3c 0000 0700 movel #1792,%d5 while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 433a0: 49f9 0004 4f30 lea 44f30 ,%a4 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 433a6: 6000 00a0 braw 43448 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 433aa: 222a 0088 movel %a2@(136),%d1 433ae: 5286 addql #1,%d6 rtems_interrupt_disable (level); 433b0: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 433b2: 4c41 6004 remul %d1,%d4,%d6 433b6: 2c04 movel %d4,%d6 rtems_interrupt_disable (level); 433b8: 40c3 movew %sr,%d3 433ba: 8083 orl %d3,%d0 433bc: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 433be: 602a bras 433ea tty->rawOutBufState = rob_wait; 433c0: 7002 moveq #2,%d0 433c2: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 433c6: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 433c8: 42a7 clrl %sp@- 433ca: 42a7 clrl %sp@- 433cc: 2f2a 008c movel %a2@(140),%sp@- 433d0: 4e94 jsr %a4@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 433d2: 4fef 000c lea %sp@(12),%sp 433d6: 4a80 tstl %d0 433d8: 6708 beqs 433e2 rtems_fatal_error_occurred (sc); 433da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 433dc: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED rtems_interrupt_disable (level); 433e2: 2005 movel %d5,%d0 433e4: 40c3 movew %sr,%d3 433e6: 8083 orl %d3,%d0 433e8: 46c0 movew %d0,%sr * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 433ea: 202a 0084 movel %a2@(132),%d0 433ee: b084 cmpl %d4,%d0 433f0: 67ce beqs 433c0 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 433f2: 202a 0080 movel %a2@(128),%d0 433f6: 206a 007c moveal %a2@(124),%a0 433fa: 1193 0800 moveb %a3@,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 433fe: 2544 0080 movel %d4,%a2@(128) if (tty->rawOutBufState == rob_idle) { 43402: 4aaa 0094 tstl %a2@(148) 43406: 663a bnes 43442 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 43408: 202a 00b8 movel %a2@(184),%d0 4340c: 0800 0004 btst #4,%d0 43410: 661e bnes 43430 (*tty->device.write)(tty->minor, 43412: 4878 0001 pea 1 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43416: 202a 0084 movel %a2@(132),%d0 tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 4341a: d0aa 007c addl %a2@(124),%d0 4341e: 2f00 movel %d0,%sp@- 43420: 2f2a 0010 movel %a2@(16),%sp@- 43424: 206a 00a4 moveal %a2@(164),%a0 43428: 4e90 jsr %a0@ 4342a: 4fef 000c lea %sp@(12),%sp 4342e: 600c bras 4343c (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 43430: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43434: 7220 moveq #32,%d1 <== NOT EXECUTED 43436: 8081 orl %d1,%d0 <== NOT EXECUTED 43438: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 4343c: 7001 moveq #1,%d0 4343e: 2540 0094 movel %d0,%a2@(148) RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 43442: 528b addql #1,%a3 /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 43444: 46c3 movew %d3,%sr len--; 43446: 5382 subql #1,%d2 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 43448: 4a82 tstl %d2 4344a: 6600 ff5e bnew 433aa tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 4344e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43454: 4e5e unlk %fp 43456: 4e75 rts 00043aa4 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 43aa4: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 43aa8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 43aac: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 43ab0: 2053 moveal %a3@,%a0 <== NOT EXECUTED 43ab2: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43ab6: 42a7 clrl %sp@- <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 43ab8: 242b 0010 movel %a3@(16),%d2 <== NOT EXECUTED char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43abc: 42a7 clrl %sp@- <== NOT EXECUTED 43abe: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; 43ac2: 2a6b 000c moveal %a3@(12),%a5 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43ac6: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 43acc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43ad0: 2600 movel %d0,%d3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 43ad2: 6600 029a bnew 43d6e <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 43ad6: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43ada: 41f9 0005 c334 lea 5c334 ,%a0 <== NOT EXECUTED 43ae0: eb88 lsll #5,%d0 <== NOT EXECUTED 43ae2: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 43ae6: 4a88 tstl %a0 <== NOT EXECUTED 43ae8: 671e beqs 43b08 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 43aea: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43aec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43aee: 4e90 jsr %a0@ <== NOT EXECUTED 43af0: 2600 movel %d0,%d3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 43af2: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED rtems_semaphore_release (tty->isem); 43af6: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 43afa: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return sc; 43b00: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43b04: 6000 0268 braw 43d6e <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 43b08: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 43b0c: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 43b10: 6600 0234 bnew 43d46 <== NOT EXECUTED tty->cindex = tty->ccount = 0; 43b14: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED tty->read_start_column = tty->column; 43b18: 256a 0028 002c movel %a2@(40),%a2@(44) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 43b1e: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 43b22: 4aaa 00a0 tstl %a2@(160) <== NOT EXECUTED 43b26: 6700 00da beqw 43c02 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 43b2a: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 43b2e: 6600 00d2 bnew 43c02 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 43b32: 7002 moveq #2,%d0 <== NOT EXECUTED 43b34: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43b38: 673e beqs 43b78 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 43b3a: 49f9 0004 5408 lea 45408 ,%a4 <== NOT EXECUTED } else { if (siproc (n, tty)) 43b40: 283c 0004 391a movel #276762,%d4 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 43b46: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43b4a: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 43b4e: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 43b50: 588f addql #4,%sp <== NOT EXECUTED 43b52: 4a80 tstl %d0 <== NOT EXECUTED 43b54: 6c0a bges 43b60 <== NOT EXECUTED rtems_task_wake_after (1); 43b56: 4878 0001 pea 1 <== NOT EXECUTED 43b5a: 4e94 jsr %a4@ <== NOT EXECUTED 43b5c: 588f addql #4,%sp <== NOT EXECUTED 43b5e: 60e6 bras 43b46 <== NOT EXECUTED } else { if (siproc (n, tty)) 43b60: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43b62: 2044 moveal %d4,%a0 <== NOT EXECUTED 43b64: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43b6a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43b6c: 4e90 jsr %a0@ <== NOT EXECUTED 43b6e: 508f addql #8,%sp <== NOT EXECUTED 43b70: 4a80 tstl %d0 <== NOT EXECUTED 43b72: 67d2 beqs 43b46 <== NOT EXECUTED 43b74: 6000 01d0 braw 43d46 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 43b78: 41f9 0004 4910 lea 44910 ,%a0<== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; now = rtems_clock_get_ticks_since_boot(); 43b7e: 2848 moveal %a0,%a4 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 43b80: 2c3c 0004 5408 movel #283656,%d6 <== NOT EXECUTED } else { siproc (n, tty); 43b86: 2a3c 0004 391a movel #276762,%d5 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 43b8c: 4e90 jsr %a0@ <== NOT EXECUTED 43b8e: 2800 movel %d0,%d4 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 43b90: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43b94: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 43b98: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 43b9a: 588f addql #4,%sp <== NOT EXECUTED 43b9c: 4a80 tstl %d0 <== NOT EXECUTED 43b9e: 6c34 bges 43bd4 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 43ba0: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43ba4: 670e beqs 43bb4 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 43ba6: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43baa: 671c beqs 43bc8 <== NOT EXECUTED 43bac: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 43bb0: 6716 beqs 43bc8 <== NOT EXECUTED 43bb2: 6008 bras 43bbc <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 43bb4: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43bb8: 6700 018c beqw 43d46 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 43bbc: 4e94 jsr %a4@ <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 43bbe: 9084 subl %d4,%d0 <== NOT EXECUTED 43bc0: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 43bc4: 6200 0180 bhiw 43d46 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 43bc8: 4878 0001 pea 1 <== NOT EXECUTED 43bcc: 2046 moveal %d6,%a0 <== NOT EXECUTED 43bce: 4e90 jsr %a0@ <== NOT EXECUTED 43bd0: 588f addql #4,%sp <== NOT EXECUTED 43bd2: 60bc bras 43b90 <== NOT EXECUTED } else { siproc (n, tty); 43bd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43bd6: 2045 moveal %d5,%a0 <== NOT EXECUTED 43bd8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43bde: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43be0: 4e90 jsr %a0@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 43be2: 508f addql #8,%sp <== NOT EXECUTED 43be4: 4281 clrl %d1 <== NOT EXECUTED 43be6: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 43bea: 1200 moveb %d0,%d1 <== NOT EXECUTED 43bec: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 43bf0: 6f00 0154 blew 43d46 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 43bf4: 4a00 tstb %d0 <== NOT EXECUTED 43bf6: 6798 beqs 43b90 <== NOT EXECUTED 43bf8: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43bfc: 6792 beqs 43b90 <== NOT EXECUTED then = rtems_clock_get_ticks_since_boot(); 43bfe: 4e94 jsr %a4@ <== NOT EXECUTED 43c00: 608c bras 43b8e <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 43c02: 2e0a movel %a2,%d7 <== NOT EXECUTED 43c04: 0687 0000 0049 addil #73,%d7 <== NOT EXECUTED 43c0a: 7801 moveq #1,%d4 <== NOT EXECUTED 43c0c: 49fa fd0c lea %pc@(4391a ),%a4 <== NOT EXECUTED /* * Wait for characters */ if ( wait ) { sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 43c10: 2c3c 0004 4f30 movel #282416,%d6 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 43c16: 2a2a 0074 movel %a2@(116),%d5 <== NOT EXECUTED 43c1a: 6000 00e2 braw 43cfe <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 43c1e: 2a2a 005c movel %a2@(92),%d5 <== NOT EXECUTED 43c22: 5285 addql #1,%d5 <== NOT EXECUTED 43c24: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 43c28: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 43c2c: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 43c30: 1030 1800 moveb %a0@(00000000,%d1:l),%d0 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 43c34: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; 43c38: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 43c3c: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 43c40: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 43c44: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 <== NOT EXECUTED 43c48: 93c1 subal %d1,%a1 <== NOT EXECUTED 43c4a: 2a09 movel %a1,%d5 <== NOT EXECUTED 43c4c: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43c50: 4c41 5000 remul %d1,%d0,%d5 <== NOT EXECUTED 43c54: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED 43c58: b0aa 00bc cmpl %a2@(188),%d0 <== NOT EXECUTED 43c5c: 646a bccs 43cc8 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 43c5e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43c62: 72fe moveq #-2,%d1 <== NOT EXECUTED 43c64: c081 andl %d1,%d0 <== NOT EXECUTED 43c66: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 43c6a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43c6e: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 43c74: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 43c7a: 6626 bnes 43ca2 <== NOT EXECUTED 43c7c: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43c80: 670a beqs 43c8c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 43c82: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 43c86: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43c8a: 6716 beqs 43ca2 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 43c8c: 4878 0001 pea 1 <== NOT EXECUTED 43c90: 2f07 movel %d7,%sp@- <== NOT EXECUTED 43c92: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43c96: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43c9a: 4e90 jsr %a0@ <== NOT EXECUTED 43c9c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43ca0: 6026 bras 43cc8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 43ca2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43ca6: 0800 0008 btst #8,%d0 <== NOT EXECUTED 43caa: 671c beqs 43cc8 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 43cac: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 43cb0: 7afb moveq #-5,%d5 <== NOT EXECUTED 43cb2: c285 andl %d5,%d1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 43cb4: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 43cb8: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 43cbc: 4a88 tstl %a0 <== NOT EXECUTED 43cbe: 6708 beqs 43cc8 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 43cc0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43cc4: 4e90 jsr %a0@ <== NOT EXECUTED 43cc6: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 43cc8: 7002 moveq #2,%d0 <== NOT EXECUTED 43cca: 4285 clrl %d5 <== NOT EXECUTED 43ccc: 1a2e fffb moveb %fp@(-5),%d5 <== NOT EXECUTED 43cd0: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43cd4: 670e beqs 43ce4 <== NOT EXECUTED if (siproc (c, tty)) 43cd6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43cd8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43cda: 4e94 jsr %a4@ <== NOT EXECUTED 43cdc: 508f addql #8,%sp <== NOT EXECUTED 43cde: 4a80 tstl %d0 <== NOT EXECUTED 43ce0: 6616 bnes 43cf8 <== NOT EXECUTED 43ce2: 6016 bras 43cfa <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 43ce4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43ce6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43ce8: 4e94 jsr %a4@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 43cea: 508f addql #8,%sp <== NOT EXECUTED 43cec: 4280 clrl %d0 <== NOT EXECUTED 43cee: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 43cf2: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 43cf6: 6e02 bgts 43cfa <== NOT EXECUTED 43cf8: 4284 clrl %d4 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 43cfa: 2a2a 0070 movel %a2@(112),%d5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 43cfe: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43d02: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 43d06: b081 cmpl %d1,%d0 <== NOT EXECUTED 43d08: 6710 beqs 43d1a <== NOT EXECUTED 43d0a: 2039 0005 b534 movel 5b534 ,%d0 <== NOT EXECUTED 43d10: 5380 subql #1,%d0 <== NOT EXECUTED 43d12: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 43d16: 6e00 ff06 bgtw 43c1e <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 43d1a: 4a84 tstl %d4 <== NOT EXECUTED 43d1c: 6728 beqs 43d46 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 43d1e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43d20: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 43d24: 2046 moveal %d6,%a0 <== NOT EXECUTED 43d26: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 43d2a: 4e90 jsr %a0@ <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 43d2c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d30: 4a80 tstl %d0 <== NOT EXECUTED 43d32: 67ca beqs 43cfe <== NOT EXECUTED 43d34: 6010 bras 43d46 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 43d36: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED count--; 43d3a: 5382 subql #1,%d2 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 43d3c: 1af0 0800 moveb %a0@(00000000,%d0:l),%a5@+ <== NOT EXECUTED 43d40: 5280 addql #1,%d0 <== NOT EXECUTED 43d42: 2540 0024 movel %d0,%a2@(36) <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 43d46: 4a82 tstl %d2 <== NOT EXECUTED 43d48: 670a beqs 43d54 <== NOT EXECUTED 43d4a: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 43d4e: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 43d52: 6de2 blts 43d36 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 43d54: 202b 0010 movel %a3@(16),%d0 <== NOT EXECUTED 43d58: 9082 subl %d2,%d0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 43d5a: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 43d5e: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 43d62: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 43d66: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return sc; 43d6c: 588f addql #4,%sp <== NOT EXECUTED } 43d6e: 2003 movel %d3,%d0 <== NOT EXECUTED 43d70: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43d76: 4e5e unlk %fp <== NOT EXECUTED 43d78: 4e75 rts 00042eec : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 42eec: 4e56 fff4 linkw %fp,#-12 42ef0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42ef4: 246e 0008 moveal %fp@(8),%a2 int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 42ef8: 202a 00b8 movel %a2@(184),%d0 42efc: 0280 0000 0403 andil #1027,%d0 42f02: 0c80 0000 0401 cmpil #1025,%d0 42f08: 663c bnes 42f46 == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 42f0a: 4878 0001 pea 1 <== NOT EXECUTED 42f0e: 486a 004a pea %a2@(74) <== NOT EXECUTED 42f12: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42f16: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 42f1a: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 42f1c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 42f22: 40c1 movew %sr,%d1 <== NOT EXECUTED 42f24: 8081 orl %d1,%d0 <== NOT EXECUTED 42f26: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 42f28: 7402 moveq #2,%d2 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 42f2a: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 42f2e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 42f32: 8082 orl %d2,%d0 <== NOT EXECUTED 42f34: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 42f38: 46c1 movew %d1,%sr <== NOT EXECUTED 42f3a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42f3e: 143c 0001 moveb #1,%d2 <== NOT EXECUTED 42f42: 6000 0156 braw 4309a <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 42f46: 202a 00b8 movel %a2@(184),%d0 42f4a: 7203 moveq #3,%d1 42f4c: 7402 moveq #2,%d2 42f4e: c081 andl %d1,%d0 42f50: b480 cmpl %d0,%d2 42f52: 663a bnes 42f8e * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 42f54: 4878 0001 pea 1 <== NOT EXECUTED 42f58: 486a 0049 pea %a2@(73) <== NOT EXECUTED 42f5c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42f60: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 42f64: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 42f66: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 42f6c: 40c1 movew %sr,%d1 <== NOT EXECUTED 42f6e: 8081 orl %d1,%d0 <== NOT EXECUTED 42f70: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 42f72: 74fd moveq #-3,%d2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 42f74: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 42f78: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 42f7c: c082 andl %d2,%d0 <== NOT EXECUTED 42f7e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 42f82: 46c1 movew %d1,%sr <== NOT EXECUTED 42f84: 7401 moveq #1,%d2 <== NOT EXECUTED 42f86: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42f8a: 6000 010e braw 4309a <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 42f8e: 222a 0080 movel %a2@(128),%d1 42f92: 202a 0084 movel %a2@(132),%d0 42f96: b081 cmpl %d1,%d0 42f98: 6620 bnes 42fba /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 42f9a: 7002 moveq #2,%d0 <== NOT EXECUTED 42f9c: b0aa 0094 cmpl %a2@(148),%d0 <== NOT EXECUTED 42fa0: 6706 beqs 42fa8 <== NOT EXECUTED 42fa2: 4282 clrl %d2 <== NOT EXECUTED 42fa4: 6000 00f4 braw 4309a <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 42fa8: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 42fac: 4282 clrl %d2 <== NOT EXECUTED 42fae: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 42fb4: 588f addql #4,%sp <== NOT EXECUTED 42fb6: 6000 00e2 braw 4309a <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 42fba: 203c 0000 0700 movel #1792,%d0 42fc0: 40c2 movew %sr,%d2 42fc2: 8082 orl %d2,%d0 42fc4: 46c0 movew %d0,%sr len = tty->t_dqlen; 42fc6: 222a 0090 movel %a2@(144),%d1 tty->t_dqlen = 0; 42fca: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 42fce: 46c2 movew %d2,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 42fd0: 202a 0084 movel %a2@(132),%d0 42fd4: d280 addl %d0,%d1 42fd6: 202a 0088 movel %a2@(136),%d0 42fda: 4c40 1003 remul %d0,%d3,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 42fde: 7202 moveq #2,%d1 len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 42fe0: 2543 0084 movel %d3,%a2@(132) if (tty->rawOutBufState == rob_wait) { 42fe4: b2aa 0094 cmpl %a2@(148),%d1 42fe8: 660c bnes 42ff6 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 42fea: 2f2a 008c movel %a2@(140),%sp@- 42fee: 4eb9 0004 5034 jsr 45034 42ff4: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 42ff6: 202a 0080 movel %a2@(128),%d0 42ffa: b083 cmpl %d3,%d0 42ffc: 6622 bnes 43020 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 42ffe: 206a 00d4 moveal %a2@(212),%a0 } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43002: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43006: 4a88 tstl %a0 43008: 6606 bnes 43010 4300a: 4282 clrl %d2 4300c: 6000 0088 braw 43096 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 43010: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 43014: 4282 clrl %d2 <== NOT EXECUTED 43016: 486a 0030 pea %a2@(48) <== NOT EXECUTED 4301a: 4e90 jsr %a0@ <== NOT EXECUTED 4301c: 508f addql #8,%sp <== NOT EXECUTED 4301e: 6076 bras 43096 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 43020: 202a 00b8 movel %a2@(184),%d0 43024: 0280 0000 0210 andil #528,%d0 4302a: 0c80 0000 0210 cmpil #528,%d0 43030: 6624 bnes 43056 == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 43032: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 43036: 40c1 movew %sr,%d1 <== NOT EXECUTED 43038: 8081 orl %d1,%d0 <== NOT EXECUTED 4303a: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4303c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43040: 7420 moveq #32,%d2 <== NOT EXECUTED 43042: 8082 orl %d2,%d0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 43044: 143c 0001 moveb #1,%d2 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 43048: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4304c: 2542 0094 movel %d2,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 43050: 46c1 movew %d1,%sr <== NOT EXECUTED 43052: 4202 clrb %d2 <== NOT EXECUTED 43054: 6040 bras 43096 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 43056: 202a 0080 movel %a2@(128),%d0 4305a: b083 cmpl %d3,%d0 4305c: 6406 bccs 43064 nToSend = tty->rawOutBuf.Size - newTail; 4305e: 242a 0088 movel %a2@(136),%d2 43062: 6004 bras 43068 else nToSend = tty->rawOutBuf.Head - newTail; 43064: 242a 0080 movel %a2@(128),%d2 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 43068: 202a 00b8 movel %a2@(184),%d0 * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 4306c: 9483 subl %d3,%d2 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 4306e: 0280 0000 0600 andil #1536,%d0 43074: 6702 beqs 43078 43076: 7401 moveq #1,%d2 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 43078: 2f02 movel %d2,%sp@- 4307a: 202a 007c movel %a2@(124),%d0 4307e: d083 addl %d3,%d0 /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 43080: 7201 moveq #1,%d1 (*tty->device.write)(tty->minor, 43082: 2f00 movel %d0,%sp@- 43084: 2f2a 0010 movel %a2@(16),%sp@- 43088: 206a 00a4 moveal %a2@(164),%a0 /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 4308c: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)(tty->minor, 43090: 4e90 jsr %a0@ 43092: 4fef 000c lea %sp@(12),%sp &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43096: 2543 0084 movel %d3,%a2@(132) } return nToSend; } 4309a: 2002 movel %d2,%d0 4309c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 430a2: 4e5e unlk %fp 430a4: 4e75 rts 00044642 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44642: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 44646: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4464a: 260e movel %fp,%d3 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 4464c: 240e movel %fp,%d2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4464e: 5d83 subql #6,%d3 <== NOT EXECUTED 44650: 4bf9 0004 4978 lea 44978 ,%a5 <== NOT EXECUTED RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { tty->rxTaskId = 0; rtems_task_delete(RTEMS_SELF); 44656: 49f9 0004 5208 lea 45208 ,%a4 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 4465c: 5382 subql #1,%d2 <== NOT EXECUTED 4465e: 47f9 0004 3106 lea 43106 ,%a3<== NOT EXECUTED /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44664: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 44668: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4466a: 42a7 clrl %sp@- <== NOT EXECUTED 4466c: 4878 0002 pea 2 <== NOT EXECUTED 44670: 4878 0003 pea 3 <== NOT EXECUTED 44674: 4e95 jsr %a5@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 44676: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4467a: 7001 moveq #1,%d0 <== NOT EXECUTED 4467c: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 44680: 670c beqs 4468e <== NOT EXECUTED tty->rxTaskId = 0; 44682: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 44686: 42a7 clrl %sp@- <== NOT EXECUTED 44688: 4e94 jsr %a4@ <== NOT EXECUTED 4468a: 588f addql #4,%sp <== NOT EXECUTED 4468c: 60da bras 44668 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 4468e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44692: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 44696: 4e90 jsr %a0@ <== NOT EXECUTED if (c != EOF) { 44698: 588f addql #4,%sp <== NOT EXECUTED 4469a: 72ff moveq #-1,%d1 <== NOT EXECUTED 4469c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4469e: 67c8 beqs 44668 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 446a0: 4878 0001 pea 1 <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 446a4: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 446a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 446aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446ac: 4e93 jsr %a3@ <== NOT EXECUTED 446ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 446b2: 60b4 bras 44668 <== NOT EXECUTED 00042ed0 : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 42ed0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42ed4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 42ed8: 4878 0002 pea 2 <== NOT EXECUTED 42edc: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 42ee0: 4eb9 0004 4adc jsr 44adc <== NOT EXECUTED 42ee6: 508f addql #8,%sp <== NOT EXECUTED } 42ee8: 4e5e unlk %fp <== NOT EXECUTED 42eea: 4e75 rts 00045a04 : int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) { 45a04: 4e56 0000 linkw %fp,#0 45a08: 2f0a movel %a2,%sp@- 45a0a: 246e 0008 moveal %fp@(8),%a2 45a0e: 2f02 movel %d2,%sp@- int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 45a10: 2f2e 000c movel %fp@(12),%sp@- 45a14: 4eb9 0004 40c0 jsr 440c0 if ( cflags_baud == -1 ) 45a1a: 588f addql #4,%sp int32_t baud ) { int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 45a1c: 2200 movel %d0,%d1 if ( cflags_baud == -1 ) 45a1e: 70ff moveq #-1,%d0 45a20: b081 cmpl %d1,%d0 45a22: 6712 beqs 45a36 return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; 45a24: 242a 0038 movel %a2@(56),%d2 45a28: 4280 clrl %d0 45a2a: 0282 ffff eff0 andil #-4112,%d2 45a30: 8282 orl %d2,%d1 45a32: 2541 0038 movel %d1,%a2@(56) return 0; } 45a36: 242e fff8 movel %fp@(-8),%d2 45a3a: 246e fffc moveal %fp@(-4),%a2 45a3e: 4e5e unlk %fp 45a40: 4e75 rts ... 000445da : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 445da: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 445de: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 445e2: 240e movel %fp,%d2 <== NOT EXECUTED 445e4: 5982 subql #4,%d2 <== NOT EXECUTED 445e6: 4bf9 0004 4978 lea 44978 ,%a5 <== NOT EXECUTED RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; rtems_task_delete(RTEMS_SELF); 445ec: 49f9 0004 5208 lea 45208 ,%a4 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 445f2: 47f9 0004 2eec lea 42eec ,%a3<== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 445f8: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 445fc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445fe: 42a7 clrl %sp@- <== NOT EXECUTED 44600: 4878 0002 pea 2 <== NOT EXECUTED 44604: 4878 0003 pea 3 <== NOT EXECUTED 44608: 4e95 jsr %a5@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 4460a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4460e: 7001 moveq #1,%d0 <== NOT EXECUTED 44610: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 44614: 670a beqs 44620 <== NOT EXECUTED tty->txTaskId = 0; 44616: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4461a: 42a7 clrl %sp@- <== NOT EXECUTED 4461c: 4e94 jsr %a4@ <== NOT EXECUTED 4461e: 601e bras 4463e <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 44620: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44624: eb88 lsll #5,%d0 <== NOT EXECUTED 44626: 0680 0005 c348 addil #377672,%d0 <== NOT EXECUTED 4462c: 2240 moveal %d0,%a1 <== NOT EXECUTED 4462e: 2051 moveal %a1@,%a0 <== NOT EXECUTED 44630: 4a88 tstl %a0 <== NOT EXECUTED 44632: 6706 beqs 4463a <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 44634: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44636: 4e90 jsr %a0@ <== NOT EXECUTED 44638: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 4463a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4463c: 4e93 jsr %a3@ <== NOT EXECUTED 4463e: 588f addql #4,%sp <== NOT EXECUTED 44640: 60ba bras 445fc <== NOT EXECUTED 00043982 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 43982: 4e56 ffe8 linkw %fp,#-24 43986: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4398a: 246e 0008 moveal %fp@(8),%a2 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4398e: 2052 moveal %a2@,%a0 43990: 2668 0034 moveal %a0@(52),%a3 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43994: 42a7 clrl %sp@- 43996: 42a7 clrl %sp@- 43998: 2f2b 0018 movel %a3@(24),%sp@- 4399c: 4eb9 0004 4f30 jsr 44f30 if (sc != RTEMS_SUCCESSFUL) 439a2: 4fef 000c lea %sp@(12),%sp { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 439a6: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 439a8: 6600 0084 bnew 43a2e return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 439ac: 202b 00cc movel %a3@(204),%d0 439b0: eb88 lsll #5,%d0 439b2: 0680 0005 c340 addil #377664,%d0 439b8: 2240 moveal %d0,%a1 439ba: 2051 moveal %a1@,%a0 439bc: 4a88 tstl %a0 439be: 6718 beqs 439d8 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 439c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 439c2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 439c4: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_release (tty->osem); 439c6: 2f2b 0018 movel %a3@(24),%sp@- <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 439ca: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 439cc: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return sc; 439d2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 439d6: 6056 bras 43a2e <== NOT EXECUTED } if (tty->termios.c_oflag & OPOST) { 439d8: 7001 moveq #1,%d0 439da: c0ab 0034 andl %a3@(52),%d0 439de: 6728 beqs 43a08 uint32_t count = args->count; 439e0: 262a 0010 movel %a2@(16),%d3 char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 439e4: 4bfa fa72 lea %pc@(43458 ),%a5 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 439e8: 286a 000c moveal %a2@(12),%a4 while (count--) 439ec: 600e bras 439fc oproc (*buffer++, tty); 439ee: 4280 clrl %d0 439f0: 101c moveb %a4@+,%d0 439f2: 5383 subql #1,%d3 439f4: 2f0b movel %a3,%sp@- 439f6: 2f00 movel %d0,%sp@- 439f8: 4e95 jsr %a5@ 439fa: 508f addql #8,%sp return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 439fc: 4a83 tstl %d3 439fe: 66ee bnes 439ee oproc (*buffer++, tty); args->bytes_moved = args->count; 43a00: 256a 0010 0018 movel %a2@(16),%a2@(24) 43a06: 601a bras 43a22 } else { rtems_termios_puts (args->buffer, args->count, tty); 43a08: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43a0a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a0e: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 43a12: 4eb9 0004 335e jsr 4335e <== NOT EXECUTED args->bytes_moved = args->count; 43a18: 256a 0010 0018 movel %a2@(16),%a2@(24) <== NOT EXECUTED 43a1e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 43a22: 2f2b 0018 movel %a3@(24),%sp@- 43a26: 4eb9 0004 5034 jsr 45034 return sc; 43a2c: 588f addql #4,%sp } 43a2e: 2002 movel %d2,%d0 43a30: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 43a36: 4e5e unlk %fp 43a38: 4e75 rts 00051270 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 51270: 4e56 ffe4 linkw %fp,#-28 51274: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 51278: 262e 0008 movel %fp@(8),%d3 5127c: 242e 000c movel %fp@(12),%d2 51280: 282e 0010 movel %fp@(16),%d4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 51284: 2679 0007 5cb6 moveal 75cb6 <_Timer_server>,%a3 if ( !timer_server ) 5128a: 4a8b tstl %a3 5128c: 6606 bnes 51294 5128e: 700e moveq #14,%d0 51290: 6000 008e braw 51320 return RTEMS_INCORRECT_STATE; if ( !routine ) 51294: 4a84 tstl %d4 51296: 6606 bnes 5129e 51298: 7009 moveq #9,%d0 5129a: 6000 0084 braw 51320 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 5129e: 4a82 tstl %d2 512a0: 6604 bnes 512a6 512a2: 700a moveq #10,%d0 512a4: 607a bras 51320 512a6: 486e fffc pea %fp@(-4) 512aa: 2f03 movel %d3,%sp@- 512ac: 4879 0007 5c7c pea 75c7c <_Timer_Information> 512b2: 4eb9 0005 378c jsr 5378c <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 512b8: 4fef 000c lea %sp@(12),%sp 512bc: 2440 moveal %d0,%a2 512be: 4aae fffc tstl %fp@(-4) 512c2: 6704 beqs 512c8 512c4: 7004 moveq #4,%d0 512c6: 6058 bras 51320 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 512c8: 486a 0010 pea %a2@(16) 512cc: 4eb9 0005 53a0 jsr 553a0 <_Watchdog_Remove> _ISR_Disable( level ); 512d2: 203c 0000 0700 movel #1792,%d0 512d8: 40c1 movew %sr,%d1 512da: 8081 orl %d1,%d0 512dc: 46c0 movew %d0,%sr 512de: 49f9 0005 4012 lea 54012 <_Thread_Enable_dispatch>,%a4 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 512e4: 588f addql #4,%sp 512e6: 4aaa 0018 tstl %a2@(24) 512ea: 6706 beqs 512f2 _ISR_Enable( level ); 512ec: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 512ee: 4e94 jsr %a4@ 512f0: 602c bras 5131e /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 512f2: 7001 moveq #1,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 512f4: 256e 0014 0034 movel %fp@(20),%a2@(52) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 512fa: 2544 002c movel %d4,%a2@(44) the_watchdog->id = id; 512fe: 2543 0030 movel %d3,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 51302: 2542 001c movel %d2,%a2@(28) /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 51306: 2540 0038 movel %d0,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5130a: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 5130e: 46c1 movew %d1,%sr (*timer_server->schedule_operation)( timer_server, the_timer ); 51310: 2f0a movel %a2,%sp@- 51312: 2f0b movel %a3,%sp@- 51314: 206b 0004 moveal %a3@(4),%a0 51318: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 5131a: 4e94 jsr %a4@ return RTEMS_SUCCESSFUL; 5131c: 508f addql #8,%sp the_timer->Ticker.initial = ticks; _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 5131e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 51320: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 51326: 4e5e unlk %fp 51328: 4e75 rts ... 0005132c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 5132c: 4e56 ffe8 linkw %fp,#-24 51330: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 51334: 282e 0008 movel %fp@(8),%d4 51338: 262e 000c movel %fp@(12),%d3 5133c: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 51340: 2679 0007 5cb6 moveal 75cb6 <_Timer_server>,%a3 if ( !timer_server ) 51346: 4a8b tstl %a3 51348: 6606 bnes 51350 5134a: 700e moveq #14,%d0 5134c: 6000 00a4 braw 513f2 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 51350: 4a39 0007 53fc tstb 753fc <_TOD_Is_set> 51356: 6606 bnes 5135e 51358: 700b moveq #11,%d0 <== NOT EXECUTED 5135a: 6000 0096 braw 513f2 <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !routine ) 5135e: 4a82 tstl %d2 51360: 6606 bnes 51368 51362: 7009 moveq #9,%d0 51364: 6000 008c braw 513f2 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 51368: 2f03 movel %d3,%sp@- 5136a: 4eb9 0004 e7a8 jsr 4e7a8 <_TOD_Validate> 51370: 588f addql #4,%sp 51372: 4a00 tstb %d0 51374: 677a beqs 513f0 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 51376: 2f03 movel %d3,%sp@- 51378: 4eb9 0004 e708 jsr 4e708 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5137e: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 51380: 2600 movel %d0,%d3 if ( seconds <= _TOD_Seconds_since_epoch() ) 51382: b0b9 0007 547a cmpl 7547a <_TOD_Now>,%d0 51388: 6366 blss 513f0 5138a: 486e fffc pea %fp@(-4) 5138e: 2f04 movel %d4,%sp@- 51390: 4879 0007 5c7c pea 75c7c <_Timer_Information> 51396: 4eb9 0005 378c jsr 5378c <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5139c: 4fef 000c lea %sp@(12),%sp 513a0: 2440 moveal %d0,%a2 513a2: 4aae fffc tstl %fp@(-4) 513a6: 6704 beqs 513ac 513a8: 7004 moveq #4,%d0 513aa: 6046 bras 513f2 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 513ac: 486a 0010 pea %a2@(16) 513b0: 4eb9 0005 53a0 jsr 553a0 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 513b6: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 513bc: 7003 moveq #3,%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 513be: 2544 0030 movel %d4,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 513c2: 96b9 0007 547a subl 7547a <_TOD_Now>,%d3 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 513c8: 2540 0038 movel %d0,%a2@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 513cc: 2543 001c movel %d3,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 513d0: 2542 002c movel %d2,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 513d4: 42aa 0018 clrl %a2@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 513d8: 2f0a movel %a2,%sp@- 513da: 2f0b movel %a3,%sp@- 513dc: 206b 0004 moveal %a3@(4),%a0 513e0: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 513e2: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 513e8: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 513ec: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 513ee: 6002 bras 513f2 513f0: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 513f2: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 513f8: 4e5e unlk %fp 513fa: 4e75 rts 00041f34 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 41f34: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 41f38: 48d7 047c moveml %d2-%d6/%a2,%sp@ <== NOT EXECUTED 41f3c: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 41f40: 2a04 movel %d4,%d5 <== NOT EXECUTED 41f42: 0285 2000 0000 andil #536870912,%d5 <== NOT EXECUTED 41f48: 672e beqs 41f78 <== NOT EXECUTED { if (rtems_panic_in_progress++) 41f4a: 2039 0005 cb30 movel 5cb30 ,%d0 <== NOT EXECUTED 41f50: 2200 movel %d0,%d1 <== NOT EXECUTED 41f52: 5281 addql #1,%d1 <== NOT EXECUTED 41f54: 23c1 0005 cb30 movel %d1,5cb30 <== NOT EXECUTED 41f5a: 4a80 tstl %d0 <== NOT EXECUTED 41f5c: 670e beqs 41f6c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 41f5e: 2039 0005 cc94 movel 5cc94 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 41f64: 5280 addql #1,%d0 <== NOT EXECUTED 41f66: 23c0 0005 cc94 movel %d0,5cc94 <_Thread_Dispatch_disable_level><== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 41f6c: 7002 moveq #2,%d0 <== NOT EXECUTED 41f6e: b0b9 0005 cb30 cmpl 5cb30 ,%d0 <== NOT EXECUTED 41f74: 6d00 0138 bltw 420ae <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 41f78: 2079 0005 b610 moveal 5b610 <_impure_ptr>,%a0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 41f7e: 2c04 movel %d4,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 41f80: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 41f84: 0286 8fff ffff andil #-1879048193,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 41f8a: 4eb9 0004 cd78 jsr 4cd78 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 41f90: 588f addql #4,%sp <== NOT EXECUTED 41f92: 0804 001e btst #30,%d4 <== NOT EXECUTED 41f96: 6604 bnes 41f9c <== NOT EXECUTED 41f98: 4282 clrl %d2 <== NOT EXECUTED 41f9a: 600a bras 41fa6 <== NOT EXECUTED local_errno = errno; 41f9c: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 41fa2: 2040 moveal %d0,%a0 <== NOT EXECUTED 41fa4: 2410 movel %a0@,%d2 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 41fa6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 41faa: 2079 0005 b610 moveal 5b610 <_impure_ptr>,%a0 <== NOT EXECUTED 41fb0: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 41fb4: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 41fb8: 4eb9 0005 32a4 jsr 532a4 <== NOT EXECUTED if (status) 41fbe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 41fc2: 2600 movel %d0,%d3 <== NOT EXECUTED if (status) 41fc4: 4a86 tstl %d6 <== NOT EXECUTED 41fc6: 6726 beqs 41fee <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 41fc8: 2f06 movel %d6,%sp@- <== NOT EXECUTED 41fca: 4eb9 0004 1f1c jsr 41f1c <== NOT EXECUTED 41fd0: 2079 0005 b610 moveal 5b610 <_impure_ptr>,%a0 <== NOT EXECUTED 41fd6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fd8: 4879 0005 9ef9 pea 59ef9 <== NOT EXECUTED 41fde: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 41fe2: 4eb9 0004 d104 jsr 4d104 <== NOT EXECUTED 41fe8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 41fec: d680 addl %d0,%d3 <== NOT EXECUTED if (local_errno) 41fee: 4a82 tstl %d2 <== NOT EXECUTED 41ff0: 6754 beqs 42046 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 41ff2: 6f34 bles 42028 <== NOT EXECUTED 41ff4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41ff6: 45f9 0004 d9b8 lea 4d9b8 ,%a2 <== NOT EXECUTED 41ffc: 4e92 jsr %a2@ <== NOT EXECUTED 41ffe: 588f addql #4,%sp <== NOT EXECUTED 42000: 2040 moveal %d0,%a0 <== NOT EXECUTED 42002: 4a10 tstb %a0@ <== NOT EXECUTED 42004: 6722 beqs 42028 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 42006: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42008: 4e92 jsr %a2@ <== NOT EXECUTED 4200a: 2079 0005 b610 moveal 5b610 <_impure_ptr>,%a0 <== NOT EXECUTED 42010: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42012: 4879 0005 9f07 pea 59f07 <== NOT EXECUTED 42018: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4201c: 4eb9 0004 d104 jsr 4d104 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 42022: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42026: 601c bras 42044 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 42028: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4202a: 4879 0005 9f14 pea 59f14 <== NOT EXECUTED 42030: 2079 0005 b610 moveal 5b610 <_impure_ptr>,%a0 <== NOT EXECUTED 42036: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4203a: 4eb9 0004 d104 jsr 4d104 <== NOT EXECUTED 42040: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42044: d680 addl %d0,%d3 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 42046: 4879 0005 a706 pea 5a706 <== NOT EXECUTED 4204c: 2079 0005 b610 moveal 5b610 <_impure_ptr>,%a0 <== NOT EXECUTED 42052: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42056: 0284 3000 0000 andil #805306368,%d4 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 4205c: 4eb9 0004 d104 jsr 4d104 <== NOT EXECUTED (void) fflush(stderr); 42062: 2079 0005 b610 moveal 5b610 <_impure_ptr>,%a0 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 42068: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 4206a: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4206e: 4eb9 0004 cd78 jsr 4cd78 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42074: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42078: 4a84 tstl %d4 <== NOT EXECUTED 4207a: 6606 bnes 42082 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 4207c: 2006 movel %d6,%d0 <== NOT EXECUTED 4207e: d083 addl %d3,%d0 <== NOT EXECUTED 42080: 602e bras 420b0 <== NOT EXECUTED 42082: 41f9 0004 20d8 lea 420d8 ,%a0 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) { if (error_flag & RTEMS_ERROR_PANIC) 42088: 4a85 tstl %d5 <== NOT EXECUTED 4208a: 6712 beqs 4209e <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 4208c: 4879 0005 9f28 pea 59f28 <== NOT EXECUTED 42092: 42a7 clrl %sp@- <== NOT EXECUTED 42094: 4e90 jsr %a0@ <== NOT EXECUTED _exit(local_errno); 42096: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42098: 4eb9 0004 2828 jsr 42828 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 4209e: 4879 0005 9f3d pea 59f3d <== NOT EXECUTED 420a4: 42a7 clrl %sp@- <== NOT EXECUTED 420a6: 4e90 jsr %a0@ <== NOT EXECUTED abort(); 420a8: 4eb9 0004 c9ec jsr 4c9ec <== NOT EXECUTED 420ae: 4280 clrl %d0 <== NOT EXECUTED } } return chars_written; } 420b0: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 420b6: 4e5e unlk %fp <== NOT EXECUTED 420b8: 4e75 rts 00045a3c : #include /* for memset */ bool rtems_workspace_get_information( Heap_Information_block *the_info ) { 45a3c: 4e56 0000 linkw %fp,#0 45a40: 202e 0008 movel %fp@(8),%d0 if ( !the_info ) 45a44: 6710 beqs 45a56 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 45a46: 2f00 movel %d0,%sp@- 45a48: 4879 0005 eac2 pea 5eac2 <_Workspace_Area> 45a4e: 4eb9 0004 6dd0 jsr 46dd0 <_Protected_heap_Get_information> 45a54: 508f addql #8,%sp } 45a56: 4e5e unlk %fp 45a58: 4e75 rts ... 000607ac : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 607ac: 4e56 ffe4 linkw %fp,#-28 607b0: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 607b4: 246e 0008 moveal %fp@(8),%a2 607b8: 4283 clrl %d3 607ba: 283c 7fff ffff movel #2147483647,%d4 607c0: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 607c2: 47f9 0007 ae70 lea 7ae70 <__srget_r>,%a3 607c8: 202a 0004 movel %a2@(4),%d0 607cc: 5380 subql #1,%d0 607ce: 2540 0004 movel %d0,%a2@(4) 607d2: 6c0e bges 607e2 607d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 607d6: 2f39 0009 7984 movel 97984 <_impure_ptr>,%sp@- <== NOT EXECUTED 607dc: 4e93 jsr %a3@ <== NOT EXECUTED 607de: 508f addql #8,%sp <== NOT EXECUTED 607e0: 600a bras 607ec <== NOT EXECUTED 607e2: 2052 moveal %a2@,%a0 607e4: 4280 clrl %d0 607e6: 1010 moveb %a0@,%d0 607e8: 5288 addql #1,%a0 607ea: 2488 movel %a0,%a2@ if (c == ':') 607ec: 723a moveq #58,%d1 607ee: b280 cmpl %d0,%d1 607f0: 6750 beqs 60842 break; if (sign == 0) { 607f2: 4a83 tstl %d3 607f4: 660e bnes 60804 if (c == '-') { 607f6: 7c2d moveq #45,%d6 607f8: bc80 cmpl %d0,%d6 607fa: 6606 bnes 60802 sign = -1; limit++; 607fc: 5284 addql #1,%d4 <== NOT EXECUTED 607fe: 76ff moveq #-1,%d3 <== NOT EXECUTED continue; 60800: 60c6 bras 607c8 <== NOT EXECUTED 60802: 7601 moveq #1,%d3 } sign = 1; } if (!isdigit(c)) 60804: 2079 0009 7978 moveal 97978 <__ctype_ptr__>,%a0 6080a: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 6080e: 49c1 extbl %d1 60810: 44c1 movew %d1,%ccr 60812: 6640 bnes 60854 return 0; d = c - '0'; if ((i > (limit / 10)) 60814: 2204 movel %d4,%d1 60816: 7c0a moveq #10,%d6 60818: 4c46 1005 remul %d6,%d5,%d1 6081c: 4c46 1001 remul %d6,%d1,%d1 60820: b282 cmpl %d2,%d1 60822: 6530 bcss 60854 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 60824: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 6082a: b282 cmpl %d2,%d1 6082c: 6604 bnes 60832 6082e: ba80 cmpl %d0,%d5 <== NOT EXECUTED 60830: 6522 bcss 60854 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 60832: 2202 movel %d2,%d1 60834: e789 lsll #3,%d1 60836: 2241 moveal %d1,%a1 60838: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 6083c: 2400 movel %d0,%d2 6083e: d488 addl %a0,%d2 60840: 6086 bras 607c8 } if (sign == 0) 60842: 4a83 tstl %d3 60844: 670e beqs 60854 return 0; *val = i * sign; 60846: 4c02 3800 mulsl %d2,%d3 6084a: 7001 moveq #1,%d0 6084c: 206e 000c moveal %fp@(12),%a0 60850: 2083 movel %d3,%a0@ return 1; 60852: 6002 bras 60856 60854: 4280 clrl %d0 <== NOT EXECUTED } 60856: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 6085c: 4e5e unlk %fp 6085e: 4e75 rts 00060860 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 60860: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 60864: 206e 000c moveal %fp@(12),%a0 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 60868: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 6086c: 246e 0010 moveal %fp@(16),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 60870: 4bf9 0007 ae70 lea 7ae70 <__srget_r>,%a5 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 60876: 286e 0008 moveal %fp@(8),%a4 6087a: 266e 0014 moveal %fp@(20),%a3 6087e: 242e 0018 movel %fp@(24),%d2 int c; *name = *bufp; 60882: 2092 movel %a2@,%a0@ for (;;) { c = getc(fp); 60884: 202c 0004 movel %a4@(4),%d0 60888: 5380 subql #1,%d0 6088a: 2940 0004 movel %d0,%a4@(4) 6088e: 6c0e bges 6089e 60890: 2f0c movel %a4,%sp@- 60892: 2f39 0009 7984 movel 97984 <_impure_ptr>,%sp@- 60898: 4e95 jsr %a5@ 6089a: 508f addql #8,%sp 6089c: 600a bras 608a8 6089e: 2054 moveal %a4@,%a0 608a0: 4280 clrl %d0 608a2: 1010 moveb %a0@,%d0 608a4: 5288 addql #1,%a0 608a6: 2888 movel %a0,%a4@ if (c == ':') { 608a8: 723a moveq #58,%d1 608aa: b280 cmpl %d0,%d1 608ac: 6606 bnes 608b4 if (nlFlag) 608ae: 4a82 tstl %d2 608b0: 6724 beqs 608d6 608b2: 602e bras 608e2 <== NOT EXECUTED return 0; break; } if (c == '\n') { 608b4: 720a moveq #10,%d1 608b6: b280 cmpl %d0,%d1 608b8: 6606 bnes 608c0 if (!nlFlag) 608ba: 4a82 tstl %d2 608bc: 6618 bnes 608d6 608be: 6022 bras 608e2 <== NOT EXECUTED return 0; break; } if (c == EOF) 608c0: 72ff moveq #-1,%d1 608c2: b280 cmpl %d0,%d1 608c4: 671c beqs 608e2 return 0; if (*nleft < 2) 608c6: 7201 moveq #1,%d1 608c8: b293 cmpl %a3@,%d1 608ca: 6416 bccs 608e2 return 0; **bufp = c; 608cc: 2052 moveal %a2@,%a0 608ce: 1080 moveb %d0,%a0@ ++(*bufp); 608d0: 5292 addql #1,%a2@ --(*nleft); 608d2: 5393 subql #1,%a3@ } 608d4: 60ae bras 60884 **bufp = '\0'; 608d6: 2052 moveal %a2@,%a0 ++(*bufp); --(*nleft); 608d8: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 608da: 4210 clrb %a0@ ++(*bufp); 608dc: 5292 addql #1,%a2@ --(*nleft); 608de: 5393 subql #1,%a3@ return 1; 608e0: 6002 bras 608e4 608e2: 4280 clrl %d0 <== NOT EXECUTED } 608e4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 608ea: 4e5e unlk %fp 608ec: 4e75 rts 000608ee : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 608ee: 4e56 ffe4 linkw %fp,#-28 608f2: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 608f6: 42a7 clrl %sp@- 608f8: 280e movel %fp,%d4 608fa: 0684 0000 0014 addil #20,%d4 60900: 260e movel %fp,%d3 60902: 0683 0000 0010 addil #16,%d3 60908: 47fa ff56 lea %pc@(60860 ),%a3 6090c: 2f04 movel %d4,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 6090e: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60912: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 60914: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60918: 2f0a movel %a2,%sp@- 6091a: 2f02 movel %d2,%sp@- 6091c: 4e93 jsr %a3@ 6091e: 4fef 0014 lea %sp@(20),%sp 60922: 4a80 tstl %d0 60924: 6700 00c2 beqw 609e8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 60928: 42a7 clrl %sp@- 6092a: 2f04 movel %d4,%sp@- 6092c: 2f03 movel %d3,%sp@- 6092e: 486a 0004 pea %a2@(4) 60932: 2f02 movel %d2,%sp@- 60934: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60936: 4fef 0014 lea %sp@(20),%sp 6093a: 4a80 tstl %d0 6093c: 6700 00aa beqw 609e8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 60940: 486e fffc pea %fp@(-4) 60944: 2f02 movel %d2,%sp@- 60946: 4eba fe64 jsr %pc@(607ac ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 6094a: 508f addql #8,%sp 6094c: 4a80 tstl %d0 6094e: 6700 0098 beqw 609e8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 60952: 4878 0001 pea 1 60956: 2f04 movel %d4,%sp@- 60958: 2f03 movel %d3,%sp@- 6095a: 486e fff8 pea %fp@(-8) 6095e: 2f02 movel %d2,%sp@- 60960: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60962: 4fef 0014 lea %sp@(20),%sp 60966: 4a80 tstl %d0 60968: 677e beqs 609e8 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 6096a: 226e fff8 moveal %fp@(-8),%a1 6096e: 7001 moveq #1,%d0 60970: 2049 moveal %a1,%a0 if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 60972: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60978: 6008 bras 60982 if(*cp == ',') 6097a: 722c moveq #44,%d1 6097c: b282 cmpl %d2,%d1 6097e: 6602 bnes 60982 memcount++; 60980: 5280 addql #1,%d0 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60982: 1210 moveb %a0@,%d1 60984: 5288 addql #1,%a0 if(*cp == ',') 60986: 1401 moveb %d1,%d2 60988: 49c2 extbl %d2 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 6098a: 4a01 tstb %d1 6098c: 66ec bnes 6097a } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 6098e: e588 lsll #2,%d0 60990: 0680 0000 0013 addil #19,%d0 60996: b0ae 0014 cmpl %fp@(20),%d0 6099a: 624c bhis 609e8 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 6099c: 202e 0010 movel %fp@(16),%d0 609a0: 74f0 moveq #-16,%d2 609a2: 0680 0000 000f addil #15,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 609a8: 7201 moveq #1,%d1 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 609aa: c082 andl %d2,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 609ac: 2040 moveal %d0,%a0 609ae: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 609b0: 206e fff8 moveal %fp@(-8),%a0 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 609b4: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 609b8: 6018 bras 609d2 if(*cp == ',') { 609ba: 702c moveq #44,%d0 609bc: b082 cmpl %d2,%d0 609be: 6610 bnes 609d0 *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 609c0: 2408 movel %a0,%d2 <== NOT EXECUTED 609c2: 5282 addql #1,%d2 <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 609c4: 4210 clrb %a0@ <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 609c6: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 609ca: 2382 1c00 movel %d2,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 609ce: 5281 addql #1,%d1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 609d0: 5288 addql #1,%a0 609d2: 1010 moveb %a0@,%d0 if(*cp == ',') { 609d4: 1400 moveb %d0,%d2 609d6: 49c2 extbl %d2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 609d8: 4a00 tstb %d0 609da: 66de bnes 609ba if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 609dc: 206a 000a moveal %a2@(10),%a0 609e0: 7001 moveq #1,%d0 609e2: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) return 1; 609e6: 6002 bras 609ea 609e8: 4280 clrl %d0 <== NOT EXECUTED } 609ea: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 609f0: 4e5e unlk %fp 609f2: 4e75 rts 00060a2c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 60a2c: 4e56 ffe0 linkw %fp,#-32 60a30: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60a34: 42a7 clrl %sp@- 60a36: 280e movel %fp,%d4 60a38: 0684 0000 0014 addil #20,%d4 60a3e: 260e movel %fp,%d3 60a40: 0683 0000 0010 addil #16,%d3 60a46: 47fa fe18 lea %pc@(60860 ),%a3 60a4a: 2f04 movel %d4,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 60a4c: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60a50: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 60a52: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60a56: 2f0a movel %a2,%sp@- 60a58: 2f02 movel %d2,%sp@- 60a5a: 4e93 jsr %a3@ 60a5c: 4fef 0014 lea %sp@(20),%sp 60a60: 4a80 tstl %d0 60a62: 6700 00a4 beqw 60b08 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 60a66: 42a7 clrl %sp@- 60a68: 2f04 movel %d4,%sp@- 60a6a: 2f03 movel %d3,%sp@- 60a6c: 486a 0004 pea %a2@(4) 60a70: 2f02 movel %d2,%sp@- 60a72: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60a74: 4fef 0014 lea %sp@(20),%sp 60a78: 4a80 tstl %d0 60a7a: 6700 008c beqw 60b08 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 60a7e: 486e fffc pea %fp@(-4) 60a82: 49fa fd28 lea %pc@(607ac ),%a4 60a86: 2f02 movel %d2,%sp@- 60a88: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60a8a: 508f addql #8,%sp 60a8c: 4a80 tstl %d0 60a8e: 6778 beqs 60b08 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 60a90: 486e fff8 pea %fp@(-8) 60a94: 2f02 movel %d2,%sp@- 60a96: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60a98: 508f addql #8,%sp 60a9a: 4a80 tstl %d0 60a9c: 676a beqs 60b08 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 60a9e: 42a7 clrl %sp@- 60aa0: 2f04 movel %d4,%sp@- 60aa2: 2f03 movel %d3,%sp@- 60aa4: 486a 000c pea %a2@(12) 60aa8: 2f02 movel %d2,%sp@- 60aaa: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60aac: 4fef 0014 lea %sp@(20),%sp 60ab0: 4a80 tstl %d0 60ab2: 6754 beqs 60b08 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 60ab4: 42a7 clrl %sp@- 60ab6: 2f04 movel %d4,%sp@- 60ab8: 2f03 movel %d3,%sp@- 60aba: 486a 0010 pea %a2@(16) 60abe: 2f02 movel %d2,%sp@- 60ac0: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60ac2: 4fef 0014 lea %sp@(20),%sp 60ac6: 4a80 tstl %d0 60ac8: 673e beqs 60b08 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 60aca: 42a7 clrl %sp@- 60acc: 2f04 movel %d4,%sp@- 60ace: 2f03 movel %d3,%sp@- 60ad0: 486a 0014 pea %a2@(20) 60ad4: 2f02 movel %d2,%sp@- 60ad6: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60ad8: 4fef 0014 lea %sp@(20),%sp 60adc: 4a80 tstl %d0 60ade: 6728 beqs 60b08 || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 60ae0: 4878 0001 pea 1 60ae4: 2f04 movel %d4,%sp@- 60ae6: 2f03 movel %d3,%sp@- 60ae8: 486a 0018 pea %a2@(24) 60aec: 2f02 movel %d2,%sp@- 60aee: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60af0: 4fef 0014 lea %sp@(20),%sp 60af4: 4a80 tstl %d0 60af6: 6710 beqs 60b08 || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 60af8: 7001 moveq #1,%d0 60afa: 356e fffa 000a movew %fp@(-6),%a2@(10) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 60b00: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; 60b06: 6002 bras 60b0a 60b08: 4280 clrl %d0 <== NOT EXECUTED } 60b0a: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 60b10: 4e5e unlk %fp 60b12: 4e75 rts 00045040 : int sched_getparam( pid_t pid __attribute__((unused)), struct sched_param *param __attribute__((unused)) ) { 45040: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45044: 4eb9 0004 d430 jsr 4d430 <__errno> 4504a: 7258 moveq #88,%d1 4504c: 2040 moveal %d0,%a0 } 4504e: 70ff moveq #-1,%d0 45050: 4e5e unlk %fp int sched_getparam( pid_t pid __attribute__((unused)), struct sched_param *param __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45052: 2081 movel %d1,%a0@ } 45054: 4e75 rts ... 00045058 : #include int sched_getscheduler( pid_t pid __attribute__((unused)) ) { 45058: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 4505c: 4eb9 0004 d430 jsr 4d430 <__errno> 45062: 7258 moveq #88,%d1 45064: 2040 moveal %d0,%a0 } 45066: 70ff moveq #-1,%d0 45068: 4e5e unlk %fp int sched_getscheduler( pid_t pid __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 4506a: 2081 movel %d1,%a0@ } 4506c: 4e75 rts ... 00045714 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 45714: 4e56 0000 linkw %fp,#0 45718: 2f03 movel %d3,%sp@- 4571a: 262e 0008 movel %fp@(8),%d3 4571e: 2f02 movel %d2,%sp@- 45720: 242e 000c movel %fp@(12),%d2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 45724: 4a83 tstl %d3 45726: 671a beqs 45742 45728: 4eb9 0004 2994 jsr 42994 4572e: b083 cmpl %d3,%d0 45730: 6710 beqs 45742 rtems_set_errno_and_return_minus_one( ESRCH ); 45732: 4eb9 0004 d5a0 jsr 4d5a0 <__errno> 45738: 7403 moveq #3,%d2 4573a: 72ff moveq #-1,%d1 4573c: 2040 moveal %d0,%a0 4573e: 2082 movel %d2,%a0@ 45740: 6026 bras 45768 if ( !interval ) 45742: 4a82 tstl %d2 45744: 6610 bnes 45756 rtems_set_errno_and_return_minus_one( EINVAL ); 45746: 4eb9 0004 d5a0 jsr 4d5a0 <__errno> 4574c: 72ff moveq #-1,%d1 4574e: 2040 moveal %d0,%a0 45750: 7016 moveq #22,%d0 45752: 2080 movel %d0,%a0@ 45754: 6012 bras 45768 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 45756: 2f02 movel %d2,%sp@- 45758: 2f39 0005 dc54 movel 5dc54 <_Thread_Ticks_per_timeslice>,%sp@- 4575e: 4eb9 0004 8850 jsr 48850 <_Timespec_From_ticks> return 0; 45764: 508f addql #8,%sp rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 45766: 4281 clrl %d1 return 0; } 45768: 242e fff8 movel %fp@(-8),%d2 4576c: 2001 movel %d1,%d0 4576e: 262e fffc movel %fp@(-4),%d3 45772: 4e5e unlk %fp 45774: 4e75 rts ... 00045070 : int sched_setparam( pid_t pid __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { 45070: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 45074: 4eb9 0004 d430 jsr 4d430 <__errno> 4507a: 7258 moveq #88,%d1 4507c: 2040 moveal %d0,%a0 } 4507e: 70ff moveq #-1,%d0 45080: 4e5e unlk %fp int sched_setparam( pid_t pid __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 45082: 2081 movel %d1,%a0@ } 45084: 4e75 rts ... 00045088 : int sched_setscheduler( pid_t pid __attribute__((unused)), int policy __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { 45088: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 4508c: 4eb9 0004 d430 jsr 4d430 <__errno> 45092: 7258 moveq #88,%d1 45094: 2040 moveal %d0,%a0 } 45096: 70ff moveq #-1,%d0 45098: 4e5e unlk %fp pid_t pid __attribute__((unused)), int policy __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 4509a: 2081 movel %d1,%a0@ } 4509c: 4e75 rts ... 00047c50 : int sem_getvalue( sem_t *sem, int *sval ) { 47c50: 4e56 fffc linkw %fp,#-4 47c54: 206e 0008 moveal %fp@(8),%a0 47c58: 486e fffc pea %fp@(-4) 47c5c: 2f10 movel %a0@,%sp@- 47c5e: 4879 0006 1cea pea 61cea <_POSIX_Semaphore_Information> 47c64: 4eb9 0004 9aa0 jsr 49aa0 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 47c6a: 4fef 000c lea %sp@(12),%sp 47c6e: 4aae fffc tstl %fp@(-4) 47c72: 6614 bnes 47c88 case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 47c74: 206e 000c moveal %fp@(12),%a0 47c78: 2240 moveal %d0,%a1 47c7a: 20a9 0062 movel %a1@(98),%a0@ _Thread_Enable_dispatch(); 47c7e: 4eb9 0004 a2f2 jsr 4a2f2 <_Thread_Enable_dispatch> 47c84: 4280 clrl %d0 return 0; 47c86: 600e bras 47c96 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47c88: 4eb9 0005 07a0 jsr 507a0 <__errno> 47c8e: 7216 moveq #22,%d1 47c90: 2040 moveal %d0,%a0 47c92: 70ff moveq #-1,%d0 47c94: 2081 movel %d1,%a0@ } 47c96: 4e5e unlk %fp 47c98: 4e75 rts ... 00047dd0 : */ int sem_post( sem_t *sem ) { 47dd0: 4e56 fffc linkw %fp,#-4 47dd4: 206e 0008 moveal %fp@(8),%a0 47dd8: 486e fffc pea %fp@(-4) 47ddc: 2f10 movel %a0@,%sp@- 47dde: 4879 0006 1cea pea 61cea <_POSIX_Semaphore_Information> 47de4: 4eb9 0004 9aa0 jsr 49aa0 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 47dea: 4fef 000c lea %sp@(12),%sp 47dee: 4aae fffc tstl %fp@(-4) 47df2: 6620 bnes 47e14 case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 47df4: 2040 moveal %d0,%a0 47df6: 42a7 clrl %sp@- 47df8: 2f28 0008 movel %a0@(8),%sp@- 47dfc: 4868 001a pea %a0@(26) 47e00: 4eb9 0004 91cc jsr 491cc <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 47e06: 4eb9 0004 a2f2 jsr 4a2f2 <_Thread_Enable_dispatch> return 0; 47e0c: 4fef 000c lea %sp@(12),%sp NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 47e10: 4280 clrl %d0 return 0; 47e12: 600e bras 47e22 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47e14: 4eb9 0005 07a0 jsr 507a0 <__errno> 47e1a: 7216 moveq #22,%d1 47e1c: 2040 moveal %d0,%a0 47e1e: 70ff moveq #-1,%d0 47e20: 2081 movel %d1,%a0@ } 47e22: 4e5e unlk %fp 47e24: 4e75 rts ... 00047e58 : */ int sem_trywait( sem_t *sem ) { 47e58: 4e56 0000 linkw %fp,#0 return _POSIX_Semaphore_Wait_support(sem, false, THREAD_QUEUE_WAIT_FOREVER); 47e5c: 42a7 clrl %sp@- 47e5e: 42a7 clrl %sp@- 47e60: 2f2e 0008 movel %fp@(8),%sp@- 47e64: 4eb9 0004 d604 jsr 4d604 <_POSIX_Semaphore_Wait_support> } 47e6a: 4e5e unlk %fp 47e6c: 4e75 rts ... 00047e70 : */ int sem_unlink( const char *name ) { 47e70: 4e56 fff0 linkw %fp,#-16 47e74: 2039 0006 1a90 movel 61a90 <_Thread_Dispatch_disable_level>,%d0 47e7a: 5280 addql #1,%d0 47e7c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47e80: 23c0 0006 1a90 movel %d0,61a90 <_Thread_Dispatch_disable_level> register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 47e86: 486e fffc pea %fp@(-4) 47e8a: 45f9 0004 a2f2 lea 4a2f2 <_Thread_Enable_dispatch>,%a2 47e90: 2f2e 0008 movel %fp@(8),%sp@- 47e94: 4eb9 0004 d590 jsr 4d590 <_POSIX_Semaphore_Name_to_id> if ( status != 0 ) { 47e9a: 508f addql #8,%sp register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 47e9c: 2400 movel %d0,%d2 if ( status != 0 ) { 47e9e: 6710 beqs 47eb0 _Thread_Enable_dispatch(); 47ea0: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one( status ); 47ea2: 4eb9 0005 07a0 jsr 507a0 <__errno> 47ea8: 2040 moveal %d0,%a0 47eaa: 70ff moveq #-1,%d0 47eac: 2082 movel %d2,%a0@ 47eae: 6034 bras 47ee4 } the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object( 47eb0: 4280 clrl %d0 47eb2: 2079 0006 1d02 moveal 61d02 <_POSIX_Semaphore_Information+0x18>,%a0 47eb8: 302e fffe movew %fp@(-2),%d0 47ebc: 2670 0c00 moveal %a0@(00000000,%d0:l:4),%a3 &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); the_semaphore->linked = false; 47ec0: 4200 clrb %d0 47ec2: 1740 0015 moveb %d0,%a3@(21) RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Namespace_remove( 47ec6: 2f0b movel %a3,%sp@- 47ec8: 4879 0006 1cea pea 61cea <_POSIX_Semaphore_Information> 47ece: 4eb9 0004 9bf8 jsr 49bf8 <_Objects_Namespace_remove> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 47ed4: 2f0b movel %a3,%sp@- 47ed6: 4eb9 0004 d540 jsr 4d540 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 47edc: 4e92 jsr %a2@ return 0; 47ede: 4fef 000c lea %sp@(12),%sp the_semaphore->linked = false; _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); 47ee2: 4280 clrl %d0 return 0; } 47ee4: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 47eea: 4e5e unlk %fp 47eec: 4e75 rts ... 0006074e : gid_t gid ) { _POSIX_types_Gid = gid; return 0; } 6074e: 4280 clrl %d0 <== NOT EXECUTED */ int setgid( gid_t gid ) { 60750: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Gid = gid; 60754: 2079 0009 717c moveal 9717c ,%a0 <== NOT EXECUTED 6075a: 316e 000a 0034 movew %fp@(10),%a0@(52) <== NOT EXECUTED return 0; } 60760: 4e5e unlk %fp <== NOT EXECUTED 60762: 4e75 rts 00060c2c : return NULL; return &grent; } void setgrent(void) { 60c2c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 60c30: 4eb9 0006 0b4c jsr 60b4c <== NOT EXECUTED if (group_fp != NULL) 60c36: 2039 0009 b2ae movel 9b2ae ,%d0 <== NOT EXECUTED 60c3c: 670a beqs 60c48 <== NOT EXECUTED fclose(group_fp); 60c3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60c40: 4eb9 0007 60f2 jsr 760f2 <== NOT EXECUTED 60c46: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 60c48: 4879 0008 f52b pea 8f52b <== NOT EXECUTED 60c4e: 4879 0008 ddd5 pea 8ddd5 <_rodata_start+0x845> <== NOT EXECUTED 60c54: 4eb9 0007 6958 jsr 76958 <== NOT EXECUTED 60c5a: 508f addql #8,%sp <== NOT EXECUTED } 60c5c: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 60c5e: 23c0 0009 b2ae movel %d0,9b2ae <== NOT EXECUTED } 60c64: 4e75 rts 00060ddc : return NULL; return &pwent; } void setpwent(void) { 60ddc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 60de0: 4eb9 0006 0b4c jsr 60b4c <== NOT EXECUTED if (passwd_fp != NULL) 60de6: 2039 0009 b1c6 movel 9b1c6 ,%d0 <== NOT EXECUTED 60dec: 670a beqs 60df8 <== NOT EXECUTED fclose(passwd_fp); 60dee: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60df0: 4eb9 0007 60f2 jsr 760f2 <== NOT EXECUTED 60df6: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 60df8: 4879 0008 f52b pea 8f52b <== NOT EXECUTED 60dfe: 4879 0008 dd90 pea 8dd90 <_rodata_start+0x800> <== NOT EXECUTED 60e04: 4eb9 0007 6958 jsr 76958 <== NOT EXECUTED 60e0a: 508f addql #8,%sp <== NOT EXECUTED } 60e0c: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 60e0e: 23c0 0009 b1c6 movel %d0,9b1c6 <== NOT EXECUTED } 60e14: 4e75 rts 0004595a : uid_t uid ) { _POSIX_types_Uid = uid; return 0; } 4595a: 4280 clrl %d0 <== NOT EXECUTED */ int setuid( uid_t uid ) { 4595c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Uid = uid; 45960: 2079 0009 717c moveal 9717c ,%a0 <== NOT EXECUTED 45966: 316e 000a 0032 movew %fp@(10),%a0@(50) <== NOT EXECUTED return 0; } 4596c: 4e5e unlk %fp <== NOT EXECUTED 4596e: 4e75 rts 000455e4 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 455e4: 4e56 ffec linkw %fp,#-20 455e8: 222e 0010 movel %fp@(16),%d1 455ec: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 455f0: 242e 0008 movel %fp@(8),%d2 455f4: 246e 000c moveal %fp@(12),%a2 ISR_Level level; if ( oact ) 455f8: 4a81 tstl %d1 455fa: 6722 beqs 4561e *oact = _POSIX_signals_Vectors[ sig ]; 455fc: 2602 movel %d2,%d3 455fe: 2002 movel %d2,%d0 45600: 4878 000c pea c 45604: e58b lsll #2,%d3 45606: e988 lsll #4,%d0 45608: 9083 subl %d3,%d0 4560a: 0680 0005 ed42 addil #388418,%d0 45610: 2f00 movel %d0,%sp@- 45612: 2f01 movel %d1,%sp@- 45614: 4eb9 0004 df4c jsr 4df4c 4561a: 4fef 000c lea %sp@(12),%sp if ( !sig ) 4561e: 4a82 tstl %d2 45620: 6710 beqs 45632 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 45622: 2002 movel %d2,%d0 45624: 5380 subql #1,%d0 45626: 721f moveq #31,%d1 45628: b280 cmpl %d0,%d1 4562a: 6506 bcss 45632 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 4562c: 7009 moveq #9,%d0 4562e: b082 cmpl %d2,%d0 45630: 6610 bnes 45642 rtems_set_errno_and_return_minus_one( EINVAL ); 45632: 4eb9 0004 d714 jsr 4d714 <__errno> 45638: 72ff moveq #-1,%d1 4563a: 2040 moveal %d0,%a0 4563c: 7016 moveq #22,%d0 4563e: 2080 movel %d0,%a0@ 45640: 6060 bras 456a2 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 45642: 4a8a tstl %a2 45644: 675a beqs 456a0 /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 45646: 203c 0000 0700 movel #1792,%d0 4564c: 40c3 movew %sr,%d3 4564e: 8083 orl %d3,%d0 45650: 46c0 movew %d0,%sr 45652: 780c moveq #12,%d4 45654: 47f9 0004 df4c lea 4df4c ,%a3 4565a: 4c02 4800 mulsl %d2,%d4 if ( act->sa_handler == SIG_DFL ) { 4565e: 4aaa 0008 tstl %a2@(8) 45662: 661e bnes 45682 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 45664: 4878 000c pea c 45668: 2004 movel %d4,%d0 4566a: 0680 0005 c294 addil #377492,%d0 45670: 2f00 movel %d0,%sp@- 45672: 0684 0005 ed42 addil #388418,%d4 45678: 2f04 movel %d4,%sp@- 4567a: 4e93 jsr %a3@ 4567c: 4fef 000c lea %sp@(12),%sp 45680: 601c bras 4569e } else { _POSIX_signals_Clear_process_signals( sig ); 45682: 2f02 movel %d2,%sp@- _POSIX_signals_Vectors[ sig ] = *act; 45684: 0684 0005 ed42 addil #388418,%d4 _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 4568a: 4eb9 0004 a6e0 jsr 4a6e0 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 45690: 4878 000c pea c 45694: 2f0a movel %a2,%sp@- 45696: 2f04 movel %d4,%sp@- 45698: 4e93 jsr %a3@ 4569a: 4fef 0010 lea %sp@(16),%sp } _ISR_Enable( level ); 4569e: 46c3 movew %d3,%sr 456a0: 4281 clrl %d1 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 456a2: 2001 movel %d1,%d0 456a4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 456aa: 4e5e unlk %fp 456ac: 4e75 rts ... 00047234 : int sigdelset( sigset_t *set, int signo ) { 47234: 4e56 0000 linkw %fp,#0 47238: 226e 0008 moveal %fp@(8),%a1 4723c: 202e 000c movel %fp@(12),%d0 if ( !set ) 47240: 4a89 tstl %a1 47242: 6710 beqs 47254 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 47244: 4a80 tstl %d0 47246: 6604 bnes 4724c 47248: 91c8 subal %a0,%a0 4724a: 6024 bras 47270 4724c: 5380 subql #1,%d0 return 0; if ( !is_valid_signo(signo) ) 4724e: 721f moveq #31,%d1 47250: b280 cmpl %d0,%d1 47252: 6412 bccs 47266 rtems_set_errno_and_return_minus_one( EINVAL ); 47254: 4eb9 0004 f238 jsr 4f238 <__errno> 4725a: 307c ffff moveaw #-1,%a0 4725e: 2240 moveal %d0,%a1 47260: 7016 moveq #22,%d0 47262: 2280 movel %d0,%a1@ 47264: 600a bras 47270 *set &= ~signo_to_mask(signo); 47266: 7201 moveq #1,%d1 47268: 91c8 subal %a0,%a0 4726a: e1a9 lsll %d0,%d1 4726c: 4681 notl %d1 4726e: c391 andl %d1,%a1@ return 0; } 47270: 2008 movel %a0,%d0 47272: 4e5e unlk %fp 47274: 4e75 rts ... 0004729c : #include int sigfillset( sigset_t *set ) { 4729c: 4e56 0000 linkw %fp,#0 472a0: 206e 0008 moveal %fp@(8),%a0 if ( !set ) 472a4: 4a88 tstl %a0 472a6: 6610 bnes 472b8 rtems_set_errno_and_return_minus_one( EINVAL ); 472a8: 4eb9 0004 f238 jsr 4f238 <__errno> 472ae: 7216 moveq #22,%d1 472b0: 2040 moveal %d0,%a0 472b2: 70ff moveq #-1,%d0 472b4: 2081 movel %d1,%a0@ 472b6: 6006 bras 472be *set = SIGNAL_ALL_MASK; 472b8: 70ff moveq #-1,%d0 472ba: 2080 movel %d0,%a0@ 472bc: 4280 clrl %d0 return 0; } 472be: 4e5e unlk %fp 472c0: 4e75 rts ... 000472c4 : int sigismember( const sigset_t *set, int signo ) { 472c4: 4e56 0000 linkw %fp,#0 472c8: 206e 0008 moveal %fp@(8),%a0 472cc: 222e 000c movel %fp@(12),%d1 if ( !set ) 472d0: 4a88 tstl %a0 472d2: 670c beqs 472e0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 472d4: 4a81 tstl %d1 472d6: 6724 beqs 472fc 472d8: 5381 subql #1,%d1 return 0; if ( !is_valid_signo(signo) ) 472da: 701f moveq #31,%d0 472dc: b081 cmpl %d1,%d0 472de: 6410 bccs 472f0 rtems_set_errno_and_return_minus_one( EINVAL ); 472e0: 4eb9 0004 f238 jsr 4f238 <__errno> 472e6: 72ff moveq #-1,%d1 472e8: 2040 moveal %d0,%a0 472ea: 7016 moveq #22,%d0 472ec: 2080 movel %d0,%a0@ 472ee: 600c bras 472fc 472f0: 7001 moveq #1,%d0 472f2: e3a8 lsll %d1,%d0 472f4: c090 andl %a0@,%d0 472f6: 56c1 sne %d1 472f8: 49c1 extbl %d1 472fa: 4481 negl %d1 if ( *set & signo_to_mask(signo) ) return 1; return 0; } 472fc: 2001 movel %d1,%d0 472fe: 4e5e unlk %fp 47300: 4e75 rts ... 00045490 : sighandler_t signal( int signum, sighandler_t handler ) { 45490: 4e56 ffe8 linkw %fp,#-24 struct sigaction s; struct sigaction old; s.sa_handler = handler ; 45494: 2d6e 000c fffc movel %fp@(12),%fp@(-4) sigemptyset(&s.sa_mask); 4549a: 486e fff8 pea %fp@(-8) 4549e: 4eb9 0004 546c jsr 4546c s.sa_flags = SA_RESTART; #else s.sa_flags = 0; #endif sigaction( signum, &s, &old ); 454a4: 486e ffe8 pea %fp@(-24) 454a8: 486e fff4 pea %fp@(-12) 454ac: 2f2e 0008 movel %fp@(8),%sp@- s.sa_flags = SA_RESTART | SA_INTERRUPT | SA_NOMASK; s.sa_restorer= NULL ; #elif defined(signal_like_SVR4) s.sa_flags = SA_RESTART; #else s.sa_flags = 0; 454b0: 42ae fff4 clrl %fp@(-12) #endif sigaction( signum, &s, &old ); 454b4: 4eb9 0004 5360 jsr 45360 return (sighandler_t) old.sa_handler; } 454ba: 202e fff0 movel %fp@(-16),%d0 454be: 4e5e unlk %fp 454c0: 4e75 rts ... 00047348 : int sigqueue( pid_t pid, int signo, const union sigval value ) { 47348: 4e56 0000 linkw %fp,#0 return killinfo( pid, signo, &value ); 4734c: 486e 0010 pea %fp@(16) 47350: 2f2e 000c movel %fp@(12),%sp@- 47354: 2f2e 0008 movel %fp@(8),%sp@- 47358: 4eb9 0004 c3c8 jsr 4c3c8 } 4735e: 4e5e unlk %fp 47360: 4e75 rts ... 00047364 : #include int sigsuspend( const sigset_t *sigmask ) { 47364: 4e56 ffec linkw %fp,#-20 47368: 48d7 040c moveml %d2-%d3/%a2,%sp@ int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 4736c: 240e movel %fp,%d2 4736e: 5982 subql #4,%d2 47370: 45f9 0004 733c lea 4733c ,%a2 (void) sigfillset( &all_signals ); 47376: 260e movel %fp,%d3 47378: 5183 subql #8,%d3 int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 4737a: 2f02 movel %d2,%sp@- 4737c: 2f2e 0008 movel %fp@(8),%sp@- 47380: 4878 0001 pea 1 47384: 4e92 jsr %a2@ (void) sigfillset( &all_signals ); 47386: 2f03 movel %d3,%sp@- 47388: 4eb9 0004 729c jsr 4729c status = sigtimedwait( &all_signals, NULL, NULL ); 4738e: 42a7 clrl %sp@- 47390: 42a7 clrl %sp@- 47392: 2f03 movel %d3,%sp@- 47394: 4eb9 0004 7414 jsr 47414 4739a: 2600 movel %d0,%d3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 4739c: 42a7 clrl %sp@- 4739e: 2f02 movel %d2,%sp@- 473a0: 42a7 clrl %sp@- 473a2: 4e92 jsr %a2@ /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 473a4: 4fef 0028 lea %sp@(40),%sp 473a8: 70ff moveq #-1,%d0 473aa: b083 cmpl %d3,%d0 473ac: 670c beqs 473ba rtems_set_errno_and_return_minus_one( EINTR ); 473ae: 4eb9 0004 f238 jsr 4f238 <__errno> 473b4: 2040 moveal %d0,%a0 473b6: 7004 moveq #4,%d0 473b8: 2080 movel %d0,%a0@ return status; } 473ba: 70ff moveq #-1,%d0 473bc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 473c2: 4e5e unlk %fp 473c4: 4e75 rts ... 000475a0 : int sigwait( const sigset_t *set, int *sig ) { 475a0: 4e56 0000 linkw %fp,#0 475a4: 2f0a movel %a2,%sp@- 475a6: 246e 000c moveal %fp@(12),%a2 int status; status = sigtimedwait( set, NULL, NULL ); 475aa: 42a7 clrl %sp@- 475ac: 42a7 clrl %sp@- 475ae: 2f2e 0008 movel %fp@(8),%sp@- 475b2: 4eb9 0004 7414 jsr 47414 if ( status != -1 ) { 475b8: 4fef 000c lea %sp@(12),%sp 475bc: 72ff moveq #-1,%d1 475be: b280 cmpl %d0,%d1 475c0: 670a beqs 475cc if ( sig ) 475c2: 4a8a tstl %a2 475c4: 6702 beqs 475c8 *sig = status; 475c6: 2480 movel %d0,%a2@ 475c8: 4280 clrl %d0 475ca: 600a bras 475d6 return 0; } return errno; 475cc: 4eb9 0004 f238 jsr 4f238 <__errno> 475d2: 2040 moveal %d0,%a0 475d4: 2010 movel %a0@,%d0 } 475d6: 246e fffc moveal %fp@(-4),%a2 475da: 4e5e unlk %fp 475dc: 4e75 rts ... 0004391a : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 4391a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4391e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43920: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 43924: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 43928: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4392a: 4282 clrl %d2 <== NOT EXECUTED 4392c: 142e 000b moveb %fp@(11),%d2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 43930: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED 43936: 6734 beqs 4396c <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43938: 42a7 clrl %sp@- <== NOT EXECUTED 4393a: 42a7 clrl %sp@- <== NOT EXECUTED 4393c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 43940: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED i = iproc (c, tty); 43946: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43948: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4394a: 4eba fe72 jsr %pc@(437be ) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 4394e: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); 43952: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 43954: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 4395a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4395e: 2002 movel %d2,%d0 <== NOT EXECUTED * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); 43960: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 43964: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 43968: 4e5e unlk %fp <== NOT EXECUTED 4396a: 4e75 rts <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 4396c: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 43970: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 43974: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 43978: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4397c: 4e5e unlk %fp <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 4397e: 6000 fe3e braw 437be <== NOT EXECUTED 000469e4 : int _STAT_NAME( const char *path, struct stat *buf ) { 469e4: 4e56 ffe0 linkw %fp,#-32 469e8: 48d7 001c moveml %d2-%d4,%sp@ 469ec: 282e 0008 movel %fp@(8),%d4 469f0: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 469f4: 6612 bnes 46a08 rtems_set_errno_and_return_minus_one( EFAULT ); 469f6: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 469fc: 760e moveq #14,%d3 469fe: 74ff moveq #-1,%d2 46a00: 2040 moveal %d0,%a0 46a02: 2083 movel %d3,%a0@ 46a04: 6000 009a braw 46aa0 status = rtems_filesystem_evaluate_path( path, strlen( path ), 46a08: 2f04 movel %d4,%sp@- 46a0a: 260e movel %fp,%d3 46a0c: 0683 ffff ffec addil #-20,%d3 46a12: 4eb9 0007 c05c jsr 7c05c 46a18: 7201 moveq #1,%d1 46a1a: 2e81 movel %d1,%sp@ 46a1c: 2f03 movel %d3,%sp@- 46a1e: 42a7 clrl %sp@- 46a20: 2f00 movel %d0,%sp@- 46a22: 2f04 movel %d4,%sp@- 46a24: 4eb9 0004 5772 jsr 45772 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 46a2a: 4fef 0014 lea %sp@(20),%sp 46a2e: 4a80 tstl %d0 46a30: 6704 beqs 46a36 46a32: 74ff moveq #-1,%d2 46a34: 606a bras 46aa0 return -1; if ( !loc.handlers->fstat_h ){ 46a36: 206e fff4 moveal %fp@(-12),%a0 46a3a: 4aa8 0018 tstl %a0@(24) 46a3e: 6628 bnes 46a68 rtems_filesystem_freenode( &loc ); 46a40: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 46a44: 4a88 tstl %a0 <== NOT EXECUTED 46a46: 670e beqs 46a56 <== NOT EXECUTED 46a48: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 46a4c: 4a88 tstl %a0 <== NOT EXECUTED 46a4e: 6706 beqs 46a56 <== NOT EXECUTED 46a50: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46a52: 4e90 jsr %a0@ <== NOT EXECUTED 46a54: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 46a56: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 46a5c: 74ff moveq #-1,%d2 <== NOT EXECUTED 46a5e: 2040 moveal %d0,%a0 <== NOT EXECUTED 46a60: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 46a66: 6038 bras 46aa0 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 46a68: 4878 0046 pea 46 46a6c: 42a7 clrl %sp@- 46a6e: 2f02 movel %d2,%sp@- 46a70: 4eb9 0007 9158 jsr 79158 status = (*loc.handlers->fstat_h)( &loc, buf ); 46a76: 206e fff4 moveal %fp@(-12),%a0 46a7a: 2f02 movel %d2,%sp@- 46a7c: 2f03 movel %d3,%sp@- 46a7e: 2068 0018 moveal %a0@(24),%a0 46a82: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 46a84: 206e fff8 moveal %fp@(-8),%a0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 46a88: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 46a8a: 4fef 0014 lea %sp@(20),%sp 46a8e: 4a88 tstl %a0 46a90: 670e beqs 46aa0 46a92: 2068 001c moveal %a0@(28),%a0 46a96: 4a88 tstl %a0 46a98: 6706 beqs 46aa0 46a9a: 2f03 movel %d3,%sp@- 46a9c: 4e90 jsr %a0@ 46a9e: 588f addql #4,%sp return status; } 46aa0: 2002 movel %d2,%d0 46aa2: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 46aa8: 4e5e unlk %fp 46aaa: 4e75 rts 00061ab8 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 61ab8: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 61abc: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 61ac0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 61ac4: 260e movel %fp,%d3 <== NOT EXECUTED 61ac6: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 61acc: 2f0a movel %a2,%sp@- <== NOT EXECUTED */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 61ace: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 61ad2: 4eb9 0007 c05c jsr 7c05c <== NOT EXECUTED 61ad8: 7201 moveq #1,%d1 <== NOT EXECUTED 61ada: 2e81 movel %d1,%sp@ <== NOT EXECUTED 61adc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61ade: 42a7 clrl %sp@- <== NOT EXECUTED 61ae0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61ae2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 61ae4: 4eb9 0004 5772 jsr 45772 <== NOT EXECUTED 61aea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61aee: 4a80 tstl %d0 <== NOT EXECUTED 61af0: 6704 beqs 61af6 <== NOT EXECUTED 61af2: 74ff moveq #-1,%d2 <== NOT EXECUTED 61af4: 605a bras 61b50 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 61af6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 61afa: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 61afe: 4aa8 0044 tstl %a0@(68) <== NOT EXECUTED 61b02: 6612 bnes 61b16 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 61b04: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 61b0a: 74ff moveq #-1,%d2 <== NOT EXECUTED 61b0c: 2040 moveal %d0,%a0 <== NOT EXECUTED 61b0e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61b14: 603a bras 61b50 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 61b16: 4878 0038 pea 38 <== NOT EXECUTED 61b1a: 42a7 clrl %sp@- <== NOT EXECUTED 61b1c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61b1e: 4eb9 0007 9158 jsr 79158 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 61b24: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 61b28: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61b2a: 486a 001c pea %a2@(28) <== NOT EXECUTED 61b2e: 2068 0044 moveal %a0@(68),%a0 <== NOT EXECUTED 61b32: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 61b34: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 61b38: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 61b3a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61b3e: 4a88 tstl %a0 <== NOT EXECUTED 61b40: 670e beqs 61b50 <== NOT EXECUTED 61b42: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61b46: 4a88 tstl %a0 <== NOT EXECUTED 61b48: 6706 beqs 61b50 <== NOT EXECUTED 61b4a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61b4c: 4e90 jsr %a0@ <== NOT EXECUTED 61b4e: 588f addql #4,%sp <== NOT EXECUTED return result; } 61b50: 2002 movel %d2,%d0 <== NOT EXECUTED 61b52: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 <== NOT EXECUTED 61b58: 4e5e unlk %fp <== NOT EXECUTED 61b5a: 4e75 rts 00061b5c : int symlink( const char *actualpath, const char *sympath ) { 61b5c: 4e56 ffdc linkw %fp,#-36 61b60: 48d7 040c moveml %d2-%d3/%a2,%sp@ 61b64: 246e 000c moveal %fp@(12),%a2 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 61b68: 742f moveq #47,%d2 61b6a: 1012 moveb %a2@,%d0 61b6c: 1200 moveb %d0,%d1 61b6e: 49c1 extbl %d1 61b70: b481 cmpl %d1,%d2 61b72: 670c beqs 61b80 61b74: 143c 005c moveb #92,%d2 61b78: b481 cmpl %d1,%d2 61b7a: 6704 beqs 61b80 61b7c: 4a00 tstb %d0 61b7e: 6622 bnes 61ba2 61b80: 4878 0014 pea 14 61b84: 2079 0009 717c moveal 9717c ,%a0 61b8a: 41e8 0018 lea %a0@(24),%a0 61b8e: 2f08 movel %a0,%sp@- 61b90: 486e ffe8 pea %fp@(-24) 61b94: 4eb9 0007 8fec jsr 78fec 61b9a: 4fef 000c lea %sp@(12),%sp 61b9e: 7001 moveq #1,%d0 61ba0: 601e bras 61bc0 61ba2: 4878 0014 pea 14 61ba6: 2039 0009 717c movel 9717c ,%d0 61bac: 5880 addql #4,%d0 61bae: 2f00 movel %d0,%sp@- 61bb0: 486e ffe8 pea %fp@(-24) 61bb4: 4eb9 0007 8fec jsr 78fec 61bba: 4fef 000c lea %sp@(12),%sp 61bbe: 4280 clrl %d0 if ( !loc.ops->evalformake_h ) { 61bc0: 206e fff4 moveal %fp@(-12),%a0 61bc4: 2068 0004 moveal %a0@(4),%a0 61bc8: 4a88 tstl %a0 61bca: 673a beqs 61c06 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 61bcc: 486e fffc pea %fp@(-4) 61bd0: 260e movel %fp,%d3 61bd2: 0683 ffff ffe8 addil #-24,%d3 61bd8: 2f03 movel %d3,%sp@- 61bda: 4872 0800 pea %a2@(00000000,%d0:l) 61bde: 4e90 jsr %a0@ if ( result != 0 ) 61be0: 4fef 000c lea %sp@(12),%sp 61be4: 4a80 tstl %d0 61be6: 6704 beqs 61bec 61be8: 74ff moveq #-1,%d2 61bea: 6054 bras 61c40 return -1; if ( !loc.ops->symlink_h ) { 61bec: 226e fff4 moveal %fp@(-12),%a1 61bf0: 2069 0038 moveal %a1@(56),%a0 61bf4: 4a88 tstl %a0 61bf6: 6620 bnes 61c18 rtems_filesystem_freenode( &loc ); 61bf8: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 61bfc: 4a88 tstl %a0 <== NOT EXECUTED 61bfe: 6706 beqs 61c06 <== NOT EXECUTED 61c00: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61c02: 4e90 jsr %a0@ <== NOT EXECUTED 61c04: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61c06: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 61c0c: 74ff moveq #-1,%d2 <== NOT EXECUTED 61c0e: 2040 moveal %d0,%a0 <== NOT EXECUTED 61c10: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61c16: 6028 bras 61c40 <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 61c18: 2f2e fffc movel %fp@(-4),%sp@- 61c1c: 2f2e 0008 movel %fp@(8),%sp@- 61c20: 2f03 movel %d3,%sp@- 61c22: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 61c24: 206e fff4 moveal %fp@(-12),%a0 if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 61c28: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 61c2a: 4fef 000c lea %sp@(12),%sp 61c2e: 4a88 tstl %a0 61c30: 670e beqs 61c40 61c32: 2068 001c moveal %a0@(28),%a0 61c36: 4a88 tstl %a0 61c38: 6706 beqs 61c40 61c3a: 2f03 movel %d3,%sp@- 61c3c: 4e90 jsr %a0@ 61c3e: 588f addql #4,%sp return result; } 61c40: 2002 movel %d2,%d0 61c42: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 61c48: 4e5e unlk %fp 61c4a: 4e75 rts 00044b28 : long sysconf( int name ) { if ( name == _SC_CLK_TCK ) 44b28: 7002 moveq #2,%d0 */ long sysconf( int name ) { 44b2a: 4e56 0000 linkw %fp,#0 44b2e: 222e 0008 movel %fp@(8),%d1 44b32: 2f02 movel %d2,%sp@- if ( name == _SC_CLK_TCK ) 44b34: b081 cmpl %d1,%d0 44b36: 6612 bnes 44b4a return (TOD_MICROSECONDS_PER_SECOND / 44b38: 41f9 0005 ba44 lea 5ba44 ,%a0 44b3e: 203c 000f 4240 movel #1000000,%d0 44b44: 4c50 0000 remul %a0@,%d0,%d0 44b48: 6034 bras 44b7e rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 44b4a: 7004 moveq #4,%d0 44b4c: b081 cmpl %d1,%d0 44b4e: 6608 bnes 44b58 return rtems_libio_number_iops; 44b50: 2039 0005 b964 movel 5b964 ,%d0 44b56: 6026 bras 44b7e if ( name == _SC_GETPW_R_SIZE_MAX ) 44b58: 203c 0000 0400 movel #1024,%d0 44b5e: 7433 moveq #51,%d2 44b60: b481 cmpl %d1,%d2 44b62: 671a beqs 44b7e return 1024; if ( name == _SC_PAGESIZE ) 44b64: 143c 0008 moveb #8,%d2 44b68: 303c 1000 movew #4096,%d0 44b6c: b481 cmpl %d1,%d2 44b6e: 670e beqs 44b7e #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 44b70: 4eb9 0004 cedc jsr 4cedc <__errno> 44b76: 7216 moveq #22,%d1 44b78: 2040 moveal %d0,%a0 44b7a: 70ff moveq #-1,%d0 44b7c: 2081 movel %d1,%a0@ } 44b7e: 242e fffc movel %fp@(-4),%d2 44b82: 4e5e unlk %fp 44b84: 4e75 rts ... 0004f250 : int tcgetattr( int fd, struct termios *tp ) { 4f250: 4e56 0000 linkw %fp,#0 return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 4f254: 2f2e 000c movel %fp@(12),%sp@- 4f258: 4878 0001 pea 1 4f25c: 2f2e 0008 movel %fp@(8),%sp@- 4f260: 4eb9 0005 262c jsr 5262c } 4f266: 4e5e unlk %fp 4f268: 4e75 rts ... 0004f26c : int tcsetattr( int fd, int opt, struct termios *tp ) { 4f26c: 4e56 0000 linkw %fp,#0 4f270: 202e 000c movel %fp@(12),%d0 4f274: 2f03 movel %d3,%sp@- 4f276: 262e 0010 movel %fp@(16),%d3 4f27a: 2f02 movel %d2,%sp@- 4f27c: 242e 0008 movel %fp@(8),%d2 switch (opt) { 4f280: 4a80 tstl %d0 4f282: 672c beqs 4f2b0 4f284: 7201 moveq #1,%d1 <== NOT EXECUTED 4f286: b280 cmpl %d0,%d1 <== NOT EXECUTED 4f288: 6710 beqs 4f29a <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4f28a: 4eb9 0005 3ac4 jsr 53ac4 <__errno> <== NOT EXECUTED 4f290: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f292: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4f298: 6034 bras 4f2ce <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 4f29a: 42a7 clrl %sp@- <== NOT EXECUTED 4f29c: 4878 0003 pea 3 <== NOT EXECUTED 4f2a0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f2a2: 4eb9 0005 262c jsr 5262c <== NOT EXECUTED 4f2a8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f2ac: 4a80 tstl %d0 <== NOT EXECUTED 4f2ae: 6d1e blts 4f2ce <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4f2b0: 2d43 0010 movel %d3,%fp@(16) 4f2b4: 7002 moveq #2,%d0 4f2b6: 2d42 0008 movel %d2,%fp@(8) } } 4f2ba: 242e fff8 movel %fp@(-8),%d2 4f2be: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4f2c2: 2d40 000c movel %d0,%fp@(12) } } 4f2c6: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4f2c8: 4ef9 0005 262c jmp 5262c } } 4f2ce: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4f2d2: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f2d4: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 4f2d8: 4e5e unlk %fp <== NOT EXECUTED 4f2da: 4e75 rts 00044bd0 : timer_t *timerid ) { POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 44bd0: 7001 moveq #1,%d0 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 44bd2: 4e56 0000 linkw %fp,#0 44bd6: 2f0b movel %a3,%sp@- 44bd8: 266e 0010 moveal %fp@(16),%a3 44bdc: 2f0a movel %a2,%sp@- 44bde: 246e 000c moveal %fp@(12),%a2 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 44be2: b0ae 0008 cmpl %fp@(8),%d0 44be6: 6620 bnes 44c08 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 44be8: 4a8b tstl %a3 44bea: 671c beqs 44c08 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 44bec: 4a8a tstl %a2 44bee: 672a beqs 44c1a /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 44bf0: 2012 movel %a2@,%d0 44bf2: 7201 moveq #1,%d1 44bf4: 5380 subql #1,%d0 44bf6: b280 cmpl %d0,%d1 44bf8: 650e bcss 44c08 ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 44bfa: 202a 0004 movel %a2@(4),%d0 44bfe: 6708 beqs 44c08 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 44c00: 5380 subql #1,%d0 44c02: 721f moveq #31,%d1 44c04: b280 cmpl %d0,%d1 44c06: 6412 bccs 44c1a rtems_set_errno_and_return_minus_one( EINVAL ); 44c08: 4eb9 0004 d134 jsr 4d134 <__errno> 44c0e: 72ff moveq #-1,%d1 44c10: 2040 moveal %d0,%a0 44c12: 7016 moveq #22,%d0 44c14: 2080 movel %d0,%a0@ 44c16: 6000 00a4 braw 44cbc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44c1a: 2039 0005 d7f4 movel 5d7f4 <_Thread_Dispatch_disable_level>,%d0 44c20: 5280 addql #1,%d0 44c22: 23c0 0005 d7f4 movel %d0,5d7f4 <_Thread_Dispatch_disable_level> * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 44c28: 4879 0005 da88 pea 5da88 <_POSIX_Timer_Information> 44c2e: 4eb9 0004 67f4 jsr 467f4 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 44c34: 588f addql #4,%sp 44c36: 2040 moveal %d0,%a0 44c38: 4a80 tstl %d0 44c3a: 6616 bnes 44c52 _Thread_Enable_dispatch(); 44c3c: 4eb9 0004 73ca jsr 473ca <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 44c42: 4eb9 0004 d134 jsr 4d134 <__errno> 44c48: 72ff moveq #-1,%d1 44c4a: 2040 moveal %d0,%a0 44c4c: 700b moveq #11,%d0 44c4e: 2080 movel %d0,%a0@ 44c50: 606a bras 44cbc } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 44c52: 7002 moveq #2,%d0 44c54: 1140 003c moveb %d0,%a0@(60) ptimer->thread_id = _Thread_Executing->Object.id; 44c58: 2279 0005 d8ae moveal 5d8ae <_Thread_Executing>,%a1 44c5e: 2169 0008 0038 movel %a1@(8),%a0@(56) if ( evp != NULL ) { 44c64: 4a8a tstl %a2 44c66: 6710 beqs 44c78 ptimer->inf.sigev_notify = evp->sigev_notify; 44c68: 2152 003e movel %a2@,%a0@(62) ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 44c6c: 216a 0008 0046 movel %a2@(8),%a0@(70) ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; 44c72: 216a 0004 0042 movel %a2@(4),%a0@(66) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 44c78: 2028 0008 movel %a0@(8),%d0 44c7c: 4281 clrl %d1 44c7e: 2279 0005 daa0 moveal 5daa0 <_POSIX_Timer_Information+0x18>,%a1 44c84: 3200 movew %d0,%d1 ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0; 44c86: 42a8 0066 clrl %a0@(102) 44c8a: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) ptimer->timer_data.it_value.tv_sec = 0; 44c8e: 42a8 005a clrl %a0@(90) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 44c92: 42a8 000c clrl %a0@(12) ptimer->timer_data.it_value.tv_nsec = 0; 44c96: 42a8 005e clrl %a0@(94) ptimer->timer_data.it_interval.tv_sec = 0; 44c9a: 42a8 0052 clrl %a0@(82) ptimer->timer_data.it_interval.tv_nsec = 0; 44c9e: 42a8 0056 clrl %a0@(86) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 44ca2: 42a8 0030 clrl %a0@(48) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 44ca6: 42a8 0018 clrl %a0@(24) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 44caa: 2680 movel %d0,%a3@ the_watchdog->routine = routine; 44cac: 42a8 002c clrl %a0@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 44cb0: 42a8 0034 clrl %a0@(52) _Thread_Enable_dispatch(); 44cb4: 4eb9 0004 73ca jsr 473ca <_Thread_Enable_dispatch> 44cba: 4281 clrl %d1 return 0; } 44cbc: 246e fff8 moveal %fp@(-8),%a2 44cc0: 2001 movel %d1,%d0 44cc2: 266e fffc moveal %fp@(-4),%a3 44cc6: 4e5e unlk %fp 44cc8: 4e75 rts ... 000454b4 : int timer_delete( timer_t timerid ) { 454b4: 4e56 fffc linkw %fp,#-4 454b8: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 454ba: 486e fffc pea %fp@(-4) 454be: 2f2e 0008 movel %fp@(8),%sp@- 454c2: 4879 0005 e420 pea 5e420 <_POSIX_Timer_Information> 454c8: 4eb9 0004 73d0 jsr 473d0 <_Objects_Get> */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 454ce: 4fef 000c lea %sp@(12),%sp 454d2: 2440 moveal %d0,%a2 454d4: 4aae fffc tstl %fp@(-4) 454d8: 663a bnes 45514 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 454da: 2f00 movel %d0,%sp@- 454dc: 4879 0005 e420 pea 5e420 <_POSIX_Timer_Information> 454e2: 4eb9 0004 7004 jsr 47004 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 454e8: 7001 moveq #1,%d0 454ea: 1540 003c moveb %d0,%a2@(60) (void) _Watchdog_Remove( &ptimer->Timer ); 454ee: 486a 0010 pea %a2@(16) 454f2: 4eb9 0004 8c98 jsr 48c98 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 454f8: 2f0a movel %a2,%sp@- 454fa: 4879 0005 e420 pea 5e420 <_POSIX_Timer_Information> 45500: 4eb9 0004 7278 jsr 47278 <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 45506: 4eb9 0004 7b5a jsr 47b5a <_Thread_Enable_dispatch> return 0; 4550c: 4fef 0014 lea %sp@(20),%sp case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); ptimer->state = POSIX_TIMER_STATE_FREE; (void) _Watchdog_Remove( &ptimer->Timer ); _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 45510: 4280 clrl %d0 return 0; 45512: 600e bras 45522 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45514: 4eb9 0004 dc70 jsr 4dc70 <__errno> 4551a: 7216 moveq #22,%d1 4551c: 2040 moveal %d0,%a0 4551e: 70ff moveq #-1,%d0 45520: 2081 movel %d1,%a0@ } 45522: 246e fff8 moveal %fp@(-8),%a2 45526: 4e5e unlk %fp 45528: 4e75 rts ... 00045fc8 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 45fc8: 4e56 fffc linkw %fp,#-4 45fcc: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 45fce: 486e fffc pea %fp@(-4) 45fd2: 2f2e 0008 movel %fp@(8),%sp@- 45fd6: 4879 0005 f888 pea 5f888 <_POSIX_Timer_Information> 45fdc: 4eb9 0004 7e6c jsr 47e6c <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 45fe2: 4fef 000c lea %sp@(12),%sp 45fe6: 4aae fffc tstl %fp@(-4) 45fea: 6612 bnes 45ffe case OBJECTS_LOCAL: overrun = ptimer->overrun; 45fec: 2040 moveal %d0,%a0 45fee: 2428 0066 movel %a0@(102),%d2 ptimer->overrun = 0; 45ff2: 42a8 0066 clrl %a0@(102) _Thread_Enable_dispatch(); 45ff6: 4eb9 0004 85f6 jsr 485f6 <_Thread_Enable_dispatch> return overrun; 45ffc: 600e bras 4600c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45ffe: 4eb9 0004 e3e0 jsr 4e3e0 <__errno> 46004: 74ff moveq #-1,%d2 46006: 2040 moveal %d0,%a0 46008: 7016 moveq #22,%d0 4600a: 2080 movel %d0,%a0@ } 4600c: 2002 movel %d2,%d0 4600e: 242e fff8 movel %fp@(-8),%d2 46012: 4e5e unlk %fp 46014: 4e75 rts ... 00044d60 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 44d60: 4e56 ffe8 linkw %fp,#-24 44d64: 48d7 041c moveml %d2-%d4/%a2,%sp@ 44d68: 262e 0008 movel %fp@(8),%d3 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 44d6c: 4ab9 0005 ec76 tstl 5ec76 <_POSIX_signals_Ualarm_timer+0x1c> 44d72: 6622 bnes 44d96 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 44d74: 42b9 0005 ec62 clrl 5ec62 <_POSIX_signals_Ualarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 44d7a: 4282 clrl %d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44d7c: 203c 0004 4e4c movel #282188,%d0 the_watchdog->id = id; 44d82: 42b9 0005 ec7a clrl 5ec7a <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44d88: 23c0 0005 ec76 movel %d0,5ec76 <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 44d8e: 42b9 0005 ec7e clrl 5ec7e <_POSIX_signals_Ualarm_timer+0x24> 44d94: 6058 bras 44dee _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 44d96: 4879 0005 ec5a pea 5ec5a <_POSIX_signals_Ualarm_timer> 44d9c: 4eb9 0004 8330 jsr 48330 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 44da2: 588f addql #4,%sp 44da4: 7201 moveq #1,%d1 44da6: 5580 subql #2,%d0 44da8: b280 cmpl %d0,%d1 44daa: 6404 bccs 44db0 44dac: 4282 clrl %d2 <== NOT EXECUTED 44dae: 603e bras 44dee <== NOT EXECUTED * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 44db0: 2039 0005 ec6e movel 5ec6e <_POSIX_signals_Ualarm_timer+0x14>,%d0 44db6: d0b9 0005 ec66 addl 5ec66 <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 44dbc: 486e fff8 pea %fp@(-8) 44dc0: 90b9 0005 ec72 subl 5ec72 <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 44dc6: 283c 000f 4240 movel #1000000,%d4 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 44dcc: 2f00 movel %d0,%sp@- 44dce: 4eb9 0004 7e58 jsr 47e58 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 44dd4: 202e fff8 movel %fp@(-8),%d0 44dd8: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 44ddc: 283c 0000 03e8 movel #1000,%d4 44de2: 508f addql #8,%sp 44de4: 242e fffc movel %fp@(-4),%d2 44de8: 4c44 2802 remsl %d4,%d2,%d2 44dec: d480 addl %d0,%d2 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 44dee: 4a83 tstl %d3 44df0: 674e beqs 44e40 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44df2: 280e movel %fp,%d4 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 44df4: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44dfa: 5184 subql #8,%d4 44dfc: 45f9 0004 7edc lea 47edc <_Timespec_To_ticks>,%a2 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 44e02: 4c41 3000 remul %d1,%d0,%d3 44e06: 4c41 3003 remul %d1,%d3,%d3 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 44e0a: 223c 0000 03e8 movel #1000,%d1 44e10: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 44e14: 2f04 movel %d4,%sp@- */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 44e16: 2d41 fffc movel %d1,%fp@(-4) * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 44e1a: 2d43 fff8 movel %d3,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44e1e: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 44e20: 2f04 movel %d4,%sp@- 44e22: 4e92 jsr %a2@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44e24: 4879 0005 ec5a pea 5ec5a <_POSIX_signals_Ualarm_timer> 44e2a: 4879 0005 e50c pea 5e50c <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 44e30: 23c0 0005 ec66 movel %d0,5ec66 <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44e36: 4eb9 0004 8214 jsr 48214 <_Watchdog_Insert> 44e3c: 4fef 0010 lea %sp@(16),%sp } return remaining; } 44e40: 2002 movel %d2,%d0 44e42: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 44e48: 4e5e unlk %fp 44e4a: 4e75 rts 00044d54 : */ int uname( struct utsname *name ) { 44d54: 4e56 fff4 linkw %fp,#-12 44d58: 48d7 1c00 moveml %a2-%a4,%sp@ 44d5c: 246e 0008 moveal %fp@(8),%a2 release = 5.3 version = Generic_101318-12 machine = sun4m */ if ( !name ) 44d60: 4a8a tstl %a2 44d62: 6610 bnes 44d74 rtems_set_errno_and_return_minus_one( EFAULT ); 44d64: 4eb9 0004 d5a0 jsr 4d5a0 <__errno> 44d6a: 720e moveq #14,%d1 44d6c: 2040 moveal %d0,%a0 44d6e: 70ff moveq #-1,%d0 44d70: 2081 movel %d1,%a0@ 44d72: 6060 bras 44dd4 strcpy( name->sysname, "RTEMS" ); 44d74: 4879 0005 b35f pea 5b35f 44d7a: 47f9 0004 e470 lea 4e470 ,%a3 sprintf( name->nodename, "Node %" PRId16, _Objects_Local_node ); 44d80: 49f9 0004 e1e8 lea 4e1e8 ,%a4 */ if ( !name ) rtems_set_errno_and_return_minus_one( EFAULT ); strcpy( name->sysname, "RTEMS" ); 44d86: 2f0a movel %a2,%sp@- 44d88: 4e93 jsr %a3@ sprintf( name->nodename, "Node %" PRId16, _Objects_Local_node ); 44d8a: 4878 0001 pea 1 44d8e: 4879 0005 b365 pea 5b365 44d94: 486a 0020 pea %a2@(32) 44d98: 4e94 jsr %a4@ strcpy( name->release, RTEMS_VERSION ); 44d9a: 4879 0005 b36d pea 5b36d 44da0: 486a 0040 pea %a2@(64) 44da4: 4e93 jsr %a3@ strcpy( name->version, "" ); 44da6: 4879 0005 b35e pea 5b35e 44dac: 486a 0060 pea %a2@(96) 44db0: 4e93 jsr %a3@ sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME ); 44db2: 4fef 0020 lea %sp@(32),%sp 44db6: 2ebc 0005 b376 movel #373622,%sp@ 44dbc: 4879 0005 b382 pea 5b382 44dc2: 4879 0005 b394 pea 5b394 44dc8: 486a 0080 pea %a2@(128) 44dcc: 4e94 jsr %a4@ return 0; 44dce: 4fef 0010 lea %sp@(16),%sp strcpy( name->release, RTEMS_VERSION ); strcpy( name->version, "" ); sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME ); 44dd2: 4280 clrl %d0 return 0; } 44dd4: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 44dda: 4e5e unlk %fp 44ddc: 4e75 rts ... 0004c34c : #include int unlink( const char *path ) { 4c34c: 4e56 ffc0 linkw %fp,#-64 4c350: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4c354: 246e 0008 moveal %fp@(8),%a2 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4c358: 2f0a movel %a2,%sp@- 4c35a: 4eb9 0004 2128 jsr 42128 if ( parentpathlen == 0 ) 4c360: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4c362: 2a00 movel %d0,%d5 if ( parentpathlen == 0 ) 4c364: 664a bnes 4c3b0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4c366: 742f moveq #47,%d2 4c368: 1012 moveb %a2@,%d0 4c36a: 1200 moveb %d0,%d1 4c36c: 49c1 extbl %d1 4c36e: b481 cmpl %d1,%d2 4c370: 670c beqs 4c37e 4c372: 143c 005c moveb #92,%d2 4c376: b481 cmpl %d1,%d2 4c378: 6704 beqs 4c37e 4c37a: 4a00 tstb %d0 4c37c: 6612 bnes 4c390 4c37e: 4878 0014 pea 14 4c382: 2079 0005 b544 moveal 5b544 ,%a0 4c388: 41e8 0018 lea %a0@(24),%a0 4c38c: 2f08 movel %a0,%sp@- 4c38e: 600e bras 4c39e 4c390: 4878 0014 pea 14 4c394: 2039 0005 b544 movel 5b544 ,%d0 4c39a: 5880 addql #4,%d0 4c39c: 2f00 movel %d0,%sp@- 4c39e: 486e ffec pea %fp@(-20) 4c3a2: 4203 clrb %d3 4c3a4: 4eb9 0004 d23c jsr 4d23c 4c3aa: 4fef 000c lea %sp@(12),%sp 4c3ae: 6020 bras 4c3d0 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4c3b0: 42a7 clrl %sp@- 4c3b2: 486e ffec pea %fp@(-20) 4c3b6: 4878 0002 pea 2 4c3ba: 2f00 movel %d0,%sp@- 4c3bc: 2f0a movel %a2,%sp@- 4c3be: 4eb9 0004 223e jsr 4223e RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4c3c4: 4fef 0014 lea %sp@(20),%sp 4c3c8: 4a80 tstl %d0 4c3ca: 6600 015c bnew 4c528 4c3ce: 7601 moveq #1,%d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4c3d0: 4878 0014 pea 14 4c3d4: 280e movel %fp,%d4 4c3d6: 0684 ffff ffec addil #-20,%d4 4c3dc: 240e movel %fp,%d2 4c3de: 0682 ffff ffd8 addil #-40,%d2 name = path + parentpathlen; 4c3e4: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4c3e6: 47f9 0004 dde8 lea 4dde8 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4c3ec: 2f04 movel %d4,%sp@- 4c3ee: 2f02 movel %d2,%sp@- 4c3f0: 4eb9 0004 d23c jsr 4d23c name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4c3f6: 2f0a movel %a2,%sp@- 4c3f8: 4e93 jsr %a3@ 4c3fa: 2e80 movel %d0,%sp@ 4c3fc: 2f0a movel %a2,%sp@- 4c3fe: 4eb9 0004 20f0 jsr 420f0 4c404: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4c406: 2f0a movel %a2,%sp@- 4c408: 4e93 jsr %a3@ 4c40a: 4297 clrl %sp@ 4c40c: 2f02 movel %d2,%sp@- 4c40e: 42a7 clrl %sp@- 4c410: 2f00 movel %d0,%sp@- 4c412: 2f0a movel %a2,%sp@- 4c414: 4eb9 0004 216e jsr 4216e 0, &loc, false ); if ( result != 0 ) { 4c41a: 4fef 0028 lea %sp@(40),%sp 4c41e: 4a80 tstl %d0 4c420: 6722 beqs 4c444 if ( free_parentloc ) 4c422: 4a03 tstb %d3 4c424: 6700 0102 beqw 4c528 rtems_filesystem_freenode( &parentloc ); 4c428: 206e fff8 moveal %fp@(-8),%a0 4c42c: 4a88 tstl %a0 4c42e: 6700 00f8 beqw 4c528 4c432: 2068 001c moveal %a0@(28),%a0 4c436: 4a88 tstl %a0 4c438: 6700 00ee beqw 4c528 4c43c: 2f04 movel %d4,%sp@- 4c43e: 78ff moveq #-1,%d4 4c440: 6000 00e0 braw 4c522 return -1; } if ( !loc.ops->node_type_h ) { 4c444: 226e ffe4 moveal %fp@(-28),%a1 4c448: 2069 0010 moveal %a1@(16),%a0 4c44c: 4a88 tstl %a0 4c44e: 6606 bnes 4c456 rtems_filesystem_freenode( &loc ); 4c450: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4c454: 605c bras 4c4b2 <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 4c456: 2f02 movel %d2,%sp@- 4c458: 4e90 jsr %a0@ 4c45a: 206e ffe4 moveal %fp@(-28),%a0 4c45e: 588f addql #4,%sp 4c460: 7201 moveq #1,%d1 4c462: b280 cmpl %d0,%d1 4c464: 6640 bnes 4c4a6 rtems_filesystem_freenode( &loc ); 4c466: 4a88 tstl %a0 4c468: 670e beqs 4c478 4c46a: 2068 001c moveal %a0@(28),%a0 4c46e: 4a88 tstl %a0 4c470: 6706 beqs 4c478 4c472: 2f02 movel %d2,%sp@- 4c474: 4e90 jsr %a0@ 4c476: 588f addql #4,%sp if ( free_parentloc ) 4c478: 4a03 tstb %d3 4c47a: 6718 beqs 4c494 rtems_filesystem_freenode( &parentloc ); 4c47c: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4c480: 4a88 tstl %a0 <== NOT EXECUTED 4c482: 6710 beqs 4c494 <== NOT EXECUTED 4c484: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c488: 4a88 tstl %a0 <== NOT EXECUTED 4c48a: 6708 beqs 4c494 <== NOT EXECUTED 4c48c: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4c490: 4e90 jsr %a0@ <== NOT EXECUTED 4c492: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4c494: 4eb9 0004 ca1c jsr 4ca1c <__errno> 4c49a: 78ff moveq #-1,%d4 4c49c: 2040 moveal %d0,%a0 4c49e: 7015 moveq #21,%d0 4c4a0: 2080 movel %d0,%a0@ 4c4a2: 6000 0086 braw 4c52a } if ( !loc.ops->unlink_h ) { 4c4a6: 2268 000c moveal %a0@(12),%a1 4c4aa: 4a89 tstl %a1 4c4ac: 663c bnes 4c4ea rtems_filesystem_freenode( &loc ); 4c4ae: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c4b2: 4a88 tstl %a0 <== NOT EXECUTED 4c4b4: 6706 beqs 4c4bc <== NOT EXECUTED 4c4b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c4b8: 4e90 jsr %a0@ <== NOT EXECUTED 4c4ba: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4c4bc: 4a03 tstb %d3 <== NOT EXECUTED 4c4be: 6718 beqs 4c4d8 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4c4c0: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4c4c4: 4a88 tstl %a0 <== NOT EXECUTED 4c4c6: 6710 beqs 4c4d8 <== NOT EXECUTED 4c4c8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c4cc: 4a88 tstl %a0 <== NOT EXECUTED 4c4ce: 6708 beqs 4c4d8 <== NOT EXECUTED 4c4d0: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4c4d4: 4e90 jsr %a0@ <== NOT EXECUTED 4c4d6: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4c4d8: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 4c4de: 78ff moveq #-1,%d4 <== NOT EXECUTED 4c4e0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c4e2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4c4e8: 6040 bras 4c52a <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4c4ea: 2f02 movel %d2,%sp@- 4c4ec: 2f04 movel %d4,%sp@- 4c4ee: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 4c4f0: 206e ffe4 moveal %fp@(-28),%a0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4c4f4: 2800 movel %d0,%d4 rtems_filesystem_freenode( &loc ); 4c4f6: 508f addql #8,%sp 4c4f8: 4a88 tstl %a0 4c4fa: 670e beqs 4c50a 4c4fc: 2068 001c moveal %a0@(28),%a0 4c500: 4a88 tstl %a0 4c502: 6706 beqs 4c50a 4c504: 2f02 movel %d2,%sp@- 4c506: 4e90 jsr %a0@ 4c508: 588f addql #4,%sp if ( free_parentloc ) 4c50a: 4a03 tstb %d3 4c50c: 671c beqs 4c52a rtems_filesystem_freenode( &parentloc ); 4c50e: 206e fff8 moveal %fp@(-8),%a0 4c512: 4a88 tstl %a0 4c514: 6714 beqs 4c52a 4c516: 2068 001c moveal %a0@(28),%a0 4c51a: 4a88 tstl %a0 4c51c: 670c beqs 4c52a 4c51e: 486e ffec pea %fp@(-20) 4c522: 4e90 jsr %a0@ 4c524: 588f addql #4,%sp 4c526: 6002 bras 4c52a 4c528: 78ff moveq #-1,%d4 <== NOT EXECUTED return result; } 4c52a: 2004 movel %d4,%d0 4c52c: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 4c532: 4e5e unlk %fp 4c534: 4e75 rts 00061d4e : */ int unmount( const char *path ) { 61d4e: 4e56 ffec linkw %fp,#-20 61d52: 2f0a movel %a2,%sp@- 61d54: 246e 0008 moveal %fp@(8),%a2 61d58: 2f02 movel %d2,%sp@- * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 61d5a: 240e movel %fp,%d2 61d5c: 0682 ffff ffec addil #-20,%d2 61d62: 2f0a movel %a2,%sp@- 61d64: 4eb9 0007 c05c jsr 7c05c 61d6a: 7201 moveq #1,%d1 61d6c: 2e81 movel %d1,%sp@ 61d6e: 2f02 movel %d2,%sp@- 61d70: 42a7 clrl %sp@- 61d72: 2f00 movel %d0,%sp@- 61d74: 2f0a movel %a2,%sp@- 61d76: 4eb9 0004 5772 jsr 45772 61d7c: 4fef 0014 lea %sp@(20),%sp 61d80: 4a80 tstl %d0 61d82: 6600 011c bnew 61ea0 return -1; mt_entry = loc.mt_entry; 61d86: 246e fffc moveal %fp@(-4),%a2 61d8a: 206e fff8 moveal %fp@(-8),%a0 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 61d8e: 202e ffec movel %fp@(-20),%d0 61d92: b0aa 001c cmpl %a2@(28),%d0 61d96: 6724 beqs 61dbc /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 61d98: 4a88 tstl %a0 61d9a: 670e beqs 61daa 61d9c: 2068 001c moveal %a0@(28),%a0 61da0: 4a88 tstl %a0 61da2: 6706 beqs 61daa 61da4: 2f02 movel %d2,%sp@- 61da6: 4e90 jsr %a0@ 61da8: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 61daa: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 61db0: 740d moveq #13,%d2 61db2: 72ff moveq #-1,%d1 61db4: 2040 moveal %d0,%a0 61db6: 2082 movel %d2,%a0@ 61db8: 6000 00e8 braw 61ea2 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 61dbc: 4a88 tstl %a0 61dbe: 670e beqs 61dce 61dc0: 2068 001c moveal %a0@(28),%a0 61dc4: 4a88 tstl %a0 61dc6: 6706 beqs 61dce 61dc8: 2f02 movel %d2,%sp@- 61dca: 4e90 jsr %a0@ 61dcc: 588f addql #4,%sp if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 61dce: 206a 0014 moveal %a2@(20),%a0 61dd2: 4aa8 0028 tstl %a0@(40) 61dd6: 670a beqs 61de2 fs_root_loc = &mt_entry->mt_fs_root; 61dd8: 206a 0028 moveal %a2@(40),%a0 61ddc: 4aa8 002c tstl %a0@(44) 61de0: 6614 bnes 61df6 if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 61de2: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 61de8: 72ff moveq #-1,%d1 <== NOT EXECUTED 61dea: 2040 moveal %d0,%a0 <== NOT EXECUTED 61dec: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61df2: 6000 00ae braw 61ea2 <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 61df6: 2079 0009 717c moveal 9717c ,%a0 61dfc: b5e8 0014 cmpal %a0@(20),%a2 61e00: 6720 beqs 61e22 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 61e02: 2079 0009 bb60 moveal 9bb60 ,%a0 61e08: 600c bras 61e16 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 61e0a: 202a 002c movel %a2@(44),%d0 61e0e: b0a8 0018 cmpl %a0@(24),%d0 61e12: 670e beqs 61e22 * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 61e14: 2050 moveal %a0@,%a0 61e16: b1fc 0009 bb64 cmpal #637796,%a0 61e1c: 66ec bnes 61e0a 61e1e: 6000 0090 braw 61eb0 * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 61e22: 4eb9 0007 5fb4 jsr 75fb4 <__errno> 61e28: 72ff moveq #-1,%d1 61e2a: 2040 moveal %d0,%a0 61e2c: 7010 moveq #16,%d0 61e2e: 2080 movel %d0,%a0@ 61e30: 6070 bras 61ea2 * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 61e32: 206a 0014 moveal %a2@(20),%a0 61e36: 2f0a movel %a2,%sp@- 61e38: 2068 0028 moveal %a0@(40),%a0 61e3c: 4e90 jsr %a0@ 61e3e: 588f addql #4,%sp 61e40: 4a80 tstl %d0 61e42: 665c bnes 61ea0 * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 61e44: 206a 0028 moveal %a2@(40),%a0 61e48: 2f0a movel %a2,%sp@- 61e4a: 2068 002c moveal %a0@(44),%a0 61e4e: 4e90 jsr %a0@ 61e50: 588f addql #4,%sp 61e52: 4a80 tstl %d0 61e54: 671a beqs 61e70 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 61e56: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 61e5a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 61e5c: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 61e60: 4e90 jsr %a0@ <== NOT EXECUTED 61e62: 588f addql #4,%sp <== NOT EXECUTED 61e64: 4a80 tstl %d0 <== NOT EXECUTED 61e66: 6738 beqs 61ea0 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 61e68: 42a7 clrl %sp@- <== NOT EXECUTED 61e6a: 4eb9 0004 9764 jsr 49764 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 61e70: 2f0a movel %a2,%sp@- 61e72: 4eb9 0004 9ab0 jsr 49ab0 <_Chain_Extract> /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 61e78: 206a 0014 moveal %a2@(20),%a0 61e7c: 588f addql #4,%sp 61e7e: 4a88 tstl %a0 61e80: 6710 beqs 61e92 61e82: 2068 001c moveal %a0@(28),%a0 61e86: 4a88 tstl %a0 61e88: 6708 beqs 61e92 61e8a: 486a 0008 pea %a2@(8) 61e8e: 4e90 jsr %a0@ 61e90: 588f addql #4,%sp free( mt_entry ); 61e92: 2f0a movel %a2,%sp@- 61e94: 4eb9 0004 583c jsr 4583c return 0; 61e9a: 588f addql #4,%sp * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); 61e9c: 4281 clrl %d1 return 0; 61e9e: 6002 bras 61ea2 61ea0: 72ff moveq #-1,%d1 } 61ea2: 242e ffe4 movel %fp@(-28),%d2 61ea6: 2001 movel %d1,%d0 61ea8: 246e ffe8 moveal %fp@(-24),%a2 61eac: 4e5e unlk %fp 61eae: 4e75 rts * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 61eb0: 2f0a movel %a2,%sp@- 61eb2: 4eb9 0004 5ad2 jsr 45ad2 61eb8: 588f addql #4,%sp 61eba: 7201 moveq #1,%d1 61ebc: b280 cmpl %d0,%d1 61ebe: 6600 ff72 bnew 61e32 61ec2: 6000 ff5e braw 61e22 ... 00061ec8 : int utime( const char *path, const struct utimbuf *times ) { 61ec8: 4e56 ffe0 linkw %fp,#-32 61ecc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 61ed0: 262e 0008 movel %fp@(8),%d3 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 61ed4: 240e movel %fp,%d2 61ed6: 0682 ffff ffec addil #-20,%d2 61edc: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 61ede: 246e 000c moveal %fp@(12),%a2 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 61ee2: 4eb9 0007 c05c jsr 7c05c 61ee8: 7201 moveq #1,%d1 61eea: 2e81 movel %d1,%sp@ 61eec: 2f02 movel %d2,%sp@- 61eee: 42a7 clrl %sp@- 61ef0: 2f00 movel %d0,%sp@- 61ef2: 2f03 movel %d3,%sp@- 61ef4: 4eb9 0004 5772 jsr 45772 61efa: 4fef 0014 lea %sp@(20),%sp 61efe: 4a80 tstl %d0 61f00: 6704 beqs 61f06 61f02: 76ff moveq #-1,%d3 61f04: 6052 bras 61f58 return -1; if ( !temp_loc.ops->utime_h ){ 61f06: 226e fff8 moveal %fp@(-8),%a1 61f0a: 2069 0030 moveal %a1@(48),%a0 61f0e: 4a88 tstl %a0 61f10: 6620 bnes 61f32 rtems_filesystem_freenode( &temp_loc ); 61f12: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 61f16: 4a88 tstl %a0 <== NOT EXECUTED 61f18: 6706 beqs 61f20 <== NOT EXECUTED 61f1a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61f1c: 4e90 jsr %a0@ <== NOT EXECUTED 61f1e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61f20: 4eb9 0007 5fb4 jsr 75fb4 <__errno> <== NOT EXECUTED 61f26: 76ff moveq #-1,%d3 <== NOT EXECUTED 61f28: 2040 moveal %d0,%a0 <== NOT EXECUTED 61f2a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61f30: 6026 bras 61f58 <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 61f32: 2f2a 0004 movel %a2@(4),%sp@- 61f36: 2f12 movel %a2@,%sp@- 61f38: 2f02 movel %d2,%sp@- 61f3a: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 61f3c: 206e fff8 moveal %fp@(-8),%a0 if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 61f40: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 61f42: 4fef 000c lea %sp@(12),%sp 61f46: 4a88 tstl %a0 61f48: 670e beqs 61f58 61f4a: 2068 001c moveal %a0@(28),%a0 61f4e: 4a88 tstl %a0 61f50: 6706 beqs 61f58 61f52: 2f02 movel %d2,%sp@- 61f54: 4e90 jsr %a0@ 61f56: 588f addql #4,%sp return result; } 61f58: 2003 movel %d3,%d0 61f5a: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 61f60: 4e5e unlk %fp 61f62: 4e75 rts 000450a0 : #include pid_t vfork(void) { return -1; } 450a0: 70ff moveq #-1,%d0 #include #include pid_t vfork(void) { 450a2: 4e56 0000 linkw %fp,#0 return -1; } 450a6: 4e5e unlk %fp 450a8: 4e75 rts ... 000446b4 : */ void vprintk( const char *fmt, va_list ap ) { 446b4: 4e56 ffc4 linkw %fp,#-60 446b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 446bc: 246e 0008 moveal %fp@(8),%a2 unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 446c0: 4bee ffec lea %fp@(-20),%a5 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 446c4: 2a3c 0005 a37f movel #369535,%d5 */ void vprintk( const char *fmt, va_list ap ) { 446ca: 266e 000c moveal %fp@(12),%a3 for (; *fmt != '\0'; fmt++) { 446ce: 6000 0218 braw 448e8 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 446d2: 49c0 extbl %d0 446d4: 7225 moveq #37,%d1 446d6: b280 cmpl %d0,%d1 446d8: 6706 beqs 446e0 BSP_output_char(*fmt); 446da: 2f00 movel %d0,%sp@- 446dc: 6000 0150 braw 4482e continue; } fmt++; 446e0: 528a addql #1,%a2 if (*fmt == '0' ) { 446e2: 7630 moveq #48,%d3 446e4: 1012 moveb %a2@,%d0 446e6: 49c0 extbl %d0 446e8: b680 cmpl %d0,%d3 446ea: 6704 beqs 446f0 446ec: 7e20 moveq #32,%d7 446ee: 6004 bras 446f4 lead = '0'; fmt++; 446f0: 528a addql #1,%a2 446f2: 7e30 moveq #48,%d7 } if (*fmt == '-' ) { 446f4: 782d moveq #45,%d4 446f6: 1012 moveb %a2@,%d0 446f8: 49c0 extbl %d0 446fa: b880 cmpl %d0,%d4 446fc: 6704 beqs 44702 446fe: 4206 clrb %d6 44700: 6004 bras 44706 minus = true; fmt++; 44702: 528a addql #1,%a2 44704: 7c01 moveq #1,%d6 44706: 4282 clrl %d2 44708: 6008 bras 44712 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); fmt++; 4470a: 528a addql #1,%a2 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); 4470c: 41f0 08d0 lea %a0@(ffffffd0,%d0:l),%a0 44710: 2408 movel %a0,%d2 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 44712: 2002 movel %d2,%d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44714: 7809 moveq #9,%d4 44716: 1212 moveb %a2@,%d1 width *= 10; 44718: e788 lsll #3,%d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4471a: 2601 movel %d1,%d3 width *= 10; 4471c: 2040 moveal %d0,%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4471e: 0683 ffff ffd0 addil #-48,%d3 44724: 1001 moveb %d1,%d0 44726: 0283 0000 00ff andil #255,%d3 width *= 10; 4472c: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0 44730: 49c0 extbl %d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44732: b883 cmpl %d3,%d4 44734: 64d4 bccs 4470a width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 44736: 766c moveq #108,%d3 44738: b680 cmpl %d0,%d3 4473a: 6604 bnes 44740 lflag = true; c = *++fmt; 4473c: 528a addql #1,%a2 4473e: 1212 moveb %a2@,%d1 } if ( c == 'c' ) { 44740: 7663 moveq #99,%d3 44742: 1001 moveb %d1,%d0 44744: 49c0 extbl %d0 44746: b680 cmpl %d0,%d3 44748: 660c bnes 44756 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); 4474a: 2013 movel %a3@,%d0 4474c: 49c0 extbl %d0 lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 4474e: 588b addql #4,%a3 BSP_output_char(chr); 44750: 2f00 movel %d0,%sp@- 44752: 6000 00da braw 4482e continue; } if ( c == 's' ) { 44756: 7673 moveq #115,%d3 44758: b680 cmpl %d0,%d3 4475a: 6676 bnes 447d2 unsigned i, len; char *s, *str; str = va_arg(ap, char *); 4475c: 2853 moveal %a3@,%a4 4475e: 588b addql #4,%a3 if ( str == NULL ) { 44760: 4a8c tstl %a4 44762: 6606 bnes 4476a 44764: 49f9 0005 a37e lea 5a37e ,%a4 4476a: 4283 clrl %d3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 4476c: 6002 bras 44770 4476e: 5283 addql #1,%d3 44770: 4a34 3800 tstb %a4@(00000000,%d3:l) 44774: 66f8 bnes 4476e ; /* leading spaces */ if ( !minus ) 44776: 4a06 tstb %d6 44778: 6618 bnes 44792 4477a: 2803 movel %d3,%d4 4477c: 6010 bras 4478e for ( i=len ; i <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i,%a0 <== NOT EXECUTED 4478a: 4e90 jsr %a0@ <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { 44792: 4a82 tstl %d2 44794: 6602 bnes 44798 44796: 2403 movel %d3,%d2 width = len; } /* output the string */ for ( i=0 ; i 4479c: 600e bras 447ac BSP_output_char(*str); 4479e: 49c0 extbl %d0 447a0: 2079 0005 b52c moveal 5b52c ,%a0 447a6: 2f00 movel %d0,%sp@- 447a8: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 447b2: 4a06 tstb %d6 447b4: 6700 0130 beqw 448e6 447b8: 6010 bras 447ca for ( i=len ; i for ( i=0 ; i,%a0 447c6: 4e90 jsr %a0@ for ( i=0 ; i 447ce: 6000 0116 braw 448e6 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 447d2: 766f moveq #111,%d3 447d4: b680 cmpl %d0,%d3 447d6: 6764 beqs 4483c 447d8: 163c 004f moveb #79,%d3 447dc: b680 cmpl %d0,%d3 447de: 675c beqs 4483c base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 447e0: 163c 0069 moveb #105,%d3 447e4: b680 cmpl %d0,%d3 447e6: 6758 beqs 44840 447e8: 163c 0049 moveb #73,%d3 447ec: b680 cmpl %d0,%d3 447ee: 6750 beqs 44840 447f0: 163c 0064 moveb #100,%d3 447f4: b680 cmpl %d0,%d3 447f6: 6748 beqs 44840 447f8: 163c 0044 moveb #68,%d3 447fc: b680 cmpl %d0,%d3 447fe: 6740 beqs 44840 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 44800: 163c 0075 moveb #117,%d3 44804: b680 cmpl %d0,%d3 44806: 673e beqs 44846 44808: 163c 0055 moveb #85,%d3 4480c: b680 cmpl %d0,%d3 4480e: 6736 beqs 44846 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 44810: 49c1 extbl %d1 44812: 7078 moveq #120,%d0 44814: b081 cmpl %d1,%d0 44816: 6732 beqs 4484a 44818: 163c 0058 moveb #88,%d3 4481c: b681 cmpl %d1,%d3 4481e: 672a beqs 4484a base = 16; sign = false; } else if ( c == 'p' ) { 44820: 7870 moveq #112,%d4 44822: b881 cmpl %d1,%d4 44824: 6606 bnes 4482c 44826: 163c 0010 moveb #16,%d3 4482a: 6020 bras 4484c base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 4482c: 2f01 movel %d1,%sp@- 4482e: 2079 0005 b52c moveal 5b52c ,%a0 44834: 4e90 jsr %a0@ continue; 44836: 588f addql #4,%sp 44838: 6000 00ac braw 448e6 4483c: 7608 moveq #8,%d3 <== NOT EXECUTED 4483e: 600c bras 4484c <== NOT EXECUTED 44840: 760a moveq #10,%d3 44842: 7201 moveq #1,%d1 44844: 6008 bras 4484e 44846: 760a moveq #10,%d3 44848: 6002 bras 4484c 4484a: 7610 moveq #16,%d3 4484c: 4201 clrb %d1 4484e: 200b movel %a3,%d0 44850: 5880 addql #4,%d0 } printNum( 44852: 1c07 moveb %d7,%d6 44854: 2813 movel %a3@,%d4 44856: 49c6 extbl %d6 44858: 2640 moveal %d0,%a3 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 4485a: 4a01 tstb %d1 4485c: 671e beqs 4487c 4485e: 4a84 tstl %d4 44860: 6c1a bges 4487c BSP_output_char('-'); 44862: 4878 002d pea 2d <== NOT EXECUTED 44866: 2079 0005 b52c moveal 5b52c ,%a0 <== NOT EXECUTED 4486c: 4e90 jsr %a0@ <== NOT EXECUTED unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 4486e: 588f addql #4,%sp <== NOT EXECUTED unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 44870: 2004 movel %d4,%d0 <== NOT EXECUTED 44872: 4480 negl %d0 <== NOT EXECUTED if (maxwidth) maxwidth--; 44874: 4a82 tstl %d2 <== NOT EXECUTED 44876: 6706 beqs 4487e <== NOT EXECUTED 44878: 5382 subql #1,%d2 <== NOT EXECUTED 4487a: 6002 bras 4487e <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; 4487c: 2004 movel %d4,%d0 4487e: 99cc subal %a4,%a4 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 44880: 3243 moveaw %d3,%a1 44882: 600e bras 44892 44884: 9088 subl %a0,%d0 44886: 2040 moveal %d0,%a0 44888: 2001 movel %d1,%d0 4488a: 3e08 movew %a0,%d7 4488c: 1b87 c800 moveb %d7,%a5@(00000000,%a4:l) 44890: 2844 moveal %d4,%a4 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 44892: 2200 movel %d0,%d1 44894: 280c movel %a4,%d4 44896: 5284 addql #1,%d4 44898: 4c43 1001 remul %d3,%d1,%d1 toPrint[count++] = (char) (unsigned_num - (n * base)); 4489c: 3e09 movew %a1,%d7 4489e: cfc1 mulsw %d1,%d7 448a0: 3047 moveaw %d7,%a0 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 448a2: 4a81 tstl %d1 448a4: 66de bnes 44884 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 448a6: 1d80 c8ec moveb %d0,%fp@(ffffffec,%a4:l) 448aa: 600e bras 448ba for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 448ac: 2f06 movel %d6,%sp@- 448ae: 2079 0005 b52c moveal 5b52c ,%a0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 448b4: 5382 subql #1,%d2 BSP_output_char(lead); 448b6: 4e90 jsr %a0@ toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 448b8: 588f addql #4,%sp 448ba: b882 cmpl %d2,%d4 448bc: 65ee bcss 448ac 448be: 49f5 c800 lea %a5@(00000000,%a4:l),%a4 448c2: 4282 clrl %d2 448c4: 601c bras 448e2 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 448c6: 2045 moveal %d5,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 448c8: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 448ca: 1014 moveb %a4@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 448cc: 538c subql #1,%a4 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 448ce: 49c0 extbl %d0 448d0: 1030 0800 moveb %a0@(00000000,%d0:l),%d0 448d4: 2079 0005 b52c moveal 5b52c ,%a0 448da: 49c0 extbl %d0 448dc: 2f00 movel %d0,%sp@- 448de: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 448e0: 588f addql #4,%sp 448e2: b882 cmpl %d2,%d4 448e4: 62e0 bhis 448c6 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 448e6: 528a addql #1,%a2 448e8: 1012 moveb %a2@,%d0 448ea: 6600 fde6 bnew 446d2 sign, width, lead ); } } 448ee: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 448f4: 4e5e unlk %fp 448f6: 4e75 rts 000450ac : #include int wait( int *stat_loc ) { 450ac: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 450b0: 4eb9 0004 d430 jsr 4d430 <__errno> 450b6: 7258 moveq #88,%d1 450b8: 2040 moveal %d0,%a0 } 450ba: 70ff moveq #-1,%d0 450bc: 4e5e unlk %fp int wait( int *stat_loc ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 450be: 2081 movel %d1,%a0@ } 450c0: 4e75 rts ... 000450c4 : int waitpid( pid_t pid, int *stat_loc, int options ) { 450c4: 4e56 0000 linkw %fp,#0 rtems_set_errno_and_return_minus_one( ENOSYS ); 450c8: 4eb9 0004 d430 jsr 4d430 <__errno> 450ce: 7258 moveq #88,%d1 450d0: 2040 moveal %d0,%a0 } 450d2: 70ff moveq #-1,%d0 450d4: 4e5e unlk %fp pid_t pid, int *stat_loc, int options ) { rtems_set_errno_and_return_minus_one( ENOSYS ); 450d6: 2081 movel %d1,%a0@ } 450d8: 4e75 rts ... 00059620 : ssize_t write( int fd, const void *buffer, size_t count ) { 59620: 4e56 fff4 linkw %fp,#-12 59624: 202e 000c movel %fp@(12),%d0 59628: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5962c: 242e 0008 movel %fp@(8),%d2 59630: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 59634: b4b9 0005 b434 cmpl 5b434 ,%d2 5963a: 6414 bccs 59650 iop = rtems_libio_iop( fd ); 5963c: 2479 0005 cb34 moveal 5cb34 ,%a2 59642: ed8a lsll #6,%d2 59644: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 59646: 242a 0014 movel %a2@(20),%d2 5964a: 0802 0008 btst #8,%d2 5964e: 6610 bnes 59660 59650: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 59656: 7409 moveq #9,%d2 <== NOT EXECUTED 59658: 72ff moveq #-1,%d1 <== NOT EXECUTED 5965a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5965c: 2082 movel %d2,%a0@ <== NOT EXECUTED 5965e: 605e bras 596be <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 59660: 4a80 tstl %d0 59662: 6708 beqs 5966c rtems_libio_check_count( count ); 59664: 4a81 tstl %d1 59666: 6756 beqs 596be rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 59668: 44c2 movew %d2,%ccr 5966a: 6710 beqs 5967c 5966c: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 59672: 72ff moveq #-1,%d1 <== NOT EXECUTED 59674: 2040 moveal %d0,%a0 <== NOT EXECUTED 59676: 7016 moveq #22,%d0 <== NOT EXECUTED 59678: 2080 movel %d0,%a0@ <== NOT EXECUTED 5967a: 6042 bras 596be <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 5967c: 206a 003c moveal %a2@(60),%a0 59680: 2068 000c moveal %a0@(12),%a0 59684: 4a88 tstl %a0 59686: 6612 bnes 5969a rtems_set_errno_and_return_minus_one( ENOTSUP ); 59688: 4eb9 0004 ca1c jsr 4ca1c <__errno> <== NOT EXECUTED 5968e: 72ff moveq #-1,%d1 <== NOT EXECUTED 59690: 2040 moveal %d0,%a0 <== NOT EXECUTED 59692: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 59698: 6024 bras 596be <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 5969a: 2f01 movel %d1,%sp@- 5969c: 2f00 movel %d0,%sp@- 5969e: 2f0a movel %a2,%sp@- 596a0: 4e90 jsr %a0@ if ( rc > 0 ) 596a2: 4fef 000c lea %sp@(12),%sp */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 596a6: 2200 movel %d0,%d1 if ( rc > 0 ) 596a8: 6f14 bles 596be iop->offset += rc; 596aa: 2600 movel %d0,%d3 596ac: 5bc2 smi %d2 596ae: 49c2 extbl %d2 596b0: d7aa 0010 addl %d3,%a2@(16) 596b4: 202a 000c movel %a2@(12),%d0 596b8: d182 addxl %d2,%d0 596ba: 2540 000c movel %d0,%a2@(12) return rc; } 596be: 2001 movel %d1,%d0 596c0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 596c6: 4e5e unlk %fp 596c8: 4e75 rts ... 00045f08 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 45f08: 4e56 ffe4 linkw %fp,#-28 45f0c: 202e 0008 movel %fp@(8),%d0 45f10: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 45f14: 266e 000c moveal %fp@(12),%a3 45f18: 262e 0010 movel %fp@(16),%d3 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 45f1c: b0b9 0005 ec64 cmpl 5ec64 ,%d0 45f22: 6414 bccs 45f38 iop = rtems_libio_iop( fd ); 45f24: 2479 0006 0b38 moveal 60b38 ,%a2 45f2a: ed88 lsll #6,%d0 45f2c: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 45f2e: 202a 0014 movel %a2@(20),%d0 45f32: 0800 0008 btst #8,%d0 45f36: 6612 bnes 45f4a 45f38: 4eb9 0004 ead8 jsr 4ead8 <__errno> 45f3e: 74ff moveq #-1,%d2 45f40: 7209 moveq #9,%d1 45f42: 2040 moveal %d0,%a0 45f44: 2081 movel %d1,%a0@ 45f46: 6000 00ce braw 46016 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 45f4a: 44c0 movew %d0,%ccr 45f4c: 665c bnes 45faa /* * Argument validation on IO vector */ if ( !iov ) 45f4e: 4a8b tstl %a3 45f50: 6758 beqs 45faa rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 45f52: 4a83 tstl %d3 45f54: 6f54 bles 45faa rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 45f56: 0c83 0000 0400 cmpil #1024,%d3 45f5c: 6e4c bgts 45faa rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 45f5e: 206a 003c moveal %a2@(60),%a0 45f62: 4aa8 000c tstl %a0@(12) 45f66: 6614 bnes 45f7c rtems_set_errno_and_return_minus_one( ENOTSUP ); 45f68: 4eb9 0004 ead8 jsr 4ead8 <__errno> <== NOT EXECUTED 45f6e: 74ff moveq #-1,%d2 <== NOT EXECUTED 45f70: 2040 moveal %d0,%a0 <== NOT EXECUTED 45f72: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 45f78: 6000 009c braw 46016 <== NOT EXECUTED 45f7c: 204b moveal %a3,%a0 45f7e: 4281 clrl %d1 45f80: 4280 clrl %d0 45f82: 7801 moveq #1,%d4 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 45f84: 5281 addql #1,%d1 if ( !iov[v].iov_base ) 45f86: 4a90 tstl %a0@ 45f88: 6720 beqs 45faa rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 45f8a: 2268 0004 moveal %a0@(4),%a1 45f8e: 4a89 tstl %a1 45f90: 57c2 seq %d2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 45f92: 43f1 0800 lea %a1@(00000000,%d0:l),%a1 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 45f96: 5088 addql #8,%a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 45f98: c484 andl %d4,%d2 45f9a: 1802 moveb %d2,%d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 45f9c: b089 cmpl %a1,%d0 45f9e: 6e0a bgts 45faa * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 45fa0: 2009 movel %a1,%d0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 45fa2: b3fc 0000 7fff cmpal #32767,%a1 45fa8: 6f10 bles 45fba rtems_set_errno_and_return_minus_one( EINVAL ); 45faa: 4eb9 0004 ead8 jsr 4ead8 <__errno> 45fb0: 74ff moveq #-1,%d2 45fb2: 2040 moveal %d0,%a0 45fb4: 7016 moveq #22,%d0 45fb6: 2080 movel %d0,%a0@ 45fb8: 605c bras 46016 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 45fba: b681 cmpl %d1,%d3 45fbc: 6ec6 bgts 45f84 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 45fbe: 4a02 tstb %d2 45fc0: 6704 beqs 45fc6 45fc2: 4282 clrl %d2 45fc4: 6050 bras 46016 45fc6: 588b addql #4,%a3 45fc8: 4284 clrl %d4 45fca: 4282 clrl %d2 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 45fcc: 2013 movel %a3@,%d0 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 45fce: 5284 addql #1,%d4 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 45fd0: 4a80 tstl %d0 45fd2: 673c beqs 46010 continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 45fd4: 206a 003c moveal %a2@(60),%a0 45fd8: 2f00 movel %d0,%sp@- 45fda: 2f2b fffc movel %a3@(-4),%sp@- 45fde: 2f0a movel %a2,%sp@- 45fe0: 2068 000c moveal %a0@(12),%a0 45fe4: 4e90 jsr %a0@ if ( bytes < 0 ) 45fe6: 4fef 000c lea %sp@(12),%sp 45fea: 4a80 tstl %d0 45fec: 6c04 bges 45ff2 45fee: 74ff moveq #-1,%d2 <== NOT EXECUTED 45ff0: 6024 bras 46016 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 45ff2: 4a80 tstl %d0 45ff4: 6716 beqs 4600c iop->offset += bytes; total += bytes; 45ff6: d480 addl %d0,%d2 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 45ff8: 2c00 movel %d0,%d6 45ffa: 5bc5 smi %d5 45ffc: 49c5 extbl %d5 45ffe: ddaa 0010 addl %d6,%a2@(16) 46002: 222a 000c movel %a2@(12),%d1 46006: d385 addxl %d5,%d1 46008: 2541 000c movel %d1,%a2@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 4600c: b093 cmpl %a3@,%d0 4600e: 6606 bnes 46016 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46010: 508b addql #8,%a3 46012: b684 cmpl %d4,%d3 46014: 6eb6 bgts 45fcc if (bytes != iov[ v ].iov_len) break; } return total; } 46016: 2002 movel %d2,%d0 46018: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4601e: 4e5e unlk %fp 46020: 4e75 rts ...