0004931c <IMFS_Set_handlers>: { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) {
4931c: 7007 moveq #7,%d0
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
4931e: 4e56 0000 linkw %fp,#0 49322: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
49326: 2268 0010 moveal %a0@(16),%a1
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
4932a: 2f0a movel %a2,%sp@-
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
4932c: 2469 0034 moveal %a1@(52),%a2
switch( node->type ) {
49330: 2250 moveal %a0@,%a1 49332: b0a9 0048 cmpl %a1@(72),%d0
49336: 6526 bcss 4935e <IMFS_Set_handlers+0x42> <== NEVER TAKEN
49338: 2029 0048 movel %a1@(72),%d0 4933c: d080 addl %d0,%d0 4933e: 303b 0808 movew %pc@(49348 <IMFS_Set_handlers+0x2c>,%d0:l),%d0 49342: 48c0 extl %d0 49344: 4efb 0802 jmp %pc@(49348 <IMFS_Set_handlers+0x2c>,%d0:l)
49348: 0016 026 <== NOT EXECUTED 4934a: 0010 020 <== NOT EXECUTED 4934c: 0050 0120 <== NOT EXECUTED 4934e: 002c 054 <== NOT EXECUTED 49350: 002c 054 <== NOT EXECUTED 49352: 001e 036 <== NOT EXECUTED 49354: 001e 036 <== NOT EXECUTED 49356: 003e 076 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
49358: 216a 000c 0008 movel %a2@(12),%a0@(8)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
4935e: 245f moveal %sp@+,%a2 49360: 4280 clrl %d0 49362: 4e5e unlk %fp 49364: 4e75 rts 49366: 4280 clrl %d0
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
49368: 216a 0008 0008 movel %a2@(8),%a0@(8)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
4936e: 245f moveal %sp@+,%a2 49370: 4e5e unlk %fp 49372: 4e75 rts 49374: 245f moveal %sp@+,%a2
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
49376: 203c 0005 b5d4 movel #374228,%d0
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
4937c: 4e5e unlk %fp
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
4937e: 2140 0008 movel %d0,%a0@(8)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
49382: 4280 clrl %d0 49384: 4e75 rts 49386: 245f moveal %sp@+,%a2
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
49388: 203c 0005 b4f8 movel #374008,%d0
break;
}
return 0;
}
4938e: 4e5e unlk %fp
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
49390: 2140 0008 movel %d0,%a0@(8)
break;
}
return 0;
}
49394: 4280 clrl %d0 49396: 4e75 rts 49398: 245f moveal %sp@+,%a2
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
4939a: 203c 0005 b59c movel #374172,%d0
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
493a0: 4e5e unlk %fp
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
493a2: 2140 0008 movel %d0,%a0@(8)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
493a6: 4280 clrl %d0 <== NOT EXECUTED
0004c74c <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
4c74c: 4e56 fff8 linkw %fp,#-8 4c750: 2f0a movel %a2,%sp@-
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
4c752: 4878 0060 pea 60 <DBL_MANT_DIG+0x2b> 4c756: 4878 0001 pea 1 <ADD> 4c75a: 4eb9 0004 a498 jsr 4a498 <calloc>
if ( !node )
4c760: 508f addql #8,%sp
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
4c762: 2440 moveal %d0,%a2
if ( !node )
4c764: 4a80 tstl %d0
4c766: 674e beqs 4c7b6 <IMFS_allocate_node+0x6a> <== NEVER TAKEN
/* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX );
4c768: 4878 0020 pea 20 <OPER2+0xc> 4c76c: 2f2e 000c movel %fp@(12),%sp@-
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
4c770: 256e 0008 0048 movel %fp@(8),%a2@(72)
strncpy( node->name, name, IMFS_NAME_MAX );
4c776: 486a 000c pea %a2@(12)
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
4c77a: 7001 moveq #1,%d0 4c77c: 3540 0032 movew %d0,%a2@(50)
node->type = type; strncpy( node->name, name, IMFS_NAME_MAX );
4c780: 4eb9 0004 ec4c jsr 4ec4c <strncpy>
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
4c786: 256e 0010 002e movel %fp@(16),%a2@(46)
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
4c78c: 42a7 clrl %sp@- 4c78e: 486e fff8 pea %fp@(-8)
node->st_mode = mode;
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
node->st_gid = getegid();
#else
node->st_uid = 0;
4c792: 4240 clrw %d0 4c794: 3540 0038 movew %d0,%a2@(56)
node->st_gid = 0;
4c798: 3540 003a movew %d0,%a2@(58)
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
4c79c: 4eb9 0004 a6fc jsr 4a6fc <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
4c7a2: 202e fff8 movel %fp@(-8),%d0
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
return node;
4c7a6: 4fef 0014 lea %sp@(20),%sp
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
4c7aa: 2540 0044 movel %d0,%a2@(68)
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
4c7ae: 2540 003c movel %d0,%a2@(60)
node->stat_mtime = (time_t) tv.tv_sec;
4c7b2: 2540 0040 movel %d0,%a2@(64)
node->stat_ctime = (time_t) tv.tv_sec;
return node;
}
4c7b6: 200a movel %a2,%d0 4c7b8: 246e fff4 moveal %fp@(-12),%a2
4c7bc: 4e5e unlk %fp <== NOT EXECUTED
0004c7fa <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
4c7fa: 4e56 fffc linkw %fp,#-4 4c7fe: 2f0a movel %a2,%sp@- 4c800: 246e 0008 moveal %fp@(8),%a2 4c804: 2f02 movel %d2,%sp@- 4c806: 242e 000c movel %fp@(12),%d2
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
4c80a: 4a8a tstl %a2
4c80c: 660e bnes 4c81c <IMFS_create_node+0x22> <== ALWAYS TAKEN
4c80e: 4280 clrl %d0 <== NOT EXECUTED
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
4c810: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4c814: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4c818: 4e5e unlk %fp <== NOT EXECUTED 4c81a: 4e75 rts <== NOT EXECUTED
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
4c81c: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 4c822: 2028 002c movel %a0@(44),%d0 4c826: 4680 notl %d0 4c828: c0ae 0014 andl %fp@(20),%d0 4c82c: 2f00 movel %d0,%sp@- 4c82e: 2f2e 0010 movel %fp@(16),%sp@- 4c832: 2f02 movel %d2,%sp@- 4c834: 4eb9 0004 c74c jsr 4c74c <IMFS_allocate_node>
if ( !node )
4c83a: 4fef 000c lea %sp@(12),%sp 4c83e: 4a80 tstl %d0
4c840: 67ce beqs 4c810 <IMFS_create_node+0x16> <== NEVER TAKEN
return NULL;
/*
* Set the type specific information
*/
switch (type) {
4c842: 7207 moveq #7,%d1 4c844: b282 cmpl %d2,%d1
4c846: 641c bccs 4c864 <IMFS_create_node+0x6a> <== ALWAYS TAKEN
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
break;
default:
assert(0);
4c848: 4879 0005 b78a pea 5b78a <IMFS_LIMITS_AND_OPTIONS+0x30> <== NOT EXECUTED 4c84e: 4879 0005 b7d5 pea 5b7d5 <__FUNCTION__.5811> <== NOT EXECUTED 4c854: 4878 005c pea 5c <DBL_MANT_DIG+0x27> <== NOT EXECUTED 4c858: 4879 0005 b78c pea 5b78c <IMFS_LIMITS_AND_OPTIONS+0x32> <== NOT EXECUTED 4c85e: 4eb9 0004 a398 jsr 4a398 <__assert_func> <== NOT EXECUTED
return NULL;
/*
* Set the type specific information
*/
switch (type) {
4c864: 323b 2a08 movew %pc@(4c86e <IMFS_create_node+0x74>,%d2:l:2),%d1 4c868: 48c1 extl %d1 4c86a: 4efb 1802 jmp %pc@(4c86e <IMFS_create_node+0x74>,%d1:l)
4c86e: ffda 0177732 <== NOT EXECUTED 4c870: 0144 bchg %d0,%d4 <== NOT EXECUTED 4c872: 00fc 0374 <== NOT EXECUTED 4c874: 0010 020 <== NOT EXECUTED 4c876: 0010 020 <== NOT EXECUTED 4c878: 006c 0154 <== NOT EXECUTED 4c87a: 005a 0132 <== NOT EXECUTED 4c87c: 00be 226e 0018 oril #577634328,%d6 <== NOT EXECUTED
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;
4c882: 2040 moveal %d0,%a0 4c884: 2151 004c movel %a1@,%a0@(76)
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c888: 2240 moveal %d0,%a1
/*
* 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;
4c88a: 206a 0010 moveal %a2@(16),%a0 4c88e: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c892: 2228 0004 movel %a0@(4),%d1 4c896: 5281 addql #1,%d1 4c898: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4c89c: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c89e: 2341 0034 movel %d1,%a1@(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;
4c8a2: 2348 0008 movel %a0,%a1@(8)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4c8a6: 2f00 movel %d0,%sp@- 4c8a8: 4868 004c pea %a0@(76) 4c8ac: 2d40 fffc movel %d0,%fp@(-4) 4c8b0: 4eb9 0004 673c jsr 4673c <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4c8b6: 202e fffc movel %fp@(-4),%d0 4c8ba: 508f addql #8,%sp
}
4c8bc: 242e fff4 movel %fp@(-12),%d2 4c8c0: 246e fff8 moveal %fp@(-8),%a2 4c8c4: 4e5e unlk %fp 4c8c6: 4e75 rts
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
4c8c8: 2040 moveal %d0,%a0 <== 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;
4c8ca: 4281 clrl %d1 <== NOT EXECUTED 4c8cc: 4282 clrl %d2 <== NOT EXECUTED
node->info.linearfile.direct = 0;
4c8ce: 42a8 0054 clrl %a0@(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;
4c8d2: 2141 004c movel %d1,%a0@(76) <== NOT EXECUTED 4c8d6: 2142 0050 movel %d2,%a0@(80) <== NOT EXECUTED
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
4c8da: 2040 moveal %d0,%a0
node->info.file.indirect = 0;
4c8dc: 2240 moveal %d0,%a1
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
4c8de: 4281 clrl %d1 4c8e0: 4282 clrl %d2
node->info.file.indirect = 0;
4c8e2: 42a9 0054 clrl %a1@(84)
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
4c8e6: 2141 004c movel %d1,%a0@(76) 4c8ea: 2142 0050 movel %d2,%a0@(80)
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
4c8ee: 42a9 0058 clrl %a1@(88)
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c8f2: 2240 moveal %d0,%a1
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
4c8f4: 42a8 005c clrl %a0@(92)
/*
* 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;
4c8f8: 206a 0010 moveal %a2@(16),%a0 4c8fc: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c900: 2228 0004 movel %a0@(4),%d1 4c904: 5281 addql #1,%d1 4c906: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4c90a: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c90c: 2341 0034 movel %d1,%a1@(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;
4c910: 2348 0008 movel %a0,%a1@(8) 4c914: 2f00 movel %d0,%sp@- 4c916: 4868 004c pea %a0@(76) 4c91a: 2d40 fffc movel %d0,%fp@(-4) 4c91e: 4eb9 0004 673c jsr 4673c <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4c924: 202e fffc movel %fp@(-4),%d0 4c928: 508f addql #8,%sp 4c92a: 6090 bras 4c8bc <IMFS_create_node+0xc2>
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
break;
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
4c92c: 2240 moveal %d0,%a1 4c92e: 42a9 004c clrl %a1@(76)
/*
* 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;
4c932: 206a 0010 moveal %a2@(16),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c936: 2240 moveal %d0,%a1
/*
* 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;
4c938: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c93c: 2228 0004 movel %a0@(4),%d1 4c940: 5281 addql #1,%d1 4c942: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4c946: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c948: 2341 0034 movel %d1,%a1@(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;
4c94c: 2348 0008 movel %a0,%a1@(8) 4c950: 2f00 movel %d0,%sp@- 4c952: 4868 004c pea %a0@(76) 4c956: 2d40 fffc movel %d0,%fp@(-4) 4c95a: 4eb9 0004 673c jsr 4673c <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4c960: 202e fffc movel %fp@(-4),%d0 4c964: 508f addql #8,%sp 4c966: 6000 ff54 braw 4c8bc <IMFS_create_node+0xc2>
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
4c96a: 226e 0018 moveal %fp@(24),%a1 4c96e: 2040 moveal %d0,%a0 4c970: 2151 004c movel %a1@,%a0@(76)
node->info.device.minor = info->device.minor;
4c974: 5889 addql #4,%a1 4c976: 2151 0050 movel %a1@,%a0@(80)
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c97a: 2240 moveal %d0,%a1
/*
* 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;
4c97c: 206a 0010 moveal %a2@(16),%a0 4c980: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c984: 2228 0004 movel %a0@(4),%d1 4c988: 5281 addql #1,%d1 4c98a: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4c98e: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c990: 2341 0034 movel %d1,%a1@(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;
4c994: 2348 0008 movel %a0,%a1@(8) 4c998: 2f00 movel %d0,%sp@- 4c99a: 4868 004c pea %a0@(76) 4c99e: 2d40 fffc movel %d0,%fp@(-4) 4c9a2: 4eb9 0004 673c jsr 4673c <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4c9a8: 202e fffc movel %fp@(-4),%d0 4c9ac: 508f addql #8,%sp 4c9ae: 6000 ff0c braw 4c8bc <IMFS_create_node+0xc2>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4c9b2: 2240 moveal %d0,%a1
the_chain->permanent_null = NULL;
4c9b4: 2040 moveal %d0,%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4c9b6: 43e9 0050 lea %a1@(80),%a1 4c9ba: 2149 004c movel %a1,%a0@(76)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4c9be: 5989 subql #4,%a1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
4c9c0: 42a8 0050 clrl %a0@(80)
the_chain->last = _Chain_Head(the_chain);
4c9c4: 2149 0054 movel %a1,%a0@(84)
/*
* 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;
4c9c8: 206a 0010 moveal %a2@(16),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c9cc: 2240 moveal %d0,%a1
/*
* 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;
4c9ce: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c9d2: 2228 0004 movel %a0@(4),%d1 4c9d6: 5281 addql #1,%d1 4c9d8: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4c9dc: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4c9de: 2341 0034 movel %d1,%a1@(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;
4c9e2: 2348 0008 movel %a0,%a1@(8) 4c9e6: 2f00 movel %d0,%sp@- 4c9e8: 4868 004c pea %a0@(76) 4c9ec: 2d40 fffc movel %d0,%fp@(-4) 4c9f0: 4eb9 0004 673c jsr 4673c <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4c9f6: 202e fffc movel %fp@(-4),%d0 4c9fa: 508f addql #8,%sp 4c9fc: 6000 febe braw 4c8bc <IMFS_create_node+0xc2>
0004c7c0 <IMFS_create_root_node>:
IMFS_jnode_t *IMFS_create_root_node(void)
{
4c7c0: 4e56 0000 linkw %fp,#0
IMFS_jnode_t *node;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) );
4c7c4: 4878 41ed pea 41ed <D_MAX_EXP+0x39ee> 4c7c8: 4879 0005 b30e pea 5b30e <rtems_status_assoc+0x178> 4c7ce: 4878 0001 pea 1 <ADD> 4c7d2: 4eb9 0004 c74c jsr 4c74c <IMFS_allocate_node>
if ( !node )
4c7d8: 4fef 000c lea %sp@(12),%sp 4c7dc: 4a80 tstl %d0
4c7de: 6716 beqs 4c7f6 <IMFS_create_root_node+0x36> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4c7e0: 2240 moveal %d0,%a1
the_chain->permanent_null = NULL;
4c7e2: 2040 moveal %d0,%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4c7e4: 43e9 0050 lea %a1@(80),%a1 4c7e8: 2149 004c movel %a1,%a0@(76)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4c7ec: 5989 subql #4,%a1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
4c7ee: 42a8 0050 clrl %a0@(80)
the_chain->last = _Chain_Head(the_chain);
4c7f2: 2149 0054 movel %a1,%a0@(84)
* NOTE: Root node is always a directory.
*/
rtems_chain_initialize_empty(&node->info.directory.Entries);
return node;
}
4c7f6: 4e5e unlk %fp <== NOT EXECUTED
0004460e <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
4460e: 4e56 ffe0 linkw %fp,#-32 44612: 206e 0008 moveal %fp@(8),%a0 44616: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4461a: 262e 000c movel %fp@(12),%d3
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
4461e: 4a88 tstl %a0 44620: 6700 008c beqw 446ae <IMFS_dump_directory+0xa0>
assert( level >= 0 );
44624: 4a83 tstl %d3 44626: 6d00 00be bltw 446e6 <IMFS_dump_directory+0xd8>
assert( the_directory->type == IMFS_DIRECTORY );
4462a: 7001 moveq #1,%d0 4462c: b0a8 0048 cmpl %a0@(72),%d0 44630: 6600 0098 bnew 446ca <IMFS_dump_directory+0xbc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
44634: 2808 movel %a0,%d4 44636: 0684 0000 0050 addil #80,%d4
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
4463c: 2668 004c moveal %a0@(76),%a3 44640: b88b cmpl %a3,%d4
44642: 6750 beqs 44694 <IMFS_dump_directory+0x86>
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 );
44644: 2a03 movel %d3,%d5 44646: 45f9 0005 3dd0 lea 53dd0 <fwrite>,%a2 4464c: 49f9 0004 43f6 lea 443f6 <IMFS_print_jnode>,%a4 44652: 5285 addql #1,%d5 44654: 4bf9 0004 460e lea 4460e <IMFS_dump_directory>,%a5
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
4465a: 4282 clrl %d2
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
4465c: 2079 0006 3fbc moveal 63fbc <_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++ )
44662: 5282 addql #1,%d2
fprintf(stdout, "...." );
44664: 2f28 0008 movel %a0@(8),%sp@- 44668: 4878 0004 pea 4 <CONTEXT_ARG> 4466c: 4878 0001 pea 1 <ADD> 44670: 4879 0006 26cb pea 626cb <IntUartPollCallbacks.6560+0x115> 44676: 4e92 jsr %a2@
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
44678: 4fef 0010 lea %sp@(16),%sp 4467c: b483 cmpl %d3,%d2
4467e: 6fdc bles 4465c <IMFS_dump_directory+0x4e>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
44680: 2f0b movel %a3,%sp@- 44682: 4e94 jsr %a4@
if ( the_jnode->type == IMFS_DIRECTORY )
44684: 588f addql #4,%sp 44686: 7001 moveq #1,%d0 44688: b0ab 0048 cmpl %a3@(72),%d0
4468c: 6710 beqs 4469e <IMFS_dump_directory+0x90>
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 ) {
4468e: 2653 moveal %a3@,%a3
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
44690: b88b cmpl %a3,%d4
44692: 66c6 bnes 4465a <IMFS_dump_directory+0x4c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
44694: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4469a: 4e5e unlk %fp 4469c: 4e75 rts
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 );
4469e: 2f05 movel %d5,%sp@- 446a0: 2f0b movel %a3,%sp@- 446a2: 4e95 jsr %a5@
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 ) {
446a4: 2653 moveal %a3@,%a3
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 );
446a6: 508f addql #8,%sp
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
446a8: b88b cmpl %a3,%d4
446aa: 66ae bnes 4465a <IMFS_dump_directory+0x4c>
446ac: 60e6 bras 44694 <IMFS_dump_directory+0x86>
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
446ae: 4879 0006 268c pea 6268c <IntUartPollCallbacks.6560+0xd6> <== NOT EXECUTED 446b4: 4879 0006 275a pea 6275a <__FUNCTION__.6562> <== NOT EXECUTED 446ba: 4878 0084 pea 84 <DBL_MANT_DIG+0x4f> <== NOT EXECUTED 446be: 4879 0006 25e0 pea 625e0 <IntUartPollCallbacks.6560+0x2a> <== NOT EXECUTED 446c4: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
446ca: 4879 0006 26a5 pea 626a5 <IntUartPollCallbacks.6560+0xef> <== NOT EXECUTED 446d0: 4879 0006 275a pea 6275a <__FUNCTION__.6562> <== NOT EXECUTED 446d6: 4878 0088 pea 88 <DBL_MANT_DIG+0x53> <== NOT EXECUTED 446da: 4879 0006 25e0 pea 625e0 <IntUartPollCallbacks.6560+0x2a> <== NOT EXECUTED 446e0: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
assert( level >= 0 );
446e6: 4879 0006 269a pea 6269a <IntUartPollCallbacks.6560+0xe4> <== NOT EXECUTED 446ec: 4879 0006 275a pea 6275a <__FUNCTION__.6562> <== NOT EXECUTED 446f2: 4878 0086 pea 86 <DBL_MANT_DIG+0x51> <== NOT EXECUTED 446f6: 4879 0006 25e0 pea 625e0 <IntUartPollCallbacks.6560+0x2a> <== NOT EXECUTED 446fc: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED
000494fa <IMFS_eval_path>:
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
494fa: 4e56 ffac linkw %fp,#-84 494fe: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 49502: 286e 0014 moveal %fp@(20),%a4 49506: 2a0e movel %fp,%d5 49508: 260e movel %fp,%d3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4950a: 4282 clrl %d2 4950c: 5985 subql #4,%d5 4950e: 0683 ffff ffdb addil #-37,%d3 49514: 283c 0004 9e64 movel #302692,%d4
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4951a: 2c3c 0004 9dbc movel #302524,%d6
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
49520: 2e3c 0004 93cc movel #299980,%d7
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
49526: 2a6e 0008 moveal %fp@(8),%a5 4952a: 246e 000c moveal %fp@(12),%a2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4952e: 2654 moveal %a4@,%a3 49530: 2d4d ffd4 movel %a5,%fp@(-44)
* 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 );
49534: 2f05 movel %d5,%sp@- 49536: 2a44 moveal %d4,%a5 49538: 2f03 movel %d3,%sp@- 4953a: 2f0a movel %a2,%sp@- 4953c: 206e ffd4 moveal %fp@(-44),%a0 49540: 4870 2800 pea %a0@(00000000,%d2:l) 49544: 4e95 jsr %a5@
pathnamelen -= len;
49546: 226e fffc moveal %fp@(-4),%a1
i += len;
if ( !pathloc->node_access )
4954a: 4fef 0010 lea %sp@(16),%sp 4954e: 2054 moveal %a4@,%a0 49550: 4a88 tstl %a0 49552: 6700 015a beqw 496ae <IMFS_eval_path+0x1b4>
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
49556: 95c9 subal %a1,%a2
i += len;
49558: d489 addl %a1,%d2
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
4955a: 4a80 tstl %d0
4955c: 672c beqs 4958a <IMFS_eval_path+0x90>
if ( node->type == IMFS_DIRECTORY )
4955e: 7201 moveq #1,%d1 49560: b2ab 0048 cmpl %a3@(72),%d1 49564: 6700 011c beqw 49682 <IMFS_eval_path+0x188> 49568: 2648 moveal %a0,%a3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
4956a: 7203 moveq #3,%d1 4956c: b280 cmpl %d0,%d1
4956e: 677c beqs 495ec <IMFS_eval_path+0xf2>
49570: 123c 0004 moveb #4,%d1 49574: b280 cmpl %d0,%d1 49576: 6700 00f0 beqw 49668 <IMFS_eval_path+0x16e> 4957a: 123c 0002 moveb #2,%d1 4957e: b280 cmpl %d0,%d1 49580: 6700 00a8 beqw 4962a <IMFS_eval_path+0x130>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
49584: 7204 moveq #4,%d1 49586: b280 cmpl %d0,%d1
49588: 66aa bnes 49534 <IMFS_eval_path+0x3a> <== ALWAYS TAKEN
4958a: 2a6e ffd4 moveal %fp@(-44),%a5
* 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 ) {
4958e: 7001 moveq #1,%d0 49590: b0a8 0048 cmpl %a0@(72),%d0 49594: 6600 012a bnew 496c0 <IMFS_eval_path+0x1c6>
if ( node->info.directory.mt_fs != NULL ) {
49598: 2068 0058 moveal %a0@(88),%a0 4959c: 4a88 tstl %a0 4959e: 6700 0120 beqw 496c0 <IMFS_eval_path+0x1c6>
newloc = node->info.directory.mt_fs->mt_fs_root;
495a2: 2228 0020 movel %a0@(32),%d1
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
495a6: 9489 subl %a1,%d2
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
495a8: 2968 002c 0010 movel %a0@(44),%a4@(16)
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
495ae: 2668 0028 moveal %a0@(40),%a3 495b2: 2628 0024 movel %a0@(36),%d3 495b6: 2028 001c movel %a0@(28),%d0
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
495ba: 2f0c movel %a4,%sp@- 495bc: 2f2e 0010 movel %fp@(16),%sp@- 495c0: 4872 9800 pea %a2@(00000000,%a1:l) 495c4: 4875 2800 pea %a5@(00000000,%d2:l) 495c8: 2053 moveal %a3@,%a0
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
495ca: 2941 0004 movel %d1,%a4@(4) 495ce: 2943 0008 movel %d3,%a4@(8) 495d2: 2880 movel %d0,%a4@ 495d4: 294b 000c movel %a3,%a4@(12)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
495d8: 4e90 jsr %a0@ 495da: 4fef 0010 lea %sp@(16),%sp 495de: 2200 movel %d0,%d1
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
495e0: 2001 movel %d1,%d0 495e2: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 495e8: 4e5e unlk %fp 495ea: 4e75 rts
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
495ec: 2028 0048 movel %a0@(72),%d0 495f0: 7203 moveq #3,%d1 495f2: b280 cmpl %d0,%d1 495f4: 6700 00fc beqw 496f2 <IMFS_eval_path+0x1f8>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
495f8: 7204 moveq #4,%d1 495fa: b280 cmpl %d0,%d1 495fc: 6700 010c beqw 4970a <IMFS_eval_path+0x210>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
49600: 7201 moveq #1,%d1 49602: b280 cmpl %d0,%d1 49604: 6600 0130 bnew 49736 <IMFS_eval_path+0x23c>
/*
* 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 ) {
49608: 206b 0058 moveal %a3@(88),%a0 4960c: 4a88 tstl %a0 4960e: 6600 0138 bnew 49748 <IMFS_eval_path+0x24e>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
49612: 2f03 movel %d3,%sp@- 49614: 2a46 moveal %d6,%a5 49616: 2f0b movel %a3,%sp@- 49618: 4e95 jsr %a5@
if ( !node )
4961a: 508f addql #8,%sp
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4961c: 2640 moveal %d0,%a3
if ( !node )
4961e: 4a80 tstl %d0 49620: 6700 008c beqw 496ae <IMFS_eval_path+0x1b4>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
49624: 288b movel %a3,%a4@
break;
49626: 6000 ff0c braw 49534 <IMFS_eval_path+0x3a>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
4962a: 2039 0005 c2f4 movel 5c2f4 <rtems_current_user_env>,%d0 49630: 2a40 moveal %d0,%a5 49632: b1ed 0018 cmpal %a5@(24),%a0 49636: 6700 fefc beqw 49534 <IMFS_eval_path+0x3a>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
4963a: 266c 0010 moveal %a4@(16),%a3
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
4963e: b1eb 001c cmpal %a3@(28),%a0 49642: 6700 014e beqw 49792 <IMFS_eval_path+0x298>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
49646: 2668 0008 moveal %a0@(8),%a3 4964a: 4a8b tstl %a3
4964c: 66d6 bnes 49624 <IMFS_eval_path+0x12a>
rtems_set_errno_and_return_minus_one( ENOENT );
4964e: 4eb9 0004 d868 jsr 4d868 <__errno> 49654: 7402 moveq #2,%d2 49656: 72ff moveq #-1,%d1 49658: 2a40 moveal %d0,%a5
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4965a: 2001 movel %d1,%d0
flags,pathloc);
}
} else {
if ( !node->Parent )
rtems_set_errno_and_return_minus_one( ENOENT );
4965c: 2a82 movel %d2,%a5@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4965e: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 49664: 4e5e unlk %fp 49666: 4e75 rts
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
49668: 4eb9 0004 d868 jsr 4d868 <__errno> 4966e: 7a5b moveq #91,%d5 49670: 72ff moveq #-1,%d1 49672: 2a40 moveal %d0,%a5
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
49674: 2001 movel %d1,%d0
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
49676: 2a85 movel %d5,%a5@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
49678: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4967e: 4e5e unlk %fp 49680: 4e75 rts
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
49682: 7240 moveq #64,%d1
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
49684: 2648 moveal %a0,%a3
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
49686: c2a8 002e andl %a0@(46),%d1 4968a: 2a41 moveal %d1,%a5 4968c: 7240 moveq #64,%d1 4968e: b28d cmpl %a5,%d1 49690: 6700 fed8 beqw 4956a <IMFS_eval_path+0x70>
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
49694: 4eb9 0004 d868 jsr 4d868 <__errno> 4969a: 780d moveq #13,%d4 4969c: 72ff moveq #-1,%d1 4969e: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
496a0: 2001 movel %d1,%d0
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
496a2: 2084 movel %d4,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
496a4: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 496aa: 4e5e unlk %fp 496ac: 4e75 rts
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
496ae: 4eb9 0004 d868 jsr 4d868 <__errno> 496b4: 7c02 moveq #2,%d6 496b6: 72ff moveq #-1,%d1 496b8: 2040 moveal %d0,%a0 496ba: 2086 movel %d6,%a0@ 496bc: 6000 ff22 braw 495e0 <IMFS_eval_path+0xe6>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
496c0: 2f0c movel %a4,%sp@- 496c2: 4eb9 0004 931c jsr 4931c <IMFS_Set_handlers>
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
496c8: 2054 moveal %a4@,%a0
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
496ca: 2200 movel %d0,%d1 496cc: 588f addql #4,%sp
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
496ce: 202e 0010 movel %fp@(16),%d0 496d2: ed88 lsll #6,%d0
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
496d4: 2400 movel %d0,%d2 496d6: c4a8 002e andl %a0@(46),%d2 496da: b480 cmpl %d0,%d2 496dc: 6700 ff02 beqw 495e0 <IMFS_eval_path+0xe6>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
496e0: 4eb9 0004 d868 jsr 4d868 <__errno> 496e6: 760d moveq #13,%d3 496e8: 72ff moveq #-1,%d1 496ea: 2a40 moveal %d0,%a5 496ec: 2a83 movel %d3,%a5@ 496ee: 6000 fef0 braw 495e0 <IMFS_eval_path+0xe6>
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
496f2: 42a7 clrl %sp@- 496f4: 2047 moveal %d7,%a0 496f6: 2f0c movel %a4,%sp@- 496f8: 4e90 jsr %a0@
node = pathloc->node_access;
496fa: 2654 moveal %a4@,%a3
if ( !node )
496fc: 508f addql #8,%sp 496fe: 4a8b tstl %a3
49700: 6722 beqs 49724 <IMFS_eval_path+0x22a> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
49702: 202b 0048 movel %a3@(72),%d0 49706: 6000 fef8 braw 49600 <IMFS_eval_path+0x106>
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
4970a: 42a7 clrl %sp@- 4970c: 2f0c movel %a4,%sp@- 4970e: 4eb9 0004 942c jsr 4942c <IMFS_evaluate_sym_link>
node = pathloc->node_access;
49714: 2654 moveal %a4@,%a3
if ( result == -1 )
49716: 508f addql #8,%sp 49718: 72ff moveq #-1,%d1 4971a: b280 cmpl %d0,%d1
4971c: 66e4 bnes 49702 <IMFS_eval_path+0x208> <== ALWAYS TAKEN
4971e: 2200 movel %d0,%d1 <== NOT EXECUTED 49720: 6000 febe braw 495e0 <IMFS_eval_path+0xe6> <== NOT EXECUTED
IMFS_evaluate_hard_link( pathloc, 0 );
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
49724: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 4972a: 72ff moveq #-1,%d1 <== NOT EXECUTED 4972c: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4972e: 7014 moveq #20,%d0 <== NOT EXECUTED 49730: 2a80 movel %d0,%a5@ <== NOT EXECUTED 49732: 6000 feac braw 495e0 <IMFS_eval_path+0xe6> <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
49736: 4eb9 0004 d868 jsr 4d868 <__errno> 4973c: 7e14 moveq #20,%d7 4973e: 72ff moveq #-1,%d1 49740: 2040 moveal %d0,%a0 49742: 2087 movel %d7,%a0@ 49744: 6000 fe9a braw 495e0 <IMFS_eval_path+0xe6>
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
49748: 2268 0028 moveal %a0@(40),%a1
*pathloc = newloc;
4974c: 2968 002c 0010 movel %a0@(44),%a4@(16)
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
49752: 2228 0020 movel %a0@(32),%d1 49756: 2628 0024 movel %a0@(36),%d3 4975a: 2028 001c movel %a0@(28),%d0 4975e: 2a6e ffd4 moveal %fp@(-44),%a5
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
49762: 2f0c movel %a4,%sp@- 49764: 206e fffc moveal %fp@(-4),%a0 49768: 9488 subl %a0,%d2 4976a: 2f2e 0010 movel %fp@(16),%sp@- 4976e: 4872 8800 pea %a2@(00000000,%a0:l) 49772: 4875 2800 pea %a5@(00000000,%d2:l) 49776: 2051 moveal %a1@,%a0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
49778: 2941 0004 movel %d1,%a4@(4) 4977c: 2943 0008 movel %d3,%a4@(8) 49780: 2880 movel %d0,%a4@ 49782: 2949 000c movel %a1,%a4@(12)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
49786: 4e90 jsr %a0@ 49788: 4fef 0010 lea %sp@(16),%sp 4978c: 2200 movel %d0,%d1 4978e: 6000 fe50 braw 495e0 <IMFS_eval_path+0xe6>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
49792: 206b 0014 moveal %a3@(20),%a0
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
49796: 9489 subl %a1,%d2
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
49798: 296b 0018 0010 movel %a3@(24),%a4@(16)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
4979e: 222b 0008 movel %a3@(8),%d1 497a2: 282b 0010 movel %a3@(16),%d4 497a6: 262b 000c movel %a3@(12),%d3 497aa: 2a6e ffd4 moveal %fp@(-44),%a5
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
497ae: 2f0c movel %a4,%sp@- 497b0: 2f2e 0010 movel %fp@(16),%sp@- 497b4: 4871 a800 pea %a1@(00000000,%a2:l) 497b8: 4875 2800 pea %a5@(00000000,%d2:l) 497bc: 2010 movel %a0@,%d0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
497be: 2881 movel %d1,%a4@ 497c0: 2948 000c movel %a0,%a4@(12)
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
497c4: 2040 moveal %d0,%a0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
497c6: 2944 0008 movel %d4,%a4@(8) 497ca: 2943 0004 movel %d3,%a4@(4)
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
497ce: 4e90 jsr %a0@ 497d0: 4fef 0010 lea %sp@(16),%sp 497d4: 2200 movel %d0,%d1 497d6: 6000 fe08 braw 495e0 <IMFS_eval_path+0xe6>
00049894 <IMFS_evaluate_for_make>:
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
49894: 4e56 ffb0 linkw %fp,#-80 49898: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4989c: 286e 0008 moveal %fp@(8),%a4 498a0: 2a0e movel %fp,%d5 498a2: 280e movel %fp,%d4
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
498a4: 4283 clrl %d3 498a6: 5985 subql #4,%d5 498a8: 0684 ffff ffdb addil #-37,%d4 498ae: 4bf9 0004 9e64 lea 49e64 <IMFS_get_token>,%a5
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
498b4: 2c3c 0004 9dbc movel #302524,%d6
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
498ba: 2f0c movel %a4,%sp@-
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
498bc: 266e 000c moveal %fp@(12),%a3
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
498c0: 4eb9 0004 ec34 jsr 4ec34 <strlen>
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
498c6: 2453 moveal %a3@,%a2
/*
* Get the path length.
*/
pathlen = strlen( path );
498c8: 588f addql #4,%sp 498ca: 2400 movel %d0,%d2
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
498cc: 2f05 movel %d5,%sp@- 498ce: 2f04 movel %d4,%sp@- 498d0: 2f02 movel %d2,%sp@- 498d2: 4874 3800 pea %a4@(00000000,%d3:l) 498d6: 4e95 jsr %a5@
pathlen -= len;
498d8: 222e fffc movel %fp@(-4),%d1
i += len;
if ( !pathloc->node_access )
498dc: 4fef 0010 lea %sp@(16),%sp
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
498e0: 9481 subl %d1,%d2
i += len;
if ( !pathloc->node_access )
498e2: 2053 moveal %a3@,%a0 498e4: 4a88 tstl %a0 498e6: 6700 00c8 beqw 499b0 <IMFS_evaluate_for_make+0x11c>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
498ea: 4a80 tstl %d0
498ec: 6742 beqs 49930 <IMFS_evaluate_for_make+0x9c>
if ( node->type == IMFS_DIRECTORY )
498ee: 7e01 moveq #1,%d7 498f0: beaa 0048 cmpl %a2@(72),%d7 498f4: 6700 00d4 beqw 499ca <IMFS_evaluate_for_make+0x136> 498f8: 2448 moveal %a0,%a2
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
498fa: d681 addl %d1,%d3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
498fc: 7e02 moveq #2,%d7 498fe: be80 cmpl %d0,%d7 49900: 6700 008c beqw 4998e <IMFS_evaluate_for_make+0xfa>
49904: 6426 bccs 4992c <IMFS_evaluate_for_make+0x98>
49906: 7203 moveq #3,%d1 49908: b280 cmpl %d0,%d1
4990a: 673e beqs 4994a <IMFS_evaluate_for_make+0xb6>
4990c: 7e04 moveq #4,%d7 4990e: be80 cmpl %d0,%d7
49910: 66ba bnes 498cc <IMFS_evaluate_for_make+0x38> <== NEVER TAKEN
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
49912: 4eb9 0004 d868 jsr 4d868 <__errno> 49918: 7a5b moveq #91,%d5 4991a: 72ff moveq #-1,%d1 4991c: 2040 moveal %d0,%a0 4991e: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
49920: 2001 movel %d1,%d0 49922: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49928: 4e5e unlk %fp 4992a: 4e75 rts
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
4992c: 4a80 tstl %d0
4992e: 669c bnes 498cc <IMFS_evaluate_for_make+0x38> <== ALWAYS TAKEN
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
49930: 4eb9 0004 d868 jsr 4d868 <__errno> 49936: 7c11 moveq #17,%d6 49938: 72ff moveq #-1,%d1 4993a: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4993c: 2001 movel %d1,%d0
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
4993e: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
49940: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49946: 4e5e unlk %fp 49948: 4e75 rts
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
4994a: 2028 0048 movel %a0@(72),%d0 4994e: 7203 moveq #3,%d1 49950: b280 cmpl %d0,%d1 49952: 6700 0106 beqw 49a5a <IMFS_evaluate_for_make+0x1c6>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
49956: 7204 moveq #4,%d1 49958: b280 cmpl %d0,%d1 4995a: 6700 00fe beqw 49a5a <IMFS_evaluate_for_make+0x1c6>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
4995e: 4a8a tstl %a2 49960: 6700 0114 beqw 49a76 <IMFS_evaluate_for_make+0x1e2>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
49964: 7001 moveq #1,%d0 49966: b0aa 0048 cmpl %a2@(72),%d0 4996a: 6600 010a bnew 49a76 <IMFS_evaluate_for_make+0x1e2>
/*
* 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 ) {
4996e: 206a 0058 moveal %a2@(88),%a0 49972: 4a88 tstl %a0 49974: 6600 011a bnew 49a90 <IMFS_evaluate_for_make+0x1fc>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
49978: 2f04 movel %d4,%sp@- 4997a: 2046 moveal %d6,%a0 4997c: 2f0a movel %a2,%sp@- 4997e: 4e90 jsr %a0@
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
49980: 508f addql #8,%sp
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
49982: 2440 moveal %d0,%a2
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
49984: 4a80 tstl %d0
49986: 676e beqs 499f6 <IMFS_evaluate_for_make+0x162>
done = true;
else
pathloc->node_access = node;
49988: 268a movel %a2,%a3@ 4998a: 6000 ff40 braw 498cc <IMFS_evaluate_for_make+0x38>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
4998e: 2279 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a1 49994: b1e9 0018 cmpal %a1@(24),%a0 49998: 6700 ff32 beqw 498cc <IMFS_evaluate_for_make+0x38>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
4999c: 226b 0010 moveal %a3@(16),%a1 499a0: b1e9 001c cmpal %a1@(28),%a0 499a4: 6700 0134 beqw 49ada <IMFS_evaluate_for_make+0x246>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
499a8: 2468 0008 moveal %a0@(8),%a2 499ac: 4a8a tstl %a2
499ae: 66d8 bnes 49988 <IMFS_evaluate_for_make+0xf4>
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
499b0: 4eb9 0004 d868 jsr 4d868 <__errno> 499b6: 7802 moveq #2,%d4 499b8: 72ff moveq #-1,%d1 499ba: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
499bc: 2001 movel %d1,%d0
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
499be: 2084 movel %d4,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
499c0: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 499c6: 4e5e unlk %fp 499c8: 4e75 rts
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
499ca: 7e40 moveq #64,%d7
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
499cc: 2448 moveal %a0,%a2
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
499ce: cea8 002e andl %a0@(46),%d7 499d2: 2247 moveal %d7,%a1 499d4: 7e40 moveq #64,%d7 499d6: be89 cmpl %a1,%d7 499d8: 6700 ff20 beqw 498fa <IMFS_evaluate_for_make+0x66>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
499dc: 4eb9 0004 d868 jsr 4d868 <__errno> 499e2: 740d moveq #13,%d2 499e4: 72ff moveq #-1,%d1 499e6: 2040 moveal %d0,%a0 499e8: 2082 movel %d2,%a0@
return result;
}
499ea: 2001 movel %d1,%d0 499ec: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 499f2: 4e5e unlk %fp 499f4: 4e75 rts
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
499f6: 2003 movel %d3,%d0 499f8: 90ae fffc subl %fp@(-4),%d0 499fc: d08c addl %a4,%d0 499fe: 206e 0010 moveal %fp@(16),%a0 49a02: 2080 movel %d0,%a0@
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
49a04: 1034 3800 moveb %a4@(00000000,%d3:l),%d0
49a08: 6716 beqs 49a20 <IMFS_evaluate_for_make+0x18c>
49a0a: 41f4 3801 lea %a4@(00000001,%d3:l),%a0
if ( !IMFS_is_separator( path[ i ] ) )
49a0e: 49c0 extbl %d0 49a10: 722f moveq #47,%d1 49a12: b280 cmpl %d0,%d1
49a14: 6706 beqs 49a1c <IMFS_evaluate_for_make+0x188>
49a16: 7e5c moveq #92,%d7 49a18: be80 cmpl %d0,%d7
49a1a: 6694 bnes 499b0 <IMFS_evaluate_for_make+0x11c>
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
49a1c: 1018 moveb %a0@+,%d0
49a1e: 66ee bnes 49a0e <IMFS_evaluate_for_make+0x17a>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
49a20: 2f0b movel %a3,%sp@- 49a22: 4eb9 0004 931c jsr 4931c <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
49a28: 2053 moveal %a3@,%a0
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
49a2a: 2200 movel %d0,%d1
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
49a2c: 588f addql #4,%sp 49a2e: 7001 moveq #1,%d0 49a30: b0a8 0048 cmpl %a0@(72),%d0
49a34: 6640 bnes 49a76 <IMFS_evaluate_for_make+0x1e2> <== NEVER TAKEN
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
49a36: 2028 002e movel %a0@(46),%d0 49a3a: 0280 0000 00c0 andil #192,%d0 49a40: 0c80 0000 00c0 cmpil #192,%d0 49a46: 6700 fed8 beqw 49920 <IMFS_evaluate_for_make+0x8c>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
49a4a: 4eb9 0004 d868 jsr 4d868 <__errno> 49a50: 740d moveq #13,%d2 49a52: 72ff moveq #-1,%d1 49a54: 2040 moveal %d0,%a0 49a56: 2082 movel %d2,%a0@ 49a58: 6090 bras 499ea <IMFS_evaluate_for_make+0x156>
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
49a5a: 42a7 clrl %sp@-
if ( result == -1 )
49a5c: 7eff moveq #-1,%d7
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
49a5e: 2f0b movel %a3,%sp@- 49a60: 4eb9 0004 97da jsr 497da <IMFS_evaluate_link>
if ( result == -1 )
49a66: 508f addql #8,%sp
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
49a68: 2200 movel %d0,%d1
if ( result == -1 )
49a6a: be80 cmpl %d0,%d7 49a6c: 6700 feb2 beqw 49920 <IMFS_evaluate_for_make+0x8c> 49a70: 2453 moveal %a3@,%a2 49a72: 6000 feea braw 4995e <IMFS_evaluate_for_make+0xca>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
49a76: 4eb9 0004 d868 jsr 4d868 <__errno> 49a7c: 7614 moveq #20,%d3 49a7e: 72ff moveq #-1,%d1 49a80: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
49a82: 2001 movel %d1,%d0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
49a84: 2083 movel %d3,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
49a86: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49a8c: 4e5e unlk %fp 49a8e: 4e75 rts
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
49a90: 96ae fffc subl %fp@(-4),%d3
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
49a94: 2428 0024 movel %a0@(36),%d2 49a98: 2228 0020 movel %a0@(32),%d1 49a9c: 2268 0028 moveal %a0@(40),%a1
*pathloc = newloc;
49aa0: 2768 002c 0010 movel %a0@(44),%a3@(16)
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
49aa6: 2028 001c movel %a0@(28),%d0
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
49aaa: 2f2e 0010 movel %fp@(16),%sp@- 49aae: 2f0b movel %a3,%sp@- 49ab0: 4874 3800 pea %a4@(00000000,%d3:l) 49ab4: 2069 0004 moveal %a1@(4),%a0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
49ab8: 2741 0004 movel %d1,%a3@(4) 49abc: 2742 0008 movel %d2,%a3@(8) 49ac0: 2680 movel %d0,%a3@ 49ac2: 2749 000c movel %a1,%a3@(12)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
49ac6: 4e90 jsr %a0@ 49ac8: 4fef 000c lea %sp@(12),%sp 49acc: 2200 movel %d0,%d1
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
49ace: 2001 movel %d1,%d0 49ad0: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49ad6: 4e5e unlk %fp 49ad8: 4e75 rts
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
49ada: 2069 0014 moveal %a1@(20),%a0
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
49ade: 9681 subl %d1,%d3
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
49ae0: 2829 0010 movel %a1@(16),%d4 49ae4: 2429 000c movel %a1@(12),%d2
*pathloc = newloc;
49ae8: 2769 0018 0010 movel %a1@(24),%a3@(16)
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
49aee: 2269 0008 moveal %a1@(8),%a1
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
49af2: 2f2e 0010 movel %fp@(16),%sp@- 49af6: 2f0b movel %a3,%sp@- 49af8: 4874 3800 pea %a4@(00000000,%d3:l) 49afc: 2028 0004 movel %a0@(4),%d0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
49b00: 2748 000c movel %a0,%a3@(12)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
49b04: 2040 moveal %d0,%a0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
49b06: 2744 0008 movel %d4,%a3@(8) 49b0a: 2742 0004 movel %d2,%a3@(4) 49b0e: 2689 movel %a1,%a3@
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
49b10: 4e90 jsr %a0@ 49b12: 4fef 000c lea %sp@(12),%sp 49b16: 2200 movel %d0,%d1
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
49b18: 2001 movel %d1,%d0 49b1a: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
49b20: 4e5e unlk %fp <== NOT EXECUTED
000493cc <IMFS_evaluate_hard_link>:
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
493cc: 7003 moveq #3,%d0
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
493ce: 4e56 0000 linkw %fp,#0 493d2: 2f0a movel %a2,%sp@- 493d4: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *jnode = node->node_access;
493d8: 2052 moveal %a2@,%a0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
493da: b0a8 0048 cmpl %a0@(72),%d0
493de: 6640 bnes 49420 <IMFS_evaluate_hard_link+0x54> <== NEVER TAKEN
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
493e0: 24a8 004c movel %a0@(76),%a2@
IMFS_Set_handlers( node );
493e4: 2f0a movel %a2,%sp@- 493e6: 4eb9 0004 931c jsr 4931c <IMFS_Set_handlers>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
493ec: 202e 000c movel %fp@(12),%d0
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
493f0: 588f addql #4,%sp
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
493f2: ed88 lsll #6,%d0
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
493f4: 2052 moveal %a2@,%a0 493f6: 2200 movel %d0,%d1 493f8: c2a8 002e andl %a0@(46),%d1 493fc: b280 cmpl %d0,%d1
493fe: 6716 beqs 49416 <IMFS_evaluate_hard_link+0x4a> <== ALWAYS TAKEN
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
49400: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED
return result;
}
49406: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
4940a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4940c: 720d moveq #13,%d1 <== NOT EXECUTED 4940e: 70ff moveq #-1,%d0 <== NOT EXECUTED
return result;
}
49410: 4e5e unlk %fp <== NOT EXECUTED
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
49412: 2081 movel %d1,%a0@ <== NOT EXECUTED
return result;
}
49414: 4e75 rts <== NOT EXECUTED
49416: 246e fffc moveal %fp@(-4),%a2
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
4941a: 4280 clrl %d0
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4941c: 4e5e unlk %fp 4941e: 4e75 rts
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
49420: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 49426: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
000497da <IMFS_evaluate_link>:
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
497da: 4e56 ffec linkw %fp,#-20 497de: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 497e4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 497e8: 266e 0008 moveal %fp@(8),%a3
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
497ec: 4bf9 0004 942c lea 4942c <IMFS_evaluate_sym_link>,%a5
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
497f2: 49f9 0004 93cc lea 493cc <IMFS_evaluate_hard_link>,%a4
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
497f8: 242e 000c movel %fp@(12),%d2
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
497fc: 4281 clrl %d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
497fe: 3028 0030 movew %a0@(48),%d0
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
49802: 2453 moveal %a3@,%a2
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
49804: 5280 addql #1,%d0
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
49806: 3200 movew %d0,%d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
49808: 3140 0030 movew %d0,%a0@(48)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4980c: 7005 moveq #5,%d0 4980e: b081 cmpl %d1,%d0
49810: 6564 bcss 49876 <IMFS_evaluate_link+0x9c>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
49812: 202a 0048 movel %a2@(72),%d0 49816: 7203 moveq #3,%d1 49818: b280 cmpl %d0,%d1
4981a: 6740 beqs 4985c <IMFS_evaluate_link+0x82>
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
4981c: 7204 moveq #4,%d1 4981e: b280 cmpl %d0,%d1
49820: 671a beqs 4983c <IMFS_evaluate_link+0x62>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
49822: 5780 subql #3,%d0 49824: 7201 moveq #1,%d1 49826: b280 cmpl %d0,%d1
49828: 64d2 bccs 497fc <IMFS_evaluate_link+0x22> <== NEVER TAKEN
4982a: 4280 clrl %d0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4982c: 4241 clrw %d1 4982e: 3141 0030 movew %d1,%a0@(48)
return result;
}
49832: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 49838: 4e5e unlk %fp 4983a: 4e75 rts
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
4983c: 2f02 movel %d2,%sp@- 4983e: 2f0b movel %a3,%sp@- 49840: 4e95 jsr %a5@ 49842: 508f addql #8,%sp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
49844: 4a80 tstl %d0
49846: 6620 bnes 49868 <IMFS_evaluate_link+0x8e>
49848: 202a 0048 movel %a2@(72),%d0 4984c: 7201 moveq #1,%d1 4984e: 5780 subql #3,%d0 49850: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 49856: b280 cmpl %d0,%d1
49858: 64a2 bccs 497fc <IMFS_evaluate_link+0x22> <== ALWAYS TAKEN
4985a: 60ce bras 4982a <IMFS_evaluate_link+0x50> <== NOT EXECUTED
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
4985c: 2f02 movel %d2,%sp@- 4985e: 2f0b movel %a3,%sp@- 49860: 4e94 jsr %a4@ 49862: 508f addql #8,%sp
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
49864: 4a80 tstl %d0
49866: 67e0 beqs 49848 <IMFS_evaluate_link+0x6e> <== ALWAYS TAKEN
49868: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4986e: 4241 clrw %d1 49870: 3141 0030 movew %d1,%a0@(48) 49874: 60bc bras 49832 <IMFS_evaluate_link+0x58>
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
49876: 4241 clrw %d1 49878: 3141 0030 movew %d1,%a0@(48)
rtems_set_errno_and_return_minus_one( ELOOP );
4987c: 4eb9 0004 d868 jsr 4d868 <__errno> 49882: 725c moveq #92,%d1 49884: 2040 moveal %d0,%a0 49886: 70ff moveq #-1,%d0
*/
rtems_filesystem_link_counts = 0;
return result;
}
49888: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
4988e: 2081 movel %d1,%a0@
*/
rtems_filesystem_link_counts = 0;
return result;
}
49890: 4e5e unlk %fp <== NOT EXECUTED
000493aa <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
493aa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 493ae: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
493b2: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
return 1;
return 0;
}
493b6: 4e5e unlk %fp <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
493b8: ed88 lsll #6,%d0 <== NOT EXECUTED 493ba: 2050 moveal %a0@,%a0 <== NOT EXECUTED 493bc: 2200 movel %d0,%d1 <== NOT EXECUTED 493be: c2a8 002e andl %a0@(46),%d1 <== NOT EXECUTED 493c2: b280 cmpl %d0,%d1 <== NOT EXECUTED 493c4: 57c0 seq %d0 <== NOT EXECUTED 493c6: 49c0 extbl %d0 <== NOT EXECUTED
return 1;
return 0;
}
493c8: 4480 negl %d0 <== NOT EXECUTED
0004942c <IMFS_evaluate_sym_link>:
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
4942c: 7004 moveq #4,%d0
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4942e: 4e56 fff0 linkw %fp,#-16 49432: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 49436: 246e 0008 moveal %fp@(8),%a2 4943a: 242e 000c movel %fp@(12),%d2
IMFS_jnode_t *jnode = node->node_access;
4943e: 2252 moveal %a2@,%a1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
49440: b0a9 0048 cmpl %a1@(72),%d0 49444: 6600 00a8 bnew 494ee <IMFS_evaluate_sym_link+0xc2>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
49448: 2029 0008 movel %a1@(8),%d0 4944c: 6700 0094 beqw 494e2 <IMFS_evaluate_sym_link+0xb6>
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
49450: 2480 movel %d0,%a2@
rtems_filesystem_get_sym_start_loc(
49452: 2069 004c moveal %a1@(76),%a0 49456: 762f moveq #47,%d3 49458: 1210 moveb %a0@,%d1 4945a: 1001 moveb %d1,%d0 4945c: 49c0 extbl %d0 4945e: b680 cmpl %d0,%d3
49460: 670c beqs 4946e <IMFS_evaluate_sym_link+0x42>
49462: 163c 005c moveb #92,%d3 49466: b680 cmpl %d0,%d3
49468: 6704 beqs 4946e <IMFS_evaluate_sym_link+0x42> <== NEVER TAKEN
4946a: 4a01 tstb %d1
4946c: 6670 bnes 494de <IMFS_evaluate_sym_link+0xb2>
4946e: 2679 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a3 49474: 204a moveal %a2,%a0 49476: 7601 moveq #1,%d3 49478: 20eb 0018 movel %a3@(24),%a0@+ 4947c: 20eb 001c movel %a3@(28),%a0@+ 49480: 20eb 0020 movel %a3@(32),%a0@+ 49484: 20eb 0024 movel %a3@(36),%a0@+ 49488: 20ab 0028 movel %a3@(40),%a0@ 4948c: 2069 004c moveal %a1@(76),%a0
* 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] ),
49490: d688 addl %a0,%d3 49492: 2f03 movel %d3,%sp@- 49494: 4eb9 0004 ec34 jsr 4ec34 <strlen>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
4949a: 2e8a movel %a2,%sp@ 4949c: 2f02 movel %d2,%sp@-
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4949e: ed8a lsll #6,%d2
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
494a0: 2f00 movel %d0,%sp@- 494a2: 2f03 movel %d3,%sp@- 494a4: 4eb9 0004 94fa jsr 494fa <IMFS_eval_path> 494aa: 2600 movel %d0,%d3
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
494ac: 2f0a movel %a2,%sp@- 494ae: 4eb9 0004 931c jsr 4931c <IMFS_Set_handlers>
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
494b4: 2052 moveal %a2@,%a0 494b6: 2002 movel %d2,%d0 494b8: 4fef 0014 lea %sp@(20),%sp 494bc: c0a8 002e andl %a0@(46),%d0 494c0: b082 cmpl %d2,%d0
494c2: 670e beqs 494d2 <IMFS_evaluate_sym_link+0xa6> <== ALWAYS TAKEN
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
494c4: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 494ca: 740d moveq #13,%d2 <== NOT EXECUTED 494cc: 76ff moveq #-1,%d3 <== NOT EXECUTED 494ce: 2040 moveal %d0,%a0 <== NOT EXECUTED 494d0: 2082 movel %d2,%a0@ <== NOT EXECUTED
return result;
}
494d2: 2003 movel %d3,%d0 494d4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 494da: 4e5e unlk %fp 494dc: 4e75 rts
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
494de: 4203 clrb %d3 494e0: 60ae bras 49490 <IMFS_evaluate_sym_link+0x64>
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
494e2: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 494e8: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
494ee: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 494f4: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
00049cf8 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
49cf8: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49cfc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 49d00: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
49d04: 266a 0038 moveal %a2@(56),%a3 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
49d08: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49d0a: 486b 004c pea %a3@(76) <== NOT EXECUTED 49d0e: 4eb9 0004 c1f2 jsr 4c1f2 <pipe_release> <== NOT EXECUTED
if (! err) {
49d14: 508f addql #8,%sp <== NOT EXECUTED
rtems_libio_t *iop
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
49d16: 2400 movel %d0,%d2 <== NOT EXECUTED
if (! err) {
49d18: 670e beqs 49d28 <IMFS_fifo_close+0x30> <== 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)
free(jnode);
}
IMFS_FIFO_RETURN(err);
49d1a: 6d40 blts 49d5c <IMFS_fifo_close+0x64> <== NOT EXECUTED
}
49d1c: 2002 movel %d2,%d0 <== NOT EXECUTED 49d1e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49d24: 4e5e unlk %fp <== NOT EXECUTED 49d26: 4e75 rts <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
49d28: 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)
49d2e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
49d30: c1aa 0014 andl %d0,%a2@(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)
49d34: 4eb9 0004 a7d6 jsr 4a7d6 <rtems_libio_is_file_open> <== NOT EXECUTED 49d3a: 588f addql #4,%sp <== NOT EXECUTED 49d3c: 4a80 tstl %d0 <== NOT EXECUTED 49d3e: 66dc bnes 49d1c <IMFS_fifo_close+0x24> <== NOT EXECUTED 49d40: 4a6b 0032 tstw %a3@(50) <== NOT EXECUTED 49d44: 66d6 bnes 49d1c <IMFS_fifo_close+0x24> <== NOT EXECUTED
free(jnode);
49d46: 2f0b movel %a3,%sp@- <== NOT EXECUTED 49d48: 4eb9 0004 a584 jsr 4a584 <free> <== NOT EXECUTED 49d4e: 588f addql #4,%sp <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
}
49d50: 2002 movel %d2,%d0 <== NOT EXECUTED 49d52: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49d58: 4e5e unlk %fp <== NOT EXECUTED 49d5a: 4e75 rts <== 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)
free(jnode);
}
IMFS_FIFO_RETURN(err);
49d5c: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 49d62: 4482 negl %d2 <== NOT EXECUTED 49d64: 2040 moveal %d0,%a0 <== NOT EXECUTED 49d66: 2082 movel %d2,%a0@ <== NOT EXECUTED 49d68: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
49d6a: 2002 movel %d2,%d0 <== NOT EXECUTED 49d6c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49d72: 4e5e unlk %fp <== NOT EXECUTED
00049b88 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
49b88: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49b8c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49b90: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 49b94: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 49b98: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int err;
if (command == FIONBIO) {
49b9a: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 49ba0: 6724 beqs 49bc6 <IMFS_fifo_ioctl+0x3e> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
49ba2: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49ba4: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49ba8: 2f09 movel %a1,%sp@- <== NOT EXECUTED 49baa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49bac: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49bb0: 4eb9 0004 bdbe jsr 4bdbe <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
49bb6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49bba: 4a80 tstl %d0 <== NOT EXECUTED 49bbc: 6d46 blts 49c04 <IMFS_fifo_ioctl+0x7c> <== NOT EXECUTED
}
49bbe: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bc2: 4e5e unlk %fp <== NOT EXECUTED 49bc4: 4e75 rts <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
49bc6: 4a89 tstl %a1 <== NOT EXECUTED 49bc8: 6724 beqs 49bee <IMFS_fifo_ioctl+0x66> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
49bca: 4a91 tstl %a1@ <== NOT EXECUTED 49bcc: 6710 beqs 49bde <IMFS_fifo_ioctl+0x56> <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
49bce: 7201 moveq #1,%d1 <== NOT EXECUTED 49bd0: 4280 clrl %d0 <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
49bd2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bd6: 4e5e unlk %fp <== NOT EXECUTED
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
49bd8: 83a8 0014 orl %d1,%a0@(20) <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
49bdc: 4e75 rts <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
49bde: 72fe moveq #-2,%d1 <== NOT EXECUTED 49be0: 4280 clrl %d0 <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
49be2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49be6: 4e5e unlk %fp <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
49be8: c3a8 0014 andl %d1,%a0@(20) <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
49bec: 4e75 rts <== NOT EXECUTED
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
49bee: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
49bf4: 740e moveq #14,%d2 <== NOT EXECUTED
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
49bf6: 2040 moveal %d0,%a0 <== NOT EXECUTED 49bf8: 70ff moveq #-1,%d0 <== NOT EXECUTED 49bfa: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
49bfc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49c00: 4e5e unlk %fp <== NOT EXECUTED 49c02: 4e75 rts <== NOT EXECUTED
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
49c04: 2400 movel %d0,%d2 <== NOT EXECUTED 49c06: 4482 negl %d2 <== NOT EXECUTED 49c08: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 49c0e: 2040 moveal %d0,%a0 <== NOT EXECUTED 49c10: 70ff moveq #-1,%d0 <== NOT EXECUTED 49c12: 2082 movel %d2,%a0@ <== NOT EXECUTED 49c14: 60e6 bras 49bfc <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
00049b24 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
49b24: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49b28: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49b2c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
49b30: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49b32: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 49b36: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49b3a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49b3e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 49b42: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49b46: 4eb9 0004 bd60 jsr 4bd60 <pipe_lseek> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
49b4c: 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);
49b50: 2800 movel %d0,%d4 <== NOT EXECUTED 49b52: 2600 movel %d0,%d3 <== NOT EXECUTED 49b54: 5bc2 smi %d2 <== NOT EXECUTED 49b56: 49c2 extbl %d2 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
49b58: 4a82 tstl %d2 <== NOT EXECUTED 49b5a: 6b0e bmis 49b6a <IMFS_fifo_lseek+0x46> <== NOT EXECUTED
}
49b5c: 2203 movel %d3,%d1 <== NOT EXECUTED 49b5e: 2002 movel %d2,%d0 <== NOT EXECUTED 49b60: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49b66: 4e5e unlk %fp <== NOT EXECUTED 49b68: 4e75 rts <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
49b6a: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 49b70: 4484 negl %d4 <== NOT EXECUTED 49b72: 2040 moveal %d0,%a0 <== NOT EXECUTED 49b74: 74ff moveq #-1,%d2 <== NOT EXECUTED 49b76: 76ff moveq #-1,%d3 <== NOT EXECUTED 49b78: 2084 movel %d4,%a0@ <== NOT EXECUTED
}
49b7a: 2203 movel %d3,%d1 <== NOT EXECUTED 49b7c: 2002 movel %d2,%d0 <== NOT EXECUTED 49b7e: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49b84: 4e5e unlk %fp <== NOT EXECUTED
00049d76 <IMFS_fifo_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
49d76: 4e56 0000 linkw %fp,#0 49d7a: 206e 0008 moveal %fp@(8),%a0 49d7e: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
49d80: 2f08 movel %a0,%sp@- 49d82: 2068 0038 moveal %a0@(56),%a0 49d86: 41e8 004c lea %a0@(76),%a0 49d8a: 2f08 movel %a0,%sp@- 49d8c: 4eb9 0004 c312 jsr 4c312 <fifo_open>
IMFS_FIFO_RETURN(err);
49d92: 508f addql #8,%sp
uint32_t mode
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
49d94: 2400 movel %d0,%d2
IMFS_FIFO_RETURN(err);
49d96: 6d0a blts 49da2 <IMFS_fifo_open+0x2c> <== ALWAYS TAKEN
}
49d98: 2002 movel %d2,%d0 <== NOT EXECUTED 49d9a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d9e: 4e5e unlk %fp <== NOT EXECUTED 49da0: 4e75 rts <== NOT EXECUTED
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
IMFS_FIFO_RETURN(err);
49da2: 4eb9 0004 d868 jsr 4d868 <__errno> 49da8: 4482 negl %d2 49daa: 2040 moveal %d0,%a0 49dac: 2082 movel %d2,%a0@ 49dae: 74ff moveq #-1,%d2
}
49db0: 2002 movel %d2,%d0 49db2: 242e fffc movel %fp@(-4),%d2 49db6: 4e5e unlk %fp
...
00049c8a <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
49c8a: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49c8e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49c92: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49c94: 2f02 movel %d2,%sp@- <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
49c96: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49c98: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49c9c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
IMFS_jnode_t *jnode = iop->file_info;
49ca0: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
49ca4: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49ca8: 4eb9 0004 bffc jsr 4bffc <pipe_read> <== NOT EXECUTED
if (err > 0)
49cae: 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);
49cb2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (err > 0)
49cb4: 6f22 bles 49cd8 <IMFS_fifo_read+0x4e> <== NOT EXECUTED
IMFS_update_atime(jnode);
49cb6: 42a7 clrl %sp@- <== NOT EXECUTED 49cb8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49cbc: 4eb9 0004 a6fc jsr 4a6fc <gettimeofday> <== NOT EXECUTED 49cc2: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 49cc8: 508f addql #8,%sp <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
}
49cca: 2002 movel %d2,%d0 <== NOT EXECUTED 49ccc: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49cd0: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49cd4: 4e5e unlk %fp <== NOT EXECUTED 49cd6: 4e75 rts <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
49cd8: 4a80 tstl %d0 <== NOT EXECUTED 49cda: 67ee beqs 49cca <IMFS_fifo_read+0x40> <== NOT EXECUTED 49cdc: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 49ce2: 4482 negl %d2 <== NOT EXECUTED 49ce4: 2040 moveal %d0,%a0 <== NOT EXECUTED 49ce6: 2082 movel %d2,%a0@ <== NOT EXECUTED 49ce8: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
49cea: 2002 movel %d2,%d0 <== NOT EXECUTED 49cec: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49cf0: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49cf4: 4e5e unlk %fp <== NOT EXECUTED
00049c16 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
49c16: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49c1a: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49c1e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49c20: 2f02 movel %d2,%sp@- <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
49c22: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49c24: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49c28: 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;
49c2c: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
49c30: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49c34: 4eb9 0004 be1e jsr 4be1e <pipe_write> <== NOT EXECUTED
if (err > 0) {
49c3a: 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);
49c3e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (err > 0) {
49c40: 6f28 bles 49c6a <IMFS_fifo_write+0x54> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
49c42: 42a7 clrl %sp@- <== NOT EXECUTED 49c44: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49c48: 4eb9 0004 a6fc jsr 4a6fc <gettimeofday> <== NOT EXECUTED 49c4e: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 49c52: 508f addql #8,%sp <== NOT EXECUTED 49c54: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 49c58: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
}
49c5c: 2002 movel %d2,%d0 <== NOT EXECUTED 49c5e: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49c62: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49c66: 4e5e unlk %fp <== NOT EXECUTED 49c68: 4e75 rts <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
49c6a: 4a80 tstl %d0 <== NOT EXECUTED 49c6c: 67ee beqs 49c5c <IMFS_fifo_write+0x46> <== NOT EXECUTED 49c6e: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 49c74: 4482 negl %d2 <== NOT EXECUTED 49c76: 2040 moveal %d0,%a0 <== NOT EXECUTED 49c78: 2082 movel %d2,%a0@ <== NOT EXECUTED 49c7a: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
49c7c: 2002 movel %d2,%d0 <== NOT EXECUTED 49c7e: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49c82: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49c86: 4e5e unlk %fp <== NOT EXECUTED
00049dbc <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
49dbc: 4e56 fff0 linkw %fp,#-16 49dc0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49dc4: 246e 0008 moveal %fp@(8),%a2 49dc8: 242e 000c movel %fp@(12),%d2
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
49dcc: 4a8a tstl %a2
49dce: 6776 beqs 49e46 <IMFS_find_match_in_dir+0x8a> <== NEVER TAKEN
if ( !name )
49dd0: 4a82 tstl %d2
49dd2: 6756 beqs 49e2a <IMFS_find_match_in_dir+0x6e> <== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
49dd4: 4879 0005 b57c pea 5b57c <dotname> 49dda: 47f9 0004 e770 lea 4e770 <strcmp>,%a3 49de0: 2f02 movel %d2,%sp@- 49de2: 4e93 jsr %a3@ 49de4: 508f addql #8,%sp 49de6: 4a80 tstl %d0
49de8: 6714 beqs 49dfe <IMFS_find_match_in_dir+0x42> <== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
49dea: 4879 0005 b57e pea 5b57e <dotdotname> 49df0: 2f02 movel %d2,%sp@- 49df2: 4e93 jsr %a3@ 49df4: 508f addql #8,%sp 49df6: 4a80 tstl %d0
49df8: 6610 bnes 49e0a <IMFS_find_match_in_dir+0x4e> <== ALWAYS TAKEN
return directory->Parent;
49dfa: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
49dfe: 200a movel %a2,%d0 <== NOT EXECUTED 49e00: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 49e06: 4e5e unlk %fp <== NOT EXECUTED 49e08: 4e75 rts <== NOT EXECUTED
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
49e0a: 286a 004c moveal %a2@(76),%a4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
49e0e: 45ea 0050 lea %a2@(80),%a2 49e12: b5cc cmpal %a4,%a2
49e14: 6714 beqs 49e2a <IMFS_find_match_in_dir+0x6e>
!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 ) )
49e16: 486c 000c pea %a4@(12) 49e1a: 2f02 movel %d2,%sp@- 49e1c: 4e93 jsr %a3@ 49e1e: 508f addql #8,%sp 49e20: 4a80 tstl %d0
49e22: 6714 beqs 49e38 <IMFS_find_match_in_dir+0x7c>
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 ) {
49e24: 2854 moveal %a4@,%a4
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
49e26: b5cc cmpal %a4,%a2
49e28: 66ec bnes 49e16 <IMFS_find_match_in_dir+0x5a>
49e2a: 95ca subal %a2,%a2
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
49e2c: 200a movel %a2,%d0 49e2e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49e34: 4e5e unlk %fp 49e36: 4e75 rts
!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 ) )
49e38: 244c moveal %a4,%a2
return the_jnode;
}
return 0;
}
49e3a: 200a movel %a2,%d0 49e3c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49e42: 4e5e unlk %fp 49e44: 4e75 rts
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
49e46: 4879 0005 bb93 pea 5bb93 <_global_impure_ptr+0x1b1> <== NOT EXECUTED 49e4c: 4879 0005 b581 pea 5b581 <__FUNCTION__.5348> <== NOT EXECUTED 49e52: 4878 002a pea 2a <OPER2+0x16> <== NOT EXECUTED 49e56: 4879 0005 b530 pea 5b530 <IMFS_fifo_handlers+0x38> <== NOT EXECUTED 49e5c: 4eb9 0004 a398 jsr 4a398 <__assert_func> <== NOT EXECUTED
...
0004f66c <IMFS_fsunmount>:
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
4f66c: 4e56 ffd8 linkw %fp,#-40 4f670: 206e 0008 moveal %fp@(8),%a0 4f674: 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;
4f678: 47ee ffec lea %fp@(-20),%a3 4f67c: 49f9 0004 ebc0 lea 4ebc0 <IMFS_Set_handlers>,%a4
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
4f682: 4bf9 0004 3730 lea 43730 <IMFS_unlink>,%a5
* 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;
4f688: 26a8 001c movel %a0@(28),%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;
4f68c: 2468 001c moveal %a0@(28),%a2
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
4f690: 42a8 001c clrl %a0@(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;
loc = temp_mt_entry->mt_fs_root;
4f694: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4f69a: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4f6a0: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4f6a6: 2d68 002c fffc movel %a0@(44),%fp@(-4)
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
4f6ac: 242a 0008 movel %a2@(8),%d2
loc.node_access = (void *)jnode;
4f6b0: 2d4a ffec movel %a2,%fp@(-20)
IMFS_Set_handlers( &loc );
4f6b4: 2f0b movel %a3,%sp@- 4f6b6: 4e94 jsr %a4@
if ( jnode->type != IMFS_DIRECTORY ) {
4f6b8: 588f addql #4,%sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4f6ba: 200a movel %a2,%d0 4f6bc: 0680 0000 0050 addil #80,%d0 4f6c2: 7201 moveq #1,%d1 4f6c4: b2aa 0048 cmpl %a2@(72),%d1
4f6c8: 6634 bnes 4f6fe <IMFS_fsunmount+0x92>
4f6ca: b0aa 004c cmpl %a2@(76),%d0
4f6ce: 672e beqs 4f6fe <IMFS_fsunmount+0x92>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
4f6d0: 4a8a tstl %a2
4f6d2: 671e beqs 4f6f2 <IMFS_fsunmount+0x86>
if ( jnode->type == IMFS_DIRECTORY ) {
4f6d4: 7001 moveq #1,%d0 4f6d6: b0aa 0048 cmpl %a2@(72),%d0
4f6da: 66d0 bnes 4f6ac <IMFS_fsunmount+0x40> <== NEVER TAKEN
4f6dc: 200a movel %a2,%d0 4f6de: 0680 0000 0050 addil #80,%d0 4f6e4: b0aa 004c cmpl %a2@(76),%d0
4f6e8: 67c2 beqs 4f6ac <IMFS_fsunmount+0x40>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
4f6ea: 246a 004c moveal %a2@(76),%a2
}
}
} while (jnode != NULL);
4f6ee: 4a8a tstl %a2
4f6f0: 66ba bnes 4f6ac <IMFS_fsunmount+0x40> <== ALWAYS TAKEN
4f6f2: 4280 clrl %d0
return 0;
}
4f6f4: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4f6fa: 4e5e unlk %fp 4f6fc: 4e75 rts
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
4f6fe: 2f0b movel %a3,%sp@- 4f700: 42a7 clrl %sp@- 4f702: 4e95 jsr %a5@
if (result != 0)
4f704: 508f addql #8,%sp 4f706: 4a80 tstl %d0
4f708: 6604 bnes 4f70e <IMFS_fsunmount+0xa2> <== NEVER TAKEN
4f70a: 2442 moveal %d2,%a2 4f70c: 60c2 bras 4f6d0 <IMFS_fsunmount+0x64>
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
4f70e: 70ff moveq #-1,%d0 <== NOT EXECUTED
return 0;
}
4f710: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4f716: 4e5e unlk %fp <== NOT EXECUTED
...
00049e64 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
49e64: 4e56 ffec linkw %fp,#-20 49e68: 206e 0008 moveal %fp@(8),%a0 49e6c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49e70: 226e 000c moveal %fp@(12),%a1
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
49e74: 742f moveq #47,%d2
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
49e76: 1210 moveb %a0@,%d1
const char *path,
int pathlen,
char *token,
int *token_len
)
{
49e78: 246e 0010 moveal %fp@(16),%a2
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
49e7c: 1001 moveb %d1,%d0
const char *path,
int pathlen,
char *token,
int *token_len
)
{
49e7e: 286e 0014 moveal %fp@(20),%a4
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
49e82: 49c0 extbl %d0 49e84: b480 cmpl %d0,%d2 49e86: 6700 00ac beqw 49f34 <IMFS_get_token+0xd0> 49e8a: 765c moveq #92,%d3 49e8c: b680 cmpl %d0,%d3 49e8e: 6700 00a4 beqw 49f34 <IMFS_get_token+0xd0> 49e92: 4a01 tstb %d1 49e94: 6700 00bc beqw 49f52 <IMFS_get_token+0xee> 49e98: 4a89 tstl %a1 49e9a: 6f00 0098 blew 49f34 <IMFS_get_token+0xd0>
token[i] = c;
49e9e: 4280 clrl %d0 49ea0: 1481 moveb %d1,%a2@
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
49ea2: 5280 addql #1,%d0
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
49ea4: 762f moveq #47,%d3
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
49ea6: 1230 0800 moveb %a0@(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) ) {
49eaa: 1401 moveb %d1,%d2 49eac: 49c2 extbl %d2 49eae: b682 cmpl %d2,%d3
49eb0: 6726 beqs 49ed8 <IMFS_get_token+0x74>
49eb2: 163c 005c moveb #92,%d3 49eb6: b682 cmpl %d2,%d3
49eb8: 671e beqs 49ed8 <IMFS_get_token+0x74>
49eba: 4a01 tstb %d1
49ebc: 671a beqs 49ed8 <IMFS_get_token+0x74>
49ebe: b089 cmpl %a1,%d0
49ec0: 6c16 bges 49ed8 <IMFS_get_token+0x74>
token[i] = c;
49ec2: 1581 0800 moveb %d1,%a2@(00000000,%d0:l)
if ( i == IMFS_NAME_MAX )
49ec6: 7220 moveq #32,%d1 49ec8: b280 cmpl %d0,%d1
49eca: 66d6 bnes 49ea2 <IMFS_get_token+0x3e>
49ecc: 7004 moveq #4,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
49ece: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49ed4: 4e5e unlk %fp 49ed6: 4e75 rts
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
49ed8: 4a32 08ff tstb %a2@(ffffffff,%d0:l)
49edc: 6706 beqs 49ee4 <IMFS_get_token+0x80> <== NEVER TAKEN
token[i] = '\0';
49ede: 4201 clrb %d1 49ee0: 1581 0800 moveb %d1,%a2@(00000000,%d0:l)
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
49ee4: 4879 0005 b598 pea 5b598 <__FUNCTION__.5348+0x17> 49eea: 47f9 0004 e770 lea 4e770 <strcmp>,%a3
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
49ef0: 2880 movel %d0,%a4@
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
49ef2: 2f0a movel %a2,%sp@- 49ef4: 4e93 jsr %a3@ 49ef6: 508f addql #8,%sp 49ef8: 4a80 tstl %d0
49efa: 671e beqs 49f1a <IMFS_get_token+0xb6>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
49efc: 4879 0005 b599 pea 5b599 <__FUNCTION__.5348+0x18> 49f02: 2f0a movel %a2,%sp@- 49f04: 4e93 jsr %a3@ 49f06: 508f addql #8,%sp 49f08: 4a80 tstl %d0
49f0a: 661c bnes 49f28 <IMFS_get_token+0xc4>
49f0c: 103c 0001 moveb #1,%d0
type = IMFS_CURRENT_DIR;
}
return type;
}
49f10: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f16: 4e5e unlk %fp 49f18: 4e75 rts
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
49f1a: 103c 0002 moveb #2,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
49f1e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f24: 4e5e unlk %fp 49f26: 4e75 rts
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
49f28: 7003 moveq #3,%d0
type = IMFS_CURRENT_DIR;
}
return type;
}
49f2a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f30: 4e5e unlk %fp 49f32: 4e75 rts
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
49f34: 1481 moveb %d1,%a2@
if ( (token[i] != '\0') && pathlen ) {
49f36: 4a89 tstl %a1
49f38: 6710 beqs 49f4a <IMFS_get_token+0xe6>
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
49f3a: 7001 moveq #1,%d0 49f3c: 7201 moveq #1,%d1
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
49f3e: 2881 movel %d1,%a4@
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
49f40: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f46: 4e5e unlk %fp 49f48: 4e75 rts
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
49f4a: 4281 clrl %d1 49f4c: 4280 clrl %d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
49f4e: 2881 movel %d1,%a4@ 49f50: 60ee bras 49f40 <IMFS_get_token+0xdc>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
49f52: 4280 clrl %d0 49f54: 4281 clrl %d1 49f56: 4212 clrb %a2@ 49f58: 60e4 bras 49f3e <IMFS_get_token+0xda>
...
00049f5c <IMFS_initialize_support>:
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
49f5c: 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
)
{
49f5e: 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,
49f62: 2079 0005 c1e8 moveal 5c1e8 <imfs_rq_memfile_bytes_per_block>,%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
)
{
49f68: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49f6c: 246e 0008 moveal %fp@(8),%a2 49f70: 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) {
49f74: b088 cmpl %a0,%d0
49f76: 6716 beqs 49f8e <IMFS_initialize_support+0x32> <== NEVER TAKEN
49f78: 4200 clrb %d0 49f7a: 7220 moveq #32,%d1 49f7c: 5280 addql #1,%d0 49f7e: b288 cmpl %a0,%d1
49f80: 670c beqs 49f8e <IMFS_initialize_support+0x32>
49f82: 7605 moveq #5,%d3 49f84: d281 addl %d1,%d1 49f86: b680 cmpl %d0,%d3
49f88: 66f2 bnes 49f7c <IMFS_initialize_support+0x20> <== ALWAYS TAKEN
49f8a: 307c 0080 moveaw #128,%a0 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
49f8e: 23c8 0005 d170 movel %a0,5d170 <imfs_memfile_bytes_per_block>
/* * 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();
49f94: 4eb9 0004 c7c0 jsr 4c7c0 <IMFS_create_root_node>
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 ) );
49f9a: 4878 0010 pea 10 <INVALID_OPERATION>
* 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; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
49f9e: 41f9 0005 b75a lea 5b75a <IMFS_LIMITS_AND_OPTIONS>,%a0
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
49fa4: 4878 0001 pea 1 <ADD>
* 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; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
49fa8: 2550 0038 movel %a0@,%a2@(56) 49fac: 41f9 0005 b75e lea 5b75e <IMFS_LIMITS_AND_OPTIONS+0x4>,%a0 49fb2: 2550 003c movel %a0@,%a2@(60) 49fb6: 41f9 0005 b762 lea 5b762 <IMFS_LIMITS_AND_OPTIONS+0x8>,%a0 49fbc: 2550 0040 movel %a0@,%a2@(64) 49fc0: 41f9 0005 b766 lea 5b766 <IMFS_LIMITS_AND_OPTIONS+0xc>,%a0 49fc6: 2550 0044 movel %a0@,%a2@(68) 49fca: 41f9 0005 b76a lea 5b76a <IMFS_LIMITS_AND_OPTIONS+0x10>,%a0 49fd0: 2550 0048 movel %a0@,%a2@(72) 49fd4: 41f9 0005 b76e lea 5b76e <IMFS_LIMITS_AND_OPTIONS+0x14>,%a0 49fda: 2550 004c movel %a0@,%a2@(76) 49fde: 41f9 0005 b772 lea 5b772 <IMFS_LIMITS_AND_OPTIONS+0x18>,%a0 49fe4: 2550 0050 movel %a0@,%a2@(80) 49fe8: 41f9 0005 b776 lea 5b776 <IMFS_LIMITS_AND_OPTIONS+0x1c>,%a0 49fee: 2550 0054 movel %a0@,%a2@(84) 49ff2: 41f9 0005 b77a lea 5b77a <IMFS_LIMITS_AND_OPTIONS+0x20>,%a0 49ff8: 2550 0058 movel %a0@,%a2@(88) 49ffc: 41f9 0005 b77e lea 5b77e <IMFS_LIMITS_AND_OPTIONS+0x24>,%a0 4a002: 2550 005c movel %a0@,%a2@(92) 4a006: 41f9 0005 b782 lea 5b782 <IMFS_LIMITS_AND_OPTIONS+0x28>,%a0 4a00c: 2550 0060 movel %a0@,%a2@(96) 4a010: 41f9 0005 b786 lea 5b786 <IMFS_LIMITS_AND_OPTIONS+0x2c>,%a0
* * 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;
4a016: 256e 000c 0028 movel %fp@(12),%a2@(40)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
4a01c: 2550 0064 movel %a0@,%a2@(100)
/* * 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();
4a020: 2540 001c movel %d0,%a2@(28)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
4a024: 2542 0024 movel %d2,%a2@(36)
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 ) );
4a028: 4eb9 0004 a498 jsr 4a498 <calloc>
if ( !fs_info ) {
4a02e: 508f addql #8,%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 ) );
4a030: 2040 moveal %d0,%a0
if ( !fs_info ) {
4a032: 4a80 tstl %d0
4a034: 6742 beqs 4a078 <IMFS_initialize_support+0x11c> <== NEVER TAKEN
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
4a036: 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;
4a038: 7601 moveq #1,%d3
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
4a03a: 2140 0004 movel %d0,%a0@(4)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
4a03e: 2039 0005 d174 movel 5d174 <imfs_instance.5843>,%d0 4a044: 2200 movel %d0,%d1 4a046: 5281 addql #1,%d1
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
4a048: 226a 001c moveal %a2@(28),%a1
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
4a04c: 23c1 0005 d174 movel %d1,5d174 <imfs_instance.5843>
fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers;
4a052: 216e 0010 0008 movel %fp@(16),%a0@(8)
fs_info->directory_handlers = directory_handlers;
4a058: 2142 000c movel %d2,%a0@(12)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
4a05c: 2343 0034 movel %d3,%a1@(52)
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;
4a060: 2548 0034 movel %a0,%a2@(52)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
4a064: 2080 movel %d0,%a0@
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
4a066: 4eb9 0004 bd6a jsr 4bd6a <rtems_pipe_initialize>
return 0;
}
4a06c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
4a072: 4280 clrl %d0
return 0;
}
4a074: 4e5e unlk %fp 4a076: 4e75 rts
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
4a078: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 4a07c: 4eb9 0004 a584 jsr 4a584 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
4a082: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 4a088: 588f addql #4,%sp <== NOT EXECUTED 4a08a: 720c moveq #12,%d1 <== NOT EXECUTED 4a08c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a08e: 70ff moveq #-1,%d0 <== NOT EXECUTED
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
return 0;
}
4a090: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
4a096: 2081 movel %d1,%a0@ <== NOT EXECUTED
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
return 0;
}
4a098: 4e5e unlk %fp <== NOT EXECUTED
000433b0 <IMFS_link>:
/*
* 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 )
433b0: 4280 clrl %d0 433b2: 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 */
)
{
433b4: 4e56 ffbc linkw %fp,#-68 433b8: 206e 0008 moveal %fp@(8),%a0 433bc: 2f03 movel %d3,%sp@-
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
433be: 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 */
)
{
433c0: 2f02 movel %d2,%sp@- 433c2: 242e 0010 movel %fp@(16),%d2
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
433c6: 2d48 ffe0 movel %a0,%fp@(-32)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
433ca: 3028 0032 movew %a0@(50),%d0 433ce: b280 cmpl %d0,%d1
433d0: 6578 bcss 4344a <IMFS_link+0x9a>
rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
433d2: 2f02 movel %d2,%sp@- 433d4: 260e movel %fp,%d3 433d6: 0683 ffff ffbf addil #-65,%d3 433dc: 4eb9 0005 4444 jsr 54444 <strlen> 433e2: 588f addql #4,%sp 433e4: 486e fffc pea %fp@(-4) 433e8: 2f03 movel %d3,%sp@- 433ea: 2f00 movel %d0,%sp@- 433ec: 2f02 movel %d2,%sp@- 433ee: 4eb9 0004 f7c4 jsr 4f7c4 <IMFS_get_token>
* 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(
433f4: 486e ffe0 pea %fp@(-32) 433f8: 2f3c 0000 a1ff movel #41471,%sp@- 433fe: 2f03 movel %d3,%sp@- 43400: 4878 0003 pea 3 <DIVIDE> 43404: 2f2e 000c movel %fp@(12),%sp@- 43408: 4eb9 0004 e9ba jsr 4e9ba <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
4340e: 4fef 0024 lea %sp@(36),%sp 43412: 4a80 tstl %d0
43414: 674e beqs 43464 <IMFS_link+0xb4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
43416: 206e ffe0 moveal %fp@(-32),%a0 4341a: 3028 0032 movew %a0@(50),%d0 4341e: 5280 addql #1,%d0 43420: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( info.hard_link.link_node );
43424: 42a7 clrl %sp@- 43426: 486e fff4 pea %fp@(-12) 4342a: 4eb9 0004 40b4 jsr 440b4 <gettimeofday> 43430: 206e ffe0 moveal %fp@(-32),%a0
return 0;
43434: 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 );
43436: 4280 clrl %d0 43438: 216e fff4 0044 movel %fp@(-12),%a0@(68)
return 0;
}
4343e: 242e ffb4 movel %fp@(-76),%d2 43442: 262e ffb8 movel %fp@(-72),%d3 43446: 4e5e unlk %fp 43448: 4e75 rts
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
rtems_set_errno_and_return_minus_one( EMLINK );
4344a: 4eb9 0005 30c8 jsr 530c8 <__errno> 43450: 741f moveq #31,%d2 43452: 2040 moveal %d0,%a0 43454: 70ff moveq #-1,%d0 43456: 2082 movel %d2,%a0@
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
43458: 242e ffb4 movel %fp@(-76),%d2 4345c: 262e ffb8 movel %fp@(-72),%d3 43460: 4e5e unlk %fp 43462: 4e75 rts
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
43464: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
4346a: 242e ffb4 movel %fp@(-76),%d2 <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
4346e: 2040 moveal %d0,%a0 <== NOT EXECUTED 43470: 720c moveq #12,%d1 <== NOT EXECUTED 43472: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
43474: 262e ffb8 movel %fp@(-72),%d3 <== NOT EXECUTED 43478: 4e5e unlk %fp <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
4347a: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
...
00051b40 <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
51b40: 4e56 0000 linkw %fp,#0 51b44: 206e 0008 moveal %fp@(8),%a0 51b48: 2f0a movel %a2,%sp@-
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
51b4a: 4a88 tstl %a0
51b4c: 6764 beqs 51bb2 <IMFS_memfile_addblock+0x72> <== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
51b4e: 7005 moveq #5,%d0 51b50: b0a8 0048 cmpl %a0@(72),%d0
51b54: 6640 bnes 51b96 <IMFS_memfile_addblock+0x56> <== NEVER TAKEN
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 );
51b56: 4878 0001 pea 1 <ADD> 51b5a: 2f2e 000c movel %fp@(12),%sp@- 51b5e: 2f08 movel %a0,%sp@- 51b60: 4eb9 0005 165c jsr 5165c <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
51b66: 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 );
51b6a: 2440 moveal %d0,%a2
if ( *block_entry_ptr )
51b6c: 4a92 tstl %a2@
51b6e: 670a beqs 51b7a <IMFS_memfile_addblock+0x3a>
#endif
memory = memfile_alloc_block();
if ( !memory )
return 1;
*block_entry_ptr = memory;
51b70: 4280 clrl %d0
return 0;
}
51b72: 246e fffc moveal %fp@(-4),%a2 51b76: 4e5e unlk %fp 51b78: 4e75 rts
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
51b7a: 4eb9 0005 1638 jsr 51638 <memfile_alloc_block>
if ( !memory )
51b80: 4a80 tstl %d0
51b82: 6706 beqs 51b8a <IMFS_memfile_addblock+0x4a> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
51b84: 2480 movel %d0,%a2@ 51b86: 4280 clrl %d0 51b88: 60e8 bras 51b72 <IMFS_memfile_addblock+0x32>
return 0;
}
51b8a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
51b8e: 103c 0001 moveb #1,%d0 <== NOT EXECUTED
return 1;
*block_entry_ptr = memory;
return 0;
}
51b92: 4e5e unlk %fp <== NOT EXECUTED 51b94: 4e75 rts <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
51b96: 4879 0006 1754 pea 61754 <CSWTCH.8+0x60> <== NOT EXECUTED 51b9c: 4879 0006 186d pea 6186d <__FUNCTION__.5982> <== NOT EXECUTED 51ba2: 4878 016d pea 16d <DBL_MANT_DIG+0x138> <== NOT EXECUTED 51ba6: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 51bac: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
51bb2: 4879 0006 1704 pea 61704 <CSWTCH.8+0x10> <== NOT EXECUTED 51bb8: 4879 0006 186d pea 6186d <__FUNCTION__.5982> <== NOT EXECUTED 51bbe: 4878 0169 pea 169 <DBL_MANT_DIG+0x134> <== NOT EXECUTED 51bc2: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 51bc8: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
00051bce <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
51bce: 4e56 ffdc linkw %fp,#-36 51bd2: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 51bd6: 246e 0008 moveal %fp@(8),%a2 51bda: 262e 000c movel %fp@(12),%d3 51bde: 282e 0010 movel %fp@(16),%d4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
51be2: 4a8a tstl %a2 51be4: 6700 0102 beqw 51ce8 <IMFS_memfile_extend+0x11a>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
51be8: 7005 moveq #5,%d0 51bea: b0aa 0048 cmpl %a2@(72),%d0 51bee: 6600 0114 bnew 51d04 <IMFS_memfile_extend+0x136>
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
51bf2: 2439 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d2 51bf8: 2202 movel %d2,%d1 51bfa: e489 lsrl #2,%d1 51bfc: 2001 movel %d1,%d0 51bfe: 5280 addql #1,%d0 51c00: 4c01 0800 mulsl %d1,%d0 51c04: 4285 clrl %d5 51c06: 5280 addql #1,%d0 51c08: 4c01 0800 mulsl %d1,%d0 51c0c: 5380 subql #1,%d0 51c0e: 4c02 0800 mulsl %d2,%d0 51c12: 2c00 movel %d0,%d6 51c14: 2005 movel %d5,%d0 51c16: 2206 movel %d6,%d1 51c18: 9284 subl %d4,%d1 51c1a: 9183 subxl %d3,%d0 51c1c: 6f00 00b2 blew 51cd0 <IMFS_memfile_extend+0x102>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
51c20: 2a2a 004c movel %a2@(76),%d5 51c24: 2c2a 0050 movel %a2@(80),%d6 51c28: 2003 movel %d3,%d0 51c2a: 2204 movel %d4,%d1 51c2c: 9286 subl %d6,%d1 51c2e: 9185 subxl %d5,%d0
51c30: 6f62 bles 51c94 <IMFS_memfile_extend+0xc6>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
51c32: 47f9 0005 ec9c lea 5ec9c <__divdi3>,%a3 51c38: 2202 movel %d2,%d1 51c3a: 5bc0 smi %d0 51c3c: 49c0 extbl %d0 51c3e: 2840 moveal %d0,%a4 51c40: 2a41 moveal %d1,%a5 51c42: 2f0d movel %a5,%sp@- 51c44: 2f00 movel %d0,%sp@- 51c46: 2f04 movel %d4,%sp@- 51c48: 2f03 movel %d3,%sp@- 51c4a: 4e93 jsr %a3@ 51c4c: 4fef 0010 lea %sp@(16),%sp 51c50: 2401 movel %d1,%d2
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
51c52: 2f0d movel %a5,%sp@- 51c54: 2f0c movel %a4,%sp@- 51c56: 2f06 movel %d6,%sp@- 51c58: 2f05 movel %d5,%sp@- 51c5a: 4e93 jsr %a3@ 51c5c: 4fef 0010 lea %sp@(16),%sp 51c60: 2841 moveal %d1,%a4
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
51c62: b282 cmpl %d2,%d1
51c64: 621a bhis 51c80 <IMFS_memfile_extend+0xb2> <== NEVER TAKEN
51c66: 2a01 movel %d1,%d5 51c68: 47f9 0005 1b40 lea 51b40 <IMFS_memfile_addblock>,%a3
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
51c6e: 2f05 movel %d5,%sp@- 51c70: 2f0a movel %a2,%sp@- 51c72: 4e93 jsr %a3@ 51c74: 508f addql #8,%sp 51c76: 4a80 tstl %d0
51c78: 6626 bnes 51ca0 <IMFS_memfile_extend+0xd2> <== NEVER TAKEN
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
51c7a: 5285 addql #1,%d5 51c7c: ba82 cmpl %d2,%d5
51c7e: 63ee blss 51c6e <IMFS_memfile_extend+0xa0>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
51c80: 4280 clrl %d0 51c82: 2543 004c movel %d3,%a2@(76) 51c86: 2544 0050 movel %d4,%a2@(80)
return 0; }
51c8a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 51c90: 4e5e unlk %fp 51c92: 4e75 rts
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
51c94: 4280 clrl %d0
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
51c96: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 51c9c: 4e5e unlk %fp 51c9e: 4e75 rts
* 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-- ) {
51ca0: ba8c cmpl %a4,%d5 <== NOT EXECUTED 51ca2: 6514 bcss 51cb8 <IMFS_memfile_extend+0xea> <== NOT EXECUTED 51ca4: 47f9 0005 18c0 lea 518c0 <IMFS_memfile_remove_block>,%a3 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
51caa: 2f05 movel %d5,%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-- ) {
51cac: 5385 subql #1,%d5 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
51cae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51cb0: 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-- ) {
51cb2: 508f addql #8,%sp <== NOT EXECUTED 51cb4: ba8c cmpl %a4,%d5 <== NOT EXECUTED 51cb6: 64f2 bccs 51caa <IMFS_memfile_extend+0xdc> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
51cb8: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 51cbe: 721c moveq #28,%d1 <== NOT EXECUTED 51cc0: 2040 moveal %d0,%a0 <== NOT EXECUTED 51cc2: 70ff moveq #-1,%d0 <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
51cc4: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
51cca: 2081 movel %d1,%a0@ <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
51ccc: 4e5e unlk %fp <== NOT EXECUTED 51cce: 4e75 rts <== NOT EXECUTED
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
51cd0: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 51cd6: 7416 moveq #22,%d2 <== NOT EXECUTED 51cd8: 2040 moveal %d0,%a0 <== NOT EXECUTED 51cda: 70ff moveq #-1,%d0 <== NOT EXECUTED 51cdc: 2082 movel %d2,%a0@ <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
51cde: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 51ce4: 4e5e unlk %fp <== NOT EXECUTED 51ce6: 4e75 rts <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
51ce8: 4879 0006 1704 pea 61704 <CSWTCH.8+0x10> <== NOT EXECUTED 51cee: 4879 0006 1883 pea 61883 <__FUNCTION__.5933> <== NOT EXECUTED 51cf4: 4878 0131 pea 131 <DBL_MANT_DIG+0xfc> <== NOT EXECUTED 51cf8: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 51cfe: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
51d04: 4879 0006 1754 pea 61754 <CSWTCH.8+0x60> <== NOT EXECUTED 51d0a: 4879 0006 1883 pea 61883 <__FUNCTION__.5933> <== NOT EXECUTED 51d10: 4878 0135 pea 135 <DBL_MANT_DIG+0x100> <== NOT EXECUTED 51d14: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 51d1a: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
0005165c <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
5165c: 4e56 fff0 linkw %fp,#-16 51660: 48d7 041c moveml %d2-%d4/%a2,%sp@ 51664: 246e 0008 moveal %fp@(8),%a2 51668: 242e 000c movel %fp@(12),%d2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
5166c: 4a8a tstl %a2 5166e: 6700 01b2 beqw 51822 <IMFS_memfile_get_block_pointer+0x1c6>
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
51672: 7005 moveq #5,%d0 51674: b0aa 0048 cmpl %a2@(72),%d0 51678: 6600 01c4 bnew 5183e <IMFS_memfile_get_block_pointer+0x1e2>
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
5167c: 2239 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d1 51682: e489 lsrl #2,%d1 51684: 2001 movel %d1,%d0 51686: 5380 subql #1,%d0 51688: b082 cmpl %d2,%d0
5168a: 6446 bccs 516d2 <IMFS_memfile_get_block_pointer+0x76><== ALWAYS TAKEN
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
5168c: 2001 movel %d1,%d0 <== NOT EXECUTED 5168e: 5280 addql #1,%d0 <== NOT EXECUTED 51690: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 51694: 2040 moveal %d0,%a0 <== NOT EXECUTED 51696: 5388 subql #1,%a0 <== NOT EXECUTED 51698: b1c2 cmpal %d2,%a0 <== NOT EXECUTED 5169a: 6500 00c2 bcsw 5175e <IMFS_memfile_get_block_pointer+0x102><== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
5169e: 9481 subl %d1,%d2 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
516a0: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
516a4: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 516a8: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
516ac: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 516b0: 6700 0086 beqw 51738 <IMFS_memfile_get_block_pointer+0xdc><== NOT EXECUTED
if ( !p ) {
516b4: 4a88 tstl %a0 <== NOT EXECUTED 516b6: 6750 beqs 51708 <IMFS_memfile_get_block_pointer+0xac><== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
516b8: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 516bc: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
516be: 4a88 tstl %a0 <== NOT EXECUTED 516c0: 6760 beqs 51722 <IMFS_memfile_get_block_pointer+0xc6><== 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 ];
516c2: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 516c6: 2008 movel %a0,%d0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
516c8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 516ce: 4e5e unlk %fp <== NOT EXECUTED 516d0: 4e75 rts <== NOT EXECUTED
if ( my_block <= LAST_INDIRECT ) {
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
516d2: 206a 0054 moveal %a2@(84),%a0
if ( malloc_it ) {
516d6: 4aae 0010 tstl %fp@(16)
516da: 6776 beqs 51752 <IMFS_memfile_get_block_pointer+0xf6>
if ( !p ) {
516dc: 4a88 tstl %a0
516de: 6710 beqs 516f0 <IMFS_memfile_get_block_pointer+0x94>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
516e0: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 516e4: 2008 movel %a0,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
516e6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 516ec: 4e5e unlk %fp 516ee: 4e75 rts
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
516f0: 4eb9 0005 1638 jsr 51638 <memfile_alloc_block> 516f6: 2040 moveal %d0,%a0
if ( !p )
516f8: 4a80 tstl %d0
516fa: 674a beqs 51746 <IMFS_memfile_get_block_pointer+0xea><== NEVER TAKEN
return 0;
info->indirect = p;
516fc: 2540 0054 movel %d0,%a2@(84)
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
51700: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 51704: 2008 movel %a0,%d0 51706: 60de bras 516e6 <IMFS_memfile_get_block_pointer+0x8a>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
51708: 4eb9 0005 1638 jsr 51638 <memfile_alloc_block> <== NOT EXECUTED 5170e: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p )
51710: 4a80 tstl %d0 <== NOT EXECUTED 51712: 6732 beqs 51746 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0;
info->doubly_indirect = p;
51714: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
51718: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 5171c: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
5171e: 4a88 tstl %a0 <== NOT EXECUTED 51720: 66a0 bnes 516c2 <IMFS_memfile_get_block_pointer+0x66><== NOT EXECUTED
p1 = memfile_alloc_block();
51722: 4eb9 0005 1638 jsr 51638 <memfile_alloc_block> <== NOT EXECUTED 51728: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p1 )
5172a: 4a80 tstl %d0 <== NOT EXECUTED 5172c: 6718 beqs 51746 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
5172e: 2480 movel %d0,%a2@ <== 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 ];
51730: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 51734: 2008 movel %a0,%d0 <== NOT EXECUTED 51736: 6090 bras 516c8 <IMFS_memfile_get_block_pointer+0x6c><== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
51738: 4a88 tstl %a0 <== NOT EXECUTED 5173a: 670a beqs 51746 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
5173c: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED
if ( !p )
51740: 4a88 tstl %a0 <== NOT EXECUTED 51742: 6600 ff7e bnew 516c2 <IMFS_memfile_get_block_pointer+0x66><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
51746: 4280 clrl %d0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
51748: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5174e: 4e5e unlk %fp <== NOT EXECUTED 51750: 4e75 rts <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
51752: 4a88 tstl %a0
51754: 67f0 beqs 51746 <IMFS_memfile_get_block_pointer+0xea><== NEVER TAKEN
return 0;
return &info->indirect[ my_block ];
51756: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 5175a: 2008 movel %a0,%d0 5175c: 6088 bras 516e6 <IMFS_memfile_get_block_pointer+0x8a>
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
5175e: 2600 movel %d0,%d3 <== NOT EXECUTED 51760: 5283 addql #1,%d3 <== NOT EXECUTED 51762: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 51766: 5383 subql #1,%d3 <== NOT EXECUTED 51768: b682 cmpl %d2,%d3 <== NOT EXECUTED 5176a: 65da bcss 51746 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
5176c: 9480 subl %d0,%d2 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
5176e: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 51772: 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;
51776: 206a 005c moveal %a2@(92),%a0 <== 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;
5177a: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 5177e: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
51782: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 51786: 6778 beqs 51800 <IMFS_memfile_get_block_pointer+0x1a4><== NOT EXECUTED
if ( !p ) {
51788: 4a88 tstl %a0 <== NOT EXECUTED 5178a: 6756 beqs 517e2 <IMFS_memfile_get_block_pointer+0x186><== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
5178c: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 51790: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
51792: 4a88 tstl %a0 <== NOT EXECUTED 51794: 6730 beqs 517c6 <IMFS_memfile_get_block_pointer+0x16a><== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
51796: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 5179a: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p2 ) {
5179c: 4a88 tstl %a0 <== NOT EXECUTED 5179e: 6710 beqs 517b0 <IMFS_memfile_get_block_pointer+0x154><== NOT EXECUTED
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
517a0: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 517a4: 2008 movel %a0,%d0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
517a6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 517ac: 4e5e unlk %fp <== NOT EXECUTED 517ae: 4e75 rts <== NOT EXECUTED
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
517b0: 4eb9 0005 1638 jsr 51638 <memfile_alloc_block> <== NOT EXECUTED 517b6: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p2 )
517b8: 4a80 tstl %d0 <== NOT EXECUTED 517ba: 678a beqs 51746 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
517bc: 2480 movel %d0,%a2@ <== NOT EXECUTED
}
return (block_p *)&p2[ singly ];
517be: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 517c2: 2008 movel %a0,%d0 <== NOT EXECUTED 517c4: 60e0 bras 517a6 <IMFS_memfile_get_block_pointer+0x14a><== NOT EXECUTED
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
517c6: 4eb9 0005 1638 jsr 51638 <memfile_alloc_block> <== NOT EXECUTED 517cc: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p1 )
517ce: 4a80 tstl %d0 <== NOT EXECUTED 517d0: 6700 ff74 beqw 51746 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
517d4: 2480 movel %d0,%a2@ <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
517d6: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 517da: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p2 ) {
517dc: 4a88 tstl %a0 <== NOT EXECUTED 517de: 66c0 bnes 517a0 <IMFS_memfile_get_block_pointer+0x144><== NOT EXECUTED 517e0: 60ce bras 517b0 <IMFS_memfile_get_block_pointer+0x154><== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
517e2: 4eb9 0005 1638 jsr 51638 <memfile_alloc_block> <== NOT EXECUTED 517e8: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p )
517ea: 4a80 tstl %d0 <== NOT EXECUTED 517ec: 6700 ff58 beqw 51746 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0;
info->triply_indirect = p;
517f0: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
517f4: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 517f8: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
517fa: 4a88 tstl %a0 <== NOT EXECUTED 517fc: 6698 bnes 51796 <IMFS_memfile_get_block_pointer+0x13a><== NOT EXECUTED 517fe: 60c6 bras 517c6 <IMFS_memfile_get_block_pointer+0x16a><== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
51800: 4a88 tstl %a0 <== NOT EXECUTED 51802: 6700 ff42 beqw 51746 <IMFS_memfile_get_block_pointer+0xea><== 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 ];
51806: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED
if ( !p1 )
5180a: 4a88 tstl %a0 <== NOT EXECUTED 5180c: 6700 ff38 beqw 51746 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
51810: 2004 movel %d4,%d0 <== NOT EXECUTED 51812: e588 lsll #2,%d0 <== NOT EXECUTED 51814: d0b0 3c00 addl %a0@(00000000,%d3:l:4),%d0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
51818: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5181e: 4e5e unlk %fp <== NOT EXECUTED 51820: 4e75 rts <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
51822: 4879 0006 1704 pea 61704 <CSWTCH.8+0x10> <== NOT EXECUTED 51828: 4879 0006 17de pea 617de <__FUNCTION__.6292> <== NOT EXECUTED 5182e: 4878 0388 pea 388 <DBL_MANT_DIG+0x353> <== NOT EXECUTED 51832: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 51838: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
5183e: 4879 0006 1754 pea 61754 <CSWTCH.8+0x60> <== NOT EXECUTED 51844: 4879 0006 17de pea 617de <__FUNCTION__.6292> <== NOT EXECUTED 5184a: 4878 038c pea 38c <DBL_MANT_DIG+0x357> <== NOT EXECUTED 5184e: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 51854: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
000521d8 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
521d8: 4e56 ffc0 linkw %fp,#-64 521dc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 521e0: 246e 0008 moveal %fp@(8),%a2 521e4: 2a6e 0014 moveal %fp@(20),%a5 521e8: 262e 0018 movel %fp@(24),%d3 521ec: 282e 000c movel %fp@(12),%d4 521f0: 2a2e 0010 movel %fp@(16),%d5
/*
* Perform internal consistency checks
*/
assert( the_jnode );
521f4: 4a8a tstl %a2 521f6: 6700 0266 beqw 5245e <IMFS_memfile_read+0x286>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
521fa: 202a 0048 movel %a2@(72),%d0 521fe: 2040 moveal %d0,%a0 52200: 5b88 subql #5,%a0 52202: 7c01 moveq #1,%d6 52204: bc88 cmpl %a0,%d6 52206: 6500 023a bcsw 52442 <IMFS_memfile_read+0x26a>
/*
* Error checks on arguments
*/
assert( dest );
5220a: 4a8d tstl %a5 5220c: 6700 01fc beqw 5240a <IMFS_memfile_read+0x232>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
52210: 4a83 tstl %d3 52212: 6700 01c2 beqw 523d6 <IMFS_memfile_read+0x1fe>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
52216: 7e06 moveq #6,%d7 52218: be80 cmpl %d0,%d7 5221a: 6700 0136 beqw 52352 <IMFS_memfile_read+0x17a>
* 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 )
5221e: 2043 moveal %d3,%a0 52220: d1c5 addal %d5,%a0 52222: 2408 movel %a0,%d2 52224: 4281 clrl %d1 52226: 206a 004c moveal %a2@(76),%a0 5222a: 226a 0050 moveal %a2@(80),%a1 5222e: 2c08 movel %a0,%d6 52230: 2e09 movel %a1,%d7 52232: 9e82 subl %d2,%d7 52234: 9d81 subxl %d1,%d6
52236: 6c04 bges 5223c <IMFS_memfile_read+0x64>
my_length = the_jnode->info.file.size - start;
52238: 2609 movel %a1,%d3 5223a: 9685 subl %d5,%d3
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
5223c: 2439 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d2 52242: 2202 movel %d2,%d1 52244: 5bc0 smi %d0 52246: 49c0 extbl %d0 52248: 2640 moveal %d0,%a3 5224a: 2841 moveal %d1,%a4 5224c: 2f0c movel %a4,%sp@- 5224e: 2f00 movel %d0,%sp@- 52250: 2f05 movel %d5,%sp@- 52252: 2f04 movel %d4,%sp@- 52254: 4eb9 0005 f054 jsr 5f054 <__moddi3> 5225a: 4fef 0010 lea %sp@(16),%sp 5225e: 2e01 movel %d1,%d7
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
52260: 2f0c movel %a4,%sp@- 52262: 2f0b movel %a3,%sp@- 52264: 2f05 movel %d5,%sp@- 52266: 2f04 movel %d4,%sp@- 52268: 4eb9 0005 ec9c jsr 5ec9c <__divdi3> 5226e: 4fef 0010 lea %sp@(16),%sp 52272: 2801 movel %d1,%d4
if ( start_offset ) {
52274: 4a87 tstl %d7 52276: 6700 00d2 beqw 5234a <IMFS_memfile_read+0x172>
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 );
5227a: 42a7 clrl %sp@- 5227c: 2f01 movel %d1,%sp@- 5227e: 2f0a movel %a2,%sp@- 52280: 4eb9 0005 165c jsr 5165c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
52286: 4fef 000c lea %sp@(12),%sp 5228a: 4a80 tstl %d0 5228c: 6700 01ec beqw 5247a <IMFS_memfile_read+0x2a2>
*/
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;
52290: 9487 subl %d7,%d2 52292: 2643 moveal %d3,%a3 52294: b483 cmpl %d3,%d2 52296: 6500 0116 bcsw 523ae <IMFS_memfile_read+0x1d6>
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 );
5229a: 2f0b movel %a3,%sp@- 5229c: 2040 moveal %d0,%a0 5229e: de90 addl %a0@,%d7
dest += to_copy;
block++;
522a0: 5284 addql #1,%d4
my_length -= to_copy;
522a2: 968b subl %a3,%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 );
522a4: 2f07 movel %d7,%sp@-
dest += to_copy;
522a6: 2e0d movel %a5,%d7 522a8: de8b addl %a3,%d7
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 );
522aa: 2f0d movel %a5,%sp@- 522ac: 4eb9 0005 38e8 jsr 538e8 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
522b2: 2439 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d2 522b8: 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 ) {
522bc: b483 cmpl %d3,%d2
522be: 623c bhis 522fc <IMFS_memfile_read+0x124>
522c0: 49f9 0005 165c lea 5165c <IMFS_memfile_get_block_pointer>,%a4
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 );
522c6: 4bf9 0005 38e8 lea 538e8 <memcpy>,%a5
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
522cc: 42a7 clrl %sp@- 522ce: 2f04 movel %d4,%sp@- 522d0: 2f0a movel %a2,%sp@- 522d2: 4e94 jsr %a4@
assert( block_ptr );
522d4: 4fef 000c lea %sp@(12),%sp 522d8: 4a80 tstl %d0 522da: 6700 0112 beqw 523ee <IMFS_memfile_read+0x216>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
522de: 2040 moveal %d0,%a0
dest += to_copy;
block++;
522e0: 5284 addql #1,%d4
my_length -= to_copy;
522e2: 9682 subl %d2,%d3
copied += to_copy;
522e4: d7c2 addal %d2,%a3
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 );
522e6: 2f02 movel %d2,%sp@- 522e8: 2f10 movel %a0@,%sp@- 522ea: 2f07 movel %d7,%sp@-
dest += to_copy;
522ec: de82 addl %d2,%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 );
522ee: 4e95 jsr %a5@
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
522f0: 4fef 000c lea %sp@(12),%sp 522f4: b6b9 0006 3148 cmpl 63148 <imfs_memfile_bytes_per_block>,%d3
522fa: 64d0 bccs 522cc <IMFS_memfile_read+0xf4>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
522fc: 4a83 tstl %d3
522fe: 672a beqs 5232a <IMFS_memfile_read+0x152>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
52300: 42a7 clrl %sp@- 52302: 2f04 movel %d4,%sp@- 52304: 2f0a movel %a2,%sp@- 52306: 4eb9 0005 165c jsr 5165c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
5230c: 4fef 000c lea %sp@(12),%sp 52310: 4a80 tstl %d0 52312: 6700 0112 beqw 52426 <IMFS_memfile_read+0x24e>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
52316: 2040 moveal %d0,%a0
copied += my_length;
52318: d7c3 addal %d3,%a3
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 );
5231a: 2f03 movel %d3,%sp@- 5231c: 2f10 movel %a0@,%sp@- 5231e: 2f07 movel %d7,%sp@- 52320: 4eb9 0005 38e8 jsr 538e8 <memcpy>
copied += my_length;
52326: 4fef 000c lea %sp@(12),%sp
}
IMFS_update_atime( the_jnode );
5232a: 42a7 clrl %sp@- 5232c: 486e fff8 pea %fp@(-8) 52330: 4eb9 0004 40b4 jsr 440b4 <gettimeofday> 52336: 256e fff8 003c movel %fp@(-8),%a2@(60)
return copied;
5233c: 200b movel %a3,%d0 5233e: 508f addql #8,%sp
}
52340: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 52346: 4e5e unlk %fp 52348: 4e75 rts
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
5234a: 2e0d movel %a5,%d7 5234c: 97cb subal %a3,%a3 5234e: 6000 ff6c braw 522bc <IMFS_memfile_read+0xe4>
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
52352: 2843 moveal %d3,%a4 <== NOT EXECUTED 52354: 97cb subal %a3,%a3 <== NOT EXECUTED 52356: 202a 004c movel %a2@(76),%d0 <== NOT EXECUTED 5235a: 222a 0050 movel %a2@(80),%d1 <== NOT EXECUTED 5235e: 2c0b movel %a3,%d6 <== NOT EXECUTED 52360: 2e0c movel %a4,%d7 <== NOT EXECUTED 52362: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 52366: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED 5236a: 9285 subl %d5,%d1 <== NOT EXECUTED 5236c: 9184 subxl %d4,%d0 <== 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;
5236e: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
52372: 9e81 subl %d1,%d7 <== NOT EXECUTED 52374: 9d80 subxl %d0,%d6 <== NOT EXECUTED 52376: 6f06 bles 5237e <IMFS_memfile_read+0x1a6> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
52378: 262e ffec movel %fp@(-20),%d3 <== NOT EXECUTED 5237c: 9685 subl %d5,%d3 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
5237e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 52380: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 52384: 2f0d movel %a5,%sp@- <== NOT EXECUTED 52386: 4eb9 0005 38e8 jsr 538e8 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
5238c: 42a7 clrl %sp@- <== NOT EXECUTED 5238e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 52392: 4eb9 0004 40b4 jsr 440b4 <gettimeofday> <== NOT EXECUTED 52398: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED
return my_length;
5239e: 2003 movel %d3,%d0 <== NOT EXECUTED 523a0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
523a4: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 523aa: 4e5e unlk %fp <== NOT EXECUTED 523ac: 4e75 rts <== 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;
523ae: 2642 moveal %d2,%a3
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 );
523b0: 2040 moveal %d0,%a0
dest += to_copy;
block++;
523b2: 5284 addql #1,%d4
my_length -= to_copy;
523b4: 968b subl %a3,%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 );
523b6: 2f0b movel %a3,%sp@- 523b8: de90 addl %a0@,%d7 523ba: 2f07 movel %d7,%sp@-
dest += to_copy;
523bc: 2e0d movel %a5,%d7 523be: de8b addl %a3,%d7
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 );
523c0: 2f0d movel %a5,%sp@- 523c2: 4eb9 0005 38e8 jsr 538e8 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
523c8: 2439 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d2 523ce: 4fef 000c lea %sp@(12),%sp 523d2: 6000 fee8 braw 522bc <IMFS_memfile_read+0xe4>
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
523d6: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 523dc: 7e16 moveq #22,%d7 <== NOT EXECUTED 523de: 2040 moveal %d0,%a0 <== NOT EXECUTED 523e0: 70ff moveq #-1,%d0 <== NOT EXECUTED 523e2: 2087 movel %d7,%a0@ <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
523e4: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 523ea: 4e5e unlk %fp <== NOT EXECUTED 523ec: 4e75 rts <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
523ee: 4879 0006 1784 pea 61784 <CSWTCH.8+0x90> <== NOT EXECUTED 523f4: 4879 0006 1810 pea 61810 <__FUNCTION__.6119> <== NOT EXECUTED 523fa: 4878 02a7 pea 2a7 <DBL_MANT_DIG+0x272> <== NOT EXECUTED 523fe: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 52404: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
5240a: 4879 0006 17d9 pea 617d9 <CSWTCH.8+0xe5> <== NOT EXECUTED 52410: 4879 0006 1810 pea 61810 <__FUNCTION__.6119> <== NOT EXECUTED 52416: 4878 025a pea 25a <DBL_MANT_DIG+0x225> <== NOT EXECUTED 5241a: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 52420: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
52426: 4879 0006 1784 pea 61784 <CSWTCH.8+0x90> <== NOT EXECUTED 5242c: 4879 0006 1810 pea 61810 <__FUNCTION__.6119> <== NOT EXECUTED 52432: 4878 02b9 pea 2b9 <DBL_MANT_DIG+0x284> <== NOT EXECUTED 52436: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 5243c: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
52442: 4879 0006 178e pea 6178e <CSWTCH.8+0x9a> <== NOT EXECUTED 52448: 4879 0006 1810 pea 61810 <__FUNCTION__.6119> <== NOT EXECUTED 5244e: 4878 0251 pea 251 <DBL_MANT_DIG+0x21c> <== NOT EXECUTED 52452: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 52458: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
5245e: 4879 0006 1704 pea 61704 <CSWTCH.8+0x10> <== NOT EXECUTED 52464: 4879 0006 1810 pea 61810 <__FUNCTION__.6119> <== NOT EXECUTED 5246a: 4878 024c pea 24c <DBL_MANT_DIG+0x217> <== NOT EXECUTED 5246e: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 52474: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
5247a: 4879 0006 1784 pea 61784 <CSWTCH.8+0x90> <== NOT EXECUTED 52480: 4879 0006 1810 pea 61810 <__FUNCTION__.6119> <== NOT EXECUTED 52486: 4878 0296 pea 296 <DBL_MANT_DIG+0x261> <== NOT EXECUTED 5248a: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 52490: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
0005190c <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
5190c: 4e56 ffe0 linkw %fp,#-32 51910: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 51914: 286e 0008 moveal %fp@(8),%a4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
51918: 4a8c tstl %a4 5191a: 6700 010c beqw 51a28 <IMFS_memfile_remove+0x11c>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
5191e: 7005 moveq #5,%d0 51920: b0ac 0048 cmpl %a4@(72),%d0 51924: 6600 011e bnew 51a44 <IMFS_memfile_remove+0x138>
/*
* 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;
51928: 2839 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d4 5192e: e48c lsrl #2,%d4
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
51930: 4aac 0054 tstl %a4@(84)
51934: 670e beqs 51944 <IMFS_memfile_remove+0x38>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
51936: 2f04 movel %d4,%sp@- 51938: 486c 0054 pea %a4@(84) 5193c: 4eb9 0005 185a jsr 5185a <memfile_free_blocks_in_table> 51942: 508f addql #8,%sp
}
if ( info->doubly_indirect ) {
51944: 206c 0058 moveal %a4@(88),%a0 51948: 4a88 tstl %a0
5194a: 674a beqs 51996 <IMFS_memfile_remove+0x8a> <== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
5194c: 2239 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 51952: 2001 movel %d1,%d0 <== NOT EXECUTED 51954: 47f9 0005 185a lea 5185a <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED 5195a: e488 lsrl #2,%d0 <== NOT EXECUTED 5195c: 672e beqs 5198c <IMFS_memfile_remove+0x80> <== NOT EXECUTED 5195e: 4280 clrl %d0 <== NOT EXECUTED 51960: 4282 clrl %d2 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
51962: e588 lsll #2,%d0 <== NOT EXECUTED 51964: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 51968: 6710 beqs 5197a <IMFS_memfile_remove+0x6e> <== NOT EXECUTED
memfile_free_blocks_in_table(
5196a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5196c: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 51970: 4e93 jsr %a3@ <== NOT EXECUTED 51972: 2239 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 51978: 508f addql #8,%sp <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
5197a: 5282 addql #1,%d2 <== NOT EXECUTED 5197c: 2601 movel %d1,%d3 <== NOT EXECUTED 5197e: 2002 movel %d2,%d0 <== NOT EXECUTED 51980: e48b lsrl #2,%d3 <== NOT EXECUTED 51982: b483 cmpl %d3,%d2 <== NOT EXECUTED 51984: 6406 bccs 5198c <IMFS_memfile_remove+0x80> <== NOT EXECUTED 51986: 206c 0058 moveal %a4@(88),%a0 <== NOT EXECUTED 5198a: 60d6 bras 51962 <IMFS_memfile_remove+0x56> <== 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 );
5198c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5198e: 486c 0058 pea %a4@(88) <== NOT EXECUTED 51992: 4e93 jsr %a3@ <== NOT EXECUTED 51994: 508f addql #8,%sp <== NOT EXECUTED
}
if ( info->triply_indirect ) {
51996: 206c 005c moveal %a4@(92),%a0 5199a: 4a88 tstl %a0
5199c: 677e beqs 51a1c <IMFS_memfile_remove+0x110> <== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
5199e: 2239 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 519a4: 2001 movel %d1,%d0 <== NOT EXECUTED 519a6: 47f9 0005 185a lea 5185a <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED 519ac: e488 lsrl #2,%d0 <== NOT EXECUTED 519ae: 6762 beqs 51a12 <IMFS_memfile_remove+0x106> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
519b0: 2450 moveal %a0@,%a2 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
519b2: 4a8a tstl %a2 <== NOT EXECUTED 519b4: 675c beqs 51a12 <IMFS_memfile_remove+0x106> <== NOT EXECUTED 519b6: 4286 clrl %d6 <== NOT EXECUTED 519b8: 4285 clrl %d5 <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
519ba: 4a80 tstl %d0 <== NOT EXECUTED 519bc: 6728 beqs 519e6 <IMFS_memfile_remove+0xda> <== NOT EXECUTED 519be: 4280 clrl %d0 <== NOT EXECUTED 519c0: 4282 clrl %d2 <== NOT EXECUTED
if ( p[j] ) {
519c2: e588 lsll #2,%d0 <== NOT EXECUTED 519c4: 4ab2 0800 tstl %a2@(00000000,%d0:l) <== NOT EXECUTED 519c8: 6710 beqs 519da <IMFS_memfile_remove+0xce> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
519ca: 2f04 movel %d4,%sp@- <== NOT EXECUTED 519cc: 4872 0800 pea %a2@(00000000,%d0:l) <== NOT EXECUTED 519d0: 4e93 jsr %a3@ <== NOT EXECUTED 519d2: 2239 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 519d8: 508f addql #8,%sp <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
519da: 5282 addql #1,%d2 <== NOT EXECUTED 519dc: 2601 movel %d1,%d3 <== NOT EXECUTED 519de: 2002 movel %d2,%d0 <== NOT EXECUTED 519e0: e48b lsrl #2,%d3 <== NOT EXECUTED 519e2: b483 cmpl %d3,%d2 <== NOT EXECUTED 519e4: 65dc bcss 519c2 <IMFS_memfile_remove+0xb6> <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
519e6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 519e8: dcac 005c addl %a4@(92),%d6 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
519ec: 5285 addql #1,%d5 <== NOT EXECUTED
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
519ee: 2f06 movel %d6,%sp@- <== NOT EXECUTED 519f0: 4e93 jsr %a3@ <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
519f2: 2239 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 519f8: 2001 movel %d1,%d0 <== NOT EXECUTED 519fa: 508f addql #8,%sp <== NOT EXECUTED 519fc: e488 lsrl #2,%d0 <== NOT EXECUTED 519fe: ba80 cmpl %d0,%d5 <== NOT EXECUTED 51a00: 6410 bccs 51a12 <IMFS_memfile_remove+0x106> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
51a02: 2c05 movel %d5,%d6 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
51a04: 206c 005c moveal %a4@(92),%a0 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
51a08: e58e lsll #2,%d6 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
51a0a: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
51a0e: 4a8a tstl %a2 <== NOT EXECUTED 51a10: 66a8 bnes 519ba <IMFS_memfile_remove+0xae> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
51a12: 2f04 movel %d4,%sp@- <== NOT EXECUTED 51a14: 486c 005c pea %a4@(92) <== NOT EXECUTED 51a18: 4e93 jsr %a3@ <== NOT EXECUTED 51a1a: 508f addql #8,%sp <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
51a1c: 4280 clrl %d0 51a1e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 51a24: 4e5e unlk %fp 51a26: 4e75 rts
/*
* Perform internal consistency checks
*/
assert( the_jnode );
51a28: 4879 0006 1704 pea 61704 <CSWTCH.8+0x10> <== NOT EXECUTED 51a2e: 4879 0006 1822 pea 61822 <__FUNCTION__.6044> <== NOT EXECUTED 51a34: 4878 01ee pea 1ee <DBL_MANT_DIG+0x1b9> <== NOT EXECUTED 51a38: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 51a3e: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
51a44: 4879 0006 1754 pea 61754 <CSWTCH.8+0x60> <== NOT EXECUTED 51a4a: 4879 0006 1822 pea 61822 <__FUNCTION__.6044> <== NOT EXECUTED 51a50: 4878 01f2 pea 1f2 <DBL_MANT_DIG+0x1bd> <== NOT EXECUTED 51a54: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 51a5a: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
000518c0 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
518c0: 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 );
518c4: 42a7 clrl %sp@- <== NOT EXECUTED 518c6: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 518ca: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 518ce: 4eb9 0005 165c jsr 5165c <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
518d4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 518d8: 4a80 tstl %d0 <== NOT EXECUTED 518da: 6714 beqs 518f0 <IMFS_memfile_remove_block+0x30> <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
518dc: 2040 moveal %d0,%a0 <== NOT EXECUTED 518de: 2210 movel %a0@,%d1 <== NOT EXECUTED
*block_ptr = 0;
518e0: 4290 clrl %a0@ <== NOT EXECUTED
memfile_free_block( ptr );
518e2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 518e4: 4eb9 0005 161e jsr 5161e <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
518ea: 7001 moveq #1,%d0 <== NOT EXECUTED 518ec: 4e5e unlk %fp <== NOT EXECUTED 518ee: 4e75 rts <== NOT EXECUTED
{
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
518f0: 4879 0006 1784 pea 61784 <CSWTCH.8+0x90> <== NOT EXECUTED 518f6: 4879 0006 1853 pea 61853 <__FUNCTION__.6008> <== NOT EXECUTED 518fc: 4878 0196 pea 196 <DBL_MANT_DIG+0x161> <== NOT EXECUTED 51900: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 51906: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
00051e46 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
51e46: 4e56 ffd0 linkw %fp,#-48 51e4a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 51e4e: 246e 0008 moveal %fp@(8),%a2 51e52: 2a6e 0014 moveal %fp@(20),%a5 51e56: 262e 0018 movel %fp@(24),%d3 51e5a: 282e 000c movel %fp@(12),%d4 51e5e: 2a2e 0010 movel %fp@(16),%d5
/*
* Perform internal consistency checks
*/
assert( the_jnode );
51e62: 4a8a tstl %a2 51e64: 6700 01f8 beqw 5205e <IMFS_memfile_write+0x218>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
51e68: 7405 moveq #5,%d2 51e6a: b4aa 0048 cmpl %a2@(72),%d2 51e6e: 6600 01d2 bnew 52042 <IMFS_memfile_write+0x1fc>
/*
* Error check arguments
*/
assert( source );
51e72: 4a8d tstl %a5 51e74: 6700 0204 beqw 5207a <IMFS_memfile_write+0x234>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
51e78: 4a83 tstl %d3 51e7a: 6700 0190 beqw 5200c <IMFS_memfile_write+0x1c6>
* 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 ) {
51e7e: 2043 moveal %d3,%a0 51e80: d1c5 addal %d5,%a0 51e82: 2208 movel %a0,%d1 51e84: 4280 clrl %d0 51e86: 2c2a 004c movel %a2@(76),%d6 51e8a: 2e2a 0050 movel %a2@(80),%d7 51e8e: 9e81 subl %d1,%d7 51e90: 9d80 subxl %d0,%d6 51e92: 6d00 011e bltw 51fb2 <IMFS_memfile_write+0x16c>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
51e96: 2439 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d2 51e9c: 2202 movel %d2,%d1 51e9e: 5bc0 smi %d0 51ea0: 49c0 extbl %d0 51ea2: 2640 moveal %d0,%a3 51ea4: 2841 moveal %d1,%a4 51ea6: 2f0c movel %a4,%sp@- 51ea8: 2f00 movel %d0,%sp@- 51eaa: 2f05 movel %d5,%sp@- 51eac: 2f04 movel %d4,%sp@- 51eae: 4eb9 0005 f054 jsr 5f054 <__moddi3> 51eb4: 4fef 0010 lea %sp@(16),%sp 51eb8: 2e01 movel %d1,%d7
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
51eba: 2f0c movel %a4,%sp@- 51ebc: 2f0b movel %a3,%sp@- 51ebe: 2f05 movel %d5,%sp@- 51ec0: 2f04 movel %d4,%sp@- 51ec2: 4eb9 0005 ec9c jsr 5ec9c <__divdi3> 51ec8: 4fef 0010 lea %sp@(16),%sp 51ecc: 2801 movel %d1,%d4
if ( start_offset ) {
51ece: 4a87 tstl %d7 51ed0: 6700 00d8 beqw 51faa <IMFS_memfile_write+0x164>
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 );
51ed4: 42a7 clrl %sp@- 51ed6: 2f01 movel %d1,%sp@- 51ed8: 2f0a movel %a2,%sp@- 51eda: 4eb9 0005 165c jsr 5165c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
51ee0: 4fef 000c lea %sp@(12),%sp 51ee4: 4a80 tstl %d0 51ee6: 6700 01ca beqw 520b2 <IMFS_memfile_write+0x26c>
*/
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;
51eea: 9487 subl %d7,%d2 51eec: b682 cmpl %d2,%d3 51eee: 6500 00f2 bcsw 51fe2 <IMFS_memfile_write+0x19c>
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 );
51ef2: 2f02 movel %d2,%sp@- 51ef4: 2040 moveal %d0,%a0
src += to_copy;
51ef6: 47f5 2800 lea %a5@(00000000,%d2:l),%a3
block++;
my_length -= to_copy;
51efa: 9682 subl %d2,%d3
copied += to_copy;
51efc: 2a02 movel %d2,%d5
#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 );
src += to_copy;
block++;
51efe: 5284 addql #1,%d4
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 );
51f00: 2f0d movel %a5,%sp@- 51f02: de90 addl %a0@,%d7 51f04: 2f07 movel %d7,%sp@- 51f06: 4eb9 0005 38e8 jsr 538e8 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
51f0c: 2439 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d2 51f12: 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 ) {
51f16: b483 cmpl %d3,%d2
51f18: 623c bhis 51f56 <IMFS_memfile_write+0x110>
51f1a: 49f9 0005 165c lea 5165c <IMFS_memfile_get_block_pointer>,%a4
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 );
51f20: 4bf9 0005 38e8 lea 538e8 <memcpy>,%a5
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
51f26: 42a7 clrl %sp@- 51f28: 2f04 movel %d4,%sp@- 51f2a: 2f0a movel %a2,%sp@- 51f2c: 4e94 jsr %a4@
assert( block_ptr );
51f2e: 4fef 000c lea %sp@(12),%sp 51f32: 4a80 tstl %d0 51f34: 6700 00f0 beqw 52026 <IMFS_memfile_write+0x1e0>
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 );
51f38: 2f02 movel %d2,%sp@- 51f3a: 2040 moveal %d0,%a0
src += to_copy;
block++;
51f3c: 5284 addql #1,%d4
my_length -= to_copy;
51f3e: 9682 subl %d2,%d3
*
* 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(
51f40: da82 addl %d2,%d5
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 );
51f42: 2f0b movel %a3,%sp@- 51f44: 2f10 movel %a0@,%sp@-
src += to_copy;
51f46: d7c2 addal %d2,%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 );
51f48: 4e95 jsr %a5@
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
51f4a: 4fef 000c lea %sp@(12),%sp 51f4e: b6b9 0006 3148 cmpl 63148 <imfs_memfile_bytes_per_block>,%d3
51f54: 64d0 bccs 51f26 <IMFS_memfile_write+0xe0>
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
51f56: 4a83 tstl %d3
51f58: 672a beqs 51f84 <IMFS_memfile_write+0x13e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
51f5a: 42a7 clrl %sp@- 51f5c: 2f04 movel %d4,%sp@- 51f5e: 2f0a movel %a2,%sp@- 51f60: 4eb9 0005 165c jsr 5165c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
51f66: 4fef 000c lea %sp@(12),%sp 51f6a: 4a80 tstl %d0 51f6c: 6700 0128 beqw 52096 <IMFS_memfile_write+0x250>
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 );
51f70: 2f03 movel %d3,%sp@- 51f72: 2040 moveal %d0,%a0
my_length = 0;
copied += to_copy;
51f74: da83 addl %d3,%d5
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 );
51f76: 2f0b movel %a3,%sp@- 51f78: 2f10 movel %a0@,%sp@- 51f7a: 4eb9 0005 38e8 jsr 538e8 <memcpy>
my_length = 0;
copied += to_copy;
51f80: 4fef 000c lea %sp@(12),%sp
}
IMFS_mtime_ctime_update( the_jnode );
51f84: 42a7 clrl %sp@- 51f86: 486e fff8 pea %fp@(-8) 51f8a: 4eb9 0004 40b4 jsr 440b4 <gettimeofday> 51f90: 202e fff8 movel %fp@(-8),%d0
return copied;
51f94: 508f addql #8,%sp
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
51f96: 2540 0044 movel %d0,%a2@(68) 51f9a: 2540 0040 movel %d0,%a2@(64)
return copied;
}
51f9e: 2005 movel %d5,%d0 51fa0: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 51fa6: 4e5e unlk %fp 51fa8: 4e75 rts
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
51faa: 264d moveal %a5,%a3 51fac: 4285 clrl %d5 51fae: 6000 ff66 braw 51f16 <IMFS_memfile_write+0xd0>
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
51fb2: 2f08 movel %a0,%sp@- 51fb4: 2f00 movel %d0,%sp@- 51fb6: 2f0a movel %a2,%sp@- 51fb8: 4eb9 0005 1bce jsr 51bce <IMFS_memfile_extend>
if ( status )
51fbe: 4fef 000c lea %sp@(12),%sp 51fc2: 4a80 tstl %d0 51fc4: 6700 fed0 beqw 51e96 <IMFS_memfile_write+0x50>
rtems_set_errno_and_return_minus_one( ENOSPC );
51fc8: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 51fce: 7aff moveq #-1,%d5 <== NOT EXECUTED 51fd0: 781c moveq #28,%d4 <== NOT EXECUTED 51fd2: 2040 moveal %d0,%a0 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
51fd4: 2005 movel %d5,%d0 <== NOT EXECUTED
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
51fd6: 2084 movel %d4,%a0@ <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
51fd8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 51fde: 4e5e unlk %fp <== NOT EXECUTED 51fe0: 4e75 rts <== 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;
51fe2: 2403 movel %d3,%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 );
51fe4: 2040 moveal %d0,%a0
src += to_copy;
51fe6: 47f5 2800 lea %a5@(00000000,%d2:l),%a3
block++;
my_length -= to_copy;
51fea: 9682 subl %d2,%d3
copied += to_copy;
51fec: 2a02 movel %d2,%d5
#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 );
src += to_copy;
block++;
51fee: 5284 addql #1,%d4
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 );
51ff0: 2f02 movel %d2,%sp@- 51ff2: 2f0d movel %a5,%sp@- 51ff4: de90 addl %a0@,%d7 51ff6: 2f07 movel %d7,%sp@- 51ff8: 4eb9 0005 38e8 jsr 538e8 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
51ffe: 2439 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%d2 52004: 4fef 000c lea %sp@(12),%sp 52008: 6000 ff0c braw 51f16 <IMFS_memfile_write+0xd0>
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
5200c: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 52012: 7aff moveq #-1,%d5 <== NOT EXECUTED 52014: 7c16 moveq #22,%d6 <== NOT EXECUTED 52016: 2040 moveal %d0,%a0 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
52018: 2005 movel %d5,%d0 <== NOT EXECUTED
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
5201a: 2086 movel %d6,%a0@ <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
5201c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52022: 4e5e unlk %fp <== NOT EXECUTED 52024: 4e75 rts <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
52026: 4879 0006 1784 pea 61784 <CSWTCH.8+0x90> <== NOT EXECUTED 5202c: 4879 0006 17fd pea 617fd <__FUNCTION__.6211> <== NOT EXECUTED 52032: 4878 0330 pea 330 <DBL_MANT_DIG+0x2fb> <== NOT EXECUTED 52036: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 5203c: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
52042: 4879 0006 1754 pea 61754 <CSWTCH.8+0x60> <== NOT EXECUTED 52048: 4879 0006 17fd pea 617fd <__FUNCTION__.6211> <== NOT EXECUTED 5204e: 4878 02e7 pea 2e7 <DBL_MANT_DIG+0x2b2> <== NOT EXECUTED 52052: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 52058: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
5205e: 4879 0006 1704 pea 61704 <CSWTCH.8+0x10> <== NOT EXECUTED 52064: 4879 0006 17fd pea 617fd <__FUNCTION__.6211> <== NOT EXECUTED 5206a: 4878 02e3 pea 2e3 <DBL_MANT_DIG+0x2ae> <== NOT EXECUTED 5206e: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 52074: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
5207a: 4879 0006 1023 pea 61023 <IMFS_ops+0x2d3> <== NOT EXECUTED 52080: 4879 0006 17fd pea 617fd <__FUNCTION__.6211> <== NOT EXECUTED 52086: 4878 02ef pea 2ef <DBL_MANT_DIG+0x2ba> <== NOT EXECUTED 5208a: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 52090: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
52096: 4879 0006 1784 pea 61784 <CSWTCH.8+0x90> <== NOT EXECUTED 5209c: 4879 0006 17fd pea 617fd <__FUNCTION__.6211> <== NOT EXECUTED 520a2: 4878 0346 pea 346 <DBL_MANT_DIG+0x311> <== NOT EXECUTED 520a6: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 520ac: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
520b2: 4879 0006 1784 pea 61784 <CSWTCH.8+0x90> <== NOT EXECUTED 520b8: 4879 0006 17fd pea 617fd <__FUNCTION__.6211> <== NOT EXECUTED 520be: 4878 031c pea 31c <DBL_MANT_DIG+0x2e7> <== NOT EXECUTED 520c2: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 520c8: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
0004a09c <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4a09c: 4e56 ffb0 linkw %fp,#-80 4a0a0: 48d7 007c moveml %d2-%d6,%sp@ 4a0a4: 242e 0008 movel %fp@(8),%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 );
4a0a8: 260e movel %fp,%d3 4a0aa: 0683 ffff ffc7 addil #-57,%d3 4a0b0: 2f02 movel %d2,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4a0b2: 282e 000c movel %fp@(12),%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 );
4a0b6: 4eb9 0004 ec34 jsr 4ec34 <strlen> 4a0bc: 588f addql #4,%sp 4a0be: 486e fffc pea %fp@(-4)
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4a0c2: 2c2e 0010 movel %fp@(16),%d6
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 );
4a0c6: 2f03 movel %d3,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4a0c8: 2a2e 0014 movel %fp@(20),%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 );
4a0cc: 2f00 movel %d0,%sp@- 4a0ce: 2f02 movel %d2,%sp@- 4a0d0: 4eb9 0004 9e64 jsr 49e64 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
4a0d6: 4fef 0010 lea %sp@(16),%sp 4a0da: 2004 movel %d4,%d0 4a0dc: 0280 0000 f000 andil #61440,%d0 4a0e2: 0c80 0000 4000 cmpil #16384,%d0
4a0e8: 675e beqs 4a148 <IMFS_mknod+0xac>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
4a0ea: 0c80 0000 8000 cmpil #32768,%d0
4a0f0: 6750 beqs 4a142 <IMFS_mknod+0xa6>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
4a0f2: 0c80 0000 6000 cmpil #24576,%d0
4a0f8: 673c beqs 4a136 <IMFS_mknod+0x9a>
4a0fa: 0c80 0000 2000 cmpil #8192,%d0
4a100: 6734 beqs 4a136 <IMFS_mknod+0x9a>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
4a102: 0c80 0000 1000 cmpil #4096,%d0
4a108: 6642 bnes 4a14c <IMFS_mknod+0xb0> <== NEVER TAKEN
4a10a: 303c 0007 movew #7,%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(
4a10e: 486e ffe8 pea %fp@(-24) 4a112: 2f04 movel %d4,%sp@- 4a114: 2f03 movel %d3,%sp@- 4a116: 2f00 movel %d0,%sp@- 4a118: 2f2e 0018 movel %fp@(24),%sp@- 4a11c: 4eb9 0004 c7fa jsr 4c7fa <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
4a122: 4fef 0014 lea %sp@(20),%sp 4a126: 4a80 tstl %d0
4a128: 673a beqs 4a164 <IMFS_mknod+0xc8> <== NEVER TAKEN
4a12a: 4280 clrl %d0
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
4a12c: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 4a132: 4e5e unlk %fp 4a134: 4e75 rts
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
4a136: 2d46 ffe8 movel %d6,%fp@(-24) 4a13a: 7002 moveq #2,%d0 4a13c: 2d45 ffec movel %d5,%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) ) {
4a140: 60cc bras 4a10e <IMFS_mknod+0x72>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
4a142: 303c 0005 movew #5,%d0 4a146: 60c6 bras 4a10e <IMFS_mknod+0x72>
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
4a148: 7001 moveq #1,%d0 4a14a: 60c2 bras 4a10e <IMFS_mknod+0x72>
4a14c: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 4a152: 7416 moveq #22,%d2 <== NOT EXECUTED 4a154: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a156: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a158: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
4a15a: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED 4a160: 4e5e unlk %fp <== NOT EXECUTED 4a162: 4e75 rts <== NOT EXECUTED
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
4a164: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 4a16a: 720c moveq #12,%d1 <== NOT EXECUTED 4a16c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a16e: 70ff moveq #-1,%d0 <== NOT EXECUTED
return 0;
}
4a170: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
4a176: 2081 movel %d1,%a0@ <== NOT EXECUTED
return 0;
}
4a178: 4e5e unlk %fp <== NOT EXECUTED
00043560 <IMFS_mount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
43560: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
43562: 4e56 0000 linkw %fp,#0 43566: 226e 0008 moveal %fp@(8),%a1
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
4356a: 2069 0008 moveal %a1@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
4356e: b0a8 0048 cmpl %a0@(72),%d0
43572: 660a bnes 4357e <IMFS_mount+0x1e> <== NEVER TAKEN
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
43574: 2149 0058 movel %a1,%a0@(88) 43578: 4280 clrl %d0
return 0; }
4357a: 4e5e unlk %fp 4357c: 4e75 rts
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4357e: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 43584: 7214 moveq #20,%d1 <== NOT EXECUTED 43586: 2040 moveal %d0,%a0 <== NOT EXECUTED 43588: 70ff moveq #-1,%d0 <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
4358a: 4e5e unlk %fp <== NOT EXECUTED
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4358c: 2081 movel %d1,%a0@ <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
000443f6 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
443f6: 4e56 0000 linkw %fp,#0 443fa: 2f0a movel %a2,%sp@- 443fc: 246e 0008 moveal %fp@(8),%a2
assert( the_jnode );
44400: 4a8a tstl %a2 44402: 6700 01ee beqw 445f2 <IMFS_print_jnode+0x1fc>
fprintf(stdout, "%s", the_jnode->name );
44406: 2079 0006 3fbc moveal 63fbc <_impure_ptr>,%a0 4440c: 2f28 0008 movel %a0@(8),%sp@- 44410: 486a 000c pea %a2@(12) 44414: 4eb9 0005 3208 jsr 53208 <fputs>
switch( the_jnode->type ) {
4441a: 202a 0048 movel %a2@(72),%d0 4441e: 508f addql #8,%sp 44420: 7207 moveq #7,%d1 44422: b280 cmpl %d0,%d1
44424: 6434 bccs 4445a <IMFS_print_jnode+0x64> <== ALWAYS TAKEN
fprintf(stdout, " FIFO not printed\n" );
assert(0);
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
44426: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44428: 4879 0006 267e pea 6267e <IntUartPollCallbacks.6560+0xc8> <== NOT EXECUTED 4442e: 2079 0006 3fbc moveal 63fbc <_impure_ptr>,%a0 <== NOT EXECUTED 44434: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44438: 4eb9 0005 309c jsr 5309c <fprintf> <== NOT EXECUTED
assert(0);
4443e: 4879 0006 1879 pea 61879 <rtems_filesystem_mount_table_size+0x309><== NOT EXECUTED 44444: 4879 0006 276e pea 6276e <__FUNCTION__.6531> <== NOT EXECUTED 4444a: 4878 006c pea 6c <DBL_MANT_DIG+0x37> <== NOT EXECUTED 4444e: 4879 0006 25e0 pea 625e0 <IntUartPollCallbacks.6560+0x2a> <== NOT EXECUTED 44454: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED
)
{
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
4445a: 323b 0a08 movew %pc@(44464 <IMFS_print_jnode+0x6e>,%d0:l:2),%d1 4445e: 48c1 extl %d1 44460: 4efb 1802 jmp %pc@(44464 <IMFS_print_jnode+0x6e>,%d1:l)
44464: ffc2 0177702 <== NOT EXECUTED 44466: 0162 bchg %d0,%a2@- <== NOT EXECUTED 44468: 012a 00f0 btst %d0,%a2@(240) <== NOT EXECUTED 4446c: 00b6 0082 004a oril #8519754,%d6 <== NOT EXECUTED 44472: 0010 020 <== NOT EXECUTED
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
44474: 2079 0006 3fbc moveal 63fbc <_impure_ptr>,%a0 <== NOT EXECUTED 4447a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4447e: 4878 0012 pea 12 <INVALID_OPERATION+0x2> <== NOT EXECUTED 44482: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44486: 4879 0006 266b pea 6266b <IntUartPollCallbacks.6560+0xb5> <== NOT EXECUTED 4448c: 4eb9 0005 3dd0 jsr 53dd0 <fwrite> <== NOT EXECUTED
assert(0);
44492: 4879 0006 1879 pea 61879 <rtems_filesystem_mount_table_size+0x309><== NOT EXECUTED 44498: 4879 0006 276e pea 6276e <__FUNCTION__.6531> <== NOT EXECUTED 4449e: 4878 0067 pea 67 <DBL_MANT_DIG+0x32> <== NOT EXECUTED 444a2: 4879 0006 25e0 pea 625e0 <IntUartPollCallbacks.6560+0x2a> <== NOT EXECUTED 444a8: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
444ae: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 444b2: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 444b6: 4879 0006 263c pea 6263c <IntUartPollCallbacks.6560+0x86> <== NOT EXECUTED 444bc: 2079 0006 3fbc moveal 63fbc <_impure_ptr>,%a0 <== NOT EXECUTED 444c2: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 444c6: 4eb9 0005 309c jsr 5309c <fprintf> <== NOT EXECUTED
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
}
444cc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
444d0: 203c 0006 2db8 movel #404920,%d0 <== NOT EXECUTED
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
444d6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
444da: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
444de: 4e5e unlk %fp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
444e0: 4ef9 0005 4b00 jmp 54b00 <puts> <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
444e6: 2f2a 0050 movel %a2@(80),%sp@- 444ea: 4879 0006 264b pea 6264b <IntUartPollCallbacks.6560+0x95> 444f0: 2079 0006 3fbc moveal 63fbc <_impure_ptr>,%a0 444f6: 2f28 0008 movel %a0@(8),%sp@- 444fa: 4eb9 0005 309c jsr 5309c <fprintf>
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
}
44500: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
44504: 203c 0006 2db8 movel #404920,%d0
);
#else
fprintf(stdout, " (file %" PRId32 ")",
(uint32_t)the_jnode->info.file.size );
#endif
break;
4450a: 4fef 000c lea %sp@(12),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
4450e: 2d40 0008 movel %d0,%fp@(8)
}
44512: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
44514: 4ef9 0005 4b00 jmp 54b00 <puts>
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
4451a: 2079 0006 3fbc moveal 63fbc <_impure_ptr>,%a0 <== NOT EXECUTED 44520: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44524: 4878 0013 pea 13 <INVALID_OPERATION+0x3> <== NOT EXECUTED 44528: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4452c: 4879 0006 2657 pea 62657 <IntUartPollCallbacks.6560+0xa1> <== NOT EXECUTED 44532: 4eb9 0005 3dd0 jsr 53dd0 <fwrite> <== NOT EXECUTED
assert(0);
44538: 4879 0006 1879 pea 61879 <rtems_filesystem_mount_table_size+0x309><== NOT EXECUTED 4453e: 4879 0006 276e pea 6276e <__FUNCTION__.6531> <== NOT EXECUTED 44544: 4878 0062 pea 62 <DBL_MANT_DIG+0x2d> <== NOT EXECUTED 44548: 4879 0006 25e0 pea 625e0 <IntUartPollCallbacks.6560+0x2a> <== NOT EXECUTED 4454e: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
44554: 2079 0006 3fbc moveal 63fbc <_impure_ptr>,%a0 <== NOT EXECUTED 4455a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4455e: 4878 0013 pea 13 <INVALID_OPERATION+0x3> <== NOT EXECUTED 44562: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44566: 4879 0006 2657 pea 62657 <IntUartPollCallbacks.6560+0xa1> <== NOT EXECUTED 4456c: 4eb9 0005 3dd0 jsr 53dd0 <fwrite> <== NOT EXECUTED
assert(0);
44572: 4879 0006 1879 pea 61879 <rtems_filesystem_mount_table_size+0x309><== NOT EXECUTED 44578: 4879 0006 276e pea 6276e <__FUNCTION__.6531> <== NOT EXECUTED 4457e: 4878 005d pea 5d <DBL_MANT_DIG+0x28> <== NOT EXECUTED 44582: 4879 0006 25e0 pea 625e0 <IntUartPollCallbacks.6560+0x2a> <== NOT EXECUTED 44588: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
4458e: 2f2a 0050 movel %a2@(80),%sp@- 44592: 2f2a 004c movel %a2@(76),%sp@- 44596: 4879 0006 2629 pea 62629 <IntUartPollCallbacks.6560+0x73> 4459c: 2079 0006 3fbc moveal 63fbc <_impure_ptr>,%a0 445a2: 2f28 0008 movel %a0@(8),%sp@- 445a6: 4eb9 0005 309c jsr 5309c <fprintf>
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
}
445ac: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
445b0: 203c 0006 2db8 movel #404920,%d0
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
445b6: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
445ba: 2d40 0008 movel %d0,%fp@(8)
}
445be: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
445c0: 4ef9 0005 4b00 jmp 54b00 <puts>
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
445c6: 2079 0006 3fbc moveal 63fbc <_impure_ptr>,%a0 445cc: 2f28 0008 movel %a0@(8),%sp@- 445d0: 4878 002f pea 2f <OPER2+0x1b> 445d4: 4eb9 0005 30dc jsr 530dc <fputc>
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
}
445da: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
445de: 203c 0006 2db8 movel #404920,%d0
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
445e4: 508f addql #8,%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
445e6: 2d40 0008 movel %d0,%fp@(8)
}
445ea: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
445ec: 4ef9 0005 4b00 jmp 54b00 <puts>
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
445f2: 4879 0006 25d6 pea 625d6 <IntUartPollCallbacks.6560+0x20> <== NOT EXECUTED 445f8: 4879 0006 276e pea 6276e <__FUNCTION__.6531> <== NOT EXECUTED 445fe: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> <== NOT EXECUTED 44602: 4879 0006 25e0 pea 625e0 <IntUartPollCallbacks.6560+0x2a> <== NOT EXECUTED 44608: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED
000435a4 <IMFS_readlink>:
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
435a4: 7004 moveq #4,%d0
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
435a6: 4e56 fff4 linkw %fp,#-12 435aa: 206e 0008 moveal %fp@(8),%a0 435ae: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
IMFS_jnode_t *node;
int i;
node = loc->node_access;
435b2: 2450 moveal %a0@,%a2
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
435b4: 266e 000c moveal %fp@(12),%a3 435b8: 242e 0010 movel %fp@(16),%d2
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
435bc: b0aa 0048 cmpl %a2@(72),%d0
435c0: 663c bnes 435fe <IMFS_readlink+0x5a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
435c2: 4a82 tstl %d2
435c4: 672c beqs 435f2 <IMFS_readlink+0x4e> <== NEVER TAKEN
435c6: 206a 004c moveal %a2@(76),%a0 435ca: 1210 moveb %a0@,%d1
435cc: 6724 beqs 435f2 <IMFS_readlink+0x4e> <== NEVER TAKEN
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
435ce: 91c8 subal %a0,%a0 435d0: 4280 clrl %d0
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
435d2: 5280 addql #1,%d0
buf[i] = node->info.sym_link.name[i];
435d4: 1781 8800 moveb %d1,%a3@(00000000,%a0:l)
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
435d8: 2040 moveal %d0,%a0 435da: b082 cmpl %d2,%d0
435dc: 640a bccs 435e8 <IMFS_readlink+0x44>
435de: 226a 004c moveal %a2@(76),%a1 435e2: 1231 0800 moveb %a1@(00000000,%d0:l),%d1
435e6: 66ea bnes 435d2 <IMFS_readlink+0x2e>
buf[i] = node->info.sym_link.name[i];
return i;
}
435e8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 435ee: 4e5e unlk %fp 435f0: 4e75 rts
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
435f2: 4280 clrl %d0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
435f4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 435fa: 4e5e unlk %fp <== NOT EXECUTED 435fc: 4e75 rts <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
435fe: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 43604: 7216 moveq #22,%d1 <== NOT EXECUTED 43606: 2040 moveal %d0,%a0 <== NOT EXECUTED 43608: 70ff moveq #-1,%d0 <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
return i;
}
4360a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
43610: 2081 movel %d1,%a0@ <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
return i;
}
43612: 4e5e unlk %fp <== NOT EXECUTED
...
00043618 <IMFS_rename>:
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 */
)
{
43618: 4e56 fff8 linkw %fp,#-8
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
4361c: 206e 000c moveal %fp@(12),%a0
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 */
)
{
43620: 2f0a movel %a2,%sp@-
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 );
43622: 4878 0020 pea 20 <OPER2+0xc> 43626: 2f2e 0014 movel %fp@(20),%sp@-
)
{
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
4362a: 2450 moveal %a0@,%a2
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
4362c: 486a 000c pea %a2@(12) 43630: 4eb9 0005 445c jsr 5445c <strncpy>
if ( the_jnode->Parent != NULL )
43636: 4fef 000c lea %sp@(12),%sp 4363a: 4aaa 0008 tstl %a2@(8)
4363e: 670a beqs 4364a <IMFS_rename+0x32> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
43640: 2f0a movel %a2,%sp@- 43642: 4eb9 0004 8718 jsr 48718 <_Chain_Extract> 43648: 588f addql #4,%sp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
4364a: 206e 0010 moveal %fp@(16),%a0 4364e: 2050 moveal %a0@,%a0
the_jnode->Parent = new_parent;
43650: 2548 0008 movel %a0,%a2@(8)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
43654: 2f0a movel %a2,%sp@- 43656: 4868 004c pea %a0@(76) 4365a: 4eb9 0004 86e0 jsr 486e0 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
43660: 42a7 clrl %sp@- 43662: 486e fff8 pea %fp@(-8) 43666: 4eb9 0004 40b4 jsr 440b4 <gettimeofday> 4366c: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
}
43672: 4280 clrl %d0 43674: 246e fff4 moveal %fp@(-12),%a2
43678: 4e5e unlk %fp <== NOT EXECUTED
0004a190 <IMFS_rmnod>:
int IMFS_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
4a190: 4e56 fff8 linkw %fp,#-8 4a194: 2f0b movel %a3,%sp@- 4a196: 266e 000c moveal %fp@(12),%a3 4a19a: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
4a19c: 2453 moveal %a3@,%a2
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
4a19e: 4aaa 0008 tstl %a2@(8)
4a1a2: 670e beqs 4a1b2 <IMFS_rmnod+0x22> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4a1a4: 2f0a movel %a2,%sp@- 4a1a6: 4eb9 0004 b054 jsr 4b054 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
4a1ac: 588f addql #4,%sp 4a1ae: 42aa 0008 clrl %a2@(8)
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
4a1b2: 302a 0032 movew %a2@(50),%d0 4a1b6: 5380 subql #1,%d0 4a1b8: 3540 0032 movew %d0,%a2@(50)
IMFS_update_ctime( the_jnode );
4a1bc: 42a7 clrl %sp@- 4a1be: 486e fff8 pea %fp@(-8) 4a1c2: 4eb9 0004 a6fc jsr 4a6fc <gettimeofday> 4a1c8: 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) ) {
4a1ce: 2f0a movel %a2,%sp@- 4a1d0: 4eb9 0004 a7d6 jsr 4a7d6 <rtems_libio_is_file_open> 4a1d6: 4fef 000c lea %sp@(12),%sp 4a1da: 4a80 tstl %d0
4a1dc: 6628 bnes 4a206 <IMFS_rmnod+0x76> <== NEVER TAKEN
4a1de: 4a6a 0032 tstw %a2@(50)
4a1e2: 6622 bnes 4a206 <IMFS_rmnod+0x76> <== NEVER TAKEN
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
4a1e4: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 4a1ea: 2653 moveal %a3@,%a3 4a1ec: b7e8 0004 cmpal %a0@(4),%a3
4a1f0: 6736 beqs 4a228 <IMFS_rmnod+0x98> <== NEVER TAKEN
4a1f2: 47f9 0004 a584 lea 4a584 <free>,%a3
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
4a1f8: 7004 moveq #4,%d0 4a1fa: b0aa 0048 cmpl %a2@(72),%d0
4a1fe: 6714 beqs 4a214 <IMFS_rmnod+0x84>
if ( the_jnode->info.sym_link.name )
free( (void*) the_jnode->info.sym_link.name );
}
free( the_jnode );
4a200: 2f0a movel %a2,%sp@- 4a202: 4e93 jsr %a3@ 4a204: 588f addql #4,%sp
}
return 0;
}
4a206: 246e fff0 moveal %fp@(-16),%a2 4a20a: 4280 clrl %d0 4a20c: 266e fff4 moveal %fp@(-12),%a3 4a210: 4e5e unlk %fp 4a212: 4e75 rts
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
if ( the_jnode->info.sym_link.name )
4a214: 202a 004c movel %a2@(76),%d0
4a218: 67e6 beqs 4a200 <IMFS_rmnod+0x70> <== NEVER TAKEN
free( (void*) the_jnode->info.sym_link.name );
4a21a: 2f00 movel %d0,%sp@- 4a21c: 4e93 jsr %a3@ 4a21e: 588f addql #4,%sp
}
free( the_jnode );
4a220: 2f0a movel %a2,%sp@- 4a222: 4e93 jsr %a3@ 4a224: 588f addql #4,%sp 4a226: 60de bras 4a206 <IMFS_rmnod+0x76>
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
4a228: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED 4a22c: 47f9 0004 a584 lea 4a584 <free>,%a3 <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
4a232: 7004 moveq #4,%d0 <== NOT EXECUTED 4a234: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4a238: 66c6 bnes 4a200 <IMFS_rmnod+0x70> <== NOT EXECUTED 4a23a: 60d8 bras 4a214 <IMFS_rmnod+0x84> <== NOT EXECUTED
0004a23c <IMFS_stat>:
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4a23c: 7007 moveq #7,%d0
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
4a23e: 4e56 0000 linkw %fp,#0 4a242: 206e 000c moveal %fp@(12),%a0 4a246: 2f0a movel %a2,%sp@- 4a248: 246e 0008 moveal %fp@(8),%a2
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
4a24c: 2252 moveal %a2@,%a1
switch ( the_jnode->type ) {
4a24e: b0a9 0048 cmpl %a1@(72),%d0
4a252: 6418 bccs 4a26c <IMFS_stat+0x30> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4a254: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4a25a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4a25e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a260: 70ff moveq #-1,%d0 <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4a262: 4e5e unlk %fp <== NOT EXECUTED
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4a264: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4a26a: 4e75 rts <== NOT EXECUTED
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4a26c: 2029 0048 movel %a1@(72),%d0 4a270: d080 addl %d0,%d0 4a272: 303b 0808 movew %pc@(4a27c <IMFS_stat+0x40>,%d0:l),%d0 4a276: 48c0 extl %d0 4a278: 4efb 0802 jmp %pc@(4a27c <IMFS_stat+0x40>,%d0:l)
4a27c: ffd8 0177730 <== NOT EXECUTED 4a27e: ffd8 0177730 <== NOT EXECUTED 4a280: 00c2 bitrev %d2 <== NOT EXECUTED 4a282: ffd8 0177730 <== NOT EXECUTED 4a284: 0010 020 <== NOT EXECUTED 4a286: 006a 0152 <== NOT EXECUTED 4a288: 006a 0152 <== NOT EXECUTED 4a28a: 0010 020 <== NOT EXECUTED
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4a28c: 246a 0010 moveal %a2@(16),%a2 <== NOT EXECUTED
buf->st_mode = the_jnode->st_mode;
4a290: 2169 002e 000c movel %a1@(46),%a0@(12) <== NOT EXECUTED
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
4a296: 2169 0034 0008 movel %a1@(52),%a0@(8) <== NOT EXECUTED
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4a29c: 246a 0034 moveal %a2@(52),%a2 <== NOT EXECUTED
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
4a2a0: 3169 0032 0010 movew %a1@(50),%a0@(16) <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4a2a6: 4280 clrl %d0 <== NOT EXECUTED 4a2a8: 4281 clrl %d1 <== NOT EXECUTED
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
4a2aa: 2169 003c 0026 movel %a1@(60),%a0@(38) <== NOT EXECUTED
buf->st_mtime = the_jnode->stat_mtime;
4a2b0: 2169 0040 002e movel %a1@(64),%a0@(46) <== NOT EXECUTED
buf->st_ctime = the_jnode->stat_ctime;
4a2b6: 2169 0044 0036 movel %a1@(68),%a0@(54) <== NOT EXECUTED
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
4a2bc: 3169 0038 0012 movew %a1@(56),%a0@(18) <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4a2c2: 2140 001e movel %d0,%a0@(30) <== NOT EXECUTED 4a2c6: 2141 0022 movel %d1,%a0@(34) <== NOT EXECUTED
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4a2ca: 2212 movel %a2@,%d1 <== 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;
4a2cc: 4280 clrl %d0 <== NOT EXECUTED
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
4a2ce: 3169 003a 0014 movew %a1@(58),%a0@(20) <== NOT EXECUTED
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4a2d4: 2141 0004 movel %d1,%a0@(4) <== NOT EXECUTED 4a2d8: 20bc 0000 fffe movel #65534,%a0@ <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4a2de: 246e fffc moveal %fp@(-4),%a2 4a2e2: 4e5e unlk %fp 4a2e4: 4e75 rts
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4a2e6: 246a 0010 moveal %a2@(16),%a2
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
4a2ea: 2029 004c movel %a1@(76),%d0 4a2ee: 2229 0050 movel %a1@(80),%d1
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
4a2f2: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
4a2f8: 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;
4a2fe: 2169 003c 0026 movel %a1@(60),%a0@(38)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4a304: 246a 0034 moveal %a2@(52),%a2
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
4a308: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4a30e: 2169 0044 0036 movel %a1@(68),%a0@(54)
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
4a314: 2140 001e movel %d0,%a0@(30) 4a318: 2141 0022 movel %d1,%a0@(34)
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
4a31c: 3169 0032 0010 movew %a1@(50),%a0@(16)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4a322: 2212 movel %a2@,%d1
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;
4a324: 4280 clrl %d0
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
4a326: 3169 0038 0012 movew %a1@(56),%a0@(18)
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4a32c: 2141 0004 movel %d1,%a0@(4)
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
4a330: 3169 003a 0014 movew %a1@(58),%a0@(20)
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4a336: 20bc 0000 fffe movel #65534,%a0@ 4a33c: 60a0 bras 4a2de <IMFS_stat+0xa2>
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4a33e: 2029 0050 movel %a1@(80),%d0 4a342: 2169 004c 0016 movel %a1@(76),%a0@(22)
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
4a348: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
4a34e: 2169 0034 0008 movel %a1@(52),%a0@(8)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4a354: 246a 0010 moveal %a2@(16),%a2
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
4a358: 2169 003c 0026 movel %a1@(60),%a0@(38)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4a35e: 246a 0034 moveal %a2@(52),%a2
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
4a362: 2169 0040 002e movel %a1@(64),%a0@(46)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4a368: 2212 movel %a2@,%d1
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
4a36a: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
4a370: 2169 0044 0036 movel %a1@(68),%a0@(54)
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
4a376: 3169 0038 0012 movew %a1@(56),%a0@(18)
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4a37c: 2140 001a movel %d0,%a0@(26)
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;
4a380: 4280 clrl %d0
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4a382: 2141 0004 movel %d1,%a0@(4)
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
4a386: 3169 003a 0014 movew %a1@(58),%a0@(20)
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4a38c: 20bc 0000 fffe movel #65534,%a0@ 4a392: 6000 ff4a braw 4a2de <IMFS_stat+0xa2>
...
0004367c <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
4367c: 4e56 ffc4 linkw %fp,#-60 43680: 2f03 movel %d3,%sp@-
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
43682: 260e movel %fp,%d3 43684: 0683 ffff ffc7 addil #-57,%d3
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
4368a: 2f02 movel %d2,%sp@- 4368c: 242e 0010 movel %fp@(16),%d2
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
43690: 2f02 movel %d2,%sp@- 43692: 4eb9 0005 4444 jsr 54444 <strlen> 43698: 588f addql #4,%sp 4369a: 486e fffc pea %fp@(-4) 4369e: 2f03 movel %d3,%sp@- 436a0: 2f00 movel %d0,%sp@- 436a2: 2f02 movel %d2,%sp@- 436a4: 4eb9 0004 f7c4 jsr 4f7c4 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
436aa: 2f2e 000c movel %fp@(12),%sp@- 436ae: 4eb9 0005 3fb4 jsr 53fb4 <strdup>
if (info.sym_link.name == NULL) {
436b4: 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);
436b8: 2d40 ffe8 movel %d0,%fp@(-24)
if (info.sym_link.name == NULL) {
436bc: 6730 beqs 436ee <IMFS_symlink+0x72> <== NEVER TAKEN
* 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(
436be: 486e ffe8 pea %fp@(-24) 436c2: 2f3c 0000 a1ff movel #41471,%sp@- 436c8: 2f03 movel %d3,%sp@- 436ca: 4878 0004 pea 4 <CONTEXT_ARG> 436ce: 2f2e 0008 movel %fp@(8),%sp@- 436d2: 4eb9 0004 e9ba jsr 4e9ba <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
436d8: 4fef 0014 lea %sp@(20),%sp 436dc: 4a80 tstl %d0
436de: 6728 beqs 43708 <IMFS_symlink+0x8c> <== NEVER TAKEN
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
436e0: 242e ffbc movel %fp@(-68),%d2
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
436e4: 4280 clrl %d0
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
436e6: 262e ffc0 movel %fp@(-64),%d3 436ea: 4e5e unlk %fp 436ec: 4e75 rts
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
if (info.sym_link.name == NULL) {
rtems_set_errno_and_return_minus_one(ENOMEM);
436ee: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 436f4: 740c moveq #12,%d2 <== NOT EXECUTED 436f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 436f8: 70ff moveq #-1,%d0 <== NOT EXECUTED 436fa: 2082 movel %d2,%a0@ <== NOT EXECUTED
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
436fc: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED 43700: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 43704: 4e5e unlk %fp <== NOT EXECUTED 43706: 4e75 rts <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
43708: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 4370c: 4eb9 0004 4024 jsr 44024 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
43712: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED
}
return 0;
}
43718: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
4371c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4371e: 720c moveq #12,%d1 <== NOT EXECUTED 43720: 588f addql #4,%sp <== NOT EXECUTED 43722: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
return 0;
}
43724: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 43728: 4e5e unlk %fp <== NOT EXECUTED
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
4372a: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
return 0;
}
...
00043730 <IMFS_unlink>:
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
43730: 7003 moveq #3,%d0
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
43732: 4e56 ffd0 linkw %fp,#-48 43736: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4373a: 246e 000c moveal %fp@(12),%a2 4373e: 242e 0008 movel %fp@(8),%d2
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
43742: 2652 moveal %a2@,%a3
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
43744: b0ab 0048 cmpl %a3@(72),%d0
43748: 671a beqs 43764 <IMFS_unlink+0x34>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
4374a: 2f0a movel %a2,%sp@- 4374c: 206a 0008 moveal %a2@(8),%a0 43750: 2f02 movel %d2,%sp@- 43752: 2068 0034 moveal %a0@(52),%a0 43756: 4e90 jsr %a0@
return result;
43758: 508f addql #8,%sp
}
4375a: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 43760: 4e5e unlk %fp 43762: 4e75 rts
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
43764: 202b 004c movel %a3@(76),%d0 43768: 6700 0090 beqw 437fa <IMFS_unlink+0xca>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
4376c: 41ea 0004 lea %a2@(4),%a0
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
43770: 260e movel %fp,%d3 43772: 0683 ffff ffe4 addil #-28,%d3
/*
* 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)
43778: 7801 moveq #1,%d4
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
4377a: 2d58 ffe8 movel %a0@+,%fp@(-24) 4377e: 2d58 ffec movel %a0@+,%fp@(-20) 43782: 2d58 fff0 movel %a0@+,%fp@(-16) 43786: 2d50 fff4 movel %a0@,%fp@(-12)
the_link.node_access = node->info.hard_link.link_node;
4378a: 2d40 ffe4 movel %d0,%fp@(-28)
IMFS_Set_handlers( &the_link );
4378e: 2f03 movel %d3,%sp@- 43790: 4eb9 0004 ebc0 jsr 4ebc0 <IMFS_Set_handlers>
/*
* 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)
43796: 206b 004c moveal %a3@(76),%a0 4379a: 4281 clrl %d1 4379c: 588f addql #4,%sp 4379e: 3028 0032 movew %a0@(50),%d0 437a2: 3200 movew %d0,%d1 437a4: b881 cmpl %d1,%d4
437a6: 6730 beqs 437d8 <IMFS_unlink+0xa8>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
437a8: 5380 subql #1,%d0 437aa: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( node->info.hard_link.link_node );
437ae: 42a7 clrl %sp@- 437b0: 486e fff8 pea %fp@(-8) 437b4: 4eb9 0004 40b4 jsr 440b4 <gettimeofday> 437ba: 206b 004c moveal %a3@(76),%a0 437be: 508f addql #8,%sp 437c0: 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 );
437c6: 2f0a movel %a2,%sp@- 437c8: 206a 0008 moveal %a2@(8),%a0 437cc: 2f02 movel %d2,%sp@- 437ce: 2068 0034 moveal %a0@(52),%a0 437d2: 4e90 jsr %a0@
return result;
437d4: 508f addql #8,%sp 437d6: 6082 bras 4375a <IMFS_unlink+0x2a>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
437d8: 2f03 movel %d3,%sp@- 437da: 2f02 movel %d2,%sp@- 437dc: 206e ffec moveal %fp@(-20),%a0 437e0: 2068 0034 moveal %a0@(52),%a0 437e4: 4e90 jsr %a0@
if ( result != 0 )
437e6: 508f addql #8,%sp 437e8: 4a80 tstl %d0 437ea: 6700 ff5e beqw 4374a <IMFS_unlink+0x1a> 437ee: 70ff moveq #-1,%d0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
437f0: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 437f6: 4e5e unlk %fp 437f8: 4e75 rts
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
437fa: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 43800: 7216 moveq #22,%d1 <== NOT EXECUTED 43802: 2040 moveal %d0,%a0 <== NOT EXECUTED 43804: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
43806: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 <== NOT EXECUTED
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
4380c: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
4380e: 4e5e unlk %fp <== NOT EXECUTED
...
00043814 <IMFS_unmount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
43814: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
43816: 4e56 0000 linkw %fp,#0 4381a: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
4381e: 2068 0008 moveal %a0@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
43822: b0a8 0048 cmpl %a0@(72),%d0
43826: 6610 bnes 43838 <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
43828: 4aa8 0058 tstl %a0@(88)
4382c: 671c beqs 4384a <IMFS_unmount+0x36> <== NEVER TAKEN
/*
* 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;
4382e: 42a8 0058 clrl %a0@(88) 43832: 4280 clrl %d0
return 0;
}
43834: 4e5e unlk %fp 43836: 4e75 rts
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
43838: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 4383e: 7214 moveq #20,%d1 <== NOT EXECUTED 43840: 2040 moveal %d0,%a0 <== NOT EXECUTED 43842: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
43844: 4e5e unlk %fp <== NOT EXECUTED
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
43846: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
43848: 4e75 rts <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
4384a: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 43850: 7216 moveq #22,%d1 <== NOT EXECUTED 43852: 2040 moveal %d0,%a0 <== NOT EXECUTED 43854: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
43856: 4e5e unlk %fp <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
43858: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
000428b4 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
428b4: 4e56 0000 linkw %fp,#0
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
428b8: 2079 0005 c836 moveal 5c836 <rtems_malloc_statistics_helpers>,%a0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
428be: 2f03 movel %d3,%sp@- 428c0: 262e 0008 movel %fp@(8),%d3 428c4: 2f02 movel %d2,%sp@- 428c6: 242e 000c movel %fp@(12),%d2
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
428ca: 4a88 tstl %a0
428cc: 6704 beqs 428d2 <RTEMS_Malloc_Initialize+0x1e> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->initialize)();
428ce: 2050 moveal %a0@,%a0 <== NOT EXECUTED 428d0: 4e90 jsr %a0@ <== NOT EXECUTED
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
428d2: 4eb9 0004 aa78 jsr 4aa78 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
428d8: 2079 0005 c83a moveal 5c83a <rtems_malloc_sbrk_helpers>,%a0 428de: 4a88 tstl %a0
428e0: 6712 beqs 428f4 <RTEMS_Malloc_Initialize+0x40> <== ALWAYS TAKEN
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
428e2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
428e6: 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)(
428e8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 428ea: 2050 moveal %a0@,%a0 <== NOT EXECUTED 428ec: 4e90 jsr %a0@ <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
428ee: 508f addql #8,%sp <== NOT EXECUTED 428f0: 9480 subl %d0,%d2 <== NOT EXECUTED 428f2: 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 (
428f4: 4a39 0005 c835 tstb 5c835 <rtems_unified_work_area>
428fa: 6624 bnes 42920 <RTEMS_Malloc_Initialize+0x6c>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
428fc: 4a39 0005 c2bc tstb 5c2bc <Configuration+0x28>
42902: 6644 bnes 42948 <RTEMS_Malloc_Initialize+0x94>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
42904: 4878 0004 pea 4 <CONTEXT_ARG> 42908: 2f02 movel %d2,%sp@- 4290a: 2f03 movel %d3,%sp@- 4290c: 2f39 0005 c1f0 movel 5c1f0 <RTEMS_Malloc_Heap>,%sp@- 42912: 4eb9 0004 6c04 jsr 46c04 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
42918: 4fef 0010 lea %sp@(16),%sp 4291c: 4a80 tstl %d0
4291e: 675c beqs 4297c <RTEMS_Malloc_Initialize+0xc8> <== NEVER TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
42920: 2f39 0005 c1f0 movel 5c1f0 <RTEMS_Malloc_Heap>,%sp@- 42926: 2439 0005 d878 movel 5d878 <rtems_malloc_statistics>,%d2 4292c: 4eb9 0004 77a4 jsr 477a4 <_Protected_heap_Get_size>
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
42932: 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) );
42936: d082 addl %d2,%d0 42938: 588f addql #4,%sp
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
4293a: 242e fff8 movel %fp@(-8),%d2 4293e: 4e5e unlk %fp
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
42940: 23c0 0005 d878 movel %d0,5d878 <rtems_malloc_statistics>
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
42946: 4e75 rts
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
42948: 2f02 movel %d2,%sp@- 4294a: 42a7 clrl %sp@- 4294c: 2f03 movel %d3,%sp@- 4294e: 4eb9 0004 e0f8 jsr 4e0f8 <memset>
* 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 ) {
42954: 4fef 000c lea %sp@(12),%sp 42958: 4a39 0005 c835 tstb 5c835 <rtems_unified_work_area>
4295e: 66c0 bnes 42920 <RTEMS_Malloc_Initialize+0x6c> <== NEVER TAKEN
42960: 4878 0004 pea 4 <CONTEXT_ARG> 42964: 2f02 movel %d2,%sp@- 42966: 2f03 movel %d3,%sp@- 42968: 2f39 0005 c1f0 movel 5c1f0 <RTEMS_Malloc_Heap>,%sp@- 4296e: 4eb9 0004 6c04 jsr 46c04 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
42974: 4fef 0010 lea %sp@(16),%sp 42978: 4a80 tstl %d0
4297a: 66a4 bnes 42920 <RTEMS_Malloc_Initialize+0x6c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
4297c: 4878 001a pea 1a <OPER2+0x6> <== NOT EXECUTED 42980: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
00042102 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
42102: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 42106: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4210a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
4210e: 4a8a tstl %a2 <== NOT EXECUTED 42110: 6700 00c2 beqw 421d4 <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED
return;
if ( !print_handler )
42114: 2879 0005 d720 moveal 5d720 <print_handler>,%a4 <== NOT EXECUTED 4211a: 4a8c tstl %a4 <== NOT EXECUTED 4211c: 6700 00b6 beqw 421d4 <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
42120: 70ff moveq #-1,%d0 <== NOT EXECUTED 42122: b08a cmpl %a2,%d0 <== NOT EXECUTED 42124: 6700 00d8 beqw 421fe <Stack_check_Dump_threads_usage+0xfc><== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
42128: 47ea 00bc lea %a2@(188),%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);
4212c: 2413 movel %a3@,%d2 <== NOT EXECUTED 4212e: 0682 ffff fff0 addil #-16,%d2 <== 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);
42134: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 42138: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
4213e: 282a 00fc movel %a2@(252),%d4 <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
42142: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42144: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42146: 4eb9 0004 20ce jsr 420ce <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
4214c: 508f addql #8,%sp <== NOT EXECUTED 4214e: 4a80 tstl %d0 <== NOT EXECUTED 42150: 6700 00e2 beqw 42234 <Stack_check_Dump_threads_usage+0x132><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
42154: d682 addl %d2,%d3 <== NOT EXECUTED 42156: 9680 subl %d0,%d3 <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
42158: 4a8a tstl %a2 <== NOT EXECUTED 4215a: 6700 00e0 beqw 4223c <Stack_check_Dump_threads_usage+0x13a><== NOT EXECUTED
(*print_handler)(
4215e: 486e fffb pea %fp@(-5) <== NOT EXECUTED 42162: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 42166: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4216a: 4eb9 0004 5f54 jsr 45f54 <rtems_object_get_name> <== NOT EXECUTED 42170: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42172: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42176: 4879 0005 b396 pea 5b396 <IntUartPollCallbacks.6560+0x20> <== NOT EXECUTED 4217c: 2f39 0005 d71c movel 5d71c <print_context>,%sp@- <== NOT EXECUTED 42182: 4e94 jsr %a4@ <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
42184: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
42188: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
4218c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4218e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 42190: 2013 movel %a3@,%d0 <== NOT EXECUTED 42192: 5380 subql #1,%d0 <== NOT EXECUTED 42194: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42198: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4219a: 4879 0005 b3b1 pea 5b3b1 <IntUartPollCallbacks.6560+0x3b> <== NOT EXECUTED 421a0: 2f39 0005 d71c movel 5d71c <print_context>,%sp@- <== NOT EXECUTED 421a6: 2079 0005 d720 moveal 5d720 <print_handler>,%a0 <== NOT EXECUTED 421ac: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
421ae: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 421b2: 4ab9 0005 d718 tstl 5d718 <Stack_check_Initialized> <== NOT EXECUTED 421b8: 6724 beqs 421de <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
421ba: 2f03 movel %d3,%sp@- <== NOT EXECUTED 421bc: 4879 0005 b3dc pea 5b3dc <IntUartPollCallbacks.6560+0x66> <== NOT EXECUTED 421c2: 2f39 0005 d71c movel 5d71c <print_context>,%sp@- <== NOT EXECUTED 421c8: 2079 0005 d720 moveal 5d720 <print_handler>,%a0 <== NOT EXECUTED 421ce: 4e90 jsr %a0@ <== NOT EXECUTED 421d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
421d4: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 421da: 4e5e unlk %fp <== NOT EXECUTED 421dc: 4e75 rts <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
421de: 4879 0005 b3cf pea 5b3cf <IntUartPollCallbacks.6560+0x59> <== NOT EXECUTED 421e4: 2f39 0005 d71c movel 5d71c <print_context>,%sp@- <== NOT EXECUTED 421ea: 2079 0005 d720 moveal 5d720 <print_handler>,%a0 <== NOT EXECUTED 421f0: 4e90 jsr %a0@ <== NOT EXECUTED 421f2: 508f addql #8,%sp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
421f4: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 421fa: 4e5e unlk %fp <== NOT EXECUTED 421fc: 4e75 rts <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
421fe: 4ab9 0005 df38 tstl 5df38 <Stack_check_Interrupt_stack+0x4><== NOT EXECUTED 42204: 67ce beqs 421d4 <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED 42206: 47f9 0005 df34 lea 5df34 <Stack_check_Interrupt_stack>,%a3 <== NOT EXECUTED 4220c: 4284 clrl %d4 <== NOT EXECUTED 4220e: 95ca subal %a2,%a2 <== NOT EXECUTED
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
42210: 2413 movel %a3@,%d2 <== NOT EXECUTED 42212: 0682 ffff fff0 addil #-16,%d2 <== 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);
42218: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 4221c: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
42222: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42224: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42226: 4eb9 0004 20ce jsr 420ce <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
4222c: 508f addql #8,%sp <== NOT EXECUTED 4222e: 4a80 tstl %d0 <== NOT EXECUTED 42230: 6600 ff22 bnew 42154 <Stack_check_Dump_threads_usage+0x52><== NOT EXECUTED 42234: 4283 clrl %d3 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
42236: 4a8a tstl %a2 <== NOT EXECUTED 42238: 6600 ff24 bnew 4215e <Stack_check_Dump_threads_usage+0x5c><== 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 );
4223c: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 42240: 4879 0005 b3a3 pea 5b3a3 <IntUartPollCallbacks.6560+0x2d> <== NOT EXECUTED 42246: 2f39 0005 d71c movel 5d71c <print_context>,%sp@- <== NOT EXECUTED 4224c: 4e94 jsr %a4@ <== NOT EXECUTED
}
(*print_handler)(
4224e: 206b 0004 moveal %a3@(4),%a0 <== 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 );
42252: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
(*print_handler)(
42256: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42258: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4225a: 2013 movel %a3@,%d0 <== NOT EXECUTED 4225c: 5380 subql #1,%d0 <== NOT EXECUTED 4225e: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42262: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42264: 4879 0005 b3b1 pea 5b3b1 <IntUartPollCallbacks.6560+0x3b> <== NOT EXECUTED 4226a: 2f39 0005 d71c movel 5d71c <print_context>,%sp@- <== NOT EXECUTED 42270: 2079 0005 d720 moveal 5d720 <print_handler>,%a0 <== NOT EXECUTED 42276: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
42278: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4227c: 4ab9 0005 d718 tstl 5d718 <Stack_check_Initialized> <== NOT EXECUTED 42282: 6600 ff36 bnew 421ba <Stack_check_Dump_threads_usage+0xb8><== NOT EXECUTED 42286: 6000 ff56 braw 421de <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
000424c8 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
424c8: 4e56 0000 linkw %fp,#0
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if (Stack_check_Initialized)
424cc: 4ab9 0005 d718 tstl 5d718 <Stack_check_Initialized>
424d2: 6656 bnes 4252a <Stack_check_Initialize+0x62>
424d4: 41f9 0005 df24 lea 5df24 <Stack_check_Pattern>,%a0 424da: 4280 clrl %d0 424dc: 43f9 0005 b514 lea 5b514 <pattern.4542>,%a1
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
424e2: 7203 moveq #3,%d1 424e4: c280 andl %d0,%d1
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
424e6: 5280 addql #1,%d0
p[i] = pattern[ i%4 ];
424e8: 20f1 1c00 movel %a1@(00000000,%d1:l:4),%a0@+
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
424ec: 7204 moveq #4,%d1 424ee: b280 cmpl %d0,%d1
424f0: 66f0 bnes 424e2 <Stack_check_Initialize+0x1a>
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
424f2: 2039 0005 e0ac movel 5e0ac <_CPU_Interrupt_stack_low>,%d0
424f8: 6728 beqs 42522 <Stack_check_Initialize+0x5a> <== NEVER TAKEN
424fa: 2239 0005 e050 movel 5e050 <_CPU_Interrupt_stack_high>,%d1
42500: 6720 beqs 42522 <Stack_check_Initialize+0x5a> <== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
42502: 9280 subl %d0,%d1
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
42504: 2f01 movel %d1,%sp@- 42506: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70>
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
4250a: 23c0 0005 df38 movel %d0,5df38 <Stack_check_Interrupt_stack+0x4>
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
42510: 2f00 movel %d0,%sp@-
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
42512: 23c1 0005 df34 movel %d1,5df34 <Stack_check_Interrupt_stack>
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
42518: 4eb9 0004 e6c4 jsr 4e6c4 <memset> 4251e: 4fef 000c lea %sp@(12),%sp
}
#endif
Stack_check_Initialized = 1;
42522: 7001 moveq #1,%d0 42524: 23c0 0005 d718 movel %d0,5d718 <Stack_check_Initialized>
}
4252a: 4e5e unlk %fp <== NOT EXECUTED
000420ce <Stack_check_find_high_water_mark>:
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
420ce: 70fc moveq #-4,%d0 <== NOT EXECUTED
*/
void *Stack_check_find_high_water_mark(
const void *s,
size_t n
)
{
420d0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
420d4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 420d8: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
420dc: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 420e0: d088 addl %a0,%d0 <== NOT EXECUTED 420e2: b088 cmpl %a0,%d0 <== NOT EXECUTED 420e4: 6310 blss 420f6 <Stack_check_find_high_water_mark+0x28><== NOT EXECUTED
if (*base != U32_PATTERN)
420e6: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 420ec: b290 cmpl %a0@,%d1 <== NOT EXECUTED 420ee: 660c bnes 420fc <Stack_check_find_high_water_mark+0x2e><== 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++)
420f0: 5888 addql #4,%a0 <== NOT EXECUTED 420f2: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 420f4: 65f0 bcss 420e6 <Stack_check_find_high_water_mark+0x18><== NOT EXECUTED 420f6: 4280 clrl %d0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
420f8: 4e5e unlk %fp <== NOT EXECUTED 420fa: 4e75 rts <== NOT EXECUTED
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
return (void *) base;
420fc: 2008 movel %a0,%d0 <== NOT EXECUTED
#endif
return (void *)0;
}
420fe: 4e5e unlk %fp <== NOT EXECUTED
00042304 <Stack_check_report_blown_task>:
*
* 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)
{
42304: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 42308: 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");
4230c: 4879 0005 b443 pea 5b443 <IntUartPollCallbacks.6560+0xcd> <== NOT EXECUTED 42312: 47f9 0004 385c lea 4385c <printk>,%a3 <== 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)
{
42318: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4231c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack);
42320: 286a 00c0 moveal %a2@(192),%a4 <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
42324: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
42326: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42328: 4879 0005 b453 pea 5b453 <IntUartPollCallbacks.6560+0xdd> <== NOT EXECUTED 4232e: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
42330: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42334: 4879 0005 b470 pea 5b470 <IntUartPollCallbacks.6560+0xfa> <== NOT EXECUTED 4233a: 4e93 jsr %a3@ <== NOT EXECUTED
printk(
4233c: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 42340: 4879 0005 b482 pea 5b482 <IntUartPollCallbacks.6560+0x10c> <== NOT EXECUTED 42346: 4e93 jsr %a3@ <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
42348: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 4234c: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED 42350: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42354: 4eb9 0004 5f54 jsr 45f54 <rtems_object_get_name> <== NOT EXECUTED 4235a: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 4235e: 2e80 movel %d0,%sp@ <== NOT EXECUTED 42360: 4879 0005 b496 pea 5b496 <IntUartPollCallbacks.6560+0x120> <== NOT EXECUTED 42366: 4e93 jsr %a3@ <== NOT EXECUTED
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
42368: 202a 00bc movel %a2@(188),%d0 <== NOT EXECUTED 4236c: 206a 00c0 moveal %a2@(192),%a0 <== NOT EXECUTED 42370: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42374: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42376: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42378: 4879 0005 b4ac pea 5b4ac <IntUartPollCallbacks.6560+0x136> <== NOT EXECUTED 4237e: 4e93 jsr %a3@ <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
42380: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42384: 4a02 tstb %d2 <== NOT EXECUTED 42386: 670a beqs 42392 <Stack_check_report_blown_task+0x8e><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
42388: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 4238c: 4eb9 0004 68d4 jsr 468d4 <rtems_fatal_error_occurred> <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
42392: 486c 0018 pea %a4@(24) <== NOT EXECUTED 42396: 486c 0008 pea %a4@(8) <== NOT EXECUTED 4239a: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 4239e: 4879 0005 b4dd pea 5b4dd <IntUartPollCallbacks.6560+0x167> <== NOT EXECUTED 423a4: 4e93 jsr %a3@ <== NOT EXECUTED 423a6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
423aa: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 423ae: 4eb9 0004 68d4 jsr 468d4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00046708 <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
46708: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4670c: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 46712: 5280 addql #1,%d0 46714: 206e 0008 moveal %fp@(8),%a0 46718: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_CORE_mutex_Surrender(
4671e: 42a7 clrl %sp@- 46720: 2f28 0008 movel %a0@(8),%sp@- 46724: 4868 0010 pea %a0@(16) 46728: 4eb9 0004 69ac jsr 469ac <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
4672e: 4fef 000c lea %sp@(12),%sp
}
46732: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
46734: 4ef9 0004 7d3c jmp 47d3c <_Thread_Enable_dispatch>
...
000465c8 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
465c8: 4e56 0000 linkw %fp,#0 465cc: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
465ce: 2479 0005 db62 moveal 5db62 <_API_extensions_List>,%a2 465d4: b5fc 0005 db66 cmpal #383846,%a2
465da: 6710 beqs 465ec <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
465dc: 206a 0008 moveal %a2@(8),%a0 465e0: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
465e2: 2452 moveal %a2@,%a2
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
465e4: b5fc 0005 db66 cmpal #383846,%a2
465ea: 66f0 bnes 465dc <_API_extensions_Run_postdriver+0x14><== NEVER TAKEN
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
465ec: 246e fffc moveal %fp@(-4),%a2
465f0: 4e5e unlk %fp <== NOT EXECUTED
000465f4 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
465f4: 4e56 0000 linkw %fp,#0 465f8: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
465fa: 2479 0005 db62 moveal 5db62 <_API_extensions_List>,%a2 46600: b5fc 0005 db66 cmpal #383846,%a2
46606: 6718 beqs 46620 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
46608: 2f39 0005 da82 movel 5da82 <_Thread_Executing>,%sp@- 4660e: 206a 000c moveal %a2@(12),%a0 46612: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
46614: 2452 moveal %a2@,%a2
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
46616: 588f addql #4,%sp 46618: b5fc 0005 db66 cmpal #383846,%a2
4661e: 66e8 bnes 46608 <_API_extensions_Run_postswitch+0x14><== NEVER TAKEN
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
46620: 246e fffc moveal %fp@(-4),%a2
46624: 4e5e unlk %fp <== NOT EXECUTED
0004d144 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4d144: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d14a: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
4d14e: 2279 0005 da82 moveal 5da82 <_Thread_Executing>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d154: 48d7 001c moveml %d2-%d4,%sp@ 4d158: 242e 000c movel %fp@(12),%d2 4d15c: 262e 0014 movel %fp@(20),%d3
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
4d160: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d164: 206e 0008 moveal %fp@(8),%a0 4d168: 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 );
4d16c: 40c1 movew %sr,%d1 4d16e: 8081 orl %d1,%d0 4d170: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
4d172: 2028 0048 movel %a0@(72),%d0 4d176: 5280 addql #1,%d0 4d178: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
4d17c: 4aa8 0040 tstl %a0@(64)
4d180: 6606 bnes 4d188 <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
4d182: b0a8 0044 cmpl %a0@(68),%d0
4d186: 672e beqs 4d1b6 <_CORE_barrier_Wait+0x72>
4d188: 7001 moveq #1,%d0
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
4d18a: 2342 0020 movel %d2,%a1@(32)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
4d18e: 2348 0044 movel %a0,%a1@(68) 4d192: 2140 0030 movel %d0,%a0@(48)
executing->Wait.id = id; _ISR_Enable( level );
4d196: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4d198: 2d43 000c movel %d3,%fp@(12) 4d19c: 203c 0004 8570 movel #296304,%d0 4d1a2: 2d48 0008 movel %a0,%fp@(8) 4d1a6: 2d40 0010 movel %d0,%fp@(16)
}
4d1aa: 4cd7 001c moveml %sp@,%d2-%d4 4d1ae: 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 );
4d1b0: 4ef9 0004 8210 jmp 48210 <_Thread_queue_Enqueue_with_handler>
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
4d1b6: 7001 moveq #1,%d0 4d1b8: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
4d1bc: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4d1be: 2d44 0010 movel %d4,%fp@(16) 4d1c2: 2d42 000c movel %d2,%fp@(12) 4d1c6: 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 );
}
4d1ca: 4cd7 001c moveml %sp@,%d2-%d4 4d1ce: 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 );
4d1d0: 4ef9 0004 d108 jmp 4d108 <_CORE_barrier_Release>
...
00059f30 <_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
)
{
59f30: 4e56 ffe0 linkw %fp,#-32 59f34: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 59f38: 266e 0008 moveal %fp@(8),%a3 59f3c: 282e 000c movel %fp@(12),%d4 59f40: 242e 0010 movel %fp@(16),%d2 59f44: 2a2e 001c movel %fp@(28),%d5
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
59f48: b4ab 004c cmpl %a3@(76),%d2
59f4c: 6262 bhis 59fb0 <_CORE_message_queue_Broadcast+0x80><== NEVER TAKEN
* 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 ) {
59f4e: 4aab 0048 tstl %a3@(72)
59f52: 664c bnes 59fa0 <_CORE_message_queue_Broadcast+0x70>
* 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))) {
59f54: 2f0b movel %a3,%sp@- 59f56: 49f9 0005 c508 lea 5c508 <_Thread_queue_Dequeue>,%a4 59f5c: 4283 clrl %d3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
59f5e: 4bf9 0006 2170 lea 62170 <memcpy>,%a5 59f64: 4e94 jsr %a4@
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
59f66: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
59f68: 2440 moveal %d0,%a2
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
59f6a: 4a80 tstl %d0
59f6c: 6722 beqs 59f90 <_CORE_message_queue_Broadcast+0x60>
59f6e: 2f02 movel %d2,%sp@-
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
59f70: 5283 addql #1,%d3 59f72: 2f04 movel %d4,%sp@- 59f74: 2f2a 002c movel %a2@(44),%sp@- 59f78: 4e95 jsr %a5@
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
59f7a: 206a 0028 moveal %a2@(40),%a0 59f7e: 4fef 000c lea %sp@(12),%sp 59f82: 2082 movel %d2,%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))) {
59f84: 2f0b movel %a3,%sp@- 59f86: 4e94 jsr %a4@
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
59f88: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
59f8a: 2440 moveal %d0,%a2
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
59f8c: 4a80 tstl %d0
59f8e: 66de bnes 59f6e <_CORE_message_queue_Broadcast+0x3e>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
59f90: 2045 moveal %d5,%a0 59f92: 4280 clrl %d0 59f94: 2083 movel %d3,%a0@
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
59f96: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59f9c: 4e5e unlk %fp 59f9e: 4e75 rts
* 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;
59fa0: 2045 moveal %d5,%a0 59fa2: 4280 clrl %d0
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
59fa4: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
* 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;
59faa: 4290 clrl %a0@
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
59fac: 4e5e unlk %fp 59fae: 4e75 rts
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
59fb0: 7001 moveq #1,%d0 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
59fb2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 59fb8: 4e5e unlk %fp <== NOT EXECUTED
00059fbc <_CORE_message_queue_Close>:
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
59fbc: 4e56 0000 linkw %fp,#0 59fc0: 2f0a movel %a2,%sp@-
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
59fc2: 2f2e 0010 movel %fp@(16),%sp@- 59fc6: 2f2e 000c movel %fp@(12),%sp@-
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
59fca: 246e 0008 moveal %fp@(8),%a2
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
59fce: 2f0a movel %a2,%sp@- 59fd0: 4eb9 0005 c8a8 jsr 5c8a8 <_Thread_queue_Flush>
* This removes all messages from the pending message queue. Since
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
59fd6: 4fef 000c lea %sp@(12),%sp 59fda: 4aaa 0048 tstl %a2@(72)
59fde: 6612 bnes 59ff2 <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
59fe0: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
59fe6: 246e fffc moveal %fp@(-4),%a2 59fea: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
59fec: 4ef9 0005 d834 jmp 5d834 <_Workspace_Free>
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
59ff2: 2f0a movel %a2,%sp@- 59ff4: 4eb9 0005 a030 jsr 5a030 <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
59ffa: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
5a000: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers );
}
5a002: 246e fffc moveal %fp@(-4),%a2 5a006: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
5a008: 4ef9 0005 d834 jmp 5d834 <_Workspace_Free>
...
0004fe60 <_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)) {
4fe60: 7203 moveq #3,%d1
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
)
{
4fe62: 4e56 fff4 linkw %fp,#-12 4fe66: 202e 0014 movel %fp@(20),%d0 4fe6a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fe6e: 246e 0008 moveal %fp@(8),%a2 4fe72: 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)) {
4fe76: c280 andl %d0,%d1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
4fe78: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
4fe7c: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
4fe80: 2540 004c movel %d0,%a2@(76)
/*
* 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)) {
4fe84: 4a81 tstl %d1
4fe86: 6620 bnes 4fea8 <_CORE_message_queue_Initialize+0x48>
4fe88: 2200 movel %d0,%d1
/*
* 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));
4fe8a: 2601 movel %d1,%d3 4fe8c: 0683 0000 0010 addil #16,%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 *
4fe92: 2003 movel %d3,%d0 4fe94: 4c02 0800 mulsl %d2,%d0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
4fe98: b280 cmpl %d0,%d1
4fe9a: 631c blss 4feb8 <_CORE_message_queue_Initialize+0x58><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
4fe9c: 4200 clrb %d0
}
4fe9e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fea4: 4e5e unlk %fp 4fea6: 4e75 rts
* 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)) {
allocated_message_size += sizeof(uint32_t);
4fea8: 2200 movel %d0,%d1 4feaa: 5881 addql #4,%d1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
4feac: 76fc moveq #-4,%d3 4feae: c283 andl %d3,%d1
}
if (allocated_message_size < maximum_message_size)
4feb0: b280 cmpl %d0,%d1
4feb2: 64d6 bccs 4fe8a <_CORE_message_queue_Initialize+0x2a><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
4feb4: 4200 clrb %d0 <== NOT EXECUTED 4feb6: 60e6 bras 4fe9e <_CORE_message_queue_Initialize+0x3e><== NOT EXECUTED
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4feb8: 2f00 movel %d0,%sp@- 4feba: 4eb9 0005 2b38 jsr 52b38 <_Workspace_Allocate>
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
4fec0: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4fec2: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
4fec6: 67d4 beqs 4fe9c <_CORE_message_queue_Initialize+0x3c>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
4fec8: 2f03 movel %d3,%sp@- 4feca: 2f02 movel %d2,%sp@- 4fecc: 2f00 movel %d0,%sp@- 4fece: 486a 0060 pea %a2@(96) 4fed2: 4eb9 0005 48a4 jsr 548a4 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
4fed8: 4878 0006 pea 6 <EXTENDSFDF> 4fedc: 7001 moveq #1,%d0 4fede: 206e 000c moveal %fp@(12),%a0 4fee2: b090 cmpl %a0@,%d0 4fee4: 57c0 seq %d0 4fee6: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 4feea: 49c0 extbl %d0 4feec: 4480 negl %d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4feee: 41ea 0054 lea %a2@(84),%a0 4fef2: 2f00 movel %d0,%sp@- 4fef4: 2548 0050 movel %a0,%a2@(80)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4fef8: 41ea 0050 lea %a2@(80),%a0 4fefc: 2548 0058 movel %a0,%a2@(88) 4ff00: 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;
4ff02: 42aa 0054 clrl %a2@(84) 4ff06: 4eb9 0005 1f10 jsr 51f10 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
4ff0c: 4fef 0020 lea %sp@(32),%sp
}
4ff10: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
4ff16: 7001 moveq #1,%d0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
4ff18: 4e5e unlk %fp <== NOT EXECUTED
0004ff1c <_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 );
4ff1c: 203c 0000 0700 movel #1792,%d0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
4ff22: 4e56 ffe4 linkw %fp,#-28
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
4ff26: 2079 0006 8196 moveal 68196 <_Thread_Executing>,%a0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
4ff2c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ff30: 2a2e 000c movel %fp@(12),%d5 4ff34: 282e 001c movel %fp@(28),%d4 4ff38: 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;
4ff3c: 42a8 0034 clrl %a0@(52)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
4ff40: 242e 0010 movel %fp@(16),%d2 4ff44: 226e 0014 moveal %fp@(20),%a1 4ff48: 262e 0018 movel %fp@(24),%d3
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 );
4ff4c: 40c1 movew %sr,%d1 4ff4e: 8081 orl %d1,%d0 4ff50: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4ff52: 200a movel %a2,%d0 4ff54: 0680 0000 0054 addil #84,%d0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4ff5a: 266a 0050 moveal %a2@(80),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4ff5e: b08b cmpl %a3,%d0
4ff60: 674e beqs 4ffb0 <_CORE_message_queue_Seize+0x94>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
4ff62: 2053 moveal %a3@,%a0
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
4ff64: 53aa 0048 subql #1,%a2@(72)
the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain);
4ff68: 49ea 0050 lea %a2@(80),%a4
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
4ff6c: 2548 0050 movel %a0,%a2@(80)
new_first->previous = _Chain_Head(the_chain);
4ff70: 214c 0004 movel %a4,%a0@(4)
_ISR_Enable( level );
4ff74: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size;
4ff76: 22ab 0008 movel %a3@(8),%a1@
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 );
4ff7a: 45ea 0060 lea %a2@(96),%a2
_Thread_Executing->Wait.count =
4ff7e: 2079 0006 8196 moveal 68196 <_Thread_Executing>,%a0 4ff84: 42a8 0024 clrl %a0@(36)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
4ff88: 2f11 movel %a1@,%sp@- 4ff8a: 486b 000c pea %a3@(12) 4ff8e: 2f02 movel %d2,%sp@- 4ff90: 4eb9 0005 7544 jsr 57544 <memcpy>
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 );
4ff96: 4fef 000c lea %sp@(12),%sp 4ff9a: 2d4a 0008 movel %a2,%fp@(8) 4ff9e: 2d4b 000c movel %a3,%fp@(12)
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 );
}
4ffa2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ffa8: 4e5e unlk %fp 4ffaa: 4ef9 0004 fd94 jmp 4fd94 <_Chain_Append>
return;
}
#endif
}
if ( !wait ) {
4ffb0: 4a03 tstb %d3
4ffb2: 6612 bnes 4ffc6 <_CORE_message_queue_Seize+0xaa>
_ISR_Enable( level );
4ffb4: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
4ffb6: 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 );
}
4ffb8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
#endif
}
if ( !wait ) {
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
4ffbe: 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 );
}
4ffc2: 4e5e unlk %fp 4ffc4: 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;
4ffc6: 7001 moveq #1,%d0 4ffc8: 2540 0030 movel %d0,%a2@(48)
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
4ffcc: 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;
4ffd0: 2142 002c movel %d2,%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;
4ffd4: 2145 0020 movel %d5,%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;
4ffd8: 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 );
4ffdc: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
4ffde: 49f9 0005 1ff4 lea 51ff4 <_Thread_queue_Timeout>,%a4 4ffe4: 2d44 000c movel %d4,%fp@(12) 4ffe8: 2d4c 0010 movel %a4,%fp@(16) 4ffec: 2d4a 0008 movel %a2,%fp@(8)
}
4fff0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4fff6: 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 );
4fff8: 4ef9 0005 1c94 jmp 51c94 <_Thread_queue_Enqueue_with_handler>
...
00050000 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
50000: 4e56 fff4 linkw %fp,#-12 50004: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50008: 246e 0008 moveal %fp@(8),%a2 5000c: 242e 0010 movel %fp@(16),%d2
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
50010: b4aa 004c cmpl %a2@(76),%d2
50014: 6256 bhis 5006c <_CORE_message_queue_Submit+0x6c>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
50016: 202a 0048 movel %a2@(72),%d0
5001a: 675c beqs 50078 <_CORE_message_queue_Submit+0x78>
/*
* 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 ) {
5001c: b0aa 0044 cmpl %a2@(68),%d0
50020: 650c bcss 5002e <_CORE_message_queue_Submit+0x2e>
50022: 7002 moveq #2,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50024: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5002a: 4e5e unlk %fp 5002c: 4e75 rts
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 *)
5002e: 486a 0060 pea %a2@(96) 50032: 4eb9 0004 fdf4 jsr 4fdf4 <_Chain_Get> 50038: 2640 moveal %d0,%a3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5003a: 2f02 movel %d2,%sp@- 5003c: 2f2e 000c movel %fp@(12),%sp@- 50040: 486b 000c pea %a3@(12) 50044: 4eb9 0005 7544 jsr 57544 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
5004a: 2742 0008 movel %d2,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
5004e: 2f2e 001c movel %fp@(28),%sp@- 50052: 2f0b movel %a3,%sp@- 50054: 2f0a movel %a2,%sp@- 50056: 4eb9 0005 48ec jsr 548ec <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
5005c: 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(
50060: 4280 clrl %d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50062: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50068: 4e5e unlk %fp 5006a: 4e75 rts
)
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
5006c: 7001 moveq #1,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
5006e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50074: 4e5e unlk %fp 50076: 4e75 rts
/*
* 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 );
50078: 2f0a movel %a2,%sp@- 5007a: 4eb9 0005 1b34 jsr 51b34 <_Thread_queue_Dequeue>
if ( the_thread ) {
50080: 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 );
50082: 2640 moveal %d0,%a3
if ( the_thread ) {
50084: 4a80 tstl %d0
50086: 672e beqs 500b6 <_CORE_message_queue_Submit+0xb6>
50088: 2f02 movel %d2,%sp@- 5008a: 2f2e 000c movel %fp@(12),%sp@- 5008e: 2f2b 002c movel %a3@(44),%sp@- 50092: 4eb9 0005 7544 jsr 57544 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
50098: 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;
5009c: 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;
500a0: 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;
500a2: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
500a4: 222e 001c movel %fp@(28),%d1 500a8: 2741 0024 movel %d1,%a3@(36)
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
500ac: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 500b2: 4e5e unlk %fp 500b4: 4e75 rts
/*
* 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 );
if ( the_thread ) {
500b6: 202a 0048 movel %a2@(72),%d0
/*
* 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 ) {
500ba: b0aa 0044 cmpl %a2@(68),%d0 500be: 6400 ff62 bccw 50022 <_CORE_message_queue_Submit+0x22> 500c2: 6000 ff6a braw 5002e <_CORE_message_queue_Submit+0x2e>
...
000468fc <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
468fc: 4e56 0000 linkw %fp,#0 46900: 202e 0010 movel %fp@(16),%d0 46904: 2f0a movel %a2,%sp@- 46906: 246e 0008 moveal %fp@(8),%a2 4690a: 2f02 movel %d2,%sp@-
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
4690c: 2239 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d1
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
46912: 1400 moveb %d0,%d2
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
46914: 4a81 tstl %d1
46916: 6704 beqs 4691c <_CORE_mutex_Seize+0x20>
46918: 4a00 tstb %d0
4691a: 6634 bnes 46950 <_CORE_mutex_Seize+0x54> <== ALWAYS TAKEN
4691c: 486e 0018 pea %fp@(24) 46920: 2f0a movel %a2,%sp@- 46922: 4eb9 0004 b100 jsr 4b100 <_CORE_mutex_Seize_interrupt_trylock> 46928: 508f addql #8,%sp 4692a: 4a80 tstl %d0
4692c: 6716 beqs 46944 <_CORE_mutex_Seize+0x48>
4692e: 4a02 tstb %d2
46930: 6636 bnes 46968 <_CORE_mutex_Seize+0x6c>
46932: 202e 0018 movel %fp@(24),%d0 46936: 46c0 movew %d0,%sr 46938: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 4693e: 7001 moveq #1,%d0 46940: 2140 0034 movel %d0,%a0@(52)
}
46944: 242e fff8 movel %fp@(-8),%d2 46948: 246e fffc moveal %fp@(-4),%a2 4694c: 4e5e unlk %fp 4694e: 4e75 rts
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
46950: 7001 moveq #1,%d0 46952: b0b9 0005 db4a cmpl 5db4a <_System_state_Current>,%d0
46958: 64c2 bccs 4691c <_CORE_mutex_Seize+0x20>
4695a: 4878 0013 pea 13 <INVALID_OPERATION+0x3> 4695e: 42a7 clrl %sp@- 46960: 42a7 clrl %sp@- 46962: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> 46968: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 4696e: 5280 addql #1,%d0 46970: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 46976: 216e 000c 0020 movel %fp@(12),%a0@(32) 4697c: 23c0 0005 d9c8 movel %d0,5d9c8 <_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;
46982: 7001 moveq #1,%d0 46984: 214a 0044 movel %a2,%a0@(68) 46988: 2540 0030 movel %d0,%a2@(48) 4698c: 202e 0018 movel %fp@(24),%d0 46990: 46c0 movew %d0,%sr 46992: 2f2e 0014 movel %fp@(20),%sp@- 46996: 2f0a movel %a2,%sp@- 46998: 4eb9 0004 6870 jsr 46870 <_CORE_mutex_Seize_interrupt_blocking>
}
4699e: 242e fff8 movel %fp@(-8),%d2
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
469a2: 508f addql #8,%sp
}
469a4: 246e fffc moveal %fp@(-4),%a2
469a8: 4e5e unlk %fp <== NOT EXECUTED
0004b100 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
4b100: 4e56 0000 linkw %fp,#0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
4b104: 2279 0005 da82 moveal 5da82 <_Thread_Executing>,%a1 4b10a: 2f0a movel %a2,%sp@- 4b10c: 206e 0008 moveal %fp@(8),%a0 4b110: 246e 000c moveal %fp@(12),%a2 4b114: 2f02 movel %d2,%sp@-
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
4b116: 42a9 0034 clrl %a1@(52)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
4b11a: 4aa8 004e tstl %a0@(78)
4b11e: 673a beqs 4b15a <_CORE_mutex_Seize_interrupt_trylock+0x5a>
the_mutex->lock = CORE_MUTEX_LOCKED;
4b120: 42a8 004e clrl %a0@(78)
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
4b124: 7201 moveq #1,%d1
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
4b126: 2169 0008 005e movel %a1@(8),%a0@(94)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
4b12c: 2028 0046 movel %a0@(70),%d0
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
4b130: 2141 0052 movel %d1,%a0@(82)
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4b134: 123c 0002 moveb #2,%d1
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
4b138: 2149 005a movel %a1,%a0@(90)
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4b13c: b280 cmpl %d0,%d1
4b13e: 672e beqs 4b16e <_CORE_mutex_Seize_interrupt_trylock+0x6e>
4b140: 123c 0003 moveb #3,%d1 4b144: b280 cmpl %d0,%d1
4b146: 674e beqs 4b196 <_CORE_mutex_Seize_interrupt_trylock+0x96>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
4b148: 2012 movel %a2@,%d0 4b14a: 46c0 movew %d0,%sr 4b14c: 4280 clrl %d0
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); }
4b14e: 242e fff8 movel %fp@(-8),%d2 4b152: 246e fffc moveal %fp@(-4),%a2 4b156: 4e5e unlk %fp 4b158: 4e75 rts
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
4b15a: b3e8 005a cmpal %a0@(90),%a1
4b15e: 671a beqs 4b17a <_CORE_mutex_Seize_interrupt_trylock+0x7a>
4b160: 242e fff8 movel %fp@(-8),%d2
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( *level_p );
4b164: 7001 moveq #1,%d0 4b166: 246e fffc moveal %fp@(-4),%a2 4b16a: 4e5e unlk %fp 4b16c: 4e75 rts
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
4b16e: 52a9 001c addql #1,%a1@(28)
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
4b172: 2012 movel %a2@,%d0 4b174: 46c0 movew %d0,%sr 4b176: 4280 clrl %d0 4b178: 60d4 bras 4b14e <_CORE_mutex_Seize_interrupt_trylock+0x4e>
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
4b17a: 2028 0040 movel %a0@(64),%d0
4b17e: 6658 bnes 4b1d8 <_CORE_mutex_Seize_interrupt_trylock+0xd8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
4b180: 52a8 0052 addql #1,%a0@(82)
_ISR_Enable( *level_p );
4b184: 2012 movel %a2@,%d0 4b186: 46c0 movew %d0,%sr 4b188: 242e fff8 movel %fp@(-8),%d2 4b18c: 4280 clrl %d0 4b18e: 246e fffc moveal %fp@(-4),%a2 4b192: 4e5e unlk %fp 4b194: 4e75 rts
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
4b196: 2429 001c movel %a1@(28),%d2 4b19a: 2002 movel %d2,%d0 4b19c: 5280 addql #1,%d0 4b19e: 2340 001c movel %d0,%a1@(28)
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
4b1a2: 2029 0014 movel %a1@(20),%d0
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
4b1a6: 2228 004a movel %a0@(74),%d1
current = executing->current_priority;
if ( current == ceiling ) {
4b1aa: b081 cmpl %d1,%d0 4b1ac: 6700 0082 beqw 4b230 <_CORE_mutex_Seize_interrupt_trylock+0x130>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
4b1b0: 6244 bhis 4b1f6 <_CORE_mutex_Seize_interrupt_trylock+0xf6>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4b1b2: 7206 moveq #6,%d1
the_mutex->lock = CORE_MUTEX_UNLOCKED;
4b1b4: 7001 moveq #1,%d0
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4b1b6: 2341 0034 movel %d1,%a1@(52)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
4b1ba: 42a8 0052 clrl %a0@(82)
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
4b1be: 2140 004e movel %d0,%a0@(78)
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
4b1c2: 2342 001c movel %d2,%a1@(28)
_ISR_Enable( *level_p );
4b1c6: 2012 movel %a2@,%d0 4b1c8: 46c0 movew %d0,%sr 4b1ca: 242e fff8 movel %fp@(-8),%d2 4b1ce: 4280 clrl %d0 4b1d0: 246e fffc moveal %fp@(-4),%a2 4b1d4: 4e5e unlk %fp 4b1d6: 4e75 rts
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
4b1d8: 7201 moveq #1,%d1 4b1da: b280 cmpl %d0,%d1
4b1dc: 6682 bnes 4b160 <_CORE_mutex_Seize_interrupt_trylock+0x60><== ALWAYS TAKEN
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
4b1de: 7002 moveq #2,%d0 <== NOT EXECUTED 4b1e0: 2340 0034 movel %d0,%a1@(52) <== NOT EXECUTED
_ISR_Enable( *level_p );
4b1e4: 2012 movel %a2@,%d0 <== NOT EXECUTED 4b1e6: 46c0 movew %d0,%sr <== NOT EXECUTED 4b1e8: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4b1ec: 4280 clrl %d0 <== NOT EXECUTED 4b1ee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4b1f2: 4e5e unlk %fp <== NOT EXECUTED 4b1f4: 4e75 rts <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4b1f6: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 4b1fc: 5280 addql #1,%d0 4b1fe: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
4b204: 2012 movel %a2@,%d0 4b206: 46c0 movew %d0,%sr
_Thread_Change_priority(
4b208: 42a7 clrl %sp@- 4b20a: 2f28 004a movel %a0@(74),%sp@- 4b20e: 2f28 005a movel %a0@(90),%sp@- 4b212: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
4b218: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4b21e: 242e fff8 movel %fp@(-8),%d2 4b222: 4fef 000c lea %sp@(12),%sp 4b226: 4280 clrl %d0 4b228: 246e fffc moveal %fp@(-4),%a2 4b22c: 4e5e unlk %fp 4b22e: 4e75 rts
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
4b230: 2012 movel %a2@,%d0 4b232: 46c0 movew %d0,%sr 4b234: 242e fff8 movel %fp@(-8),%d2 4b238: 4280 clrl %d0 4b23a: 246e fffc moveal %fp@(-4),%a2 4b23e: 4e5e unlk %fp
...
00046b10 <_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
)
{
46b10: 4e56 0000 linkw %fp,#0 46b14: 2f0a movel %a2,%sp@- 46b16: 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)) ) {
46b1a: 2f0a movel %a2,%sp@- 46b1c: 4eb9 0004 80b0 jsr 480b0 <_Thread_queue_Dequeue> 46b22: 588f addql #4,%sp 46b24: 4a80 tstl %d0
46b26: 670a beqs 46b32 <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
46b28: 246e fffc moveal %fp@(-4),%a2
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
46b2c: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
46b2e: 4e5e unlk %fp 46b30: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
46b32: 203c 0000 0700 movel #1792,%d0 46b38: 40c1 movew %sr,%d1 46b3a: 8081 orl %d1,%d0 46b3c: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
46b3e: 202a 0048 movel %a2@(72),%d0 46b42: b0aa 0040 cmpl %a2@(64),%d0
46b46: 6412 bccs 46b5a <_CORE_semaphore_Surrender+0x4a> <== NEVER TAKEN
the_semaphore->count += 1;
46b48: 5280 addql #1,%d0 46b4a: 2540 0048 movel %d0,%a2@(72) 46b4e: 4280 clrl %d0
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
46b50: 46c1 movew %d1,%sr
}
return status;
}
46b52: 246e fffc moveal %fp@(-4),%a2 46b56: 4e5e unlk %fp 46b58: 4e75 rts
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
46b5a: 7004 moveq #4,%d0 <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
46b5c: 46c1 movew %d1,%sr <== NOT EXECUTED 46b5e: 60f2 bras 46b52 <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED
0004b0b8 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4b0b8: 4e56 0000 linkw %fp,#0 4b0bc: 202e 0010 movel %fp@(16),%d0 4b0c0: 2f0a movel %a2,%sp@- 4b0c2: 246e 0008 moveal %fp@(8),%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
4b0c6: 224a moveal %a2,%a1 4b0c8: 2f02 movel %d2,%sp@- 4b0ca: 242e 0014 movel %fp@(20),%d2
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
4b0ce: 42aa 0004 clrl %a2@(4)
next = starting_address;
while ( count-- ) {
4b0d2: 4a80 tstl %d0
4b0d4: 6718 beqs 4b0ee <_Chain_Initialize+0x36> <== NEVER TAKEN
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
4b0d6: 206e 000c moveal %fp@(12),%a0
while ( count-- ) {
current->next = next;
next->previous = current;
4b0da: 2149 0004 movel %a1,%a0@(4) 4b0de: 2208 movel %a0,%d1 4b0e0: d282 addl %d2,%d1
current = next;
next = (Chain_Node *)
4b0e2: 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;
4b0e4: 2288 movel %a0,%a1@
next->previous = current;
current = next;
next = (Chain_Node *)
4b0e6: 2248 moveal %a0,%a1
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
4b0e8: 2041 moveal %d1,%a0 4b0ea: 4a80 tstl %d0
4b0ec: 66ec bnes 4b0da <_Chain_Initialize+0x22>
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
4b0ee: 200a movel %a2,%d0 4b0f0: 5880 addql #4,%d0 4b0f2: 2280 movel %d0,%a1@
the_chain->last = current; }
4b0f4: 241f movel %sp@+,%d2
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
the_chain->last = current;
4b0f6: 2549 0008 movel %a1,%a2@(8)
}
4b0fa: 245f moveal %sp@+,%a2
4b0fc: 4e5e unlk %fp <== NOT EXECUTED
000456d0 <_Event_Seize>:
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
456d0: 203c 0000 0700 movel #1792,%d0
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
456d6: 4e56 ffec linkw %fp,#-20 456da: 222e 0008 movel %fp@(8),%d1 456de: 48d7 043c moveml %d2-%d5/%a2,%sp@
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
456e2: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
456e8: 242e 000c movel %fp@(12),%d2 456ec: 2a2e 0010 movel %fp@(16),%d5
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
456f0: 42aa 0034 clrl %a2@(52)
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
456f4: 226e 0014 moveal %fp@(20),%a1
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
456f8: 206a 0108 moveal %a2@(264),%a0
_ISR_Disable( level );
456fc: 40c4 movew %sr,%d4 456fe: 8084 orl %d4,%d0 45700: 46c0 movew %d0,%sr
pending_events = api->pending_events;
45702: 2610 movel %a0@,%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 );
45704: 2001 movel %d1,%d0 45706: c083 andl %d3,%d0
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
45708: 670c beqs 45716 <_Event_Seize+0x46>
4570a: b081 cmpl %d1,%d0 4570c: 6700 0084 beqw 45792 <_Event_Seize+0xc2> 45710: 0802 0001 btst #1,%d2
45714: 667c bnes 45792 <_Event_Seize+0xc2> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
45716: 0802 0000 btst #0,%d2
4571a: 6662 bnes 4577e <_Event_Seize+0xae> * 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;
4571c: 2542 0030 movel %d2,%a2@(48)
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
45720: 7401 moveq #1,%d2
* * 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;
45722: 2541 0024 movel %d1,%a2@(36)
executing->Wait.return_argument = event_out;
45726: 2549 0028 movel %a1,%a2@(40)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
4572a: 23c2 0005 dba6 movel %d2,5dba6 <_Event_Sync_state>
_ISR_Enable( level );
45730: 46c4 movew %d4,%sr
if ( ticks ) {
45732: 4a85 tstl %d5
45734: 6672 bnes 457a8 <_Event_Seize+0xd8>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
45736: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4573a: 2f0a movel %a2,%sp@- 4573c: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state>
_ISR_Disable( level );
45742: 203c 0000 0700 movel #1792,%d0 45748: 40c1 movew %sr,%d1 4574a: 8081 orl %d1,%d0 4574c: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
4574e: 7401 moveq #1,%d2 45750: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
45752: 2039 0005 dba6 movel 5dba6 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
45758: 42b9 0005 dba6 clrl 5dba6 <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
4575e: b480 cmpl %d0,%d2 45760: 6700 00a4 beqw 45806 <_Event_Seize+0x136>
* 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 );
45764: 2d4a 000c movel %a2,%fp@(12) 45768: 2d41 0010 movel %d1,%fp@(16)
}
4576c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
* 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 );
45772: 2d40 0008 movel %d0,%fp@(8)
}
45776: 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 );
45778: 4ef9 0004 77b4 jmp 477b4 <_Thread_blocking_operation_Cancel>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
4577e: 46c4 movew %d4,%sr
executing->Wait.return_code = RTEMS_UNSATISFIED;
45780: 720d moveq #13,%d1 45782: 2541 0034 movel %d1,%a2@(52)
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
45786: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
4578c: 2280 movel %d0,%a1@
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
4578e: 4e5e unlk %fp 45790: 4e75 rts
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
45792: 2200 movel %d0,%d1 45794: 4681 notl %d1 45796: c283 andl %d3,%d1 45798: 2081 movel %d1,%a0@
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
4579a: 46c4 movew %d4,%sr
*event_out = seized_events;
4579c: 2280 movel %d0,%a1@
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
4579e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 457a4: 4e5e unlk %fp 457a6: 4e75 rts
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
457a8: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
457ac: 223c 0004 599c movel #285084,%d1
the_watchdog->id = id;
457b2: 2540 0068 movel %d0,%a2@(104)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
457b6: 2541 0064 movel %d1,%a2@(100)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
457ba: 2545 0054 movel %d5,%a2@(84)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
457be: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
457c2: 42aa 006c clrl %a2@(108)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
457c6: 486a 0048 pea %a2@(72) 457ca: 4879 0005 daa0 pea 5daa0 <_Watchdog_Ticks_chain> 457d0: 4eb9 0004 8e1c jsr 48e1c <_Watchdog_Insert> 457d6: 508f addql #8,%sp
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
457d8: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 457dc: 2f0a movel %a2,%sp@- 457de: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state>
_ISR_Disable( level );
457e4: 203c 0000 0700 movel #1792,%d0 457ea: 40c1 movew %sr,%d1 457ec: 8081 orl %d1,%d0 457ee: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
457f0: 7401 moveq #1,%d2 457f2: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
457f4: 2039 0005 dba6 movel 5dba6 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
457fa: 42b9 0005 dba6 clrl 5dba6 <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
45800: b480 cmpl %d0,%d2 45802: 6600 ff60 bnew 45764 <_Event_Seize+0x94>
_ISR_Enable( level );
45806: 46c1 movew %d1,%sr
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
45808: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4580e: 4e5e unlk %fp
...
00045870 <_Event_Surrender>:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
45870: 203c 0000 0700 movel #1792,%d0
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
45876: 4e56 ffec linkw %fp,#-20 4587a: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4587e: 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 ];
45882: 206a 0108 moveal %a2@(264),%a0
option_set = (rtems_option) the_thread->Wait.option;
45886: 282a 0030 movel %a2@(48),%d4
_ISR_Disable( level );
4588a: 40c3 movew %sr,%d3 4588c: 8083 orl %d3,%d0 4588e: 46c0 movew %d0,%sr
pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count;
45890: 222a 0024 movel %a2@(36),%d1
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 );
45894: 2001 movel %d1,%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;
45896: 2410 movel %a0@,%d2 45898: 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 ) ) {
4589a: 6778 beqs 45914 <_Event_Surrender+0xa4>
/*
* 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() &&
4589c: 2279 0005 da62 moveal 5da62 <_ISR_Nest_level>,%a1 458a2: 4a89 tstl %a1
458a4: 670a beqs 458b0 <_Event_Surrender+0x40>
458a6: b5f9 0005 da82 cmpal 5da82 <_Thread_Executing>,%a2 458ac: 6700 00a0 beqw 4594e <_Event_Surrender+0xde>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
458b0: 2a2a 0010 movel %a2@(16),%d5 458b4: 0285 0000 0100 andil #256,%d5
458ba: 674c beqs 45908 <_Event_Surrender+0x98>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
458bc: b081 cmpl %d1,%d0
458be: 6706 beqs 458c6 <_Event_Surrender+0x56>
458c0: 0804 0001 btst #1,%d4
458c4: 6742 beqs 45908 <_Event_Surrender+0x98> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
458c6: 2200 movel %d0,%d1 458c8: 4681 notl %d1 458ca: c282 andl %d2,%d1 458cc: 2081 movel %d1,%a0@
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
458ce: 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;
458d2: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
458d6: 2080 movel %d0,%a0@
_ISR_Flash( level );
458d8: 203c 0000 0700 movel #1792,%d0 458de: 46c3 movew %d3,%sr 458e0: 8083 orl %d3,%d0 458e2: 46c0 movew %d0,%sr
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
458e4: 7a02 moveq #2,%d5 458e6: baaa 0050 cmpl %a2@(80),%d5
458ea: 6734 beqs 45920 <_Event_Surrender+0xb0>
_ISR_Enable( level );
458ec: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
458ee: 2f3c 1003 fff8 movel #268697592,%sp@- 458f4: 2f0a movel %a2,%sp@- 458f6: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 458fc: 508f addql #8,%sp
}
return;
}
}
_ISR_Enable( level );
}
458fe: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45904: 4e5e unlk %fp 45906: 4e75 rts
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
45908: 46c3 movew %d3,%sr
}
4590a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45910: 4e5e unlk %fp 45912: 4e75 rts
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
45914: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
45916: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4591c: 4e5e unlk %fp 4591e: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
45920: 7003 moveq #3,%d0 45922: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
45926: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
45928: 486a 0048 pea %a2@(72) 4592c: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 45932: 2f3c 1003 fff8 movel #268697592,%sp@- 45938: 2f0a movel %a2,%sp@- 4593a: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 45940: 4fef 000c lea %sp@(12),%sp
}
return;
}
}
_ISR_Enable( level );
}
45944: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4594a: 4e5e unlk %fp 4594c: 4e75 rts
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
4594e: 2279 0005 dba6 moveal 5dba6 <_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() &&
45954: 7a02 moveq #2,%d5 45956: ba89 cmpl %a1,%d5
45958: 6710 beqs 4596a <_Event_Surrender+0xfa> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
4595a: 2279 0005 dba6 moveal 5dba6 <_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() &&
45960: 1a3c 0001 moveb #1,%d5 45964: ba89 cmpl %a1,%d5 45966: 6600 ff48 bnew 458b0 <_Event_Surrender+0x40>
_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) ) {
4596a: b081 cmpl %d1,%d0
4596c: 6706 beqs 45974 <_Event_Surrender+0x104>
4596e: 0804 0001 btst #1,%d4
45972: 671a beqs 4598e <_Event_Surrender+0x11e> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
45974: 2200 movel %d0,%d1 45976: 4681 notl %d1 45978: c282 andl %d2,%d1 4597a: 2081 movel %d1,%a0@
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
4597c: 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;
45980: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
45984: 2080 movel %d0,%a0@
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
45986: 7003 moveq #3,%d0 45988: 23c0 0005 dba6 movel %d0,5dba6 <_Event_Sync_state>
}
_ISR_Enable( level );
4598e: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
45990: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45996: 4e5e unlk %fp
...
0004599c <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
4599c: 4e56 fffc linkw %fp,#-4 459a0: 2f03 movel %d3,%sp@- 459a2: 2f02 movel %d2,%sp@-
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
459a4: 486e fffc pea %fp@(-4) 459a8: 2f2e 0008 movel %fp@(8),%sp@- 459ac: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get>
switch ( location ) {
459b2: 508f addql #8,%sp 459b4: 4aae fffc tstl %fp@(-4)
459b8: 6642 bnes 459fc <_Event_Timeout+0x60> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
459ba: 223c 0000 0700 movel #1792,%d1 459c0: 40c2 movew %sr,%d2 459c2: 8282 orl %d2,%d1 459c4: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
459c6: 2040 moveal %d0,%a0 459c8: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
459cc: b0b9 0005 da82 cmpl 5da82 <_Thread_Executing>,%d0
459d2: 6734 beqs 45a08 <_Event_Timeout+0x6c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
459d4: 7606 moveq #6,%d3 459d6: 2040 moveal %d0,%a0 459d8: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
459dc: 46c2 movew %d2,%sr 459de: 2f3c 1003 fff8 movel #268697592,%sp@- 459e4: 2f00 movel %d0,%sp@- 459e6: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
459ec: 508f addql #8,%sp 459ee: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
459fc: 242e fff4 movel %fp@(-12),%d2 45a00: 262e fff8 movel %fp@(-8),%d3 45a04: 4e5e unlk %fp 45a06: 4e75 rts
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
45a08: 2239 0005 dba6 movel 5dba6 <_Event_Sync_state>,%d1 45a0e: 7601 moveq #1,%d3 45a10: b681 cmpl %d1,%d3
45a12: 66c0 bnes 459d4 <_Event_Timeout+0x38>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
45a14: 7606 moveq #6,%d3 45a16: 2040 moveal %d0,%a0
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
45a18: 7202 moveq #2,%d1
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
45a1a: 2143 0034 movel %d3,%a0@(52)
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
45a1e: 23c1 0005 dba6 movel %d1,5dba6 <_Event_Sync_state>
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
_ISR_Enable( level );
45a24: 46c2 movew %d2,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
45a26: 2f3c 1003 fff8 movel #268697592,%sp@- 45a2c: 2f00 movel %d0,%sp@- 45a2e: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
45a34: 508f addql #8,%sp 45a36: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 45a3c: 5380 subql #1,%d0 45a3e: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 45a44: 60b6 bras 459fc <_Event_Timeout+0x60>
...
0004b37c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4b37c: 4e56 ffcc linkw %fp,#-52 4b380: 226e 000c moveal %fp@(12),%a1 4b384: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b388: 246e 0008 moveal %fp@(8),%a2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
4b38c: 2c09 movel %a1,%d6 4b38e: 5886 addql #4,%d6
uintptr_t const page_size = heap->page_size;
4b390: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4b394: 222e 0010 movel %fp@(16),%d1 4b398: 282e 0014 movel %fp@(20),%d4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4b39c: 206a 0008 moveal %a2@(8),%a0
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
4b3a0: 2d40 fffc movel %d0,%fp@(-4)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
4b3a4: bc89 cmpl %a1,%d6 4b3a6: 6500 0146 bcsw 4b4ee <_Heap_Allocate_aligned_with_boundary+0x172>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4b3aa: 4a84 tstl %d4 4b3ac: 6600 013c bnew 4b4ea <_Heap_Allocate_aligned_with_boundary+0x16e>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4b3b0: b1ca cmpal %a2,%a0 4b3b2: 6700 0152 beqw 4b506 <_Heap_Allocate_aligned_with_boundary+0x18a>
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4b3b6: 242e fffc movel %fp@(-4),%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4b3ba: 7a04 moveq #4,%d5
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4b3bc: 5e82 addql #7,%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4b3be: 9a89 subl %a1,%d5
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4b3c0: 4283 clrl %d3
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4b3c2: 2d42 fff8 movel %d2,%fp@(-8)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4b3c6: 2d45 fff4 movel %d5,%fp@(-12)
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
4b3ca: 2028 0004 movel %a0@(4),%d0
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
4b3ce: 5283 addql #1,%d3
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
4b3d0: b086 cmpl %d6,%d0
4b3d2: 630e blss 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alignment == 0 ) {
4b3d4: 4a81 tstl %d1
4b3d6: 6628 bnes 4b400 <_Heap_Allocate_aligned_with_boundary+0x84>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4b3d8: 2408 movel %a0,%d2 4b3da: 5082 addql #8,%d2
boundary
);
}
}
if ( alloc_begin != 0 ) {
4b3dc: 4a82 tstl %d2 4b3de: 6600 00ee bnew 4b4ce <_Heap_Allocate_aligned_with_boundary+0x152>
break;
}
block = block->next;
4b3e2: 2068 0008 moveal %a0@(8),%a0
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4b3e6: b1ca cmpal %a2,%a0
4b3e8: 66e0 bnes 4b3ca <_Heap_Allocate_aligned_with_boundary+0x4e>
4b3ea: 4280 clrl %d0
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
4b3ec: b6aa 0044 cmpl %a2@(68),%d3
4b3f0: 6304 blss 4b3f6 <_Heap_Allocate_aligned_with_boundary+0x7a>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4b3f2: 2543 0044 movel %d3,%a2@(68)
}
return (void *) alloc_begin;
}
4b3f6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b3fc: 4e5e unlk %fp 4b3fe: 4e75 rts
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
4b400: 7efe moveq #-2,%d7 4b402: 4be8 0008 lea %a0@(8),%a5 4b406: c087 andl %d7,%d0
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
4b408: 286a 0014 moveal %a2@(20),%a4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
4b40c: d088 addl %a0,%d0
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4b40e: 2a2e fff8 movel %fp@(-8),%d5 4b412: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4b414: 242e fff4 movel %fp@(-12),%d2 4b418: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4b41a: 2e02 movel %d2,%d7
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4b41c: d085 addl %d5,%d0 4b41e: 4c41 7005 remul %d1,%d5,%d7 4b422: 9485 subl %d5,%d2
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
4b424: b480 cmpl %d0,%d2
4b426: 630a blss 4b432 <_Heap_Allocate_aligned_with_boundary+0xb6>
4b428: 2a00 movel %d0,%d5 4b42a: 4c41 5002 remul %d1,%d2,%d5 4b42e: 9082 subl %d2,%d0 4b430: 2400 movel %d0,%d2
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4b432: 4a84 tstl %d4
4b434: 676c beqs 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
4b436: 2002 movel %d2,%d0 4b438: d089 addl %a1,%d0 4b43a: 2e00 movel %d0,%d7 4b43c: 4c44 7005 remul %d4,%d5,%d7 4b440: 2e00 movel %d0,%d7 4b442: 9e85 subl %d5,%d7 4b444: 2a07 movel %d7,%d5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4b446: be82 cmpl %d2,%d7
4b448: 6358 blss 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126>
4b44a: be80 cmpl %d0,%d7
4b44c: 6454 bccs 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4b44e: 2e0d movel %a5,%d7 4b450: de89 addl %a1,%d7
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4b452: ba87 cmpl %d7,%d5
4b454: 658c bcss 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4b456: 9a89 subl %a1,%d5 4b458: 2005 movel %d5,%d0 4b45a: 2647 moveal %d7,%a3 4b45c: 4c41 0002 remul %d1,%d2,%d0 4b460: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4b462: 2005 movel %d5,%d0 4b464: d089 addl %a1,%d0 4b466: 2405 movel %d5,%d2 4b468: 2e00 movel %d0,%d7 4b46a: 4c44 7005 remul %d4,%d5,%d7 4b46e: 2e00 movel %d0,%d7 4b470: 9e85 subl %d5,%d7 4b472: 2a07 movel %d7,%d5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4b474: be82 cmpl %d2,%d7
4b476: 632a blss 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126>
4b478: be80 cmpl %d0,%d7
4b47a: 6426 bccs 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126>
if ( boundary_line < boundary_floor ) {
4b47c: ba8b cmpl %a3,%d5 4b47e: 6500 ff62 bcsw 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4b482: 9a89 subl %a1,%d5 4b484: 2005 movel %d5,%d0 4b486: 4c41 0002 remul %d1,%d2,%d0 4b48a: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4b48c: 2005 movel %d5,%d0 4b48e: d089 addl %a1,%d0 4b490: 2405 movel %d5,%d2 4b492: 2e00 movel %d0,%d7 4b494: 4c44 7005 remul %d4,%d5,%d7 4b498: 2e00 movel %d0,%d7 4b49a: 9e85 subl %d5,%d7 4b49c: 2a07 movel %d7,%d5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4b49e: be82 cmpl %d2,%d7
4b4a0: 62d6 bhis 4b478 <_Heap_Allocate_aligned_with_boundary+0xfc><== ALWAYS TAKEN
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
4b4a2: b48d cmpl %a5,%d2 4b4a4: 6500 ff3c bcsw 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
4b4a8: 70f8 moveq #-8,%d0 4b4aa: 9088 subl %a0,%d0 4b4ac: 2a40 moveal %d0,%a5 4b4ae: 2e02 movel %d2,%d7 4b4b0: dbc2 addal %d2,%a5 4b4b2: 202e fffc movel %fp@(-4),%d0 4b4b6: 4c40 7005 remul %d0,%d5,%d7 4b4ba: 9bc5 subal %d5,%a5
if ( free_size >= min_block_size || free_size == 0 ) {
4b4bc: bbcc cmpal %a4,%a5 4b4be: 6400 ff1c bccw 4b3dc <_Heap_Allocate_aligned_with_boundary+0x60> 4b4c2: 4a8d tstl %a5 4b4c4: 6600 ff1c bnew 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
boundary
);
}
}
if ( alloc_begin != 0 ) {
4b4c8: 4a82 tstl %d2 4b4ca: 6700 ff16 beqw 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4b4ce: 2f09 movel %a1,%sp@-
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4b4d0: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4b4d4: 2f02 movel %d2,%sp@- 4b4d6: 2f08 movel %a0,%sp@- 4b4d8: 2f0a movel %a2,%sp@- 4b4da: 4eb9 0004 6e38 jsr 46e38 <_Heap_Block_allocate> 4b4e0: 4fef 0010 lea %sp@(16),%sp 4b4e4: 2002 movel %d2,%d0 4b4e6: 6000 ff04 braw 4b3ec <_Heap_Allocate_aligned_with_boundary+0x70>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
4b4ea: b889 cmpl %a1,%d4
4b4ec: 640c bccs 4b4fa <_Heap_Allocate_aligned_with_boundary+0x17e>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4b4ee: 4280 clrl %d0
}
return (void *) alloc_begin;
}
4b4f0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b4f6: 4e5e unlk %fp 4b4f8: 4e75 rts
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
4b4fa: 4a81 tstl %d1 4b4fc: 6600 feb2 bnew 4b3b0 <_Heap_Allocate_aligned_with_boundary+0x34> 4b500: 2200 movel %d0,%d1 4b502: 6000 feac braw 4b3b0 <_Heap_Allocate_aligned_with_boundary+0x34>
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4b506: 4283 clrl %d3 4b508: 4280 clrl %d0 4b50a: 6000 fee0 braw 4b3ec <_Heap_Allocate_aligned_with_boundary+0x70>
...
00046e38 <_Heap_Block_allocate>:
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
46e38: 70fe moveq #-2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
46e3a: 4e56 ffe0 linkw %fp,#-32 46e3e: 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;
46e42: 2041 moveal %d1,%a0 46e44: 5188 subql #8,%a0 46e46: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46e4a: 246e 000c moveal %fp@(12),%a2
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
46e4e: 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;
46e50: 2848 moveal %a0,%a4 46e52: 240a movel %a2,%d2 46e54: 99ca subal %a2,%a4
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
46e56: c0aa 0004 andl %a2@(4),%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
46e5a: 266e 0008 moveal %fp@(8),%a3
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
46e5e: c6b2 0804 andl %a2@(00000004,%d0:l),%d3
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
46e62: 2a2e 0014 movel %fp@(20),%d5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
46e66: 4a03 tstb %d3 46e68: 6600 00aa bnew 46f14 <_Heap_Block_allocate+0xdc>
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
46e6c: 53ab 0038 subql #1,%a3@(56)
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
46e70: 76fe moveq #-2,%d3
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
46e72: 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;
46e76: 202a 0008 movel %a2@(8),%d0
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
46e7a: 2a40 moveal %d0,%a5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
free_list_anchor = block->prev;
46e7c: 226a 000c moveal %a2@(12),%a1
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
46e80: c6aa 0004 andl %a2@(4),%d3
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
46e84: 2340 0008 movel %d0,%a1@(8)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
46e88: 202b 0010 movel %a3@(16),%d0
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
46e8c: 97ab 0030 subl %d3,%a3@(48)
next->prev = prev;
46e90: 2b49 000c movel %a1,%a5@(12)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
46e94: b08c cmpl %a4,%d0 46e96: 6200 0088 bhiw 46f20 <_Heap_Block_allocate+0xe8>
- 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;
46e9a: 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 )
46e9e: 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 ) ) {
46ea2: 7201 moveq #1,%d1 46ea4: 91c4 subal %d4,%a0
_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;
46ea6: 2008 movel %a0,%d0 46ea8: 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;
46eaa: d1ab 0030 addl %d0,%a3@(48)
if ( _Heap_Is_prev_used( block ) ) {
46eae: c2aa 0004 andl %a2@(4),%d1 46eb2: 6700 0082 beqw 46f36 <_Heap_Block_allocate+0xfe>
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
46eb6: 78fe moveq #-2,%d4
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
46eb8: 52ab 0038 addql #1,%a3@(56) 46ebc: 220a movel %a2,%d1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
46ebe: 2869 0008 moveal %a1@(8),%a4
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
46ec2: 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;
46ec4: 7801 moveq #1,%d4 46ec6: 8880 orl %d0,%d4
new_block->next = next;
46ec8: 254c 0008 movel %a4,%a2@(8)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
46ecc: d483 addl %d3,%d2 46ece: 9488 subl %a0,%d2
new_block->prev = block_before;
46ed0: 2549 000c movel %a1,%a2@(12)
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
46ed4: 2544 0004 movel %d4,%a2@(4)
block_before->next = new_block;
46ed8: 234a 0008 movel %a2,%a1@(8)
next->prev = new_block;
46edc: 294a 000c movel %a2,%a4@(12)
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 );
46ee0: 2448 moveal %a0,%a2
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
46ee2: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
46ee4: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
46ee8: 2f05 movel %d5,%sp@- 46eea: 2f01 movel %d1,%sp@- 46eec: 2f08 movel %a0,%sp@- 46eee: 2f0b movel %a3,%sp@- 46ef0: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46ef6: 4fef 0010 lea %sp@(16),%sp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
46efa: 202b 0030 movel %a3@(48),%d0
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
46efe: b0ab 0034 cmpl %a3@(52),%d0
46f02: 6404 bccs 46f08 <_Heap_Block_allocate+0xd0>
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
46f04: 2740 0034 movel %d0,%a3@(52)
}
return block;
}
46f08: 200a movel %a2,%d0 46f0a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f10: 4e5e unlk %fp 46f12: 4e75 rts
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
46f14: 202b 0010 movel %a3@(16),%d0
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
46f18: 224b moveal %a3,%a1
}
if ( alloc_area_offset < heap->page_size ) {
46f1a: b08c cmpl %a4,%d0 46f1c: 6300 ff7c blsw 46e9a <_Heap_Block_allocate+0x62>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
46f20: 4874 5800 pea %a4@(00000000,%d5:l) 46f24: 2f09 movel %a1,%sp@- 46f26: 2f0a movel %a2,%sp@- 46f28: 2f0b movel %a3,%sp@- 46f2a: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f30: 4fef 0010 lea %sp@(16),%sp 46f34: 60c4 bras 46efa <_Heap_Block_allocate+0xc2>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
46f36: 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;
46f38: 78fe moveq #-2,%d4 46f3a: 2209 movel %a1,%d1 46f3c: c8aa 0004 andl %a2@(4),%d4 46f40: 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;
46f42: 78fe moveq #-2,%d4 46f44: 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;
46f46: 7801 moveq #1,%d4 46f48: 8880 orl %d0,%d4
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
46f4a: d483 addl %d3,%d2 46f4c: 9488 subl %a0,%d2
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
46f4e: 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 );
46f52: 2448 moveal %a0,%a2
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
46f54: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
46f56: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
46f5a: 2f05 movel %d5,%sp@- 46f5c: 2f01 movel %d1,%sp@- 46f5e: 2f08 movel %a0,%sp@- 46f60: 2f0b movel %a3,%sp@- 46f62: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f68: 4fef 0010 lea %sp@(16),%sp 46f6c: 608c bras 46efa <_Heap_Block_allocate+0xc2>
...
00050480 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
50480: 4e56 fff4 linkw %fp,#-12 50484: 206e 0008 moveal %fp@(8),%a0 50488: 202e 000c movel %fp@(12),%d0
Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end;
5048c: 2228 001c movel %a0@(28),%d1
uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block;
50490: 2268 0024 moveal %a0@(36),%a1
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
50494: 48d7 040c moveml %d2-%d3/%a2,%sp@
Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin;
50498: b0a8 0018 cmpl %a0@(24),%d0
5049c: 6410 bccs 504ae <_Heap_Extend+0x2e>
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
5049e: b280 cmpl %d0,%d1
504a0: 671c beqs 504be <_Heap_Extend+0x3e>
504a2: 7002 moveq #2,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
504a4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 504aa: 4e5e unlk %fp 504ac: 4e75 rts
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
504ae: b280 cmpl %d0,%d1
504b0: 63ec blss 5049e <_Heap_Extend+0x1e>
504b2: 7001 moveq #1,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
504b4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 504ba: 4e5e unlk %fp 504bc: 4e75 rts
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
504be: 2200 movel %d0,%d1 504c0: d2ae 0010 addl %fp@(16),%d1
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
504c4: 70f8 moveq #-8,%d0 504c6: 9089 subl %a1,%d0 504c8: d081 addl %d1,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
504ca: 2600 movel %d0,%d3 504cc: 4c68 3002 0010 remul %a0@(16),%d2,%d3
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
504d2: 2141 001c movel %d1,%a0@(28)
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
504d6: 246e 0014 moveal %fp@(20),%a2 504da: 9082 subl %d2,%d0 504dc: 2480 movel %d0,%a2@
if( extend_size >= heap->min_block_size ) {
504de: b0a8 0014 cmpl %a0@(20),%d0
504e2: 640c bccs 504f0 <_Heap_Extend+0x70> <== ALWAYS TAKEN
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
504e4: 4280 clrl %d0 <== NOT EXECUTED
}
return HEAP_EXTEND_SUCCESSFUL;
}
504e6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 504ec: 4e5e unlk %fp 504ee: 4e75 rts
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
504f0: 7401 moveq #1,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
504f2: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
504f6: c4a9 0004 andl %a1@(4),%d2
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
504fa: 2228 0020 movel %a0@(32),%d1 504fe: 928a subl %a2,%d1 50500: 8480 orl %d0,%d2
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
50502: 214a 0024 movel %a2,%a0@(36) 50506: 2342 0004 movel %d2,%a1@(4)
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
5050a: 7401 moveq #1,%d2 5050c: 8481 orl %d1,%d2 5050e: 2542 0004 movel %d2,%a2@(4)
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
50512: 4869 0008 pea %a1@(8)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
50516: d1a8 002c addl %d0,%a0@(44)
++stats->used_blocks;
5051a: 52a8 0040 addql #1,%a0@(64)
--stats->frees; /* Do not count subsequent call as actual free() */
5051e: 53a8 0050 subql #1,%a0@(80)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
50522: 2f08 movel %a0,%sp@- 50524: 4eb9 0004 b58c jsr 4b58c <_Heap_Free> 5052a: 508f addql #8,%sp 5052c: 4280 clrl %d0 5052e: 60b6 bras 504e6 <_Heap_Extend+0x66>
0004b510 <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4b510: 4e56 ffe4 linkw %fp,#-28 4b514: 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 )
4b518: 2040 moveal %d0,%a0 4b51a: 5188 subql #8,%a0 4b51c: 226e 0008 moveal %fp@(8),%a1 4b520: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4b526: 48d7 0c7c moveml %d2-%d6/%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;
4b52a: 2029 0020 movel %a1@(32),%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 )
4b52e: 91c1 subal %d1,%a0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4b530: b088 cmpl %a0,%d0 4b532: 6200 00a0 bhiw 4b5d4 <_Heap_Free+0xc4>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4b536: 2229 0024 movel %a1@(36),%d1
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
4b53a: b288 cmpl %a0,%d1 4b53c: 6500 0096 bcsw 4b5d4 <_Heap_Free+0xc4>
- 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;
4b540: 2628 0004 movel %a0@(4),%d3 4b544: 74fe moveq #-2,%d2 4b546: c483 andl %d3,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4b548: 45f0 2800 lea %a0@(00000000,%d2: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
4b54c: b5c0 cmpal %d0,%a2 4b54e: 6500 0084 bcsw 4b5d4 <_Heap_Free+0xc4> 4b552: b5c1 cmpal %d1,%a2
4b554: 627e bhis 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4b556: 282a 0004 movel %a2@(4),%d4
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4b55a: 7a01 moveq #1,%d5 4b55c: ca84 andl %d4,%d5 4b55e: 4a05 tstb %d5
4b560: 6772 beqs 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4b562: 7afe moveq #-2,%d5 4b564: c885 andl %d5,%d4
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4b566: b5c1 cmpal %d1,%a2 4b568: 6700 00fa beqw 4b664 <_Heap_Free+0x154>
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4b56c: 7a01 moveq #1,%d5 4b56e: 7c01 moveq #1,%d6 4b570: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4b574: bd85 eorl %d6,%d5
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
4b576: 7c01 moveq #1,%d6 4b578: c686 andl %d6,%d3 4b57a: 4a03 tstb %d3
4b57c: 6660 bnes 4b5de <_Heap_Free+0xce>
uintptr_t const prev_size = block->prev_size;
4b57e: 2610 movel %a0@,%d3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4b580: 91c3 subal %d3,%a0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4b582: b1c0 cmpal %d0,%a0
4b584: 654e bcss 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN
4b586: b1c1 cmpal %d1,%a0
4b588: 624a bhis 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN
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) ) {
4b58a: 7001 moveq #1,%d0 4b58c: c0a8 0004 andl %a0@(4),%d0 4b590: 4a00 tstb %d0
4b592: 6740 beqs 4b5d4 <_Heap_Free+0xc4> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4b594: 4a05 tstb %d5 4b596: 6700 00d2 beqw 4b66a <_Heap_Free+0x15a>
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
4b59a: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4b59e: 53a9 0038 subql #1,%a1@(56)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4b5a2: d882 addl %d2,%d4 4b5a4: d684 addl %d4,%d3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4b5a6: 7001 moveq #1,%d0
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4b5a8: 246a 0008 moveal %a2@(8),%a2 4b5ac: 8083 orl %d3,%d0
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4b5ae: 2183 3800 movel %d3,%a0@(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;
4b5b2: 2140 0004 movel %d0,%a0@(4)
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
4b5b6: 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;
4b5ba: 274a 0008 movel %a2,%a3@(8)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4b5be: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4b5c2: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4b5c6: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4b5ca: 7001 moveq #1,%d0
return( true );
}
4b5cc: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4b5d0: 4e5e unlk %fp 4b5d2: 4e75 rts 4b5d4: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4b5d8: 4200 clrb %d0
}
4b5da: 4e5e unlk %fp 4b5dc: 4e75 rts
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4b5de: 4a05 tstb %d5
4b5e0: 6736 beqs 4b618 <_Heap_Free+0x108>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
4b5e2: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + next_block_size;
4b5e6: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4b5e8: 7001 moveq #1,%d0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
4b5ea: 246a 0008 moveal %a2@(8),%a2 4b5ee: 8084 orl %d4,%d0
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4b5f0: 2184 4800 movel %d4,%a0@(00000000,%d4:l)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
4b5f4: 214b 000c movel %a3,%a0@(12)
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4b5f8: 214a 0008 movel %a2,%a0@(8)
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;
4b5fc: 2140 0004 movel %d0,%a0@(4)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4b600: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4b604: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4b608: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4b60c: 7001 moveq #1,%d0
new_block->prev = prev;
next->prev = new_block;
4b60e: 2548 000c movel %a0,%a2@(12)
prev->next = new_block;
4b612: 2748 0008 movel %a0,%a3@(8) 4b616: 60b4 bras 4b5cc <_Heap_Free+0xbc>
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;
4b618: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b61a: 7cfe moveq #-2,%d6
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;
4b61c: 8a82 orl %d2,%d5
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4b61e: 2669 0008 moveal %a1@(8),%a3 4b622: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b626: cdaa 0004 andl %d6,%a2@(4)
next_block->prev_size = block_size;
4b62a: 2482 movel %d2,%a2@
/* Statistics */
++stats->free_blocks;
4b62c: 2029 0038 movel %a1@(56),%d0 4b630: 5280 addql #1,%d0
new_block->next = next;
4b632: 214b 0008 movel %a3,%a0@(8)
new_block->prev = block_before;
4b636: 2149 000c movel %a1,%a0@(12)
block_before->next = new_block;
4b63a: 2348 0008 movel %a0,%a1@(8)
next->prev = new_block;
4b63e: 2748 000c movel %a0,%a3@(12) 4b642: 2340 0038 movel %d0,%a1@(56)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
4b646: b0a9 003c cmpl %a1@(60),%d0 4b64a: 6300 ff72 blsw 4b5be <_Heap_Free+0xae>
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4b64e: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4b652: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4b656: 52a9 0050 addql #1,%a1@(80)
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;
4b65a: 2340 003c movel %d0,%a1@(60)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4b65e: 7001 moveq #1,%d0 4b660: 6000 ff6a braw 4b5cc <_Heap_Free+0xbc>
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4b664: 4205 clrb %d5 4b666: 6000 ff0e braw 4b576 <_Heap_Free+0x66>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
4b66a: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4b66c: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b66e: 7cfe moveq #-2,%d6
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;
4b670: 8a83 orl %d3,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4b672: 2483 movel %d3,%a2@
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4b674: 7001 moveq #1,%d0
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4b676: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b67a: cdaa 0004 andl %d6,%a2@(4)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4b67e: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4b682: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4b686: 52a9 0050 addql #1,%a1@(80) 4b68a: 6000 ff40 braw 4b5cc <_Heap_Free+0xbc>
...
00050530 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
50530: 4e56 fff4 linkw %fp,#-12 50534: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50538: 266e 0008 moveal %fp@(8),%a3 5053c: 246e 000c moveal %fp@(12),%a2
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
50540: 206b 0008 moveal %a3@(8),%a0
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
50544: 4292 clrl %a2@
info->largest = 0;
50546: 42aa 0004 clrl %a2@(4)
info->total = 0;
5054a: 42aa 0008 clrl %a2@(8)
for(the_block = _Heap_Free_list_first(the_heap);
5054e: b1cb cmpal %a3,%a0
50550: 672e beqs 50580 <_Heap_Get_free_information+0x50><== NEVER TAKEN
50552: 327c 0001 moveaw #1,%a1 50556: 4281 clrl %d1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
50558: 70fe moveq #-2,%d0
the_block != tail;
the_block = the_block->next)
5055a: 2409 movel %a1,%d2 5055c: 5282 addql #1,%d2 5055e: c0a8 0004 andl %a0@(4),%d0
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
50562: d280 addl %d0,%d1
if ( info->largest < the_size )
50564: b0aa 0004 cmpl %a2@(4),%d0
50568: 6304 blss 5056e <_Heap_Get_free_information+0x3e>
info->largest = the_size;
5056a: 2540 0004 movel %d0,%a2@(4)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
5056e: 2068 0008 moveal %a0@(8),%a0
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
50572: b1cb cmpal %a3,%a0
50574: 6704 beqs 5057a <_Heap_Get_free_information+0x4a>
50576: 2242 moveal %d2,%a1 50578: 60de bras 50558 <_Heap_Get_free_information+0x28> 5057a: 2541 0008 movel %d1,%a2@(8) 5057e: 2489 movel %a1,%a2@
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
50580: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3
50584: 4e5e unlk %fp <== NOT EXECUTED
00050588 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
50588: 4e56 fff4 linkw %fp,#-12 5058c: 206e 0008 moveal %fp@(8),%a0 50590: 48d7 040c moveml %d2-%d3/%a2,%sp@ 50594: 246e 000c moveal %fp@(12),%a2
Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block;
50598: 2428 0024 movel %a0@(36),%d2
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
5059c: 2268 0020 moveal %a0@(32),%a1
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
505a0: 4292 clrl %a2@
the_info->Free.total = 0;
505a2: 42aa 0008 clrl %a2@(8)
the_info->Free.largest = 0;
505a6: 42aa 0004 clrl %a2@(4)
the_info->Used.number = 0;
505aa: 42aa 000c clrl %a2@(12)
the_info->Used.total = 0;
505ae: 42aa 0014 clrl %a2@(20)
the_info->Used.largest = 0;
505b2: 42aa 0010 clrl %a2@(16)
while ( the_block != end ) {
505b6: b489 cmpl %a1,%d2
505b8: 6746 beqs 50600 <_Heap_Get_information+0x78> <== NEVER TAKEN
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
505ba: 260a movel %a2,%d3 505bc: 0683 0000 000c addil #12,%d3
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
505c2: 2229 0004 movel %a1@(4),%d1 505c6: 70fe moveq #-2,%d0
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
505c8: 204a moveal %a2,%a0 505ca: c081 andl %d1,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
505cc: d3c0 addal %d0,%a1
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;
505ce: 2229 0004 movel %a1@(4),%d1 505d2: 0801 0000 btst #0,%d1
505d6: 6702 beqs 505da <_Heap_Get_information+0x52>
505d8: 2043 moveal %d3,%a0
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
505da: 5290 addql #1,%a0@
info->total += the_size;
505dc: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
505e0: b0a8 0004 cmpl %a0@(4),%d0
505e4: 6304 blss 505ea <_Heap_Get_information+0x62>
info->largest = the_size;
505e6: 2140 0004 movel %d0,%a0@(4)
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
505ea: b3c2 cmpal %d2,%a1
505ec: 66d8 bnes 505c6 <_Heap_Get_information+0x3e>
505ee: 202a 0014 movel %a2@(20),%d0 505f2: 5080 addql #8,%d0
/* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
505f4: 2540 0014 movel %d0,%a2@(20)
}
505f8: 4cd7 040c moveml %sp@,%d2-%d3/%a2 505fc: 4e5e unlk %fp 505fe: 4e75 rts
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
50600: 7008 moveq #8,%d0 <== NOT EXECUTED
/* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
50602: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED
}
50606: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 5060a: 4e5e unlk %fp <== NOT EXECUTED
...
00046c04 <_Heap_Initialize>:
Heap_Control *heap,
void *heap_area_begin_ptr,
uintptr_t heap_area_size,
uintptr_t page_size
)
{
46c04: 4e56 ffe8 linkw %fp,#-24 46c08: 206e 0008 moveal %fp@(8),%a0 46c0c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 46c10: 226e 000c moveal %fp@(12),%a1 46c14: 242e 0010 movel %fp@(16),%d2 46c18: 222e 0014 movel %fp@(20),%d1
uintptr_t min_block_size = 0;
uintptr_t overhead = 0;
Heap_Block *first_block = NULL;
Heap_Block *last_block = NULL;
if ( page_size == 0 ) {
46c1c: 6600 00ce bnew 46cec <_Heap_Initialize+0xe8>
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE;
46c20: 2009 movel %a1,%d0 46c22: 5080 addql #8,%d0
uintptr_t min_block_size = 0;
uintptr_t overhead = 0;
Heap_Block *first_block = NULL;
Heap_Block *last_block = NULL;
if ( page_size == 0 ) {
46c24: 123c 0004 moveb #4,%d1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
46c28: 2a00 movel %d0,%d5 46c2a: 7610 moveq #16,%d3 46c2c: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
46c30: 4a84 tstl %d4
46c32: 6704 beqs 46c38 <_Heap_Initialize+0x34> <== ALWAYS TAKEN
return value - remainder + alignment;
46c34: d081 addl %d1,%d0 46c36: 9084 subl %d4,%d0
uintptr_t page_size
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
46c38: 2809 movel %a1,%d4 46c3a: d882 addl %d2,%d4
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
first_block_size = heap_area_size - overhead;
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
46c3c: b889 cmpl %a1,%d4 46c3e: 6500 00bc bcsw 46cfc <_Heap_Initialize+0xf8>
}
min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size );
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size );
first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
46c42: 2a00 movel %d0,%d5 46c44: 2440 moveal %d0,%a2 46c46: 9a89 subl %a1,%d5 46c48: 518a subql #8,%a2
first_block_size = heap_area_size - overhead;
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
46c4a: ba82 cmpl %d2,%d5 46c4c: 6400 00ae bccw 46cfc <_Heap_Initialize+0xf8>
min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size );
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size );
first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
first_block_size = heap_area_size - overhead;
46c50: 9485 subl %d5,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
46c52: 2a02 movel %d2,%d5 46c54: 4c41 5000 remul %d1,%d0,%d5 46c58: 9480 subl %d0,%d2
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
46c5a: b483 cmpl %d3,%d2 46c5c: 6500 009e bcsw 46cfc <_Heap_Initialize+0xf8>
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
46c60: 7a01 moveq #1,%d5
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
46c62: 47f2 2800 lea %a2@(00000000,%d2:l),%a3
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
46c66: 2002 movel %d2,%d0 46c68: 5180 subql #8,%d0
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
46c6a: 8a82 orl %d2,%d5
return 0;
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
46c6c: 2481 movel %d1,%a2@
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
46c6e: 2545 0004 movel %d5,%a2@(4)
* last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
46c72: 2a0a movel %a2,%d5 46c74: 9a8b subl %a3,%d5 46c76: 2745 0004 movel %d5,%a3@(4)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
46c7a: 2a39 0005 d168 movel 5d168 <instance>,%d5
* block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size;
46c80: 2682 movel %d2,%a3@
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
46c82: 2141 0010 movel %d1,%a0@(16)
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
stats->free_blocks = 1;
46c86: 7201 moveq #1,%d1
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
first_block->next = _Heap_Free_list_tail( heap );
46c88: 2548 0008 movel %a0,%a2@(8)
first_block->prev = _Heap_Free_list_head( heap );
46c8c: 2548 000c movel %a0,%a2@(12)
last_block->prev_size = first_block_size;
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
heap->min_block_size = min_block_size;
46c90: 2143 0014 movel %d3,%a0@(20)
heap->area_begin = heap_area_begin; heap->area_end = heap_area_end;
46c94: 2144 001c movel %d4,%a0@(28)
_Heap_Free_list_tail( heap )->prev = first_block;
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
46c98: 2142 0034 movel %d2,%a0@(52)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
46c9c: 2145 0028 movel %d5,%a0@(40) 46ca0: 5285 addql #1,%d5
heap->last_block = last_block;
_Heap_Free_list_head( heap )->next = first_block;
_Heap_Free_list_tail( heap )->prev = first_block;
/* Statistics */
stats->size = first_block_size;
46ca2: 2142 002c movel %d2,%a0@(44)
stats->free_size = first_block_size;
46ca6: 2142 0030 movel %d2,%a0@(48)
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
heap->min_block_size = min_block_size;
heap->area_begin = heap_area_begin;
46caa: 2149 0018 movel %a1,%a0@(24)
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
stats->free_blocks = 1;
46cae: 2141 0038 movel %d1,%a0@(56)
stats->max_free_blocks = 1;
46cb2: 2141 003c movel %d1,%a0@(60)
stats->used_blocks = 0;
46cb6: 42a8 0040 clrl %a0@(64)
stats->max_search = 0;
46cba: 42a8 0044 clrl %a0@(68)
stats->allocs = 0;
46cbe: 42a8 0048 clrl %a0@(72)
stats->searches = 0;
46cc2: 42a8 004c clrl %a0@(76)
stats->frees = 0;
46cc6: 42a8 0050 clrl %a0@(80)
stats->resizes = 0;
46cca: 42a8 0054 clrl %a0@(84)
heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block;
46cce: 214b 0024 movel %a3,%a0@(36)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
46cd2: 23c5 0005 d168 movel %d5,5d168 <instance>
heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block;
46cd8: 214a 000c movel %a2,%a0@(12)
/* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block;
46cdc: 214a 0020 movel %a2,%a0@(32)
heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block;
46ce0: 214a 0008 movel %a2,%a0@(8)
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return alloc_area_size;
}
46ce4: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46ce8: 4e5e unlk %fp 46cea: 4e75 rts
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
46cec: 7003 moveq #3,%d0 46cee: c081 andl %d1,%d0
if ( remainder != 0 ) {
46cf0: 6704 beqs 46cf6 <_Heap_Initialize+0xf2>
return value - remainder + alignment;
46cf2: 5881 addql #4,%d1 46cf4: 9280 subl %d0,%d1
if ( page_size == 0 ) {
page_size = CPU_ALIGNMENT;
} else {
page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT );
if ( page_size < CPU_ALIGNMENT ) {
46cf6: 7003 moveq #3,%d0 46cf8: b081 cmpl %d1,%d0
46cfa: 650a bcss 46d06 <_Heap_Initialize+0x102>
);
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return alloc_area_size;
46cfc: 4280 clrl %d0
}
46cfe: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46d02: 4e5e unlk %fp 46d04: 4e75 rts
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
46d06: 7610 moveq #16,%d3 46d08: 4c41 3000 remul %d1,%d0,%d3
if ( remainder != 0 ) {
46d0c: 4a80 tstl %d0
46d0e: 671e beqs 46d2e <_Heap_Initialize+0x12a>
return value - remainder + alignment;
46d10: 2601 movel %d1,%d3 46d12: 0683 0000 0010 addil #16,%d3 46d18: 9680 subl %d0,%d3
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE;
46d1a: 2009 movel %a1,%d0 46d1c: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
46d1e: 2a00 movel %d0,%d5 46d20: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
46d24: 4a84 tstl %d4 46d26: 6700 ff10 beqw 46c38 <_Heap_Initialize+0x34> 46d2a: 6000 ff08 braw 46c34 <_Heap_Initialize+0x30> 46d2e: 2009 movel %a1,%d0 46d30: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
46d32: 2a00 movel %d0,%d5
if ( remainder != 0 ) {
46d34: 7610 moveq #16,%d3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
46d36: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
46d3a: 4a84 tstl %d4 46d3c: 6700 fefa beqw 46c38 <_Heap_Initialize+0x34> 46d40: 6000 fef2 braw 46c34 <_Heap_Initialize+0x30>
0005a7c8 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5a7c8: 4e56 0000 linkw %fp,#0 5a7cc: 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 )
5a7d0: 2040 moveal %d0,%a0 5a7d2: 5188 subql #8,%a0 5a7d4: 226e 0008 moveal %fp@(8),%a1 5a7d8: 2f02 movel %d2,%sp@- 5a7da: 2400 movel %d0,%d2 5a7dc: 4c69 2001 0010 remul %a1@(16),%d1,%d2 5a7e2: 91c1 subal %d1,%a0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5a7e4: 2229 0020 movel %a1@(32),%d1
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
5a7e8: b288 cmpl %a0,%d1
5a7ea: 6238 bhis 5a824 <_Heap_Size_of_alloc_area+0x5c>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5a7ec: 2269 0024 moveal %a1@(36),%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
5a7f0: b3c8 cmpal %a0,%a1
5a7f2: 6530 bcss 5a824 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
5a7f4: 74fe moveq #-2,%d2 5a7f6: c4a8 0004 andl %a0@(4),%d2 5a7fa: d1c2 addal %d2,%a0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
5a7fc: b1c1 cmpal %d1,%a0
5a7fe: 6524 bcss 5a824 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
5a800: b1c9 cmpal %a1,%a0
5a802: 6220 bhis 5a824 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
5a804: 7201 moveq #1,%d1 5a806: c2a8 0004 andl %a0@(4),%d1 5a80a: 4a01 tstb %d1
5a80c: 6716 beqs 5a824 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5a80e: 7204 moveq #4,%d1 5a810: 9280 subl %d0,%d1 5a812: 2001 movel %d1,%d0 5a814: d088 addl %a0,%d0 5a816: 226e 0010 moveal %fp@(16),%a1
return true;
}
5a81a: 241f movel %sp@+,%d2 5a81c: 4e5e unlk %fp
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5a81e: 2280 movel %d0,%a1@ 5a820: 7001 moveq #1,%d0
return true;
}
5a822: 4e75 rts 5a824: 241f movel %sp@+,%d2 5a826: 4e5e unlk %fp
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
5a828: 4200 clrb %d0 <== NOT EXECUTED
}
00047960 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
47960: 4e56 ffc8 linkw %fp,#-56 47964: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47968: 246e 0008 moveal %fp@(8),%a2
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
4796c: 4bfa 0496 lea %pc@(47e04 <_Heap_Walk_print>),%a5
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
47970: 242e 000c movel %fp@(12),%d2
uintptr_t const page_size = heap->page_size;
47974: 262a 0010 movel %a2@(16),%d3
uintptr_t const min_block_size = heap->min_block_size;
47978: 282a 0014 movel %a2@(20),%d4
Heap_Block *const last_block = heap->last_block;
4797c: 2a2a 0024 movel %a2@(36),%d5
Heap_Block *block = heap->first_block;
47980: 266a 0020 moveal %a2@(32),%a3
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
47984: 4a2e 0013 tstb %fp@(19)
47988: 6604 bnes 4798e <_Heap_Walk+0x2e>
4798a: 4bfa ffcc lea %pc@(47958 <_Heap_Walk_print_nothing>),%a5
if ( !_System_state_Is_up( _System_state_Get() ) ) {
4798e: 7003 moveq #3,%d0 47990: b0b9 0006 0042 cmpl 60042 <_System_state_Current>,%d0
47996: 670c beqs 479a4 <_Heap_Walk+0x44>
block = next_block;
}
return true;
}
47998: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
4799e: 7001 moveq #1,%d0
block = next_block;
}
return true;
}
479a0: 4e5e unlk %fp 479a2: 4e75 rts
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
479a4: 2f2a 000c movel %a2@(12),%sp@- 479a8: 2f2a 0008 movel %a2@(8),%sp@- 479ac: 2f05 movel %d5,%sp@- 479ae: 2f0b movel %a3,%sp@- 479b0: 2f2a 001c movel %a2@(28),%sp@- 479b4: 2f2a 0018 movel %a2@(24),%sp@- 479b8: 2f04 movel %d4,%sp@- 479ba: 2f03 movel %d3,%sp@- 479bc: 4879 0005 c404 pea 5c404 <_Status_Object_name_errors_to_status+0x14> 479c2: 42a7 clrl %sp@- 479c4: 2f02 movel %d2,%sp@- 479c6: 4e95 jsr %a5@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
479c8: 4fef 002c lea %sp@(44),%sp 479cc: 4a83 tstl %d3 479ce: 6700 0154 beqw 47b24 <_Heap_Walk+0x1c4>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
479d2: 7003 moveq #3,%d0 479d4: c083 andl %d3,%d0 479d6: 6600 016a bnew 47b42 <_Heap_Walk+0x1e2>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
479da: 2204 movel %d4,%d1 479dc: 4c43 1000 remul %d3,%d0,%d1 479e0: 4a80 tstl %d0 479e2: 6600 0176 bnew 47b5a <_Heap_Walk+0x1fa>
);
return false;
}
if (
479e6: 200b movel %a3,%d0 479e8: 5080 addql #8,%d0 479ea: 4c43 0001 remul %d3,%d1,%d0 479ee: 4a81 tstl %d1 479f0: 6600 0180 bnew 47b72 <_Heap_Walk+0x212>
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;
479f4: 2c2b 0004 movel %a3@(4),%d6
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
479f8: 7201 moveq #1,%d1 479fa: c286 andl %d6,%d1 479fc: 2d46 fff0 movel %d6,%fp@(-16) 47a00: 4a01 tstb %d1 47a02: 6700 0186 beqw 47b8a <_Heap_Walk+0x22a>
);
return false;
}
if ( first_block->prev_size != page_size ) {
47a06: 2053 moveal %a3@,%a0 47a08: b1c3 cmpal %d3,%a0 47a0a: 6600 00de bnew 47aea <_Heap_Walk+0x18a>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
47a0e: 2045 moveal %d5,%a0 47a10: 7cfe moveq #-2,%d6 47a12: 7001 moveq #1,%d0 47a14: cca8 0004 andl %a0@(4),%d6 47a18: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 47a1c: 4a00 tstb %d0 47a1e: 6700 0180 beqw 47ba0 <_Heap_Walk+0x240>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
47a22: 2c2a 0010 movel %a2@(16),%d6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
47a26: 206a 0008 moveal %a2@(8),%a0 47a2a: 2d46 fffc movel %d6,%fp@(-4)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
47a2e: b1ca cmpal %a2,%a0 47a30: 6700 0192 beqw 47bc4 <_Heap_Walk+0x264>
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;
47a34: 2e2a 0020 movel %a2@(32),%d7 47a38: 2d47 fff4 movel %d7,%fp@(-12)
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
47a3c: b1c7 cmpal %d7,%a0 47a3e: 6500 00c4 bcsw 47b04 <_Heap_Walk+0x1a4>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
47a42: 286a 0024 moveal %a2@(36),%a4
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
47a46: b1cc cmpal %a4,%a0 47a48: 6200 00ba bhiw 47b04 <_Heap_Walk+0x1a4>
);
return false;
}
if (
47a4c: 2248 moveal %a0,%a1 47a4e: 5089 addql #8,%a1 47a50: 2009 movel %a1,%d0 47a52: 4c46 0007 remul %d6,%d7,%d0 47a56: 2d49 fff8 movel %a1,%fp@(-8) 47a5a: 4a87 tstl %d7 47a5c: 6600 0372 bnew 47dd0 <_Heap_Walk+0x470>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
47a60: 7efe moveq #-2,%d7 47a62: 7001 moveq #1,%d0 47a64: cea8 0004 andl %a0@(4),%d7 47a68: c0b0 7804 andl %a0@(00000004,%d7:l),%d0 47a6c: 6600 037c bnew 47dea <_Heap_Walk+0x48a>
);
return false;
}
if ( free_block->prev != prev_block ) {
47a70: 2e28 000c movel %a0@(12),%d7 47a74: be8a cmpl %a2,%d7
47a76: 6650 bnes 47ac8 <_Heap_Walk+0x168> <== NEVER TAKEN
47a78: 202e fff0 movel %fp@(-16),%d0 47a7c: 2241 moveal %d1,%a1 47a7e: 2c2e fff4 movel %fp@(-12),%d6 47a82: 2d40 fff8 movel %d0,%fp@(-8) 47a86: 2d43 fff4 movel %d3,%fp@(-12)
(*printer)(
47a8a: 2008 movel %a0,%d0
return false;
}
prev_block = free_block;
free_block = free_block->next;
47a8c: 2068 0008 moveal %a0@(8),%a0
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
47a90: b1ca cmpal %a2,%a0 47a92: 6700 0122 beqw 47bb6 <_Heap_Walk+0x256> 47a96: bc88 cmpl %a0,%d6
47a98: 626a bhis 47b04 <_Heap_Walk+0x1a4>
);
return false;
}
if (
47a9a: 2e08 movel %a0,%d7 47a9c: 5087 addql #8,%d7 47a9e: b1cc cmpal %a4,%a0
47aa0: 6262 bhis 47b04 <_Heap_Walk+0x1a4> <== NEVER TAKEN
47aa2: 262e fffc movel %fp@(-4),%d3 47aa6: 4c43 7001 remul %d3,%d1,%d7 47aaa: 4a81 tstl %d1 47aac: 6600 0322 bnew 47dd0 <_Heap_Walk+0x470>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
47ab0: 72fe moveq #-2,%d1 47ab2: 7e01 moveq #1,%d7 47ab4: c2a8 0004 andl %a0@(4),%d1 47ab8: ceb0 1804 andl %a0@(00000004,%d1:l),%d7 47abc: 6600 032c bnew 47dea <_Heap_Walk+0x48a>
);
return false;
}
if ( free_block->prev != prev_block ) {
47ac0: 2e28 000c movel %a0@(12),%d7 47ac4: b087 cmpl %d7,%d0
47ac6: 67c2 beqs 47a8a <_Heap_Walk+0x12a>
(*printer)(
47ac8: 2f07 movel %d7,%sp@- 47aca: 2f08 movel %a0,%sp@- 47acc: 4879 0005 c5f5 pea 5c5f5 <_Status_Object_name_errors_to_status+0x205>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47ad2: 4878 0001 pea 1 <ADD> 47ad6: 2f02 movel %d2,%sp@- 47ad8: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
47ada: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47ade: 4200 clrb %d0
block = next_block;
}
return true;
}
47ae0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47ae6: 4e5e unlk %fp 47ae8: 4e75 rts
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
47aea: 2f03 movel %d3,%sp@- 47aec: 2f08 movel %a0,%sp@- 47aee: 4879 0005 c549 pea 5c549 <_Status_Object_name_errors_to_status+0x159>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47af4: 4878 0001 pea 1 <ADD> 47af8: 2f02 movel %d2,%sp@- 47afa: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
47afc: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47b00: 4200 clrb %d0 47b02: 60dc bras 47ae0 <_Heap_Walk+0x180>
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
47b04: 2f08 movel %a0,%sp@- 47b06: 4879 0005 c589 pea 5c589 <_Status_Object_name_errors_to_status+0x199>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
47b0c: 4878 0001 pea 1 <ADD> 47b10: 2f02 movel %d2,%sp@- 47b12: 4e95 jsr %a5@ 47b14: 4fef 0010 lea %sp@(16),%sp 47b18: 4200 clrb %d0
block = next_block;
}
return true;
}
47b1a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b20: 4e5e unlk %fp 47b22: 4e75 rts
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
47b24: 4879 0005 c495 pea 5c495 <_Status_Object_name_errors_to_status+0xa5>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
47b2a: 4878 0001 pea 1 <ADD> 47b2e: 2f02 movel %d2,%sp@- 47b30: 4e95 jsr %a5@ 47b32: 4fef 000c lea %sp@(12),%sp 47b36: 4200 clrb %d0
block = next_block;
}
return true;
}
47b38: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b3e: 4e5e unlk %fp 47b40: 4e75 rts
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
47b42: 2f03 movel %d3,%sp@- 47b44: 4879 0005 c4a8 pea 5c4a8 <_Status_Object_name_errors_to_status+0xb8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
47b4a: 4878 0001 pea 1 <ADD> 47b4e: 2f02 movel %d2,%sp@- 47b50: 4e95 jsr %a5@ 47b52: 4fef 0010 lea %sp@(16),%sp 47b56: 4200 clrb %d0 47b58: 60c0 bras 47b1a <_Heap_Walk+0x1ba>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
47b5a: 2f04 movel %d4,%sp@- 47b5c: 4879 0005 c4c6 pea 5c4c6 <_Status_Object_name_errors_to_status+0xd6>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
47b62: 4878 0001 pea 1 <ADD> 47b66: 2f02 movel %d2,%sp@- 47b68: 4e95 jsr %a5@ 47b6a: 4fef 0010 lea %sp@(16),%sp 47b6e: 4200 clrb %d0 47b70: 60a8 bras 47b1a <_Heap_Walk+0x1ba>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
47b72: 2f0b movel %a3,%sp@- 47b74: 4879 0005 c4ea pea 5c4ea <_Status_Object_name_errors_to_status+0xfa>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
47b7a: 4878 0001 pea 1 <ADD> 47b7e: 2f02 movel %d2,%sp@- 47b80: 4e95 jsr %a5@ 47b82: 4fef 0010 lea %sp@(16),%sp 47b86: 4200 clrb %d0 47b88: 6090 bras 47b1a <_Heap_Walk+0x1ba>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
47b8a: 4879 0005 c51b pea 5c51b <_Status_Object_name_errors_to_status+0x12b> 47b90: 4878 0001 pea 1 <ADD> 47b94: 2f02 movel %d2,%sp@- 47b96: 4e95 jsr %a5@ 47b98: 4fef 000c lea %sp@(12),%sp 47b9c: 4200 clrb %d0 47b9e: 6098 bras 47b38 <_Heap_Walk+0x1d8>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
47ba0: 4879 0005 c574 pea 5c574 <_Status_Object_name_errors_to_status+0x184>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
47ba6: 4878 0001 pea 1 <ADD> 47baa: 2f02 movel %d2,%sp@- 47bac: 4e95 jsr %a5@ 47bae: 4fef 000c lea %sp@(12),%sp 47bb2: 4200 clrb %d0 47bb4: 6082 bras 47b38 <_Heap_Walk+0x1d8> 47bb6: 262e fff8 movel %fp@(-8),%d3 47bba: 2209 movel %a1,%d1 47bbc: 2d43 fff0 movel %d3,%fp@(-16) 47bc0: 262e fff4 movel %fp@(-12),%d3
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
47bc4: b7c5 cmpal %d5,%a3 47bc6: 6700 fdd0 beqw 47998 <_Heap_Walk+0x38> 47bca: 2c2e fff0 movel %fp@(-16),%d6
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47bce: 7efe moveq #-2,%d7 47bd0: cc87 andl %d7,%d6 47bd2: 2d43 fff8 movel %d3,%fp@(-8)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47bd6: 49f3 6800 lea %a3@(00000000,%d6:l),%a4
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
47bda: 4a01 tstb %d1 47bdc: 6700 0126 beqw 47d04 <_Heap_Walk+0x3a4>
(*printer)(
47be0: 2f06 movel %d6,%sp@- 47be2: 2f0b movel %a3,%sp@- 47be4: 4879 0005 c627 pea 5c627 <_Status_Object_name_errors_to_status+0x237> 47bea: 42a7 clrl %sp@- 47bec: 2f02 movel %d2,%sp@- 47bee: 4e95 jsr %a5@ 47bf0: 4fef 0014 lea %sp@(20),%sp
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
47bf4: b9ea 0020 cmpal %a2@(32),%a4 47bf8: 6500 00d0 bcsw 47cca <_Heap_Walk+0x36a> 47bfc: b9ea 0024 cmpal %a2@(36),%a4 47c00: 6200 00c8 bhiw 47cca <_Heap_Walk+0x36a>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
47c04: 262e fff8 movel %fp@(-8),%d3 47c08: 2206 movel %d6,%d1 47c0a: 4c43 1000 remul %d3,%d0,%d1 47c0e: 4a80 tstl %d0 47c10: 6600 0162 bnew 47d74 <_Heap_Walk+0x414>
);
return false;
}
if ( block_size < min_block_size ) {
47c14: bc84 cmpl %d4,%d6 47c16: 6500 0178 bcsw 47d90 <_Heap_Walk+0x430>
);
return false;
}
if ( next_block_begin <= block_begin ) {
47c1a: b9cb cmpal %a3,%a4 47c1c: 6300 0196 blsw 47db4 <_Heap_Walk+0x454>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
47c20: 7001 moveq #1,%d0 47c22: c0ac 0004 andl %a4@(4),%d0 47c26: 4a00 tstb %d0 47c28: 6600 00bc bnew 47ce6 <_Heap_Walk+0x386>
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;
47c2c: 262b 0004 movel %a3@(4),%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;
47c30: 7cfe moveq #-2,%d6
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
47c32: 43f9 0005 c71d lea 5c71d <_Status_Object_name_errors_to_status+0x32d>,%a1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
47c38: 2e2a 0008 movel %a2@(8),%d7
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47c3c: cc83 andl %d3,%d6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
47c3e: 2d47 fffc movel %d7,%fp@(-4)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47c42: 2e0b movel %a3,%d7 47c44: de86 addl %d6,%d7
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
47c46: 222b 0008 movel %a3@(8),%d1
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
47c4a: b2aa 000c cmpl %a2@(12),%d1
47c4e: 6710 beqs 47c60 <_Heap_Walk+0x300>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
47c50: 43f9 0005 c727 lea 5c727 <_Status_Object_name_errors_to_status+0x337>,%a1 47c56: b5c1 cmpal %d1,%a2
47c58: 6706 beqs 47c60 <_Heap_Walk+0x300>
47c5a: 43f9 0005 c362 lea 5c362 <rtems_status_assoc+0x178>,%a1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
47c60: 202b 000c movel %a3@(12),%d0 47c64: 41f9 0005 c731 lea 5c731 <_Status_Object_name_errors_to_status+0x341>,%a0 47c6a: b0ae fffc cmpl %fp@(-4),%d0
47c6e: 6710 beqs 47c80 <_Heap_Walk+0x320>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
47c70: 41f9 0005 c73c lea 5c73c <_Status_Object_name_errors_to_status+0x34c>,%a0 47c76: b5c0 cmpal %d0,%a2
47c78: 6706 beqs 47c80 <_Heap_Walk+0x320>
47c7a: 41f9 0005 c362 lea 5c362 <rtems_status_assoc+0x178>,%a0
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
47c80: 2f09 movel %a1,%sp@- 47c82: 2f01 movel %d1,%sp@- 47c84: 2f08 movel %a0,%sp@- 47c86: 2f00 movel %d0,%sp@- 47c88: 2f0b movel %a3,%sp@- 47c8a: 4879 0005 c746 pea 5c746 <_Status_Object_name_errors_to_status+0x356> 47c90: 42a7 clrl %sp@- 47c92: 2f02 movel %d2,%sp@- 47c94: 4e95 jsr %a5@
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
47c96: 4fef 0020 lea %sp@(32),%sp 47c9a: 2047 moveal %d7,%a0 47c9c: 2010 movel %a0@,%d0 47c9e: b086 cmpl %d6,%d0 47ca0: 6700 0082 beqw 47d24 <_Heap_Walk+0x3c4>
(*printer)(
47ca4: 2f07 movel %d7,%sp@- 47ca6: 2f00 movel %d0,%sp@- 47ca8: 2f06 movel %d6,%sp@- 47caa: 2f0b movel %a3,%sp@- 47cac: 4879 0005 c772 pea 5c772 <_Status_Object_name_errors_to_status+0x382> 47cb2: 4878 0001 pea 1 <ADD> 47cb6: 2f02 movel %d2,%sp@- 47cb8: 4e95 jsr %a5@ 47cba: 4fef 001c lea %sp@(28),%sp
block = next_block;
}
return true;
}
47cbe: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
47cc4: 4200 clrb %d0
block = next_block;
}
return true;
}
47cc6: 4e5e unlk %fp 47cc8: 4e75 rts
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
47cca: 2f0c movel %a4,%sp@- 47ccc: 2f0b movel %a3,%sp@- 47cce: 4879 0005 c663 pea 5c663 <_Status_Object_name_errors_to_status+0x273>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47cd4: 4878 0001 pea 1 <ADD> 47cd8: 2f02 movel %d2,%sp@- 47cda: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
47cdc: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47ce0: 4200 clrb %d0 47ce2: 6000 fdfc braw 47ae0 <_Heap_Walk+0x180>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
47ce6: b9c5 cmpal %d5,%a4 47ce8: 6700 fcae beqw 47998 <_Heap_Walk+0x38>
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
47cec: 2c2c 0004 movel %a4@(4),%d6 47cf0: 7201 moveq #1,%d1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47cf2: 7efe moveq #-2,%d7 47cf4: 264c moveal %a4,%a3 47cf6: c286 andl %d6,%d1 47cf8: cc87 andl %d7,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47cfa: 49f3 6800 lea %a3@(00000000,%d6:l),%a4
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
47cfe: 4a01 tstb %d1 47d00: 6600 fede bnew 47be0 <_Heap_Walk+0x280>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
47d04: 2f13 movel %a3@,%sp@- 47d06: 2f06 movel %d6,%sp@- 47d08: 2f0b movel %a3,%sp@- 47d0a: 4879 0005 c63e pea 5c63e <_Status_Object_name_errors_to_status+0x24e> 47d10: 42a7 clrl %sp@- 47d12: 2f02 movel %d2,%sp@- 47d14: 4e95 jsr %a5@ 47d16: 4fef 0018 lea %sp@(24),%sp
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
47d1a: b9ea 0020 cmpal %a2@(32),%a4
47d1e: 65aa bcss 47cca <_Heap_Walk+0x36a> <== NEVER TAKEN
47d20: 6000 feda braw 47bfc <_Heap_Walk+0x29c>
);
return false;
}
if ( !prev_used ) {
47d24: 7001 moveq #1,%d0 47d26: c680 andl %d0,%d3 47d28: 4a03 tstb %d3
47d2a: 672e beqs 47d5a <_Heap_Walk+0x3fa>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
47d2c: 206a 0008 moveal %a2@(8),%a0
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
47d30: b5c8 cmpal %a0,%a2
47d32: 670c beqs 47d40 <_Heap_Walk+0x3e0> <== NEVER TAKEN
if ( free_block == block ) {
47d34: b7c8 cmpal %a0,%a3
47d36: 67ae beqs 47ce6 <_Heap_Walk+0x386>
return true;
}
free_block = free_block->next;
47d38: 2068 0008 moveal %a0@(8),%a0
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
47d3c: b5c8 cmpal %a0,%a2
47d3e: 66f4 bnes 47d34 <_Heap_Walk+0x3d4>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
47d40: 2f0b movel %a3,%sp@- 47d42: 4879 0005 c7da pea 5c7da <_Status_Object_name_errors_to_status+0x3ea> 47d48: 4878 0001 pea 1 <ADD> 47d4c: 2f02 movel %d2,%sp@- 47d4e: 4e95 jsr %a5@ 47d50: 4fef 0010 lea %sp@(16),%sp 47d54: 4200 clrb %d0 47d56: 6000 fdc2 braw 47b1a <_Heap_Walk+0x1ba>
return false;
}
if ( !prev_used ) {
(*printer)(
47d5a: 2f0b movel %a3,%sp@- 47d5c: 4879 0005 c7ab pea 5c7ab <_Status_Object_name_errors_to_status+0x3bb>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
47d62: 4878 0001 pea 1 <ADD> 47d66: 2f02 movel %d2,%sp@- 47d68: 4e95 jsr %a5@ 47d6a: 4fef 0010 lea %sp@(16),%sp 47d6e: 4200 clrb %d0 47d70: 6000 fda8 braw 47b1a <_Heap_Walk+0x1ba>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
47d74: 2f06 movel %d6,%sp@- 47d76: 2f0b movel %a3,%sp@- 47d78: 4879 0005 c690 pea 5c690 <_Status_Object_name_errors_to_status+0x2a0>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47d7e: 4878 0001 pea 1 <ADD> 47d82: 2f02 movel %d2,%sp@- 47d84: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
47d86: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47d8a: 4200 clrb %d0 47d8c: 6000 fd52 braw 47ae0 <_Heap_Walk+0x180>
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
47d90: 2f04 movel %d4,%sp@- 47d92: 2f06 movel %d6,%sp@- 47d94: 2f0b movel %a3,%sp@- 47d96: 4879 0005 c6be pea 5c6be <_Status_Object_name_errors_to_status+0x2ce> 47d9c: 4878 0001 pea 1 <ADD> 47da0: 2f02 movel %d2,%sp@- 47da2: 4e95 jsr %a5@
block,
block_size,
min_block_size
);
return false;
47da4: 4fef 0018 lea %sp@(24),%sp
block = next_block;
}
return true;
}
47da8: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
47dae: 4200 clrb %d0
block = next_block;
}
return true;
}
47db0: 4e5e unlk %fp 47db2: 4e75 rts
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47db4: 2f0c movel %a4,%sp@- 47db6: 2f0b movel %a3,%sp@- 47db8: 4879 0005 c6e9 pea 5c6e9 <_Status_Object_name_errors_to_status+0x2f9> 47dbe: 4878 0001 pea 1 <ADD> 47dc2: 2f02 movel %d2,%sp@- 47dc4: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
47dc6: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
47dca: 4200 clrb %d0 47dcc: 6000 fd12 braw 47ae0 <_Heap_Walk+0x180>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
47dd0: 2f08 movel %a0,%sp@- 47dd2: 4879 0005 c5a9 pea 5c5a9 <_Status_Object_name_errors_to_status+0x1b9>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
47dd8: 4878 0001 pea 1 <ADD> 47ddc: 2f02 movel %d2,%sp@- 47dde: 4e95 jsr %a5@ 47de0: 4fef 0010 lea %sp@(16),%sp 47de4: 4200 clrb %d0 47de6: 6000 fd32 braw 47b1a <_Heap_Walk+0x1ba>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
47dea: 2f08 movel %a0,%sp@- 47dec: 4879 0005 c5d9 pea 5c5d9 <_Status_Object_name_errors_to_status+0x1e9>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
47df2: 4878 0001 pea 1 <ADD> 47df6: 2f02 movel %d2,%sp@- 47df8: 4e95 jsr %a5@ 47dfa: 4fef 0010 lea %sp@(16),%sp 47dfe: 4200 clrb %d0 47e00: 6000 fd18 braw 47b1a <_Heap_Walk+0x1ba>
00046464 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
46464: 4e56 0000 linkw %fp,#0 46468: 2f0a movel %a2,%sp@- 4646a: 2f02 movel %d2,%sp@-
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
4646c: 4ab9 0005 dbe2 tstl 5dbe2 <_IO_Number_of_drivers>
46472: 671e beqs 46492 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN
46474: 4282 clrl %d2 46476: 45f9 0004 aff8 lea 4aff8 <rtems_io_initialize>,%a2
(void) rtems_io_initialize( major, 0, NULL );
4647c: 42a7 clrl %sp@- 4647e: 42a7 clrl %sp@- 46480: 2f02 movel %d2,%sp@-
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46482: 5282 addql #1,%d2
(void) rtems_io_initialize( major, 0, NULL );
46484: 4e92 jsr %a2@
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46486: 4fef 000c lea %sp@(12),%sp 4648a: b4b9 0005 dbe2 cmpl 5dbe2 <_IO_Number_of_drivers>,%d2
46490: 65ea bcss 4647c <_IO_Initialize_all_drivers+0x18>
(void) rtems_io_initialize( major, 0, NULL );
}
46492: 242e fff8 movel %fp@(-8),%d2 46496: 246e fffc moveal %fp@(-4),%a2
4649a: 4e5e unlk %fp <== NOT EXECUTED
0004649e <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
4649e: 4e56 fff0 linkw %fp,#-16 464a2: 48d7 003c moveml %d2-%d5,%sp@
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
464a6: 2639 0005 c2c6 movel 5c2c6 <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
464ac: 2439 0005 c2c2 movel 5c2c2 <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
464b2: 2839 0005 c2be movel 5c2be <Configuration+0x2a>,%d4
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
464b8: b882 cmpl %d2,%d4
464ba: 6216 bhis 464d2 <_IO_Manager_initialization+0x34>
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
464bc: 23c3 0005 dbe6 movel %d3,5dbe6 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
464c2: 23c2 0005 dbe2 movel %d2,5dbe2 <_IO_Number_of_drivers>
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
464c8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464ce: 4e5e unlk %fp 464d0: 4e75 rts
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
464d2: 2004 movel %d4,%d0 464d4: 2a04 movel %d4,%d5 464d6: e788 lsll #3,%d0 464d8: eb8d lsll #5,%d5 464da: 9a80 subl %d0,%d5 464dc: 2f05 movel %d5,%sp@- 464de: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
464e4: 2f05 movel %d5,%sp@- 464e6: 42a7 clrl %sp@-
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
464e8: 23c4 0005 dbe2 movel %d4,5dbe2 <_IO_Number_of_drivers>
memset(
464ee: 2f00 movel %d0,%sp@-
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
464f0: 23c0 0005 dbe6 movel %d0,5dbe6 <_IO_Driver_address_table>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
464f6: 4eb9 0004 e0f8 jsr 4e0f8 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
464fc: 4fef 0010 lea %sp@(16),%sp 46500: 4a82 tstl %d2
46502: 67c4 beqs 464c8 <_IO_Manager_initialization+0x2a><== NEVER TAKEN
46504: 2839 0005 dbe6 movel 5dbe6 <_IO_Driver_address_table>,%d4 4650a: 4280 clrl %d0 4650c: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
4650e: 2243 moveal %d3,%a1 46510: 2044 moveal %d4,%a0 46512: d3c0 addal %d0,%a1 46514: d1c0 addal %d0,%a0
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46516: 5281 addql #1,%d1 46518: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
4651e: 20d9 movel %a1@+,%a0@+ 46520: 20d9 movel %a1@+,%a0@+ 46522: 20d9 movel %a1@+,%a0@+ 46524: 20d9 movel %a1@+,%a0@+ 46526: 20d9 movel %a1@+,%a0@+ 46528: 2091 movel %a1@,%a0@
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
4652a: b282 cmpl %d2,%d1
4652c: 649a bccs 464c8 <_IO_Manager_initialization+0x2a>
_IO_Driver_address_table[index] = driver_table[index];
4652e: 2243 moveal %d3,%a1 46530: 2044 moveal %d4,%a0 46532: d3c0 addal %d0,%a1 46534: d1c0 addal %d0,%a0
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46536: 5281 addql #1,%d1 46538: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
4653e: 20d9 movel %a1@+,%a0@+ 46540: 20d9 movel %a1@+,%a0@+ 46542: 20d9 movel %a1@+,%a0@+ 46544: 20d9 movel %a1@+,%a0@+ 46546: 20d9 movel %a1@+,%a0@+ 46548: 2091 movel %a1@,%a0@
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
4654a: b282 cmpl %d2,%d1
4654c: 65c0 bcss 4650e <_IO_Manager_initialization+0x70><== NEVER TAKEN
4654e: 6000 ff78 braw 464c8 <_IO_Manager_initialization+0x2a>
...
00046f70 <_Internal_error_Occurred>:
_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 );
46f70: 4280 clrl %d0
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
46f72: 4e56 0000 linkw %fp,#0 46f76: 222e 000c movel %fp@(12),%d1
_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 );
46f7a: 1001 moveb %d1,%d0 46f7c: 2040 moveal %d0,%a0
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
46f7e: 2f03 movel %d3,%sp@- 46f80: 202e 0008 movel %fp@(8),%d0 46f84: 2f02 movel %d2,%sp@- 46f86: 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 );
46f8a: 2f02 movel %d2,%sp@-
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
46f8c: 13c1 0005 da72 moveb %d1,5da72 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
46f92: 2f08 movel %a0,%sp@-
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
46f94: 23c0 0005 da6e movel %d0,5da6e <_Internal_errors_What_happened>
_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 );
46f9a: 2f00 movel %d0,%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;
46f9c: 23c2 0005 da74 movel %d2,5da74 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
46fa2: 4eb9 0004 8cb2 jsr 48cb2 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
46fa8: 307c 0700 moveaw #1792,%a0 46fac: 2608 movel %a0,%d3 46fae: 40c0 movew %sr,%d0 46fb0: 8083 orl %d3,%d0 46fb2: 46c0 movew %d0,%sr
46fb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46fb6: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46fbc: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
46fbe: 7005 moveq #5,%d0 46fc0: 4fef 000c lea %sp@(12),%sp 46fc4: 23c0 0005 db4a movel %d0,5db4a <_System_state_Current> 46fca: 60fe bras 46fca <_Internal_error_Occurred+0x5a>
00047034 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
47034: 4e56 fff0 linkw %fp,#-16 47038: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4703c: 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 )
47040: 4aaa 0014 tstl %a2@(20)
47044: 660c bnes 47052 <_Objects_Allocate+0x1e> <== ALWAYS TAKEN
47046: 4280 clrl %d0 <== NOT EXECUTED
information->inactive--;
}
}
return the_object;
}
47048: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4704e: 4e5e unlk %fp 47050: 4e75 rts
/*
* 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 );
47052: 240a movel %a2,%d2 47054: 0682 0000 001c addil #28,%d2 4705a: 47f9 0004 b07c lea 4b07c <_Chain_Get>,%a3 47060: 2f02 movel %d2,%sp@- 47062: 4e93 jsr %a3@
if ( information->auto_extend ) {
47064: 588f addql #4,%sp 47066: 4a2a 0010 tstb %a2@(16)
4706a: 67dc beqs 47048 <_Objects_Allocate+0x14>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
4706c: 4a80 tstl %d0
4706e: 6738 beqs 470a8 <_Objects_Allocate+0x74>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47070: 2040 moveal %d0,%a0 47072: 4281 clrl %d1 47074: 4283 clrl %d3
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47076: 4282 clrl %d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47078: 362a 0008 movew %a2@(8),%d3 4707c: 3228 000a movew %a0@(10),%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
47080: 306a 0028 moveaw %a2@(40),%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 ]--;
47084: 342a 0012 movew %a2@(18),%d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47088: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
4708a: 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 ]--;
4708c: 4c42 1001 remul %d2,%d1,%d1
information->inactive--;
47090: 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 ]--;
47094: 206a 002a moveal %a2@(42),%a0 47098: e589 lsll #2,%d1
information->inactive--;
}
}
return the_object;
}
4709a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470a0: 4e5e unlk %fp
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
470a2: d1c1 addal %d1,%a0 470a4: 5390 subql #1,%a0@
information->inactive--;
}
}
return the_object;
}
470a6: 4e75 rts
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
470a8: 2f0a movel %a2,%sp@- 470aa: 4eb9 0004 70f0 jsr 470f0 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
470b0: 2f02 movel %d2,%sp@- 470b2: 4e93 jsr %a3@
}
if ( the_object ) {
470b4: 508f addql #8,%sp 470b6: 4a80 tstl %d0
470b8: 66b6 bnes 47070 <_Objects_Allocate+0x3c>
information->inactive--;
}
}
return the_object;
}
470ba: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
470c0: 4e5e unlk %fp <== NOT EXECUTED
000470c4 <_Objects_Close>:
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
470c4: 4280 clrl %d0
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
470c6: 4e56 0000 linkw %fp,#0 470ca: 226e 000c moveal %fp@(12),%a1 470ce: 206e 0008 moveal %fp@(8),%a0 470d2: 2f0a movel %a2,%sp@- 470d4: 2468 0018 moveal %a0@(24),%a2 470d8: 3029 000a movew %a1@(10),%d0 470dc: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
470e0: 2d49 000c movel %a1,%fp@(12)
}
470e4: 245f moveal %sp@+,%a2 470e6: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
470e8: 4ef9 0004 7648 jmp 47648 <_Objects_Namespace_remove>
...
000470f0 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
470f0: 4e56 ffcc linkw %fp,#-52 470f4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 470f8: 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 );
470fc: 4285 clrl %d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
470fe: 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 );
47102: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47106: 4a88 tstl %a0 47108: 6700 022c beqw 47336 <_Objects_Extend_information+0x246>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
4710c: 322a 000e movew %a2@(14),%d1 47110: 302a 0012 movew %a2@(18),%d0 47114: 3801 movew %d1,%d4 47116: 0284 0000 ffff andil #65535,%d4 4711c: 88c0 divuw %d0,%d4 4711e: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
47124: 6700 0224 beqw 4734a <_Objects_Extend_information+0x25a>
if ( information->object_blocks[ block ] == NULL )
47128: 4a90 tstl %a0@ 4712a: 6700 021e beqw 4734a <_Objects_Extend_information+0x25a> 4712e: 5888 addql #4,%a0 47130: 2605 movel %d5,%d3 47132: 4282 clrl %d2 47134: 0280 0000 ffff andil #65535,%d0
break;
else
index_base += information->allocation_size;
4713a: d680 addl %d0,%d3
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
4713c: 5282 addql #1,%d2 4713e: b484 cmpl %d4,%d2
47140: 6404 bccs 47146 <_Objects_Extend_information+0x56>
if ( information->object_blocks[ block ] == NULL )
47142: 4a98 tstl %a0@+
47144: 66f4 bnes 4713a <_Objects_Extend_information+0x4a>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
47146: 0281 0000 ffff andil #65535,%d1 4714c: 2641 moveal %d1,%a3 4714e: d7c0 addal %d0,%a3
/*
* 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 ) {
47150: b7fc 0000 ffff cmpal #65535,%a3 47156: 6200 0186 bhiw 472de <_Objects_Extend_information+0x1ee>
/*
* 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;
4715a: 41ea 0014 lea %a2@(20),%a0 4715e: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
47162: 4a2a 0010 tstb %a2@(16) 47166: 6700 0180 beqw 472e8 <_Objects_Extend_information+0x1f8>
new_object_block = _Workspace_Allocate( block_size );
4716a: 2f00 movel %d0,%sp@- 4716c: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
if ( !new_object_block )
47172: 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 );
47174: 2c00 movel %d0,%d6
if ( !new_object_block )
47176: 6700 0166 beqw 472de <_Objects_Extend_information+0x1ee>
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
4717a: 4280 clrl %d0 4717c: 302a 000e movew %a2@(14),%d0 47180: b083 cmpl %d3,%d0 47182: 6200 00c4 bhiw 47248 <_Objects_Extend_information+0x158>
*/
/*
* Up the block count and maximum
*/
block_count++;
47186: 2a44 moveal %d4,%a5 47188: 528d addql #1,%a5
* 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 );
4718a: 200b movel %a3,%d0 4718c: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47190: d088 addl %a0,%d0 47192: d085 addl %d5,%d0 47194: e588 lsll #2,%d0 47196: 2f00 movel %d0,%sp@- 47198: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
if ( !object_blocks ) {
4719e: 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 );
471a0: 2840 moveal %d0,%a4
if ( !object_blocks ) {
471a2: 4a80 tstl %d0 471a4: 6700 01b2 beqw 47358 <_Objects_Extend_information+0x268>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
471a8: 2e0d movel %a5,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
471aa: 4280 clrl %d0
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
471ac: e58f lsll #2,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
471ae: 302a 000e movew %a2@(14),%d0
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
471b2: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 471b6: de8d addl %a5,%d7 471b8: b085 cmpl %d5,%d0 471ba: 6200 013c bhiw 472f8 <_Objects_Extend_information+0x208>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
471be: 4a85 tstl %d5
471c0: 670c beqs 471ce <_Objects_Extend_information+0xde><== NEVER TAKEN
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
471c2: 2047 moveal %d7,%a0 471c4: 4280 clrl %d0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
471c6: 4298 clrl %a0@+
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
471c8: 5280 addql #1,%d0 471ca: b085 cmpl %d5,%d0
471cc: 65f8 bcss 471c6 <_Objects_Extend_information+0xd6><== NEVER TAKEN
471ce: e58c lsll #2,%d4
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
471d0: 4281 clrl %d1 471d2: 322a 0012 movew %a2@(18),%d1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
471d6: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
471da: d283 addl %d3,%d1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
471dc: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0;
for ( index=index_base ;
471e0: b283 cmpl %d3,%d1
471e2: 6310 blss 471f4 <_Objects_Extend_information+0x104><== NEVER TAKEN
471e4: 2247 moveal %d7,%a1 471e6: 2003 movel %d3,%d0 471e8: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
471ec: 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++ ) {
471ee: 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 ;
471f0: b280 cmpl %d0,%d1
471f2: 62f8 bhis 471ec <_Objects_Extend_information+0xfc>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
471f4: 203c 0000 0700 movel #1792,%d0 471fa: 40c4 movew %sr,%d4 471fc: 8084 orl %d4,%d0 471fe: 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(
47200: 2012 movel %a2@,%d0 47202: 7218 moveq #24,%d1 47204: 4285 clrl %d5 47206: e3a8 lsll %d1,%d0 47208: 3a0b movew %a3,%d5 4720a: 4281 clrl %d1 4720c: 2245 moveal %d5,%a1 4720e: 7a1b moveq #27,%d5 47210: 322a 0004 movew %a2@(4),%d1 47214: 08c0 0010 bset #16,%d0
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
47218: 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(
4721c: eba9 lsll %d5,%d1
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;
4721e: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
47222: 254c 002e movel %a4,%a2@(46)
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47226: 8081 orl %d1,%d0 47228: 2209 movel %a1,%d1 4722a: 8280 orl %d0,%d1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
4722c: 254d 002a movel %a5,%a2@(42)
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47230: 2541 000a movel %d1,%a2@(10)
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
47234: 2547 0018 movel %d7,%a2@(24)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
47238: 46c4 movew %d4,%sr
if ( old_tables )
4723a: 4a88 tstl %a0
4723c: 670a beqs 47248 <_Objects_Extend_information+0x158>
_Workspace_Free( old_tables );
4723e: 2f08 movel %a0,%sp@- 47240: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47246: 588f addql #4,%sp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47248: 206a 002e moveal %a2@(46),%a0
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
4724c: 4280 clrl %d0 4724e: 280e movel %fp,%d4 47250: 0684 ffff fff4 addil #-12,%d4 47256: 47f9 0004 b07c lea 4b07c <_Chain_Get>,%a3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
4725c: 2a0a movel %a2,%d5 4725e: 0685 0000 001c addil #28,%d5 47264: 49f9 0004 673c lea 4673c <_Chain_Append>,%a4
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
4726a: e58a lsll #2,%d2
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
4726c: 302a 0012 movew %a2@(18),%d0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47270: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47274: 2f2a 0014 movel %a2@(20),%sp@- 47278: 2f00 movel %d0,%sp@- 4727a: 2f06 movel %d6,%sp@- 4727c: 2f04 movel %d4,%sp@- 4727e: 4eb9 0004 b0b8 jsr 4b0b8 <_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 ) {
47284: 4fef 0010 lea %sp@(16),%sp 47288: 2f04 movel %d4,%sp@- 4728a: 4e93 jsr %a3@ 4728c: 588f addql #4,%sp 4728e: 4a80 tstl %d0
47290: 6732 beqs 472c4 <_Objects_Extend_information+0x1d4><== NEVER TAKEN
the_object->id = _Objects_Build_id(
47292: 2212 movel %a2@,%d1 47294: 7c18 moveq #24,%d6 47296: 7e1b moveq #27,%d7 47298: 2040 moveal %d0,%a0 4729a: eda9 lsll %d6,%d1 4729c: 4286 clrl %d6 4729e: 3c2a 0004 movew %a2@(4),%d6 472a2: 08c1 0010 bset #16,%d1 472a6: efae lsll %d7,%d6 472a8: 8286 orl %d6,%d1 472aa: 8283 orl %d3,%d1
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
472ac: 5283 addql #1,%d3
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
472ae: 2141 0008 movel %d1,%a0@(8)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
472b2: 2f00 movel %d0,%sp@- 472b4: 2f05 movel %d5,%sp@- 472b6: 4e94 jsr %a4@
index++;
472b8: 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 ) {
472ba: 2f04 movel %d4,%sp@- 472bc: 4e93 jsr %a3@ 472be: 588f addql #4,%sp 472c0: 4a80 tstl %d0
472c2: 66ce bnes 47292 <_Objects_Extend_information+0x1a2>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
472c4: 4280 clrl %d0
information->inactive =
472c6: 322a 0028 movew %a2@(40),%d1 472ca: 326a 0012 moveaw %a2@(18),%a1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
472ce: 206a 002a moveal %a2@(42),%a0
information->inactive =
472d2: d289 addl %a1,%d1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
472d4: 3009 movew %a1,%d0
information->inactive =
472d6: 3541 0028 movew %d1,%a2@(40)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
472da: 2180 2800 movel %d0,%a0@(00000000,%d2:l)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
472de: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 472e4: 4e5e unlk %fp 472e6: 4e75 rts
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
472e8: 2f00 movel %d0,%sp@- 472ea: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error> 472f0: 588f addql #4,%sp 472f2: 2c00 movel %d0,%d6 472f4: 6000 fe84 braw 4717a <_Objects_Extend_information+0x8a>
/*
* 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,
472f8: e58c lsll #2,%d4 472fa: 2f04 movel %d4,%sp@- 472fc: 2f2a 002e movel %a2@(46),%sp@- 47300: 2f0c movel %a4,%sp@- 47302: 4eb9 0004 e088 jsr 4e088 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
47308: 2f04 movel %d4,%sp@- 4730a: 2f2a 002a movel %a2@(42),%sp@- 4730e: 2f0d movel %a5,%sp@- 47310: 4eb9 0004 e088 jsr 4e088 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
47316: 4280 clrl %d0 47318: 302a 000e movew %a2@(14),%d0 4731c: da80 addl %d0,%d5 4731e: e58d lsll #2,%d5 47320: 2f05 movel %d5,%sp@- 47322: 2f2a 0018 movel %a2@(24),%sp@- 47326: 2f07 movel %d7,%sp@- 47328: 4eb9 0004 e088 jsr 4e088 <memcpy> 4732e: 4fef 0024 lea %sp@(36),%sp 47332: 6000 fe9c braw 471d0 <_Objects_Extend_information+0xe0>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47336: 4280 clrl %d0 47338: 2605 movel %d5,%d3 4733a: 4282 clrl %d2 4733c: 4284 clrl %d4 4733e: 322a 000e movew %a2@(14),%d1 47342: 302a 0012 movew %a2@(18),%d0 47346: 6000 fdfe braw 47146 <_Objects_Extend_information+0x56>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
4734a: 2605 movel %d5,%d3 <== NOT EXECUTED 4734c: 4282 clrl %d2 <== NOT EXECUTED 4734e: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47354: 6000 fdf0 braw 47146 <_Objects_Extend_information+0x56><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
47358: 2f06 movel %d6,%sp@- 4735a: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free>
return;
47360: 588f addql #4,%sp
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47362: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
47368: 4e5e unlk %fp <== NOT EXECUTED
0004741c <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
4741c: 4e56 0000 linkw %fp,#0 47420: 2f02 movel %d2,%sp@- 47422: 242e 000c movel %fp@(12),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
47426: 660a bnes 47432 <_Objects_Get_information+0x16>
* 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 )
47428: 4280 clrl %d0
return NULL;
#endif
return info;
}
4742a: 242e fffc movel %fp@(-4),%d2 4742e: 4e5e unlk %fp 47430: 4e75 rts
/*
* 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 );
47432: 2f2e 0008 movel %fp@(8),%sp@- 47436: 4eb9 0004 b690 jsr 4b690 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
4743c: 588f addql #4,%sp 4743e: 4a80 tstl %d0
47440: 67e6 beqs 47428 <_Objects_Get_information+0xc>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
47442: b082 cmpl %d2,%d0
47444: 65e2 bcss 47428 <_Objects_Get_information+0xc>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
47446: 202e 0008 movel %fp@(8),%d0 4744a: 41f9 0005 d980 lea 5d980 <_Objects_Information_table>,%a0 47450: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47454: 4a88 tstl %a0
47456: 67d0 beqs 47428 <_Objects_Get_information+0xc> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
47458: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
4745c: 67cc beqs 4742a <_Objects_Get_information+0xe> <== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
4745e: 2040 moveal %d0,%a0 47460: 4a68 000e tstw %a0@(14)
47464: 67c2 beqs 47428 <_Objects_Get_information+0xc>
return NULL;
#endif
return info;
}
47466: 242e fffc movel %fp@(-4),%d2 4746a: 4e5e unlk %fp
...
00048fa4 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
48fa4: 4e56 ffe0 linkw %fp,#-32 48fa8: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48fac: 262e 000c movel %fp@(12),%d3 48fb0: 242e 0010 movel %fp@(16),%d2
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
48fb4: 4a83 tstl %d3
48fb6: 660e bnes 48fc6 <_Objects_Get_name_as_string+0x22>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
48fb8: 4282 clrl %d2
} return NULL; /* unreachable path */ }
48fba: 2002 movel %d2,%d0 48fbc: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48fc2: 4e5e unlk %fp 48fc4: 4e75 rts
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
48fc6: 4a82 tstl %d2
48fc8: 67f0 beqs 48fba <_Objects_Get_name_as_string+0x16>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
48fca: 4aae 0008 tstl %fp@(8) 48fce: 6700 00a8 beqw 49078 <_Objects_Get_name_as_string+0xd4> 48fd2: 282e 0008 movel %fp@(8),%d4
information = _Objects_Get_information_id( tmpId );
48fd6: 2f04 movel %d4,%sp@- 48fd8: 4eb9 0004 8ec4 jsr 48ec4 <_Objects_Get_information_id>
if ( !information )
48fde: 588f addql #4,%sp 48fe0: 4a80 tstl %d0
48fe2: 67d4 beqs 48fb8 <_Objects_Get_name_as_string+0x14><== NEVER TAKEN
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
48fe4: 486e fffc pea %fp@(-4) 48fe8: 2f04 movel %d4,%sp@- 48fea: 2f00 movel %d0,%sp@- 48fec: 4eb9 0004 9094 jsr 49094 <_Objects_Get>
switch ( location ) {
48ff2: 4fef 000c lea %sp@(12),%sp 48ff6: 4aae fffc tstl %fp@(-4)
48ffa: 66bc bnes 48fb8 <_Objects_Get_name_as_string+0x14><== NEVER TAKEN
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
48ffc: 2040 moveal %d0,%a0
lname[ 0 ] = (u32_name >> 24) & 0xff;
48ffe: 7818 moveq #24,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49000: 5383 subql #1,%d3
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49002: 2028 000c movel %a0@(12),%d0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49006: 2200 movel %d0,%d1 49008: e8a9 lsrl %d4,%d1
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
4900a: 2a00 movel %d0,%d5
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
4900c: 2800 movel %d0,%d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
4900e: e08d lsrl #8,%d5
lname[ 3 ] = (u32_name >> 0) & 0xff;
49010: 1d40 fffa moveb %d0,%fp@(-6)
lname[ 4 ] = '\0';
49014: 4200 clrb %d0
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49016: 4244 clrw %d4 49018: 4844 swap %d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
4901a: 1d45 fff9 moveb %d5,%fp@(-7)
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
4901e: 1d40 fffb moveb %d0,%fp@(-5)
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49022: 1d44 fff8 moveb %d4,%fp@(-8)
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
49026: 1d41 fff7 moveb %d1,%fp@(-9) 4902a: 1001 moveb %d1,%d0
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
4902c: 4a83 tstl %d3
4902e: 6756 beqs 49086 <_Objects_Get_name_as_string+0xe2><== NEVER TAKEN
49030: 4a01 tstb %d1
49032: 6752 beqs 49086 <_Objects_Get_name_as_string+0xe2>
49034: 2042 moveal %d2,%a0 49036: 4281 clrl %d1 49038: 45ee fff7 lea %fp@(-9),%a2
*d = (isprint((unsigned char)*s)) ? *s : '*';
4903c: 4284 clrl %d4 4903e: 1800 moveb %d0,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49040: 5281 addql #1,%d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49042: 2279 0005 ebc8 moveal 5ebc8 <__ctype_ptr__>,%a1 49048: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 4904c: 49c4 extbl %d4 4904e: 0284 0000 0097 andil #151,%d4
49054: 6602 bnes 49058 <_Objects_Get_name_as_string+0xb4>
49056: 702a moveq #42,%d0 49058: 10c0 moveb %d0,%a0@+
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
4905a: b681 cmpl %d1,%d3
4905c: 6306 blss 49064 <_Objects_Get_name_as_string+0xc0>
4905e: 1032 1800 moveb %a2@(00000000,%d1:l),%d0
49062: 66d8 bnes 4903c <_Objects_Get_name_as_string+0x98>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49064: 4210 clrb %a0@
_Thread_Enable_dispatch();
49066: 4eb9 0004 9880 jsr 49880 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
4906c: 2002 movel %d2,%d0 4906e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49074: 4e5e unlk %fp 49076: 4e75 rts
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49078: 2079 0006 8072 moveal 68072 <_Thread_Executing>,%a0 4907e: 2828 0008 movel %a0@(8),%d4 49082: 6000 ff52 braw 48fd6 <_Objects_Get_name_as_string+0x32>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49086: 2042 moveal %d2,%a0
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49088: 4210 clrb %a0@
_Thread_Enable_dispatch();
4908a: 4eb9 0004 9880 jsr 49880 <_Thread_Enable_dispatch> 49090: 60da bras 4906c <_Objects_Get_name_as_string+0xc8>
...
0005b838 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
5b838: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
5b83a: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5b83c: 4e56 0000 linkw %fp,#0 5b840: 206e 0008 moveal %fp@(8),%a0
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
5b844: 90a8 0006 subl %a0@(6),%d0 5b848: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
5b84c: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5b850: 226e 0010 moveal %fp@(16),%a1
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
if ( information->maximum >= index ) {
5b854: b280 cmpl %d0,%d1
5b856: 6510 bcss 5b868 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
5b858: 2068 0018 moveal %a0@(24),%a0 5b85c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
5b860: 6706 beqs 5b868 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
5b862: 4291 clrl %a1@
* This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; }
5b864: 4e5e unlk %fp 5b866: 4e75 rts
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5b868: 7001 moveq #1,%d0
return NULL; }
5b86a: 4e5e unlk %fp
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5b86c: 2280 movel %d0,%a1@ 5b86e: 4280 clrl %d0
return NULL;
}
...
00048c70 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
48c70: 4e56 fffc linkw %fp,#-4 48c74: 222e 0008 movel %fp@(8),%d1 48c78: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
48c7a: 4a81 tstl %d1
48c7c: 660a bnes 48c88 <_Objects_Id_to_name+0x18>
48c7e: 2079 0005 f79a moveal 5f79a <_Thread_Executing>,%a0 48c84: 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);
48c88: 7418 moveq #24,%d2 48c8a: 2001 movel %d1,%d0 48c8c: e4a8 lsrl %d2,%d0 48c8e: 143c 0007 moveb #7,%d2 48c92: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
48c94: 143c 0003 moveb #3,%d2 48c98: 2040 moveal %d0,%a0 48c9a: 5388 subql #1,%a0 48c9c: b488 cmpl %a0,%d2
48c9e: 654a bcss 48cea <_Objects_Id_to_name+0x7a>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
48ca0: 41f9 0005 f698 lea 5f698 <_Objects_Information_table>,%a0 48ca6: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 48caa: 4a88 tstl %a0
48cac: 673c beqs 48cea <_Objects_Id_to_name+0x7a>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
48cae: 2001 movel %d1,%d0 48cb0: 741b moveq #27,%d2 48cb2: e4a8 lsrl %d2,%d0 48cb4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
if ( !information )
48cb8: 6730 beqs 48cea <_Objects_Id_to_name+0x7a> <== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
48cba: 486e fffc pea %fp@(-4) 48cbe: 2f01 movel %d1,%sp@- 48cc0: 2f00 movel %d0,%sp@- 48cc2: 4eb9 0004 8c04 jsr 48c04 <_Objects_Get>
if ( !the_object )
48cc8: 4fef 000c lea %sp@(12),%sp 48ccc: 4a80 tstl %d0
48cce: 671a beqs 48cea <_Objects_Id_to_name+0x7a>
return OBJECTS_INVALID_ID;
*name = the_object->name;
48cd0: 206e 000c moveal %fp@(12),%a0 48cd4: 2240 moveal %d0,%a1 48cd6: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
48cda: 4eb9 0004 94f4 jsr 494f4 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
48ce0: 242e fff8 movel %fp@(-8),%d2
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
48ce4: 4280 clrl %d0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
48ce6: 4e5e unlk %fp 48ce8: 4e75 rts 48cea: 242e fff8 movel %fp@(-8),%d2
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
48cee: 7003 moveq #3,%d0
}
48cf0: 4e5e unlk %fp <== NOT EXECUTED
0004753c <_Objects_Initialize_information>:
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
4753c: 41f9 0005 d980 lea 5d980 <_Objects_Information_table>,%a0
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
47542: 4e56 fff0 linkw %fp,#-16 47546: 202e 000c movel %fp@(12),%d0
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
4754a: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
4754e: 48d7 003c moveml %d2-%d5,%sp@ 47552: 222e 0014 movel %fp@(20),%d1 47556: 4285 clrl %d5
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
47558: 2601 movel %d1,%d3
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
4755a: 206e 0008 moveal %fp@(8),%a0
information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0;
4755e: 4244 clrw %d4
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
47560: 3a2e 001a movew %fp@(26),%d5 47564: 242e 0010 movel %fp@(16),%d2
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
47568: d683 addl %d3,%d3 4756a: 9783 subxl %d3,%d3 4756c: 4483 negl %d3
information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0;
4756e: 3144 0028 movew %d4,%a0@(40)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
47572: 3144 000e movew %d4,%a0@(14)
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
47576: 282e 0020 movel %fp@(32),%d4
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
4757a: 3142 0004 movew %d2,%a0@(4)
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
4757e: 1143 0010 moveb %d3,%a0@(16)
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
47582: 2145 0014 movel %d5,%a0@(20)
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
47586: 2388 2c00 movel %a0,%a1@(00000000,%d2:l:4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
4758a: 0881 001f bclr #31,%d1
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
4758e: 2080 movel %d0,%a0@
information->the_class = the_class; information->size = size; information->local_table = 0;
47590: 42a8 0018 clrl %a0@(24)
information->inactive_per_block = 0;
47594: 42a8 002a clrl %a0@(42)
information->object_blocks = 0;
47598: 42a8 002e clrl %a0@(46)
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
4759c: 4a03 tstb %d3
4759e: 6706 beqs 475a6 <_Objects_Initialize_information+0x6a>
475a0: 4a81 tstl %d1 475a2: 6700 0092 beqw 47636 <_Objects_Initialize_information+0xfa>
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
475a6: 7a18 moveq #24,%d5 475a8: 4a81 tstl %d1 475aa: 56c3 sne %d3 475ac: eba8 lsll %d5,%d0 475ae: 1a3c 001b moveb #27,%d5 475b2: 49c3 extbl %d3 475b4: 4483 negl %d3
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
475b6: 43f9 0005 d16c lea 5d16c <null_local_table.3444>,%a1
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
475bc: ebaa lsll %d5,%d2 475be: 08c0 0010 bset #16,%d0
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
475c2: 1a3c 0003 moveb #3,%d5
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
475c6: 8082 orl %d2,%d0
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
475c8: ca84 andl %d4,%d5
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
475ca: 3141 0012 movew %d1,%a0@(18)
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
475ce: 8083 orl %d3,%d0
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
475d0: 2149 0018 movel %a1,%a0@(24)
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
475d4: 2140 0006 movel %d0,%a0@(6)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
475d8: 4a85 tstl %d5
475da: 6626 bnes 47602 <_Objects_Initialize_information+0xc6><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
475dc: 43e8 0020 lea %a0@(32),%a1 475e0: 2149 001c movel %a1,%a0@(28)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
475e4: 43e8 001c lea %a0@(28),%a1
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
475e8: 3144 0032 movew %d4,%a0@(50)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
475ec: 42a8 0020 clrl %a0@(32)
the_chain->last = _Chain_Head(the_chain);
475f0: 2149 0024 movel %a1,%a0@(36)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
475f4: 4a81 tstl %d1
475f6: 662c bnes 47624 <_Objects_Initialize_information+0xe8>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
475f8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 475fe: 4e5e unlk %fp 47600: 4e75 rts
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
47602: 5884 addql #4,%d4 <== NOT EXECUTED 47604: 70fc moveq #-4,%d0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
47606: 43e8 0020 lea %a0@(32),%a1 <== NOT EXECUTED 4760a: c880 andl %d0,%d4 <== NOT EXECUTED 4760c: 2149 001c movel %a1,%a0@(28) <== NOT EXECUTED
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
47610: 43e8 001c lea %a0@(28),%a1 <== NOT EXECUTED
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
47614: 3144 0032 movew %d4,%a0@(50) <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
47618: 42a8 0020 clrl %a0@(32) <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
4761c: 2149 0024 movel %a1,%a0@(36) <== NOT EXECUTED
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
47620: 4a81 tstl %d1 <== NOT EXECUTED 47622: 67d4 beqs 475f8 <_Objects_Initialize_information+0xbc><== NOT EXECUTED
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
47624: 2d48 0008 movel %a0,%fp@(8)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
47628: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4762e: 4e5e unlk %fp
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
47630: 4ef9 0004 70f0 jmp 470f0 <_Objects_Extend_information>
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
47636: 4878 0014 pea 14 <OPER2> 4763a: 4878 0001 pea 1 <ADD> 4763e: 42a7 clrl %sp@- 47640: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred>
...
000476d8 <_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) /
476d8: 4281 clrl %d1
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
476da: 4e56 ffec linkw %fp,#-20 476de: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 476e2: 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 );
476e6: 4283 clrl %d3
block_count = (information->maximum - index_base) /
476e8: 4284 clrl %d4
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
476ea: 362a 0008 movew %a2@(8),%d3
block_count = (information->maximum - index_base) /
476ee: 382a 000e movew %a2@(14),%d4 476f2: 322a 0012 movew %a2@(18),%d1 476f6: 9883 subl %d3,%d4 476f8: 4c41 4004 remul %d1,%d4,%d4
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
476fc: 672c beqs 4772a <_Objects_Shrink_information+0x52><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
476fe: 226a 002a moveal %a2@(42),%a1 47702: b291 cmpl %a1@,%d1
47704: 672e beqs 47734 <_Objects_Shrink_information+0x5c><== NEVER TAKEN
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
47706: 7404 moveq #4,%d2 47708: 4280 clrl %d0
}
index_base += information->allocation_size;
4770a: 2042 moveal %d2,%a0 4770c: d681 addl %d1,%d3 4770e: 5888 addql #4,%a0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
47710: 5280 addql #1,%d0 47712: b084 cmpl %d4,%d0
47714: 6414 bccs 4772a <_Objects_Shrink_information+0x52><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
47716: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1
4771a: 671a beqs 47736 <_Objects_Shrink_information+0x5e>
4771c: 2408 movel %a0,%d2
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
4771e: 2042 moveal %d2,%a0 47720: d681 addl %d1,%d3 47722: 5888 addql #4,%a0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
47724: 5280 addql #1,%d0 47726: b084 cmpl %d4,%d0
47728: 65ec bcss 47716 <_Objects_Shrink_information+0x3e>
return;
}
index_base += information->allocation_size;
}
}
4772a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47730: 4e5e unlk %fp 47732: 4e75 rts
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
47734: 4282 clrl %d2 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
47736: 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 );
4773a: 47f9 0004 b054 lea 4b054 <_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 );
47740: 4280 clrl %d0 47742: 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;
47746: 2810 movel %a0@,%d4
if ((index >= index_base) &&
47748: b680 cmpl %d0,%d3
4774a: 620c bhis 47758 <_Objects_Shrink_information+0x80>
(index < (index_base + information->allocation_size))) {
4774c: 4281 clrl %d1 4774e: 322a 0012 movew %a2@(18),%d1 47752: d283 addl %d3,%d1 47754: b280 cmpl %d0,%d1
47756: 623e bhis 47796 <_Objects_Shrink_information+0xbe>
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
47758: 2044 moveal %d4,%a0 4775a: 4a84 tstl %d4
4775c: 66e2 bnes 47740 <_Objects_Shrink_information+0x68>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
4775e: 206a 002e moveal %a2@(46),%a0 47762: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 47766: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
4776c: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
47770: 588f addql #4,%sp
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
47772: 302a 0028 movew %a2@(40),%d0 47776: 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;
4777a: 226a 002a moveal %a2@(42),%a1
information->inactive -= information->allocation_size;
4777e: 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;
information->inactive_per_block[ block ] = 0;
47780: 42b1 2800 clrl %a1@(00000000,%d2:l)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
47784: 42b0 2800 clrl %a0@(00000000,%d2:l)
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
47788: 3540 0028 movew %d0,%a2@(40)
return;
}
index_base += information->allocation_size;
}
}
4778c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47792: 4e5e unlk %fp 47794: 4e75 rts
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
47796: 2f08 movel %a0,%sp@- 47798: 4e93 jsr %a3@ 4779a: 588f addql #4,%sp
}
}
while ( the_object );
4779c: 2044 moveal %d4,%a0 4779e: 4a84 tstl %d4
477a0: 669e bnes 47740 <_Objects_Shrink_information+0x68>
477a2: 60ba bras 4775e <_Objects_Shrink_information+0x86>
0004aede <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
4aede: 4e56 0000 linkw %fp,#0 4aee2: 2f0a movel %a2,%sp@- 4aee4: 246e 000c moveal %fp@(12),%a2
/* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() )
4aee8: 4a39 0005 c264 tstb 5c264 <Configuration_RTEMS_API+0x4>
4aeee: 665c bnes 4af4c <_RTEMS_tasks_Create_extension+0x6e>
4aef0: 701e moveq #30,%d0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4aef2: 2f00 movel %d0,%sp@- 4aef4: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
if ( !api )
4aefa: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4aefc: 2040 moveal %d0,%a0
if ( !api )
4aefe: 4a80 tstl %d0
4af00: 675c beqs 4af5e <_RTEMS_tasks_Create_extension+0x80><== NEVER TAKEN
created->API_Extensions[ THREAD_API_RTEMS ] = api;
api->pending_events = EVENT_SETS_NONE_PENDING;
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
4af02: 42aa 0118 clrl %a2@(280)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
4af06: 4200 clrb %d0
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
4af08: 2548 0108 movel %a0,%a2@(264) 4af0c: 1140 0008 moveb %d0,%a0@(8)
api->pending_events = EVENT_SETS_NONE_PENDING;
4af10: 4290 clrl %a0@
api->event_condition = 0;
4af12: 42a8 0004 clrl %a0@(4)
information->handler = NULL;
4af16: 42a8 000a clrl %a0@(10)
information->mode_set = RTEMS_DEFAULT_MODES;
4af1a: 42a8 000e clrl %a0@(14)
information->signals_posted = 0;
4af1e: 42a8 0012 clrl %a0@(18)
information->signals_pending = 0;
4af22: 42a8 0016 clrl %a0@(22)
information->nest_level = 0;
4af26: 42a8 001a clrl %a0@(26)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
4af2a: 4a39 0005 c264 tstb 5c264 <Configuration_RTEMS_API+0x4>
4af30: 6710 beqs 4af42 <_RTEMS_tasks_Create_extension+0x64>
4af32: 41e8 001e lea %a0@(30),%a0 4af36: 4280 clrl %d0
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
4af38: 4298 clrl %a0@+
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
4af3a: 5280 addql #1,%d0 4af3c: 7210 moveq #16,%d1 4af3e: b280 cmpl %d0,%d1
4af40: 66f6 bnes 4af38 <_RTEMS_tasks_Create_extension+0x5a>
api->Notepads[i] = 0;
}
return true;
}
4af42: 246e fffc moveal %fp@(-4),%a2 4af46: 4e5e unlk %fp
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
4af48: 7001 moveq #1,%d0
api->Notepads[i] = 0;
}
return true;
}
4af4a: 4e75 rts
/* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() )
4af4c: 705e moveq #94,%d0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4af4e: 2f00 movel %d0,%sp@- 4af50: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
if ( !api )
4af56: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4af58: 2040 moveal %d0,%a0
if ( !api )
4af5a: 4a80 tstl %d0
4af5c: 66a4 bnes 4af02 <_RTEMS_tasks_Create_extension+0x24>
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
4af5e: 246e fffc moveal %fp@(-4),%a2 4af62: 4e5e unlk %fp
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
4af64: 4200 clrb %d0 <== NOT EXECUTED
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
00046150 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
46150: 4e56 ffe4 linkw %fp,#-28 46154: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
46158: 2479 0005 c28a moveal 5c28a <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
4615e: 2639 0005 c286 movel 5c286 <Configuration_RTEMS_API+0x26>,%d3
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
46164: 4a8a tstl %a2
46166: 6754 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46168: 4a83 tstl %d3
4616a: 6750 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN
4616c: 280e movel %fp,%d4 4616e: 4282 clrl %d2 46170: 5984 subql #4,%d4 46172: 47f9 0004 5f24 lea 45f24 <rtems_task_create>,%a3
&id
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46178: 49f9 0004 61d8 lea 461d8 <rtems_task_start>,%a4
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
4617e: 2f04 movel %d4,%sp@- 46180: 2f2a 000c movel %a2@(12),%sp@- 46184: 2f2a 0014 movel %a2@(20),%sp@- 46188: 2f2a 0004 movel %a2@(4),%sp@- 4618c: 2f2a 0008 movel %a2@(8),%sp@- 46190: 2f12 movel %a2@,%sp@- 46192: 4e93 jsr %a3@
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
46194: 4fef 0018 lea %sp@(24),%sp 46198: 4a80 tstl %d0
4619a: 662a bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
4619c: 2f2a 0018 movel %a2@(24),%sp@- 461a0: 2f2a 0010 movel %a2@(16),%sp@- 461a4: 2f2e fffc movel %fp@(-4),%sp@- 461a8: 4e94 jsr %a4@
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
461aa: 4fef 000c lea %sp@(12),%sp 461ae: 4a80 tstl %d0
461b0: 6614 bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
461b2: 5282 addql #1,%d2 461b4: 45ea 001c lea %a2@(28),%a2 461b8: b483 cmpl %d3,%d2
461ba: 65c2 bcss 4617e <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
461bc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 461c2: 4e5e unlk %fp 461c4: 4e75 rts
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
461c6: 2f00 movel %d0,%sp@- 461c8: 4878 0001 pea 1 <ADD> 461cc: 4878 0001 pea 1 <ADD> 461d0: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred>
...
0004ae1a <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4ae1a: 4e56 ffec linkw %fp,#-20 4ae1e: 206e 0008 moveal %fp@(8),%a0 4ae22: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4ae26: 2468 0108 moveal %a0@(264),%a2
if ( !api )
4ae2a: 4a8a tstl %a2
4ae2c: 671a beqs 4ae48 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4ae2e: 203c 0000 0700 movel #1792,%d0 4ae34: 40c1 movew %sr,%d1 4ae36: 8081 orl %d1,%d0 4ae38: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
4ae3a: 242a 0012 movel %a2@(18),%d2
asr->signals_posted = 0;
4ae3e: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
4ae42: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4ae44: 4a82 tstl %d2
4ae46: 660a bnes 4ae52 <_RTEMS_tasks_Post_switch_extension+0x38><== ALWAYS TAKEN
(*asr->handler)( signal_set );
asr->nest_level -= 1;
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
}
4ae48: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4ae4e: 4e5e unlk %fp <== NOT EXECUTED 4ae50: 4e75 rts <== NOT EXECUTED
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4ae52: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4ae56: 260e movel %fp,%d3 4ae58: 5983 subql #4,%d3 4ae5a: 47f9 0004 cd88 lea 4cd88 <rtems_task_mode>,%a3 4ae60: 2f03 movel %d3,%sp@- 4ae62: 2f3c 0000 ffff movel #65535,%sp@- 4ae68: 2f2a 000e movel %a2@(14),%sp@- 4ae6c: 4e93 jsr %a3@
(*asr->handler)( signal_set );
4ae6e: 2f02 movel %d2,%sp@- 4ae70: 206a 000a moveal %a2@(10),%a0 4ae74: 4e90 jsr %a0@
asr->nest_level -= 1;
4ae76: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4ae7a: 2f03 movel %d3,%sp@- 4ae7c: 2f3c 0000 ffff movel #65535,%sp@- 4ae82: 2f2e fffc movel %fp@(-4),%sp@- 4ae86: 4e93 jsr %a3@ 4ae88: 4fef 001c lea %sp@(28),%sp
}
4ae8c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4ae92: 4e5e unlk %fp <== NOT EXECUTED
0004ad76 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
4ad76: 4e56 0000 linkw %fp,#0 4ad7a: 206e 0008 moveal %fp@(8),%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
4ad7e: 2068 0118 moveal %a0@(280),%a0
while (tvp) {
4ad82: 4a88 tstl %a0
4ad84: 6712 beqs 4ad98 <_RTEMS_tasks_Switch_extension+0x22>
tvp->tval = *tvp->ptr;
4ad86: 2268 0004 moveal %a0@(4),%a1 4ad8a: 2151 000c movel %a1@,%a0@(12)
*tvp->ptr = tvp->gval;
4ad8e: 22a8 0008 movel %a0@(8),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4ad92: 2050 moveal %a0@,%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
4ad94: 4a88 tstl %a0
4ad96: 66ee bnes 4ad86 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
4ad98: 206e 000c moveal %fp@(12),%a0 4ad9c: 2068 0118 moveal %a0@(280),%a0
while (tvp) {
4ada0: 4a88 tstl %a0
4ada2: 6712 beqs 4adb6 <_RTEMS_tasks_Switch_extension+0x40>
tvp->gval = *tvp->ptr;
4ada4: 2268 0004 moveal %a0@(4),%a1 4ada8: 2151 0008 movel %a1@,%a0@(8)
*tvp->ptr = tvp->tval;
4adac: 22a8 000c movel %a0@(12),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4adb0: 2050 moveal %a0@,%a0
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
4adb2: 4a88 tstl %a0
4adb4: 66ee bnes 4ada4 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
4adb6: 4e5e unlk %fp <== NOT EXECUTED
00047224 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
47224: 4e56 fffc linkw %fp,#-4 47228: 2f0a movel %a2,%sp@- 4722a: 486e fffc pea %fp@(-4) 4722e: 2f2e 0008 movel %fp@(8),%sp@- 47232: 4879 0005 fa14 pea 5fa14 <_Rate_monotonic_Information> 47238: 4eb9 0004 9008 jsr 49008 <_Objects_Get>
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
4723e: 4fef 000c lea %sp@(12),%sp 47242: 2440 moveal %d0,%a2 47244: 4aae fffc tstl %fp@(-4)
47248: 6636 bnes 47280 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
4724a: 206a 0040 moveal %a2@(64),%a0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
4724e: 2028 0010 movel %a0@(16),%d0 47252: 0280 0000 4000 andil #16384,%d0
47258: 670a beqs 47264 <_Rate_monotonic_Timeout+0x40>
the_thread->Wait.id == the_period->Object.id ) {
4725a: 202a 0008 movel %a2@(8),%d0 4725e: b0a8 0020 cmpl %a0@(32),%d0
47262: 675e beqs 472c2 <_Rate_monotonic_Timeout+0x9e>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
47264: 7001 moveq #1,%d0 47266: b0aa 0038 cmpl %a2@(56),%d0
4726a: 671c beqs 47288 <_Rate_monotonic_Timeout+0x64>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
4726c: 7004 moveq #4,%d0 4726e: 2540 0038 movel %d0,%a2@(56)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47272: 2039 0005 fb10 movel 5fb10 <_Thread_Dispatch_disable_level>,%d0 47278: 5380 subql #1,%d0 4727a: 23c0 0005 fb10 movel %d0,5fb10 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
47280: 246e fff8 moveal %fp@(-8),%a2 47284: 4e5e unlk %fp 47286: 4e75 rts
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
47288: 103c 0003 moveb #3,%d0 4728c: 2540 0038 movel %d0,%a2@(56)
_Rate_monotonic_Initiate_statistics( the_period );
47290: 2f0a movel %a2,%sp@- 47292: 4eb9 0004 6b78 jsr 46b78 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47298: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4729e: 486a 0010 pea %a2@(16) 472a2: 4879 0005 fbe8 pea 5fbe8 <_Watchdog_Ticks_chain> 472a8: 4eb9 0004 aa7c jsr 4aa7c <_Watchdog_Insert> 472ae: 4fef 000c lea %sp@(12),%sp 472b2: 2039 0005 fb10 movel 5fb10 <_Thread_Dispatch_disable_level>,%d0 472b8: 5380 subql #1,%d0 472ba: 23c0 0005 fb10 movel %d0,5fb10 <_Thread_Dispatch_disable_level> 472c0: 60be bras 47280 <_Rate_monotonic_Timeout+0x5c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
472c2: 2f3c 1003 fff8 movel #268697592,%sp@- 472c8: 2f08 movel %a0,%sp@- 472ca: 4eb9 0004 94a0 jsr 494a0 <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
472d0: 2f0a movel %a2,%sp@- 472d2: 4eb9 0004 6b78 jsr 46b78 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
472d8: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
472de: 486a 0010 pea %a2@(16) 472e2: 4879 0005 fbe8 pea 5fbe8 <_Watchdog_Ticks_chain> 472e8: 4eb9 0004 aa7c jsr 4aa7c <_Watchdog_Insert>
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
472ee: 4fef 0014 lea %sp@(20),%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
472f2: 2039 0005 fb10 movel 5fb10 <_Thread_Dispatch_disable_level>,%d0 472f8: 5380 subql #1,%d0 472fa: 23c0 0005 fb10 movel %d0,5fb10 <_Thread_Dispatch_disable_level> 47300: 6000 ff7e braw 47280 <_Rate_monotonic_Timeout+0x5c>
0004856c <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
4856c: 4e56 0000 linkw %fp,#0 48570: 2039 0006 7fb8 movel 67fb8 <_Thread_Dispatch_disable_level>,%d0 48576: 5280 addql #1,%d0 48578: 2f0a movel %a2,%sp@- 4857a: 246e 0008 moveal %fp@(8),%a2 4857e: 23c0 0006 7fb8 movel %d0,67fb8 <_Thread_Dispatch_disable_level>
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
48584: 2039 0006 804a movel 6804a <_TOD_Now>,%d0
if ( time->tv_sec < seconds )
4858a: 2212 movel %a2@,%d1 4858c: b280 cmpl %d0,%d1
4858e: 6d38 blts 485c8 <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
48590: 9280 subl %d0,%d1 48592: 2f01 movel %d1,%sp@- 48594: 42a7 clrl %sp@- 48596: 4879 0006 8084 pea 68084 <_Watchdog_Seconds_chain> 4859c: 4eb9 0004 ab6c jsr 4ab6c <_Watchdog_Adjust>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
485a2: 23d2 0006 804a movel %a2@,6804a <_TOD_Now> 485a8: 588a addql #4,%a2 485aa: 4fef 000c lea %sp@(12),%sp 485ae: 23d2 0006 804e movel %a2@,6804e <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
485b4: 246e fffc moveal %fp@(-4),%a2 485b8: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
485ba: 7001 moveq #1,%d0 485bc: 13c0 0006 7fcc moveb %d0,67fcc <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
485c2: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch> 485c8: 9081 subl %d1,%d0 485ca: 2f00 movel %d0,%sp@- 485cc: 4878 0001 pea 1 <ADD> 485d0: 4879 0006 8084 pea 68084 <_Watchdog_Seconds_chain> 485d6: 4eb9 0004 ab6c jsr 4ab6c <_Watchdog_Adjust>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
485dc: 23d2 0006 804a movel %a2@,6804a <_TOD_Now> 485e2: 588a addql #4,%a2 485e4: 4fef 000c lea %sp@(12),%sp 485e8: 23d2 0006 804e movel %a2@,6804e <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
485ee: 246e fffc moveal %fp@(-4),%a2 485f2: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
485f4: 7001 moveq #1,%d0 485f6: 13c0 0006 7fcc moveb %d0,67fcc <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
485fc: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch>
...
00046b90 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
46b90: 4e56 ffec linkw %fp,#-20
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
46b94: 2239 0005 c2a0 movel 5c2a0 <Configuration+0xc>,%d1
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
46b9a: 48d7 040c moveml %d2-%d3/%a2,%sp@
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
46b9e: 240e movel %fp,%d2 46ba0: 5182 subql #8,%d2
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
46ba2: 263c 0000 03e8 movel #1000,%d3 46ba8: 4c03 1800 mulsl %d3,%d1
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
46bac: 45f9 0004 8ad4 lea 48ad4 <_Timespec_Add_to>,%a2
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
46bb2: 2039 0005 db08 movel 5db08 <_Watchdog_Ticks_since_boot>,%d0 46bb8: 5280 addql #1,%d0
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
46bba: 2f02 movel %d2,%sp@- 46bbc: 4879 0005 da46 pea 5da46 <_TOD_Uptime>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
46bc2: 2d41 fffc movel %d1,%fp@(-4)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
46bc6: 23c0 0005 db08 movel %d0,5db08 <_Watchdog_Ticks_since_boot>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
46bcc: 42ae fff8 clrl %fp@(-8)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
46bd0: 4e92 jsr %a2@
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
46bd2: 2f02 movel %d2,%sp@- 46bd4: 4879 0005 da5a pea 5da5a <_TOD_Now> 46bda: 4e92 jsr %a2@
while ( seconds ) {
46bdc: 4fef 0010 lea %sp@(16),%sp
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
46be0: 2400 movel %d0,%d2
while ( seconds ) {
46be2: 6716 beqs 46bfa <_TOD_Tickle_ticks+0x6a>
46be4: 45f9 0004 9004 lea 49004 <_Watchdog_Tickle>,%a2
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
46bea: 4879 0005 da94 pea 5da94 <_Watchdog_Seconds_chain>
_Watchdog_Tickle_seconds();
seconds--;
46bf0: 5382 subql #1,%d2 46bf2: 4e92 jsr %a2@
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
46bf4: 588f addql #4,%sp 46bf6: 4a82 tstl %d2
46bf8: 66f0 bnes 46bea <_TOD_Tickle_ticks+0x5a> <== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
46bfa: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
46c00: 4e5e unlk %fp <== NOT EXECUTED
00046c3c <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
46c3c: 4e56 0000 linkw %fp,#0 46c40: 206e 0008 moveal %fp@(8),%a0
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
46c44: 2039 0005 ead0 movel 5ead0 <Configuration+0xc>,%d0
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
46c4a: 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) ||
46c4c: 4a88 tstl %a0
46c4e: 6762 beqs 46cb2 <_TOD_Validate+0x76> <== NEVER TAKEN
46c50: 243c 000f 4240 movel #1000000,%d2 46c56: 4c40 2002 remul %d0,%d2,%d2
(the_tod->ticks >= ticks_per_second) ||
46c5a: b4a8 0018 cmpl %a0@(24),%d2
46c5e: 6352 blss 46cb2 <_TOD_Validate+0x76>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
46c60: 703b moveq #59,%d0 46c62: b0a8 0014 cmpl %a0@(20),%d0
46c66: 654a bcss 46cb2 <_TOD_Validate+0x76>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
46c68: b0a8 0010 cmpl %a0@(16),%d0
46c6c: 6544 bcss 46cb2 <_TOD_Validate+0x76>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
46c6e: 7217 moveq #23,%d1 46c70: b2a8 000c cmpl %a0@(12),%d1
46c74: 653c bcss 46cb2 <_TOD_Validate+0x76>
(the_tod->month == 0) ||
46c76: 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) ||
46c7a: 6736 beqs 46cb2 <_TOD_Validate+0x76> <== NEVER TAKEN
46c7c: 740c moveq #12,%d2 46c7e: b480 cmpl %d0,%d2
46c80: 6530 bcss 46cb2 <_TOD_Validate+0x76>
(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) ||
46c82: 2210 movel %a0@,%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) ||
46c84: 0c81 0000 07c3 cmpil #1987,%d1
46c8a: 6326 blss 46cb2 <_TOD_Validate+0x76>
(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) )
46c8c: 2068 0008 moveal %a0@(8),%a0
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) ||
46c90: 4a88 tstl %a0
46c92: 671e beqs 46cb2 <_TOD_Validate+0x76> <== NEVER TAKEN
(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 )
46c94: 143c 0003 moveb #3,%d2 46c98: c282 andl %d2,%d1
46c9a: 661e bnes 46cba <_TOD_Validate+0x7e>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
46c9c: 43f9 0005 da7e lea 5da7e <_TOD_Days_per_month>,%a1 46ca2: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
46ca6: b1c0 cmpal %d0,%a0 46ca8: 53c0 sls %d0 46caa: 4480 negl %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
46cac: 241f movel %sp@+,%d2 46cae: 4e5e unlk %fp 46cb0: 4e75 rts 46cb2: 241f movel %sp@+,%d2 46cb4: 4e5e unlk %fp
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
46cb6: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
46cb8: 4e75 rts
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
46cba: 43f9 0005 da7e lea 5da7e <_TOD_Days_per_month>,%a1 46cc0: 2031 0c00 movel %a1@(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(
46cc4: b1c0 cmpal %d0,%a0 46cc6: 53c0 sls %d0 46cc8: 4480 negl %d0 46cca: 60e0 bras 46cac <_TOD_Validate+0x70>
0004781c <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4781c: 4e56 fff0 linkw %fp,#-16 47820: 48d7 041c moveml %d2-%d4/%a2,%sp@ 47824: 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 );
47828: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4782a: 242e 000c movel %fp@(12),%d2
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
4782e: 262a 0010 movel %a2@(16),%d3
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
47832: 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 );
47836: 4eb9 0004 872c jsr 4872c <_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 )
4783c: 588f addql #4,%sp 4783e: b4aa 0014 cmpl %a2@(20),%d2
47842: 670c beqs 47850 <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
47844: 2f02 movel %d2,%sp@- 47846: 2f0a movel %a2,%sp@- 47848: 4eb9 0004 85a8 jsr 485a8 <_Thread_Set_priority> 4784e: 508f addql #8,%sp
_ISR_Disable( level );
47850: 203c 0000 0700 movel #1792,%d0 47856: 40c1 movew %sr,%d1 47858: 8081 orl %d1,%d0 4785a: 46c0 movew %d0,%sr
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
4785c: 202a 0010 movel %a2@(16),%d0
if ( state != STATES_TRANSIENT ) {
47860: 7404 moveq #4,%d2 47862: b480 cmpl %d0,%d2
47864: 6738 beqs 4789e <_Thread_Change_priority+0x82>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
47866: 44c3 movew %d3,%ccr
47868: 6708 beqs 47872 <_Thread_Change_priority+0x56> <== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
4786a: 74fb moveq #-5,%d2 4786c: c480 andl %d0,%d2 4786e: 2542 0010 movel %d2,%a2@(16)
_ISR_Enable( level );
47872: 46c1 movew %d1,%sr
if ( _States_Is_waiting_on_thread_queue( state ) ) {
47874: 0280 0003 bee0 andil #245472,%d0
4787a: 660a bnes 47886 <_Thread_Change_priority+0x6a>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
4787c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47882: 4e5e unlk %fp 47884: 4e75 rts
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
47886: 2d4a 000c movel %a2,%fp@(12) 4788a: 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 );
}
47890: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47896: 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 );
47898: 4ef9 0004 84fc jmp 484fc <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
4789e: 44c3 movew %d3,%ccr
478a0: 673c beqs 478de <_Thread_Change_priority+0xc2> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
478a2: 206a 008e moveal %a2@(142),%a0 478a6: 302a 0094 movew %a2@(148),%d0 478aa: 3410 movew %a0@,%d2
* 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 );
478ac: 42aa 0010 clrl %a2@(16) 478b0: 8082 orl %d2,%d0 478b2: 3080 movew %d0,%a0@
_Priority_Major_bit_map |= the_priority_map->ready_major;
478b4: 3439 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d2 478ba: 302a 0092 movew %a2@(146),%d0 478be: 8082 orl %d2,%d0 478c0: 33c0 0005 da78 movew %d0,5da78 <_Priority_Major_bit_map>
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
478c6: 4a04 tstb %d4 478c8: 6700 0082 beqw 4794c <_Thread_Change_priority+0x130>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
478cc: 206a 008a moveal %a2@(138),%a0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
478d0: 2250 moveal %a0@,%a1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
478d2: 2548 0004 movel %a0,%a2@(4)
before_node = after_node->next; after_node->next = the_node;
478d6: 208a movel %a2,%a0@
the_node->next = before_node; before_node->previous = the_node;
478d8: 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;
478dc: 2489 movel %a1,%a2@
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
478de: 203c 0000 0700 movel #1792,%d0 478e4: 46c1 movew %d1,%sr 478e6: 8081 orl %d1,%d0 478e8: 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 );
478ea: 3039 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d0 478f0: 4840 swap %d0 478f2: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
478f4: 4282 clrl %d2 478f6: 41f9 0005 dae4 lea 5dae4 <_Priority_Bit_map>,%a0 478fc: 3400 movew %d0,%d2 478fe: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 47902: 4840 swap %d0 47904: 04c0 ff1 %d0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
47906: 4283 clrl %d3 47908: e98a lsll #4,%d2 4790a: 3600 movew %d0,%d3 4790c: 2279 0005 d974 moveal 5d974 <_Thread_Ready_chain>,%a1 47912: 2002 movel %d2,%d0 47914: d083 addl %d3,%d0 47916: 2400 movel %d0,%d2 47918: e58a lsll #2,%d2 4791a: e988 lsll #4,%d0
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
4791c: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
47922: 93c2 subal %d2,%a1 47924: 2031 0800 movel %a1@(00000000,%d0:l),%d0 47928: 23c0 0005 da56 movel %d0,5da56 <_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() &&
4792e: b1c0 cmpal %d0,%a0
47930: 670e beqs 47940 <_Thread_Change_priority+0x124>
_Thread_Executing->is_preemptible )
47932: 4a28 0075 tstb %a0@(117)
47936: 6708 beqs 47940 <_Thread_Change_priority+0x124>
_Context_Switch_necessary = true;
47938: 7401 moveq #1,%d2 4793a: 13c2 0005 da92 moveb %d2,5da92 <_Context_Switch_necessary>
_ISR_Enable( level );
47940: 46c1 movew %d1,%sr
}
47942: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47948: 4e5e unlk %fp 4794a: 4e75 rts
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
4794c: 206a 008a moveal %a2@(138),%a0
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
47950: 2008 movel %a0,%d0 47952: 5880 addql #4,%d0 47954: 2480 movel %d0,%a2@
old_last_node = the_chain->last;
47956: 2268 0008 moveal %a0@(8),%a1
the_chain->last = the_node;
4795a: 214a 0008 movel %a2,%a0@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
4795e: 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;
47962: 228a movel %a2,%a1@ 47964: 6000 ff78 braw 478de <_Thread_Change_priority+0xc2>
00047968 <_Thread_Clear_state>:
)
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
47968: 327c 0700 moveaw #1792,%a1 4796c: 2009 movel %a1,%d0
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
4796e: 4e56 ffec linkw %fp,#-20 47972: 206e 0008 moveal %fp@(8),%a0 47976: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4797a: 242e 000c movel %fp@(12),%d2
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4797e: 40c3 movew %sr,%d3 47980: 8083 orl %d3,%d0 47982: 46c0 movew %d0,%sr
current_state = the_thread->current_state;
47984: 2228 0010 movel %a0@(16),%d1
if ( current_state & state ) {
47988: 2002 movel %d2,%d0 4798a: c081 andl %d1,%d0
4798c: 6776 beqs 47a04 <_Thread_Clear_state+0x9c>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
4798e: 2002 movel %d2,%d0 47990: 4680 notl %d0 47992: c081 andl %d1,%d0
current_state =
47994: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
47998: 666a bnes 47a04 <_Thread_Clear_state+0x9c>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4799a: 2868 008e moveal %a0@(142),%a4 4799e: 3028 0094 movew %a0@(148),%d0 479a2: 3214 movew %a4@,%d1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
479a4: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
479a8: 240a movel %a2,%d2 479aa: 5882 addql #4,%d2 479ac: 8081 orl %d1,%d0 479ae: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
479b0: 266a 0008 moveal %a2@(8),%a3 479b4: 3880 movew %d0,%a4@
the_chain->last = the_node;
479b6: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
479ba: 3239 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d1 479c0: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
479c4: 214b 0004 movel %a3,%a0@(4) 479c8: 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;
479ca: 2688 movel %a0,%a3@ 479cc: 33c0 0005 da78 movew %d0,5da78 <_Priority_Major_bit_map>
_ISR_Flash( level );
479d2: 2009 movel %a1,%d0 479d4: 46c3 movew %d3,%sr 479d6: 8083 orl %d3,%d0 479d8: 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 ) {
479da: 2028 0014 movel %a0@(20),%d0 479de: 2279 0005 da56 moveal 5da56 <_Thread_Heir>,%a1 479e4: b0a9 0014 cmpl %a1@(20),%d0
479e8: 641a bccs 47a04 <_Thread_Clear_state+0x9c>
_Thread_Heir = the_thread;
479ea: 23c8 0005 da56 movel %a0,5da56 <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
479f0: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 479f6: 4a28 0075 tstb %a0@(117)
479fa: 6712 beqs 47a0e <_Thread_Clear_state+0xa6>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
479fc: 7001 moveq #1,%d0 479fe: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
47a04: 46c3 movew %d3,%sr
}
47a06: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a0a: 4e5e unlk %fp 47a0c: 4e75 rts
* 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 ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
47a0e: 4a80 tstl %d0
47a10: 66f2 bnes 47a04 <_Thread_Clear_state+0x9c> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
47a12: 7001 moveq #1,%d0 <== NOT EXECUTED 47a14: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED 47a1a: 60e8 bras 47a04 <_Thread_Clear_state+0x9c> <== NOT EXECUTED
00047a1c <_Thread_Close>:
47a1c: 4280 clrl %d0
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
47a1e: 4e56 0000 linkw %fp,#0 47a22: 2f0b movel %a3,%sp@- 47a24: 266e 0008 moveal %fp@(8),%a3 47a28: 2f0a movel %a2,%sp@- 47a2a: 246e 000c moveal %fp@(12),%a2 47a2e: 206b 0018 moveal %a3@(24),%a0 47a32: 302a 000a movew %a2@(10),%d0 47a36: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47a3a: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47a40: 5380 subql #1,%d0
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
47a42: 2f0a movel %a2,%sp@- 47a44: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 47a4a: 4eb9 0004 8d50 jsr 48d50 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47a50: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47a56: 5280 addql #1,%d0 47a58: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
/* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object );
47a5e: 2f0a movel %a2,%sp@- 47a60: 2f0b movel %a3,%sp@- 47a62: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
47a68: 4878 0001 pea 1 <ADD> 47a6c: 2f0a movel %a2,%sp@- 47a6e: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
47a74: 2f0a movel %a2,%sp@- 47a76: 4eb9 0004 8424 jsr 48424 <_Thread_queue_Extract_with_proxy> 47a7c: 4fef 0018 lea %sp@(24),%sp 47a80: 4a00 tstb %d0
47a82: 6608 bnes 47a8c <_Thread_Close+0x70>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
47a84: 7002 moveq #2,%d0 47a86: b0aa 0050 cmpl %a2@(80),%d0
47a8a: 6756 beqs 47ae2 <_Thread_Close+0xc6> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) )
47a8c: b5f9 0005 da4e cmpal 5da4e <_Thread_Allocated_fp>,%a2
47a92: 6746 beqs 47ada <_Thread_Close+0xbe>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
47a94: 202a 00c4 movel %a2@(196),%d0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
47a98: 42aa 0100 clrl %a2@(256)
if ( the_thread->Start.fp_context )
47a9c: 4a80 tstl %d0
47a9e: 670a beqs 47aaa <_Thread_Close+0x8e>
(void) _Workspace_Free( the_thread->Start.fp_context );
47aa0: 2f00 movel %d0,%sp@- 47aa2: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47aa8: 588f addql #4,%sp
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
47aaa: 2f0a movel %a2,%sp@- 47aac: 4eb9 0004 8814 jsr 48814 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
47ab2: 202a 0114 movel %a2@(276),%d0 47ab6: 588f addql #4,%sp
/* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL;
47ab8: 42aa 00c8 clrl %a2@(200)
if ( the_thread->extensions )
47abc: 4a80 tstl %d0
47abe: 670a beqs 47aca <_Thread_Close+0xae>
(void) _Workspace_Free( the_thread->extensions );
47ac0: 2f00 movel %d0,%sp@- 47ac2: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47ac8: 588f addql #4,%sp
the_thread->extensions = NULL;
47aca: 42aa 0114 clrl %a2@(276)
}
47ace: 246e fff8 moveal %fp@(-8),%a2 47ad2: 266e fffc moveal %fp@(-4),%a3 47ad6: 4e5e unlk %fp 47ad8: 4e75 rts
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
47ada: 42b9 0005 da4e clrl 5da4e <_Thread_Allocated_fp> 47ae0: 60b2 bras 47a94 <_Thread_Close+0x78>
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
47ae2: 486a 0048 pea %a2@(72) 47ae6: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 47aec: 588f addql #4,%sp
/* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) )
47aee: b5f9 0005 da4e cmpal 5da4e <_Thread_Allocated_fp>,%a2
47af4: 669e bnes 47a94 <_Thread_Close+0x78> <== ALWAYS TAKEN
47af6: 60e2 bras 47ada <_Thread_Close+0xbe> <== NOT EXECUTED
00047ba8 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
47ba8: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
47bac: 486e fffc pea %fp@(-4) 47bb0: 2f2e 0008 movel %fp@(8),%sp@- 47bb4: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get>
switch ( location ) {
47bba: 508f addql #8,%sp 47bbc: 4aae fffc tstl %fp@(-4)
47bc0: 661e bnes 47be0 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
47bc2: 2f3c 1000 0018 movel #268435480,%sp@- 47bc8: 2f00 movel %d0,%sp@- 47bca: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 47bd0: 508f addql #8,%sp 47bd2: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47bd8: 5380 subql #1,%d0 47bda: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
47be0: 4e5e unlk %fp <== NOT EXECUTED
00047be4 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
47be4: 4e56 ffc8 linkw %fp,#-56 47be8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
47bec: 2e3c 0000 0700 movel #1792,%d7 47bf2: 2007 movel %d7,%d0
{
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
47bf4: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2
_ISR_Disable( level );
47bfa: 40c1 movew %sr,%d1 47bfc: 8081 orl %d1,%d0 47bfe: 46c0 movew %d0,%sr
while ( _Context_Switch_necessary == true ) {
47c00: 1039 0005 da92 moveb 5da92 <_Context_Switch_necessary>,%d0 47c06: 6700 00fa beqw 47d02 <_Thread_Dispatch+0x11e> 47c0a: 260e movel %fp,%d3 47c0c: 240e movel %fp,%d2 47c0e: 5183 subql #8,%d3 47c10: 2c3c 0004 b2e0 movel #307936,%d6 47c16: 0682 ffff fff0 addil #-16,%d2 47c1c: 2a3c 0004 8b1c movel #297756,%d5 47c22: 283c 0004 8ad4 movel #297684,%d4 47c28: 4bf9 0004 8ddc lea 48ddc <_User_extensions_Thread_switch>,%a5 47c2e: 49f9 0004 9150 lea 49150 <_CPU_Context_switch>,%a4
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
47c34: 7001 moveq #1,%d0 47c36: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
47c3c: 2679 0005 da56 moveal 5da56 <_Thread_Heir>,%a3
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
47c42: 4200 clrb %d0
_Thread_Executing = heir;
47c44: 23cb 0005 da82 movel %a3,5da82 <_Thread_Executing>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
47c4a: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary>
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
47c50: 7001 moveq #1,%d0 47c52: b0ab 007a cmpl %a3@(122),%d0 47c56: 6700 00d6 beqw 47d2e <_Thread_Dispatch+0x14a>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
47c5a: 46c1 movew %d1,%sr
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
47c5c: 2f03 movel %d3,%sp@- 47c5e: 2046 moveal %d6,%a0 47c60: 4e90 jsr %a0@
_Timestamp_Subtract(
47c62: 2045 moveal %d5,%a0 47c64: 2f02 movel %d2,%sp@- 47c66: 2f03 movel %d3,%sp@- 47c68: 4879 0005 da8a pea 5da8a <_Thread_Time_of_last_context_switch> 47c6e: 4e90 jsr %a0@
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
47c70: 2044 moveal %d4,%a0 47c72: 2f02 movel %d2,%sp@- 47c74: 486a 0082 pea %a2@(130) 47c78: 4e90 jsr %a0@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
47c7a: 2079 0005 da52 moveal 5da52 <_Thread_libc_reent>,%a0 47c80: 4fef 0018 lea %sp@(24),%sp
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
47c84: 202e fff8 movel %fp@(-8),%d0 47c88: 222e fffc movel %fp@(-4),%d1 47c8c: 23c0 0005 da8a movel %d0,5da8a <_Thread_Time_of_last_context_switch> 47c92: 23c1 0005 da8e movel %d1,5da8e <_Thread_Time_of_last_context_switch+0x4>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
47c98: 4a88 tstl %a0
47c9a: 6708 beqs 47ca4 <_Thread_Dispatch+0xc0> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
47c9c: 2550 0104 movel %a0@,%a2@(260)
*_Thread_libc_reent = heir->libc_reent;
47ca0: 20ab 0104 movel %a3@(260),%a0@
}
_User_extensions_Thread_switch( executing, heir );
47ca4: 2f0b movel %a3,%sp@- 47ca6: 2f0a movel %a2,%sp@- 47ca8: 4e95 jsr %a5@
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
47caa: 486b 00cc pea %a3@(204) 47cae: 486a 00cc pea %a2@(204) 47cb2: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
47cb4: 4fef 0010 lea %sp@(16),%sp 47cb8: 4aaa 0100 tstl %a2@(256)
47cbc: 672c beqs 47cea <_Thread_Dispatch+0x106>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
47cbe: 2079 0005 da4e moveal 5da4e <_Thread_Allocated_fp>,%a0 47cc4: b1ca cmpal %a2,%a0
47cc6: 6722 beqs 47cea <_Thread_Dispatch+0x106>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
47cc8: 4a88 tstl %a0
47cca: 670c beqs 47cd8 <_Thread_Dispatch+0xf4>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
47ccc: 4868 0100 pea %a0@(256) 47cd0: 4eb9 0004 9286 jsr 49286 <_CPU_Context_save_fp> 47cd6: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
47cd8: 486a 0100 pea %a2@(256) 47cdc: 4eb9 0004 92be jsr 492be <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
47ce2: 588f addql #4,%sp 47ce4: 23ca 0005 da4e movel %a2,5da4e <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
47cea: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2
_ISR_Disable( level );
47cf0: 2007 movel %d7,%d0 47cf2: 40c1 movew %sr,%d1 47cf4: 8081 orl %d1,%d0 47cf6: 46c0 movew %d0,%sr
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
47cf8: 1039 0005 da92 moveb 5da92 <_Context_Switch_necessary>,%d0 47cfe: 6600 ff34 bnew 47c34 <_Thread_Dispatch+0x50>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
47d02: 42b9 0005 d9c8 clrl 5d9c8 <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
47d08: 46c1 movew %d1,%sr
if ( _Thread_Do_post_task_switch_extension ||
47d0a: 4ab9 0005 da6a tstl 5da6a <_Thread_Do_post_task_switch_extension>
47d10: 6606 bnes 47d18 <_Thread_Dispatch+0x134> <== NEVER TAKEN
executing->do_post_task_switch_extension ) {
47d12: 4a2a 0074 tstb %a2@(116)
47d16: 670c beqs 47d24 <_Thread_Dispatch+0x140>
executing->do_post_task_switch_extension = false;
47d18: 4201 clrb %d1 47d1a: 1541 0074 moveb %d1,%a2@(116)
_API_extensions_Run_postswitch();
47d1e: 4eb9 0004 65f4 jsr 465f4 <_API_extensions_Run_postswitch>
}
}
47d24: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47d2a: 4e5e unlk %fp 47d2c: 4e75 rts
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
47d2e: 41f9 0005 d978 lea 5d978 <_Thread_Ticks_per_timeslice>,%a0 47d34: 2750 0076 movel %a0@,%a3@(118) 47d38: 6000 ff20 braw 47c5a <_Thread_Dispatch+0x76>
00047d3c <_Thread_Enable_dispatch>:
#if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \
(CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
47d3c: 4e56 0000 linkw %fp,#0
if ( --_Thread_Dispatch_disable_level )
47d40: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47d46: 5380 subql #1,%d0 47d48: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 47d4e: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0
47d54: 6704 beqs 47d5a <_Thread_Enable_dispatch+0x1e>
return;
_Thread_Dispatch();
}
47d56: 4e5e unlk %fp 47d58: 4e75 rts 47d5a: 4e5e unlk %fp
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
return;
_Thread_Dispatch();
47d5c: 4ef9 0004 7be4 jmp 47be4 <_Thread_Dispatch>
...
0004d1d8 <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
4d1d8: 4e56 0000 linkw %fp,#0
Thread_Control *executing;
executing = _Thread_Executing;
4d1dc: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0
if ( !_States_Is_ready( executing->current_state ) ||
4d1e2: 4aa8 0010 tstl %a0@(16)
4d1e6: 660e bnes 4d1f6 <_Thread_Evaluate_mode+0x1e> <== NEVER TAKEN
4d1e8: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0
4d1ee: 6712 beqs 4d202 <_Thread_Evaluate_mode+0x2a>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
4d1f0: 4a28 0075 tstb %a0@(117)
4d1f4: 670c beqs 4d202 <_Thread_Evaluate_mode+0x2a> <== NEVER TAKEN
_Context_Switch_necessary = true;
return true;
}
return false;
}
4d1f6: 4e5e unlk %fp
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
4d1f8: 7001 moveq #1,%d0 4d1fa: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary>
return true;
}
return false;
}
4d200: 4e75 rts 4d202: 4e5e unlk %fp
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
return true;
4d204: 4200 clrb %d0 <== NOT EXECUTED
}
return false;
}
0004d208 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4d208: 4e56 0000 linkw %fp,#0 4d20c: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
4d20e: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4d214: 2f02 movel %d2,%sp@-
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
4d216: 222a 00b4 movel %a2@(180),%d1
_ISR_Set_level(level);
4d21a: 40c0 movew %sr,%d0 4d21c: e189 lsll #8,%d1 4d21e: 0280 0000 f8ff andil #63743,%d0 4d224: 8081 orl %d1,%d0 4d226: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
4d228: 7001 moveq #1,%d0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4d22a: 1439 0005 d17c moveb 5d17c <doneConstructors.3595>,%d2
doneConstructors = 1;
4d230: 13c0 0005 d17c moveb %d0,5d17c <doneConstructors.3595>
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4d236: 4aaa 0100 tstl %a2@(256)
4d23a: 6720 beqs 4d25c <_Thread_Handler+0x54>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
4d23c: 2079 0005 da4e moveal 5da4e <_Thread_Allocated_fp>,%a0 4d242: b1ca cmpal %a2,%a0
4d244: 6716 beqs 4d25c <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4d246: 4a88 tstl %a0
4d248: 670c beqs 4d256 <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4d24a: 4868 0100 pea %a0@(256) 4d24e: 4eb9 0004 9286 jsr 49286 <_CPU_Context_save_fp> 4d254: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4d256: 23ca 0005 da4e movel %a2,5da4e <_Thread_Allocated_fp>
/* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing );
4d25c: 2f0a movel %a2,%sp@- 4d25e: 4eb9 0004 8c34 jsr 48c34 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4d264: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
4d26a: 588f addql #4,%sp 4d26c: 4a02 tstb %d2
4d26e: 6746 beqs 4d2b6 <_Thread_Handler+0xae>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4d270: 4aaa 009e tstl %a2@(158)
4d274: 6718 beqs 4d28e <_Thread_Handler+0x86> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
4d276: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d278: 4eb9 0004 8c72 jsr 48c72 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
4d27e: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED 4d282: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4d286: 42a7 clrl %sp@- <== NOT EXECUTED 4d288: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> <== NOT EXECUTED
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4d28e: 2f2a 00a6 movel %a2@(166),%sp@- 4d292: 206a 009a moveal %a2@(154),%a0 4d296: 4e90 jsr %a0@
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4d298: 588f addql #4,%sp 4d29a: 2540 0028 movel %d0,%a2@(40)
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
4d29e: 2f0a movel %a2,%sp@- 4d2a0: 4eb9 0004 8c72 jsr 48c72 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4d2a6: 4878 0006 pea 6 <EXTENDSFDF> 4d2aa: 4878 0001 pea 1 <ADD> 4d2ae: 42a7 clrl %sp@- 4d2b0: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred>
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
4d2b6: 4eb9 0005 a8c4 jsr 5a8c4 <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4d2bc: 4aaa 009e tstl %a2@(158)
4d2c0: 66b4 bnes 4d276 <_Thread_Handler+0x6e> <== NEVER TAKEN
4d2c2: 60ca bras 4d28e <_Thread_Handler+0x86>
00047fd0 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
47fd0: 4e56 0000 linkw %fp,#0
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
47fd4: 4ab9 0005 c2b8 tstl 5c2b8 <Configuration+0x24> 47fda: 57c0 seq %d0 47fdc: 4ab9 0005 c2b4 tstl 5c2b4 <Configuration+0x20> 47fe2: 57c1 seq %d1 47fe4: 4480 negl %d0 47fe6: 4481 negl %d1 47fe8: b380 eorl %d1,%d0
uint32_t maximum_extensions;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
47fea: 2239 0005 c2a4 movel 5c2a4 <Configuration+0x10>,%d1
maximum_extensions = Configuration.maximum_extensions;
47ff0: 2079 0005 c29c moveal 5c29c <Configuration+0x8>,%a0
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
47ff6: 2f02 movel %d2,%sp@-
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
47ff8: 4a00 tstb %d0 47ffa: 6600 00a2 bnew 4809e <_Thread_Handler_initialization+0xce>
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
47ffe: 4280 clrl %d0 48000: 1039 0005 c292 moveb 5c292 <rtems_maximum_priority>,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48006: 4282 clrl %d2
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48008: 5280 addql #1,%d0
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
4800a: 23c1 0005 d978 movel %d1,5d978 <_Thread_Ticks_per_timeslice>
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48010: 2200 movel %d0,%d1 48012: e588 lsll #2,%d0 48014: e989 lsll #4,%d1
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
48016: 23c8 0005 da66 movel %a0,5da66 <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
4801c: 9280 subl %d0,%d1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
4801e: 4200 clrb %d0
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48020: 2f01 movel %d1,%sp@-
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
48022: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary>
_Thread_Executing = NULL;
48028: 42b9 0005 da82 clrl 5da82 <_Thread_Executing>
_Thread_Heir = NULL;
4802e: 42b9 0005 da56 clrl 5da56 <_Thread_Heir>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL;
48034: 42b9 0005 da4e clrl 5da4e <_Thread_Allocated_fp>
#endif
_Thread_Do_post_task_switch_extension = 0;
4803a: 42b9 0005 da6a clrl 5da6a <_Thread_Do_post_task_switch_extension>
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48040: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error>
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48046: 588f addql #4,%sp 48048: 1439 0005 c292 moveb 5c292 <rtems_maximum_priority>,%d2 4804e: 2040 moveal %d0,%a0 48050: 4281 clrl %d1
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48052: 23c0 0005 d974 movel %d0,5d974 <_Thread_Ready_chain>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
48058: 2008 movel %a0,%d0 4805a: 5880 addql #4,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
4805c: 5281 addql #1,%d1 4805e: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
48060: 42a8 0004 clrl %a0@(4)
the_chain->last = _Chain_Head(the_chain);
48064: 2148 0008 movel %a0,%a0@(8) 48068: 41e8 000c lea %a0@(12),%a0 4806c: b481 cmpl %d1,%d2
4806e: 64e8 bccs 48058 <_Thread_Handler_initialization+0x88>
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
48070: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 48074: 42a7 clrl %sp@- 48076: 4878 011c pea 11c <DBL_MANT_DIG+0xe7> 4807a: 4878 0001 pea 1 <ADD> 4807e: 4878 0001 pea 1 <ADD> 48082: 4878 0001 pea 1 <ADD> 48086: 4879 0005 db12 pea 5db12 <_Thread_Internal_information> 4808c: 4eb9 0004 753c jsr 4753c <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
48092: 242e fffc movel %fp@(-4),%d2
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
48096: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
4809a: 4e5e unlk %fp 4809c: 4e75 rts
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
4809e: 4878 000f pea f <FPTRAP> 480a2: 4878 0001 pea 1 <ADD> 480a6: 42a7 clrl %sp@- 480a8: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred>
...
00047e00 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
47e00: 4e56 ffec linkw %fp,#-20 47e04: 48d7 043c moveml %d2-%d5/%a2,%sp@ 47e08: 242e 0014 movel %fp@(20),%d2
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
47e0c: 2f02 movel %d2,%sp@-
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
47e0e: 246e 000c moveal %fp@(12),%a2 47e12: 282e 0018 movel %fp@(24),%d4
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
47e16: 42aa 0108 clrl %a2@(264)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
47e1a: 262e 001c movel %fp@(28),%d3
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
47e1e: 42aa 010c clrl %a2@(268) 47e22: 42aa 0110 clrl %a2@(272)
extensions_area = NULL;
the_thread->libc_reent = NULL;
47e26: 42aa 0104 clrl %a2@(260)
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
47e2a: 2f0a movel %a2,%sp@-
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
47e2c: 1a2e 0023 moveb %fp@(35),%d5
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
47e30: 4eb9 0004 87b0 jsr 487b0 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
47e36: 508f addql #8,%sp 47e38: 4a80 tstl %d0 47e3a: 6700 011e beqw 47f5a <_Thread_Initialize+0x15a> 47e3e: b082 cmpl %d2,%d0 47e40: 6500 0118 bcsw 47f5a <_Thread_Initialize+0x15a>
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
the_stack->size = size;
47e44: 2540 00bc movel %d0,%a2@(188)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
47e48: 256a 00c8 00c0 movel %a2@(200),%a2@(192)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
47e4e: 4a04 tstb %d4 47e50: 6600 0120 bnew 47f72 <_Thread_Initialize+0x172> 47e54: 4280 clrl %d0 47e56: 4284 clrl %d4
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
47e58: 2239 0005 da66 movel 5da66 <_Thread_Maximum_extensions>,%d1
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
47e5e: 2540 00c4 movel %d0,%a2@(196)
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
47e62: 2540 0100 movel %d0,%a2@(256)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
47e66: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine;
47e6a: 42aa 0064 clrl %a2@(100)
the_watchdog->id = id;
47e6e: 42aa 0068 clrl %a2@(104)
the_watchdog->user_data = user_data;
47e72: 42aa 006c clrl %a2@(108)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
47e76: 4a81 tstl %d1 47e78: 6600 011a bnew 47f94 <_Thread_Initialize+0x194>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
47e7c: 42aa 0114 clrl %a2@(276) 47e80: 4282 clrl %d2
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
47e82: 2f03 movel %d3,%sp@-
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
47e84: 256e 002c 00b4 movel %fp@(44),%a2@(180)
the_thread->current_state = STATES_DORMANT;
47e8a: 7001 moveq #1,%d0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
47e8c: 256e 0024 00ac movel %fp@(36),%a2@(172)
the_thread->Start.budget_callout = budget_callout;
47e92: 256e 0028 00b0 movel %fp@(40),%a2@(176)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
47e98: 1545 00aa moveb %d5,%a2@(170)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
47e9c: 2f0a movel %a2,%sp@-
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
47e9e: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
47ea2: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
47ea6: 42aa 001c clrl %a2@(28)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
47eaa: 2543 0018 movel %d3,%a2@(24)
the_thread->Start.initial_priority = priority;
47eae: 2543 00b8 movel %d3,%a2@(184)
_Thread_Set_priority( the_thread, priority );
47eb2: 4eb9 0004 85a8 jsr 485a8 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47eb8: 206e 0008 moveal %fp@(8),%a0 47ebc: 4280 clrl %d0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
47ebe: 256e 0030 000c movel %fp@(48),%a2@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47ec4: 2068 0018 moveal %a0@(24),%a0 47ec8: 302a 000a movew %a2@(10),%d0
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
47ecc: 42aa 0082 clrl %a2@(130) 47ed0: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 47ed4: 42aa 0086 clrl %a2@(134)
* enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread );
47ed8: 2f0a movel %a2,%sp@- 47eda: 4eb9 0004 8d04 jsr 48d04 <_User_extensions_Thread_create>
if ( extension_status )
47ee0: 4fef 000c lea %sp@(12),%sp 47ee4: 4a00 tstb %d0
47ee6: 667e bnes 47f66 <_Thread_Initialize+0x166>
return true;
failed:
if ( the_thread->libc_reent )
47ee8: 202a 0104 movel %a2@(260),%d0
47eec: 670a beqs 47ef8 <_Thread_Initialize+0xf8>
_Workspace_Free( the_thread->libc_reent );
47eee: 2f00 movel %d0,%sp@- 47ef0: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47ef6: 588f addql #4,%sp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
47ef8: 202a 0108 movel %a2@(264),%d0
47efc: 670a beqs 47f08 <_Thread_Initialize+0x108>
_Workspace_Free( the_thread->API_Extensions[i] );
47efe: 2f00 movel %d0,%sp@- 47f00: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47f06: 588f addql #4,%sp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
47f08: 202a 010c movel %a2@(268),%d0
47f0c: 670a beqs 47f18 <_Thread_Initialize+0x118> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
47f0e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47f10: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> <== NOT EXECUTED 47f16: 588f addql #4,%sp <== NOT EXECUTED
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
47f18: 202a 0110 movel %a2@(272),%d0
47f1c: 670a beqs 47f28 <_Thread_Initialize+0x128> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
47f1e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47f20: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> <== NOT EXECUTED 47f26: 588f addql #4,%sp <== NOT EXECUTED
if ( extensions_area )
47f28: 4a82 tstl %d2
47f2a: 670a beqs 47f36 <_Thread_Initialize+0x136>
(void) _Workspace_Free( extensions_area );
47f2c: 2f02 movel %d2,%sp@- 47f2e: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47f34: 588f addql #4,%sp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
47f36: 4a84 tstl %d4
47f38: 670a beqs 47f44 <_Thread_Initialize+0x144>
(void) _Workspace_Free( fp_area );
47f3a: 2f04 movel %d4,%sp@- 47f3c: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47f42: 588f addql #4,%sp
#endif
_Thread_Stack_Free( the_thread );
47f44: 2f0a movel %a2,%sp@- 47f46: 4eb9 0004 8814 jsr 48814 <_Thread_Stack_Free>
return false;
47f4c: 588f addql #4,%sp
}
47f4e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
47f54: 4200 clrb %d0
return false;
}
47f56: 4e5e unlk %fp 47f58: 4e75 rts 47f5a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return false;
47f60: 4200 clrb %d0
}
47f62: 4e5e unlk %fp 47f64: 4e75 rts 47f66: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
* user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status )
47f6c: 7001 moveq #1,%d0
_Thread_Stack_Free( the_thread );
return false;
}
47f6e: 4e5e unlk %fp 47f70: 4e75 rts
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
47f72: 4878 001c pea 1c <OPER2+0x8> 47f76: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
if ( !fp_area )
47f7c: 588f addql #4,%sp
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
47f7e: 2800 movel %d0,%d4
if ( !fp_area )
47f80: 6600 fed6 bnew 47e58 <_Thread_Initialize+0x58>
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
47f84: 202a 0104 movel %a2@(260),%d0
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
47f88: 4282 clrl %d2
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
47f8a: 4a80 tstl %d0 47f8c: 6600 ff60 bnew 47eee <_Thread_Initialize+0xee> 47f90: 6000 ff66 braw 47ef8 <_Thread_Initialize+0xf8>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
47f94: e589 lsll #2,%d1 47f96: 2041 moveal %d1,%a0 47f98: 4868 0004 pea %a0@(4) 47f9c: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
47fa2: 588f addql #4,%sp
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
47fa4: 2400 movel %d0,%d2
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
47fa6: 6700 ff40 beqw 47ee8 <_Thread_Initialize+0xe8>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
47faa: 2040 moveal %d0,%a0
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
47fac: 4281 clrl %d1 47fae: 4280 clrl %d0 47fb0: 2279 0005 da66 moveal 5da66 <_Thread_Maximum_extensions>,%a1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
47fb6: 2542 0114 movel %d2,%a2@(276)
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
47fba: 42b0 1c00 clrl %a0@(00000000,%d1:l:4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
47fbe: 5280 addql #1,%d0 47fc0: 2200 movel %d0,%d1 47fc2: b089 cmpl %a1,%d0 47fc4: 6200 febc bhiw 47e82 <_Thread_Initialize+0x82> 47fc8: 206a 0114 moveal %a2@(276),%a0 47fcc: 60ec bras 47fba <_Thread_Initialize+0x1ba>
...
0004c7bc <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4c7bc: 4e56 0000 linkw %fp,#0 4c7c0: 2f0a movel %a2,%sp@- 4c7c2: 246e 0008 moveal %fp@(8),%a2
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
4c7c6: 256e 0010 00a6 movel %fp@(16),%a2@(166)
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
4c7cc: 256a 00ac 007a movel %a2@(172),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4c7d2: 256a 00b0 007e movel %a2@(176),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4c7d8: 256e 000c 00a2 movel %fp@(12),%a2@(162)
{
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4c7de: 156a 00aa 0075 moveb %a2@(170),%a2@(117)
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
4c7e4: 42aa 001c clrl %a2@(28)
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
4c7e8: 2f0a movel %a2,%sp@- 4c7ea: 4eb9 0004 9038 jsr 49038 <_Thread_queue_Extract_with_proxy> 4c7f0: 588f addql #4,%sp 4c7f2: 4a00 tstb %d0
4c7f4: 6608 bnes 4c7fe <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4c7f6: 7002 moveq #2,%d0 4c7f8: b0aa 0050 cmpl %a2@(80),%d0
4c7fc: 672a beqs 4c828 <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4c7fe: 202a 00b8 movel %a2@(184),%d0 4c802: b0aa 0014 cmpl %a2@(20),%d0
4c806: 6718 beqs 4c820 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4c808: 2d4a 0008 movel %a2,%fp@(8) 4c80c: 2d40 000c movel %d0,%fp@(12)
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
4c810: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
}
}
4c814: 246e fffc moveal %fp@(-4),%a2 4c818: 4e5e unlk %fp
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4c81a: 4ef9 0004 9248 jmp 49248 <_Thread_Set_priority>
} }
4c820: 246e fffc moveal %fp@(-4),%a2 4c824: 4e5e unlk %fp 4c826: 4e75 rts
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
4c828: 486a 0048 pea %a2@(72) 4c82c: 4eb9 0004 9c48 jsr 49c48 <_Watchdog_Remove> 4c832: 588f addql #4,%sp 4c834: 60c8 bras 4c7fe <_Thread_Reset+0x42>
...
0004bad8 <_Thread_Reset_timeslice>:
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
4bad8: 223c 0000 0700 movel #1792,%d1 4bade: 2001 movel %d1,%d0
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
4bae0: 4e56 fff4 linkw %fp,#-12
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
4bae4: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
4baea: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
4baee: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
4baf2: 40c2 movew %sr,%d2 4baf4: 8082 orl %d2,%d0 4baf6: 46c0 movew %d0,%sr
if ( _Chain_Has_only_one_node( ready ) ) {
4baf8: 2029 0008 movel %a1@(8),%d0 4bafc: b091 cmpl %a1@,%d0
4bafe: 6752 beqs 4bb52 <_Thread_Reset_timeslice+0x7a>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4bb00: 2450 moveal %a0@,%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4bb02: 2009 movel %a1,%d0 4bb04: 5880 addql #4,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4bb06: 2668 0004 moveal %a0@(4),%a3
next->previous = previous; previous->next = next;
4bb0a: 268a movel %a2,%a3@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4bb0c: 254b 0004 movel %a3,%a2@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4bb10: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
4bb12: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
4bb16: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
4bb1a: 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;
4bb1e: 2488 movel %a0,%a2@
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
4bb20: 46c2 movew %d2,%sr 4bb22: 8282 orl %d2,%d1 4bb24: 46c1 movew %d1,%sr
if ( _Thread_Is_heir( executing ) )
4bb26: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0
4bb2c: 6712 beqs 4bb40 <_Thread_Reset_timeslice+0x68> <== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
4bb2e: 7001 moveq #1,%d0 <== NOT EXECUTED 4bb30: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED
_ISR_Enable( level );
4bb36: 46c2 movew %d2,%sr <== NOT EXECUTED
}
4bb38: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4bb3c: 4e5e unlk %fp 4bb3e: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
4bb40: 23d1 0005 da56 movel %a1@,5da56 <_Thread_Heir>
_Context_Switch_necessary = true;
4bb46: 7001 moveq #1,%d0 4bb48: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary>
_ISR_Enable( level );
4bb4e: 46c2 movew %d2,%sr 4bb50: 60e6 bras 4bb38 <_Thread_Reset_timeslice+0x60>
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
_ISR_Enable( level );
4bb52: 46c2 movew %d2,%sr
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
4bb54: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3
4bb58: 4e5e unlk %fp <== NOT EXECUTED
000491bc <_Thread_Restart>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
491bc: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
491be: 4e56 0000 linkw %fp,#0 491c2: 2f0a movel %a2,%sp@- 491c4: 246e 0008 moveal %fp@(8),%a2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
491c8: c0aa 0010 andl %a2@(16),%d0 491cc: 4a00 tstb %d0
491ce: 670a beqs 491da <_Thread_Restart+0x1e>
return true;
}
return false;
}
491d0: 246e fffc moveal %fp@(-4),%a2 491d4: 4e5e unlk %fp
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
491d6: 4200 clrb %d0
return true;
}
return false;
}
491d8: 4e75 rts
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
491da: 2f0a movel %a2,%sp@- 491dc: 4eb9 0004 93cc jsr 493cc <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
491e2: 2f2e 0010 movel %fp@(16),%sp@- 491e6: 2f2e 000c movel %fp@(12),%sp@- 491ea: 2f0a movel %a2,%sp@- 491ec: 4eb9 0004 c7bc jsr 4c7bc <_Thread_Reset>
_Thread_Load_environment( the_thread );
491f2: 2f0a movel %a2,%sp@- 491f4: 4eb9 0004 c410 jsr 4c410 <_Thread_Load_environment>
_Thread_Ready( the_thread );
491fa: 2f0a movel %a2,%sp@- 491fc: 4eb9 0004 c6fc jsr 4c6fc <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
49202: 2f0a movel %a2,%sp@- 49204: 4eb9 0004 9a38 jsr 49a38 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
4920a: 4fef 001c lea %sp@(28),%sp 4920e: b5f9 0005 ea1a cmpal 5ea1a <_Thread_Executing>,%a2
49214: 670a beqs 49220 <_Thread_Restart+0x64>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49216: 7001 moveq #1,%d0
return true;
}
return false;
}
49218: 246e fffc moveal %fp@(-4),%a2 4921c: 4e5e unlk %fp 4921e: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
49220: 4aaa 0100 tstl %a2@(256)
49224: 6712 beqs 49238 <_Thread_Restart+0x7c>
_Context_Restore_fp( &_Thread_Executing->fp_context );
49226: 486a 0100 pea %a2@(256) 4922a: 4eb9 0004 9fa2 jsr 49fa2 <_CPU_Context_restore_fp> 49230: 2479 0005 ea1a moveal 5ea1a <_Thread_Executing>,%a2 49236: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49238: 486a 00cc pea %a2@(204) 4923c: 4eb9 0004 9e4a jsr 49e4a <_CPU_Context_Restart_self>
49242: 588f addql #4,%sp <== NOT EXECUTED 49244: 7001 moveq #1,%d0 <== NOT EXECUTED 49246: 60d0 bras 49218 <_Thread_Restart+0x5c> <== NOT EXECUTED
0004c744 <_Thread_Resume>:
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c744: 327c 0700 moveaw #1792,%a1 4c748: 2009 movel %a1,%d0
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
4c74a: 4e56 ffec linkw %fp,#-20 4c74e: 206e 0008 moveal %fp@(8),%a0 4c752: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c756: 40c1 movew %sr,%d1 4c758: 8081 orl %d1,%d0 4c75a: 46c0 movew %d0,%sr
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
4c75c: 2028 0010 movel %a0@(16),%d0
if ( current_state & STATES_SUSPENDED ) {
4c760: 0800 0001 btst #1,%d0
4c764: 6774 beqs 4c7da <_Thread_Resume+0x96> <== NEVER TAKEN
4c766: 74fd moveq #-3,%d2 4c768: c082 andl %d2,%d0
current_state =
4c76a: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
4c76e: 666a bnes 4c7da <_Thread_Resume+0x96>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4c770: 2868 008e moveal %a0@(142),%a4 4c774: 3028 0094 movew %a0@(148),%d0 4c778: 3414 movew %a4@,%d2
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4c77a: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4c77e: 260a movel %a2,%d3 4c780: 5883 addql #4,%d3 4c782: 8082 orl %d2,%d0 4c784: 2083 movel %d3,%a0@
old_last_node = the_chain->last;
4c786: 266a 0008 moveal %a2@(8),%a3 4c78a: 3880 movew %d0,%a4@
the_chain->last = the_node;
4c78c: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4c790: 3439 0006 3720 movew 63720 <_Priority_Major_bit_map>,%d2 4c796: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
4c79a: 214b 0004 movel %a3,%a0@(4) 4c79e: 8082 orl %d2,%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;
4c7a0: 2688 movel %a0,%a3@ 4c7a2: 33c0 0006 3720 movew %d0,63720 <_Priority_Major_bit_map>
_ISR_Flash( level );
4c7a8: 2009 movel %a1,%d0 4c7aa: 46c1 movew %d1,%sr 4c7ac: 8081 orl %d1,%d0 4c7ae: 46c0 movew %d0,%sr
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4c7b0: 2028 0014 movel %a0@(20),%d0 4c7b4: 2279 0006 36fe moveal 636fe <_Thread_Heir>,%a1 4c7ba: b0a9 0014 cmpl %a1@(20),%d0
4c7be: 641a bccs 4c7da <_Thread_Resume+0x96>
_Thread_Heir = the_thread;
4c7c0: 23c8 0006 36fe movel %a0,636fe <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
4c7c6: 2079 0006 372a moveal 6372a <_Thread_Executing>,%a0 4c7cc: 4a28 0075 tstb %a0@(117)
4c7d0: 6712 beqs 4c7e4 <_Thread_Resume+0xa0>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c7d2: 7001 moveq #1,%d0 4c7d4: 13c0 0006 373a moveb %d0,6373a <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
4c7da: 46c1 movew %d1,%sr
}
4c7dc: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c7e0: 4e5e unlk %fp 4c7e2: 4e75 rts
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4c7e4: 4a80 tstl %d0
4c7e6: 66f2 bnes 4c7da <_Thread_Resume+0x96> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c7e8: 7001 moveq #1,%d0 <== NOT EXECUTED 4c7ea: 13c0 0006 373a moveb %d0,6373a <_Context_Switch_necessary> <== NOT EXECUTED 4c7f0: 60e8 bras 4c7da <_Thread_Resume+0x96> <== NOT EXECUTED
...
00048814 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
48814: 4e56 0000 linkw %fp,#0 48818: 206e 0008 moveal %fp@(8),%a0
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
4881c: 2279 0005 c2b8 moveal 5c2b8 <Configuration+0x24>,%a1 48822: 4a89 tstl %a1
48824: 670a beqs 48830 <_Thread_Stack_Free+0x1c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
48826: 2d68 00c0 0008 movel %a0@(192),%fp@(8)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
4882c: 4e5e unlk %fp
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
4882e: 4ed1 jmp %a1@
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
48830: 2d68 00c0 0008 movel %a0@(192),%fp@(8)
}
48836: 4e5e unlk %fp
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
48838: 4ef9 0004 90d0 jmp 490d0 <_Workspace_Free>
...
000488e8 <_Thread_Suspend>:
{
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
_ISR_Disable( level );
488e8: 203c 0000 0700 movel #1792,%d0
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
488ee: 4e56 fff4 linkw %fp,#-12 488f2: 206e 0008 moveal %fp@(8),%a0 488f6: 48d7 040c moveml %d2-%d3/%a2,%sp@
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
488fa: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
488fe: 40c1 movew %sr,%d1 48900: 8081 orl %d1,%d0 48902: 46c0 movew %d0,%sr
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
48904: 2028 0010 movel %a0@(16),%d0
48908: 6642 bnes 4894c <_Thread_Suspend+0x64>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
4890a: 7002 moveq #2,%d0
if ( _Chain_Has_only_one_node( ready ) ) {
4890c: 2429 0008 movel %a1@(8),%d2
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
48910: 2140 0010 movel %d0,%a0@(16)
if ( _Chain_Has_only_one_node( ready ) ) {
48914: b491 cmpl %a1@,%d2 48916: 6700 0098 beqw 489b0 <_Thread_Suspend+0xc8>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4891a: 2250 moveal %a0@,%a1
previous = the_node->previous;
4891c: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
48920: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
48922: 234a 0004 movel %a2,%a1@(4)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
48926: 203c 0000 0700 movel #1792,%d0 4892c: 46c1 movew %d1,%sr 4892e: 8081 orl %d1,%d0 48930: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
48932: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0
48938: 6730 beqs 4896a <_Thread_Suspend+0x82>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
4893a: b1f9 0005 da82 cmpal 5da82 <_Thread_Executing>,%a0
48940: 671c beqs 4895e <_Thread_Suspend+0x76> <== NEVER TAKEN
_Context_Switch_necessary = true;
_ISR_Enable( level );
48942: 46c1 movew %d1,%sr
}
48944: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48948: 4e5e unlk %fp 4894a: 4e75 rts
_ISR_Disable( level );
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
4894c: 7402 moveq #2,%d2 4894e: 8480 orl %d0,%d2 48950: 2142 0010 movel %d2,%a0@(16)
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
48954: 46c1 movew %d1,%sr
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
48956: 4cd7 040c moveml %sp@,%d2-%d3/%a2 4895a: 4e5e unlk %fp 4895c: 4e75 rts
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
4895e: 7401 moveq #1,%d2 48960: 13c2 0005 da92 moveb %d2,5da92 <_Context_Switch_necessary>
_ISR_Enable( level );
48966: 46c1 movew %d1,%sr 48968: 60da bras 48944 <_Thread_Suspend+0x5c>
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 );
4896a: 3039 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d0 48970: 4840 swap %d0 48972: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
48974: 4282 clrl %d2 48976: 43f9 0005 dae4 lea 5dae4 <_Priority_Bit_map>,%a1 4897c: 3400 movew %d0,%d2 4897e: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 48982: 4840 swap %d0 48984: 04c0 ff1 %d0 48986: 4283 clrl %d3 48988: e98a lsll #4,%d2 4898a: 3600 movew %d0,%d3 4898c: 2279 0005 d974 moveal 5d974 <_Thread_Ready_chain>,%a1 48992: 2002 movel %d2,%d0 48994: d083 addl %d3,%d0 48996: 2400 movel %d0,%d2 48998: e58a lsll #2,%d2 4899a: e988 lsll #4,%d0 4899c: 93c2 subal %d2,%a1 4899e: d3c0 addal %d0,%a1 489a0: 23d1 0005 da56 movel %a1@,5da56 <_Thread_Heir>
_ISR_Flash( level );
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
489a6: b1f9 0005 da82 cmpal 5da82 <_Thread_Executing>,%a0
489ac: 6694 bnes 48942 <_Thread_Suspend+0x5a> <== NEVER TAKEN
489ae: 60ae bras 4895e <_Thread_Suspend+0x76>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
489b0: 2009 movel %a1,%d0 489b2: 5880 addql #4,%d0
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
489b4: 2468 008e moveal %a0@(142),%a2 489b8: 2280 movel %d0,%a1@ 489ba: 3412 movew %a2@,%d2 489bc: 3028 0098 movew %a0@(152),%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
489c0: 2349 0008 movel %a1,%a1@(8) 489c4: c082 andl %d2,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
489c6: 42a9 0004 clrl %a1@(4) 489ca: 3480 movew %d0,%a2@
the_thread->current_state = STATES_SUSPENDED;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
489cc: 6600 ff58 bnew 48926 <_Thread_Suspend+0x3e>
if ( *the_priority_map->minor == 0 )
_Priority_Major_bit_map &= the_priority_map->block_major;
489d0: 3439 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d2 489d6: 3028 0096 movew %a0@(150),%d0 489da: c082 andl %d2,%d0 489dc: 33c0 0005 da78 movew %d0,5da78 <_Priority_Major_bit_map>
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
489e2: 203c 0000 0700 movel #1792,%d0 489e8: 46c1 movew %d1,%sr 489ea: 8081 orl %d1,%d0 489ec: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
489ee: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 489f4: 6600 ff44 bnew 4893a <_Thread_Suspend+0x52> 489f8: 6000 ff70 braw 4896a <_Thread_Suspend+0x82>
00048a48 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
48a48: 4e56 fff4 linkw %fp,#-12
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
48a4c: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
48a52: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
48a56: 243c 0000 0700 movel #1792,%d2 48a5c: 2002 movel %d2,%d0
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
48a5e: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
48a62: 40c1 movew %sr,%d1 48a64: 8081 orl %d1,%d0 48a66: 46c0 movew %d0,%sr
if ( !_Chain_Has_only_one_node( ready ) ) {
48a68: 2029 0008 movel %a1@(8),%d0 48a6c: b091 cmpl %a1@,%d0
48a6e: 6750 beqs 48ac0 <_Thread_Yield_processor+0x78>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
48a70: 2450 moveal %a0@,%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
48a72: 2009 movel %a1,%d0 48a74: 5880 addql #4,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
48a76: 2668 0004 moveal %a0@(4),%a3
next->previous = previous; previous->next = next;
48a7a: 268a movel %a2,%a3@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
48a7c: 254b 0004 movel %a3,%a2@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
48a80: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
48a82: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
48a86: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
48a8a: 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;
48a8e: 2488 movel %a0,%a2@
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
48a90: 46c1 movew %d1,%sr 48a92: 8481 orl %d1,%d2 48a94: 46c2 movew %d2,%sr
if ( _Thread_Is_heir( executing ) )
48a96: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0
48a9c: 6712 beqs 48ab0 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
48a9e: 7001 moveq #1,%d0 <== NOT EXECUTED 48aa0: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED
_ISR_Enable( level );
48aa6: 46c1 movew %d1,%sr
}
48aa8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48aac: 4e5e unlk %fp 48aae: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
48ab0: 23d1 0005 da56 movel %a1@,5da56 <_Thread_Heir>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
48ab6: 7001 moveq #1,%d0 48ab8: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> 48abe: 60e6 bras 48aa6 <_Thread_Yield_processor+0x5e>
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
48ac0: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0
48ac6: 67de beqs 48aa6 <_Thread_Yield_processor+0x5e> <== ALWAYS TAKEN
_Context_Switch_necessary = true;
48ac8: 7001 moveq #1,%d0 <== NOT EXECUTED 48aca: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED 48ad0: 60d4 bras 48aa6 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED
...
000477b4 <_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 ) ) {
477b4: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
477b6: 4e56 0000 linkw %fp,#0 477ba: 202e 0010 movel %fp@(16),%d0 477be: 2f0a movel %a2,%sp@- 477c0: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
477c4: 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 ) ) {
477c8: b2aa 0050 cmpl %a2@(80),%d1
477cc: 671c beqs 477ea <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
477ce: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
477d0: 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
}
477d4: 246e fffc moveal %fp@(-4),%a2 477d8: 203c 1003 fff8 movel #268697592,%d0 477de: 2d40 000c movel %d0,%fp@(12) 477e2: 4e5e unlk %fp 477e4: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
477ea: 123c 0003 moveb #3,%d1 477ee: 2541 0050 movel %d1,%a2@(80)
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
477f2: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
477f4: 486a 0048 pea %a2@(72) 477f8: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 477fe: 588f addql #4,%sp 47800: 203c 1003 fff8 movel #268697592,%d0 47806: 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
}
4780a: 246e fffc moveal %fp@(-4),%a2 4780e: 2d40 000c movel %d0,%fp@(12) 47812: 4e5e unlk %fp 47814: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
...
000482ac <_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
)
{
482ac: 4e56 ffe4 linkw %fp,#-28 482b0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 482b4: 266e 000c moveal %fp@(12),%a3
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
482b8: 41eb 003c lea %a3@(60),%a0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
482bc: 263c 0000 0700 movel #1792,%d3
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
482c2: 222b 0014 movel %a3@(20),%d1
header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
482c6: 2401 movel %d1,%d2 482c8: ec8a lsrl #6,%d2 482ca: 2002 movel %d2,%d0 482cc: e58a lsll #2,%d2 482ce: e988 lsll #4,%d0
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
482d0: 286e 0008 moveal %fp@(8),%a4
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
482d4: 9082 subl %d2,%d0 482d6: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 482da: 2748 0038 movel %a0,%a3@(56)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
482de: 41eb 0038 lea %a3@(56),%a0
block_state = the_thread_queue->state;
482e2: 242c 0038 movel %a4@(56),%d2 482e6: 2748 0040 movel %a0,%a3@(64)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
482ea: 42ab 003c clrl %a3@(60)
if ( _Thread_queue_Is_reverse_search( priority ) )
482ee: 0801 0005 btst #5,%d1
482f2: 6656 bnes 4834a <_Thread_queue_Enqueue_priority+0x9e>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
482f4: 2a0a movel %a2,%d5
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
482f6: 2803 movel %d3,%d4 482f8: 5885 addql #4,%d5 482fa: 2004 movel %d4,%d0 482fc: 40c3 movew %sr,%d3 482fe: 8083 orl %d3,%d0 48300: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->first;
48302: 2052 moveal %a2@,%a0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48304: ba88 cmpl %a0,%d5 48306: 6700 010a beqw 48412 <_Thread_queue_Enqueue_priority+0x166>
search_priority = search_thread->current_priority;
4830a: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
4830e: b3c1 cmpal %d1,%a1
48310: 6418 bccs 4832a <_Thread_queue_Enqueue_priority+0x7e>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
48312: 2004 movel %d4,%d0 48314: 46c3 movew %d3,%sr 48316: 8083 orl %d3,%d0 48318: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
4831a: 2002 movel %d2,%d0 4831c: c0a8 0010 andl %a0@(16),%d0 48320: 6700 0092 beqw 483b4 <_Thread_queue_Enqueue_priority+0x108>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
48324: 2050 moveal %a0@,%a0
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 ) ) {
48326: ba88 cmpl %a0,%d5
48328: 66e0 bnes 4830a <_Thread_queue_Enqueue_priority+0x5e>
4832a: 2403 movel %d3,%d2
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
4832c: 7001 moveq #1,%d0 4832e: b0ac 0030 cmpl %a4@(48),%d0 48332: 6700 0094 beqw 483c8 <_Thread_queue_Enqueue_priority+0x11c>
* 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;
48336: 206e 0010 moveal %fp@(16),%a0
return the_thread_queue->sync_state;
4833a: 202c 0030 movel %a4@(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;
4833e: 2082 movel %d2,%a0@
return the_thread_queue->sync_state; }
48340: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48344: 4e5e unlk %fp 48346: 4e75 rts
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
48348: 46c4 movew %d4,%sr
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
4834a: 4284 clrl %d4 4834c: 1839 0005 c292 moveb 5c292 <rtems_maximum_priority>,%d4
_ISR_Disable( level );
48352: 2003 movel %d3,%d0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
48354: 2244 moveal %d4,%a1 48356: 5289 addql #1,%a1
_ISR_Disable( level );
48358: 40c4 movew %sr,%d4 4835a: 8084 orl %d4,%d0 4835c: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->last;
4835e: 206a 0008 moveal %a2@(8),%a0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
48362: b5c8 cmpal %a0,%a2
48364: 6720 beqs 48386 <_Thread_queue_Enqueue_priority+0xda>
search_priority = search_thread->current_priority;
48366: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
4836a: b3c1 cmpal %d1,%a1
4836c: 6318 blss 48386 <_Thread_queue_Enqueue_priority+0xda>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
4836e: 2003 movel %d3,%d0 48370: 46c4 movew %d4,%sr 48372: 8084 orl %d4,%d0 48374: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48376: 2002 movel %d2,%d0 48378: c0a8 0010 andl %a0@(16),%d0
4837c: 67ca beqs 48348 <_Thread_queue_Enqueue_priority+0x9c>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
4837e: 2068 0004 moveal %a0@(4),%a0
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 ) ) {
48382: b5c8 cmpal %a0,%a2
48384: 66e0 bnes 48366 <_Thread_queue_Enqueue_priority+0xba>
48386: 2404 movel %d4,%d2
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
48388: 7001 moveq #1,%d0 4838a: b0ac 0030 cmpl %a4@(48),%d0
4838e: 66a6 bnes 48336 <_Thread_queue_Enqueue_priority+0x8a>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48390: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
48394: b3c1 cmpal %d1,%a1
48396: 6756 beqs 483ee <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
48398: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
4839a: 2748 0004 movel %a0,%a3@(4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
4839e: 2689 movel %a1,%a3@
the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
483a0: 274c 0044 movel %a4,%a3@(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;
483a4: 208b movel %a3,%a0@
next_node->previous = the_node;
483a6: 234b 0004 movel %a3,%a1@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
483aa: 46c4 movew %d4,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
483ac: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483b0: 4e5e unlk %fp 483b2: 4e75 rts
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
483b4: 46c3 movew %d3,%sr <== NOT EXECUTED
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
483b6: 2004 movel %d4,%d0 <== NOT EXECUTED 483b8: 40c3 movew %sr,%d3 <== NOT EXECUTED 483ba: 8083 orl %d3,%d0 <== NOT EXECUTED 483bc: 46c0 movew %d0,%sr <== NOT EXECUTED
search_thread = (Thread_Control *) header->first;
483be: 2052 moveal %a2@,%a0 <== NOT EXECUTED
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
483c0: ba88 cmpl %a0,%d5 <== NOT EXECUTED 483c2: 6600 ff46 bnew 4830a <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 483c6: 604a bras 48412 <_Thread_queue_Enqueue_priority+0x166><== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
483c8: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
483cc: b3c1 cmpal %d1,%a1
483ce: 671e beqs 483ee <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
483d0: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
483d4: 2688 movel %a0,%a3@
the_node->previous = previous_node;
483d6: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
483da: 274c 0044 movel %a4,%a3@(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;
483de: 228b movel %a3,%a1@
search_node->previous = the_node;
483e0: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
483e4: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
483e6: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483ea: 4e5e unlk %fp 483ec: 4e75 rts 483ee: 41e8 003c lea %a0@(60),%a0
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
483f2: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
483f6: 2688 movel %a0,%a3@
the_node->previous = previous_node;
483f8: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
483fc: 274c 0044 movel %a4,%a3@(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;
48400: 228b movel %a3,%a1@
search_node->previous = the_node;
48402: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
48406: 46c2 movew %d2,%sr 48408: 7001 moveq #1,%d0
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
4840a: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 4840e: 4e5e unlk %fp 48410: 4e75 rts
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 ) ) {
48412: 2403 movel %d3,%d2 48414: 327c ffff moveaw #-1,%a1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
48418: 7001 moveq #1,%d0 4841a: b0ac 0030 cmpl %a4@(48),%d0 4841e: 6600 ff16 bnew 48336 <_Thread_queue_Enqueue_priority+0x8a> 48422: 60a4 bras 483c8 <_Thread_queue_Enqueue_priority+0x11c>
00048210 <_Thread_queue_Enqueue_with_handler>:
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
48210: 4e56 fff0 linkw %fp,#-16 48214: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48218: 266e 0008 moveal %fp@(8),%a3
else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state );
4821c: 2f2b 0038 movel %a3@(56),%sp@-
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
48220: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
48226: 242e 000c movel %fp@(12),%d2
else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state );
4822a: 2f0a movel %a2,%sp@- 4822c: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state>
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
48232: 508f addql #8,%sp 48234: 4a82 tstl %d2
48236: 6644 bnes 4827c <_Thread_queue_Enqueue_with_handler+0x6c>
}
/*
* Now enqueue the thread per the discipline for this thread queue.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
48238: 41f9 0004 82ac lea 482ac <_Thread_queue_Enqueue_priority>,%a0 4823e: 7001 moveq #1,%d0 48240: b0ab 0034 cmpl %a3@(52),%d0
48244: 6706 beqs 4824c <_Thread_queue_Enqueue_with_handler+0x3c>
48246: 41f9 0004 b84c lea 4b84c <_Thread_queue_Enqueue_fifo>,%a0
enqueue_p = _Thread_queue_Enqueue_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
enqueue_p = _Thread_queue_Enqueue_fifo;
sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level );
4824c: 486e fffc pea %fp@(-4) 48250: 2f0a movel %a2,%sp@- 48252: 2f0b movel %a3,%sp@- 48254: 4e90 jsr %a0@
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
48256: 4fef 000c lea %sp@(12),%sp 4825a: 7201 moveq #1,%d1 4825c: b280 cmpl %d0,%d1
4825e: 6712 beqs 48272 <_Thread_queue_Enqueue_with_handler+0x62>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
48260: 2f2e fffc movel %fp@(-4),%sp@- 48264: 2f0a movel %a2,%sp@- 48266: 2f00 movel %d0,%sp@- 48268: 4eb9 0004 77b4 jsr 477b4 <_Thread_blocking_operation_Cancel> 4826e: 4fef 000c lea %sp@(12),%sp
}
48272: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48278: 4e5e unlk %fp 4827a: 4e75 rts
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
_Watchdog_Initialize(
4827c: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
48280: 256e 0010 0064 movel %fp@(16),%a2@(100)
the_watchdog->id = id;
48286: 2540 0068 movel %d0,%a2@(104)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4828a: 2542 0054 movel %d2,%a2@(84)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
4828e: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
48292: 42aa 006c clrl %a2@(108)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
48296: 486a 0048 pea %a2@(72) 4829a: 4879 0005 daa0 pea 5daa0 <_Watchdog_Ticks_chain> 482a0: 4eb9 0004 8e1c jsr 48e1c <_Watchdog_Insert> 482a6: 508f addql #8,%sp 482a8: 608e bras 48238 <_Thread_queue_Enqueue_with_handler+0x28>
...
0004d2c4 <_Thread_queue_Extract_fifo>:
Thread_Control *the_thread
)
{
ISR_Level level;
_ISR_Disable( level );
4d2c4: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
4d2ca: 4e56 0000 linkw %fp,#0 4d2ce: 2f0a movel %a2,%sp@- 4d2d0: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
_ISR_Disable( level );
4d2d4: 40c1 movew %sr,%d1 4d2d6: 8081 orl %d1,%d0 4d2d8: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4d2da: 202a 0010 movel %a2@(16),%d0 4d2de: 0280 0003 bee0 andil #245472,%d0
4d2e4: 6734 beqs 4d31a <_Thread_queue_Extract_fifo+0x56>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4d2e6: 2052 moveal %a2@,%a0
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4d2e8: 7002 moveq #2,%d0
previous = the_node->previous;
4d2ea: 226a 0004 moveal %a2@(4),%a1
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
4d2ee: 42aa 0044 clrl %a2@(68)
next->previous = previous; previous->next = next;
4d2f2: 2288 movel %a0,%a1@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4d2f4: 2149 0004 movel %a1,%a0@(4)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4d2f8: b0aa 0050 cmpl %a2@(80),%d0
4d2fc: 6726 beqs 4d324 <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
4d2fe: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4d300: 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
}
4d304: 246e fffc moveal %fp@(-4),%a2 4d308: 203c 1003 fff8 movel #268697592,%d0 4d30e: 2d40 000c movel %d0,%fp@(12) 4d312: 4e5e unlk %fp 4d314: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4d31a: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4d31c: 246e fffc moveal %fp@(-4),%a2 4d320: 4e5e unlk %fp 4d322: 4e75 rts 4d324: 7003 moveq #3,%d0 4d326: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4d32a: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4d32c: 486a 0048 pea %a2@(72) 4d330: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 4d336: 588f addql #4,%sp 4d338: 203c 1003 fff8 movel #268697592,%d0 4d33e: 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
}
4d342: 246e fffc moveal %fp@(-4),%a2 4d346: 2d40 000c movel %d0,%fp@(12) 4d34a: 4e5e unlk %fp 4d34c: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
...
0004b8e0 <_Thread_queue_Extract_priority_helper>:
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4b8e0: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
4b8e6: 4e56 ffec linkw %fp,#-20 4b8ea: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4b8ee: 246e 000c moveal %fp@(12),%a2 4b8f2: 142e 0013 moveb %fp@(19),%d2
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4b8f6: 40c1 movew %sr,%d1 4b8f8: 8081 orl %d1,%d0 4b8fa: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4b8fc: 202a 0010 movel %a2@(16),%d0 4b900: 0280 0003 bee0 andil #245472,%d0
4b906: 677e beqs 4b986 <_Thread_queue_Extract_priority_helper+0xa6><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4b908: 200a movel %a2,%d0 4b90a: 0680 0000 003c addil #60,%d0
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
4b910: 2652 moveal %a2@,%a3
previous_node = the_node->previous;
4b912: 226a 0004 moveal %a2@(4),%a1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4b916: 206a 0038 moveal %a2@(56),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4b91a: b088 cmpl %a0,%d0
4b91c: 6774 beqs 4b992 <_Thread_queue_Extract_priority_helper+0xb2>
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
4b91e: 286a 0040 moveal %a2@(64),%a4
new_second_node = new_first_node->next;
4b922: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4b924: 2748 0004 movel %a0,%a3@(4)
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
4b928: 2288 movel %a0,%a1@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4b92a: 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;
4b92e: 208b movel %a3,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4b930: 202a 0040 movel %a2@(64),%d0 4b934: b0aa 0038 cmpl %a2@(56),%d0
4b938: 6716 beqs 4b950 <_Thread_queue_Extract_priority_helper+0x70>
/* > two threads on 2-n */
new_second_node->previous =
4b93a: 43e8 0038 lea %a0@(56),%a1 4b93e: 2b49 0004 movel %a1,%a5@(4)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
4b942: 214d 0038 movel %a5,%a0@(56)
new_first_thread->Wait.Block2n.last = last_node;
4b946: 214c 0040 movel %a4,%a0@(64)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
4b94a: 41e8 003c lea %a0@(60),%a0 4b94e: 2888 movel %a0,%a4@
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4b950: 4a02 tstb %d2
4b952: 6626 bnes 4b97a <_Thread_queue_Extract_priority_helper+0x9a>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4b954: 7002 moveq #2,%d0 4b956: b0aa 0050 cmpl %a2@(80),%d0
4b95a: 6742 beqs 4b99e <_Thread_queue_Extract_priority_helper+0xbe>
_ISR_Enable( level );
4b95c: 46c1 movew %d1,%sr 4b95e: 2d4a 0008 movel %a2,%fp@(8) 4b962: 227c 1003 fff8 moveal #268697592,%a1
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4b968: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b96e: 2d49 000c movel %a1,%fp@(12) 4b972: 4e5e unlk %fp 4b974: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
4b97a: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4b97c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b982: 4e5e unlk %fp 4b984: 4e75 rts
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4b986: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4b988: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b98e: 4e5e unlk %fp 4b990: 4e75 rts
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
4b992: 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;
4b996: 228b movel %a3,%a1@
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4b998: 4a02 tstb %d2
4b99a: 67b8 beqs 4b954 <_Thread_queue_Extract_priority_helper+0x74>
4b99c: 60dc bras 4b97a <_Thread_queue_Extract_priority_helper+0x9a> 4b99e: 7003 moveq #3,%d0 4b9a0: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4b9a4: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4b9a6: 486a 0048 pea %a2@(72) 4b9aa: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 4b9b0: 588f addql #4,%sp 4b9b2: 227c 1003 fff8 moveal #268697592,%a1 4b9b8: 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
}
4b9bc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b9c2: 2d49 000c movel %a1,%fp@(12) 4b9c6: 4e5e unlk %fp 4b9c8: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
...
0004848c <_Thread_queue_Initialize>:
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
4848c: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
4848e: 4e56 0000 linkw %fp,#0 48492: 206e 0008 moveal %fp@(8),%a0
the_thread_queue->state = state;
48496: 216e 0010 0038 movel %fp@(16),%a0@(56)
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
4849c: 202e 000c movel %fp@(12),%d0
the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status;
484a0: 216e 0014 003c movel %fp@(20),%a0@(60)
States_Control state,
uint32_t timeout_status
)
{
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
484a6: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
484aa: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
484ae: b280 cmpl %d0,%d1
484b0: 6712 beqs 484c4 <_Thread_queue_Initialize+0x38>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
484b2: 2008 movel %a0,%d0 484b4: 5880 addql #4,%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
484b6: 2148 0008 movel %a0,%a0@(8)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
484ba: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
484bc: 42a8 0004 clrl %a0@(4)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
484c0: 4e5e unlk %fp 484c2: 4e75 rts
* timeout_status - return on a timeout
*
* Output parameters: NONE
*/
void _Thread_queue_Initialize(
484c4: 2008 movel %a0,%d0 484c6: 0680 0000 0030 addil #48,%d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
484cc: 2208 movel %a0,%d1 484ce: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
484d0: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
484d4: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
484d6: 2148 0008 movel %a0,%a0@(8) 484da: 41e8 000c lea %a0@(12),%a0
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
484de: b088 cmpl %a0,%d0
484e0: 67de beqs 484c0 <_Thread_queue_Initialize+0x34> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
484e2: 2208 movel %a0,%d1 484e4: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
484e6: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
484ea: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
484ec: 2148 0008 movel %a0,%a0@(8) 484f0: 41e8 000c lea %a0@(12),%a0 484f4: b088 cmpl %a0,%d0
484f6: 66d4 bnes 484cc <_Thread_queue_Initialize+0x40>
484f8: 60c6 bras 484c0 <_Thread_queue_Initialize+0x34>
...
000484fc <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
484fc: 4e56 fff0 linkw %fp,#-16 48500: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48504: 246e 0008 moveal %fp@(8),%a2 48508: 266e 000c moveal %fp@(12),%a3
/* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue )
4850c: 4a8a tstl %a2
4850e: 6708 beqs 48518 <_Thread_queue_Requeue+0x1c> <== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
48510: 7001 moveq #1,%d0 48512: b0aa 0034 cmpl %a2@(52),%d0
48516: 670a beqs 48522 <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
48518: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4851e: 4e5e unlk %fp <== NOT EXECUTED 48520: 4e75 rts <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
48522: 303c 0700 movew #1792,%d0 48526: 40c2 movew %sr,%d2 48528: 8082 orl %d2,%d0 4852a: 46c0 movew %d0,%sr
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4852c: 202b 0010 movel %a3@(16),%d0 48530: 0280 0003 bee0 andil #245472,%d0
48536: 660c bnes 48544 <_Thread_queue_Requeue+0x48> <== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
48538: 46c2 movew %d2,%sr <== NOT EXECUTED
} }
4853a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48540: 4e5e unlk %fp 48542: 4e75 rts
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
48544: 4878 0001 pea 1 <ADD> 48548: 7001 moveq #1,%d0 4854a: 2f0b movel %a3,%sp@- 4854c: 2540 0030 movel %d0,%a2@(48) 48550: 2f0a movel %a2,%sp@- 48552: 4eb9 0004 b8e0 jsr 4b8e0 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
48558: 486e fffc pea %fp@(-4) 4855c: 2f0b movel %a3,%sp@- 4855e: 2f0a movel %a2,%sp@- 48560: 4eb9 0004 82ac jsr 482ac <_Thread_queue_Enqueue_priority> 48566: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
4856a: 46c2 movew %d2,%sr 4856c: 60cc bras 4853a <_Thread_queue_Requeue+0x3e>
...
00048570 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
48570: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
48574: 486e fffc pea %fp@(-4) 48578: 2f2e 0008 movel %fp@(8),%sp@- 4857c: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get>
switch ( location ) {
48582: 508f addql #8,%sp 48584: 4aae fffc tstl %fp@(-4)
48588: 6618 bnes 485a2 <_Thread_queue_Timeout+0x32> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
4858a: 2f00 movel %d0,%sp@- 4858c: 4eb9 0004 b9d0 jsr 4b9d0 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
48592: 588f addql #4,%sp 48594: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 4859a: 5380 subql #1,%d0 4859c: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
485a2: 4e5e unlk %fp
...
0005944c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
5944c: 4e56 ffb0 linkw %fp,#-80 59450: 41ee ffec lea %fp@(-20),%a0 59454: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59458: 246e 0008 moveal %fp@(8),%a2 5945c: 2c0e movel %fp,%d6 5945e: 260e movel %fp,%d3 59460: 5186 subql #8,%d6 59462: 0683 ffff ffe8 addil #-24,%d3
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59468: 240a movel %a2,%d2
/*
* 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 );
5946a: 2a0a movel %a2,%d5 5946c: 4bf9 0005 d4f0 lea 5d4f0 <_Watchdog_Adjust_to_chain>,%a5
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59472: 0682 0000 0030 addil #48,%d2
/*
* 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 );
59478: 0685 0000 0068 addil #104,%d5 5947e: 47f9 0005 9eac lea 59eac <_Chain_Get>,%a3 59484: 49f9 0005 d580 lea 5d580 <_Watchdog_Insert>,%a4
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
5948a: 283c 0000 0700 movel #1792,%d4 59490: 2d48 ffd8 movel %a0,%fp@(-40)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
59494: 41ea 0008 lea %a2@(8),%a0 59498: 2d48 ffe0 movel %a0,%fp@(-32)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
5949c: 41ea 0040 lea %a2@(64),%a0 594a0: 2d48 ffe4 movel %a0,%fp@(-28)
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
594a4: 41ee fff4 lea %fp@(-12),%a0 594a8: 2d48 fffc movel %a0,%fp@(-4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
594ac: 41ee ffec lea %fp@(-20),%a0 594b0: 2d46 fff4 movel %d6,%fp@(-12)
the_chain->permanent_null = NULL;
594b4: 42ae fff8 clrl %fp@(-8)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
594b8: 2d48 ffe8 movel %a0,%fp@(-24)
the_chain->permanent_null = NULL;
594bc: 42ae ffec clrl %fp@(-20)
the_chain->last = _Chain_Head(the_chain);
594c0: 2d43 fff0 movel %d3,%fp@(-16)
{
/*
* 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;
594c4: 41ee fff4 lea %fp@(-12),%a0 594c8: 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;
594cc: 2039 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
594d2: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
594d6: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
594da: 9081 subl %d1,%d0 594dc: 2f03 movel %d3,%sp@- 594de: 2f00 movel %d0,%sp@- 594e0: 2f02 movel %d2,%sp@- 594e2: 4e95 jsr %a5@
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
594e4: 2039 0007 d146 movel 7d146 <_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 ) {
594ea: 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;
594ee: 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 ) {
594f2: b280 cmpl %d0,%d1 594f4: 6500 0086 bcsw 5957c <_Timer_server_Body+0x130>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
594f8: b280 cmpl %d0,%d1 594fa: 6200 00a4 bhiw 595a0 <_Timer_server_Body+0x154>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
594fe: 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 );
59502: 202a 0078 movel %a2@(120),%d0 59506: 2f00 movel %d0,%sp@- 59508: 4e93 jsr %a3@
if ( timer == NULL ) {
5950a: 588f addql #4,%sp 5950c: 4a80 tstl %d0
5950e: 672e beqs 5953e <_Timer_server_Body+0xf2> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59510: 2040 moveal %d0,%a0 <== NOT EXECUTED 59512: 7e01 moveq #1,%d7 <== NOT EXECUTED 59514: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 59518: be81 cmpl %d1,%d7 <== NOT EXECUTED 5951a: 6700 00a8 beqw 595c4 <_Timer_server_Body+0x178> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
5951e: 7e03 moveq #3,%d7 <== NOT EXECUTED 59520: be81 cmpl %d1,%d7 <== NOT EXECUTED 59522: 66de bnes 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59524: 2040 moveal %d0,%a0 <== NOT EXECUTED 59526: 4868 0010 pea %a0@(16) <== NOT EXECUTED 5952a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5952c: 4e94 jsr %a4@ <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
5952e: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59532: 508f addql #8,%sp <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59534: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59536: 4e93 jsr %a3@ <== NOT EXECUTED
if ( timer == NULL ) {
59538: 588f addql #4,%sp <== NOT EXECUTED 5953a: 4a80 tstl %d0 <== NOT EXECUTED 5953c: 66d2 bnes 59510 <_Timer_server_Body+0xc4> <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
5953e: 2004 movel %d4,%d0 59540: 40c1 movew %sr,%d1 59542: 8081 orl %d1,%d0 59544: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
59546: bcae fff4 cmpl %fp@(-12),%d6 5954a: 6700 0086 beqw 595d2 <_Timer_server_Body+0x186>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
5954e: 46c1 movew %d1,%sr <== NOT EXECUTED
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
59550: 2039 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59556: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
5955a: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5955e: 9081 subl %d1,%d0 <== NOT EXECUTED 59560: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59562: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59564: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59566: 4e95 jsr %a5@ <== NOT EXECUTED
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59568: 2039 0007 d146 movel 7d146 <_TOD_Now>,%d0 <== NOT EXECUTED
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
5956e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
59572: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
59576: b280 cmpl %d0,%d1 <== NOT EXECUTED 59578: 6400 ff7e bccw 594f8 <_Timer_server_Body+0xac> <== NOT EXECUTED
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5957c: 2f03 movel %d3,%sp@- 5957e: 2e00 movel %d0,%d7 59580: 9e81 subl %d1,%d7 59582: 2f07 movel %d7,%sp@- 59584: 2d40 ffdc movel %d0,%fp@(-36) 59588: 2f05 movel %d5,%sp@- 5958a: 4eb9 0005 d4f0 jsr 5d4f0 <_Watchdog_Adjust_to_chain> 59590: 202e ffdc movel %fp@(-36),%d0 59594: 4fef 000c lea %sp@(12),%sp
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59598: 2540 0074 movel %d0,%a2@(116) 5959c: 6000 ff64 braw 59502 <_Timer_server_Body+0xb6>
/*
* 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 );
595a0: 9280 subl %d0,%d1 595a2: 2f01 movel %d1,%sp@- 595a4: 4878 0001 pea 1 <ADD> 595a8: 2d40 ffdc movel %d0,%fp@(-36) 595ac: 2f05 movel %d5,%sp@- 595ae: 4eb9 0005 d45c jsr 5d45c <_Watchdog_Adjust> 595b4: 202e ffdc movel %fp@(-36),%d0 595b8: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
595bc: 2540 0074 movel %d0,%a2@(116) 595c0: 6000 ff40 braw 59502 <_Timer_server_Body+0xb6>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
595c4: 4868 0010 pea %a0@(16) <== NOT EXECUTED 595c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 595ca: 4e94 jsr %a4@ <== NOT EXECUTED 595cc: 508f addql #8,%sp <== NOT EXECUTED 595ce: 6000 ff32 braw 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
595d2: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
595d6: 46c1 movew %d1,%sr
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
595d8: 202e ffd8 movel %fp@(-40),%d0 595dc: b0ae ffe8 cmpl %fp@(-24),%d0
595e0: 6752 beqs 59634 <_Timer_server_Body+0x1e8>
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
595e2: 2204 movel %d4,%d1 595e4: 40c0 movew %sr,%d0 595e6: 8280 orl %d0,%d1 595e8: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
595ea: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
595ee: b1ee ffd8 cmpal %fp@(-40),%a0
595f2: 6732 beqs 59626 <_Timer_server_Body+0x1da> <== NEVER TAKEN
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
595f4: 2250 moveal %a0@,%a1
the_chain->first = new_first;
595f6: 2d49 ffe8 movel %a1,%fp@(-24)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
595fa: 42a8 0008 clrl %a0@(8)
new_first->previous = _Chain_Head(the_chain);
595fe: 2343 0004 movel %d3,%a1@(4)
_ISR_Enable( level );
59602: 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 );
59604: 2f28 0024 movel %a0@(36),%sp@- 59608: 2f28 0020 movel %a0@(32),%sp@- 5960c: 2068 001c moveal %a0@(28),%a0 59610: 4e90 jsr %a0@
}
59612: 508f addql #8,%sp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
59614: 2204 movel %d4,%d1 59616: 40c0 movew %sr,%d0 59618: 8280 orl %d0,%d1 5961a: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5961c: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
59620: b1ee ffd8 cmpal %fp@(-40),%a0
59624: 66ce bnes 595f4 <_Timer_server_Body+0x1a8>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
59626: 46c0 movew %d0,%sr
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
59628: 41ee fff4 lea %fp@(-12),%a0 5962c: 2548 0078 movel %a0,%a2@(120) 59630: 6000 fe9a braw 594cc <_Timer_server_Body+0x80>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
59634: 4207 clrb %d7 59636: 1547 007c moveb %d7,%a2@(124) 5963a: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 59640: 5280 addql #1,%d0 59642: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
59648: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 5964c: 2f12 movel %a2@,%sp@- 5964e: 4eb9 0005 cbac jsr 5cbac <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
59654: 2f0a movel %a2,%sp@- 59656: 4eba fd1c jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
5965a: 2f0a movel %a2,%sp@- 5965c: 4eba fd80 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
59660: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
ts->active = true;
59666: 7001 moveq #1,%d0 59668: 1540 007c moveb %d0,%a2@(124)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
5966c: 2f2e ffe0 movel %fp@(-32),%sp@- 59670: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
59676: 2f2e ffe4 movel %fp@(-28),%sp@- 5967a: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> 59680: 4fef 0018 lea %sp@(24),%sp 59684: 6000 fe3e braw 594c4 <_Timer_server_Body+0x78>
00059688 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
59688: 4e56 fff0 linkw %fp,#-16 5968c: 206e 000c moveal %fp@(12),%a0 59690: 48d7 041c moveml %d2-%d4/%a2,%sp@ 59694: 246e 0008 moveal %fp@(8),%a2
if ( ts->insert_chain == NULL ) {
59698: 202a 0078 movel %a2@(120),%d0
5969c: 671a beqs 596b8 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
5969e: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 596a2: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED
} }
596a6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
596ac: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
} }
596b0: 4e5e unlk %fp <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
596b2: 4ef9 0005 9e74 jmp 59e74 <_Chain_Append> <== NOT EXECUTED
596b8: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 596be: 5280 addql #1,%d0 596c0: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
596c6: 2028 0038 movel %a0@(56),%d0 596ca: 7201 moveq #1,%d1 596cc: b280 cmpl %d0,%d1 596ce: 6700 0088 beqw 59758 <_Timer_server_Schedule_operation_method+0xd0>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
596d2: 7203 moveq #3,%d1 596d4: b280 cmpl %d0,%d1
596d6: 670e beqs 596e6 <_Timer_server_Schedule_operation_method+0x5e>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
596d8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 596de: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
596e0: 4ef9 0005 c164 jmp 5c164 <_Thread_Enable_dispatch>
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
596e6: 203c 0000 0700 movel #1792,%d0 596ec: 40c2 movew %sr,%d2 596ee: 8082 orl %d2,%d0 596f0: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
596f2: 260a movel %a2,%d3 596f4: 0683 0000 006c addil #108,%d3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
596fa: 2039 0007 d146 movel 7d146 <_TOD_Now>,%d0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
59700: 222a 0074 movel %a2@(116),%d1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
59704: 226a 0068 moveal %a2@(104),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
59708: b689 cmpl %a1,%d3
5970a: 671a beqs 59726 <_Timer_server_Schedule_operation_method+0x9e>
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
5970c: 2629 0010 movel %a1@(16),%d3
if ( snapshot > last_snapshot ) {
59710: b280 cmpl %d0,%d1 59712: 6400 00b8 bccw 597cc <_Timer_server_Schedule_operation_method+0x144>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
59716: 2800 movel %d0,%d4 59718: 9881 subl %d1,%d4
if (delta_interval > delta) {
5971a: b883 cmpl %d3,%d4 5971c: 6500 00ba bcsw 597d8 <_Timer_server_Schedule_operation_method+0x150>
59720: 4281 clrl %d1 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
59722: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED
}
ts->TOD_watchdogs.last_snapshot = snapshot;
59726: 2540 0074 movel %d0,%a2@(116)
_ISR_Enable( level );
5972a: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
5972c: 4868 0010 pea %a0@(16) 59730: 486a 0068 pea %a2@(104) 59734: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert>
if ( !ts->active ) {
5973a: 508f addql #8,%sp 5973c: 102a 007c moveb %a2@(124),%d0
59740: 6696 bnes 596d8 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_tod_system_watchdog( ts );
59742: 2f0a movel %a2,%sp@- 59744: 4eba fc98 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) 59748: 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 );
}
}
5974a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59750: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
59752: 4ef9 0005 c164 jmp 5c164 <_Thread_Enable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
59758: 203c 0000 0700 movel #1792,%d0 5975e: 40c3 movew %sr,%d3 59760: 8083 orl %d3,%d0 59762: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
59764: 2039 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d0 5976a: 240a movel %a2,%d2 5976c: 0682 0000 0034 addil #52,%d2
last_snapshot = ts->Interval_watchdogs.last_snapshot;
59772: 222a 003c movel %a2@(60),%d1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
59776: 226a 0030 moveal %a2@(48),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5977a: b489 cmpl %a1,%d2
5977c: 6712 beqs 59790 <_Timer_server_Schedule_operation_method+0x108>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
5977e: 2800 movel %d0,%d4 59780: 9881 subl %d1,%d4
delta_interval = first_watchdog->delta_interval;
59782: 2429 0010 movel %a1@(16),%d2
if (delta_interval > delta) {
59786: b484 cmpl %d4,%d2
59788: 623a bhis 597c4 <_Timer_server_Schedule_operation_method+0x13c>
5978a: 4282 clrl %d2
delta_interval -= delta;
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
5978c: 2342 0010 movel %d2,%a1@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
59790: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
59794: 46c3 movew %d3,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
59796: 4868 0010 pea %a0@(16) 5979a: 486a 0030 pea %a2@(48) 5979e: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert>
if ( !ts->active ) {
597a4: 508f addql #8,%sp 597a6: 102a 007c moveb %a2@(124),%d0 597aa: 6600 ff2c bnew 596d8 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_interval_system_watchdog( ts );
597ae: 2f0a movel %a2,%sp@- 597b0: 4eba fbc2 jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) 597b4: 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 );
}
}
597b6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 597bc: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
597be: 4ef9 0005 c164 jmp 5c164 <_Thread_Enable_dispatch>
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
597c4: 9484 subl %d4,%d2
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
597c6: 2342 0010 movel %d2,%a1@(16) 597ca: 60c4 bras 59790 <_Timer_server_Schedule_operation_method+0x108>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
597cc: d283 addl %d3,%d1
delta_interval += delta;
597ce: 9280 subl %d0,%d1
}
first_watchdog->delta_interval = delta_interval;
597d0: 2341 0010 movel %d1,%a1@(16) 597d4: 6000 ff50 braw 59726 <_Timer_server_Schedule_operation_method+0x9e>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
597d8: 9684 subl %d4,%d3 597da: 2203 movel %d3,%d1
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
597dc: 2341 0010 movel %d1,%a1@(16) 597e0: 6000 ff44 braw 59726 <_Timer_server_Schedule_operation_method+0x9e>
00048ad4 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
48ad4: 4e56 0000 linkw %fp,#0 48ad8: 226e 0008 moveal %fp@(8),%a1 48adc: 2f0a movel %a2,%sp@- 48ade: 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;
48ae2: 206a 0004 moveal %a2@(4),%a0 48ae6: d1e9 0004 addal %a1@(4),%a0
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
48aea: 2208 movel %a0,%d1
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
48aec: 2012 movel %a2@,%d0
/* Add the basics */
time->tv_sec += add->tv_sec;
48aee: d191 addl %d0,%a1@
time->tv_nsec += add->tv_nsec;
48af0: 2348 0004 movel %a0,%a1@(4)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
48af4: b1fc 3b9a c9ff cmpal #999999999,%a0
48afa: 631a blss 48b16 <_Timespec_Add_to+0x42>
48afc: 2051 moveal %a1@,%a0
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
48afe: 5288 addql #1,%a0
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
48b00: 0681 c465 3600 addil #-1000000000,%d1
time->tv_sec++;
seconds++;
48b06: 5280 addql #1,%d0
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
48b08: 0c81 3b9a c9ff cmpil #999999999,%d1
48b0e: 62ee bhis 48afe <_Timespec_Add_to+0x2a> <== NEVER TAKEN
48b10: 2288 movel %a0,%a1@ 48b12: 2341 0004 movel %d1,%a1@(4)
time->tv_sec++;
seconds++;
}
return seconds;
}
48b16: 245f moveal %sp@+,%a2
48b18: 4e5e unlk %fp <== NOT EXECUTED
0004a714 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
4a714: 4e56 0000 linkw %fp,#0 4a718: 226e 0008 moveal %fp@(8),%a1 4a71c: 206e 000c moveal %fp@(12),%a0
if ( lhs->tv_sec > rhs->tv_sec )
4a720: 2211 movel %a1@,%d1 4a722: 2010 movel %a0@,%d0 4a724: b081 cmpl %d1,%d0
4a726: 6d18 blts 4a740 <_Timespec_Greater_than+0x2c>
return true;
if ( lhs->tv_sec < rhs->tv_sec )
4a728: 6e10 bgts 4a73a <_Timespec_Greater_than+0x26> <== NEVER TAKEN
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
4a72a: 2068 0004 moveal %a0@(4),%a0 4a72e: b1e9 0004 cmpal %a1@(4),%a0 4a732: 5dc0 slt %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
4a734: 4e5e unlk %fp
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
4a736: 4480 negl %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
4a738: 4e75 rts
4a73a: 4e5e unlk %fp <== NOT EXECUTED
)
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
4a73c: 4200 clrb %d0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
4a73e: 4e75 rts <== NOT EXECUTED
4a740: 4e5e unlk %fp
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
4a742: 7001 moveq #1,%d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
...
00048cb2 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
48cb2: 4e56 fff0 linkw %fp,#-16 48cb6: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48cba: 242e 0008 movel %fp@(8),%d2 48cbe: 262e 0010 movel %fp@(16),%d3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48cc2: 2479 0005 db5e moveal 5db5e <_User_extensions_List+0x8>,%a2
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
48cc8: 182e 000f moveb %fp@(15),%d4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48ccc: b5fc 0005 db56 cmpal #383830,%a2
48cd2: 6726 beqs 48cfa <_User_extensions_Fatal+0x48> <== NEVER TAKEN
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 );
48cd4: 0284 0000 00ff andil #255,%d4
!_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 )
48cda: 206a 0030 moveal %a2@(48),%a0 48cde: 4a88 tstl %a0
48ce0: 670c beqs 48cee <_User_extensions_Fatal+0x3c>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
48ce2: 2f03 movel %d3,%sp@- 48ce4: 2f04 movel %d4,%sp@- 48ce6: 2f02 movel %d2,%sp@- 48ce8: 4e90 jsr %a0@ 48cea: 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 ) {
48cee: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48cf2: b5fc 0005 db56 cmpal #383830,%a2
48cf8: 66e0 bnes 48cda <_User_extensions_Fatal+0x28>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
48cfa: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
48d00: 4e5e unlk %fp <== NOT EXECUTED
00048b70 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
48b70: 4e56 ffec linkw %fp,#-20
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
48b74: 203c 0005 db5a movel #383834,%d0 48b7a: 23c0 0005 db56 movel %d0,5db56 <_User_extensions_List>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
48b80: 203c 0005 db56 movel #383830,%d0 48b86: 23c0 0005 db5e movel %d0,5db5e <_User_extensions_List+0x8>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
48b8c: 203c 0005 d9d0 movel #383440,%d0 48b92: 23c0 0005 d9cc movel %d0,5d9cc <_User_extensions_Switches_list>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
48b98: 203c 0005 d9cc movel #383436,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
48b9e: 42b9 0005 db5a clrl 5db5a <_User_extensions_List+0x4> 48ba4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%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;
48ba8: 2439 0005 c2ca movel 5c2ca <Configuration+0x36>,%d2
initial_extensions = Configuration.User_extension_table;
48bae: 2639 0005 c2ce movel 5c2ce <Configuration+0x3a>,%d3 48bb4: 42b9 0005 d9d0 clrl 5d9d0 <_User_extensions_Switches_list+0x4>
the_chain->last = _Chain_Head(the_chain);
48bba: 23c0 0005 d9d4 movel %d0,5d9d4 <_User_extensions_Switches_list+0x8>
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
48bc0: 4a83 tstl %d3
48bc2: 6764 beqs 48c28 <_User_extensions_Handler_initialization+0xb8>
extension = (User_extensions_Control *)
48bc4: 7834 moveq #52,%d4 48bc6: 4c02 4800 mulsl %d2,%d4 48bca: 2f04 movel %d4,%sp@- 48bcc: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error> 48bd2: 2440 moveal %d0,%a2
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
48bd4: 2f04 movel %d4,%sp@- 48bd6: 42a7 clrl %sp@- 48bd8: 2f00 movel %d0,%sp@- 48bda: 4eb9 0004 e0f8 jsr 4e0f8 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
48be0: 4fef 0010 lea %sp@(16),%sp 48be4: 4a82 tstl %d2
48be6: 6740 beqs 48c28 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
48be8: 4284 clrl %d4 48bea: 47f9 0004 bb5c lea 4bb5c <_User_extensions_Add_set>,%a3
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
48bf0: 2043 moveal %d3,%a0 48bf2: 5284 addql #1,%d4 48bf4: 0683 0000 0020 addil #32,%d3 48bfa: 2558 0014 movel %a0@+,%a2@(20) 48bfe: 2558 0018 movel %a0@+,%a2@(24) 48c02: 2558 001c movel %a0@+,%a2@(28) 48c06: 2558 0020 movel %a0@+,%a2@(32) 48c0a: 2558 0024 movel %a0@+,%a2@(36) 48c0e: 2558 0028 movel %a0@+,%a2@(40) 48c12: 2558 002c movel %a0@+,%a2@(44) 48c16: 2550 0030 movel %a0@,%a2@(48)
_User_extensions_Add_set( extension );
48c1a: 2f0a movel %a2,%sp@-
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
48c1c: 45ea 0034 lea %a2@(52),%a2 48c20: 4e93 jsr %a3@
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
48c22: 588f addql #4,%sp 48c24: b882 cmpl %d2,%d4
48c26: 65c8 bcss 48bf0 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
48c28: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48c2e: 4e5e unlk %fp
...
00048c34 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
48c34: 4e56 0000 linkw %fp,#0 48c38: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
48c3a: 2479 0005 db56 moveal 5db56 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
48c40: 2f02 movel %d2,%sp@- 48c42: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
48c46: b5fc 0005 db5a cmpal #383834,%a2
48c4c: 6718 beqs 48c66 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
!_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_begin != NULL )
48c4e: 206a 0028 moveal %a2@(40),%a0 48c52: 4a88 tstl %a0
48c54: 6706 beqs 48c5c <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
48c56: 2f02 movel %d2,%sp@- 48c58: 4e90 jsr %a0@ 48c5a: 588f addql #4,%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 ) {
48c5c: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
48c5e: b5fc 0005 db5a cmpal #383834,%a2
48c64: 66e8 bnes 48c4e <_User_extensions_Thread_begin+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
48c66: 242e fff8 movel %fp@(-8),%d2 48c6a: 246e fffc moveal %fp@(-4),%a2
48c6e: 4e5e unlk %fp <== NOT EXECUTED
00048d04 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
48d04: 4e56 0000 linkw %fp,#0 48d08: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
48d0a: 2479 0005 db56 moveal 5db56 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
48d10: 2f02 movel %d2,%sp@- 48d12: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
48d16: b5fc 0005 db5a cmpal #383834,%a2
48d1c: 6722 beqs 48d40 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
!_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_create != NULL ) {
48d1e: 206a 0014 moveal %a2@(20),%a0 48d22: 4a88 tstl %a0
48d24: 6710 beqs 48d36 <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
48d26: 2f02 movel %d2,%sp@- 48d28: 2f39 0005 da82 movel 5da82 <_Thread_Executing>,%sp@- 48d2e: 4e90 jsr %a0@
_Thread_Executing,
the_thread
);
if ( !status )
48d30: 508f addql #8,%sp 48d32: 4a00 tstb %d0
48d34: 670c beqs 48d42 <_User_extensions_Thread_create+0x3e>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
48d36: 2452 moveal %a2@,%a2
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
48d38: b5fc 0005 db5a cmpal #383834,%a2
48d3e: 66de bnes 48d1e <_User_extensions_Thread_create+0x1a>
48d40: 7001 moveq #1,%d0
return false;
}
}
return true;
}
48d42: 242e fff8 movel %fp@(-8),%d2 48d46: 246e fffc moveal %fp@(-4),%a2 48d4a: 4e5e unlk %fp
...
00048d50 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
48d50: 4e56 0000 linkw %fp,#0 48d54: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48d56: 2479 0005 db5e moveal 5db5e <_User_extensions_List+0x8>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
48d5c: 2f02 movel %d2,%sp@- 48d5e: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48d62: b5fc 0005 db56 cmpal #383830,%a2
48d68: 6720 beqs 48d8a <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
48d6a: 206a 0020 moveal %a2@(32),%a0 48d6e: 4a88 tstl %a0
48d70: 670c beqs 48d7e <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
48d72: 2f02 movel %d2,%sp@- 48d74: 2f39 0005 da82 movel 5da82 <_Thread_Executing>,%sp@- 48d7a: 4e90 jsr %a0@ 48d7c: 508f addql #8,%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 ) {
48d7e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48d82: b5fc 0005 db56 cmpal #383830,%a2
48d88: 66e0 bnes 48d6a <_User_extensions_Thread_delete+0x1a>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
48d8a: 242e fff8 movel %fp@(-8),%d2 48d8e: 246e fffc moveal %fp@(-4),%a2 48d92: 4e5e unlk %fp
...
00048c72 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
48c72: 4e56 0000 linkw %fp,#0 48c76: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48c78: 2479 0005 db5e moveal 5db5e <_User_extensions_List+0x8>,%a2
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
48c7e: 2f02 movel %d2,%sp@- 48c80: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48c84: b5fc 0005 db56 cmpal #383830,%a2
48c8a: 671a beqs 48ca6 <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
48c8c: 206a 002c moveal %a2@(44),%a0 48c90: 4a88 tstl %a0
48c92: 6706 beqs 48c9a <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
48c94: 2f02 movel %d2,%sp@- 48c96: 4e90 jsr %a0@
48c98: 588f addql #4,%sp <== NOT EXECUTED
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 ) {
48c9a: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48c9e: b5fc 0005 db56 cmpal #383830,%a2
48ca4: 66e6 bnes 48c8c <_User_extensions_Thread_exitted+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
48ca6: 242e fff8 movel %fp@(-8),%d2 48caa: 246e fffc moveal %fp@(-4),%a2
48cae: 4e5e unlk %fp <== NOT EXECUTED
00049a38 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
49a38: 4e56 0000 linkw %fp,#0 49a3c: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a3e: 2479 0005 eaee moveal 5eaee <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
49a44: 2f02 movel %d2,%sp@- 49a46: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a4a: b5fc 0005 eaf2 cmpal #387826,%a2
49a50: 671e beqs 49a70 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
!_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 )
49a52: 206a 001c moveal %a2@(28),%a0 49a56: 4a88 tstl %a0
49a58: 670c beqs 49a66 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
49a5a: 2f02 movel %d2,%sp@- 49a5c: 2f39 0005 ea1a movel 5ea1a <_Thread_Executing>,%sp@- 49a62: 4e90 jsr %a0@ 49a64: 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 ) {
49a66: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a68: b5fc 0005 eaf2 cmpal #387826,%a2
49a6e: 66e2 bnes 49a52 <_User_extensions_Thread_restart+0x1a>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
49a70: 242e fff8 movel %fp@(-8),%d2 49a74: 246e fffc moveal %fp@(-4),%a2
49a78: 4e5e unlk %fp <== NOT EXECUTED
00048d98 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
48d98: 4e56 0000 linkw %fp,#0 48d9c: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
48d9e: 2479 0005 db56 moveal 5db56 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
48da4: 2f02 movel %d2,%sp@- 48da6: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
48daa: b5fc 0005 db5a cmpal #383834,%a2
48db0: 671e beqs 48dd0 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
!_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 )
48db2: 206a 0018 moveal %a2@(24),%a0 48db6: 4a88 tstl %a0
48db8: 670c beqs 48dc6 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
48dba: 2f02 movel %d2,%sp@- 48dbc: 2f39 0005 da82 movel 5da82 <_Thread_Executing>,%sp@- 48dc2: 4e90 jsr %a0@ 48dc4: 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 ) {
48dc6: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
48dc8: b5fc 0005 db5a cmpal #383834,%a2
48dce: 66e2 bnes 48db2 <_User_extensions_Thread_start+0x1a>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
48dd0: 242e fff8 movel %fp@(-8),%d2 48dd4: 246e fffc moveal %fp@(-4),%a2
48dd8: 4e5e unlk %fp <== NOT EXECUTED
00048ddc <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
48ddc: 4e56 fff4 linkw %fp,#-12 48de0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48de4: 262e 0008 movel %fp@(8),%d3 48de8: 242e 000c movel %fp@(12),%d2
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
48dec: 2479 0005 d9cc moveal 5d9cc <_User_extensions_Switches_list>,%a2 48df2: b5fc 0005 d9d0 cmpal #383440,%a2
48df8: 6716 beqs 48e10 <_User_extensions_Thread_switch+0x34><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
48dfa: 2f02 movel %d2,%sp@- 48dfc: 2f03 movel %d3,%sp@- 48dfe: 206a 0008 moveal %a2@(8),%a0 48e02: 4e90 jsr %a0@
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
48e04: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
48e06: 508f addql #8,%sp 48e08: b5fc 0005 d9d0 cmpal #383440,%a2
48e0e: 66ea bnes 48dfa <_User_extensions_Thread_switch+0x1e>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
48e10: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48e16: 4e5e unlk %fp
...
0004ab6c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4ab6c: 4e56 ffe8 linkw %fp,#-24 4ab70: 226e 000c moveal %fp@(12),%a1 4ab74: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
ISR_Level level;
_ISR_Disable( level );
4ab78: 283c 0000 0700 movel #1792,%d4 4ab7e: 2004 movel %d4,%d0
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4ab80: 266e 0008 moveal %fp@(8),%a3 4ab84: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4ab88: 40c1 movew %sr,%d1 4ab8a: 8081 orl %d1,%d0 4ab8c: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4ab8e: 244b moveal %a3,%a2 4ab90: 205a moveal %a2@+,%a0
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
4ab92: b5c8 cmpal %a0,%a2
4ab94: 6748 beqs 4abde <_Watchdog_Adjust+0x72>
switch ( direction ) {
4ab96: 4a89 tstl %a1
4ab98: 6650 bnes 4abea <_Watchdog_Adjust+0x7e>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4ab9a: 4a82 tstl %d2
4ab9c: 6740 beqs 4abde <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4ab9e: 2628 0010 movel %a0@(16),%d3 4aba2: 49f9 0004 ade8 lea 4ade8 <_Watchdog_Tickle>,%a4 4aba8: b682 cmpl %d2,%d3
4abaa: 622c bhis 4abd8 <_Watchdog_Adjust+0x6c> <== NEVER TAKEN
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
4abac: 7001 moveq #1,%d0 4abae: 2140 0010 movel %d0,%a0@(16)
_ISR_Enable( level );
4abb2: 46c1 movew %d1,%sr
_Watchdog_Tickle( header );
4abb4: 2f0b movel %a3,%sp@- 4abb6: 4e94 jsr %a4@
_ISR_Disable( level );
4abb8: 2004 movel %d4,%d0 4abba: 40c1 movew %sr,%d1 4abbc: 8081 orl %d1,%d0 4abbe: 46c0 movew %d0,%sr
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
4abc0: 9483 subl %d3,%d2
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
4abc2: 588f addql #4,%sp 4abc4: 2013 movel %a3@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
4abc6: 2040 moveal %d0,%a0 4abc8: b08a cmpl %a2,%d0
4abca: 6712 beqs 4abde <_Watchdog_Adjust+0x72>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4abcc: 4a82 tstl %d2
4abce: 670e beqs 4abde <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4abd0: 2628 0010 movel %a0@(16),%d3 4abd4: b483 cmpl %d3,%d2
4abd6: 64d4 bccs 4abac <_Watchdog_Adjust+0x40>
_Watchdog_First( header )->delta_interval -= units;
4abd8: 9682 subl %d2,%d3 4abda: 2143 0010 movel %d3,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4abde: 46c1 movew %d1,%sr
}
4abe0: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4abe6: 4e5e unlk %fp 4abe8: 4e75 rts
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
4abea: 7001 moveq #1,%d0 4abec: b089 cmpl %a1,%d0
4abee: 66ee bnes 4abde <_Watchdog_Adjust+0x72> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4abf0: d5a8 0010 addl %d2,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4abf4: 46c1 movew %d1,%sr
}
4abf6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4abfc: 4e5e unlk %fp <== NOT EXECUTED
0005d4f0 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
5d4f0: 4e56 ffe4 linkw %fp,#-28 5d4f4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5d4f8: 2a6e 0008 moveal %fp@(8),%a5 5d4fc: 282e 000c movel %fp@(12),%d4 5d500: 266e 0010 moveal %fp@(16),%a3
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
5d504: 675e beqs 5d564 <_Watchdog_Adjust_to_chain+0x74>
return;
}
_ISR_Disable( level );
5d506: 263c 0000 0700 movel #1792,%d3 5d50c: 2003 movel %d3,%d0 5d50e: 40c1 movew %sr,%d1 5d510: 8081 orl %d1,%d0 5d512: 46c0 movew %d0,%sr 5d514: 284d moveal %a5,%a4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5d516: 240b movel %a3,%d2 5d518: 5882 addql #4,%d2 5d51a: 205c moveal %a4@+,%a0
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
5d51c: b1cc cmpal %a4,%a0
5d51e: 6742 beqs 5d562 <_Watchdog_Adjust_to_chain+0x72>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
5d520: 2028 0010 movel %a0@(16),%d0 5d524: b880 cmpl %d0,%d4
5d526: 654c bcss 5d574 <_Watchdog_Adjust_to_chain+0x84> <== NEVER TAKEN
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
5d528: 9880 subl %d0,%d4
first->delta_interval = 0;
5d52a: 42a8 0010 clrl %a0@(16)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
5d52e: 2250 moveal %a0@,%a1
previous = the_node->previous;
5d530: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
5d534: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
5d536: 234a 0004 movel %a2,%a1@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
5d53a: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
5d53c: 226b 0008 moveal %a3@(8),%a1
the_chain->last = the_node;
5d540: 2748 0008 movel %a0,%a3@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
5d544: 2149 0004 movel %a1,%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;
5d548: 2288 movel %a0,%a1@
while ( 1 ) {
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
5d54a: 2003 movel %d3,%d0 5d54c: 46c1 movew %d1,%sr 5d54e: 8081 orl %d1,%d0 5d550: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5d552: 2055 moveal %a5@,%a0
if ( _Chain_Is_empty( header ) )
5d554: b1cc cmpal %a4,%a0
5d556: 6714 beqs 5d56c <_Watchdog_Adjust_to_chain+0x7c>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
5d558: 4aa8 0010 tstl %a0@(16)
5d55c: 67d0 beqs 5d52e <_Watchdog_Adjust_to_chain+0x3e>
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
5d55e: 4a84 tstl %d4
5d560: 66ba bnes 5d51c <_Watchdog_Adjust_to_chain+0x2c> <== NEVER TAKEN
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
5d562: 46c1 movew %d1,%sr
}
5d564: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5d568: 4e5e unlk %fp 5d56a: 4e75 rts
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5d56c: 204c moveal %a4,%a0
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
5d56e: 4a84 tstl %d4
5d570: 66aa bnes 5d51c <_Watchdog_Adjust_to_chain+0x2c>
5d572: 60ee bras 5d562 <_Watchdog_Adjust_to_chain+0x72>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
first->delta_interval -= units;
5d574: 9084 subl %d4,%d0 5d576: 2140 0010 movel %d0,%a0@(16)
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
5d57a: 46c1 movew %d1,%sr 5d57c: 60e6 bras 5d564 <_Watchdog_Adjust_to_chain+0x74>
...
00048e1c <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
48e1c: 4e56 ffec linkw %fp,#-20 48e20: 226e 000c moveal %fp@(12),%a1 48e24: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48e28: 246e 0008 moveal %fp@(8),%a2
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
_ISR_Disable( level );
48e2c: 2a3c 0000 0700 movel #1792,%d5 48e32: 2005 movel %d5,%d0
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
48e34: 2839 0005 da62 movel 5da62 <_ISR_Nest_level>,%d4
_ISR_Disable( level );
48e3a: 40c3 movew %sr,%d3 48e3c: 8083 orl %d3,%d0 48e3e: 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 ) {
48e40: 4aa9 0008 tstl %a1@(8) 48e44: 6600 00c6 bnew 48f0c <_Watchdog_Insert+0xf0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
48e48: 2039 0005 db04 movel 5db04 <_Watchdog_Sync_count>,%d0 48e4e: 5280 addql #1,%d0 48e50: 23c0 0005 db04 movel %d0,5db04 <_Watchdog_Sync_count>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
48e56: 7001 moveq #1,%d0 48e58: 2340 0008 movel %d0,%a1@(8)
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
48e5c: 2029 000c movel %a1@(12),%d0
* cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
48e60: 2052 moveal %a2@,%a0
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
48e62: 6764 beqs 48ec8 <_Watchdog_Insert+0xac>
48e64: 4a90 tstl %a0@
48e66: 6760 beqs 48ec8 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
48e68: 2228 0010 movel %a0@(16),%d1 48e6c: b280 cmpl %d0,%d1
48e6e: 6252 bhis 48ec2 <_Watchdog_Insert+0xa6>
* 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 );
48e70: 2405 movel %d5,%d2 48e72: 46c3 movew %d3,%sr 48e74: 8483 orl %d3,%d2 48e76: 46c2 movew %d2,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
48e78: 7401 moveq #1,%d2 48e7a: b4a9 0008 cmpl %a1@(8),%d2
48e7e: 666e bnes 48eee <_Watchdog_Insert+0xd2>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
48e80: 2439 0005 da7e movel 5da7e <_Watchdog_Sync_level>,%d2 48e86: b484 cmpl %d4,%d2
48e88: 6230 bhis 48eba <_Watchdog_Insert+0x9e>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
48e8a: 9081 subl %d1,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
48e8c: 2050 moveal %a0@,%a0
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
48e8e: 4a80 tstl %d0
48e90: 6736 beqs 48ec8 <_Watchdog_Insert+0xac>
48e92: 4a90 tstl %a0@
48e94: 6732 beqs 48ec8 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
48e96: 2228 0010 movel %a0@(16),%d1 48e9a: b081 cmpl %d1,%d0
48e9c: 6524 bcss 48ec2 <_Watchdog_Insert+0xa6>
* 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 );
48e9e: 2405 movel %d5,%d2 48ea0: 46c3 movew %d3,%sr 48ea2: 8483 orl %d3,%d2 48ea4: 46c2 movew %d2,%sr
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
48ea6: 9081 subl %d1,%d0
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
48ea8: 7201 moveq #1,%d1 48eaa: b2a9 0008 cmpl %a1@(8),%d1
48eae: 663e bnes 48eee <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
48eb0: 2239 0005 da7e movel 5da7e <_Watchdog_Sync_level>,%d1 48eb6: b284 cmpl %d4,%d1
48eb8: 63d2 blss 48e8c <_Watchdog_Insert+0x70>
_Watchdog_Sync_level = insert_isr_nest_level;
48eba: 23c4 0005 da7e movel %d4,5da7e <_Watchdog_Sync_level>
goto restart;
48ec0: 609a bras 48e5c <_Watchdog_Insert+0x40>
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
48ec2: 9280 subl %d0,%d1 48ec4: 2141 0010 movel %d1,%a0@(16)
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
48ec8: 2068 0004 moveal %a0@(4),%a0
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
48ecc: 7402 moveq #2,%d2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
48ece: 2450 moveal %a0@,%a2
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
48ed0: 2239 0005 db08 movel 5db08 <_Watchdog_Ticks_since_boot>,%d1
after_node->next = the_node;
48ed6: 2089 movel %a1,%a0@
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
48ed8: 2348 0004 movel %a0,%a1@(4) 48edc: 2341 0014 movel %d1,%a1@(20)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
48ee0: 2340 0010 movel %d0,%a1@(16)
before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node;
48ee4: 2549 0004 movel %a1,%a2@(4) 48ee8: 2342 0008 movel %d2,%a1@(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;
48eec: 228a movel %a2,%a1@
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
48eee: 23c4 0005 da7e movel %d4,5da7e <_Watchdog_Sync_level>
_Watchdog_Sync_count--;
48ef4: 2039 0005 db04 movel 5db04 <_Watchdog_Sync_count>,%d0 48efa: 5380 subql #1,%d0 48efc: 23c0 0005 db04 movel %d0,5db04 <_Watchdog_Sync_count>
_ISR_Enable( level );
48f02: 46c3 movew %d3,%sr
}
48f04: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48f08: 4e5e unlk %fp 48f0a: 4e75 rts
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
48f0c: 46c3 movew %d3,%sr
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
48f0e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48f12: 4e5e unlk %fp
...
00048f64 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
48f64: 203c 0000 0700 movel #1792,%d0
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
48f6a: 4e56 0000 linkw %fp,#0 48f6e: 206e 0008 moveal %fp@(8),%a0 48f72: 2f0a movel %a2,%sp@- 48f74: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
48f76: 40c1 movew %sr,%d1 48f78: 8081 orl %d1,%d0 48f7a: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
48f7c: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
48f80: 7401 moveq #1,%d2 48f82: b480 cmpl %d0,%d2
48f84: 6764 beqs 48fea <_Watchdog_Remove+0x86>
48f86: 6314 blss 48f9c <_Watchdog_Remove+0x38>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
48f88: 2279 0005 db08 moveal 5db08 <_Watchdog_Ticks_since_boot>,%a1 48f8e: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
48f92: 46c1 movew %d1,%sr
return( previous_state ); }
48f94: 241f movel %sp@+,%d2 48f96: 245f moveal %sp@+,%a2 48f98: 4e5e unlk %fp 48f9a: 4e75 rts
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
48f9c: 143c 0003 moveb #3,%d2 48fa0: b480 cmpl %d0,%d2
48fa2: 65e4 bcss 48f88 <_Watchdog_Remove+0x24> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
48fa4: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
48fa6: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
48faa: 4a91 tstl %a1@
48fac: 6708 beqs 48fb6 <_Watchdog_Remove+0x52>
next_watchdog->delta_interval += the_watchdog->delta_interval;
48fae: 2428 0010 movel %a0@(16),%d2 48fb2: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
48fb6: 2479 0005 db04 moveal 5db04 <_Watchdog_Sync_count>,%a2 48fbc: 4a8a tstl %a2
48fbe: 670c beqs 48fcc <_Watchdog_Remove+0x68>
_Watchdog_Sync_level = _ISR_Nest_level;
48fc0: 2479 0005 da62 moveal 5da62 <_ISR_Nest_level>,%a2 48fc6: 23ca 0005 da7e movel %a2,5da7e <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
48fcc: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
48fd0: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
48fd2: 234a 0004 movel %a2,%a1@(4)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
48fd6: 2279 0005 db08 moveal 5db08 <_Watchdog_Ticks_since_boot>,%a1 48fdc: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
48fe0: 46c1 movew %d1,%sr
return( previous_state ); }
48fe2: 241f movel %sp@+,%d2 48fe4: 245f moveal %sp@+,%a2 48fe6: 4e5e unlk %fp 48fe8: 4e75 rts
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
48fea: 2279 0005 db08 moveal 5db08 <_Watchdog_Ticks_since_boot>,%a1
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
48ff0: 42a8 0008 clrl %a0@(8)
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
48ff4: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
48ff8: 46c1 movew %d1,%sr
return( previous_state ); }
48ffa: 241f movel %sp@+,%d2 48ffc: 245f moveal %sp@+,%a2 48ffe: 4e5e unlk %fp
...
0004a50c <_Watchdog_Report_chain>:
)
{
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4a50c: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4a512: 4e56 ffe8 linkw %fp,#-24 4a516: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a51a: 242e 0008 movel %fp@(8),%d2 4a51e: 266e 000c moveal %fp@(12),%a3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4a522: 40c3 movew %sr,%d3 4a524: 8083 orl %d3,%d0 4a526: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
4a528: 2f0b movel %a3,%sp@- 4a52a: 4bf9 0004 4084 lea 44084 <printk>,%a5 4a530: 2f02 movel %d2,%sp@- 4a532: 4879 0005 d432 pea 5d432 <_Status_Object_name_errors_to_status+0x14> 4a538: 4e95 jsr %a5@
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4a53a: 245b moveal %a3@+,%a2
if ( !_Chain_Is_empty( header ) ) {
4a53c: 4fef 000c lea %sp@(12),%sp 4a540: b7ca cmpal %a2,%a3
4a542: 672c beqs 4a570 <_Watchdog_Report_chain+0x64>
4a544: 49f9 0004 a588 lea 4a588 <_Watchdog_Report>,%a4
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4a54a: 2f0a movel %a2,%sp@- 4a54c: 42a7 clrl %sp@- 4a54e: 4e94 jsr %a4@
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
4a550: 2452 moveal %a2@,%a2
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
4a552: 508f addql #8,%sp 4a554: b7ca cmpal %a2,%a3
4a556: 66f2 bnes 4a54a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4a558: 2f02 movel %d2,%sp@- 4a55a: 4879 0005 d449 pea 5d449 <_Status_Object_name_errors_to_status+0x2b> 4a560: 4e95 jsr %a5@ 4a562: 508f addql #8,%sp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
4a564: 46c3 movew %d3,%sr
}
4a566: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a56c: 4e5e unlk %fp 4a56e: 4e75 rts
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4a570: 4879 0005 d458 pea 5d458 <_Status_Object_name_errors_to_status+0x3a> 4a576: 4e95 jsr %a5@ 4a578: 588f addql #4,%sp
}
_ISR_Enable( level );
4a57a: 46c3 movew %d3,%sr
}
4a57c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a582: 4e5e unlk %fp
...
00049004 <_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 );
49004: 203c 0000 0700 movel #1792,%d0
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
4900a: 4e56 ffe8 linkw %fp,#-24 4900e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49012: 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 );
49016: 40c2 movew %sr,%d2 49018: 8082 orl %d2,%d0 4901a: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4901c: 264c moveal %a4,%a3 4901e: 245b moveal %a3@+,%a2
if ( _Chain_Is_empty( header ) )
49020: b7ca cmpal %a2,%a3
49022: 673e beqs 49062 <_Watchdog_Tickle+0x5e>
* 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) {
49024: 202a 0010 movel %a2@(16),%d0 49028: 4bf9 0004 8f64 lea 48f64 <_Watchdog_Remove>,%a5
4902e: 6708 beqs 49038 <_Watchdog_Tickle+0x34>
the_watchdog->delta_interval--;
49030: 5380 subql #1,%d0 49032: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
49036: 662a bnes 49062 <_Watchdog_Tickle+0x5e>
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49038: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
4903e: 2f0a movel %a2,%sp@- 49040: 4e95 jsr %a5@
_ISR_Enable( level );
49042: 46c2 movew %d2,%sr
switch( watchdog_state ) {
49044: 7202 moveq #2,%d1 49046: 588f addql #4,%sp 49048: b280 cmpl %d0,%d1
4904a: 6722 beqs 4906e <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
4904c: 2003 movel %d3,%d0 4904e: 40c2 movew %sr,%d2 49050: 8082 orl %d2,%d0 49052: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
49054: 2014 movel %a4@,%d0 49056: 2440 moveal %d0,%a2
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
49058: b08b cmpl %a3,%d0
4905a: 6706 beqs 49062 <_Watchdog_Tickle+0x5e>
4905c: 4aaa 0010 tstl %a2@(16)
49060: 67dc beqs 4903e <_Watchdog_Tickle+0x3a>
leave:
_ISR_Enable(level);
49062: 46c2 movew %d2,%sr
}
49064: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4906a: 4e5e unlk %fp 4906c: 4e75 rts
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
4906e: 2f2a 0024 movel %a2@(36),%sp@- 49072: 2f2a 0020 movel %a2@(32),%sp@- 49076: 206a 001c moveal %a2@(28),%a0 4907a: 4e90 jsr %a0@ 4907c: 508f addql #8,%sp 4907e: 60cc bras 4904c <_Watchdog_Tickle+0x48>
000490e8 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
490e8: 4e56 0000 linkw %fp,#0 490ec: 2f03 movel %d3,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size;
490ee: 2639 0005 c298 movel 5c298 <Configuration+0x4>,%d3
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
490f4: 2f02 movel %d2,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start;
490f6: 2439 0005 c294 movel 5c294 <Configuration>,%d2
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
490fc: 4a39 0005 c2bc tstb 5c2bc <Configuration+0x28>
49102: 6628 bnes 4912c <_Workspace_Handler_initialization+0x44>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
49104: 4878 0004 pea 4 <CONTEXT_ARG> 49108: 2f03 movel %d3,%sp@- 4910a: 2f02 movel %d2,%sp@- 4910c: 4879 0005 d9ea pea 5d9ea <_Workspace_Area> 49112: 4eb9 0004 6c04 jsr 46c04 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
49118: 4fef 0010 lea %sp@(16),%sp 4911c: 4a80 tstl %d0
4911e: 671e beqs 4913e <_Workspace_Handler_initialization+0x56>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
49120: 242e fff8 movel %fp@(-8),%d2 49124: 262e fffc movel %fp@(-4),%d3 49128: 4e5e unlk %fp 4912a: 4e75 rts
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
memset( starting_address, 0, size );
4912c: 2f03 movel %d3,%sp@- 4912e: 42a7 clrl %sp@- 49130: 2f02 movel %d2,%sp@- 49132: 4eb9 0004 e0f8 jsr 4e0f8 <memset> 49138: 4fef 000c lea %sp@(12),%sp 4913c: 60c6 bras 49104 <_Workspace_Handler_initialization+0x1c>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
4913e: 4878 0003 pea 3 <DIVIDE> 49142: 4878 0001 pea 1 <ADD> 49146: 42a7 clrl %sp@- 49148: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred>
...
0005a17c <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
5a17c: 4280 clrl %d0 <== NOT EXECUTED
return 0;
}
#endif
int __kill( pid_t pid, int sig )
{
5a17e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0; }
5a182: 4e5e unlk %fp <== NOT EXECUTED
...
0005a034 <_calloc_r>:
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
5a034: 4e56 0000 linkw %fp,#0 5a038: 202e 000c movel %fp@(12),%d0
return calloc( elements, size );
5a03c: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5a042: 2d40 0008 movel %d0,%fp@(8)
}
5a046: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
return calloc( elements, size );
5a048: 4ef9 0004 a498 jmp 4a498 <calloc>
...
00042e0a <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
42e0a: 4e56 0000 linkw %fp,#0 42e0e: 4eb9 0005 a8d8 jsr 5a8d8 <_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();
42e14: 4eb9 0004 2da4 jsr 42da4 <libc_wrapup>
rtems_shutdown_executive(status);
42e1a: 2f2e 0008 movel %fp@(8),%sp@- 42e1e: 4eb9 0004 63f4 jsr 463f4 <rtems_shutdown_executive>
42e24: 588f addql #4,%sp <== NOT EXECUTED 42e26: 60fe bras 42e26 <_exit+0x1c> <== NOT EXECUTED
00043b2c <_fcntl_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
int cmd,
int arg
)
{
43b2c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43b30: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 43b34: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return fcntl( fd, cmd, arg );
43b38: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 43b3e: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 43b42: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
43b46: 4e5e unlk %fp <== NOT EXECUTED
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
43b48: 4ef9 0004 3908 jmp 43908 <fcntl> <== NOT EXECUTED
...
0005a050 <_free_r>:
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
5a050: 4e56 0000 linkw %fp,#0
free( ptr );
5a054: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5a05a: 4e5e unlk %fp
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
free( ptr );
5a05c: 4ef9 0004 a584 jmp 4a584 <free>
...
0005a14a <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
5a14a: 7001 moveq #1,%d0 <== NOT EXECUTED
#include <reent.h>
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
5a14c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return getpid(); }
5a150: 4e5e unlk %fp <== NOT EXECUTED
0004a760 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
4a760: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return gettimeofday( tp, tzp ); }
4a764: 4e5e unlk %fp <== NOT EXECUTED
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
4a766: 4ef9 0004 a6fc jmp 4a6fc <gettimeofday> <== NOT EXECUTED
0004a76c <_gettimeofday_r>:
int _gettimeofday_r(
struct _reent *ignored_reentrancy_stuff __attribute__((unused)),
struct timeval *tp,
struct timezone *tzp
)
{
4a76c: 4e56 0000 linkw %fp,#0 4a770: 202e 000c movel %fp@(12),%d0
return gettimeofday( tp, tzp );
4a774: 2d6e 0010 000c movel %fp@(16),%fp@(12) 4a77a: 2d40 0008 movel %d0,%fp@(8)
}
4a77e: 4e5e unlk %fp
struct _reent *ignored_reentrancy_stuff __attribute__((unused)),
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
4a780: 4ef9 0004 a6fc jmp 4a6fc <gettimeofday>
...
0005a154 <_isatty_r>:
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
5a154: 4e56 0000 linkw %fp,#0
return isatty( fd );
5a158: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5a15e: 4e5e unlk %fp
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return isatty( fd );
5a160: 4ef9 0005 a82c jmp 5a82c <isatty>
...
0005a172 <_kill_r>:
#include <reent.h>
int _kill_r( struct _reent *ptr, pid_t pid, int sig )
{
return 0;
}
5a172: 4280 clrl %d0 <== NOT EXECUTED
#if defined(RTEMS_NEWLIB)
#include <reent.h>
int _kill_r( struct _reent *ptr, pid_t pid, int sig )
{
5a174: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0; }
5a178: 4e5e unlk %fp <== NOT EXECUTED
0004472c <_link_r>:
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
4472c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44730: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return link( existing, new );
44734: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 4473a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
4473e: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
44740: 4ef9 0004 4510 jmp 44510 <link> <== NOT EXECUTED
...
0005a32c <_malloc_r>:
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
5a32c: 4e56 0000 linkw %fp,#0
return malloc( size );
5a330: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5a336: 4e5e unlk %fp
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
return malloc( size );
5a338: 4ef9 0004 aaf4 jmp 4aaf4 <malloc>
...
0005a430 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
5a430: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5a434: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return realloc( ptr, size );
5a438: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5a43e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
5a442: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
5a444: 4ef9 0005 a470 jmp 5a470 <realloc> <== NOT EXECUTED
...
00046c8c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
46c8c: 4e56 ffa0 linkw %fp,#-96 46c90: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46c94: 246e 000c moveal %fp@(12),%a2
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
46c98: 2f0a movel %a2,%sp@-
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
46c9a: 2a2e 0010 movel %fp@(16),%d5
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
46c9e: 4eb9 0004 5660 jsr 45660 <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
46ca4: 588f addql #4,%sp
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
46ca6: 2400 movel %d0,%d2
if ( old_parent_pathlen == 0 )
46ca8: 6600 0334 bnew 46fde <_rename_r+0x352>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
46cac: 762f moveq #47,%d3 46cae: 1212 moveb %a2@,%d1 46cb0: 1001 moveb %d1,%d0 46cb2: 49c0 extbl %d0 46cb4: b680 cmpl %d0,%d3
46cb6: 670e beqs 46cc6 <_rename_r+0x3a> <== NEVER TAKEN
46cb8: 163c 005c moveb #92,%d3 46cbc: b680 cmpl %d0,%d3
46cbe: 6706 beqs 46cc6 <_rename_r+0x3a> <== NEVER TAKEN
46cc0: 4a01 tstb %d1 46cc2: 6600 01ac bnew 46e70 <_rename_r+0x1e4>
46cc6: 2079 0006 3f34 moveal 63f34 <rtems_current_user_env>,%a0 <== NOT EXECUTED 46ccc: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 46cd0: 220e movel %fp,%d1 <== NOT EXECUTED 46cd2: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 46cd8: 2841 moveal %d1,%a4 <== NOT EXECUTED 46cda: 200e movel %fp,%d0 <== NOT EXECUTED 46cdc: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 46ce2: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 46ce6: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 46cea: 26a8 0018 movel %a0@(24),%a3@ <== NOT EXECUTED 46cee: 28a8 001c movel %a0@(28),%a4@ <== NOT EXECUTED 46cf2: 2840 moveal %d0,%a4 <== NOT EXECUTED 46cf4: 28a8 0020 movel %a0@(32),%a4@ <== NOT EXECUTED 46cf8: 2aa8 0024 movel %a0@(36),%a5@ <== NOT EXECUTED 46cfc: 22a8 0028 movel %a0@(40),%a1@ <== NOT EXECUTED 46d00: 4204 clrb %d4 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
46d02: 2041 moveal %d1,%a0 46d04: 2840 moveal %d0,%a4
name = old + old_parent_pathlen;
46d06: d48a addl %a2,%d2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46d08: 45f9 0005 57e4 lea 557e4 <strlen>,%a2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46d0e: 260e movel %fp,%d3 46d10: 0683 ffff ffe8 addil #-24,%d3
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
46d16: 2d50 ffec movel %a0@,%fp@(-20) 46d1a: 2d51 fff8 movel %a1@,%fp@(-8) 46d1e: 2d54 fff0 movel %a4@,%fp@(-16) 46d22: 2d55 fff4 movel %a5@,%fp@(-12) 46d26: 2d53 ffe8 movel %a3@,%fp@(-24)
name = old + old_parent_pathlen;
46d2a: 2d42 fffc movel %d2,%fp@(-4)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46d2e: 2f02 movel %d2,%sp@- 46d30: 4e92 jsr %a2@ 46d32: 2e80 movel %d0,%sp@ 46d34: 2f02 movel %d2,%sp@- 46d36: 4eb9 0004 5618 jsr 45618 <rtems_filesystem_prefix_separators> 46d3c: d480 addl %d0,%d2 46d3e: 2d42 fffc movel %d2,%fp@(-4)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46d42: 2f02 movel %d2,%sp@- 46d44: 4e92 jsr %a2@ 46d46: 4297 clrl %sp@ 46d48: 2f03 movel %d3,%sp@- 46d4a: 42a7 clrl %sp@- 46d4c: 2f00 movel %d0,%sp@- 46d4e: 2f02 movel %d2,%sp@- 46d50: 4eb9 0004 56d2 jsr 456d2 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
46d56: 4fef 001c lea %sp@(28),%sp 46d5a: 4a80 tstl %d0 46d5c: 6600 01aa bnew 46f08 <_rename_r+0x27c>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
46d60: 2245 moveal %d5,%a1 46d62: 742f moveq #47,%d2 46d64: 1211 moveb %a1@,%d1 46d66: 1001 moveb %d1,%d0 46d68: 49c0 extbl %d0 46d6a: b480 cmpl %d0,%d2 46d6c: 6700 00d6 beqw 46e44 <_rename_r+0x1b8> 46d70: 143c 005c moveb #92,%d2 46d74: b480 cmpl %d0,%d2 46d76: 6700 00cc beqw 46e44 <_rename_r+0x1b8> 46d7a: 4a01 tstb %d1 46d7c: 6700 00c6 beqw 46e44 <_rename_r+0x1b8> 46d80: 2079 0006 3f34 moveal 63f34 <rtems_current_user_env>,%a0 46d86: 45ee ffc0 lea %fp@(-64),%a2 46d8a: 5888 addql #4,%a0 46d8c: 4280 clrl %d0 46d8e: 2498 movel %a0@+,%a2@ 46d90: 2d58 ffc4 movel %a0@+,%fp@(-60) 46d94: 2d58 ffc8 movel %a0@+,%fp@(-56) 46d98: 2d58 ffcc movel %a0@+,%fp@(-52) 46d9c: 2d50 ffd0 movel %a0@,%fp@(-48)
if ( !new_parent_loc.ops->evalformake_h ) {
46da0: 206e ffcc moveal %fp@(-52),%a0 46da4: 2068 0004 moveal %a0@(4),%a0 46da8: 4a88 tstl %a0 46daa: 6700 01e6 beqw 46f92 <_rename_r+0x306>
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 );
46dae: 486e fffc pea %fp@(-4) 46db2: 2245 moveal %d5,%a1 46db4: 2f0a movel %a2,%sp@- 46db6: 4871 0800 pea %a1@(00000000,%d0:l) 46dba: 4e90 jsr %a0@
if ( result != 0 ) {
46dbc: 4fef 000c lea %sp@(12),%sp 46dc0: 4a80 tstl %d0 46dc2: 6600 017a bnew 46f3e <_rename_r+0x2b2>
/*
* 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 ) {
46dc6: 202e ffd0 movel %fp@(-48),%d0 46dca: b0ae ffe4 cmpl %fp@(-28),%d0 46dce: 6600 00d8 bnew 46ea8 <_rename_r+0x21c>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
46dd2: 226e ffcc moveal %fp@(-52),%a1 46dd6: 2069 0040 moveal %a1@(64),%a0 46dda: 4a88 tstl %a0 46ddc: 6700 023e beqw 4701c <_rename_r+0x390>
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 );
46de0: 2f2e fffc movel %fp@(-4),%sp@- 46de4: 2f0a movel %a2,%sp@- 46de6: 2f03 movel %d3,%sp@- 46de8: 2f0b movel %a3,%sp@- 46dea: 4e90 jsr %a0@
rtems_filesystem_freenode( &new_parent_loc );
46dec: 206e ffcc moveal %fp@(-52),%a0
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 );
46df0: 2400 movel %d0,%d2
rtems_filesystem_freenode( &new_parent_loc );
46df2: 4fef 0010 lea %sp@(16),%sp 46df6: 4a88 tstl %a0
46df8: 670e beqs 46e08 <_rename_r+0x17c> <== NEVER TAKEN
46dfa: 2068 001c moveal %a0@(28),%a0 46dfe: 4a88 tstl %a0
46e00: 6706 beqs 46e08 <_rename_r+0x17c> <== NEVER TAKEN
46e02: 2f0a movel %a2,%sp@- 46e04: 4e90 jsr %a0@ 46e06: 588f addql #4,%sp
if ( free_old_parentloc )
46e08: 4a04 tstb %d4
46e0a: 6716 beqs 46e22 <_rename_r+0x196>
rtems_filesystem_freenode( &old_parent_loc );
46e0c: 206e ffe0 moveal %fp@(-32),%a0 46e10: 4a88 tstl %a0
46e12: 670e beqs 46e22 <_rename_r+0x196> <== NEVER TAKEN
46e14: 2068 001c moveal %a0@(28),%a0 46e18: 4a88 tstl %a0
46e1a: 6706 beqs 46e22 <_rename_r+0x196> <== NEVER TAKEN
46e1c: 2f0b movel %a3,%sp@- 46e1e: 4e90 jsr %a0@ 46e20: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
46e22: 206e fff4 moveal %fp@(-12),%a0 46e26: 4a88 tstl %a0
46e28: 670e beqs 46e38 <_rename_r+0x1ac> <== NEVER TAKEN
46e2a: 2068 001c moveal %a0@(28),%a0 46e2e: 4a88 tstl %a0
46e30: 6706 beqs 46e38 <_rename_r+0x1ac> <== NEVER TAKEN
46e32: 2f03 movel %d3,%sp@- 46e34: 4e90 jsr %a0@ 46e36: 588f addql #4,%sp
return result;
}
46e38: 2002 movel %d2,%d0 46e3a: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 46e40: 4e5e unlk %fp 46e42: 4e75 rts
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
46e44: 2079 0006 3f34 moveal 63f34 <rtems_current_user_env>,%a0 46e4a: 45ee ffc0 lea %fp@(-64),%a2 46e4e: 7001 moveq #1,%d0 46e50: 24a8 0018 movel %a0@(24),%a2@ 46e54: 2d68 001c ffc4 movel %a0@(28),%fp@(-60) 46e5a: 2d68 0020 ffc8 movel %a0@(32),%fp@(-56) 46e60: 2d68 0024 ffcc movel %a0@(36),%fp@(-52) 46e66: 2d68 0028 ffd0 movel %a0@(40),%fp@(-48) 46e6c: 6000 ff32 braw 46da0 <_rename_r+0x114>
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
46e70: 2079 0006 3f34 moveal 63f34 <rtems_current_user_env>,%a0 46e76: 47ee ffd4 lea %fp@(-44),%a3 46e7a: 5888 addql #4,%a0 46e7c: 220e movel %fp,%d1 46e7e: 0681 ffff ffd8 addil #-40,%d1 46e84: 2841 moveal %d1,%a4 46e86: 200e movel %fp,%d0 46e88: 0680 ffff ffdc addil #-36,%d0 46e8e: 4bee ffe0 lea %fp@(-32),%a5 46e92: 43ee ffe4 lea %fp@(-28),%a1 46e96: 2698 movel %a0@+,%a3@ 46e98: 2898 movel %a0@+,%a4@ 46e9a: 2840 moveal %d0,%a4 46e9c: 2898 movel %a0@+,%a4@ 46e9e: 2a98 movel %a0@+,%a5@ 46ea0: 2290 movel %a0@,%a1@ 46ea2: 4204 clrb %d4 46ea4: 6000 fe5c braw 46d02 <_rename_r+0x76>
* 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 ) {
rtems_filesystem_freenode( &new_parent_loc );
46ea8: 206e ffcc moveal %fp@(-52),%a0 46eac: 4a88 tstl %a0
46eae: 670e beqs 46ebe <_rename_r+0x232> <== NEVER TAKEN
46eb0: 2068 001c moveal %a0@(28),%a0 46eb4: 4a88 tstl %a0
46eb6: 6706 beqs 46ebe <_rename_r+0x232> <== NEVER TAKEN
46eb8: 2f0a movel %a2,%sp@- 46eba: 4e90 jsr %a0@ 46ebc: 588f addql #4,%sp
if ( free_old_parentloc )
46ebe: 4a04 tstb %d4
46ec0: 6716 beqs 46ed8 <_rename_r+0x24c>
rtems_filesystem_freenode( &old_parent_loc );
46ec2: 206e ffe0 moveal %fp@(-32),%a0 46ec6: 4a88 tstl %a0
46ec8: 670e beqs 46ed8 <_rename_r+0x24c> <== NEVER TAKEN
46eca: 2068 001c moveal %a0@(28),%a0 46ece: 4a88 tstl %a0
46ed0: 6706 beqs 46ed8 <_rename_r+0x24c> <== NEVER TAKEN
46ed2: 2f0b movel %a3,%sp@- 46ed4: 4e90 jsr %a0@ 46ed6: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
46ed8: 206e fff4 moveal %fp@(-12),%a0 46edc: 4a88 tstl %a0
46ede: 670e beqs 46eee <_rename_r+0x262> <== NEVER TAKEN
46ee0: 2068 001c moveal %a0@(28),%a0 46ee4: 4a88 tstl %a0
46ee6: 6706 beqs 46eee <_rename_r+0x262> <== NEVER TAKEN
46ee8: 2f03 movel %d3,%sp@- 46eea: 4e90 jsr %a0@ 46eec: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EXDEV );
46eee: 4eb9 0005 277c jsr 5277c <__errno> 46ef4: 74ff moveq #-1,%d2 46ef6: 2040 moveal %d0,%a0 46ef8: 7012 moveq #18,%d0 46efa: 2080 movel %d0,%a0@
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
46efc: 2002 movel %d2,%d0 46efe: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 46f04: 4e5e unlk %fp 46f06: 4e75 rts
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
46f08: 4a04 tstb %d4
46f0a: 660e bnes 46f1a <_rename_r+0x28e> <== ALWAYS TAKEN
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
46f0c: 74ff moveq #-1,%d2 <== NOT EXECUTED
return result;
}
46f0e: 2002 movel %d2,%d0 <== NOT EXECUTED 46f10: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 46f16: 4e5e unlk %fp <== NOT EXECUTED 46f18: 4e75 rts <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
46f1a: 206e ffe0 moveal %fp@(-32),%a0 46f1e: 4a88 tstl %a0
46f20: 67ea beqs 46f0c <_rename_r+0x280> <== NEVER TAKEN
46f22: 2028 001c movel %a0@(28),%d0
46f26: 67e4 beqs 46f0c <_rename_r+0x280> <== NEVER TAKEN
46f28: 2f0b movel %a3,%sp@- 46f2a: 2040 moveal %d0,%a0 46f2c: 74ff moveq #-1,%d2 46f2e: 4e90 jsr %a0@ 46f30: 588f addql #4,%sp
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
46f32: 2002 movel %d2,%d0 46f34: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 46f3a: 4e5e unlk %fp 46f3c: 4e75 rts
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
46f3e: 206e ffcc moveal %fp@(-52),%a0 46f42: 4a88 tstl %a0
46f44: 670e beqs 46f54 <_rename_r+0x2c8> <== NEVER TAKEN
46f46: 2068 001c moveal %a0@(28),%a0 46f4a: 4a88 tstl %a0
46f4c: 6706 beqs 46f54 <_rename_r+0x2c8> <== NEVER TAKEN
46f4e: 2f0a movel %a2,%sp@- 46f50: 4e90 jsr %a0@ 46f52: 588f addql #4,%sp
if ( free_old_parentloc )
46f54: 4a04 tstb %d4
46f56: 6716 beqs 46f6e <_rename_r+0x2e2> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
46f58: 206e ffe0 moveal %fp@(-32),%a0 46f5c: 4a88 tstl %a0
46f5e: 670e beqs 46f6e <_rename_r+0x2e2> <== NEVER TAKEN
46f60: 2068 001c moveal %a0@(28),%a0 46f64: 4a88 tstl %a0
46f66: 6706 beqs 46f6e <_rename_r+0x2e2> <== NEVER TAKEN
46f68: 2f0b movel %a3,%sp@- 46f6a: 4e90 jsr %a0@ 46f6c: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
46f6e: 206e fff4 moveal %fp@(-12),%a0 46f72: 4a88 tstl %a0
46f74: 6796 beqs 46f0c <_rename_r+0x280> <== NEVER TAKEN
46f76: 2028 001c movel %a0@(28),%d0
46f7a: 6790 beqs 46f0c <_rename_r+0x280> <== NEVER TAKEN
46f7c: 2f03 movel %d3,%sp@- 46f7e: 2840 moveal %d0,%a4 46f80: 74ff moveq #-1,%d2 46f82: 4e94 jsr %a4@ 46f84: 588f addql #4,%sp
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
46f86: 2002 movel %d2,%d0 46f88: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 46f8e: 4e5e unlk %fp 46f90: 4e75 rts
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
if ( !new_parent_loc.ops->evalformake_h ) {
if ( free_old_parentloc )
46f92: 4a04 tstb %d4
46f94: 6716 beqs 46fac <_rename_r+0x320> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
46f96: 206e ffe0 moveal %fp@(-32),%a0 46f9a: 4a88 tstl %a0
46f9c: 670e beqs 46fac <_rename_r+0x320> <== NEVER TAKEN
46f9e: 2068 001c moveal %a0@(28),%a0 46fa2: 4a88 tstl %a0
46fa4: 6706 beqs 46fac <_rename_r+0x320> <== NEVER TAKEN
46fa6: 2f0b movel %a3,%sp@- 46fa8: 4e90 jsr %a0@ 46faa: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
46fac: 206e fff4 moveal %fp@(-12),%a0 46fb0: 4a88 tstl %a0
46fb2: 670e beqs 46fc2 <_rename_r+0x336> <== NEVER TAKEN
46fb4: 2068 001c moveal %a0@(28),%a0 46fb8: 4a88 tstl %a0
46fba: 6706 beqs 46fc2 <_rename_r+0x336> <== NEVER TAKEN
46fbc: 2f03 movel %d3,%sp@- 46fbe: 4e90 jsr %a0@ 46fc0: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTSUP );
46fc2: 4eb9 0005 277c jsr 5277c <__errno> 46fc8: 74ff moveq #-1,%d2 46fca: 2040 moveal %d0,%a0
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
46fcc: 2002 movel %d2,%d0 46fce: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5
if ( !new_parent_loc.ops->evalformake_h ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
46fd4: 20bc 0000 0086 movel #134,%a0@
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
46fda: 4e5e unlk %fp 46fdc: 4e75 rts
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
46fde: 42a7 clrl %sp@- 46fe0: 47ee ffd4 lea %fp@(-44),%a3 46fe4: 2f0b movel %a3,%sp@- 46fe6: 4878 0002 pea 2 <DOUBLE_FLOAT> 46fea: 2f00 movel %d0,%sp@- 46fec: 2f0a movel %a2,%sp@- 46fee: 4eb9 0004 57dc jsr 457dc <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
46ff4: 4fef 0014 lea %sp@(20),%sp 46ff8: 4a80 tstl %d0 46ffa: 6600 ff10 bnew 46f0c <_rename_r+0x280> 46ffe: 220e movel %fp,%d1 47000: 200e movel %fp,%d0 47002: 0681 ffff ffd8 addil #-40,%d1 47008: 0680 ffff ffdc addil #-36,%d0 4700e: 4bee ffe0 lea %fp@(-32),%a5 47012: 43ee ffe4 lea %fp@(-28),%a1 47016: 7801 moveq #1,%d4 47018: 6000 fce8 braw 46d02 <_rename_r+0x76>
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
4701c: 2069 001c moveal %a1@(28),%a0 47020: 4a88 tstl %a0
47022: 6706 beqs 4702a <_rename_r+0x39e> <== NEVER TAKEN
47024: 2f0a movel %a2,%sp@- 47026: 4e90 jsr %a0@ 47028: 588f addql #4,%sp
if ( free_old_parentloc )
4702a: 4a04 tstb %d4
4702c: 6716 beqs 47044 <_rename_r+0x3b8> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
4702e: 206e ffe0 moveal %fp@(-32),%a0 47032: 4a88 tstl %a0
47034: 670e beqs 47044 <_rename_r+0x3b8> <== NEVER TAKEN
47036: 2068 001c moveal %a0@(28),%a0 4703a: 4a88 tstl %a0
4703c: 6706 beqs 47044 <_rename_r+0x3b8> <== NEVER TAKEN
4703e: 2f0b movel %a3,%sp@- 47040: 4e90 jsr %a0@ 47042: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
47044: 206e fff4 moveal %fp@(-12),%a0 47048: 4a88 tstl %a0
4704a: 670e beqs 4705a <_rename_r+0x3ce> <== NEVER TAKEN
4704c: 2068 001c moveal %a0@(28),%a0 47050: 4a88 tstl %a0
47052: 6706 beqs 4705a <_rename_r+0x3ce> <== NEVER TAKEN
47054: 2f03 movel %d3,%sp@- 47056: 4e90 jsr %a0@ 47058: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTSUP );
4705a: 4eb9 0005 277c jsr 5277c <__errno> 47060: 74ff moveq #-1,%d2 47062: 2240 moveal %d0,%a1
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
47064: 2002 movel %d2,%d0 47066: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4706c: 22bc 0000 0086 movel #134,%a1@
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
47072: 4e5e unlk %fp
...
00045246 <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
45246: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4524a: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return _STAT_NAME( path, buf );
4524e: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 45254: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
45258: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
4525a: 4ef9 0004 5160 jmp 45160 <stat> <== NOT EXECUTED
0004d80c <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
4d80c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return unlink( path );
4d810: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED
}
4d816: 4e5e unlk %fp <== NOT EXECUTED
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
4d818: 4ef9 0004 d5a4 jmp 4d5a4 <unlink> <== NOT EXECUTED
...
0005a44c <_write_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
5a44c: 4e56 0000 linkw %fp,#0 5a450: 222e 0010 movel %fp@(16),%d1 5a454: 202e 000c movel %fp@(12),%d0
return write( fd, buf, nbytes );
5a458: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5a45e: 2d41 000c movel %d1,%fp@(12) 5a462: 2d40 0008 movel %d0,%fp@(8)
}
5a466: 4e5e unlk %fp
int fd,
const void *buf,
size_t nbytes
)
{
return write( fd, buf, nbytes );
5a468: 4ef9 0005 a58c jmp 5a58c <write>
...
0004481c <access>:
int access(
const char *path,
int amode
)
{
4481c: 4e56 ffb8 linkw %fp,#-72 44820: 2f02 movel %d2,%sp@-
struct stat statbuf;
if ( stat(path, &statbuf) )
44822: 486e ffba pea %fp@(-70) 44826: 2f2e 0008 movel %fp@(8),%sp@-
int access(
const char *path,
int amode
)
{
4482a: 242e 000c movel %fp@(12),%d2
struct stat statbuf;
if ( stat(path, &statbuf) )
4482e: 4eb9 0004 66cc jsr 466cc <stat> 44834: 508f addql #8,%sp 44836: 4a80 tstl %d0
44838: 6626 bnes 44860 <access+0x44>
return -1;
if ( amode & R_OK ) {
4483a: 44c2 movew %d2,%ccr
4483c: 6716 beqs 44854 <access+0x38>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
4483e: 0802 0001 btst #1,%d2
44842: 6626 bnes 4486a <access+0x4e>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
44844: 0802 0000 btst #0,%d2
44848: 6632 bnes 4487c <access+0x60>
if ( !( statbuf.st_mode & S_IEXEC ) )
4484a: 4280 clrl %d0
return -1;
}
return 0;
}
4484c: 242e ffb4 movel %fp@(-76),%d2 44850: 4e5e unlk %fp 44852: 4e75 rts
if ( stat(path, &statbuf) )
return -1;
if ( amode & R_OK ) {
if (!( statbuf.st_mode & S_IREAD ))
44854: 202e ffc6 movel %fp@(-58),%d0 44858: 0280 0000 0100 andil #256,%d0
4485e: 66de bnes 4483e <access+0x22>
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
44860: 242e ffb4 movel %fp@(-76),%d2
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
44864: 70ff moveq #-1,%d0
return -1;
}
return 0;
}
44866: 4e5e unlk %fp 44868: 4e75 rts
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
4486a: 202e ffc6 movel %fp@(-58),%d0 4486e: 0280 0000 0080 andil #128,%d0
44874: 67ea beqs 44860 <access+0x44>
return -1;
}
if ( amode & X_OK ) {
44876: 0802 0000 btst #0,%d2
4487a: 67ce beqs 4484a <access+0x2e> <== NEVER TAKEN
if ( !( statbuf.st_mode & S_IEXEC ) )
4487c: 7040 moveq #64,%d0 4487e: c0ae ffc6 andl %fp@(-58),%d0
44882: 67dc beqs 44860 <access+0x44>
44884: 4280 clrl %d0 44886: 60c4 bras 4484c <access+0x30>
0004a498 <calloc>:
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
4a498: 4e56 0000 linkw %fp,#0
length = nelem * elsize;
4a49c: 41ee 0008 lea %fp@(8),%a0
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
4a4a0: 52b9 0005 d88c addql #1,5d88c <rtems_malloc_statistics+0x14> 4a4a6: 2f03 movel %d3,%sp@-
length = nelem * elsize;
4a4a8: 262e 000c movel %fp@(12),%d3 4a4ac: 4c10 3800 mulsl %a0@,%d3
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
4a4b0: 2f02 movel %d2,%sp@-
length = nelem * elsize;
cptr = malloc( length );
4a4b2: 2f03 movel %d3,%sp@- 4a4b4: 4eb9 0004 aaf4 jsr 4aaf4 <malloc>
if ( cptr )
4a4ba: 588f addql #4,%sp
size_t length;
MSBUMP(calloc_calls, 1);
length = nelem * elsize;
cptr = malloc( length );
4a4bc: 2400 movel %d0,%d2
if ( cptr )
4a4be: 6710 beqs 4a4d0 <calloc+0x38> <== NEVER TAKEN
memset( cptr, '\0', length );
4a4c0: 2f03 movel %d3,%sp@- 4a4c2: 42a7 clrl %sp@- 4a4c4: 2f00 movel %d0,%sp@- 4a4c6: 4eb9 0004 e0f8 jsr 4e0f8 <memset> 4a4cc: 4fef 000c lea %sp@(12),%sp
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
return cptr;
}
4a4d0: 2002 movel %d2,%d0
length = nelem * elsize;
cptr = malloc( length );
if ( cptr )
memset( cptr, '\0', length );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
4a4d2: 53b9 0005 d87c subql #1,5d87c <rtems_malloc_statistics+0x4>
return cptr;
}
4a4d8: 242e fff8 movel %fp@(-8),%d2 4a4dc: 262e fffc movel %fp@(-4),%d3
4a4e0: 4e5e unlk %fp <== NOT EXECUTED
0004c8e8 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
4c8e8: 4e56 ffec linkw %fp,#-20 4c8ec: 2f0a movel %a2,%sp@- 4c8ee: 2f02 movel %d2,%sp@- 4c8f0: 242e 0008 movel %fp@(8),%d2
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
4c8f4: 6700 0098 beqw 4c98e <chdir+0xa6>
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
4c8f8: 2f02 movel %d2,%sp@-
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
4c8fa: 45ee ffec lea %fp@(-20),%a2
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
4c8fe: 4eb9 0005 0de4 jsr 50de4 <strlen>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
4c904: 7201 moveq #1,%d1 4c906: 2e81 movel %d1,%sp@ 4c908: 2f0a movel %a2,%sp@- 4c90a: 4878 0001 pea 1 <ADD> 4c90e: 2f00 movel %d0,%sp@- 4c910: 2f02 movel %d2,%sp@- 4c912: 4eb9 0004 326c jsr 4326c <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
4c918: 4fef 0014 lea %sp@(20),%sp 4c91c: 4a80 tstl %d0
4c91e: 6660 bnes 4c980 <chdir+0x98>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
4c920: 226e fff8 moveal %fp@(-8),%a1 4c924: 2069 0010 moveal %a1@(16),%a0 4c928: 4a88 tstl %a0 4c92a: 6700 00ac beqw 4c9d8 <chdir+0xf0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
4c92e: 2f0a movel %a2,%sp@- 4c930: 4e90 jsr %a0@ 4c932: 588f addql #4,%sp 4c934: 7201 moveq #1,%d1 4c936: b280 cmpl %d0,%d1
4c938: 666e bnes 4c9a8 <chdir+0xc0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
4c93a: 2079 0005 eeec moveal 5eeec <rtems_current_user_env>,%a0 4c940: 2268 0010 moveal %a0@(16),%a1 4c944: 4a89 tstl %a1
4c946: 6716 beqs 4c95e <chdir+0x76> <== NEVER TAKEN
4c948: 2269 001c moveal %a1@(28),%a1 4c94c: 4a89 tstl %a1
4c94e: 670e beqs 4c95e <chdir+0x76> <== NEVER TAKEN
4c950: 4868 0004 pea %a0@(4) 4c954: 4e91 jsr %a1@ 4c956: 2079 0005 eeec moveal 5eeec <rtems_current_user_env>,%a0 4c95c: 588f addql #4,%sp
rtems_filesystem_current = loc;
4c95e: 5888 addql #4,%a0 4c960: 4280 clrl %d0 4c962: 20d2 movel %a2@,%a0@+ 4c964: 20ee fff0 movel %fp@(-16),%a0@+ 4c968: 20ee fff4 movel %fp@(-12),%a0@+ 4c96c: 20ee fff8 movel %fp@(-8),%a0@+
return 0;
}
4c970: 242e ffe4 movel %fp@(-28),%d2
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
4c974: 20ae fffc movel %fp@(-4),%a0@
return 0;
}
4c978: 246e ffe8 moveal %fp@(-24),%a2 4c97c: 4e5e unlk %fp 4c97e: 4e75 rts 4c980: 242e ffe4 movel %fp@(-28),%d2
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
4c984: 70ff moveq #-1,%d0
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4c986: 246e ffe8 moveal %fp@(-24),%a2 4c98a: 4e5e unlk %fp 4c98c: 4e75 rts
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
4c98e: 4eb9 0004 fa68 jsr 4fa68 <__errno> 4c994: 740e moveq #14,%d2 4c996: 2040 moveal %d0,%a0 4c998: 70ff moveq #-1,%d0 4c99a: 2082 movel %d2,%a0@
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4c99c: 242e ffe4 movel %fp@(-28),%d2 4c9a0: 246e ffe8 moveal %fp@(-24),%a2 4c9a4: 4e5e unlk %fp 4c9a6: 4e75 rts
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
4c9a8: 206e fff8 moveal %fp@(-8),%a0 4c9ac: 4a88 tstl %a0
4c9ae: 670e beqs 4c9be <chdir+0xd6> <== NEVER TAKEN
4c9b0: 2068 001c moveal %a0@(28),%a0 4c9b4: 4a88 tstl %a0
4c9b6: 6706 beqs 4c9be <chdir+0xd6> <== NEVER TAKEN
4c9b8: 2f0a movel %a2,%sp@- 4c9ba: 4e90 jsr %a0@ 4c9bc: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
4c9be: 4eb9 0004 fa68 jsr 4fa68 <__errno>
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4c9c4: 242e ffe4 movel %fp@(-28),%d2
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
4c9c8: 2040 moveal %d0,%a0 4c9ca: 7214 moveq #20,%d1 4c9cc: 70ff moveq #-1,%d0
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4c9ce: 246e ffe8 moveal %fp@(-24),%a2 4c9d2: 4e5e unlk %fp
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
4c9d4: 2081 movel %d1,%a0@
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4c9d6: 4e75 rts
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
4c9d8: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4c9dc: 4a88 tstl %a0 <== NOT EXECUTED 4c9de: 6706 beqs 4c9e6 <chdir+0xfe> <== NOT EXECUTED 4c9e0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c9e2: 4e90 jsr %a0@ <== NOT EXECUTED 4c9e4: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4c9e6: 4eb9 0004 fa68 jsr 4fa68 <__errno> <== NOT EXECUTED
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4c9ec: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4c9f0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c9f2: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4c9f4: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 4c9f8: 4e5e unlk %fp <== NOT EXECUTED
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4c9fa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
...
00044b20 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
44b20: 4e56 ffec linkw %fp,#-20 44b24: 2f03 movel %d3,%sp@- 44b26: 262e 0008 movel %fp@(8),%d3 44b2a: 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 );
44b2c: 240e movel %fp,%d2 44b2e: 0682 ffff ffec addil #-20,%d2 44b34: 2f03 movel %d3,%sp@- 44b36: 4eb9 0005 3af4 jsr 53af4 <strlen> 44b3c: 7201 moveq #1,%d1 44b3e: 2e81 movel %d1,%sp@ 44b40: 2f02 movel %d2,%sp@- 44b42: 42a7 clrl %sp@- 44b44: 2f00 movel %d0,%sp@- 44b46: 2f03 movel %d3,%sp@- 44b48: 4eb9 0004 50cc jsr 450cc <rtems_filesystem_evaluate_path>
if ( status != 0 )
44b4e: 4fef 0014 lea %sp@(20),%sp 44b52: 4a80 tstl %d0
44b54: 6640 bnes 44b96 <chmod+0x76>
return -1;
if ( !loc.handlers ){
44b56: 206e fff4 moveal %fp@(-12),%a0 44b5a: 4a88 tstl %a0
44b5c: 677c beqs 44bda <chmod+0xba> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
44b5e: 2068 001c moveal %a0@(28),%a0 44b62: 4a88 tstl %a0
44b64: 6740 beqs 44ba6 <chmod+0x86> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
44b66: 2f2e 000c movel %fp@(12),%sp@- 44b6a: 2f02 movel %d2,%sp@- 44b6c: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
44b6e: 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 );
44b72: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
44b74: 508f addql #8,%sp 44b76: 4a88 tstl %a0
44b78: 670e beqs 44b88 <chmod+0x68> <== NEVER TAKEN
44b7a: 2068 001c moveal %a0@(28),%a0 44b7e: 4a88 tstl %a0
44b80: 6706 beqs 44b88 <chmod+0x68> <== NEVER TAKEN
44b82: 2f02 movel %d2,%sp@- 44b84: 4e90 jsr %a0@ 44b86: 588f addql #4,%sp
return result;
}
44b88: 2003 movel %d3,%d0 44b8a: 242e ffe4 movel %fp@(-28),%d2 44b8e: 262e ffe8 movel %fp@(-24),%d3 44b92: 4e5e unlk %fp 44b94: 4e75 rts
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
44b96: 76ff moveq #-1,%d3
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
44b98: 2003 movel %d3,%d0 44b9a: 242e ffe4 movel %fp@(-28),%d2 44b9e: 262e ffe8 movel %fp@(-24),%d3 44ba2: 4e5e unlk %fp 44ba4: 4e75 rts
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
44ba6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44baa: 4a88 tstl %a0 <== NOT EXECUTED 44bac: 670e beqs 44bbc <chmod+0x9c> <== NOT EXECUTED 44bae: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44bb2: 4a88 tstl %a0 <== NOT EXECUTED 44bb4: 6706 beqs 44bbc <chmod+0x9c> <== NOT EXECUTED 44bb6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44bb8: 4e90 jsr %a0@ <== NOT EXECUTED 44bba: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
44bbc: 4eb9 0005 20e0 jsr 520e0 <__errno> <== NOT EXECUTED 44bc2: 76ff moveq #-1,%d3 <== NOT EXECUTED 44bc4: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
44bc6: 2003 movel %d3,%d0 <== NOT EXECUTED 44bc8: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 44bcc: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 44bd0: 4e5e unlk %fp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
44bd2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
44bd8: 4e75 rts <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
return -1;
if ( !loc.handlers ){
rtems_filesystem_freenode( &loc );
44bda: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44bde: 4a88 tstl %a0 <== NOT EXECUTED 44be0: 670e beqs 44bf0 <chmod+0xd0> <== NOT EXECUTED 44be2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44be6: 4a88 tstl %a0 <== NOT EXECUTED 44be8: 6706 beqs 44bf0 <chmod+0xd0> <== NOT EXECUTED 44bea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44bec: 4e90 jsr %a0@ <== NOT EXECUTED 44bee: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
44bf0: 4eb9 0005 20e0 jsr 520e0 <__errno> <== NOT EXECUTED 44bf6: 76ff moveq #-1,%d3 <== NOT EXECUTED 44bf8: 2040 moveal %d0,%a0 <== NOT EXECUTED 44bfa: 7009 moveq #9,%d0 <== NOT EXECUTED 44bfc: 2080 movel %d0,%a0@ <== NOT EXECUTED
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
44bfe: 2003 movel %d3,%d0 <== NOT EXECUTED 44c00: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 44c04: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 44c08: 4e5e unlk %fp <== NOT EXECUTED
00044c0c <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
44c0c: 4e56 ffdc linkw %fp,#-36 44c10: 48d7 003c moveml %d2-%d5,%sp@ 44c14: 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 ) )
44c18: 240e movel %fp,%d2 44c1a: 0682 ffff ffec addil #-20,%d2 44c20: 2f03 movel %d3,%sp@-
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
44c22: 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 ) )
44c26: 4eb9 0005 3af4 jsr 53af4 <strlen> 44c2c: 7201 moveq #1,%d1 44c2e: 2e81 movel %d1,%sp@
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
44c30: 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 ) )
44c34: 2f02 movel %d2,%sp@- 44c36: 42a7 clrl %sp@- 44c38: 2f00 movel %d0,%sp@- 44c3a: 2f03 movel %d3,%sp@- 44c3c: 4eb9 0004 50cc jsr 450cc <rtems_filesystem_evaluate_path> 44c42: 4fef 0014 lea %sp@(20),%sp 44c46: 4a80 tstl %d0
44c48: 6640 bnes 44c8a <chown+0x7e>
return -1;
if ( !loc.ops->chown_h ) {
44c4a: 226e fff8 moveal %fp@(-8),%a1 44c4e: 2069 0018 moveal %a1@(24),%a0 44c52: 4a88 tstl %a0
44c54: 6742 beqs 44c98 <chown+0x8c> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
44c56: 3f05 movew %d5,%sp@- 44c58: 4267 clrw %sp@- 44c5a: 3f04 movew %d4,%sp@- 44c5c: 4267 clrw %sp@- 44c5e: 2f02 movel %d2,%sp@- 44c60: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
44c62: 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 );
44c66: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
44c68: 4fef 000c lea %sp@(12),%sp 44c6c: 4a88 tstl %a0
44c6e: 670e beqs 44c7e <chown+0x72> <== NEVER TAKEN
44c70: 2068 001c moveal %a0@(28),%a0 44c74: 4a88 tstl %a0
44c76: 6706 beqs 44c7e <chown+0x72> <== NEVER TAKEN
44c78: 2f02 movel %d2,%sp@- 44c7a: 4e90 jsr %a0@ 44c7c: 588f addql #4,%sp
return result;
}
44c7e: 2003 movel %d3,%d0 44c80: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 44c86: 4e5e unlk %fp 44c88: 4e75 rts
)
{
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
44c8a: 76ff moveq #-1,%d3
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );
return result;
}
44c8c: 2003 movel %d3,%d0 44c8e: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 44c94: 4e5e unlk %fp 44c96: 4e75 rts
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
44c98: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 44c9c: 4a88 tstl %a0 <== NOT EXECUTED 44c9e: 6706 beqs 44ca6 <chown+0x9a> <== NOT EXECUTED 44ca0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44ca2: 4e90 jsr %a0@ <== NOT EXECUTED 44ca4: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
44ca6: 4eb9 0005 20e0 jsr 520e0 <__errno> <== NOT EXECUTED 44cac: 76ff moveq #-1,%d3 <== NOT EXECUTED 44cae: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );
return result;
}
44cb0: 2003 movel %d3,%d0 <== NOT EXECUTED 44cb2: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 <== NOT EXECUTED
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
44cb8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );
return result;
}
44cbe: 4e5e unlk %fp <== NOT EXECUTED
...
00042cd8 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
42cd8: 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) {
42cdc: 203c 0006 04cc movel #394444,%d0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
42ce2: 2f0b movel %a3,%sp@- 42ce4: 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) {
42ce6: b0b9 0005 eeec cmpl 5eeec <rtems_current_user_env>,%d0 42cec: 6700 0086 beqw 42d74 <chroot+0x9c>
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
42cf0: 2f2e 0008 movel %fp@(8),%sp@- 42cf4: 4eb9 0004 c8e8 jsr 4c8e8 <chdir>
if (result) {
42cfa: 588f addql #4,%sp 42cfc: 4a80 tstl %d0 42cfe: 6600 00a6 bnew 42da6 <chroot+0xce>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
42d02: 42a7 clrl %sp@- 42d04: 45ee ffec lea %fp@(-20),%a2 42d08: 2f0a movel %a2,%sp@- 42d0a: 42a7 clrl %sp@- 42d0c: 4878 0001 pea 1 <ADD> 42d10: 4879 0005 e125 pea 5e125 <__FUNCTION__.5348+0x18> 42d16: 4eb9 0004 326c jsr 4326c <rtems_filesystem_evaluate_path> 42d1c: 4fef 0014 lea %sp@(20),%sp 42d20: 4a80 tstl %d0 42d22: 6600 0082 bnew 42da6 <chroot+0xce>
/* 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);
42d26: 2079 0005 eeec moveal 5eeec <rtems_current_user_env>,%a0 42d2c: 2268 0024 moveal %a0@(36),%a1 42d30: 4a89 tstl %a1
42d32: 6716 beqs 42d4a <chroot+0x72> <== NEVER TAKEN
42d34: 2269 001c moveal %a1@(28),%a1 42d38: 4a89 tstl %a1
42d3a: 670e beqs 42d4a <chroot+0x72> <== NEVER TAKEN
42d3c: 4868 0018 pea %a0@(24) 42d40: 4e91 jsr %a1@ 42d42: 2079 0005 eeec moveal 5eeec <rtems_current_user_env>,%a0 42d48: 588f addql #4,%sp
rtems_filesystem_root = loc;
42d4a: 2152 0018 movel %a2@,%a0@(24) 42d4e: 4280 clrl %d0 42d50: 216e fff0 001c movel %fp@(-16),%a0@(28) 42d56: 216e fff4 0020 movel %fp@(-12),%a0@(32) 42d5c: 216e fff8 0024 movel %fp@(-8),%a0@(36)
return 0;
}
42d62: 246e ffe4 moveal %fp@(-28),%a2 42d66: 266e ffe8 moveal %fp@(-24),%a3
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;
42d6a: 216e fffc 0028 movel %fp@(-4),%a0@(40)
return 0;
}
42d70: 4e5e unlk %fp 42d72: 4e75 rts
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
42d74: 4eb9 0004 4580 jsr 44580 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
42d7a: 203c 0006 04cc movel #394444,%d0 42d80: b0b9 0005 eeec cmpl 5eeec <rtems_current_user_env>,%d0 42d86: 6600 ff68 bnew 42cf0 <chroot+0x18>
rtems_set_errno_and_return_minus_one( ENOTSUP );
42d8a: 4eb9 0004 fa68 jsr 4fa68 <__errno> <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42d90: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
42d94: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d96: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42d98: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42d9c: 4e5e unlk %fp <== NOT EXECUTED
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
42d9e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42da4: 4e75 rts <== NOT EXECUTED
}
/* clone the new root location */
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 );
42da6: 45f9 0004 fa68 lea 4fa68 <__errno>,%a2 <== NOT EXECUTED 42dac: 4e92 jsr %a2@ <== NOT EXECUTED 42dae: 2640 moveal %d0,%a3 <== NOT EXECUTED 42db0: 4e92 jsr %a2@ <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42db2: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED
}
/* clone the new root location */
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 );
42db6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42db8: 70ff moveq #-1,%d0 <== NOT EXECUTED 42dba: 2690 movel %a0@,%a3@ <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42dbc: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42dc0: 4e5e unlk %fp <== NOT EXECUTED
0004a4e4 <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
4a4e4: 4e56 0000 linkw %fp,#0 4a4e8: 202e 0008 movel %fp@(8),%d0 4a4ec: 2f0a movel %a2,%sp@- 4a4ee: 2f02 movel %d2,%sp@-
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
4a4f0: b0b9 0005 c1e4 cmpl 5c1e4 <rtems_libio_number_iops>,%d0
4a4f6: 645e bccs 4a556 <close+0x72> iop = rtems_libio_iop(fd);
4a4f8: 2479 0005 d86c moveal 5d86c <rtems_libio_iops>,%a2 4a4fe: ed88 lsll #6,%d0 4a500: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
4a502: 202a 0014 movel %a2@(20),%d0 4a506: 0280 0000 0100 andil #256,%d0
4a50c: 6748 beqs 4a556 <close+0x72>
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
4a50e: 206a 003c moveal %a2@(60),%a0 4a512: 2068 0004 moveal %a0@(4),%a0 4a516: 4a88 tstl %a0
4a518: 6738 beqs 4a552 <close+0x6e> <== NEVER TAKEN
rc = (*iop->handlers->close_h)( iop );
4a51a: 2f0a movel %a2,%sp@- 4a51c: 4e90 jsr %a0@ 4a51e: 588f addql #4,%sp 4a520: 2400 movel %d0,%d2
rtems_filesystem_freenode( &iop->pathinfo );
4a522: 206a 0024 moveal %a2@(36),%a0 4a526: 4a88 tstl %a0
4a528: 6710 beqs 4a53a <close+0x56> <== NEVER TAKEN
4a52a: 2068 001c moveal %a0@(28),%a0 4a52e: 4a88 tstl %a0
4a530: 6708 beqs 4a53a <close+0x56>
4a532: 486a 0018 pea %a2@(24) 4a536: 4e90 jsr %a0@ 4a538: 588f addql #4,%sp
rtems_libio_free( iop );
4a53a: 2f0a movel %a2,%sp@- 4a53c: 4eb9 0004 a8d2 jsr 4a8d2 <rtems_libio_free>
return rc;
}
4a542: 246e fffc moveal %fp@(-4),%a2 4a546: 2002 movel %d2,%d0
rc = (*iop->handlers->close_h)( iop );
rtems_filesystem_freenode( &iop->pathinfo );
rtems_libio_free( iop );
return rc;
4a548: 588f addql #4,%sp
}
4a54a: 242e fff8 movel %fp@(-8),%d2 4a54e: 4e5e unlk %fp 4a550: 4e75 rts
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
4a552: 4282 clrl %d2 <== NOT EXECUTED 4a554: 60cc bras 4a522 <close+0x3e> <== NOT EXECUTED
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
4a556: 4eb9 0004 d868 jsr 4d868 <__errno> 4a55c: 74ff moveq #-1,%d2 4a55e: 2040 moveal %d0,%a0 4a560: 7009 moveq #9,%d0 4a562: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &iop->pathinfo );
rtems_libio_free( iop );
return rc;
}
4a564: 2002 movel %d2,%d0 4a566: 242e fff8 movel %fp@(-8),%d2 4a56a: 246e fffc moveal %fp@(-4),%a2
4a56e: 4e5e unlk %fp <== NOT EXECUTED
000496ac <devFS_close>:
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
496ac: 4e56 fff4 linkw %fp,#-12 496b0: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
496b4: 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;
496b8: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.flags = 0;
496bc: 42ae fff8 clrl %fp@(-8)
args.mode = 0;
496c0: 42ae fffc clrl %fp@(-4)
status = rtems_io_close(
496c4: 2f29 000c movel %a1@(12),%sp@- 496c8: 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;
496cc: 2d48 fff4 movel %a0,%fp@(-12)
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
496d0: 4eb9 0004 a390 jsr 4a390 <rtems_io_close>
np->major,
np->minor,
(void *) &args
);
if ( status ) {
496d6: 4fef 000c lea %sp@(12),%sp 496da: 4a80 tstl %d0
496dc: 6604 bnes 496e2 <devFS_close+0x36> <== NEVER TAKEN
return rtems_deviceio_errno(status);
}
return 0;
}
496de: 4e5e unlk %fp 496e0: 4e75 rts
np->major,
np->minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
496e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 496e4: 4eb9 0004 97bc jsr 497bc <rtems_deviceio_errno> <== NOT EXECUTED 496ea: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
496ec: 4e5e unlk %fp <== NOT EXECUTED
00049702 <devFS_evaluate_path>:
const char *pathname,
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
49702: 4e56 ffdc linkw %fp,#-36 49706: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4970a: 286e 0014 moveal %fp@(20),%a4 4970e: 2c2e 0008 movel %fp@(8),%d6 49712: 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;
49716: 2814 movel %a4@,%d4
if (!device_name_table)
49718: 6700 008a beqw 497a4 <devFS_evaluate_path+0xa2>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
4971c: 2a39 0005 98f8 movel 598f8 <rtems_device_table_size>,%d5
49722: 673c beqs 49760 <devFS_evaluate_path+0x5e> <== NEVER TAKEN
}
/* 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 );
49724: 4280 clrl %d0 49726: 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)
49728: 4bf9 0004 c60c lea 4c60c <strncmp>,%a5
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++) {
if (!device_name_table[i].device_name)
4972e: 2200 movel %d0,%d1
/* 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++) {
49730: 5282 addql #1,%d2
if (!device_name_table[i].device_name)
49732: e989 lsll #4,%d1 49734: 2041 moveal %d1,%a0 49736: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 4973a: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 4973e: 2453 moveal %a3@,%a2 49740: 4a8a tstl %a2
49742: 6716 beqs 4975a <devFS_evaluate_path+0x58>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
49744: 2f03 movel %d3,%sp@- 49746: 2f0a movel %a2,%sp@- 49748: 2f06 movel %d6,%sp@- 4974a: 4e95 jsr %a5@ 4974c: 4fef 000c lea %sp@(12),%sp 49750: 4a80 tstl %d0
49752: 6606 bnes 4975a <devFS_evaluate_path+0x58>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
49754: 4a32 3800 tstb %a2@(00000000,%d3:l)
49758: 671e beqs 49778 <devFS_evaluate_path+0x76> <== ALWAYS TAKEN
/* 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++) {
4975a: 2002 movel %d2,%d0 4975c: b485 cmpl %d5,%d2
4975e: 65ce bcss 4972e <devFS_evaluate_path+0x2c>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
49760: 4eb9 0004 b304 jsr 4b304 <__errno> 49766: 7202 moveq #2,%d1 49768: 2040 moveal %d0,%a0 4976a: 70ff moveq #-1,%d0
}
4976c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
49772: 2081 movel %d1,%a0@
}
49774: 4e5e unlk %fp 49776: 4e75 rts
/* 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;
49778: 2079 0005 9a70 moveal 59a70 <rtems_current_user_env>,%a0 4977e: 2968 0028 0010 movel %a0@(40),%a4@(16)
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;
49784: 223c 0005 9a24 movel #367140,%d1
pathloc->ops = &devFS_ops;
4978a: 41f9 0005 99dc lea 599dc <devFS_ops>,%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;
49790: 2941 0008 movel %d1,%a4@(8)
pathloc->ops = &devFS_ops;
49794: 2948 000c movel %a0,%a4@(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];
49798: 288b movel %a3,%a4@
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
4979a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 497a0: 4e5e unlk %fp 497a2: 4e75 rts
}
/* 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 );
497a4: 4eb9 0004 b304 jsr 4b304 <__errno> <== NOT EXECUTED 497aa: 740e moveq #14,%d2 <== NOT EXECUTED 497ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 497ae: 70ff moveq #-1,%d0 <== NOT EXECUTED 497b0: 2082 movel %d2,%a0@ <== NOT EXECUTED
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
497b2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 497b8: 4e5e unlk %fp <== NOT EXECUTED
00042028 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
42028: 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(
4202c: 2039 0005 98f8 movel 598f8 <rtems_device_table_size>,%d0 42032: 2200 movel %d0,%d1
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
42034: 2f0a movel %a2,%sp@- 42036: 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(
4203a: e989 lsll #4,%d1
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
4203c: 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(
4203e: 2041 moveal %d1,%a0 42040: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42044: 4eb9 0004 9468 jsr 49468 <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
4204a: 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(
4204c: 2400 movel %d0,%d2
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
4204e: 6744 beqs 42094 <devFS_initialize+0x6c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
42050: 2039 0005 98f8 movel 598f8 <rtems_device_table_size>,%d0 42056: 2200 movel %d0,%d1 42058: e989 lsll #4,%d1 4205a: 2041 moveal %d1,%a0 4205c: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42060: 42a7 clrl %sp@- 42062: 2f02 movel %d2,%sp@- 42064: 4eb9 0004 bb54 jsr 4bb54 <memset>
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;
4206a: 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;
4206e: 203c 0005 9a24 movel #367140,%d0
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
42074: 41f9 0005 99dc lea 599dc <devFS_ops>,%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;
4207a: 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;
4207e: 4280 clrl %d0 42080: 2542 001c movel %d2,%a2@(28)
return 0;
}
42084: 242e fff8 movel %fp@(-8),%d2
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;
42088: 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;
return 0;
}
4208c: 246e fffc moveal %fp@(-4),%a2 42090: 4e5e unlk %fp 42092: 4e75 rts
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
42094: 4eb9 0004 b304 jsr 4b304 <__errno> <== NOT EXECUTED
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
}
4209a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
4209e: 2040 moveal %d0,%a0 <== NOT EXECUTED 420a0: 720c moveq #12,%d1 <== NOT EXECUTED 420a2: 70ff moveq #-1,%d0 <== NOT EXECUTED
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
}
420a4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 420a8: 4e5e unlk %fp <== NOT EXECUTED
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
420aa: 2081 movel %d1,%a0@ <== NOT EXECUTED
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
}
...
00042224 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
42224: 4e56 fff0 linkw %fp,#-16 42228: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
4222c: 486e fff0 pea %fp@(-16)
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
42230: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.command = command;
42234: 2d6e 000c fff4 movel %fp@(12),%fp@(-12)
args.buffer = buffer;
status = rtems_io_control(
4223a: 2f29 000c movel %a1@(12),%sp@- 4223e: 2f29 0008 movel %a1@(8),%sp@-
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.command = command;
args.buffer = buffer;
42242: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8)
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
42248: 2d48 fff0 movel %a0,%fp@(-16)
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
4224c: 4eb9 0004 6728 jsr 46728 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
42252: 4fef 000c lea %sp@(12),%sp 42256: 4a80 tstl %d0
42258: 6608 bnes 42262 <devFS_ioctl+0x3e> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
4225a: 202e fffc movel %fp@(-4),%d0
}
4225e: 4e5e unlk %fp 42260: 4e75 rts
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
42262: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42264: 4eb9 0004 97bc jsr 497bc <rtems_deviceio_errno> <== NOT EXECUTED 4226a: 588f addql #4,%sp <== NOT EXECUTED
return args.ioctl_return;
}
4226c: 4e5e unlk %fp <== NOT EXECUTED
000420b0 <devFS_mknod>:
* 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') &&
420b0: 7264 moveq #100,%d1
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
420b2: 4e56 ffdc linkw %fp,#-36 420b6: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 420ba: 266e 0008 moveal %fp@(8),%a3
* 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') &&
420be: 1013 moveb %a3@,%d0
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
420c0: 2a2e 000c movel %fp@(12),%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') &&
420c4: 49c0 extbl %d0
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
420c6: 2e2e 0010 movel %fp@(16),%d7 420ca: 2c2e 0014 movel %fp@(20),%d6
* 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') &&
420ce: b280 cmpl %d0,%d1 420d0: 6700 00d0 beqw 421a2 <devFS_mknod+0xf2>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
420d4: 2005 movel %d5,%d0 420d6: 0280 0000 f000 andil #61440,%d0 420dc: 0c80 0000 6000 cmpil #24576,%d0
420e2: 670a beqs 420ee <devFS_mknod+0x3e> <== NEVER TAKEN
420e4: 0c80 0000 2000 cmpil #8192,%d0 420ea: 6600 00e2 bnew 421ce <devFS_mknod+0x11e>
rtems_set_errno_and_return_minus_one( EINVAL );
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;
420ee: 206e 0018 moveal %fp@(24),%a0 420f2: 2450 moveal %a0@,%a2
if (!device_name_table)
420f4: 4a8a tstl %a2 420f6: 6700 0106 beqw 421fe <devFS_mknod+0x14e>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
420fa: 2639 0005 98f8 movel 598f8 <rtems_device_table_size>,%d3 42100: 6700 00e4 beqw 421e6 <devFS_mknod+0x136>
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 );
42104: 4280 clrl %d0 42106: 78ff moveq #-1,%d4 42108: 4282 clrl %d2
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)
4210a: 49f9 0004 c130 lea 4c130 <strcmp>,%a4
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++){
if (device_name_table[i].device_name == NULL)
42110: 2200 movel %d0,%d1 42112: e989 lsll #4,%d1 42114: 2241 moveal %d1,%a1 42116: 41f1 0c00 lea %a1@(00000000,%d0:l:4),%a0 4211a: 2030 a800 movel %a0@(00000000,%a2:l),%d0
4211e: 675e beqs 4217e <devFS_mknod+0xce>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
42120: 2f00 movel %d0,%sp@- 42122: 2f0b movel %a3,%sp@- 42124: 4e94 jsr %a4@ 42126: 508f addql #8,%sp 42128: 4a80 tstl %d0
4212a: 675e beqs 4218a <devFS_mknod+0xda> <== NEVER TAKEN
/* 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++){
4212c: 5282 addql #1,%d2 4212e: 2002 movel %d2,%d0 42130: b682 cmpl %d2,%d3
42132: 62dc bhis 42110 <devFS_mknod+0x60>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
42134: 70ff moveq #-1,%d0 42136: b084 cmpl %d4,%d0 42138: 6700 00ac beqw 421e6 <devFS_mknod+0x136>
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
4213c: 203c 0000 0700 movel #1792,%d0 42142: 40c2 movew %sr,%d2 42144: 8082 orl %d2,%d0 42146: 46c0 movew %d0,%sr
device_name_table[slot].device_name = (char *)path;
42148: 2004 movel %d4,%d0 4214a: e988 lsll #4,%d0 4214c: 2240 moveal %d0,%a1 4214e: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 42152: d5c8 addal %a0,%a2 42154: 248b movel %a3,%a2@
device_name_table[slot].device_name_length = strlen(path);
42156: 2f0b movel %a3,%sp@- 42158: 4eb9 0004 c5f4 jsr 4c5f4 <strlen> 4215e: 588f addql #4,%sp
device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode;
42160: 2545 0010 movel %d5,%a2@(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);
42164: 2540 0004 movel %d0,%a2@(4)
device_name_table[slot].major = major;
42168: 2547 0008 movel %d7,%a2@(8)
device_name_table[slot].minor = minor;
4216c: 2546 000c movel %d6,%a2@(12)
device_name_table[slot].mode = mode; _ISR_Enable(level);
42170: 46c2 movew %d2,%sr 42172: 4280 clrl %d0
return 0;
}
42174: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4217a: 4e5e unlk %fp 4217c: 4e75 rts
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)
rtems_set_errno_and_return_minus_one( EEXIST );
4217e: 2802 movel %d2,%d4
/* 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++){
42180: 5282 addql #1,%d2 42182: 2002 movel %d2,%d0 42184: b682 cmpl %d2,%d3
42186: 6288 bhis 42110 <devFS_mknod+0x60>
42188: 60aa bras 42134 <devFS_mknod+0x84>
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
4218a: 4eb9 0004 b304 jsr 4b304 <__errno> <== NOT EXECUTED 42190: 7411 moveq #17,%d2 <== NOT EXECUTED 42192: 2040 moveal %d0,%a0 <== NOT EXECUTED 42194: 70ff moveq #-1,%d0 <== NOT EXECUTED 42196: 2082 movel %d2,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
42198: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4219e: 4e5e unlk %fp <== NOT EXECUTED 421a0: 4e75 rts <== NOT EXECUTED
* 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') &&
421a2: 123c 0065 moveb #101,%d1 421a6: 102b 0001 moveb %a3@(1),%d0 421aa: 49c0 extbl %d0 421ac: b280 cmpl %d0,%d1 421ae: 6600 ff24 bnew 420d4 <devFS_mknod+0x24>
(path[2] == 'v') && (path[3] == '\0'))
421b2: 123c 0076 moveb #118,%d1 421b6: 102b 0002 moveb %a3@(2),%d0 421ba: 49c0 extbl %d0 421bc: b280 cmpl %d0,%d1 421be: 6600 ff14 bnew 420d4 <devFS_mknod+0x24> 421c2: 4a2b 0003 tstb %a3@(3) 421c6: 6600 ff0c bnew 420d4 <devFS_mknod+0x24>
device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level);
421ca: 4280 clrl %d0 421cc: 60a6 bras 42174 <devFS_mknod+0xc4>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
421ce: 4eb9 0004 b304 jsr 4b304 <__errno> <== NOT EXECUTED 421d4: 7816 moveq #22,%d4 <== NOT EXECUTED 421d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 421d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 421da: 2084 movel %d4,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
421dc: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 421e2: 4e5e unlk %fp <== NOT EXECUTED 421e4: 4e75 rts <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
421e6: 4eb9 0004 b304 jsr 4b304 <__errno> <== NOT EXECUTED 421ec: 720c moveq #12,%d1 <== NOT EXECUTED 421ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 421f0: 70ff moveq #-1,%d0 <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
421f2: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
421f8: 2081 movel %d1,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
421fa: 4e5e unlk %fp <== NOT EXECUTED 421fc: 4e75 rts <== NOT EXECUTED
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 );
421fe: 4eb9 0004 b304 jsr 4b304 <__errno> <== NOT EXECUTED 42204: 760e moveq #14,%d3 <== NOT EXECUTED 42206: 2040 moveal %d0,%a0 <== NOT EXECUTED 42208: 70ff moveq #-1,%d0 <== NOT EXECUTED 4220a: 2083 movel %d3,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
4220c: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 42212: 4e5e unlk %fp <== NOT EXECUTED
...
00042270 <devFS_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
42270: 4e56 fff4 linkw %fp,#-12 42274: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
42278: 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;
4227c: 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;
42282: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
42286: 2d6e 0014 fffc movel %fp@(20),%fp@(-4)
status = rtems_io_open(
4228c: 2f29 000c movel %a1@(12),%sp@- 42290: 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;
42294: 2d48 fff4 movel %a0,%fp@(-12)
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
42298: 4eb9 0004 6874 jsr 46874 <rtems_io_open>
np->major,
np->minor,
(void *) &args
);
if ( status )
4229e: 4fef 000c lea %sp@(12),%sp 422a2: 4a80 tstl %d0
422a4: 6604 bnes 422aa <devFS_open+0x3a> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return 0;
}
422a6: 4e5e unlk %fp 422a8: 4e75 rts
np->major,
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
422aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 422ac: 4eb9 0004 97bc jsr 497bc <rtems_deviceio_errno> <== NOT EXECUTED 422b2: 588f addql #4,%sp <== NOT EXECUTED
return 0;
}
422b4: 4e5e unlk %fp <== NOT EXECUTED
000422b8 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
422b8: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 422bc: 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(
422c0: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
422c4: 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;
422ca: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
422ce: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
422d4: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
status = rtems_io_read(
422d8: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 422dc: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
422e0: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
422e6: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 422ea: 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;
422ee: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED
args.offset = iop->offset;
422f2: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 422f6: 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(
422fa: 4eb9 0004 68d0 jsr 468d0 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
42300: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42304: 4a80 tstl %d0 <== NOT EXECUTED 42306: 6608 bnes 42310 <devFS_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
42308: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
4230c: 4e5e unlk %fp <== NOT EXECUTED 4230e: 4e75 rts <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
42310: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42312: 4eb9 0004 97bc jsr 497bc <rtems_deviceio_errno> <== NOT EXECUTED 42318: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
4231a: 4e5e unlk %fp <== NOT EXECUTED
...
00042320 <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
42320: 4e56 0000 linkw %fp,#0 42324: 206e 0008 moveal %fp@(8),%a0 42328: 226e 000c moveal %fp@(12),%a1
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
4232c: 2050 moveal %a0@,%a0
if (!the_dev)
4232e: 4a88 tstl %a0
42330: 671a beqs 4234c <devFS_stat+0x2c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
42332: 2228 000c movel %a0@(12),%d1
buf->st_mode = the_dev->mode;
42336: 4280 clrl %d0
return 0;
}
42338: 4e5e unlk %fp
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 );
4233a: 2368 0008 0016 movel %a0@(8),%a1@(22)
buf->st_mode = the_dev->mode;
42340: 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 );
42346: 2341 001a movel %d1,%a1@(26)
buf->st_mode = the_dev->mode;
return 0;
}
4234a: 4e75 rts
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
4234c: 4eb9 0004 b304 jsr 4b304 <__errno> <== NOT EXECUTED 42352: 720e moveq #14,%d1 <== NOT EXECUTED 42354: 2040 moveal %d0,%a0 <== NOT EXECUTED 42356: 70ff moveq #-1,%d0 <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
buf->st_mode = the_dev->mode;
return 0;
}
42358: 4e5e unlk %fp <== NOT EXECUTED
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
4235a: 2081 movel %d1,%a0@ <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
buf->st_mode = the_dev->mode;
return 0;
}
...
00042360 <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
42360: 4e56 ffe4 linkw %fp,#-28 42364: 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(
42368: 486e ffe4 pea %fp@(-28)
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
4236c: 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;
42372: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
42376: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12)
args.flags = iop->flags; args.bytes_moved = 0;
4237c: 42ae fffc clrl %fp@(-4)
status = rtems_io_write(
42380: 2f29 000c movel %a1@(12),%sp@- 42384: 2f29 0008 movel %a1@(8),%sp@-
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
42388: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
4238e: 2028 000c movel %a0@(12),%d0 42392: 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;
42396: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset;
4239a: 2d40 ffe8 movel %d0,%fp@(-24) 4239e: 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(
423a2: 4eb9 0004 692c jsr 4692c <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
423a8: 4fef 000c lea %sp@(12),%sp 423ac: 4a80 tstl %d0
423ae: 6608 bnes 423b8 <devFS_write+0x58> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
423b0: 202e fffc movel %fp@(-4),%d0
}
423b4: 4e5e unlk %fp 423b6: 4e75 rts
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
423b8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 423ba: 4eb9 0004 97bc jsr 497bc <rtems_deviceio_errno> <== NOT EXECUTED 423c0: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
423c2: 4e5e unlk %fp <== NOT EXECUTED
...
0004bcd2 <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
4bcd2: 4e56 fff4 linkw %fp,#-12 4bcd6: 226e 0008 moveal %fp@(8),%a1
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
4bcda: 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;
4bcde: 2069 0038 moveal %a1@(56),%a0
args.iop = iop;
4bce2: 2d49 fff4 movel %a1,%fp@(-12)
args.flags = 0;
4bce6: 42ae fff8 clrl %fp@(-8)
args.mode = 0;
4bcea: 42ae fffc clrl %fp@(-4)
status = rtems_io_close(
4bcee: 2f28 0050 movel %a0@(80),%sp@- 4bcf2: 2f28 004c movel %a0@(76),%sp@- 4bcf6: 4eb9 0004 cf00 jsr 4cf00 <rtems_io_close>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
4bcfc: 4fef 000c lea %sp@(12),%sp 4bd00: 4a80 tstl %d0
4bd02: 6604 bnes 4bd08 <device_close+0x36> <== NEVER TAKEN
return rtems_deviceio_errno(status);
}
return 0;
}
4bd04: 4e5e unlk %fp 4bd06: 4e75 rts
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
4bd08: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bd0a: 4eb9 0004 d524 jsr 4d524 <rtems_deviceio_errno> <== NOT EXECUTED 4bd10: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
4bd12: 4e5e unlk %fp <== NOT EXECUTED
0004bbba <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
4bbba: 4e56 fff0 linkw %fp,#-16 4bbbe: 226e 0008 moveal %fp@(8),%a1
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
status = rtems_io_control(
4bbc2: 486e fff0 pea %fp@(-16)
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
args.buffer = buffer;
4bbc6: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8)
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
4bbcc: 2d6e 000c fff4 movel %fp@(12),%fp@(-12)
args.buffer = buffer;
the_jnode = iop->file_info;
4bbd2: 2069 0038 moveal %a1@(56),%a0
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
4bbd6: 2d49 fff0 movel %a1,%fp@(-16)
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
status = rtems_io_control(
4bbda: 2f28 0050 movel %a0@(80),%sp@- 4bbde: 2f28 004c movel %a0@(76),%sp@- 4bbe2: 4eb9 0004 cf5c jsr 4cf5c <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4bbe8: 4fef 000c lea %sp@(12),%sp 4bbec: 4a80 tstl %d0
4bbee: 6608 bnes 4bbf8 <device_ioctl+0x3e> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
4bbf0: 202e fffc movel %fp@(-4),%d0
}
4bbf4: 4e5e unlk %fp 4bbf6: 4e75 rts
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4bbf8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bbfa: 4eb9 0004 d524 jsr 4d524 <rtems_deviceio_errno> <== NOT EXECUTED 4bc00: 588f addql #4,%sp <== NOT EXECUTED
return args.ioctl_return;
}
4bc02: 4e5e unlk %fp <== NOT EXECUTED
0004bd16 <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4bd16: 4e56 fff4 linkw %fp,#-12 4bd1a: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
4bd1e: 486e fff4 pea %fp@(-12)
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.flags = iop->flags;
4bd22: 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;
4bd28: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
4bd2c: 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;
4bd32: 2d48 fff4 movel %a0,%fp@(-12)
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
4bd36: 2f29 0050 movel %a1@(80),%sp@- 4bd3a: 2f29 004c movel %a1@(76),%sp@- 4bd3e: 4eb9 0004 cfb8 jsr 4cfb8 <rtems_io_open>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4bd44: 4fef 000c lea %sp@(12),%sp 4bd48: 4a80 tstl %d0
4bd4a: 6604 bnes 4bd50 <device_open+0x3a> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return 0;
}
4bd4c: 4e5e unlk %fp 4bd4e: 4e75 rts
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4bd50: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bd52: 4eb9 0004 d524 jsr 4d524 <rtems_deviceio_errno> <== NOT EXECUTED 4bd58: 588f addql #4,%sp <== NOT EXECUTED
return 0;
}
4bd5a: 4e5e unlk %fp <== NOT EXECUTED
...
0004bc6c <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
4bc6c: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4bc70: 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(
4bc74: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
4bc78: 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;
4bc7e: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED
args.count = count;
4bc84: 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;
4bc8a: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
4bc8e: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4bc92: 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;
4bc96: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED
args.offset = iop->offset;
4bc9a: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4bc9e: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
4bca2: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
status = rtems_io_read(
4bca6: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4bcaa: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4bcae: 4eb9 0004 d014 jsr 4d014 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4bcb4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bcb8: 4a80 tstl %d0 <== NOT EXECUTED 4bcba: 6608 bnes 4bcc4 <device_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
4bcbc: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
4bcc0: 4e5e unlk %fp <== NOT EXECUTED 4bcc2: 4e75 rts <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4bcc4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bcc6: 4eb9 0004 d524 jsr 4d524 <rtems_deviceio_errno> <== NOT EXECUTED 4bccc: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
4bcce: 4e5e unlk %fp <== NOT EXECUTED
0004bc06 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
4bc06: 4e56 ffe4 linkw %fp,#-28 4bc0a: 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(
4bc0e: 486e ffe4 pea %fp@(-28)
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
4bc12: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
4bc18: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
args.count = count;
4bc1e: 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;
4bc24: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.offset = iop->offset;
4bc28: 2028 000c movel %a0@(12),%d0 4bc2c: 2228 0010 movel %a0@(16),%d1
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
4bc30: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset;
4bc34: 2d40 ffe8 movel %d0,%fp@(-24) 4bc38: 2d41 ffec movel %d1,%fp@(-20)
args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
4bc3c: 42ae fffc clrl %fp@(-4)
status = rtems_io_write(
4bc40: 2f29 0050 movel %a1@(80),%sp@- 4bc44: 2f29 004c movel %a1@(76),%sp@- 4bc48: 4eb9 0004 d070 jsr 4d070 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4bc4e: 4fef 000c lea %sp@(12),%sp 4bc52: 4a80 tstl %d0
4bc54: 6608 bnes 4bc5e <device_write+0x58> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
4bc56: 202e fffc movel %fp@(-4),%d0
}
4bc5a: 4e5e unlk %fp 4bc5c: 4e75 rts
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4bc5e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bc60: 4eb9 0004 d524 jsr 4d524 <rtems_deviceio_errno> <== NOT EXECUTED 4bc66: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
4bc68: 4e5e unlk %fp <== NOT EXECUTED
000443aa <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
443aa: 4e56 fff4 linkw %fp,#-12 443ae: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 443b2: 246e 0008 moveal %fp@(8),%a2
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
443b6: 4aaa 00b4 tstl %a2@(180)
443ba: 6750 beqs 4440c <drainOutput+0x62> rtems_interrupt_disable (level);
443bc: 243c 0000 0700 movel #1792,%d2 443c2: 2002 movel %d2,%d0 443c4: 40c1 movew %sr,%d1 443c6: 8081 orl %d1,%d0 443c8: 46c0 movew %d0,%sr
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
443ca: 206a 0084 moveal %a2@(132),%a0 443ce: 202a 0080 movel %a2@(128),%d0 443d2: b088 cmpl %a0,%d0
443d4: 6734 beqs 4440a <drainOutput+0x60>
443d6: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3
tty->rawOutBufState = rob_wait;
443dc: 7002 moveq #2,%d0 443de: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
443e2: 46c1 movew %d1,%sr
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
443e4: 42a7 clrl %sp@- 443e6: 42a7 clrl %sp@- 443e8: 2f2a 008c movel %a2@(140),%sp@- 443ec: 4e93 jsr %a3@
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
443ee: 4fef 000c lea %sp@(12),%sp 443f2: 4a80 tstl %d0
443f4: 6620 bnes 44416 <drainOutput+0x6c> <== NEVER TAKEN
rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level);
443f6: 2002 movel %d2,%d0 443f8: 40c1 movew %sr,%d1 443fa: 8081 orl %d1,%d0 443fc: 46c0 movew %d0,%sr
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
443fe: 206a 0084 moveal %a2@(132),%a0 44402: 202a 0080 movel %a2@(128),%d0 44406: b088 cmpl %a0,%d0
44408: 66d2 bnes 443dc <drainOutput+0x32> RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level);
4440a: 46c1 movew %d1,%sr
} }
4440c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44412: 4e5e unlk %fp 44414: 4e75 rts
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
44416: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44418: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
00043394 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
43394: 4e56 ffac linkw %fp,#-84 43398: 48d7 040c moveml %d2-%d3/%a2,%sp@
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
4339c: 240e movel %fp,%d2 4339e: 0682 ffff ffba addil #-70,%d2 433a4: 45f9 0004 3d70 lea 43d70 <fstat>,%a2 433aa: 2f02 movel %d2,%sp@-
int dup2(
int fildes,
int fildes2
)
{
433ac: 262e 0008 movel %fp@(8),%d3
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
433b0: 2f03 movel %d3,%sp@- 433b2: 4e92 jsr %a2@
if ( status == -1 )
433b4: 508f addql #8,%sp 433b6: 72ff moveq #-1,%d1 433b8: b280 cmpl %d0,%d1
433ba: 660c bnes 433c8 <dup2+0x34> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
433bc: 70ff moveq #-1,%d0
}
433be: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 433c4: 4e5e unlk %fp 433c6: 4e75 rts
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
433c8: 2f02 movel %d2,%sp@- 433ca: 2f2e 000c movel %fp@(12),%sp@- 433ce: 4e92 jsr %a2@
if ( status == -1 )
433d0: 508f addql #8,%sp 433d2: 72ff moveq #-1,%d1 433d4: b280 cmpl %d0,%d1
433d6: 67e4 beqs 433bc <dup2+0x28> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
433d8: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 433dc: 42a7 clrl %sp@- <== NOT EXECUTED 433de: 2f03 movel %d3,%sp@- <== NOT EXECUTED 433e0: 4eb9 0004 3908 jsr 43908 <fcntl> <== NOT EXECUTED 433e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
433ea: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 <== NOT EXECUTED 433f0: 4e5e unlk %fp <== NOT EXECUTED
00043dcc <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
43dcc: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 43dd0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43dd2: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 43dd6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
43dd8: 242a 003c movel %a2@(60),%d2 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
43ddc: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
43de0: 0282 0000 0200 andil #512,%d2 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
43de6: 1001 moveb %d1,%d0 <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
43de8: 4a82 tstl %d2 <== NOT EXECUTED 43dea: 673e beqs 43e2a <echo+0x5e> <== NOT EXECUTED 43dec: 1001 moveb %d1,%d0 <== NOT EXECUTED 43dee: 2079 0005 c378 moveal 5c378 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43df4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43dfa: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 <== NOT EXECUTED 43dfe: 49c2 extbl %d2 <== NOT EXECUTED 43e00: 0802 0005 btst #5,%d2 <== NOT EXECUTED 43e04: 670e beqs 43e14 <echo+0x48> <== NOT EXECUTED 43e06: 7409 moveq #9,%d2 <== NOT EXECUTED 43e08: b480 cmpl %d0,%d2 <== NOT EXECUTED 43e0a: 6708 beqs 43e14 <echo+0x48> <== NOT EXECUTED 43e0c: 143c 000a moveb #10,%d2 <== NOT EXECUTED 43e10: b480 cmpl %d0,%d2 <== NOT EXECUTED 43e12: 662a bnes 43e3e <echo+0x72> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
43e14: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e18: 4eba fdd2 jsr %pc@(43bec <oproc>) <== NOT EXECUTED 43e1c: 508f addql #8,%sp <== NOT EXECUTED
} }
43e1e: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 43e22: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43e26: 4e5e unlk %fp <== NOT EXECUTED 43e28: 4e75 rts <== NOT EXECUTED 43e2a: 1001 moveb %d1,%d0 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
43e2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e2e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43e34: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e36: 4eba fdb4 jsr %pc@(43bec <oproc>) <== NOT EXECUTED 43e3a: 508f addql #8,%sp <== NOT EXECUTED 43e3c: 60e0 bras 43e1e <echo+0x52> <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
43e3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e40: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
43e44: 7040 moveq #64,%d0 <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
43e46: 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;
43e4a: b181 eorl %d0,%d1 <== 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] = '^';
43e4c: 745e moveq #94,%d2 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
43e4e: 1d41 ffff moveb %d1,%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] = '^';
43e52: 1d42 fffe moveb %d2,%fp@(-2) <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
43e56: 4eb9 0004 3ac4 jsr 43ac4 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
}
else {
oproc (c, tty);
}
}
43e5c: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
43e60: 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')) {
43e64: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->column += 2;
}
else {
oproc (c, tty);
}
}
43e68: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43e6c: 4e5e unlk %fp <== NOT EXECUTED
000430a0 <endgrent>:
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
430a0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (group_fp != NULL)
430a4: 2039 0006 080a movel 6080a <group_fp>,%d0 <== NOT EXECUTED 430aa: 670a beqs 430b6 <endgrent+0x16> <== NOT EXECUTED
fclose(group_fp);
430ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 430ae: 4eb9 0004 f9f2 jsr 4f9f2 <fclose> <== NOT EXECUTED 430b4: 588f addql #4,%sp <== NOT EXECUTED
}
430b6: 4e5e unlk %fp <== NOT EXECUTED
000430ba <endpwent>:
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
430ba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (passwd_fp != NULL)
430be: 2039 0006 0722 movel 60722 <passwd_fp>,%d0 <== NOT EXECUTED 430c4: 670a beqs 430d0 <endpwent+0x16> <== NOT EXECUTED
fclose(passwd_fp);
430c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 430c8: 4eb9 0004 f9f2 jsr 4f9f2 <fclose> <== NOT EXECUTED 430ce: 588f addql #4,%sp <== NOT EXECUTED
}
430d0: 4e5e unlk %fp <== NOT EXECUTED
00043e70 <erase>:
* 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)
{
43e70: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 43e74: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 43e78: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 43e7c: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED
if (tty->ccount == 0)
43e80: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 43e84: 6732 beqs 43eb8 <erase+0x48> <== NOT EXECUTED
return;
if (lineFlag) {
43e86: 4a84 tstl %d4 <== NOT EXECUTED 43e88: 6738 beqs 43ec2 <erase+0x52> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
43e8a: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43e8e: 44c3 movew %d3,%ccr <== NOT EXECUTED 43e90: 6a00 01ae bplw 44040 <erase+0x1d0> <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
43e94: 0803 0004 btst #4,%d3 <== NOT EXECUTED 43e98: 662c bnes 43ec6 <erase+0x56> <== NOT EXECUTED
tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty);
43e9a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e9c: 4280 clrl %d0 <== NOT EXECUTED 43e9e: 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;
43ea2: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
43ea6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ea8: 4eba ff22 jsr %pc@(43dcc <echo>) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
43eac: 508f addql #8,%sp <== NOT EXECUTED 43eae: 7020 moveq #32,%d0 <== NOT EXECUTED 43eb0: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43eb4: 6600 0198 bnew 4404e <erase+0x1de> <== NOT EXECUTED
} } if (!lineFlag) break; } }
43eb8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 43ebe: 4e5e unlk %fp <== NOT EXECUTED 43ec0: 4e75 rts <== NOT EXECUTED 43ec2: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43ec6: 47f9 0004 3ac4 lea 43ac4 <rtems_termios_puts>,%a3 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
43ecc: 5381 subql #1,%d1 <== NOT EXECUTED 43ece: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED 43ed2: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 43ed6: 1031 1800 moveb %a1@(00000000,%d1:l),%d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
43eda: 44c3 movew %d3,%ccr <== NOT EXECUTED 43edc: 6a36 bpls 43f14 <erase+0xa4> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
43ede: 4a84 tstl %d4 <== NOT EXECUTED 43ee0: 6608 bnes 43eea <erase+0x7a> <== NOT EXECUTED 43ee2: 0803 0004 btst #4,%d3 <== NOT EXECUTED 43ee6: 6700 013e beqw 44026 <erase+0x1b6> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
43eea: 7409 moveq #9,%d2 <== NOT EXECUTED 43eec: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43ef2: b480 cmpl %d0,%d2 <== NOT EXECUTED 43ef4: 6700 008e beqw 43f84 <erase+0x114> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
43ef8: 2400 movel %d0,%d2 <== NOT EXECUTED 43efa: 5282 addql #1,%d2 <== NOT EXECUTED 43efc: 2079 0005 c378 moveal 5c378 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43f02: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 43f06: 49c0 extbl %d0 <== NOT EXECUTED 43f08: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43f0c: 6752 beqs 43f60 <erase+0xf0> <== NOT EXECUTED 43f0e: 0803 0009 btst #9,%d3 <== NOT EXECUTED 43f12: 6610 bnes 43f24 <erase+0xb4> <== NOT EXECUTED
if (tty->column) tty->column--; } } } if (!lineFlag)
43f14: 4a84 tstl %d4 <== NOT EXECUTED 43f16: 67a0 beqs 43eb8 <erase+0x48> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
43f18: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 43f1c: 679a beqs 43eb8 <erase+0x48> <== NOT EXECUTED 43f1e: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43f22: 60a8 bras 43ecc <erase+0x5c> <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
43f24: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43f26: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 43f2a: 4879 0005 b30b pea 5b30b <rtems_status_assoc+0x175> <== NOT EXECUTED 43f30: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->column)
43f32: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43f36: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43f3a: 6706 beqs 43f42 <erase+0xd2> <== NOT EXECUTED
tty->column--;
43f3c: 5380 subql #1,%d0 <== NOT EXECUTED 43f3e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
43f42: 2079 0005 c378 moveal 5c378 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43f48: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 43f4c: 49c0 extbl %d0 <== NOT EXECUTED 43f4e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43f52: 670c beqs 43f60 <erase+0xf0> <== NOT EXECUTED 43f54: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43f58: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 43f5e: 67b4 beqs 43f14 <erase+0xa4> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
43f60: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43f62: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 43f66: 4879 0005 b30b pea 5b30b <rtems_status_assoc+0x175> <== NOT EXECUTED 43f6c: 4eb9 0004 3ac4 jsr 43ac4 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
43f72: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43f76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43f7a: 6798 beqs 43f14 <erase+0xa4> <== NOT EXECUTED
tty->column--;
43f7c: 5380 subql #1,%d0 <== NOT EXECUTED 43f7e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 43f82: 6090 bras 43f14 <erase+0xa4> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
int col = tty->read_start_column;
43f84: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
43f88: 4a81 tstl %d1 <== NOT EXECUTED 43f8a: 6734 beqs 43fc0 <erase+0x150> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
43f8c: 2879 0005 c378 moveal 5c378 <__ctype_ptr__>,%a4 <== NOT EXECUTED 43f92: 4280 clrl %d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
43f94: 0283 0000 0200 andil #512,%d3 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
43f9a: 4285 clrl %d5 <== NOT EXECUTED 43f9c: 1a31 0800 moveb %a1@(00000000,%d0:l),%d5 <== NOT EXECUTED 43fa0: 5280 addql #1,%d0 <== NOT EXECUTED 43fa2: 2045 moveal %d5,%a0 <== NOT EXECUTED
if (c == '\t') {
43fa4: 7a09 moveq #9,%d5 <== NOT EXECUTED 43fa6: ba88 cmpl %a0,%d5 <== NOT EXECUTED 43fa8: 676c beqs 44016 <erase+0x1a6> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
43faa: 1a34 8801 moveb %a4@(00000001,%a0:l),%d5 <== NOT EXECUTED 43fae: 49c5 extbl %d5 <== NOT EXECUTED 43fb0: 0805 0005 btst #5,%d5 <== NOT EXECUTED 43fb4: 6758 beqs 4400e <erase+0x19e> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
43fb6: 4a83 tstl %d3 <== NOT EXECUTED 43fb8: 6702 beqs 43fbc <erase+0x14c> <== NOT EXECUTED
col += 2;
43fba: 5482 addql #2,%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
43fbc: b081 cmpl %d1,%d0 <== NOT EXECUTED 43fbe: 66da bnes 43f9a <erase+0x12a> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
43fc0: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 43fc4: 6c00 ff4e bgew 43f14 <erase+0xa4> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
43fc8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fca: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43fce: 4879 0005 b30d pea 5b30d <rtems_status_assoc+0x177> <== NOT EXECUTED 43fd4: 4e93 jsr %a3@ <== NOT EXECUTED
tty->column--;
43fd6: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43fda: 5380 subql #1,%d0 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
43fdc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
43fe0: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
43fe4: b082 cmpl %d2,%d0 <== NOT EXECUTED 43fe6: 6f00 ff2c blew 43f14 <erase+0xa4> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
43fea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fec: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43ff0: 4879 0005 b30d pea 5b30d <rtems_status_assoc+0x177> <== NOT EXECUTED 43ff6: 4e93 jsr %a3@ <== NOT EXECUTED
tty->column--;
43ff8: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43ffc: 5380 subql #1,%d0 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
43ffe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
44002: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44006: b082 cmpl %d2,%d0 <== NOT EXECUTED 44008: 6ebe bgts 43fc8 <erase+0x158> <== NOT EXECUTED 4400a: 6000 ff08 braw 43f14 <erase+0xa4> <== NOT EXECUTED
else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
}
else {
col++;
4400e: 5282 addql #1,%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44010: b081 cmpl %d1,%d0 <== NOT EXECUTED 44012: 6686 bnes 43f9a <erase+0x12a> <== NOT EXECUTED 44014: 60aa bras 43fc0 <erase+0x150> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
44016: 1a3c 0007 moveb #7,%d5 <== NOT EXECUTED 4401a: 8485 orl %d5,%d2 <== NOT EXECUTED 4401c: 5282 addql #1,%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
4401e: b081 cmpl %d1,%d0 <== NOT EXECUTED 44020: 6600 ff78 bnew 43f9a <erase+0x12a> <== NOT EXECUTED 44024: 609a bras 43fc0 <erase+0x150> <== 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);
44026: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4402a: 4280 clrl %d0 <== NOT EXECUTED 4402c: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED
} } if (!lineFlag) break; } }
44030: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
44036: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
} } if (!lineFlag) break; } }
4403a: 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);
4403c: 6000 fd8e braw 43dcc <echo> <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
44040: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
} } if (!lineFlag) break; } }
44044: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4404a: 4e5e unlk %fp <== NOT EXECUTED 4404c: 4e75 rts <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
4404e: 700a moveq #10,%d0 <== NOT EXECUTED 44050: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
} } if (!lineFlag) break; } }
44054: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
4405a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
} } if (!lineFlag) break; } }
4405e: 4e5e unlk %fp <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
44060: 6000 fd6a braw 43dcc <echo> <== NOT EXECUTED
00043908 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
43908: 4e56 fff4 linkw %fp,#-12 4390c: 202e 0008 movel %fp@(8),%d0
#include <sys/types.h>
#include <sys/stat.h> /* 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, ...));
43910: 41ee 0010 lea %fp@(16),%a0 43914: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43918: 242e 000c movel %fp@(12),%d2
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
4391c: 2239 0006 00f4 movel 600f4 <rtems_libio_number_iops>,%d1 43922: b280 cmpl %d0,%d1 43924: 6300 0192 blsw 43ab8 <fcntl+0x1b0>
iop = rtems_libio_iop( fd );
43928: 2279 0006 1780 moveal 61780 <rtems_libio_iops>,%a1 4392e: ed88 lsll #6,%d0 43930: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
rtems_libio_check_is_open(iop);
43934: 202a 0014 movel %a2@(20),%d0 43938: 0800 0008 btst #8,%d0 4393c: 6700 017a beqw 43ab8 <fcntl+0x1b0>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
43940: 7609 moveq #9,%d3 43942: b682 cmpl %d2,%d3
43944: 641a bccs 43960 <fcntl+0x58>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
43946: 4eb9 0005 0250 jsr 50250 <__errno> 4394c: 76ff moveq #-1,%d3 4394e: 2040 moveal %d0,%a0 43950: 7016 moveq #22,%d0 43952: 2080 movel %d0,%a0@
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43954: 2003 movel %d3,%d0 43956: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4395c: 4e5e unlk %fp 4395e: 4e75 rts
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
43960: 363b 2a08 movew %pc@(4396a <fcntl+0x62>,%d2:l:2),%d3 43964: 48c3 extl %d3 43966: 4efb 3802 jmp %pc@(4396a <fcntl+0x62>,%d3:l)
4396a: 00b8 00ac 009c oril #11272348,%d0 <== NOT EXECUTED 43970: 0082 0030 0014 oril #3145748,%d2 <== NOT EXECUTED 43976: 0014 024 <== NOT EXECUTED 43978: 0014 024 <== NOT EXECUTED 4397a: 0014 024 <== NOT EXECUTED 4397c: 0014 024 <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
4397e: 4eb9 0005 0250 jsr 50250 <__errno> 43984: 76ff moveq #-1,%d3 43986: 2040 moveal %d0,%a0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43988: 2003 movel %d3,%d0 4398a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
43990: 20bc 0000 0086 movel #134,%a0@
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43996: 4e5e unlk %fp 43998: 4e75 rts
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 ) );
4399a: 2f10 movel %a0@,%sp@-
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
4399c: 4283 clrl %d3
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 ) );
4399e: 4eb9 0004 4280 jsr 44280 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
439a4: 222a 0014 movel %a2@(20),%d1 439a8: 588f addql #4,%sp 439aa: 0280 0000 0201 andil #513,%d0 439b0: 0281 ffff fdfe andil #-514,%d1 439b6: 8081 orl %d1,%d0 439b8: 2540 0014 movel %d0,%a2@(20)
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
439bc: 206a 003c moveal %a2@(60),%a0 439c0: 2068 0030 moveal %a0@(48),%a0 439c4: 4a88 tstl %a0
439c6: 678c beqs 43954 <fcntl+0x4c> <== NEVER TAKEN
int err = (*iop->handlers->fcntl_h)( cmd, iop );
439c8: 2f0a movel %a2,%sp@- 439ca: 2f02 movel %d2,%sp@- 439cc: 4e90 jsr %a0@
if (err) {
439ce: 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 );
439d0: 2400 movel %d0,%d2
if (err) {
439d2: 6780 beqs 43954 <fcntl+0x4c> <== ALWAYS TAKEN
errno = err;
439d4: 4eb9 0005 0250 jsr 50250 <__errno> <== NOT EXECUTED 439da: 76ff moveq #-1,%d3 <== NOT EXECUTED 439dc: 2040 moveal %d0,%a0 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
439de: 2003 movel %d3,%d0 <== NOT EXECUTED
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
439e0: 2082 movel %d2,%a0@ <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
439e2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 439e8: 4e5e unlk %fp <== NOT EXECUTED 439ea: 4e75 rts <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
439ec: 2f00 movel %d0,%sp@- 439ee: 4eb9 0004 3ff0 jsr 43ff0 <rtems_libio_to_fcntl_flags> 439f4: 588f addql #4,%sp 439f6: 2600 movel %d0,%d3
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
439f8: 6cc2 bges 439bc <fcntl+0xb4> <== ALWAYS TAKEN
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
439fa: 2003 movel %d3,%d0 <== NOT EXECUTED 439fc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43a02: 4e5e unlk %fp <== NOT EXECUTED 43a04: 4e75 rts <== NOT EXECUTED
* 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 ) )
43a06: 4a90 tstl %a0@
43a08: 6766 beqs 43a70 <fcntl+0x168> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
43a0a: 4283 clrl %d3 43a0c: 08c0 000b bset #11,%d0 43a10: 2540 0014 movel %d0,%a2@(20) 43a14: 60a6 bras 439bc <fcntl+0xb4>
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
43a16: 2600 movel %d0,%d3 43a18: 720b moveq #11,%d1 43a1a: e2ab lsrl %d1,%d3 43a1c: 7001 moveq #1,%d0 43a1e: c680 andl %d0,%d3 43a20: 609a bras 439bc <fcntl+0xb4>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
43a22: 2010 movel %a0@,%d0
if ( fd2 )
43a24: 6700 00ac beqw 43ad2 <fcntl+0x1ca>
diop = rtems_libio_iop( fd2 );
43a28: b081 cmpl %d1,%d0 <== NOT EXECUTED 43a2a: 6452 bccs 43a7e <fcntl+0x176> <== NOT EXECUTED 43a2c: ed88 lsll #6,%d0 <== NOT EXECUTED 43a2e: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 <== NOT EXECUTED 43a32: 2608 movel %a0,%d3 <== 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);
43a34: 9689 subl %a1,%d3 <== NOT EXECUTED 43a36: ec83 asrl #6,%d3 <== NOT EXECUTED
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43a38: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 43a3e: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 43a44: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 43a4a: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
43a50: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43a56: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
43a5c: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED
diop->flags = iop->flags;
43a62: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
43a68: 4a83 tstl %d3 43a6a: 6c00 ff50 bgew 439bc <fcntl+0xb4>
43a6e: 608a bras 439fa <fcntl+0xf2> <== NOT EXECUTED
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
43a70: 4283 clrl %d3 <== NOT EXECUTED 43a72: 0880 000b bclr #11,%d0 <== NOT EXECUTED 43a76: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED 43a7a: 6000 ff40 braw 439bc <fcntl+0xb4> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
43a7e: 91c8 subal %a0,%a0 <== NOT EXECUTED 43a80: 4283 clrl %d3 <== 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);
43a82: 9689 subl %a1,%d3 <== NOT EXECUTED 43a84: ec83 asrl #6,%d3 <== NOT EXECUTED
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43a86: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 43a8c: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 43a92: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 43a98: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
43a9e: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43aa4: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
43aaa: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED
diop->flags = iop->flags;
43ab0: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED 43ab6: 60b0 bras 43a68 <fcntl+0x160> <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43ab8: 4eb9 0005 0250 jsr 50250 <__errno> <== NOT EXECUTED 43abe: 76ff moveq #-1,%d3 <== NOT EXECUTED 43ac0: 7209 moveq #9,%d1 <== NOT EXECUTED 43ac2: 2040 moveal %d0,%a0 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43ac4: 2003 movel %d3,%d0 <== NOT EXECUTED 43ac6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43acc: 2081 movel %d1,%a0@ <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43ace: 4e5e unlk %fp <== NOT EXECUTED 43ad0: 4e75 rts <== NOT EXECUTED
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
43ad2: 4eb9 0004 41c8 jsr 441c8 <rtems_libio_allocate> 43ad8: 2040 moveal %d0,%a0
if ( diop == 0 ) {
43ada: 4a80 tstl %d0
43adc: 6740 beqs 43b1e <fcntl+0x216> <== NEVER TAKEN
43ade: 2279 0006 1780 moveal 61780 <rtems_libio_iops>,%a1 43ae4: 2600 movel %d0,%d3
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
43ae6: 9689 subl %a1,%d3 43ae8: ec83 asrl #6,%d3
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43aea: 216a 0018 0018 movel %a2@(24),%a0@(24) 43af0: 216a 001c 001c movel %a2@(28),%a0@(28) 43af6: 216a 0020 0020 movel %a2@(32),%a0@(32) 43afc: 216a 0024 0024 movel %a2@(36),%a0@(36)
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
43b02: 216a 003c 003c movel %a2@(60),%a0@(60)
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43b08: 216a 0028 0028 movel %a2@(40),%a0@(40)
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
43b0e: 216a 0038 0038 movel %a2@(56),%a0@(56)
diop->flags = iop->flags;
43b14: 216a 0014 0014 movel %a2@(20),%a0@(20) 43b1a: 6000 ff4c braw 43a68 <fcntl+0x160>
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
if ( diop == 0 ) {
43b1e: 76ff moveq #-1,%d3 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43b20: 2003 movel %d3,%d0 <== NOT EXECUTED 43b22: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43b28: 4e5e unlk %fp <== NOT EXECUTED
00043b50 <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
43b50: 4e56 0000 linkw %fp,#0 43b54: 202e 0008 movel %fp@(8),%d0
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
43b58: b0b9 0006 00f4 cmpl 600f4 <rtems_libio_number_iops>,%d0
43b5e: 642c bccs 43b8c <fdatasync+0x3c> iop = rtems_libio_iop( fd );
43b60: 2079 0006 1780 moveal 61780 <rtems_libio_iops>,%a0 43b66: ed88 lsll #6,%d0 43b68: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43b6a: 2028 0014 movel %a0@(20),%d0 43b6e: 0800 0008 btst #8,%d0
43b72: 6718 beqs 43b8c <fdatasync+0x3c> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43b74: 44c0 movew %d0,%ccr
43b76: 6626 bnes 43b9e <fdatasync+0x4e>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
43b78: 2268 003c moveal %a0@(60),%a1 43b7c: 2269 002c moveal %a1@(44),%a1 43b80: 4a89 tstl %a1
43b82: 672c beqs 43bb0 <fdatasync+0x60>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
43b84: 2d48 0008 movel %a0,%fp@(8)
}
43b88: 4e5e unlk %fp
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
43b8a: 4ed1 jmp %a1@
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43b8c: 4eb9 0005 0250 jsr 50250 <__errno> 43b92: 7209 moveq #9,%d1 43b94: 2040 moveal %d0,%a0
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
43b96: 70ff moveq #-1,%d0 43b98: 4e5e unlk %fp
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43b9a: 2081 movel %d1,%a0@
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
43b9c: 4e75 rts
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43b9e: 4eb9 0005 0250 jsr 50250 <__errno>
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
43ba4: 4e5e unlk %fp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43ba6: 2040 moveal %d0,%a0 43ba8: 7016 moveq #22,%d0 43baa: 2080 movel %d0,%a0@
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
43bac: 70ff moveq #-1,%d0 43bae: 4e75 rts
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43bb0: 4eb9 0005 0250 jsr 50250 <__errno>
return (*iop->handlers->fdatasync_h)( iop );
}
43bb6: 4e5e unlk %fp
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43bb8: 2040 moveal %d0,%a0
return (*iop->handlers->fdatasync_h)( iop );
}
43bba: 70ff moveq #-1,%d0
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43bbc: 20bc 0000 0086 movel #134,%a0@
return (*iop->handlers->fdatasync_h)( iop );
}
0004c312 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4c312: 4e56 ffe0 linkw %fp,#-32 4c316: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4c31a: 42a7 clrl %sp@-
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4c31c: 286e 0008 moveal %fp@(8),%a4
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4c320: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3 4c326: 42a7 clrl %sp@- 4c328: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@-
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4c32e: 242e 000c movel %fp@(12),%d2
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4c332: 4e93 jsr %a3@ 4c334: 4fef 000c lea %sp@(12),%sp 4c338: 4a80 tstl %d0
4c33a: 6710 beqs 4c34c <fifo_open+0x3a> <== NEVER TAKEN
4c33c: 347c fffc moveaw #-4,%a2
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4c340: 200a movel %a2,%d0 4c342: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4c348: 4e5e unlk %fp 4c34a: 4e75 rts
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
4c34c: 2614 movel %a4@,%d3 <== NOT EXECUTED
if (pipe == NULL) {
4c34e: 6700 00ea beqw 4c43a <fifo_open+0x128> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4c352: 42a7 clrl %sp@- <== NOT EXECUTED 4c354: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c356: 42a7 clrl %sp@- <== NOT EXECUTED 4c358: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c35c: 4e93 jsr %a3@ <== NOT EXECUTED 4c35e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c362: 4a80 tstl %d0 <== NOT EXECUTED 4c364: 6758 beqs 4c3be <fifo_open+0xac> <== NOT EXECUTED 4c366: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
4c36a: 4a94 tstl %a4@ <== NOT EXECUTED 4c36c: 6700 01be beqw 4c52c <fifo_open+0x21a> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4c370: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4c376: 4bf9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a5 <== NOT EXECUTED 4c37c: 4e95 jsr %a5@ <== NOT EXECUTED
pipe_control_t *pipe;
uint prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4c37e: 588f addql #4,%sp <== NOT EXECUTED 4c380: 4a8a tstl %a2 <== NOT EXECUTED 4c382: 66bc bnes 4c340 <fifo_open+0x2e> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4c384: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c386: 7006 moveq #6,%d0 <== NOT EXECUTED 4c388: 7604 moveq #4,%d3 <== NOT EXECUTED 4c38a: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4c38e: c081 andl %d1,%d0 <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
4c390: 2454 moveal %a4@,%a2 <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
4c392: b680 cmpl %d0,%d3 <== NOT EXECUTED 4c394: 6700 01c2 beqw 4c558 <fifo_open+0x246> <== NOT EXECUTED 4c398: 7206 moveq #6,%d1 <== NOT EXECUTED 4c39a: b280 cmpl %d0,%d1 <== NOT EXECUTED 4c39c: 6700 01e2 beqw 4c580 <fifo_open+0x26e> <== NOT EXECUTED 4c3a0: 163c 0002 moveb #2,%d3 <== NOT EXECUTED 4c3a4: b680 cmpl %d0,%d3 <== NOT EXECUTED 4c3a6: 6720 beqs 4c3c8 <fifo_open+0xb6> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4c3a8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c3ac: 95ca subal %a2,%a2 <== NOT EXECUTED 4c3ae: 4e95 jsr %a5@ <== NOT EXECUTED
return 0;
4c3b0: 588f addql #4,%sp <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
return err;
}
4c3b2: 200a movel %a2,%d0 <== NOT EXECUTED 4c3b4: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4c3ba: 4e5e unlk %fp <== NOT EXECUTED 4c3bc: 4e75 rts <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4c3be: 95ca subal %a2,%a2 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
4c3c0: 4a94 tstl %a4@ <== NOT EXECUTED 4c3c2: 66ac bnes 4c370 <fifo_open+0x5e> <== NOT EXECUTED 4c3c4: 6000 0166 braw 4c52c <fifo_open+0x21a> <== NOT EXECUTED
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4c3c8: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4c3cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c3ce: 5288 addql #1,%a0 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
4c3d0: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
4c3d4: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4c3d8: 4a80 tstl %d0 <== NOT EXECUTED 4c3da: 6700 0256 beqw 4c632 <fifo_open+0x320> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
4c3de: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c3e2: 66c4 bnes 4c3a8 <fifo_open+0x96> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
4c3e4: 7001 moveq #1,%d0 <== NOT EXECUTED 4c3e6: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c3e8: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4c3ec: 66ba bnes 4c3a8 <fifo_open+0x96> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
4c3ee: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED 4c3f2: 263c 0004 cd1c movel #314652,%d3 <== NOT EXECUTED
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4c3f8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c3fc: 4e95 jsr %a5@ <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
4c3fe: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c400: 42a7 clrl %sp@- <== NOT EXECUTED 4c402: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c406: 4e90 jsr %a0@ <== NOT EXECUTED 4c408: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c40c: 4a80 tstl %d0 <== NOT EXECUTED 4c40e: 6600 02f4 bnew 4c704 <fifo_open+0x3f2> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
4c412: 42a7 clrl %sp@- <== NOT EXECUTED 4c414: 42a7 clrl %sp@- <== NOT EXECUTED 4c416: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c41a: 4e93 jsr %a3@ <== NOT EXECUTED 4c41c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c420: 4a80 tstl %d0 <== NOT EXECUTED 4c422: 6600 02e0 bnew 4c704 <fifo_open+0x3f2> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
4c426: b8aa 0024 cmpl %a2@(36),%d4 <== NOT EXECUTED 4c42a: 67cc beqs 4c3f8 <fifo_open+0xe6> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4c42c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c430: 95ca subal %a2,%a2 <== NOT EXECUTED 4c432: 4e95 jsr %a5@ <== NOT EXECUTED
return 0;
4c434: 588f addql #4,%sp <== NOT EXECUTED 4c436: 6000 ff7a braw 4c3b2 <fifo_open+0xa0> <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4c43a: 4878 0034 pea 34 <OPER2+0x20> <== NOT EXECUTED 4c43e: 45f9 0004 aaf4 lea 4aaf4 <malloc>,%a2 <== NOT EXECUTED 4c444: 4e92 jsr %a2@ <== NOT EXECUTED
if (pipe == NULL)
4c446: 588f addql #4,%sp <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4c448: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4c44a: 2600 movel %d0,%d3 <== NOT EXECUTED
if (pipe == NULL)
4c44c: 6700 02ca beqw 4c718 <fifo_open+0x406> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
4c450: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> <== NOT EXECUTED
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4c454: 2040 moveal %d0,%a0 <== NOT EXECUTED
pipe->Size = PIPE_BUF;
4c456: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4c45c: 4298 clrl %a0@+ <== NOT EXECUTED 4c45e: 5888 addql #4,%a0 <== NOT EXECUTED 4c460: 4298 clrl %a0@+ <== NOT EXECUTED 4c462: 4298 clrl %a0@+ <== NOT EXECUTED 4c464: 4298 clrl %a0@+ <== NOT EXECUTED 4c466: 4298 clrl %a0@+ <== NOT EXECUTED 4c468: 4298 clrl %a0@+ <== NOT EXECUTED 4c46a: 4298 clrl %a0@+ <== NOT EXECUTED 4c46c: 4298 clrl %a0@+ <== NOT EXECUTED 4c46e: 4298 clrl %a0@+ <== NOT EXECUTED 4c470: 4298 clrl %a0@+ <== NOT EXECUTED 4c472: 4298 clrl %a0@+ <== NOT EXECUTED 4c474: 4290 clrl %a0@ <== NOT EXECUTED
pipe->Size = PIPE_BUF;
4c476: 2b40 0004 movel %d0,%a5@(4) <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
4c47a: 4e92 jsr %a2@ <== NOT EXECUTED
if (! pipe->Buffer)
4c47c: 588f addql #4,%sp <== NOT EXECUTED
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
4c47e: 2a80 movel %d0,%a5@ <== NOT EXECUTED
if (! pipe->Buffer)
4c480: 6700 02b4 beqw 4c736 <fifo_open+0x424> <== NOT EXECUTED
goto err_buf;
err = -EINTR;
if (rtems_barrier_create(
4c484: 486d 002c pea %a5@(44) <== NOT EXECUTED 4c488: 45f9 0004 cb38 lea 4cb38 <rtems_barrier_create>,%a2 <== NOT EXECUTED 4c48e: 1039 0005 c33c moveb 5c33c <c.5449>,%d0 <== NOT EXECUTED 4c494: 42a7 clrl %sp@- <== NOT EXECUTED 4c496: 49c0 extbl %d0 <== NOT EXECUTED 4c498: 42a7 clrl %sp@- <== NOT EXECUTED 4c49a: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4c4a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c4a2: 4e92 jsr %a2@ <== NOT EXECUTED 4c4a4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4c4a8: 4a80 tstl %d0 <== NOT EXECUTED 4c4aa: 6600 01d6 bnew 4c682 <fifo_open+0x370> <== 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(
4c4ae: 486d 0030 pea %a5@(48) <== NOT EXECUTED 4c4b2: 283c 0004 cc34 movel #314420,%d4 <== NOT EXECUTED 4c4b8: 1039 0005 c33c moveb 5c33c <c.5449>,%d0 <== NOT EXECUTED 4c4be: 42a7 clrl %sp@- <== NOT EXECUTED 4c4c0: 49c0 extbl %d0 <== NOT EXECUTED 4c4c2: 42a7 clrl %sp@- <== NOT EXECUTED 4c4c4: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4c4ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c4cc: 4e92 jsr %a2@ <== NOT EXECUTED 4c4ce: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4c4d2: 4a80 tstl %d0 <== NOT EXECUTED 4c4d4: 6600 01a2 bnew 4c678 <fifo_open+0x366> <== 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(
4c4d8: 486d 0028 pea %a5@(40) <== NOT EXECUTED 4c4dc: 1039 0005 c33c moveb 5c33c <c.5449>,%d0 <== NOT EXECUTED 4c4e2: 42a7 clrl %sp@- <== NOT EXECUTED 4c4e4: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 4c4e8: 49c0 extbl %d0 <== NOT EXECUTED 4c4ea: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4c4ee: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4c4f4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c4f6: 4eb9 0004 5a8c jsr 45a8c <rtems_semaphore_create> <== NOT EXECUTED 4c4fc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4c500: 4a80 tstl %d0 <== NOT EXECUTED 4c502: 6600 016a bnew 4c66e <fifo_open+0x35c> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4c506: 1039 0005 c33c moveb 5c33c <c.5449>,%d0 <== NOT EXECUTED 4c50c: 49c0 extbl %d0 <== NOT EXECUTED 4c50e: 2200 movel %d0,%d1 <== NOT EXECUTED 4c510: 5281 addql #1,%d1 <== NOT EXECUTED 4c512: 13c1 0005 c33c moveb %d1,5c33c <c.5449> <== NOT EXECUTED 4c518: 727a moveq #122,%d1 <== NOT EXECUTED 4c51a: b280 cmpl %d0,%d1 <== NOT EXECUTED 4c51c: 6600 fe34 bnew 4c352 <fifo_open+0x40> <== NOT EXECUTED
c = 'a';
4c520: 7061 moveq #97,%d0 <== NOT EXECUTED 4c522: 13c0 0005 c33c moveb %d0,5c33c <c.5449> <== NOT EXECUTED 4c528: 6000 fe28 braw 4c352 <fifo_open+0x40> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
4c52c: 4a8a tstl %a2 <== NOT EXECUTED 4c52e: 6600 0186 bnew 4c6b6 <fifo_open+0x3a4> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4c532: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4c538: 4bf9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a5 <== NOT EXECUTED
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
else
*pipep = pipe;
4c53e: 2883 movel %d3,%a4@ <== NOT EXECUTED
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4c540: 7604 moveq #4,%d3 <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4c542: 4e95 jsr %a5@ <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
4c544: 2454 moveal %a4@,%a2 <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
4c546: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c548: 7006 moveq #6,%d0 <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4c54a: 588f addql #4,%sp <== NOT EXECUTED
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4c54c: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4c550: c081 andl %d1,%d0 <== NOT EXECUTED 4c552: b680 cmpl %d0,%d3 <== NOT EXECUTED 4c554: 6600 fe42 bnew 4c398 <fifo_open+0x86> <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4c558: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c55c: 666c bnes 4c5ca <fifo_open+0x2b8> <== NOT EXECUTED 4c55e: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4c562: 6766 beqs 4c5ca <fifo_open+0x2b8> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4c564: 2f02 movel %d2,%sp@- <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4c566: 347c fffa moveaw #-6,%a2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4c56a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4c56c: 4eb9 0004 c1f2 jsr 4c1f2 <pipe_release> <== NOT EXECUTED
return err;
4c572: 508f addql #8,%sp <== NOT EXECUTED
}
4c574: 200a movel %a2,%d0 <== NOT EXECUTED 4c576: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4c57c: 4e5e unlk %fp <== NOT EXECUTED 4c57e: 4e75 rts <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4c580: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4c584: 2200 movel %d0,%d1 <== NOT EXECUTED 4c586: 5281 addql #1,%d1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
4c588: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
4c58c: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4c590: 4a80 tstl %d0 <== NOT EXECUTED 4c592: 6700 00b2 beqw 4c646 <fifo_open+0x334> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4c596: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4c59a: 2600 movel %d0,%d3 <== NOT EXECUTED 4c59c: 5283 addql #1,%d3 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
4c59e: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
4c5a2: 2543 0014 movel %d3,%a2@(20) <== NOT EXECUTED 4c5a6: 4a80 tstl %d0 <== NOT EXECUTED 4c5a8: 6600 fdfe bnew 4c3a8 <fifo_open+0x96> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
4c5ac: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c5b0: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c5b4: 4eb9 0004 cca4 jsr 4cca4 <rtems_barrier_release> <== NOT EXECUTED 4c5ba: 508f addql #8,%sp <== NOT EXECUTED
break;
}
PIPE_UNLOCK(pipe);
4c5bc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c5c0: 95ca subal %a2,%a2 <== NOT EXECUTED 4c5c2: 4e95 jsr %a5@ <== NOT EXECUTED
return 0;
4c5c4: 588f addql #4,%sp <== NOT EXECUTED 4c5c6: 6000 fdea braw 4c3b2 <fifo_open+0xa0> <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4c5ca: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4c5ce: 2200 movel %d0,%d1 <== NOT EXECUTED 4c5d0: 5281 addql #1,%d1 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
4c5d2: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
4c5d6: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4c5da: 4a80 tstl %d0 <== NOT EXECUTED 4c5dc: 677c beqs 4c65a <fifo_open+0x348> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0) {
4c5de: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c5e2: 6600 fdc4 bnew 4c3a8 <fifo_open+0x96> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
4c5e6: 282a 0020 movel %a2@(32),%d4 <== NOT EXECUTED 4c5ea: 263c 0004 cd1c movel #314652,%d3 <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4c5f0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c5f4: 4e95 jsr %a5@ <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
4c5f6: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c5f8: 42a7 clrl %sp@- <== NOT EXECUTED 4c5fa: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c5fe: 4e90 jsr %a0@ <== NOT EXECUTED 4c600: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c604: 4a80 tstl %d0 <== NOT EXECUTED 4c606: 6600 00fc bnew 4c704 <fifo_open+0x3f2> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
4c60a: 42a7 clrl %sp@- <== NOT EXECUTED 4c60c: 42a7 clrl %sp@- <== NOT EXECUTED 4c60e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c612: 4e93 jsr %a3@ <== NOT EXECUTED 4c614: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c618: 4a80 tstl %d0 <== NOT EXECUTED 4c61a: 6600 00e8 bnew 4c704 <fifo_open+0x3f2> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
4c61e: b8aa 0020 cmpl %a2@(32),%d4 <== NOT EXECUTED 4c622: 67cc beqs 4c5f0 <fifo_open+0x2de> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4c624: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c628: 95ca subal %a2,%a2 <== NOT EXECUTED 4c62a: 4e95 jsr %a5@ <== NOT EXECUTED
return 0;
4c62c: 588f addql #4,%sp <== NOT EXECUTED 4c62e: 6000 fd82 braw 4c3b2 <fifo_open+0xa0> <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4c632: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c636: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c63a: 4eb9 0004 cca4 jsr 4cca4 <rtems_barrier_release> <== NOT EXECUTED 4c640: 508f addql #8,%sp <== NOT EXECUTED 4c642: 6000 fd9a braw 4c3de <fifo_open+0xcc> <== NOT EXECUTED
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4c646: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c64a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c64e: 4eb9 0004 cca4 jsr 4cca4 <rtems_barrier_release> <== NOT EXECUTED 4c654: 508f addql #8,%sp <== NOT EXECUTED 4c656: 6000 ff3e braw 4c596 <fifo_open+0x284> <== NOT EXECUTED
goto out_error;
}
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
4c65a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c65e: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c662: 4eb9 0004 cca4 jsr 4cca4 <rtems_barrier_release> <== NOT EXECUTED 4c668: 508f addql #8,%sp <== NOT EXECUTED 4c66a: 6000 ff72 braw 4c5de <fifo_open+0x2cc> <== NOT EXECUTED
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
4c66e: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4c672: 2044 moveal %d4,%a0 <== NOT EXECUTED 4c674: 4e90 jsr %a0@ <== NOT EXECUTED 4c676: 588f addql #4,%sp <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier);
4c678: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 4c67c: 2044 moveal %d4,%a0 <== NOT EXECUTED 4c67e: 4e90 jsr %a0@ <== NOT EXECUTED 4c680: 588f addql #4,%sp <== NOT EXECUTED
err_rbar: free(pipe->Buffer);
4c682: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4c684: 263c 0004 a584 movel #304516,%d3 <== NOT EXECUTED 4c68a: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c68c: 4e90 jsr %a0@ <== NOT EXECUTED 4c68e: 588f addql #4,%sp <== NOT EXECUTED
err_buf: free(pipe);
4c690: 2043 moveal %d3,%a0 <== NOT EXECUTED
err_sem: rtems_barrier_delete(pipe->writeBarrier); err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer);
4c692: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
err_buf: free(pipe);
4c696: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4c698: 4e90 jsr %a0@ <== NOT EXECUTED 4c69a: 588f addql #4,%sp <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4c69c: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4c6a2: 4bf9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a5 <== NOT EXECUTED 4c6a8: 4e95 jsr %a5@ <== NOT EXECUTED
pipe_control_t *pipe;
uint prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4c6aa: 588f addql #4,%sp <== NOT EXECUTED 4c6ac: 4a8a tstl %a2 <== NOT EXECUTED 4c6ae: 6700 fcd4 beqw 4c384 <fifo_open+0x72> <== NOT EXECUTED 4c6b2: 6000 fc8c braw 4c340 <fifo_open+0x2e> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4c6b6: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c6b8: 49f9 0004 cc34 lea 4cc34 <rtems_barrier_delete>,%a4 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4c6be: 47f9 0004 a584 lea 4a584 <free>,%a3 <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4c6c4: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4c6c8: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
4c6ca: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c6cc: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4c6d0: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
4c6d2: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c6d4: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c6d8: 4eb9 0004 5c54 jsr 45c54 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
4c6de: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c6e0: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4c6e2: 4e93 jsr %a3@ <== NOT EXECUTED
free(pipe);
4c6e4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4c6e6: 4e93 jsr %a3@ <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4c6e8: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4c6ee: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED 4c6f4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4c6f8: 200a movel %a2,%d0 <== NOT EXECUTED 4c6fa: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4c700: 4e5e unlk %fp <== NOT EXECUTED 4c702: 4e75 rts <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4c704: 2f02 movel %d2,%sp@- <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
return 0;
4c706: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
4c70a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4c70c: 4eb9 0004 c1f2 jsr 4c1f2 <pipe_release> <== NOT EXECUTED
return err;
4c712: 508f addql #8,%sp <== NOT EXECUTED 4c714: 6000 fe5e braw 4c574 <fifo_open+0x262> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4c718: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4c71e: 4bf9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a5 <== NOT EXECUTED
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
4c724: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4c728: 4e95 jsr %a5@ <== NOT EXECUTED
pipe_control_t *pipe;
uint prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4c72a: 588f addql #4,%sp <== NOT EXECUTED 4c72c: 4a8a tstl %a2 <== NOT EXECUTED 4c72e: 6700 fc54 beqw 4c384 <fifo_open+0x72> <== NOT EXECUTED 4c732: 6000 fc0c braw 4c340 <fifo_open+0x2e> <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe);
4c736: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4c738: 263c 0004 a584 movel #304516,%d3 <== NOT EXECUTED 4c73e: 2043 moveal %d3,%a0 <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
if (! pipe->Buffer)
4c740: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe);
4c744: 4e90 jsr %a0@ <== NOT EXECUTED 4c746: 588f addql #4,%sp <== NOT EXECUTED 4c748: 6000 ff52 braw 4c69c <fifo_open+0x38a> <== NOT EXECUTED
00049574 <file_systems_below_this_mountpoint>:
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))
)
{
49574: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
49578: 2079 0006 5dcc moveal 65dcc <rtems_filesystem_mount_table_control>,%a0<== NOT EXECUTED 4957e: b1fc 0006 5dd0 cmpal #417232,%a0 <== NOT EXECUTED 49584: 6724 beqs 495aa <file_systems_below_this_mountpoint+0x36><== 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 ) {
49586: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4958a: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 4958e: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 49592: 6710 beqs 495a4 <file_systems_below_this_mountpoint+0x30><== 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 ) {
49594: 2050 moveal %a0@,%a0 <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
49596: b1fc 0006 5dd0 cmpal #417232,%a0 <== NOT EXECUTED 4959c: 670c beqs 495aa <file_systems_below_this_mountpoint+0x36><== 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 ) {
4959e: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 495a2: 66f0 bnes 49594 <file_systems_below_this_mountpoint+0x20><== NOT EXECUTED
return true;
}
}
return false;
}
495a4: 4e5e unlk %fp <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
495a6: 7001 moveq #1,%d0 <== NOT EXECUTED
return true;
}
}
return false;
}
495a8: 4e75 rts <== NOT EXECUTED 495aa: 4e5e unlk %fp <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
495ac: 4200 clrb %d0 <== NOT EXECUTED
return true;
}
}
return false;
}
00043bc4 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
43bc4: 4e56 0000 linkw %fp,#0 43bc8: 202e 0008 movel %fp@(8),%d0 43bcc: 222e 000c movel %fp@(12),%d1 43bd0: 2f02 movel %d2,%sp@-
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
43bd2: b0b9 0006 00f4 cmpl 600f4 <rtems_libio_number_iops>,%d0 43bd8: 6400 00f0 bccw 43cca <fpathconf+0x106>
iop = rtems_libio_iop(fd);
43bdc: 2079 0006 1780 moveal 61780 <rtems_libio_iops>,%a0 43be2: ed88 lsll #6,%d0 43be4: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43be6: 2428 0014 movel %a0@(20),%d2 43bea: 0802 0008 btst #8,%d2 43bee: 6700 00da beqw 43cca <fpathconf+0x106>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
43bf2: 0802 0001 btst #1,%d2
43bf6: 670a beqs 43c02 <fpathconf+0x3e> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
43bf8: 2068 0028 moveal %a0@(40),%a0
switch ( name ) {
43bfc: 700b moveq #11,%d0 43bfe: b081 cmpl %d1,%d0
43c00: 6416 bccs 43c18 <fpathconf+0x54>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43c02: 4eb9 0005 0250 jsr 50250 <__errno>
break;
}
return return_value;
}
43c08: 242e fffc movel %fp@(-4),%d2
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43c0c: 2040 moveal %d0,%a0 43c0e: 7216 moveq #22,%d1 43c10: 70ff moveq #-1,%d0
break;
}
return return_value;
}
43c12: 4e5e unlk %fp
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43c14: 2081 movel %d1,%a0@
break;
}
return return_value;
}
43c16: 4e75 rts
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
43c18: 303b 1a08 movew %pc@(43c22 <fpathconf+0x5e>,%d1:l:2),%d0 43c1c: 48c0 extl %d0 43c1e: 4efb 0802 jmp %pc@(43c22 <fpathconf+0x5e>,%d0:l)
43c22: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43c28: 006c 0154 <== NOT EXECUTED 43c2a: 0060 0140 <== NOT EXECUTED 43c2c: 0054 0124 <== NOT EXECUTED 43c2e: 0048 0110 <== NOT EXECUTED 43c30: 003c 074 <== NOT EXECUTED 43c32: 0030 060 <== NOT EXECUTED 43c34: 0024 044 <== NOT EXECUTED 43c36: 0018 030 <== NOT EXECUTED 43c38: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c3e: 4e5e unlk %fp
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
43c40: 2028 005c movel %a0@(92),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c44: 4e75 rts 43c46: 242e fffc movel %fp@(-4),%d2 43c4a: 4e5e unlk %fp
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
43c4c: 2028 0050 movel %a0@(80),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c50: 4e75 rts 43c52: 242e fffc movel %fp@(-4),%d2 43c56: 4e5e unlk %fp
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
43c58: 2028 0064 movel %a0@(100),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c5c: 4e75 rts 43c5e: 242e fffc movel %fp@(-4),%d2 43c62: 4e5e unlk %fp
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
43c64: 2028 0058 movel %a0@(88),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c68: 4e75 rts 43c6a: 242e fffc movel %fp@(-4),%d2 43c6e: 4e5e unlk %fp
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
43c70: 2028 0054 movel %a0@(84),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c74: 4e75 rts 43c76: 242e fffc movel %fp@(-4),%d2 43c7a: 4e5e unlk %fp
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
43c7c: 2028 004c movel %a0@(76),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c80: 4e75 rts 43c82: 242e fffc movel %fp@(-4),%d2 43c86: 4e5e unlk %fp
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
43c88: 2028 0048 movel %a0@(72),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c8c: 4e75 rts 43c8e: 242e fffc movel %fp@(-4),%d2 43c92: 4e5e unlk %fp
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
43c94: 2028 0044 movel %a0@(68),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c98: 4e75 rts 43c9a: 242e fffc movel %fp@(-4),%d2 43c9e: 4e5e unlk %fp
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
43ca0: 2028 0040 movel %a0@(64),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43ca4: 4e75 rts 43ca6: 242e fffc movel %fp@(-4),%d2 43caa: 4e5e unlk %fp
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
43cac: 2028 003c movel %a0@(60),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43cb0: 4e75 rts 43cb2: 242e fffc movel %fp@(-4),%d2 43cb6: 4e5e unlk %fp
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
43cb8: 2028 0038 movel %a0@(56),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43cbc: 4e75 rts 43cbe: 242e fffc movel %fp@(-4),%d2 43cc2: 4e5e unlk %fp
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
43cc4: 2028 0060 movel %a0@(96),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43cc8: 4e75 rts
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
43cca: 4eb9 0005 0250 jsr 50250 <__errno> 43cd0: 7409 moveq #9,%d2 43cd2: 2040 moveal %d0,%a0 43cd4: 70ff moveq #-1,%d0 43cd6: 2082 movel %d2,%a0@
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43cd8: 242e fffc movel %fp@(-4),%d2
43cdc: 4e5e unlk %fp <== NOT EXECUTED
0004a584 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
4a584: 4e56 0000 linkw %fp,#0 4a588: 52b9 0005 d884 addql #1,5d884 <rtems_malloc_statistics+0xc> 4a58e: 2f02 movel %d2,%sp@- 4a590: 242e 0008 movel %fp@(8),%d2
if ( !ptr )
4a594: 6732 beqs 4a5c8 <free+0x44>
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4a596: 7003 moveq #3,%d0 4a598: b0b9 0005 db4a cmpl 5db4a <_System_state_Current>,%d0
4a59e: 6758 beqs 4a5f8 <free+0x74> <== ALWAYS TAKEN
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
4a5a0: 2079 0005 c836 moveal 5c836 <rtems_malloc_statistics_helpers>,%a0 4a5a6: 4a88 tstl %a0
4a5a8: 670a beqs 4a5b4 <free+0x30> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_free)(ptr);
4a5aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a5ac: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 4a5b0: 4e90 jsr %a0@ <== NOT EXECUTED 4a5b2: 588f addql #4,%sp <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
4a5b4: 2f02 movel %d2,%sp@- 4a5b6: 2f39 0005 c1f0 movel 5c1f0 <RTEMS_Malloc_Heap>,%sp@- 4a5bc: 4eb9 0004 b6f4 jsr 4b6f4 <_Protected_heap_Free> 4a5c2: 508f addql #8,%sp 4a5c4: 4a00 tstb %d0
4a5c6: 6708 beqs 4a5d0 <free+0x4c> <== NEVER TAKEN
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
4a5c8: 242e fffc movel %fp@(-4),%d2 4a5cc: 4e5e unlk %fp 4a5ce: 4e75 rts
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
4a5d0: 2079 0005 c1f0 moveal 5c1f0 <RTEMS_Malloc_Heap>,%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",
4a5d6: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 4a5da: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 4a5de: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a5e0: 4879 0005 b652 pea 5b652 <IMFS_link_handlers+0x7e> <== NOT EXECUTED 4a5e6: 4eb9 0004 33ac jsr 433ac <printk> <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
4a5ec: 242e fffc movel %fp@(-4),%d2 <== 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",
4a5f0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
4a5f4: 4e5e unlk %fp <== NOT EXECUTED 4a5f6: 4e75 rts <== NOT EXECUTED
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4a5f8: 4eb9 0004 aa58 jsr 4aa58 <malloc_is_system_state_OK> 4a5fe: 4a00 tstb %d0
4a600: 669e bnes 4a5a0 <free+0x1c> <== ALWAYS TAKEN
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
4a602: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
4a606: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a60a: 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);
4a60c: 4ef9 0004 aa98 jmp 4aa98 <malloc_deferred_free> <== NOT EXECUTED
...
00044468 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
44468: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4446c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4446e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
44472: b5fc 0006 04cc cmpal #394444,%a2 <== NOT EXECUTED 44478: 6740 beqs 444ba <free_user_env+0x52> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
4447a: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 4447e: 4a88 tstl %a0 <== NOT EXECUTED 44480: 6710 beqs 44492 <free_user_env+0x2a> <== NOT EXECUTED 44482: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44486: 4a88 tstl %a0 <== NOT EXECUTED 44488: 6708 beqs 44492 <free_user_env+0x2a> <== NOT EXECUTED 4448a: 486a 0004 pea %a2@(4) <== NOT EXECUTED 4448e: 4e90 jsr %a0@ <== NOT EXECUTED 44490: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
44492: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 44496: 4a88 tstl %a0 <== NOT EXECUTED 44498: 6710 beqs 444aa <free_user_env+0x42> <== NOT EXECUTED 4449a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4449e: 4a88 tstl %a0 <== NOT EXECUTED 444a0: 6708 beqs 444aa <free_user_env+0x42> <== NOT EXECUTED 444a2: 486a 0018 pea %a2@(24) <== NOT EXECUTED 444a6: 4e90 jsr %a0@ <== NOT EXECUTED 444a8: 588f addql #4,%sp <== NOT EXECUTED
free(env);
444aa: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
444ae: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 444b2: 4e5e unlk %fp <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
444b4: 4ef9 0004 3360 jmp 43360 <free> <== NOT EXECUTED
} }
444ba: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 444be: 4e5e unlk %fp <== NOT EXECUTED
0005a064 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
5a064: 4e56 0000 linkw %fp,#0 5a068: 202e 0008 movel %fp@(8),%d0 5a06c: 2f0a movel %a2,%sp@- 5a06e: 2f02 movel %d2,%sp@- 5a070: 242e 000c movel %fp@(12),%d2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
5a074: 6700 0096 beqw 5a10c <fstat+0xa8>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
5a078: b0b9 0005 c1e4 cmpl 5c1e4 <rtems_libio_number_iops>,%d0
5a07e: 6456 bccs 5a0d6 <fstat+0x72>
5a080: 2479 0005 d86c moveal 5d86c <rtems_libio_iops>,%a2 5a086: ed88 lsll #6,%d0 5a088: d5c0 addal %d0,%a2
rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop);
5a08a: 202a 0014 movel %a2@(20),%d0 5a08e: 0280 0000 0100 andil #256,%d0
5a094: 6740 beqs 5a0d6 <fstat+0x72> <== NEVER TAKEN
if ( !iop->handlers )
5a096: 206a 003c moveal %a2@(60),%a0 5a09a: 4a88 tstl %a0
5a09c: 6738 beqs 5a0d6 <fstat+0x72> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
5a09e: 4aa8 0018 tstl %a0@(24)
5a0a2: 674c beqs 5a0f0 <fstat+0x8c> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
5a0a4: 4878 0046 pea 46 <DBL_MANT_DIG+0x11> 5a0a8: 42a7 clrl %sp@- 5a0aa: 2f02 movel %d2,%sp@- 5a0ac: 4eb9 0004 e0f8 jsr 4e0f8 <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
5a0b2: 206a 003c moveal %a2@(60),%a0 5a0b6: 45ea 0018 lea %a2@(24),%a2 5a0ba: 4fef 000c lea %sp@(12),%sp 5a0be: 2d42 000c movel %d2,%fp@(12)
}
5a0c2: 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 );
5a0c6: 2d4a 0008 movel %a2,%fp@(8)
}
5a0ca: 246e fffc moveal %fp@(-4),%a2 5a0ce: 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 );
5a0d0: 2268 0018 moveal %a0@(24),%a1 5a0d4: 4ed1 jmp %a1@
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
5a0d6: 4eb9 0004 d868 jsr 4d868 <__errno>
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5a0dc: 242e fff8 movel %fp@(-8),%d2
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
5a0e0: 2040 moveal %d0,%a0 5a0e2: 7009 moveq #9,%d0
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5a0e4: 246e fffc moveal %fp@(-4),%a2 5a0e8: 4e5e unlk %fp
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
5a0ea: 2080 movel %d0,%a0@
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5a0ec: 70ff moveq #-1,%d0 5a0ee: 4e75 rts
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5a0f0: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5a0f6: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5a0fa: 2040 moveal %d0,%a0 <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5a0fc: 70ff moveq #-1,%d0 <== NOT EXECUTED 5a0fe: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5a102: 4e5e unlk %fp <== NOT EXECUTED
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5a104: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5a10a: 4e75 rts <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
5a10c: 4eb9 0004 d868 jsr 4d868 <__errno>
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5a112: 242e fff8 movel %fp@(-8),%d2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
5a116: 2040 moveal %d0,%a0 5a118: 720e moveq #14,%d1
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5a11a: 70ff moveq #-1,%d0 5a11c: 246e fffc moveal %fp@(-4),%a2 5a120: 4e5e unlk %fp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
5a122: 2081 movel %d1,%a0@ <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
00043e4c <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
43e4c: 4e56 0000 linkw %fp,#0 43e50: 202e 0008 movel %fp@(8),%d0
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
43e54: b0b9 0006 00f4 cmpl 600f4 <rtems_libio_number_iops>,%d0
43e5a: 6430 bccs 43e8c <fsync+0x40> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
43e5c: 2079 0006 1780 moveal 61780 <rtems_libio_iops>,%a0 43e62: ed88 lsll #6,%d0 43e64: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43e66: 2028 0014 movel %a0@(20),%d0 43e6a: 0800 0008 btst #8,%d0
43e6e: 671c beqs 43e8c <fsync+0x40> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43e70: 44c0 movew %d0,%ccr
43e72: 662a bnes 43e9e <fsync+0x52>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
43e74: 2268 003c moveal %a0@(60),%a1 43e78: 4a89 tstl %a1
43e7a: 6710 beqs 43e8c <fsync+0x40> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
43e7c: 2269 0028 moveal %a1@(40),%a1 43e80: 4a89 tstl %a1
43e82: 672c beqs 43eb0 <fsync+0x64>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
43e84: 2d48 0008 movel %a0,%fp@(8)
}
43e88: 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 );
43e8a: 4ed1 jmp %a1@
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
43e8c: 4eb9 0005 0250 jsr 50250 <__errno> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
43e92: 4e5e unlk %fp <== NOT EXECUTED
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
43e94: 2040 moveal %d0,%a0 <== NOT EXECUTED 43e96: 7009 moveq #9,%d0 <== NOT EXECUTED 43e98: 2080 movel %d0,%a0@ <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
43e9a: 70ff moveq #-1,%d0 <== NOT EXECUTED 43e9c: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43e9e: 4eb9 0005 0250 jsr 50250 <__errno> 43ea4: 7216 moveq #22,%d1 43ea6: 2040 moveal %d0,%a0
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
43ea8: 70ff moveq #-1,%d0 43eaa: 4e5e unlk %fp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43eac: 2081 movel %d1,%a0@
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
43eae: 4e75 rts
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43eb0: 4eb9 0005 0250 jsr 50250 <__errno>
return (*iop->handlers->fsync_h)( iop );
}
43eb6: 4e5e unlk %fp
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43eb8: 2040 moveal %d0,%a0
return (*iop->handlers->fsync_h)( iop );
}
43eba: 70ff moveq #-1,%d0
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43ebc: 20bc 0000 0086 movel #134,%a0@
return (*iop->handlers->fsync_h)( iop );
}
0004a614 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
4a614: 4e56 ffec linkw %fp,#-20 4a618: 202e 0008 movel %fp@(8),%d0 4a61c: 2f0a movel %a2,%sp@-
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
4a61e: b0b9 0005 c1e4 cmpl 5c1e4 <rtems_libio_number_iops>,%d0
4a624: 647a bccs 4a6a0 <ftruncate+0x8c> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
4a626: 2479 0005 d86c moveal 5d86c <rtems_libio_iops>,%a2 4a62c: ed88 lsll #6,%d0 4a62e: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
4a630: 202a 0014 movel %a2@(20),%d0 4a634: 0280 0000 0100 andil #256,%d0
4a63a: 6764 beqs 4a6a0 <ftruncate+0x8c> <== NEVER TAKEN
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
4a63c: 43ee ffec lea %fp@(-20),%a1 4a640: 22aa 0018 movel %a2@(24),%a1@ 4a644: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 4a64a: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 4a650: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( !loc.ops->node_type_h )
4a656: 206e fff8 moveal %fp@(-8),%a0
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
4a65a: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( !loc.ops->node_type_h )
4a660: 2068 0010 moveal %a0@(16),%a0 4a664: 4a88 tstl %a0
4a666: 6764 beqs 4a6cc <ftruncate+0xb8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
4a668: 2f09 movel %a1,%sp@- 4a66a: 4e90 jsr %a0@ 4a66c: 588f addql #4,%sp 4a66e: 7201 moveq #1,%d1 4a670: b280 cmpl %d0,%d1
4a672: 6770 beqs 4a6e4 <ftruncate+0xd0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4a674: 7004 moveq #4,%d0 4a676: c0aa 0014 andl %a2@(20),%d0
4a67a: 673a beqs 4a6b6 <ftruncate+0xa2> <== NEVER TAKEN
if ( !iop->handlers->ftruncate_h )
4a67c: 206a 003c moveal %a2@(60),%a0 4a680: 2068 0020 moveal %a0@(32),%a0 4a684: 4a88 tstl %a0
4a686: 6744 beqs 4a6cc <ftruncate+0xb8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
4a688: 2f2e 0010 movel %fp@(16),%sp@- 4a68c: 2f2e 000c movel %fp@(12),%sp@- 4a690: 2f0a movel %a2,%sp@- 4a692: 4e90 jsr %a0@
}
4a694: 246e ffe8 moveal %fp@(-24),%a2
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
4a698: 4fef 000c lea %sp@(12),%sp
}
4a69c: 4e5e unlk %fp 4a69e: 4e75 rts
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4a6a0: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6a6: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4a6aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a6ac: 7209 moveq #9,%d1 <== NOT EXECUTED 4a6ae: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6b0: 4e5e unlk %fp <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4a6b2: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6b4: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4a6b6: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6bc: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4a6c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a6c2: 7216 moveq #22,%d1 <== NOT EXECUTED 4a6c4: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6c6: 4e5e unlk %fp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4a6c8: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6ca: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
4a6cc: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6d2: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
4a6d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a6d8: 70ff moveq #-1,%d0 <== NOT EXECUTED
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6da: 4e5e unlk %fp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
4a6dc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6e2: 4e75 rts <== NOT EXECUTED
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4a6e4: 4eb9 0004 d868 jsr 4d868 <__errno>
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6ea: 246e ffe8 moveal %fp@(-24),%a2
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4a6ee: 2040 moveal %d0,%a0 4a6f0: 7215 moveq #21,%d1 4a6f2: 70ff moveq #-1,%d0
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4a6f4: 4e5e unlk %fp
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4a6f6: 2081 movel %d1,%a0@
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
...
0005df70 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
5df70: 4e56 ffec linkw %fp,#-20 5df74: 202e 0008 movel %fp@(8),%d0 5df78: 2f0a movel %a2,%sp@-
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5df7a: b0b9 0006 0b94 cmpl 60b94 <rtems_libio_number_iops>,%d0
5df80: 655e bcss 5dfe0 <getdents+0x70> <== ALWAYS TAKEN
5df82: 95ca subal %a2,%a2 <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5df84: 43ee ffec lea %fp@(-20),%a1 5df88: 22aa 0018 movel %a2@(24),%a1@ 5df8c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 5df92: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 5df98: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( !loc.ops->node_type_h )
5df9e: 206e fff8 moveal %fp@(-8),%a0
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5dfa2: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( !loc.ops->node_type_h )
5dfa8: 2068 0010 moveal %a0@(16),%a0 5dfac: 4a88 tstl %a0
5dfae: 6752 beqs 5e002 <getdents+0x92> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5dfb0: 2f09 movel %a1,%sp@- 5dfb2: 4e90 jsr %a0@ 5dfb4: 588f addql #4,%sp 5dfb6: 7201 moveq #1,%d1 5dfb8: b280 cmpl %d0,%d1
5dfba: 6630 bnes 5dfec <getdents+0x7c>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
5dfbc: 206a 003c moveal %a2@(60),%a0 5dfc0: 2068 0008 moveal %a0@(8),%a0 5dfc4: 4a88 tstl %a0
5dfc6: 673a beqs 5e002 <getdents+0x92> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
5dfc8: 2f2e 0010 movel %fp@(16),%sp@- 5dfcc: 2f2e 000c movel %fp@(12),%sp@- 5dfd0: 2f0a movel %a2,%sp@- 5dfd2: 4e90 jsr %a0@
}
5dfd4: 246e ffe8 moveal %fp@(-24),%a2
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
5dfd8: 4fef 000c lea %sp@(12),%sp
}
5dfdc: 4e5e unlk %fp 5dfde: 4e75 rts
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5dfe0: 2479 0006 2340 moveal 62340 <rtems_libio_iops>,%a2 5dfe6: ed88 lsll #6,%d0 5dfe8: d5c0 addal %d0,%a2 5dfea: 6098 bras 5df84 <getdents+0x14>
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5dfec: 4eb9 0005 068c jsr 5068c <__errno>
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5dff2: 246e ffe8 moveal %fp@(-24),%a2
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5dff6: 2040 moveal %d0,%a0 5dff8: 7214 moveq #20,%d1 5dffa: 70ff moveq #-1,%d0
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5dffc: 4e5e unlk %fp
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5dffe: 2081 movel %d1,%a0@
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5e000: 4e75 rts
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5e002: 4eb9 0005 068c jsr 5068c <__errno> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5e008: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5e00c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5e00e: 70ff moveq #-1,%d0 <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5e010: 4e5e unlk %fp <== NOT EXECUTED
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5e012: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
...
0004360e <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
4360e: 4e56 ffe0 linkw %fp,#-32 43612: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43616: 242e 0008 movel %fp@(8),%d2 4361a: 47fa fc26 lea %pc@(43242 <scangr>),%a3
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
4361e: 49f9 0005 12f8 lea 512f8 <strcmp>,%a4
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
43624: 2c2e 000c movel %fp@(12),%d6 43628: 246e 0010 moveal %fp@(16),%a2 4362c: 2a2e 0014 movel %fp@(20),%d5 43630: 282e 0018 movel %fp@(24),%d4
FILE *fp;
int match;
init_etc_passwd_group();
43634: 4eb9 0004 34ca jsr 434ca <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
4363a: 4879 0005 f149 pea 5f149 <_global_impure_ptr+0xbf> 43640: 4879 0005 e828 pea 5e828 <rtems_status_assoc+0x218> 43646: 4eb9 0005 0074 jsr 50074 <fopen> 4364c: 508f addql #8,%sp 4364e: 2600 movel %d0,%d3
43650: 6778 beqs 436ca <getgr_r+0xbc> <== NEVER TAKEN
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
43652: 2f04 movel %d4,%sp@- 43654: 2f05 movel %d5,%sp@- 43656: 2f0a movel %a2,%sp@- 43658: 2f03 movel %d3,%sp@- 4365a: 4e93 jsr %a3@ 4365c: 4fef 0010 lea %sp@(16),%sp 43660: 4a80 tstl %d0
43662: 6744 beqs 436a8 <getgr_r+0x9a> <== NEVER TAKEN
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
43664: 4a82 tstl %d2
43666: 672e beqs 43696 <getgr_r+0x88> <== NEVER TAKEN
match = (strcmp(grp->gr_name, name) == 0);
43668: 2f02 movel %d2,%sp@- 4366a: 2f12 movel %a2@,%sp@- 4366c: 4e94 jsr %a4@ 4366e: 508f addql #8,%sp 43670: 4a80 tstl %d0 43672: 57c0 seq %d0 43674: 49c0 extbl %d0 43676: 4480 negl %d0
}
else {
match = (grp->gr_gid == gid);
}
if (match) {
43678: 67d8 beqs 43652 <getgr_r+0x44>
fclose(fp);
4367a: 2f03 movel %d3,%sp@- 4367c: 4eb9 0004 f9f2 jsr 4f9f2 <fclose>
*result = grp;
43682: 206e 001c moveal %fp@(28),%a0
return 0;
43686: 588f addql #4,%sp
else {
match = (grp->gr_gid == gid);
}
if (match) {
fclose(fp);
*result = grp;
43688: 4280 clrl %d0 4368a: 208a movel %a2,%a0@
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
4368c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43692: 4e5e unlk %fp 43694: 4e75 rts
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
}
else {
match = (grp->gr_gid == gid);
43696: 4280 clrl %d0 <== NOT EXECUTED 43698: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 4369c: bc80 cmpl %d0,%d6 <== NOT EXECUTED 4369e: 57c0 seq %d0 <== NOT EXECUTED 436a0: 49c0 extbl %d0 <== NOT EXECUTED 436a2: 4480 negl %d0 <== NOT EXECUTED
}
if (match) {
436a4: 67ac beqs 43652 <getgr_r+0x44> <== NOT EXECUTED 436a6: 60d2 bras 4367a <getgr_r+0x6c> <== NOT EXECUTED
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
errno = EINVAL;
436a8: 4eb9 0004 f8b4 jsr 4f8b4 <__errno> <== NOT EXECUTED 436ae: 2040 moveal %d0,%a0 <== NOT EXECUTED 436b0: 7016 moveq #22,%d0 <== NOT EXECUTED 436b2: 2080 movel %d0,%a0@ <== NOT EXECUTED
fclose(fp);
436b4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 436b6: 4eb9 0004 f9f2 jsr 4f9f2 <fclose> <== NOT EXECUTED
return -1;
436bc: 588f addql #4,%sp <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
errno = EINVAL;
fclose(fp);
436be: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
436c0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 436c6: 4e5e unlk %fp <== NOT EXECUTED 436c8: 4e75 rts <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
436ca: 4eb9 0004 f8b4 jsr 4f8b4 <__errno> <== NOT EXECUTED 436d0: 7216 moveq #22,%d1 <== NOT EXECUTED 436d2: 2040 moveal %d0,%a0 <== NOT EXECUTED 436d4: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
436d6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
436dc: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
436de: 4e5e unlk %fp <== NOT EXECUTED
0004335e <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
4335e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (group_fp == NULL)
43362: 2039 0006 080a movel 6080a <group_fp>,%d0 <== NOT EXECUTED 43368: 6608 bnes 43372 <getgrent+0x14> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
4336a: 4281 clrl %d1 <== NOT EXECUTED
return NULL;
return &grent;
}
4336c: 2001 movel %d1,%d0 <== NOT EXECUTED 4336e: 4e5e unlk %fp <== NOT EXECUTED 43370: 4e75 rts <== NOT EXECUTED
struct group *getgrent(void)
{
if (group_fp == NULL)
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
43372: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 43376: 4879 0006 080e pea 6080e <grbuf> <== NOT EXECUTED 4337c: 4879 0006 08d6 pea 608d6 <grent> <== NOT EXECUTED 43382: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43384: 4eba febc jsr %pc@(43242 <scangr>) <== NOT EXECUTED 43388: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4338c: 223c 0006 08d6 movel #395478,%d1 <== NOT EXECUTED 43392: 4a80 tstl %d0 <== NOT EXECUTED 43394: 67d4 beqs 4336a <getgrent+0xc> <== NOT EXECUTED
return NULL;
return &grent;
}
43396: 2001 movel %d1,%d0 <== NOT EXECUTED 43398: 4e5e unlk %fp <== NOT EXECUTED
00043708 <getgrgid>:
gid_t gid
)
{
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
43708: 4280 clrl %d0 <== NOT EXECUTED
}
struct group *getgrgid(
gid_t gid
)
{
4370a: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
4370e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 43712: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 43716: 4879 0006 080e pea 6080e <grbuf> <== NOT EXECUTED 4371c: 4879 0006 08d6 pea 608d6 <grent> <== NOT EXECUTED 43722: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43726: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43728: 4eb9 0004 36e2 jsr 436e2 <getgrgid_r> <== NOT EXECUTED 4372e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 43732: 4a80 tstl %d0 <== NOT EXECUTED 43734: 6608 bnes 4373e <getgrgid+0x36> <== NOT EXECUTED
return NULL;
return p;
43736: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
4373a: 4e5e unlk %fp <== NOT EXECUTED 4373c: 4e75 rts <== NOT EXECUTED
gid_t gid
)
{
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
4373e: 4280 clrl %d0 <== NOT EXECUTED
return NULL;
return p;
}
43740: 4e5e unlk %fp <== NOT EXECUTED
000436e2 <getgrgid_r>:
char *buffer,
size_t bufsize,
struct group **result
)
{
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
436e2: 4280 clrl %d0 <== NOT EXECUTED
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
436e4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
436e8: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 436ec: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 436f0: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 436f4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 436f8: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 436fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 436fe: 42a7 clrl %sp@- <== NOT EXECUTED 43700: 4eba ff0c jsr %pc@(4360e <getgr_r>) <== NOT EXECUTED
}
43704: 4e5e unlk %fp <== NOT EXECUTED
00043766 <getgrnam>:
struct group *getgrnam(
const char *name
)
{
43766: 4e56 fffc linkw %fp,#-4
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
4376a: 486e fffc pea %fp@(-4) 4376e: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> 43772: 4879 0006 080e pea 6080e <grbuf> 43778: 4879 0006 08d6 pea 608d6 <grent> 4377e: 2f2e 0008 movel %fp@(8),%sp@- 43782: 4eb9 0004 3744 jsr 43744 <getgrnam_r> 43788: 4fef 0014 lea %sp@(20),%sp 4378c: 4a80 tstl %d0
4378e: 6608 bnes 43798 <getgrnam+0x32> <== NEVER TAKEN
return NULL;
return p;
43790: 202e fffc movel %fp@(-4),%d0
}
43794: 4e5e unlk %fp 43796: 4e75 rts
const char *name
)
{
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
43798: 4280 clrl %d0 <== NOT EXECUTED
return NULL;
return p;
}
4379a: 4e5e unlk %fp <== NOT EXECUTED
0005a140 <getpid>:
*/
pid_t getpid( void )
{
return _Objects_Local_node;
}
5a140: 7001 moveq #1,%d0 <== NOT EXECUTED
*
* 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
*/
pid_t getpid( void )
{
5a142: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return _Objects_Local_node; }
5a146: 4e5e unlk %fp <== NOT EXECUTED
000437d8 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
437d8: 4e56 ffe0 linkw %fp,#-32 437dc: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 437e0: 242e 0008 movel %fp@(8),%d2 437e4: 47fa fbb6 lea %pc@(4339c <scanpw>),%a3
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
437e8: 49f9 0005 12f8 lea 512f8 <strcmp>,%a4
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
437ee: 2c2e 000c movel %fp@(12),%d6 437f2: 246e 0010 moveal %fp@(16),%a2 437f6: 2a2e 0014 movel %fp@(20),%d5 437fa: 282e 0018 movel %fp@(24),%d4
FILE *fp;
int match;
init_etc_passwd_group();
437fe: 4eb9 0004 34ca jsr 434ca <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
43804: 4879 0005 f149 pea 5f149 <_global_impure_ptr+0xbf> 4380a: 4879 0005 e7b5 pea 5e7b5 <rtems_status_assoc+0x1a5> 43810: 4eb9 0005 0074 jsr 50074 <fopen> 43816: 508f addql #8,%sp 43818: 2600 movel %d0,%d3
4381a: 6778 beqs 43894 <getpw_r+0xbc> <== NEVER TAKEN
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
4381c: 2f04 movel %d4,%sp@- 4381e: 2f05 movel %d5,%sp@- 43820: 2f0a movel %a2,%sp@- 43822: 2f03 movel %d3,%sp@- 43824: 4e93 jsr %a3@ 43826: 4fef 0010 lea %sp@(16),%sp 4382a: 4a80 tstl %d0
4382c: 6744 beqs 43872 <getpw_r+0x9a> <== NEVER TAKEN
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
4382e: 4a82 tstl %d2
43830: 672e beqs 43860 <getpw_r+0x88> <== NEVER TAKEN
match = (strcmp(pwd->pw_name, name) == 0);
43832: 2f02 movel %d2,%sp@- 43834: 2f12 movel %a2@,%sp@- 43836: 4e94 jsr %a4@ 43838: 508f addql #8,%sp 4383a: 4a80 tstl %d0 4383c: 57c0 seq %d0 4383e: 49c0 extbl %d0 43840: 4480 negl %d0
}
else {
match = (pwd->pw_uid == uid);
}
if (match) {
43842: 67d8 beqs 4381c <getpw_r+0x44>
fclose(fp);
43844: 2f03 movel %d3,%sp@- 43846: 4eb9 0004 f9f2 jsr 4f9f2 <fclose>
*result = pwd;
4384c: 206e 001c moveal %fp@(28),%a0
return 0;
43850: 588f addql #4,%sp
else {
match = (pwd->pw_uid == uid);
}
if (match) {
fclose(fp);
*result = pwd;
43852: 4280 clrl %d0 43854: 208a movel %a2,%a0@
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
43856: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 4385c: 4e5e unlk %fp 4385e: 4e75 rts
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
}
else {
match = (pwd->pw_uid == uid);
43860: 4280 clrl %d0 <== NOT EXECUTED 43862: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 43866: bc80 cmpl %d0,%d6 <== NOT EXECUTED 43868: 57c0 seq %d0 <== NOT EXECUTED 4386a: 49c0 extbl %d0 <== NOT EXECUTED 4386c: 4480 negl %d0 <== NOT EXECUTED
}
if (match) {
4386e: 67ac beqs 4381c <getpw_r+0x44> <== NOT EXECUTED 43870: 60d2 bras 43844 <getpw_r+0x6c> <== NOT EXECUTED
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
errno = EINVAL;
43872: 4eb9 0004 f8b4 jsr 4f8b4 <__errno> <== NOT EXECUTED 43878: 7416 moveq #22,%d2 <== NOT EXECUTED 4387a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4387c: 2082 movel %d2,%a0@ <== NOT EXECUTED
fclose(fp);
4387e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43880: 4eb9 0004 f9f2 jsr 4f9f2 <fclose> <== NOT EXECUTED
return -1;
43886: 588f addql #4,%sp <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
errno = EINVAL;
fclose(fp);
43888: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
4388a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 43890: 4e5e unlk %fp <== NOT EXECUTED 43892: 4e75 rts <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
43894: 4eb9 0004 f8b4 jsr 4f8b4 <__errno> <== NOT EXECUTED 4389a: 7616 moveq #22,%d3 <== NOT EXECUTED 4389c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4389e: 70ff moveq #-1,%d0 <== NOT EXECUTED 438a0: 2083 movel %d3,%a0@ <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
438a2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 438a8: 4e5e unlk %fp <== NOT EXECUTED
0004348c <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
4348c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (passwd_fp == NULL)
43490: 2039 0006 0722 movel 60722 <passwd_fp>,%d0 <== NOT EXECUTED 43496: 6608 bnes 434a0 <getpwent+0x14> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
43498: 4281 clrl %d1 <== NOT EXECUTED
return NULL;
return &pwent;
}
4349a: 2001 movel %d1,%d0 <== NOT EXECUTED 4349c: 4e5e unlk %fp <== NOT EXECUTED 4349e: 4e75 rts <== NOT EXECUTED
struct passwd *getpwent(void)
{
if (passwd_fp == NULL)
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
434a0: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 434a4: 4879 0006 0726 pea 60726 <pwbuf> <== NOT EXECUTED 434aa: 4879 0006 07ee pea 607ee <pwent> <== NOT EXECUTED 434b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 434b2: 4eba fee8 jsr %pc@(4339c <scanpw>) <== NOT EXECUTED 434b6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 434ba: 223c 0006 07ee movel #395246,%d1 <== NOT EXECUTED 434c0: 4a80 tstl %d0 <== NOT EXECUTED 434c2: 67d4 beqs 43498 <getpwent+0xc> <== NOT EXECUTED
return NULL;
return &pwent;
}
434c4: 2001 movel %d1,%d0 <== NOT EXECUTED 434c6: 4e5e unlk %fp <== NOT EXECUTED
00043930 <getpwnam>:
struct passwd *getpwnam(
const char *name
)
{
43930: 4e56 fffc linkw %fp,#-4
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
43934: 486e fffc pea %fp@(-4) 43938: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> 4393c: 4879 0006 0726 pea 60726 <pwbuf> 43942: 4879 0006 07ee pea 607ee <pwent> 43948: 2f2e 0008 movel %fp@(8),%sp@- 4394c: 4eb9 0004 390e jsr 4390e <getpwnam_r> 43952: 4fef 0014 lea %sp@(20),%sp 43956: 4a80 tstl %d0
43958: 6608 bnes 43962 <getpwnam+0x32> <== NEVER TAKEN
return NULL;
return p;
4395a: 202e fffc movel %fp@(-4),%d0
}
4395e: 4e5e unlk %fp 43960: 4e75 rts
const char *name
)
{
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
43962: 4280 clrl %d0 <== NOT EXECUTED
return NULL;
return p;
}
43964: 4e5e unlk %fp <== NOT EXECUTED
000438d2 <getpwuid>:
uid_t uid
)
{
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
438d2: 4280 clrl %d0 <== NOT EXECUTED
}
struct passwd *getpwuid(
uid_t uid
)
{
438d4: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
438d8: 486e fffc pea %fp@(-4) <== NOT EXECUTED 438dc: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 438e0: 4879 0006 0726 pea 60726 <pwbuf> <== NOT EXECUTED 438e6: 4879 0006 07ee pea 607ee <pwent> <== NOT EXECUTED 438ec: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 438f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438f2: 4eb9 0004 38ac jsr 438ac <getpwuid_r> <== NOT EXECUTED 438f8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 438fc: 4a80 tstl %d0 <== NOT EXECUTED 438fe: 6608 bnes 43908 <getpwuid+0x36> <== NOT EXECUTED
return NULL;
return p;
43900: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
43904: 4e5e unlk %fp <== NOT EXECUTED 43906: 4e75 rts <== NOT EXECUTED
uid_t uid
)
{
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
43908: 4280 clrl %d0 <== NOT EXECUTED
return NULL;
return p;
}
4390a: 4e5e unlk %fp <== NOT EXECUTED
000438ac <getpwuid_r>:
char *buffer,
size_t bufsize,
struct passwd **result
)
{
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
438ac: 4280 clrl %d0 <== NOT EXECUTED
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
438ae: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
438b2: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 438b6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 438ba: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 438be: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 438c2: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 438c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438c8: 42a7 clrl %sp@- <== NOT EXECUTED 438ca: 4eba ff0c jsr %pc@(437d8 <getpw_r>) <== NOT EXECUTED
}
438ce: 4e5e unlk %fp <== NOT EXECUTED
0004a6fc <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
4a6fc: 4e56 ffec linkw %fp,#-20 4a700: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a704: 246e 0008 moveal %fp@(8),%a2
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
4a708: 4a8a tstl %a2
4a70a: 673c beqs 4a748 <gettimeofday+0x4c> <== NEVER TAKEN
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
4a70c: 203c 0000 0700 movel #1792,%d0 4a712: 40c2 movew %sr,%d2 4a714: 8082 orl %d2,%d0 4a716: 46c0 movew %d0,%sr
_TOD_Get( &now );
4a718: 486e fff8 pea %fp@(-8) 4a71c: 4eb9 0004 b244 jsr 4b244 <_TOD_Get>
_ISR_Enable(level);
4a722: 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;
4a724: 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;
4a72a: 588f addql #4,%sp 4a72c: 4280 clrl %d0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
4a72e: 222e fffc movel %fp@(-4),%d1
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
4a732: 4c43 1801 remsl %d3,%d1,%d1 4a736: 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;
4a73a: 24ae fff8 movel %fp@(-8),%a2@
}
4a73e: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4a744: 4e5e unlk %fp 4a746: 4e75 rts
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
4a748: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 4a74e: 720e moveq #14,%d1 <== NOT EXECUTED 4a750: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a752: 70ff moveq #-1,%d0 <== NOT EXECUTED
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
4a754: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
4a75a: 2081 movel %d1,%a0@ <== NOT EXECUTED
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
4a75c: 4e5e unlk %fp <== NOT EXECUTED
0005284c <imfs_dir_open>:
)
{
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
5284c: 7001 moveq #1,%d0
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
5284e: 4e56 0000 linkw %fp,#0 52852: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
52856: 2268 0038 moveal %a0@(56),%a1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
5285a: 2f02 movel %d2,%sp@-
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
5285c: b0a9 0048 cmpl %a1@(72),%d0
52860: 6708 beqs 5286a <imfs_dir_open+0x1e> <== ALWAYS TAKEN
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
52862: 241f movel %sp@+,%d2 <== NOT EXECUTED
)
{
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
52864: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
52866: 4e5e unlk %fp <== NOT EXECUTED 52868: 4e75 rts <== NOT EXECUTED
the_jnode = (IMFS_jnode_t *) iop->file_info;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
5286a: 4280 clrl %d0 5286c: 4281 clrl %d1 5286e: 4282 clrl %d2 52870: 2141 000c movel %d1,%a0@(12) 52874: 2142 0010 movel %d2,%a0@(16)
return 0; }
52878: 241f movel %sp@+,%d2
5287a: 4e5e unlk %fp <== NOT EXECUTED
000529ba <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
529ba: 4e56 fff8 linkw %fp,#-8 529be: 2f0b movel %a3,%sp@- 529c0: 266e 000c moveal %fp@(12),%a3 529c4: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
529c6: 2453 moveal %a3@,%a2 529c8: 200a movel %a2,%d0 529ca: 0680 0000 0050 addil #80,%d0 529d0: b0aa 004c cmpl %a2@(76),%d0 529d4: 6600 0090 bnew 52a66 <imfs_dir_rmnod+0xac>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
529d8: 206b 0010 moveal %a3@(16),%a0 529dc: b5e8 001c cmpal %a0@(28),%a2 529e0: 6700 009e beqw 52a80 <imfs_dir_rmnod+0xc6>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
529e4: 4aaa 0058 tstl %a2@(88) 529e8: 6600 0096 bnew 52a80 <imfs_dir_rmnod+0xc6>
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
529ec: 4aaa 0008 tstl %a2@(8)
529f0: 670e beqs 52a00 <imfs_dir_rmnod+0x46>
529f2: 2f0a movel %a2,%sp@- 529f4: 4eb9 0004 8718 jsr 48718 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
529fa: 588f addql #4,%sp 529fc: 42aa 0008 clrl %a2@(8)
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
52a00: 302a 0032 movew %a2@(50),%d0 52a04: 5380 subql #1,%d0 52a06: 3540 0032 movew %d0,%a2@(50)
IMFS_update_ctime( the_jnode );
52a0a: 42a7 clrl %sp@- 52a0c: 486e fff8 pea %fp@(-8) 52a10: 4eb9 0004 40b4 jsr 440b4 <gettimeofday> 52a16: 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) ) {
52a1c: 2f0a movel %a2,%sp@- 52a1e: 4eb9 0004 fd9a jsr 4fd9a <rtems_libio_is_file_open> 52a24: 4fef 000c lea %sp@(12),%sp 52a28: 4a80 tstl %d0
52a2a: 662c bnes 52a58 <imfs_dir_rmnod+0x9e>
52a2c: 4a6a 0032 tstw %a2@(50)
52a30: 6626 bnes 52a58 <imfs_dir_rmnod+0x9e>
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
52a32: 2079 0006 238c moveal 6238c <rtems_current_user_env>,%a0 52a38: 2653 moveal %a3@,%a3 52a3a: b7e8 0004 cmpal %a0@(4),%a3
52a3e: 675a beqs 52a9a <imfs_dir_rmnod+0xe0> <== NEVER TAKEN
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
52a40: 2f0a movel %a2,%sp@- 52a42: 4eb9 0004 4024 jsr 44024 <free> 52a48: 588f addql #4,%sp 52a4a: 4280 clrl %d0
}
return 0;
}
52a4c: 246e fff0 moveal %fp@(-16),%a2 52a50: 266e fff4 moveal %fp@(-12),%a3 52a54: 4e5e unlk %fp 52a56: 4e75 rts 52a58: 246e fff0 moveal %fp@(-16),%a2
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
52a5c: 4280 clrl %d0
}
return 0;
}
52a5e: 266e fff4 moveal %fp@(-12),%a3 52a62: 4e5e unlk %fp 52a64: 4e75 rts
/*
* 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 );
52a66: 4eb9 0005 30c8 jsr 530c8 <__errno>
free( the_jnode );
}
return 0;
}
52a6c: 246e fff0 moveal %fp@(-16),%a2
/*
* 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 );
52a70: 2040 moveal %d0,%a0 52a72: 725a moveq #90,%d1 52a74: 70ff moveq #-1,%d0
free( the_jnode );
}
return 0;
}
52a76: 266e fff4 moveal %fp@(-12),%a3 52a7a: 4e5e unlk %fp
/*
* 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 );
52a7c: 2081 movel %d1,%a0@
free( the_jnode );
}
return 0;
}
52a7e: 4e75 rts
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
52a80: 4eb9 0005 30c8 jsr 530c8 <__errno>
free( the_jnode );
}
return 0;
}
52a86: 246e fff0 moveal %fp@(-16),%a2
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
52a8a: 2040 moveal %d0,%a0 52a8c: 7210 moveq #16,%d1 52a8e: 70ff moveq #-1,%d0
free( the_jnode );
}
return 0;
}
52a90: 266e fff4 moveal %fp@(-12),%a3 52a94: 4e5e unlk %fp
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
52a96: 2081 movel %d1,%a0@
free( the_jnode );
}
return 0;
}
52a98: 4e75 rts
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
52a9a: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
52a9e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52aa0: 4eb9 0004 4024 jsr 44024 <free> <== NOT EXECUTED 52aa6: 588f addql #4,%sp <== NOT EXECUTED 52aa8: 4280 clrl %d0 <== NOT EXECUTED 52aaa: 60a0 bras 52a4c <imfs_dir_rmnod+0x92> <== NOT EXECUTED
000434ca <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
434ca: 4e56 0000 linkw %fp,#0 434ce: 2f0a movel %a2,%sp@- 434d0: 2f02 movel %d2,%sp@-
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
434d2: 4a39 0006 0720 tstb 60720 <etc_passwd_initted.6267>
434d8: 670c beqs 434e6 <init_etc_passwd_group+0x1c>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
434da: 242e fff8 movel %fp@(-8),%d2 434de: 246e fffc moveal %fp@(-4),%a2 434e2: 4e5e unlk %fp 434e4: 4e75 rts
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
434e6: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
434ea: 45f9 0005 0074 lea 50074 <fopen>,%a2
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
434f0: 4879 0005 e7b0 pea 5e7b0 <rtems_status_assoc+0x1a0>
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
434f6: 7001 moveq #1,%d0 434f8: 13c0 0006 0720 moveb %d0,60720 <etc_passwd_initted.6267>
mkdir("/etc", 0777);
434fe: 4eb9 0004 3cd4 jsr 43cd4 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
43504: 4879 0005 f149 pea 5f149 <_global_impure_ptr+0xbf> 4350a: 4879 0005 e7b5 pea 5e7b5 <rtems_status_assoc+0x1a5> 43510: 4e92 jsr %a2@ 43512: 4fef 0010 lea %sp@(16),%sp 43516: 4a80 tstl %d0
43518: 677e beqs 43598 <init_etc_passwd_group+0xce> <== ALWAYS TAKEN
fclose(fp);
4351a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4351c: 4eb9 0004 f9f2 jsr 4f9f2 <fclose> <== NOT EXECUTED 43522: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
43524: 4879 0005 f149 pea 5f149 <_global_impure_ptr+0xbf> 4352a: 4879 0005 e828 pea 5e828 <rtems_status_assoc+0x218> 43530: 4e92 jsr %a2@ 43532: 508f addql #8,%sp 43534: 4a80 tstl %d0
43536: 6716 beqs 4354e <init_etc_passwd_group+0x84> <== ALWAYS TAKEN
fclose(fp);
43538: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4353a: 4eb9 0004 f9f2 jsr 4f9f2 <fclose> <== NOT EXECUTED
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
43540: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
43544: 588f addql #4,%sp <== NOT EXECUTED
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
43546: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4354a: 4e5e unlk %fp <== NOT EXECUTED 4354c: 4e75 rts <== NOT EXECUTED
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
4354e: 4879 0005 ded2 pea 5ded2 <_rodata_start+0xf2> 43554: 4879 0005 e828 pea 5e828 <rtems_status_assoc+0x218> 4355a: 4eb9 0005 0074 jsr 50074 <fopen> 43560: 508f addql #8,%sp 43562: 2440 moveal %d0,%a2 43564: 4a80 tstl %d0 43566: 6700 ff72 beqw 434da <init_etc_passwd_group+0x10>
fprintf( fp, "root:x:0:root\n"
4356a: 2f00 movel %d0,%sp@- 4356c: 4878 002a pea 2a <OPER2+0x16> 43570: 4878 0001 pea 1 <ADD> 43574: 4879 0005 e833 pea 5e833 <rtems_status_assoc+0x223> 4357a: 4eb9 0005 089c jsr 5089c <fwrite>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
43580: 2f0a movel %a2,%sp@- 43582: 4eb9 0004 f9f2 jsr 4f9f2 <fclose>
} }
43588: 242e fff8 movel %fp@(-8),%d2
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
4358c: 4fef 0014 lea %sp@(20),%sp
} }
43590: 246e fffc moveal %fp@(-4),%a2 43594: 4e5e unlk %fp 43596: 4e75 rts
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
43598: 4879 0005 ded2 pea 5ded2 <_rodata_start+0xf2> 4359e: 4879 0005 e7b5 pea 5e7b5 <rtems_status_assoc+0x1a5> 435a4: 4e92 jsr %a2@ 435a6: 508f addql #8,%sp 435a8: 2400 movel %d0,%d2 435aa: 6700 ff78 beqw 43524 <init_etc_passwd_group+0x5a>
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
435ae: 2f00 movel %d0,%sp@- 435b0: 4878 0066 pea 66 <DBL_MANT_DIG+0x31> 435b4: 4878 0001 pea 1 <ADD> 435b8: 4879 0005 e7c1 pea 5e7c1 <rtems_status_assoc+0x1b1> 435be: 4eb9 0005 089c jsr 5089c <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
435c4: 2f02 movel %d2,%sp@- 435c6: 4eb9 0004 f9f2 jsr 4f9f2 <fclose> 435cc: 4fef 0014 lea %sp@(20),%sp 435d0: 6000 ff52 braw 43524 <init_etc_passwd_group+0x5a>
000465fc <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
465fc: 4e56 0000 linkw %fp,#0 46600: 202e 0008 movel %fp@(8),%d0
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
46604: b0b9 0006 24c4 cmpl 624c4 <rtems_libio_number_iops>,%d0
4660a: 643c bccs 46648 <ioctl+0x4c> iop = rtems_libio_iop( fd );
4660c: 2079 0006 3c1c moveal 63c1c <rtems_libio_iops>,%a0 46612: ed88 lsll #6,%d0 46614: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
46616: 2028 0014 movel %a0@(20),%d0 4661a: 0280 0000 0100 andil #256,%d0
46620: 6726 beqs 46648 <ioctl+0x4c> <== NEVER TAKEN
va_start(ap, command);
buffer = va_arg(ap, void *);
46622: 202e 0010 movel %fp@(16),%d0
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
46626: 2268 003c moveal %a0@(60),%a1 4662a: 4a89 tstl %a1
4662c: 671a beqs 46648 <ioctl+0x4c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
4662e: 2269 0010 moveal %a1@(16),%a1 46632: 4a89 tstl %a1
46634: 6724 beqs 4665a <ioctl+0x5e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
46636: 2f00 movel %d0,%sp@- 46638: 2f2e 000c movel %fp@(12),%sp@- 4663c: 2f08 movel %a0,%sp@- 4663e: 4e91 jsr %a1@
return rc;
46640: 4fef 000c lea %sp@(12),%sp
}
46644: 4e5e unlk %fp 46646: 4e75 rts
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
46648: 4eb9 0005 32a4 jsr 532a4 <__errno> 4664e: 7209 moveq #9,%d1 46650: 2040 moveal %d0,%a0 46652: 70ff moveq #-1,%d0
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
46654: 4e5e unlk %fp
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
46656: 2081 movel %d1,%a0@
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
46658: 4e75 rts
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
4665a: 4eb9 0005 32a4 jsr 532a4 <__errno> <== NOT EXECUTED
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
46660: 4e5e unlk %fp <== NOT EXECUTED
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
46662: 2040 moveal %d0,%a0 <== NOT EXECUTED 46664: 70ff moveq #-1,%d0 <== NOT EXECUTED 46666: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
...
00044064 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
44064: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 44068: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 4406c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 44070: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
44074: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
44078: 1401 moveb %d1,%d2 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
4407a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4407e: 6704 beqs 44084 <iproc+0x20> <== NOT EXECUTED
c &= 0x7f;
44080: 747f moveq #127,%d2 <== NOT EXECUTED 44082: c481 andl %d1,%d2 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
44084: 0800 0009 btst #9,%d0 <== NOT EXECUTED 44088: 6720 beqs 440aa <iproc+0x46> <== NOT EXECUTED
c = tolower (c);
4408a: 2079 0005 c378 moveal 5c378 <__ctype_ptr__>,%a0 <== NOT EXECUTED 44090: 7603 moveq #3,%d3 <== NOT EXECUTED 44092: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44098: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 4409c: 49c1 extbl %d1 <== NOT EXECUTED 4409e: c283 andl %d3,%d1 <== NOT EXECUTED 440a0: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 440a4: b681 cmpl %d1,%d3 <== NOT EXECUTED 440a6: 6700 00e0 beqw 44188 <iproc+0x124> <== NOT EXECUTED
if (c == '\r') {
440aa: 4281 clrl %d1 <== NOT EXECUTED 440ac: 1202 moveb %d2,%d1 <== NOT EXECUTED 440ae: 760d moveq #13,%d3 <== NOT EXECUTED 440b0: b681 cmpl %d1,%d3 <== NOT EXECUTED 440b2: 6740 beqs 440f4 <iproc+0x90> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
440b4: 760a moveq #10,%d3 <== NOT EXECUTED 440b6: b681 cmpl %d1,%d3 <== NOT EXECUTED 440b8: 6700 00c4 beqw 4417e <iproc+0x11a> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
440bc: 4a02 tstb %d2 <== NOT EXECUTED 440be: 664c bnes 4410c <iproc+0xa8> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
440c0: 2039 0005 c2e4 movel 5c2e4 <rtems_termios_cbufsize>,%d0 <== NOT EXECUTED 440c6: 5380 subql #1,%d0 <== NOT EXECUTED 440c8: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 440cc: b081 cmpl %d1,%d0 <== NOT EXECUTED 440ce: 6f28 bles 440f8 <iproc+0x94> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
440d0: 7008 moveq #8,%d0 <== NOT EXECUTED 440d2: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 440d6: 6600 00ba bnew 44192 <iproc+0x12e> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
440da: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 440de: 4280 clrl %d0 <== NOT EXECUTED 440e0: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 440e4: 5281 addql #1,%d1 <== NOT EXECUTED 440e6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
} return 0; }
440ea: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 440f0: 4e5e unlk %fp <== NOT EXECUTED 440f2: 4e75 rts <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
440f4: 4a00 tstb %d0 <== NOT EXECUTED 440f6: 6c0c bges 44104 <iproc+0xa0> <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
440f8: 4280 clrl %d0 <== NOT EXECUTED
} return 0; }
440fa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44100: 4e5e unlk %fp <== NOT EXECUTED 44102: 4e75 rts <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
44104: 0800 0008 btst #8,%d0 <== NOT EXECUTED 44108: 6702 beqs 4410c <iproc+0xa8> <== NOT EXECUTED 4410a: 740a moveq #10,%d2 <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
4410c: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 44110: 0801 0001 btst #1,%d1 <== NOT EXECUTED 44114: 67aa beqs 440c0 <iproc+0x5c> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
44116: 4283 clrl %d3 <== NOT EXECUTED 44118: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 4411c: 4280 clrl %d0 <== NOT EXECUTED 4411e: 1002 moveb %d2,%d0 <== NOT EXECUTED 44120: b083 cmpl %d3,%d0 <== NOT EXECUTED 44122: 6700 0122 beqw 44246 <iproc+0x1e2> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
44126: 4283 clrl %d3 <== NOT EXECUTED 44128: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 4412c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4412e: 6700 00a8 beqw 441d8 <iproc+0x174> <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
44132: 4283 clrl %d3 <== NOT EXECUTED 44134: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 44138: b083 cmpl %d3,%d0 <== NOT EXECUTED 4413a: 6700 00fe beqw 4423a <iproc+0x1d6> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
4413e: 760a moveq #10,%d3 <== NOT EXECUTED 44140: b680 cmpl %d0,%d3 <== NOT EXECUTED 44142: 6700 00ac beqw 441f0 <iproc+0x18c> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL])
44146: 4283 clrl %d3 <== NOT EXECUTED 44148: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 4414c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4414e: 670c beqs 4415c <iproc+0xf8> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
44150: 4283 clrl %d3 <== NOT EXECUTED 44152: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 44156: b083 cmpl %d3,%d0 <== NOT EXECUTED 44158: 6600 ff66 bnew 440c0 <iproc+0x5c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
4415c: 44c1 movew %d1,%ccr <== NOT EXECUTED 4415e: 6b58 bmis 441b8 <iproc+0x154> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
44160: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44164: 7001 moveq #1,%d0 <== NOT EXECUTED 44166: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4416a: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 4416e: 5281 addql #1,%d1 <== NOT EXECUTED 44170: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
44174: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4417a: 4e5e unlk %fp <== NOT EXECUTED 4417c: 4e75 rts <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
4417e: 0800 0006 btst #6,%d0 <== NOT EXECUTED 44182: 6788 beqs 4410c <iproc+0xa8> <== NOT EXECUTED 44184: 740d moveq #13,%d2 <== NOT EXECUTED 44186: 6084 bras 4410c <iproc+0xa8> <== NOT EXECUTED
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
44188: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 4418e: 6000 ff1a braw 440aa <iproc+0x46> <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
44192: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44194: 4280 clrl %d0 <== NOT EXECUTED 44196: 1002 moveb %d2,%d0 <== NOT EXECUTED 44198: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4419a: 4eba fc30 jsr %pc@(43dcc <echo>) <== NOT EXECUTED 4419e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 441a2: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
441a4: 4280 clrl %d0 <== NOT EXECUTED 441a6: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 441aa: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 441ae: 5281 addql #1,%d1 <== NOT EXECUTED 441b0: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 441b4: 6000 ff34 braw 440ea <iproc+0x86> <== NOT EXECUTED
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
441b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 441bc: 4eba fc0e jsr %pc@(43dcc <echo>) <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
441c0: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
441c4: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
441c6: 7001 moveq #1,%d0 <== NOT EXECUTED 441c8: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 441cc: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 441d0: 5281 addql #1,%d1 <== NOT EXECUTED 441d2: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 441d6: 609c bras 44174 <iproc+0x110> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
441d8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 441dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441de: 4eba fc90 jsr %pc@(43e70 <erase>) <== NOT EXECUTED
return 0;
441e2: 508f addql #8,%sp <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
441e4: 4280 clrl %d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
441e6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 441ec: 4e5e unlk %fp <== NOT EXECUTED 441ee: 4e75 rts <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
441f0: 7048 moveq #72,%d0 <== NOT EXECUTED 441f2: c280 andl %d0,%d1 <== NOT EXECUTED 441f4: 6620 bnes 44216 <iproc+0x1b2> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
441f6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 441fa: 7001 moveq #1,%d0 <== NOT EXECUTED 441fc: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44200: 740a moveq #10,%d2 <== NOT EXECUTED 44202: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44206: 5281 addql #1,%d1 <== NOT EXECUTED 44208: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
4420c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44212: 4e5e unlk %fp <== NOT EXECUTED 44214: 4e75 rts <== NOT EXECUTED
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
44216: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44218: 4878 000a pea a <LASTO> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
4421c: 740a moveq #10,%d2 <== NOT EXECUTED
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
4421e: 4eba fbac jsr %pc@(43dcc <echo>) <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44222: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
44226: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44228: 7001 moveq #1,%d0 <== NOT EXECUTED 4422a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4422e: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44232: 5281 addql #1,%d1 <== NOT EXECUTED 44234: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44238: 60d2 bras 4420c <iproc+0x1a8> <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
4423a: 7001 moveq #1,%d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
4423c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44242: 4e5e unlk %fp <== NOT EXECUTED 44244: 4e75 rts <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
44246: 42a7 clrl %sp@- <== NOT EXECUTED 44248: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4424a: 4eba fc24 jsr %pc@(43e70 <erase>) <== NOT EXECUTED
return 0;
4424e: 508f addql #8,%sp <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
44250: 4280 clrl %d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
44252: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44258: 4e5e unlk %fp <== NOT EXECUTED
0005a168 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
5a168: 4280 clrl %d0 <== NOT EXECUTED
* These are directly supported (and completely correct) in the posix api.
*/
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
5a16a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0; }
5a16e: 4e5e unlk %fp <== NOT EXECUTED
00044510 <link>:
int link(
const char *existing,
const char *new
)
{
44510: 4e56 ffc4 linkw %fp,#-60 44514: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 44518: 242e 0008 movel %fp@(8),%d2
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
4451c: 260e movel %fp,%d3 4451e: 0683 ffff ffe8 addil #-24,%d3 44524: 2f02 movel %d2,%sp@-
int link(
const char *existing,
const char *new
)
{
44526: 266e 000c moveal %fp@(12),%a3
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
4452a: 4eb9 0005 1b38 jsr 51b38 <strlen> 44530: 7201 moveq #1,%d1 44532: 2e81 movel %d1,%sp@ 44534: 2f03 movel %d3,%sp@- 44536: 42a7 clrl %sp@- 44538: 2f00 movel %d0,%sp@- 4453a: 2f02 movel %d2,%sp@- 4453c: 4eb9 0004 3f90 jsr 43f90 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
44542: 4fef 0014 lea %sp@(20),%sp 44546: 4a80 tstl %d0 44548: 6600 00cc bnew 44616 <link+0x106>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
4454c: 742f moveq #47,%d2 4454e: 1213 moveb %a3@,%d1 44550: 1001 moveb %d1,%d0 44552: 49c0 extbl %d0 44554: b480 cmpl %d0,%d2
44556: 670e beqs 44566 <link+0x56>
44558: 143c 005c moveb #92,%d2 4455c: b480 cmpl %d0,%d2
4455e: 6706 beqs 44566 <link+0x56> <== NEVER TAKEN
44560: 4a01 tstb %d1 44562: 6600 00c0 bnew 44624 <link+0x114> 44566: 2079 0006 0d28 moveal 60d28 <rtems_current_user_env>,%a0 4456c: 45ee ffd4 lea %fp@(-44),%a2 44570: 7001 moveq #1,%d0 44572: 24a8 0018 movel %a0@(24),%a2@ 44576: 2d68 001c ffd8 movel %a0@(28),%fp@(-40) 4457c: 2d68 0020 ffdc movel %a0@(32),%fp@(-36) 44582: 2d68 0024 ffe0 movel %a0@(36),%fp@(-32) 44588: 2d68 0028 ffe4 movel %a0@(40),%fp@(-28)
if ( !parent_loc.ops->evalformake_h ) {
4458e: 206e ffe0 moveal %fp@(-32),%a0 44592: 2068 0004 moveal %a0@(4),%a0 44596: 4a88 tstl %a0 44598: 6700 0122 beqw 446bc <link+0x1ac>
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 );
4459c: 486e fffc pea %fp@(-4) 445a0: 2f0a movel %a2,%sp@- 445a2: 4873 0800 pea %a3@(00000000,%d0:l) 445a6: 4e90 jsr %a0@
if ( result != 0 ) {
445a8: 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 );
445ac: 2640 moveal %d0,%a3
if ( result != 0 ) {
445ae: 4a80 tstl %d0 445b0: 6600 00dc bnew 4468e <link+0x17e>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
445b4: 202e fff8 movel %fp@(-8),%d0 445b8: b0ae ffe4 cmpl %fp@(-28),%d0 445bc: 6600 008a bnew 44648 <link+0x138>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
445c0: 226e ffe0 moveal %fp@(-32),%a1 445c4: 2069 0008 moveal %a1@(8),%a0 445c8: 4a88 tstl %a0 445ca: 6700 0122 beqw 446ee <link+0x1de>
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 );
445ce: 2f2e fffc movel %fp@(-4),%sp@- 445d2: 2f0a movel %a2,%sp@- 445d4: 2f03 movel %d3,%sp@- 445d6: 4e90 jsr %a0@
rtems_filesystem_freenode( &existing_loc );
445d8: 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 );
445dc: 2400 movel %d0,%d2
rtems_filesystem_freenode( &existing_loc );
445de: 4fef 000c lea %sp@(12),%sp 445e2: 4a88 tstl %a0
445e4: 670e beqs 445f4 <link+0xe4> <== NEVER TAKEN
445e6: 2068 001c moveal %a0@(28),%a0 445ea: 4a88 tstl %a0
445ec: 6706 beqs 445f4 <link+0xe4> <== NEVER TAKEN
445ee: 2f03 movel %d3,%sp@- 445f0: 4e90 jsr %a0@ 445f2: 588f addql #4,%sp
rtems_filesystem_freenode( &parent_loc );
445f4: 206e ffe0 moveal %fp@(-32),%a0 445f8: 4a88 tstl %a0
445fa: 670e beqs 4460a <link+0xfa> <== NEVER TAKEN
445fc: 2068 001c moveal %a0@(28),%a0 44600: 4a88 tstl %a0
44602: 6706 beqs 4460a <link+0xfa> <== NEVER TAKEN
44604: 2f0a movel %a2,%sp@- 44606: 4e90 jsr %a0@ 44608: 588f addql #4,%sp
return result;
}
4460a: 2002 movel %d2,%d0 4460c: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 44612: 4e5e unlk %fp 44614: 4e75 rts
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
0, &existing_loc, true );
if ( result != 0 )
44616: 74ff moveq #-1,%d2
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
44618: 2002 movel %d2,%d0 4461a: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 44620: 4e5e unlk %fp 44622: 4e75 rts
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
44624: 2079 0006 0d28 moveal 60d28 <rtems_current_user_env>,%a0 4462a: 45ee ffd4 lea %fp@(-44),%a2 4462e: 5888 addql #4,%a0 44630: 4280 clrl %d0 44632: 2498 movel %a0@+,%a2@ 44634: 2d58 ffd8 movel %a0@+,%fp@(-40) 44638: 2d58 ffdc movel %a0@+,%fp@(-36) 4463c: 2d58 ffe0 movel %a0@+,%fp@(-32) 44640: 2d50 ffe4 movel %a0@,%fp@(-28) 44644: 6000 ff48 braw 4458e <link+0x7e>
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
rtems_filesystem_freenode( &existing_loc );
44648: 206e fff4 moveal %fp@(-12),%a0 4464c: 4a88 tstl %a0
4464e: 670e beqs 4465e <link+0x14e> <== NEVER TAKEN
44650: 2068 001c moveal %a0@(28),%a0 44654: 4a88 tstl %a0
44656: 6706 beqs 4465e <link+0x14e> <== NEVER TAKEN
44658: 2f03 movel %d3,%sp@- 4465a: 4e90 jsr %a0@ 4465c: 588f addql #4,%sp
rtems_filesystem_freenode( &parent_loc );
4465e: 206e ffe0 moveal %fp@(-32),%a0 44662: 4a88 tstl %a0
44664: 670e beqs 44674 <link+0x164> <== NEVER TAKEN
44666: 2068 001c moveal %a0@(28),%a0 4466a: 4a88 tstl %a0
4466c: 6706 beqs 44674 <link+0x164> <== NEVER TAKEN
4466e: 2f0a movel %a2,%sp@- 44670: 4e90 jsr %a0@ 44672: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EXDEV );
44674: 4eb9 0005 068c jsr 5068c <__errno> 4467a: 74ff moveq #-1,%d2 4467c: 2040 moveal %d0,%a0 4467e: 7012 moveq #18,%d0 44680: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
44682: 2002 movel %d2,%d0 44684: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 4468a: 4e5e unlk %fp 4468c: 4e75 rts
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
4468e: 206e fff4 moveal %fp@(-12),%a0 44692: 4a88 tstl %a0
44694: 670e beqs 446a4 <link+0x194> <== NEVER TAKEN
44696: 2068 001c moveal %a0@(28),%a0 4469a: 4a88 tstl %a0
4469c: 6706 beqs 446a4 <link+0x194> <== NEVER TAKEN
4469e: 2f03 movel %d3,%sp@- 446a0: 4e90 jsr %a0@ 446a2: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( result );
446a4: 4eb9 0005 068c jsr 5068c <__errno> 446aa: 74ff moveq #-1,%d2 446ac: 2040 moveal %d0,%a0
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
446ae: 2002 movel %d2,%d0
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( result );
446b0: 208b movel %a3,%a0@
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
446b2: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 446b8: 4e5e unlk %fp 446ba: 4e75 rts
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
446bc: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 446c0: 4a88 tstl %a0 <== NOT EXECUTED 446c2: 670e beqs 446d2 <link+0x1c2> <== NOT EXECUTED 446c4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 446c8: 4a88 tstl %a0 <== NOT EXECUTED 446ca: 6706 beqs 446d2 <link+0x1c2> <== NOT EXECUTED 446cc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 446ce: 4e90 jsr %a0@ <== NOT EXECUTED 446d0: 588f addql #4,%sp <== NOT EXECUTED
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
446d2: 4eb9 0005 068c jsr 5068c <__errno> <== NOT EXECUTED 446d8: 74ff moveq #-1,%d2 <== NOT EXECUTED 446da: 2040 moveal %d0,%a0 <== NOT EXECUTED 446dc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
446e2: 2002 movel %d2,%d0 <== NOT EXECUTED 446e4: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 <== NOT EXECUTED 446ea: 4e5e unlk %fp <== NOT EXECUTED 446ec: 4e75 rts <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
446ee: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 446f2: 4a88 tstl %a0 <== NOT EXECUTED 446f4: 6712 beqs 44708 <link+0x1f8> <== NOT EXECUTED 446f6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 446fa: 4a88 tstl %a0 <== NOT EXECUTED 446fc: 670a beqs 44708 <link+0x1f8> <== NOT EXECUTED 446fe: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44700: 4e90 jsr %a0@ <== NOT EXECUTED 44702: 226e ffe0 moveal %fp@(-32),%a1 <== NOT EXECUTED 44706: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
44708: 4a89 tstl %a1 <== NOT EXECUTED 4470a: 67c6 beqs 446d2 <link+0x1c2> <== NOT EXECUTED 4470c: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 44710: 4a88 tstl %a0 <== NOT EXECUTED 44712: 67be beqs 446d2 <link+0x1c2> <== NOT EXECUTED 44714: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
44716: 74ff moveq #-1,%d2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
44718: 4e90 jsr %a0@ <== NOT EXECUTED 4471a: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4471c: 4eb9 0005 068c jsr 5068c <__errno> <== NOT EXECUTED 44722: 2040 moveal %d0,%a0 <== NOT EXECUTED 44724: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4472a: 60b6 bras 446e2 <link+0x1d2> <== NOT EXECUTED
0005a188 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
5a188: 4e56 ffe4 linkw %fp,#-28 5a18c: 222e 0008 movel %fp@(8),%d1 5a190: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 5a194: 202e 0014 movel %fp@(20),%d0 5a198: 282e 000c movel %fp@(12),%d4 5a19c: 2a2e 0010 movel %fp@(16),%d5
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
5a1a0: b2b9 0005 c1e4 cmpl 5c1e4 <rtems_libio_number_iops>,%d1 5a1a6: 6400 0118 bccw 5a2c0 <lseek+0x138>
iop = rtems_libio_iop( fd );
5a1aa: 2479 0005 d86c moveal 5d86c <rtems_libio_iops>,%a2 5a1b0: ed89 lsll #6,%d1 5a1b2: d5c1 addal %d1,%a2
rtems_libio_check_is_open(iop);
5a1b4: 222a 0014 movel %a2@(20),%d1 5a1b8: 0281 0000 0100 andil #256,%d1 5a1be: 6700 0100 beqw 5a2c0 <lseek+0x138>
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
5a1c2: 206a 003c moveal %a2@(60),%a0 5a1c6: 4aa8 0014 tstl %a0@(20) 5a1ca: 6700 0112 beqw 5a2de <lseek+0x156>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
5a1ce: 7201 moveq #1,%d1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
5a1d0: 242a 000c movel %a2@(12),%d2 5a1d4: 262a 0010 movel %a2@(16),%d3
switch ( whence ) {
5a1d8: b280 cmpl %d0,%d1 5a1da: 6700 00ae beqw 5a28a <lseek+0x102> 5a1de: 7c02 moveq #2,%d6 5a1e0: bc80 cmpl %d0,%d6
5a1e2: 6752 beqs 5a236 <lseek+0xae>
5a1e4: 4a80 tstl %d0 5a1e6: 6600 0084 bnew 5a26c <lseek+0xe4>
case SEEK_SET:
iop->offset = offset;
5a1ea: 2544 000c movel %d4,%a2@(12) 5a1ee: 2545 0010 movel %d5,%a2@(16)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
5a1f2: 2f00 movel %d0,%sp@- 5a1f4: 2f05 movel %d5,%sp@- 5a1f6: 2f04 movel %d4,%sp@- 5a1f8: 2f0a movel %a2,%sp@- 5a1fa: 2068 0014 moveal %a0@(20),%a0 5a1fe: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5a200: 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 );
5a204: 2800 movel %d0,%d4 5a206: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5a208: 70ff moveq #-1,%d0 5a20a: 72ff moveq #-1,%d1 5a20c: 9285 subl %d5,%d1 5a20e: 9184 subxl %d4,%d0
5a210: 670e beqs 5a220 <lseek+0x98> <== NEVER TAKEN
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5a212: 2205 movel %d5,%d1 5a214: 2004 movel %d4,%d0 5a216: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5a21c: 4e5e unlk %fp 5a21e: 4e75 rts 5a220: 2205 movel %d5,%d1 5a222: 2004 movel %d4,%d0
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
if ( status == (off_t) -1 )
iop->offset = old_offset;
5a224: 2542 000c movel %d2,%a2@(12) 5a228: 2543 0010 movel %d3,%a2@(16)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5a22c: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5a232: 4e5e unlk %fp 5a234: 4e75 rts
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
5a236: 2c2a 0004 movel %a2@(4),%d6 5a23a: 2e2a 0008 movel %a2@(8),%d7 5a23e: de85 addl %d5,%d7 5a240: dd84 addxl %d4,%d6 5a242: 2546 000c movel %d6,%a2@(12) 5a246: 2547 0010 movel %d7,%a2@(16)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
5a24a: 2f00 movel %d0,%sp@- 5a24c: 2f05 movel %d5,%sp@- 5a24e: 2f04 movel %d4,%sp@- 5a250: 2f0a movel %a2,%sp@- 5a252: 2068 0014 moveal %a0@(20),%a0 5a256: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5a258: 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 );
5a25c: 2800 movel %d0,%d4 5a25e: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5a260: 70ff moveq #-1,%d0 5a262: 72ff moveq #-1,%d1 5a264: 9285 subl %d5,%d1 5a266: 9184 subxl %d4,%d0
5a268: 66a8 bnes 5a212 <lseek+0x8a>
5a26a: 60b4 bras 5a220 <lseek+0x98>
case SEEK_END:
iop->offset = iop->size + offset;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
5a26c: 4eb9 0004 d868 jsr 4d868 <__errno> 5a272: 2040 moveal %d0,%a0 5a274: 7016 moveq #22,%d0 5a276: 78ff moveq #-1,%d4 5a278: 7aff moveq #-1,%d5 5a27a: 2080 movel %d0,%a0@
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5a27c: 2205 movel %d5,%d1 5a27e: 2004 movel %d4,%d0 5a280: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5a286: 4e5e unlk %fp 5a288: 4e75 rts
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
5a28a: 2c04 movel %d4,%d6 5a28c: 2e05 movel %d5,%d7 5a28e: de83 addl %d3,%d7 5a290: dd82 addxl %d2,%d6 5a292: 2546 000c movel %d6,%a2@(12) 5a296: 2547 0010 movel %d7,%a2@(16)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
5a29a: 2f00 movel %d0,%sp@- 5a29c: 2f05 movel %d5,%sp@- 5a29e: 2f04 movel %d4,%sp@- 5a2a0: 2f0a movel %a2,%sp@- 5a2a2: 2068 0014 moveal %a0@(20),%a0 5a2a6: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5a2a8: 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 );
5a2ac: 2800 movel %d0,%d4 5a2ae: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5a2b0: 70ff moveq #-1,%d0 5a2b2: 72ff moveq #-1,%d1 5a2b4: 9285 subl %d5,%d1 5a2b6: 9184 subxl %d4,%d0 5a2b8: 6600 ff58 bnew 5a212 <lseek+0x8a>
5a2bc: 6000 ff62 braw 5a220 <lseek+0x98> <== NOT EXECUTED
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
5a2c0: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 5a2c6: 7209 moveq #9,%d1 <== NOT EXECUTED 5a2c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a2ca: 78ff moveq #-1,%d4 <== NOT EXECUTED 5a2cc: 7aff moveq #-1,%d5 <== NOT EXECUTED 5a2ce: 2081 movel %d1,%a0@ <== NOT EXECUTED
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5a2d0: 2205 movel %d5,%d1 <== NOT EXECUTED 5a2d2: 2004 movel %d4,%d0 <== NOT EXECUTED 5a2d4: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5a2da: 4e5e unlk %fp <== NOT EXECUTED 5a2dc: 4e75 rts <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5a2de: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 5a2e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a2e6: 78ff moveq #-1,%d4 <== NOT EXECUTED 5a2e8: 7aff moveq #-1,%d5 <== NOT EXECUTED 5a2ea: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5a2f0: 2205 movel %d5,%d1 <== NOT EXECUTED 5a2f2: 2004 movel %d4,%d0 <== NOT EXECUTED 5a2f4: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5a2fa: 4e5e unlk %fp <== NOT EXECUTED
0004aaf4 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
4aaf4: 4e56 fff4 linkw %fp,#-12 4aaf8: 52b9 0005 d87c addql #1,5d87c <rtems_malloc_statistics+0x4> 4aafe: 48d7 001c moveml %d2-%d4,%sp@ 4ab02: 262e 0008 movel %fp@(8),%d3
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
4ab06: 4eb9 0004 aab2 jsr 4aab2 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
4ab0c: 4a83 tstl %d3
4ab0e: 6766 beqs 4ab76 <malloc+0x82> <== NEVER TAKEN
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4ab10: 7003 moveq #3,%d0 4ab12: b0b9 0005 db4a cmpl 5db4a <_System_state_Current>,%d0
4ab18: 6752 beqs 4ab6c <malloc+0x78>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
4ab1a: 42a7 clrl %sp@- 4ab1c: 42a7 clrl %sp@- 4ab1e: 2f03 movel %d3,%sp@- 4ab20: 2f39 0005 c1f0 movel 5c1f0 <RTEMS_Malloc_Heap>,%sp@- 4ab26: 4eb9 0004 b6b4 jsr 4b6b4 <_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 ) {
4ab2c: 4fef 0010 lea %sp@(16),%sp 4ab30: 2400 movel %d0,%d2
4ab32: 675e beqs 4ab92 <malloc+0x9e>
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
return (void *) 0;
4ab34: 2800 movel %d0,%d4
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
4ab36: 2079 0005 c83e moveal 5c83e <rtems_malloc_dirty_helper>,%a0 4ab3c: 4a88 tstl %a0
4ab3e: 670a beqs 4ab4a <malloc+0x56> <== ALWAYS TAKEN
(*rtems_malloc_dirty_helper)( return_this, size );
4ab40: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ab42: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ab44: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4ab46: 4e90 jsr %a0@ <== NOT EXECUTED 4ab48: 508f addql #8,%sp <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
4ab4a: 2079 0005 c836 moveal 5c836 <rtems_malloc_statistics_helpers>,%a0 4ab50: 4a88 tstl %a0
4ab52: 6730 beqs 4ab84 <malloc+0x90> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
4ab54: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ab56: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4ab5a: 2404 movel %d4,%d2 <== NOT EXECUTED 4ab5c: 4e90 jsr %a0@ <== NOT EXECUTED 4ab5e: 588f addql #4,%sp <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
4ab60: 2002 movel %d2,%d0 <== NOT EXECUTED 4ab62: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4ab68: 4e5e unlk %fp <== NOT EXECUTED 4ab6a: 4e75 rts <== NOT EXECUTED
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4ab6c: 4eb9 0004 aa58 jsr 4aa58 <malloc_is_system_state_OK> 4ab72: 4a00 tstb %d0
4ab74: 66a4 bnes 4ab1a <malloc+0x26> <== ALWAYS TAKEN
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
4ab76: 4282 clrl %d2 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
4ab78: 2002 movel %d2,%d0 <== NOT EXECUTED 4ab7a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4ab80: 4e5e unlk %fp <== NOT EXECUTED 4ab82: 4e75 rts <== NOT EXECUTED
(*rtems_malloc_dirty_helper)( return_this, size );
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
4ab84: 2404 movel %d4,%d2
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
4ab86: 2002 movel %d2,%d0 4ab88: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4ab8e: 4e5e unlk %fp 4ab90: 4e75 rts
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
4ab92: 2079 0005 c83a moveal 5c83a <rtems_malloc_sbrk_helpers>,%a0 4ab98: 4a88 tstl %a0
4ab9a: 670e beqs 4abaa <malloc+0xb6> <== ALWAYS TAKEN
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
4ab9c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ab9e: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4aba2: 4e90 jsr %a0@ <== NOT EXECUTED
if ( !return_this ) {
4aba4: 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 );
4aba6: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( !return_this ) {
4aba8: 668c bnes 4ab36 <malloc+0x42> <== NOT EXECUTED
errno = ENOMEM;
4abaa: 4eb9 0004 d868 jsr 4d868 <__errno> 4abb0: 2040 moveal %d0,%a0 4abb2: 700c moveq #12,%d0 4abb4: 2080 movel %d0,%a0@
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
4abb6: 2002 movel %d2,%d0 4abb8: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4abbe: 4e5e unlk %fp
...
0004aa98 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
4aa98: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4aa9c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4aaa0: 4879 0005 db9a pea 5db9a <RTEMS_Malloc_GC_list> <== NOT EXECUTED 4aaa6: 4eb9 0004 673c jsr 4673c <_Chain_Append> <== NOT EXECUTED 4aaac: 508f addql #8,%sp <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); }
4aaae: 4e5e unlk %fp <== NOT EXECUTED
0004aab2 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
4aab2: 4e56 0000 linkw %fp,#0 4aab6: 2f0b movel %a3,%sp@-
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
free(to_be_freed);
4aab8: 47f9 0004 a584 lea 4a584 <free>,%a3
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
4aabe: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
4aac0: 4879 0005 db9a pea 5db9a <RTEMS_Malloc_GC_list> 4aac6: 45f9 0004 b07c lea 4b07c <_Chain_Get>,%a2 4aacc: 4e92 jsr %a2@
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
4aace: 588f addql #4,%sp 4aad0: 4a80 tstl %d0
4aad2: 6714 beqs 4aae8 <malloc_deferred_frees_process+0x36><== ALWAYS TAKEN
free(to_be_freed);
4aad4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4aad6: 4e93 jsr %a3@ <== NOT EXECUTED 4aad8: 588f addql #4,%sp <== NOT EXECUTED 4aada: 4879 0005 db9a pea 5db9a <RTEMS_Malloc_GC_list> <== NOT EXECUTED 4aae0: 4e92 jsr %a2@ <== NOT EXECUTED
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)
4aae2: 588f addql #4,%sp <== NOT EXECUTED 4aae4: 4a80 tstl %d0 <== NOT EXECUTED 4aae6: 66ec bnes 4aad4 <malloc_deferred_frees_process+0x22><== NOT EXECUTED
free(to_be_freed);
}
4aae8: 246e fff8 moveal %fp@(-8),%a2 4aaec: 266e fffc moveal %fp@(-4),%a3
4aaf0: 4e5e unlk %fp <== NOT EXECUTED
0004aa58 <malloc_is_system_state_OK>:
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
4aa58: 4e56 0000 linkw %fp,#0
if ( _Thread_Dispatch_disable_level > 0 )
4aa5c: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0
4aa62: 660e bnes 4aa72 <malloc_is_system_state_OK+0x1a> <== NEVER TAKEN
return false;
if ( _ISR_Nest_level > 0 )
4aa64: 2039 0005 da62 movel 5da62 <_ISR_Nest_level>,%d0
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
4aa6a: 57c0 seq %d0
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
4aa6c: 4e5e unlk %fp
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
4aa6e: 4480 negl %d0
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
4aa70: 4e75 rts
4aa72: 4e5e unlk %fp <== NOT EXECUTED
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
if ( _Thread_Dispatch_disable_level > 0 )
4aa74: 4200 clrb %d0 <== NOT EXECUTED
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
00051638 <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
51638: 4e56 0000 linkw %fp,#0
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
5163c: 2f39 0006 3148 movel 63148 <imfs_memfile_bytes_per_block>,%sp@- 51642: 4878 0001 pea 1 <ADD> 51646: 4eb9 0004 3adc jsr 43adc <calloc>
if ( memory )
5164c: 508f addql #8,%sp 5164e: 4a80 tstl %d0
51650: 6706 beqs 51658 <memfile_alloc_block+0x20> <== NEVER TAKEN
memfile_blocks_allocated++;
51652: 52b9 0006 32e4 addql #1,632e4 <memfile_blocks_allocated>
return memory;
}
51658: 4e5e unlk %fp <== NOT EXECUTED
00051a60 <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
51a60: 4e56 0000 linkw %fp,#0 51a64: 2f0a movel %a2,%sp@- 51a66: 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) ) {
51a6a: 2f0a movel %a2,%sp@- 51a6c: 4eb9 0004 fd9a jsr 4fd9a <rtems_libio_is_file_open> 51a72: 588f addql #4,%sp 51a74: 4a80 tstl %d0
51a76: 662e bnes 51aa6 <memfile_check_rmnod+0x46>
51a78: 4a6a 0032 tstw %a2@(50)
51a7c: 6628 bnes 51aa6 <memfile_check_rmnod+0x46> <== NEVER TAKEN
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
51a7e: 2079 0006 238c moveal 6238c <rtems_current_user_env>,%a0 51a84: b5e8 0004 cmpal %a0@(4),%a2
51a88: 6726 beqs 51ab0 <memfile_check_rmnod+0x50> <== NEVER TAKEN
rtems_filesystem_current.node_access = NULL;
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
51a8a: 7006 moveq #6,%d0 51a8c: b0aa 0048 cmpl %a2@(72),%d0
51a90: 670a beqs 51a9c <memfile_check_rmnod+0x3c> <== NEVER TAKEN
IMFS_memfile_remove( the_jnode );
51a92: 2f0a movel %a2,%sp@- 51a94: 4eb9 0005 190c jsr 5190c <IMFS_memfile_remove> 51a9a: 588f addql #4,%sp
free( the_jnode );
51a9c: 2f0a movel %a2,%sp@- 51a9e: 4eb9 0004 4024 jsr 44024 <free> 51aa4: 588f addql #4,%sp
}
return 0;
}
51aa6: 246e fffc moveal %fp@(-4),%a2 51aaa: 4280 clrl %d0 51aac: 4e5e unlk %fp 51aae: 4e75 rts
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
rtems_filesystem_current.node_access = NULL;
51ab0: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
51ab4: 7006 moveq #6,%d0 <== NOT EXECUTED 51ab6: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 51aba: 66d6 bnes 51a92 <memfile_check_rmnod+0x32> <== NOT EXECUTED 51abc: 60de bras 51a9c <memfile_check_rmnod+0x3c> <== NOT EXECUTED
0005185a <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
5185a: 4e56 ffec linkw %fp,#-20 5185e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 51862: 286e 0008 moveal %fp@(8),%a4 51866: 262e 000c movel %fp@(12),%d3
/*
* Perform internal consistency checks
*/
assert( block_table );
5186a: 4a8c tstl %a4
5186c: 6736 beqs 518a4 <memfile_free_blocks_in_table+0x4a><== NEVER TAKEN
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
5186e: 2454 moveal %a4@,%a2 51870: 47f9 0005 161e lea 5161e <memfile_free_block>,%a3
for ( i=0 ; i<entries ; i++ ) {
51876: 4a83 tstl %d3
51878: 6f18 bles 51892 <memfile_free_blocks_in_table+0x38><== NEVER TAKEN
5187a: 4282 clrl %d2
if ( b[i] ) {
5187c: 2012 movel %a2@,%d0
5187e: 6708 beqs 51888 <memfile_free_blocks_in_table+0x2e>
memfile_free_block( b[i] );
51880: 2f00 movel %d0,%sp@- 51882: 4e93 jsr %a3@
b[i] = 0;
51884: 588f addql #4,%sp 51886: 4292 clrl %a2@
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
51888: 5282 addql #1,%d2 5188a: 588a addql #4,%a2 5188c: b483 cmpl %d3,%d2
5188e: 6dec blts 5187c <memfile_free_blocks_in_table+0x22>
51890: 2454 moveal %a4@,%a2
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
51892: 2f0a movel %a2,%sp@- 51894: 4e93 jsr %a3@
*block_table = 0;
51896: 588f addql #4,%sp 51898: 4294 clrl %a4@
}
5189a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 518a0: 4e5e unlk %fp 518a2: 4e75 rts
/*
* Perform internal consistency checks
*/
assert( block_table );
518a4: 4879 0006 1778 pea 61778 <CSWTCH.8+0x84> <== NOT EXECUTED 518aa: 4879 0006 1836 pea 61836 <__FUNCTION__.6021> <== NOT EXECUTED 518b0: 4878 01b3 pea 1b3 <DBL_MANT_DIG+0x17e> <== NOT EXECUTED 518b4: 4879 0006 170e pea 6170e <CSWTCH.8+0x1a> <== NOT EXECUTED 518ba: 4eb9 0004 fac4 jsr 4fac4 <__assert_func> <== NOT EXECUTED
00051d20 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
51d20: 4e56 ffec linkw %fp,#-20 51d24: 206e 0008 moveal %fp@(8),%a0 51d28: 48d7 040c moveml %d2-%d3/%a2,%sp@
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
51d2c: 2468 0038 moveal %a0@(56),%a2
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
51d30: 202e 000c movel %fp@(12),%d0 51d34: 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 )
51d38: 242a 004c movel %a2@(76),%d2 51d3c: 262a 0050 movel %a2@(80),%d3 51d40: 9681 subl %d1,%d3 51d42: 9580 subxl %d0,%d2
51d44: 6d30 blts 51d76 <memfile_ftruncate+0x56> <== NEVER TAKEN
* 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;
51d46: 2540 004c movel %d0,%a2@(76) 51d4a: 2541 0050 movel %d1,%a2@(80)
iop->size = the_jnode->info.file.size;
51d4e: 2140 0004 movel %d0,%a0@(4) 51d52: 2141 0008 movel %d1,%a0@(8)
IMFS_update_atime( the_jnode );
51d56: 42a7 clrl %sp@- 51d58: 486e fff8 pea %fp@(-8) 51d5c: 4eb9 0004 40b4 jsr 440b4 <gettimeofday> 51d62: 256e fff8 003c movel %fp@(-8),%a2@(60)
return 0;
51d68: 508f addql #8,%sp
*/
the_jnode->info.file.size = length;
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
51d6a: 4280 clrl %d0
return 0;
}
51d6c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 51d72: 4e5e unlk %fp 51d74: 4e75 rts
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
return IMFS_memfile_extend( the_jnode, length );
51d76: 2f01 movel %d1,%sp@- <== NOT EXECUTED 51d78: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51d7a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51d7c: 4eb9 0005 1bce jsr 51bce <IMFS_memfile_extend> <== NOT EXECUTED 51d82: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
51d86: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 51d8c: 4e5e unlk %fp <== NOT EXECUTED
00051d90 <memfile_lseek>:
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
51d90: 7006 moveq #6,%d0
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
51d92: 4e56 ffe8 linkw %fp,#-24 51d96: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 51d9a: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
51d9e: 266a 0038 moveal %a2@(56),%a3
if (the_jnode->type == IMFS_LINEAR_FILE) {
51da2: b0ab 0048 cmpl %a3@(72),%d0
51da6: 673e beqs 51de6 <memfile_lseek+0x56> <== NEVER TAKEN
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
51da8: 2f2a 0010 movel %a2@(16),%sp@- 51dac: 2f2a 000c movel %a2@(12),%sp@- 51db0: 2f0b movel %a3,%sp@- 51db2: 4eb9 0005 1bce jsr 51bce <IMFS_memfile_extend> 51db8: 4fef 000c lea %sp@(12),%sp 51dbc: 4a80 tstl %d0
51dbe: 6668 bnes 51e28 <memfile_lseek+0x98> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
51dc0: 202b 004c movel %a3@(76),%d0 51dc4: 222b 0050 movel %a3@(80),%d1 51dc8: 242a 000c movel %a2@(12),%d2 51dcc: 262a 0010 movel %a2@(16),%d3 51dd0: 2540 0004 movel %d0,%a2@(4) 51dd4: 2541 0008 movel %d1,%a2@(8)
} return iop->offset; }
51dd8: 2203 movel %d3,%d1 51dda: 2002 movel %d2,%d0 51ddc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 51de2: 4e5e unlk %fp 51de4: 4e75 rts
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
51de6: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 51dea: 222a 0010 movel %a2@(16),%d1 <== NOT EXECUTED 51dee: 242b 004c movel %a3@(76),%d2 <== NOT EXECUTED 51df2: 262b 0050 movel %a3@(80),%d3 <== NOT EXECUTED 51df6: 2800 movel %d0,%d4 <== NOT EXECUTED 51df8: 2a01 movel %d1,%d5 <== NOT EXECUTED 51dfa: 9a83 subl %d3,%d5 <== NOT EXECUTED 51dfc: 9982 subxl %d2,%d4 <== NOT EXECUTED 51dfe: 6e12 bgts 51e12 <memfile_lseek+0x82> <== NOT EXECUTED 51e00: 2400 movel %d0,%d2 <== NOT EXECUTED 51e02: 2601 movel %d1,%d3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
51e04: 2203 movel %d3,%d1 <== NOT EXECUTED 51e06: 2002 movel %d2,%d0 <== NOT EXECUTED 51e08: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51e0e: 4e5e unlk %fp <== NOT EXECUTED 51e10: 4e75 rts <== NOT EXECUTED 51e12: 2203 movel %d3,%d1 <== NOT EXECUTED 51e14: 2002 movel %d2,%d0 <== NOT EXECUTED
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
51e16: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 51e1a: 2543 0010 movel %d3,%a2@(16) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
51e1e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51e24: 4e5e unlk %fp <== NOT EXECUTED 51e26: 4e75 rts <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
51e28: 4eb9 0005 30c8 jsr 530c8 <__errno> <== NOT EXECUTED 51e2e: 761c moveq #28,%d3 <== NOT EXECUTED 51e30: 2040 moveal %d0,%a0 <== NOT EXECUTED 51e32: 2083 movel %d3,%a0@ <== NOT EXECUTED 51e34: 74ff moveq #-1,%d2 <== NOT EXECUTED 51e36: 76ff moveq #-1,%d3 <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
51e38: 2203 movel %d3,%d1 <== NOT EXECUTED 51e3a: 2002 movel %d2,%d0 <== NOT EXECUTED 51e3c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51e42: 4e5e unlk %fp <== NOT EXECUTED
00052110 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
52110: 4e56 fff0 linkw %fp,#-16 52114: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 52118: 246e 0008 moveal %fp@(8),%a2
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
5211c: 202a 0014 movel %a2@(20),%d0 52120: 2200 movel %d0,%d1 52122: 0281 0000 0204 andil #516,%d1
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
52128: 266a 0038 moveal %a2@(56),%a3
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
5212c: 6708 beqs 52136 <memfile_open+0x26>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
5212e: 7206 moveq #6,%d1 52130: b2ab 0048 cmpl %a3@(72),%d1
52134: 6732 beqs 52168 <memfile_open+0x58> <== NEVER TAKEN
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)
52136: 222b 004c movel %a3@(76),%d1 5213a: 242b 0050 movel %a3@(80),%d2
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
5213e: 0800 0009 btst #9,%d0
52142: 6710 beqs 52154 <memfile_open+0x44>
iop->offset = the_jnode->info.file.size;
52144: 2541 000c movel %d1,%a2@(12) 52148: 2542 0010 movel %d2,%a2@(16) 5214c: 222b 004c movel %a3@(76),%d1 52150: 242b 0050 movel %a3@(80),%d2
iop->size = the_jnode->info.file.size;
52154: 4280 clrl %d0 52156: 2541 0004 movel %d1,%a2@(4) 5215a: 2542 0008 movel %d2,%a2@(8)
return 0; }
5215e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 52164: 4e5e unlk %fp 52166: 4e75 rts
/*
* 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;
52168: 202b 0050 movel %a3@(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;
5216c: 4282 clrl %d2 <== NOT EXECUTED 5216e: 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;
52170: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
52174: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 52178: 2743 0050 movel %d3,%a3@(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;
5217c: 7605 moveq #5,%d3 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
5217e: 42ab 0054 clrl %a3@(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;
52182: 2743 0048 movel %d3,%a3@(72) <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
52186: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
5218a: 42ab 005c clrl %a3@(92) <== NOT EXECUTED
if ((count != 0)
5218e: 4a80 tstl %d0 <== NOT EXECUTED 52190: 6610 bnes 521a2 <memfile_open+0x92> <== NOT EXECUTED 52192: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 52196: 4281 clrl %d1 <== NOT EXECUTED 52198: 4282 clrl %d2 <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
5219a: 0800 0009 btst #9,%d0 <== NOT EXECUTED 5219e: 67b4 beqs 52154 <memfile_open+0x44> <== NOT EXECUTED 521a0: 60a2 bras 52144 <memfile_open+0x34> <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
521a2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 521a4: 2f01 movel %d1,%sp@- <== NOT EXECUTED 521a6: 42a7 clrl %sp@- <== NOT EXECUTED 521a8: 42a7 clrl %sp@- <== NOT EXECUTED 521aa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 521ac: 4eb9 0005 1e46 jsr 51e46 <IMFS_memfile_write> <== 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)
521b2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 521b6: 72ff moveq #-1,%d1 <== NOT EXECUTED 521b8: b280 cmpl %d0,%d1 <== NOT EXECUTED 521ba: 6710 beqs 521cc <memfile_open+0xbc> <== NOT EXECUTED 521bc: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 521c0: 222b 004c movel %a3@(76),%d1 <== NOT EXECUTED 521c4: 242b 0050 movel %a3@(80),%d2 <== NOT EXECUTED 521c8: 6000 ff74 braw 5213e <memfile_open+0x2e> <== NOT EXECUTED 521cc: 70ff moveq #-1,%d0 <== NOT EXECUTED
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
return 0;
}
521ce: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 521d4: 4e5e unlk %fp <== NOT EXECUTED
00051abe <memfile_rmnod>:
int memfile_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
51abe: 4e56 fff8 linkw %fp,#-8 51ac2: 206e 000c moveal %fp@(12),%a0 51ac6: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
51ac8: 2450 moveal %a0@,%a2
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
51aca: 4aaa 0008 tstl %a2@(8)
51ace: 670e beqs 51ade <memfile_rmnod+0x20> <== NEVER TAKEN
51ad0: 2f0a movel %a2,%sp@- 51ad2: 4eb9 0004 8718 jsr 48718 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
51ad8: 588f addql #4,%sp 51ada: 42aa 0008 clrl %a2@(8)
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
51ade: 302a 0032 movew %a2@(50),%d0 51ae2: 5380 subql #1,%d0 51ae4: 3540 0032 movew %d0,%a2@(50)
IMFS_update_ctime( the_jnode );
51ae8: 42a7 clrl %sp@- 51aea: 486e fff8 pea %fp@(-8) 51aee: 4eb9 0004 40b4 jsr 440b4 <gettimeofday> 51af4: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return memfile_check_rmnod( the_jnode );
51afa: 2f0a movel %a2,%sp@- 51afc: 4eb9 0005 1a60 jsr 51a60 <memfile_check_rmnod>
}
51b02: 246e fff4 moveal %fp@(-12),%a2
51b06: 4e5e unlk %fp <== NOT EXECUTED
000429a8 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
429a8: 4e56 ffdc linkw %fp,#-36 429ac: 226e 0008 moveal %fp@(8),%a1 429b0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 429b4: 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) ) )
429b8: 2002 movel %d2,%d0 429ba: 0280 0000 f000 andil #61440,%d0 429c0: 6700 0108 beqw 42aca <mknod+0x122>
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
429c4: 762f moveq #47,%d3 429c6: 1211 moveb %a1@,%d1 429c8: 1001 moveb %d1,%d0 429ca: 49c0 extbl %d0 429cc: b680 cmpl %d0,%d3
429ce: 670e beqs 429de <mknod+0x36>
429d0: 163c 005c moveb #92,%d3 429d4: b680 cmpl %d0,%d3
429d6: 6706 beqs 429de <mknod+0x36> <== NEVER TAKEN
429d8: 4a01 tstb %d1 429da: 6600 0096 bnew 42a72 <mknod+0xca> 429de: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 429e4: 45ee ffe8 lea %fp@(-24),%a2 429e8: 7001 moveq #1,%d0 429ea: 24a8 0018 movel %a0@(24),%a2@ 429ee: 2d68 001c ffec movel %a0@(28),%fp@(-20) 429f4: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 429fa: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 42a00: 2d68 0028 fff8 movel %a0@(40),%fp@(-8)
if ( !temp_loc.ops->evalformake_h ) {
42a06: 206e fff4 moveal %fp@(-12),%a0 42a0a: 2068 0004 moveal %a0@(4),%a0 42a0e: 4a88 tstl %a0 42a10: 6700 008e beqw 42aa0 <mknod+0xf8>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
42a14: 486e fffc pea %fp@(-4) 42a18: 2f0a movel %a2,%sp@- 42a1a: 4871 0800 pea %a1@(00000000,%d0:l) 42a1e: 4e90 jsr %a0@
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
42a20: 4fef 000c lea %sp@(12),%sp 42a24: 4a80 tstl %d0 42a26: 6600 0094 bnew 42abc <mknod+0x114>
return -1;
if ( !temp_loc.ops->mknod_h ) {
42a2a: 226e fff4 moveal %fp@(-12),%a1 42a2e: 2069 0014 moveal %a1@(20),%a0 42a32: 4a88 tstl %a0 42a34: 6700 00ae beqw 42ae4 <mknod+0x13c>
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 );
42a38: 2f0a movel %a2,%sp@- 42a3a: 2f2e 0014 movel %fp@(20),%sp@- 42a3e: 2f2e 0010 movel %fp@(16),%sp@- 42a42: 2f02 movel %d2,%sp@- 42a44: 2f2e fffc movel %fp@(-4),%sp@- 42a48: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
42a4a: 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 );
42a4e: 2400 movel %d0,%d2
rtems_filesystem_freenode( &temp_loc );
42a50: 4fef 0014 lea %sp@(20),%sp 42a54: 4a88 tstl %a0
42a56: 670e beqs 42a66 <mknod+0xbe> <== NEVER TAKEN
42a58: 2068 001c moveal %a0@(28),%a0 42a5c: 4a88 tstl %a0
42a5e: 6706 beqs 42a66 <mknod+0xbe>
42a60: 2f0a movel %a2,%sp@- 42a62: 4e90 jsr %a0@ 42a64: 588f addql #4,%sp
return result;
}
42a66: 2002 movel %d2,%d0 42a68: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 42a6e: 4e5e unlk %fp 42a70: 4e75 rts
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
42a72: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 42a78: 45ee ffe8 lea %fp@(-24),%a2 42a7c: 5888 addql #4,%a0 42a7e: 4280 clrl %d0 42a80: 2498 movel %a0@+,%a2@ 42a82: 2d58 ffec movel %a0@+,%fp@(-20) 42a86: 2d58 fff0 movel %a0@+,%fp@(-16) 42a8a: 2d58 fff4 movel %a0@+,%fp@(-12) 42a8e: 2d50 fff8 movel %a0@,%fp@(-8)
if ( !temp_loc.ops->evalformake_h ) {
42a92: 206e fff4 moveal %fp@(-12),%a0 42a96: 2068 0004 moveal %a0@(4),%a0 42a9a: 4a88 tstl %a0 42a9c: 6600 ff76 bnew 42a14 <mknod+0x6c>
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
42aa0: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 42aa6: 74ff moveq #-1,%d2 <== NOT EXECUTED 42aa8: 2040 moveal %d0,%a0 <== NOT EXECUTED 42aaa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
42ab0: 2002 movel %d2,%d0 <== NOT EXECUTED 42ab2: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 <== NOT EXECUTED 42ab8: 4e5e unlk %fp <== NOT EXECUTED 42aba: 4e75 rts <== NOT EXECUTED
result = (*temp_loc.ops->evalformake_h)(
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
42abc: 74ff moveq #-1,%d2
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
42abe: 2002 movel %d2,%d0 42ac0: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 42ac6: 4e5e unlk %fp 42ac8: 4e75 rts
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
42aca: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 42ad0: 74ff moveq #-1,%d2 <== NOT EXECUTED 42ad2: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ad4: 7016 moveq #22,%d0 <== NOT EXECUTED 42ad6: 2080 movel %d0,%a0@ <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
42ad8: 2002 movel %d2,%d0 <== NOT EXECUTED 42ada: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 <== NOT EXECUTED 42ae0: 4e5e unlk %fp <== NOT EXECUTED 42ae2: 4e75 rts <== NOT EXECUTED
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
42ae4: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 42ae8: 4a88 tstl %a0 <== NOT EXECUTED 42aea: 67b4 beqs 42aa0 <mknod+0xf8> <== NOT EXECUTED 42aec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
42aee: 74ff moveq #-1,%d2 <== NOT EXECUTED
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
42af0: 4e90 jsr %a0@ <== NOT EXECUTED 42af2: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
42af4: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 42afa: 2040 moveal %d0,%a0 <== NOT EXECUTED 42afc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42b02: 60ac bras 42ab0 <mknod+0x108> <== NOT EXECUTED
00042b26 <mount>:
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
42b26: 4e56 ffd0 linkw %fp,#-48 42b2a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 42b2e: 286e 0008 moveal %fp@(8),%a4 42b32: 266e 000c moveal %fp@(12),%a3 42b36: 282e 0010 movel %fp@(16),%d4 42b3a: 242e 0014 movel %fp@(20),%d2 42b3e: 262e 0018 movel %fp@(24),%d3
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
42b42: 4a8b tstl %a3 42b44: 6700 01d2 beqw 42d18 <mount+0x1f2>
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
42b48: 7001 moveq #1,%d0 42b4a: b084 cmpl %d4,%d0 42b4c: 6500 01ca bcsw 42d18 <mount+0x1f2>
errno = EINVAL;
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
42b50: 4aab 0024 tstl %a3@(36) 42b54: 6700 01f4 beqw 42d4a <mount+0x224>
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
42b58: 4a82 tstl %d2 42b5a: 6700 0188 beqw 42ce4 <mount+0x1be>
size += strlen( device ) + 1;
42b5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42b60: 4eb9 0004 ec34 jsr 4ec34 <strlen> <== NOT EXECUTED 42b66: 588f addql #4,%sp <== NOT EXECUTED 42b68: 0680 0000 006d addil #109,%d0 <== NOT EXECUTED
temp_mt_entry = malloc( size );
42b6e: 2f00 movel %d0,%sp@- 42b70: 4eb9 0004 aaf4 jsr 4aaf4 <malloc>
if ( !temp_mt_entry ) {
42b76: 588f addql #4,%sp
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
size += strlen( device ) + 1;
temp_mt_entry = malloc( size );
42b78: 2440 moveal %d0,%a2 42b7a: 2a00 movel %d0,%d5
if ( !temp_mt_entry ) {
42b7c: 6700 020e beqw 42d8c <mount+0x266>
errno = ENOMEM;
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
42b80: 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;
42b84: 2540 002c movel %d0,%a2@(44)
temp_mt_entry->options = options;
if ( device ) {
42b88: 4a82 tstl %d2 42b8a: 6700 0150 beqw 42cdc <mount+0x1b6>
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
42b8e: 2f02 movel %d2,%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 );
42b90: 0680 0000 006c addil #108,%d0 <== NOT EXECUTED
strcpy( temp_mt_entry->dev, device );
42b96: 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 =
42b98: 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 );
42b9c: 4eb9 0004 e7e8 jsr 4e7e8 <strcpy> <== NOT EXECUTED 42ba2: 508f addql #8,%sp <== NOT EXECUTED
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
42ba4: 4a83 tstl %d3 42ba6: 6700 0114 beqw 42cbc <mount+0x196>
if ( rtems_filesystem_evaluate_path(
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
42baa: 2f03 movel %d3,%sp@-
* permissions in the existing tree.
*/
if ( mount_point ) {
if ( rtems_filesystem_evaluate_path(
42bac: 7801 moveq #1,%d4 42bae: 240e movel %fp,%d2 42bb0: 0682 ffff ffec addil #-20,%d2
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
42bb6: 4eb9 0004 ec34 jsr 4ec34 <strlen>
* permissions in the existing tree.
*/
if ( mount_point ) {
if ( rtems_filesystem_evaluate_path(
42bbc: 2e84 movel %d4,%sp@ 42bbe: 2f02 movel %d2,%sp@- 42bc0: 4878 0007 pea 7 <TRUNCDFSF> 42bc4: 2f00 movel %d0,%sp@- 42bc6: 2f03 movel %d3,%sp@- 42bc8: 4eb9 0004 2720 jsr 42720 <rtems_filesystem_evaluate_path> 42bce: 4fef 0014 lea %sp@(20),%sp 42bd2: 72ff moveq #-1,%d1 42bd4: b280 cmpl %d0,%d1 42bd6: 6700 0182 beqw 42d5a <mount+0x234>
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
42bda: 206e fff8 moveal %fp@(-8),%a0 42bde: 2068 0010 moveal %a0@(16),%a0 42be2: 4a88 tstl %a0 42be4: 6700 018a beqw 42d70 <mount+0x24a>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
42be8: 2f02 movel %d2,%sp@- 42bea: 4e90 jsr %a0@ 42bec: 588f addql #4,%sp 42bee: 7201 moveq #1,%d1 42bf0: b280 cmpl %d0,%d1 42bf2: 6600 013c bnew 42d30 <mount+0x20a>
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
42bf6: 2079 0005 d8a4 moveal 5d8a4 <rtems_filesystem_mount_table_control>,%a0 42bfc: b1fc 0005 d8a8 cmpal #383144,%a0
42c02: 6758 beqs 42c5c <mount+0x136> <== NEVER TAKEN
!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 )
42c04: 222e ffec movel %fp@(-20),%d1 42c08: b2a8 001c cmpl %a0@(28),%d1
42c0c: 6710 beqs 42c1e <mount+0xf8> <== NEVER TAKEN
* 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 ) {
42c0e: 2050 moveal %a0@,%a0
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
42c10: b1fc 0005 d8a8 cmpal #383144,%a0
42c16: 6748 beqs 42c60 <mount+0x13a>
!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 )
42c18: b2a8 001c cmpl %a0@(28),%d1
42c1c: 66f0 bnes 42c0e <mount+0xe8>
/*
* You can only mount one file system onto a single mount point.
*/
if ( Is_node_fs_root( &loc ) ){
errno = EBUSY;
42c1e: 4eb9 0004 d868 jsr 4d868 <__errno> 42c24: 2240 moveal %d0,%a1 42c26: 7010 moveq #16,%d0 42c28: 2280 movel %d0,%a1@
return 0;
cleanup_and_bail:
free( temp_mt_entry );
42c2a: 2f0a movel %a2,%sp@- 42c2c: 4eb9 0004 a584 jsr 4a584 <free> 42c32: 588f addql #4,%sp
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
42c34: 2242 moveal %d2,%a1 42c36: 2069 000c moveal %a1@(12),%a0 42c3a: 4a88 tstl %a0 42c3c: 6700 00ce beqw 42d0c <mount+0x1e6> 42c40: 2028 001c movel %a0@(28),%d0 42c44: 6700 00c6 beqw 42d0c <mount+0x1e6> 42c48: 2f02 movel %d2,%sp@- 42c4a: 2040 moveal %d0,%a0 42c4c: 4e90 jsr %a0@ 42c4e: 588f addql #4,%sp 42c50: 70ff moveq #-1,%d0
return -1;
}
42c52: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 42c58: 4e5e unlk %fp 42c5a: 4e75 rts
cleanup_and_bail:
free( temp_mt_entry );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
42c5c: 222e ffec movel %fp@(-20),%d1 <== NOT EXECUTED
* 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;
42c60: 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;
42c64: 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;
42c6a: 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 ){
42c70: 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;
42c74: 2541 0008 movel %d1,%a2@(8)
temp_mt_entry->mt_point_node.handlers = loc.handlers;
temp_mt_entry->mt_point_node.ops = loc.ops;
42c78: 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 ){
42c7c: 4a88 tstl %a0 42c7e: 6700 00f0 beqw 42d70 <mount+0x24a>
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
42c82: 2f0a movel %a2,%sp@- 42c84: 4e90 jsr %a0@ 42c86: 588f addql #4,%sp 42c88: 4a80 tstl %d0
42c8a: 669e bnes 42c2a <mount+0x104> <== NEVER TAKEN
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;
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
42c8c: 2f0a movel %a2,%sp@- 42c8e: 206b 0024 moveal %a3@(36),%a0 42c92: 4e90 jsr %a0@ 42c94: 588f addql #4,%sp 42c96: 4a80 tstl %d0
42c98: 6650 bnes 42cea <mount+0x1c4> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
42c9a: 2f0a movel %a2,%sp@- 42c9c: 4879 0005 d8a4 pea 5d8a4 <rtems_filesystem_mount_table_control> 42ca2: 4eb9 0004 673c jsr 4673c <_Chain_Append>
*/
rtems_chain_append( &rtems_filesystem_mount_table_control,
&temp_mt_entry->Node );
if ( mt_entry )
42ca8: 508f addql #8,%sp 42caa: 4a8c tstl %a4
42cac: 6702 beqs 42cb0 <mount+0x18a> <== NEVER TAKEN
*mt_entry = temp_mt_entry;
42cae: 288a movel %a2,%a4@ 42cb0: 4280 clrl %d0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
42cb2: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 42cb8: 4e5e unlk %fp 42cba: 4e75 rts
* 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;
42cbc: 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;
42cc0: 4282 clrl %d2
* 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;
42cc2: 42aa 0024 clrl %a2@(36)
temp_mt_entry->mt_fs_root.ops = NULL;
42cc6: 42aa 0028 clrl %a2@(40)
temp_mt_entry->mt_point_node.node_access = NULL;
42cca: 42aa 0008 clrl %a2@(8)
temp_mt_entry->mt_point_node.handlers = NULL;
42cce: 42aa 0010 clrl %a2@(16)
temp_mt_entry->mt_point_node.ops = NULL;
42cd2: 42aa 0014 clrl %a2@(20)
temp_mt_entry->mt_point_node.mt_entry = NULL;
42cd6: 42aa 0018 clrl %a2@(24) 42cda: 60b0 bras 42c8c <mount+0x166>
if ( device ) {
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
} else
temp_mt_entry->dev = 0;
42cdc: 42aa 0068 clrl %a2@(104) 42ce0: 6000 fec2 braw 42ba4 <mount+0x7e>
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
42ce4: 706c moveq #108,%d0 42ce6: 6000 fe86 braw 42b6e <mount+0x48>
temp_mt_entry->mt_point_node.mt_entry = NULL;
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
/* try to undo the mount operation */
if ( loc.ops->unmount_h ) {
42cea: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42cee: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 42cf2: 4a88 tstl %a0 <== NOT EXECUTED 42cf4: 6706 beqs 42cfc <mount+0x1d6> <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
42cf6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cf8: 4e90 jsr %a0@ <== NOT EXECUTED 42cfa: 588f addql #4,%sp <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
42cfc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cfe: 4eb9 0004 a584 jsr 4a584 <free> <== NOT EXECUTED
if ( loc_to_free )
42d04: 588f addql #4,%sp <== NOT EXECUTED 42d06: 4a82 tstl %d2 <== NOT EXECUTED 42d08: 6600 ff2a bnew 42c34 <mount+0x10e> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
42d0c: 70ff moveq #-1,%d0 <== NOT EXECUTED
return -1;
}
42d0e: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42d14: 4e5e unlk %fp <== NOT EXECUTED 42d16: 4e75 rts <== NOT EXECUTED
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
42d18: 4eb9 0004 d868 jsr 4d868 <__errno> 42d1e: 7216 moveq #22,%d1 42d20: 2040 moveal %d0,%a0 42d22: 70ff moveq #-1,%d0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
42d24: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
42d2a: 2081 movel %d1,%a0@
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
42d2c: 4e5e unlk %fp 42d2e: 4e75 rts
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
42d30: 4eb9 0004 d868 jsr 4d868 <__errno> 42d36: 7214 moveq #20,%d1 42d38: 2040 moveal %d0,%a0 42d3a: 2081 movel %d1,%a0@
return 0;
cleanup_and_bail:
free( temp_mt_entry );
42d3c: 2f0a movel %a2,%sp@- 42d3e: 4eb9 0004 a584 jsr 4a584 <free> 42d44: 588f addql #4,%sp 42d46: 6000 feec braw 42c34 <mount+0x10e>
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
errno = ENOTSUP;
42d4a: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 42d50: 4285 clrl %d5 <== NOT EXECUTED 42d52: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d54: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
42d5a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 42d5c: 4eb9 0004 a584 jsr 4a584 <free> <== NOT EXECUTED 42d62: 588f addql #4,%sp <== NOT EXECUTED 42d64: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
42d66: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42d6c: 4e5e unlk %fp <== NOT EXECUTED 42d6e: 4e75 rts <== NOT EXECUTED
* 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;
42d70: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 42d76: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d78: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
42d7e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42d80: 4eb9 0004 a584 jsr 4a584 <free> <== NOT EXECUTED 42d86: 588f addql #4,%sp <== NOT EXECUTED 42d88: 6000 feaa braw 42c34 <mount+0x10e> <== NOT EXECUTED
if ( device )
size += strlen( device ) + 1;
temp_mt_entry = malloc( size );
if ( !temp_mt_entry ) {
errno = ENOMEM;
42d8c: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 42d92: 7a0c moveq #12,%d5 <== NOT EXECUTED 42d94: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d96: 70ff moveq #-1,%d0 <== NOT EXECUTED 42d98: 2085 movel %d5,%a0@ <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
42d9a: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42da0: 4e5e unlk %fp <== NOT EXECUTED
00042e30 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
42e30: 4e56 fff4 linkw %fp,#-12 42e34: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42e38: 262e 0008 movel %fp@(8),%d3 42e3c: 246e 000c moveal %fp@(12),%a2
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
42e40: b5c3 cmpal %d3,%a2
42e42: 674c beqs 42e90 <newlib_delete_hook+0x60>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
42e44: 242a 0104 movel %a2@(260),%d2
}
if (ptr && ptr != _global_impure_ptr) {
42e48: 4a82 tstl %d2
42e4a: 6722 beqs 42e6e <newlib_delete_hook+0x3e> <== NEVER TAKEN
42e4c: b4b9 0005 b9e2 cmpl 5b9e2 <_global_impure_ptr>,%d2
42e52: 671a beqs 42e6e <newlib_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
42e54: 4879 0004 2e98 pea 42e98 <newlib_free_buffers> 42e5a: 2f02 movel %d2,%sp@- 42e5c: 4eb9 0004 e00e jsr 4e00e <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
42e62: 2f02 movel %d2,%sp@- 42e64: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 42e6a: 4fef 000c lea %sp@(12),%sp
#endif
}
deleted_task->libc_reent = NULL;
42e6e: 42aa 0104 clrl %a2@(260)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
42e72: b5c3 cmpal %d3,%a2
42e74: 670a beqs 42e80 <newlib_delete_hook+0x50>
_REENT = 0;
}
}
42e76: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 42e7c: 4e5e unlk %fp 42e7e: 4e75 rts
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
42e80: 42b9 0005 c37c clrl 5c37c <_impure_ptr>
} }
42e86: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 42e8c: 4e5e unlk %fp 42e8e: 4e75 rts
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
42e90: 2439 0005 c37c movel 5c37c <_impure_ptr>,%d2 42e96: 60b0 bras 42e48 <newlib_delete_hook+0x18>
00042e98 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
42e98: 4e56 0000 linkw %fp,#0 42e9c: 2f0a movel %a2,%sp@- 42e9e: 246e 0008 moveal %fp@(8),%a2
switch ( fileno(fp) ) {
42ea2: 2f0a movel %a2,%sp@- 42ea4: 4eb9 0004 dbfc jsr 4dbfc <fileno> 42eaa: 588f addql #4,%sp 42eac: 7202 moveq #2,%d1 42eae: b280 cmpl %d0,%d1
42eb0: 6414 bccs 42ec6 <newlib_free_buffers+0x2e> <== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
42eb2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42eb4: 4eb9 0004 d9a6 jsr 4d9a6 <fclose> <== NOT EXECUTED 42eba: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
42ebc: 246e fffc moveal %fp@(-4),%a2 42ec0: 4280 clrl %d0 42ec2: 4e5e unlk %fp 42ec4: 4e75 rts
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
42ec6: 302a 000c movew %a2@(12),%d0 42eca: 48c0 extl %d0 42ecc: 4a00 tstb %d0
42ece: 6cec bges 42ebc <newlib_free_buffers+0x24> <== ALWAYS TAKEN
free( fp->_bf._base );
42ed0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42ed4: 4eb9 0004 a584 jsr 4a584 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
42eda: 588f addql #4,%sp <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
42edc: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
42ee0: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
42ee4: 0880 0007 bclr #7,%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
42ee8: 4292 clrl %a2@ <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
42eea: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
42eee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 42ef2: 4280 clrl %d0 <== NOT EXECUTED 42ef4: 4e5e unlk %fp <== NOT EXECUTED
0004333c <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
4333c: 4e56 0000 linkw %fp,#0 43340: 2f02 movel %d2,%sp@- 43342: 242e 0008 movel %fp@(8),%d2
rtems_device_driver status;
if ( !initialized ) {
43346: 4a39 0005 eb20 tstb 5eb20 <initialized>
4334c: 670a beqs 43358 <null_initialize+0x1c>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
4334e: 242e fffc movel %fp@(-4),%d2 43352: 4280 clrl %d0 43354: 4e5e unlk %fp 43356: 4e75 rts
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
status = rtems_io_register_name(
43358: 42a7 clrl %sp@-
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
4335a: 7001 moveq #1,%d0 4335c: 13c0 0005 eb20 moveb %d0,5eb20 <initialized>
status = rtems_io_register_name(
43362: 2f02 movel %d2,%sp@- 43364: 4879 0005 c8c4 pea 5c8c4 <IntUartPollCallbacks.6560+0x20> 4336a: 4eb9 0004 3492 jsr 43492 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
43370: 4fef 000c lea %sp@(12),%sp 43374: 4a80 tstl %d0
43376: 6610 bnes 43388 <null_initialize+0x4c> <== NEVER TAKEN
rtems_fatal_error_occurred(status);
NULL_major = major;
43378: 23c2 0005 f344 movel %d2,5f344 <NULL_major>
}
return RTEMS_SUCCESSFUL;
}
4337e: 242e fffc movel %fp@(-4),%d2 43382: 4280 clrl %d0 43384: 4e5e unlk %fp 43386: 4e75 rts
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
43388: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4338a: 4eb9 0004 76dc jsr 476dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004331a <null_write>:
rtems_device_driver null_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void *pargp
)
{
4331a: 4e56 0000 linkw %fp,#0 4331e: 206e 0010 moveal %fp@(16),%a0
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
43322: 4a88 tstl %a0
43324: 6706 beqs 4332c <null_write+0x12> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
43326: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
4332c: 4280 clrl %d0
4332e: 4e5e unlk %fp <== NOT EXECUTED
00043124 <open>:
int open(
const char *pathname,
int flags,
...
)
{
43124: 4e56 ffcc linkw %fp,#-52 43128: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4312c: 242e 000c movel %fp@(12),%d2
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
43130: 2002 movel %d2,%d0 43132: 5280 addql #1,%d0
int open(
const char *pathname,
int flags,
...
)
{
43134: 282e 0008 movel %fp@(8),%d4
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
43138: 0800 0000 btst #0,%d0 4313c: 6600 00dc bnew 4321a <open+0xf6> 43140: 4283 clrl %d3
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
43142: 0800 0001 btst #1,%d0
43146: 6704 beqs 4314c <open+0x28>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
43148: 7002 moveq #2,%d0 4314a: 8680 orl %d0,%d3
va_start(ap, flags);
mode = va_arg( ap, int );
4314c: 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();
43150: 4eb9 0004 a960 jsr 4a960 <rtems_libio_allocate> 43156: 2440 moveal %d0,%a2
if ( iop == 0 ) {
43158: 4a80 tstl %d0 4315a: 6700 00c4 beqw 43220 <open+0xfc>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
4315e: 2f04 movel %d4,%sp@- 43160: 4bf9 0004 ec34 lea 4ec34 <strlen>,%a5 43166: 4e95 jsr %a5@
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
43168: 47ee ffec lea %fp@(-20),%a3 4316c: 7201 moveq #1,%d1 4316e: 49f9 0004 2720 lea 42720 <rtems_filesystem_evaluate_path>,%a4 43174: 2e81 movel %d1,%sp@ 43176: 2f0b movel %a3,%sp@- 43178: 2f03 movel %d3,%sp@- 4317a: 2f00 movel %d0,%sp@- 4317c: 2f04 movel %d4,%sp@- 4317e: 4e94 jsr %a4@
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
43180: 4fef 0014 lea %sp@(20),%sp 43184: 72ff moveq #-1,%d1 43186: b280 cmpl %d0,%d1 43188: 6700 016c beqw 432f6 <open+0x1d2>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
4318c: 2002 movel %d2,%d0 4318e: 0280 0000 0a00 andil #2560,%d0 43194: 0c80 0000 0a00 cmpil #2560,%d0 4319a: 6700 00a0 beqw 4323c <open+0x118>
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
4319e: 262a 0014 movel %a2@(20),%d3
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
431a2: 256e fff4 003c movel %fp@(-12),%a2@(60)
iop->file_info = loc.node_access;
431a8: 256e ffec 0038 movel %fp@(-20),%a2@(56)
iop->flags |= rtems_libio_fcntl_flags( flags );
431ae: 2f02 movel %d2,%sp@- 431b0: 4eb9 0004 aa18 jsr 4aa18 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
431b6: 2553 0018 movel %a3@,%a2@(24)
if ( !iop->handlers || !iop->handlers->open_h ) {
431ba: 588f addql #4,%sp
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
431bc: 256e fff0 001c movel %fp@(-16),%a2@(28) 431c2: 256e fff4 0020 movel %fp@(-12),%a2@(32) 431c8: 256e fff8 0024 movel %fp@(-8),%a2@(36)
if ( !iop->handlers || !iop->handlers->open_h ) {
431ce: 206a 003c moveal %a2@(60),%a0
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
431d2: 8083 orl %d3,%d0
iop->pathinfo = loc;
431d4: 256e fffc 0028 movel %fp@(-4),%a2@(40)
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
431da: 2540 0014 movel %d0,%a2@(20)
iop->pathinfo = loc;
if ( !iop->handlers || !iop->handlers->open_h ) {
431de: 4a88 tstl %a0 431e0: 6700 0104 beqw 432e6 <open+0x1c2> 431e4: 2050 moveal %a0@,%a0 431e6: 4a88 tstl %a0 431e8: 6700 00fc beqw 432e6 <open+0x1c2>
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
431ec: 2f05 movel %d5,%sp@- 431ee: 2f02 movel %d2,%sp@- 431f0: 2f04 movel %d4,%sp@- 431f2: 2f0a movel %a2,%sp@- 431f4: 4e90 jsr %a0@
if ( rc ) {
431f6: 4fef 0010 lea %sp@(16),%sp 431fa: 4a80 tstl %d0
431fc: 667a bnes 43278 <open+0x154>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
431fe: 0802 000a btst #10,%d2 43202: 6600 0092 bnew 43296 <open+0x172>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43206: 200a movel %a2,%d0 43208: 90b9 0005 d86c subl 5d86c <rtems_libio_iops>,%d0 4320e: ec80 asrl #6,%d0
}
43210: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43216: 4e5e unlk %fp 43218: 4e75 rts
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
4321a: 7604 moveq #4,%d3 4321c: 6000 ff24 braw 43142 <open+0x1e>
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
43220: 7417 moveq #23,%d2 43222: 263c 0004 d868 movel #317544,%d3
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
43228: 2043 moveal %d3,%a0 4322a: 4e90 jsr %a0@ 4322c: 2040 moveal %d0,%a0 4322e: 70ff moveq #-1,%d0 43230: 2082 movel %d2,%a0@
}
return iop - rtems_libio_iops;
}
43232: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43238: 4e5e unlk %fp 4323a: 4e75 rts
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
4323c: 7411 moveq #17,%d2 4323e: 263c 0004 d868 movel #317544,%d3
done:
va_end(ap);
if ( rc ) {
if ( iop )
43244: 4a8a tstl %a2
43246: 670a beqs 43252 <open+0x12e> <== NEVER TAKEN
rtems_libio_free( iop );
43248: 2f0a movel %a2,%sp@- 4324a: 4eb9 0004 a8d2 jsr 4a8d2 <rtems_libio_free> 43250: 588f addql #4,%sp
if ( loc_to_free )
43252: 4a8b tstl %a3
43254: 67d2 beqs 43228 <open+0x104>
rtems_filesystem_freenode( loc_to_free );
43256: 206b 000c moveal %a3@(12),%a0 4325a: 4a88 tstl %a0
4325c: 67ca beqs 43228 <open+0x104> <== NEVER TAKEN
4325e: 2068 001c moveal %a0@(28),%a0 43262: 4a88 tstl %a0
43264: 67c2 beqs 43228 <open+0x104> <== NEVER TAKEN
43266: 2f0b movel %a3,%sp@- 43268: 4e90 jsr %a0@ 4326a: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( rc );
4326c: 2043 moveal %d3,%a0 4326e: 4e90 jsr %a0@ 43270: 2040 moveal %d0,%a0 43272: 70ff moveq #-1,%d0 43274: 2082 movel %d2,%a0@ 43276: 60ba bras 43232 <open+0x10e>
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
43278: 263c 0004 d868 movel #317544,%d3 4327e: 2043 moveal %d3,%a0 43280: 4e90 jsr %a0@ 43282: 2040 moveal %d0,%a0 43284: 2410 movel %a0@,%d2
*/
done:
va_end(ap);
if ( rc ) {
43286: 66bc bnes 43244 <open+0x120> <== ALWAYS TAKEN
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43288: 200a movel %a2,%d0 <== NOT EXECUTED 4328a: 90b9 0005 d86c subl 5d86c <rtems_libio_iops>,%d0 <== NOT EXECUTED 43290: ec80 asrl #6,%d0 <== NOT EXECUTED 43292: 6000 ff7c braw 43210 <open+0xec> <== NOT EXECUTED
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
43296: 200a movel %a2,%d0 43298: 90b9 0005 d86c subl 5d86c <rtems_libio_iops>,%d0 4329e: ec80 asrl #6,%d0 432a0: 42a7 clrl %sp@- 432a2: 42a7 clrl %sp@- 432a4: 2f00 movel %d0,%sp@- 432a6: 4eb9 0004 a614 jsr 4a614 <ftruncate>
if ( rc ) {
432ac: 4fef 000c lea %sp@(12),%sp
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
432b0: 2400 movel %d0,%d2
if ( rc ) {
432b2: 6700 ff52 beqw 43206 <open+0xe2>
if(errno) rc = errno;
432b6: 263c 0004 d868 movel #317544,%d3 <== NOT EXECUTED 432bc: 2043 moveal %d3,%a0 <== NOT EXECUTED 432be: 4e90 jsr %a0@ <== NOT EXECUTED 432c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 432c2: 4a90 tstl %a0@ <== NOT EXECUTED 432c4: 6662 bnes 43328 <open+0x204> <== NOT EXECUTED
close( iop - rtems_libio_iops );
432c6: 200a movel %a2,%d0 <== NOT EXECUTED 432c8: 90b9 0005 d86c subl 5d86c <rtems_libio_iops>,%d0 <== NOT EXECUTED 432ce: 97cb subal %a3,%a3 <== NOT EXECUTED 432d0: ec80 asrl #6,%d0 <== NOT EXECUTED 432d2: 95ca subal %a2,%a2 <== NOT EXECUTED 432d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432d6: 4eb9 0004 a4e4 jsr 4a4e4 <close> <== NOT EXECUTED 432dc: 588f addql #4,%sp <== NOT EXECUTED
*/
done:
va_end(ap);
if ( rc ) {
432de: 4a82 tstl %d2 <== NOT EXECUTED 432e0: 67a6 beqs 43288 <open+0x164> <== NOT EXECUTED 432e2: 6000 ff60 braw 43244 <open+0x120> <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
432e6: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 432ec: 263c 0004 d868 movel #317544,%d3 <== NOT EXECUTED 432f2: 6000 ff50 braw 43244 <open+0x120> <== NOT EXECUTED
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
432f6: 263c 0004 d868 movel #317544,%d3 432fc: 2043 moveal %d3,%a0 432fe: 4e90 jsr %a0@ 43300: 7202 moveq #2,%d1 43302: 2040 moveal %d0,%a0 43304: b290 cmpl %a0@,%d1
43306: 6712 beqs 4331a <open+0x1f6>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
43308: 2043 moveal %d3,%a0 4330a: 97cb subal %a3,%a3 4330c: 4e90 jsr %a0@ 4330e: 2040 moveal %d0,%a0 43310: 2410 movel %a0@,%d2
*/
done:
va_end(ap);
if ( rc ) {
43312: 6700 ff74 beqw 43288 <open+0x164> 43316: 6000 ff2c braw 43244 <open+0x120>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
4331a: 0802 0009 btst #9,%d2
4331e: 662a bnes 4334a <open+0x226>
43320: 97cb subal %a3,%a3 43322: 7402 moveq #2,%d2 43324: 6000 ff1e braw 43244 <open+0x120>
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43328: 2043 moveal %d3,%a0 <== NOT EXECUTED
close( iop - rtems_libio_iops );
4332a: 97cb subal %a3,%a3 <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
4332c: 4e90 jsr %a0@ <== NOT EXECUTED 4332e: 2040 moveal %d0,%a0 <== NOT EXECUTED
close( iop - rtems_libio_iops );
43330: 200a movel %a2,%d0 <== NOT EXECUTED 43332: 90b9 0005 d86c subl 5d86c <rtems_libio_iops>,%d0 <== NOT EXECUTED 43338: 95ca subal %a2,%a2 <== NOT EXECUTED 4333a: ec80 asrl #6,%d0 <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
4333c: 2410 movel %a0@,%d2 <== NOT EXECUTED
close( iop - rtems_libio_iops );
4333e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43340: 4eb9 0004 a4e4 jsr 4a4e4 <close> <== NOT EXECUTED 43346: 588f addql #4,%sp <== NOT EXECUTED 43348: 6094 bras 432de <open+0x1ba> <== NOT EXECUTED
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
4334a: 42a7 clrl %sp@- 4334c: 2005 movel %d5,%d0 4334e: 42a7 clrl %sp@- 43350: 08c0 000f bset #15,%d0 43354: 2f00 movel %d0,%sp@- 43356: 2f04 movel %d4,%sp@- 43358: 4eb9 0004 29a8 jsr 429a8 <mknod>
if ( rc ) {
4335e: 4fef 0010 lea %sp@(16),%sp 43362: 4a80 tstl %d0
43364: 66a2 bnes 43308 <open+0x1e4> <== NEVER TAKEN
rc = errno;
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 );
43366: 2f04 movel %d4,%sp@- 43368: 4e95 jsr %a5@ 4336a: 7201 moveq #1,%d1 4336c: 2e81 movel %d1,%sp@ 4336e: 2f0b movel %a3,%sp@- 43370: 42a7 clrl %sp@- 43372: 2f00 movel %d0,%sp@- 43374: 2f04 movel %d4,%sp@- 43376: 4e94 jsr %a4@
if ( status != 0 ) { /* The file did not exist */
43378: 4fef 0014 lea %sp@(20),%sp 4337c: 4a80 tstl %d0 4337e: 6700 fe1e beqw 4319e <open+0x7a>
43382: 97cb subal %a3,%a3 <== NOT EXECUTED 43384: 740d moveq #13,%d2 <== NOT EXECUTED 43386: 6000 febc braw 43244 <open+0x120> <== NOT EXECUTED
000430b0 <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
430b0: 4e56 0000 linkw %fp,#0 430b4: 2f0a movel %a2,%sp@-
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
430b6: 45f9 0004 3124 lea 43124 <open>,%a2 430bc: 42a7 clrl %sp@- 430be: 42a7 clrl %sp@- 430c0: 4879 0005 adec pea 5adec <CSWTCH.59+0x100> 430c6: 4e92 jsr %a2@ 430c8: 4fef 000c lea %sp@(12),%sp 430cc: 72ff moveq #-1,%d1 430ce: b280 cmpl %d0,%d1
430d0: 6730 beqs 43102 <open_dev_console+0x52>
/*
* 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)
430d2: 42a7 clrl %sp@- 430d4: 4878 0001 pea 1 <ADD> 430d8: 4879 0005 adec pea 5adec <CSWTCH.59+0x100> 430de: 4e92 jsr %a2@ 430e0: 4fef 000c lea %sp@(12),%sp 430e4: 72ff moveq #-1,%d1 430e6: b280 cmpl %d0,%d1
430e8: 672c beqs 43116 <open_dev_console+0x66> <== NEVER TAKEN
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
430ea: 42a7 clrl %sp@- 430ec: 4878 0001 pea 1 <ADD> 430f0: 4879 0005 adec pea 5adec <CSWTCH.59+0x100> 430f6: 4e92 jsr %a2@ 430f8: 4fef 000c lea %sp@(12),%sp 430fc: 72ff moveq #-1,%d1 430fe: b280 cmpl %d0,%d1
43100: 6708 beqs 4310a <open_dev_console+0x5a> <== NEVER TAKEN
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
}
43102: 246e fffc moveal %fp@(-4),%a2 43106: 4e5e unlk %fp 43108: 4e75 rts
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
4310a: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 43110: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
43116: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 4311c: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
00043bec <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
43bec: 4e56 fff0 linkw %fp,#-16 43bf0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43bf4: 246e 000c moveal %fp@(12),%a2 43bf8: 47f9 0004 3ac4 lea 43ac4 <rtems_termios_puts>,%a3 43bfe: 202e 0008 movel %fp@(8),%d0
int i;
if (tty->termios.c_oflag & OPOST) {
43c02: 222a 0034 movel %a2@(52),%d1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
43c06: 1d40 fffe moveb %d0,%fp@(-2)
int i;
if (tty->termios.c_oflag & OPOST) {
43c0a: 0801 0000 btst #0,%d1
43c0e: 6744 beqs 43c54 <oproc+0x68> <== NEVER TAKEN
switch (c) {
43c10: 7409 moveq #9,%d2 43c12: 0280 0000 00ff andil #255,%d0 43c18: b480 cmpl %d0,%d2 43c1a: 6700 00f8 beqw 43d14 <oproc+0x128>
43c1e: 644e bccs 43c6e <oproc+0x82> <== NEVER TAKEN
43c20: 740a moveq #10,%d2 43c22: b480 cmpl %d0,%d2
43c24: 6774 beqs 43c9a <oproc+0xae>
43c26: 143c 000d moveb #13,%d2 43c2a: b480 cmpl %d0,%d2 43c2c: 6700 00a8 beqw 43cd6 <oproc+0xea>
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
43c30: 0801 0001 btst #1,%d1 43c34: 6600 011a bnew 43d50 <oproc+0x164> 43c38: 2079 0005 c378 moveal 5c378 <__ctype_ptr__>,%a0 43c3e: 47f9 0004 3ac4 lea 43ac4 <rtems_termios_puts>,%a3
c = toupper(c); if (!iscntrl(c))
43c44: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 43c48: 49c0 extbl %d0 43c4a: 0800 0005 btst #5,%d0
43c4e: 6604 bnes 43c54 <oproc+0x68> <== NEVER TAKEN
tty->column++;
43c50: 52aa 0028 addql #1,%a2@(40)
break; } } rtems_termios_puts (&c, 1, tty);
43c54: 2f0a movel %a2,%sp@- 43c56: 4878 0001 pea 1 <ADD> 43c5a: 486e fffe pea %fp@(-2) 43c5e: 4e93 jsr %a3@ 43c60: 4fef 000c lea %sp@(12),%sp
}
43c64: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43c6a: 4e5e unlk %fp 43c6c: 4e75 rts
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
43c6e: 143c 0008 moveb #8,%d2 <== NOT EXECUTED 43c72: b480 cmpl %d0,%d2 <== NOT EXECUTED 43c74: 66ba bnes 43c30 <oproc+0x44> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
43c76: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43c7a: 47f9 0004 3ac4 lea 43ac4 <rtems_termios_puts>,%a3 <== NOT EXECUTED 43c80: 6fd2 bles 43c54 <oproc+0x68> <== NOT EXECUTED
tty->column--;
43c82: 5380 subql #1,%d0 <== NOT EXECUTED 43c84: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
43c88: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43c8a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43c8e: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43c92: 4e93 jsr %a3@ <== NOT EXECUTED 43c94: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43c98: 60ca bras 43c64 <oproc+0x78> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
43c9a: 0801 0005 btst #5,%d1
43c9e: 6704 beqs 43ca4 <oproc+0xb8> <== ALWAYS TAKEN
tty->column = 0;
43ca0: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
43ca4: 47f9 0004 3ac4 lea 43ac4 <rtems_termios_puts>,%a3
if (tty->termios.c_oflag & ONLCR) {
43caa: 44c1 movew %d1,%ccr
43cac: 66a6 bnes 43c54 <oproc+0x68> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
43cae: 2f0a movel %a2,%sp@- 43cb0: 4878 0001 pea 1 <ADD> 43cb4: 4879 0005 b300 pea 5b300 <rtems_status_assoc+0x16a> 43cba: 4e93 jsr %a3@
tty->column = 0;
43cbc: 4fef 000c lea %sp@(12),%sp 43cc0: 42aa 0028 clrl %a2@(40)
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
43cc4: 2f0a movel %a2,%sp@- 43cc6: 4878 0001 pea 1 <ADD> 43cca: 486e fffe pea %fp@(-2) 43cce: 4e93 jsr %a3@ 43cd0: 4fef 000c lea %sp@(12),%sp 43cd4: 608e bras 43c64 <oproc+0x78>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
43cd6: 0801 0004 btst #4,%d1 <== NOT EXECUTED 43cda: 6706 beqs 43ce2 <oproc+0xf6> <== NOT EXECUTED 43cdc: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 43ce0: 6782 beqs 43c64 <oproc+0x78> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
43ce2: 44c1 movew %d1,%ccr <== NOT EXECUTED 43ce4: 6a00 0090 bplw 43d76 <oproc+0x18a> <== NOT EXECUTED 43ce8: 47f9 0004 3ac4 lea 43ac4 <rtems_termios_puts>,%a3 <== NOT EXECUTED
c = '\n';
43cee: 700a moveq #10,%d0 <== NOT EXECUTED 43cf0: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
43cf4: 0801 0005 btst #5,%d1 <== NOT EXECUTED 43cf8: 6700 ff5a beqw 43c54 <oproc+0x68> <== NOT EXECUTED
tty->column = 0;
43cfc: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
43d00: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d02: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43d06: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d0a: 4e93 jsr %a3@ <== NOT EXECUTED 43d0c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d10: 6000 ff52 braw 43c64 <oproc+0x78> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
43d14: 202a 0028 movel %a2@(40),%d0 43d18: 7407 moveq #7,%d2 43d1a: 307c 0008 moveaw #8,%a0 43d1e: c480 andl %d0,%d2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
43d20: 0281 0000 1800 andil #6144,%d1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
43d26: 91c2 subal %d2,%a0
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
43d28: 0c81 0000 1800 cmpil #6144,%d1
43d2e: 6778 beqs 43da8 <oproc+0x1bc> <== ALWAYS TAKEN
tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i;
43d30: d1c0 addal %d0,%a0 <== NOT EXECUTED 43d32: 47f9 0004 3ac4 lea 43ac4 <rtems_termios_puts>,%a3 <== NOT EXECUTED 43d38: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
43d3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d3e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43d42: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d46: 4e93 jsr %a3@ <== NOT EXECUTED 43d48: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d4c: 6000 ff16 braw 43c64 <oproc+0x78> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
43d50: 2079 0005 c378 moveal 5c378 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43d56: 7403 moveq #3,%d2 <== NOT EXECUTED 43d58: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 43d5c: 49c1 extbl %d1 <== NOT EXECUTED 43d5e: c282 andl %d2,%d1 <== NOT EXECUTED 43d60: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 43d64: b481 cmpl %d1,%d2 <== NOT EXECUTED 43d66: 672c beqs 43d94 <oproc+0x1a8> <== NOT EXECUTED 43d68: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 43d6c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43d72: 6000 feca braw 43c3e <oproc+0x52> <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0;
43d76: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 43d7a: 47f9 0004 3ac4 lea 43ac4 <rtems_termios_puts>,%a3 <== NOT EXECUTED
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
43d80: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d82: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43d86: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d8a: 4e93 jsr %a3@ <== NOT EXECUTED 43d8c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d90: 6000 fed2 braw 43c64 <oproc+0x78> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
43d94: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 43d9a: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 43d9e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43da4: 6000 fe98 braw 43c3e <oproc+0x52> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
43da8: 2f0a movel %a2,%sp@-
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
43daa: d088 addl %a0,%d0 43dac: 2540 0028 movel %d0,%a2@(40)
rtems_termios_puts ( " ", i, tty);
43db0: 2f08 movel %a0,%sp@- 43db2: 4879 0005 b302 pea 5b302 <rtems_status_assoc+0x16c> 43db8: 4eb9 0004 3ac4 jsr 43ac4 <rtems_termios_puts>
return;
43dbe: 4fef 000c lea %sp@(12),%sp
tty->column++; break; } } rtems_termios_puts (&c, 1, tty); }
43dc2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
43dc8: 4e5e unlk %fp <== NOT EXECUTED
0004d354 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4d354: 4e56 ffcc linkw %fp,#-52 4d358: 48d7 3c00 moveml %a2-%a5,%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)
4d35c: 4878 0001 pea 1 <ADD> 4d360: 45ee ffdc lea %fp@(-36),%a2
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4d364: 286e 0008 moveal %fp@(8),%a4
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)
4d368: 2f0a movel %a2,%sp@- 4d36a: 4878 0007 pea 7 <TRUNCDFSF> 4d36e: 4878 0003 pea 3 <DIVIDE> 4d372: 4879 0005 b7e6 pea 5b7e6 <__FUNCTION__.5811+0x11> 4d378: 4eb9 0004 2720 jsr 42720 <rtems_filesystem_evaluate_path> 4d37e: 4fef 0014 lea %sp@(20),%sp 4d382: 4a80 tstl %d0 4d384: 6600 00e0 bnew 4d466 <pipe_create+0x112>
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
return -1;
}
else
rtems_filesystem_freenode(&loc);
4d388: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4d38c: 47f9 0004 d868 lea 4d868 <__errno>,%a3 <== NOT EXECUTED 4d392: 4a88 tstl %a0 <== NOT EXECUTED 4d394: 670e beqs 4d3a4 <pipe_create+0x50> <== NOT EXECUTED 4d396: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4d39a: 4a88 tstl %a0 <== NOT EXECUTED 4d39c: 6706 beqs 4d3a4 <pipe_create+0x50> <== NOT EXECUTED 4d39e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d3a0: 4e90 jsr %a0@ <== NOT EXECUTED 4d3a2: 588f addql #4,%sp <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d3a4: 45ee fff1 lea %fp@(-15),%a2 <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d3a8: 3039 0005 d180 movew 5d180 <rtems_pipe_no>,%d0 <== NOT EXECUTED
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d3ae: 24bc 2f74 6d70 movel #796159344,%a2@ <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d3b4: 2200 movel %d0,%d1 <== NOT EXECUTED 4d3b6: 5281 addql #1,%d1 <== NOT EXECUTED 4d3b8: 3f00 movew %d0,%sp@- <== NOT EXECUTED
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d3ba: 203c 2f2e 6669 movel #791570025,%d0 <== NOT EXECUTED 4d3c0: 2d40 fff5 movel %d0,%fp@(-11) <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d3c4: 4267 clrw %sp@- <== NOT EXECUTED 4d3c6: 33c1 0005 d180 movew %d1,5d180 <rtems_pipe_no> <== NOT EXECUTED
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d3cc: 323c 666f movew #26223,%d1 <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d3d0: 4879 0005 b7eb pea 5b7eb <__FUNCTION__.5811+0x16> <== NOT EXECUTED 4d3d6: 486e fffb pea %fp@(-5) <== NOT EXECUTED
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d3da: 3d41 fff9 movew %d1,%fp@(-7) <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d3de: 4eb9 0004 e560 jsr 4e560 <sprintf> <== NOT EXECUTED
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4d3e4: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b> <== NOT EXECUTED 4d3e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d3ea: 4eb9 0004 d584 jsr 4d584 <mkfifo> <== NOT EXECUTED 4d3f0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4d3f4: 4a80 tstl %d0 <== NOT EXECUTED 4d3f6: 6660 bnes 4d458 <pipe_create+0x104> <== 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);
4d3f8: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4d3fc: 4bf9 0004 3124 lea 43124 <open>,%a5 4d402: 2f0a movel %a2,%sp@- 4d404: 4e95 jsr %a5@
if (filsdes[0] < 0) {
4d406: 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);
4d408: 2880 movel %d0,%a4@
if (filsdes[0] < 0) {
4d40a: 6d00 00e0 bltw 4d4ec <pipe_create+0x198>
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
4d40e: b0b9 0005 c1e4 cmpl 5c1e4 <rtems_libio_number_iops>,%d0 <== NOT EXECUTED 4d414: 6400 00d0 bccw 4d4e6 <pipe_create+0x192> <== NOT EXECUTED 4d418: 2079 0005 d86c moveal 5d86c <rtems_libio_iops>,%a0 <== NOT EXECUTED 4d41e: ed88 lsll #6,%d0 <== NOT EXECUTED 4d420: d1c0 addal %d0,%a0 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4d422: 70fe moveq #-2,%d0 <== NOT EXECUTED 4d424: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
4d428: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4d42c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d42e: 4e95 jsr %a5@ <== NOT EXECUTED
if (filsdes[1] < 0) {
4d430: 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);
4d432: 2940 0004 movel %d0,%a4@(4) <== NOT EXECUTED
if (filsdes[1] < 0) {
4d436: 6d00 00ce bltw 4d506 <pipe_create+0x1b2> <== NOT EXECUTED
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4d43a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
4d43c: 9bcd subal %a5,%a5 <== NOT EXECUTED
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4d43e: 4eb9 0004 d5a4 jsr 4d5a4 <unlink> <== NOT EXECUTED 4d444: 588f addql #4,%sp <== NOT EXECUTED
}
rtems_set_errno_and_return_minus_one(err);
4d446: 4e93 jsr %a3@ <== NOT EXECUTED 4d448: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d44a: 208d movel %a5,%a0@ <== NOT EXECUTED
}
4d44c: 70ff moveq #-1,%d0 4d44e: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 4d454: 4e5e unlk %fp 4d456: 4e75 rts
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
4d458: 4e93 jsr %a3@ <== NOT EXECUTED
}
unlink(fifopath);
}
rtems_set_errno_and_return_minus_one(err);
}
4d45a: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 <== NOT EXECUTED 4d460: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d462: 4e5e unlk %fp <== NOT EXECUTED 4d464: 4e75 rts <== NOT EXECUTED
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)
!= 0) {
if (errno != ENOENT)
4d466: 47f9 0004 d868 lea 4d868 <__errno>,%a3 4d46c: 4e93 jsr %a3@ 4d46e: 7202 moveq #2,%d1 4d470: 2040 moveal %d0,%a0 4d472: b290 cmpl %a0@,%d1
4d474: 66d6 bnes 4d44c <pipe_create+0xf8> <== NEVER TAKEN
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
4d476: 4878 03ff pea 3ff <D_BIAS+0x1> 4d47a: 4879 0005 b7e6 pea 5b7e6 <__FUNCTION__.5811+0x11> 4d480: 4eb9 0004 2988 jsr 42988 <mkdir> 4d486: 508f addql #8,%sp 4d488: 4a80 tstl %d0
4d48a: 66c0 bnes 4d44c <pipe_create+0xf8> <== NEVER TAKEN
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d48c: 45ee fff1 lea %fp@(-15),%a2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d490: 3039 0005 d180 movew 5d180 <rtems_pipe_no>,%d0
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d496: 24bc 2f74 6d70 movel #796159344,%a2@
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d49c: 2200 movel %d0,%d1 4d49e: 5281 addql #1,%d1 4d4a0: 3f00 movew %d0,%sp@-
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d4a2: 203c 2f2e 6669 movel #791570025,%d0 4d4a8: 2d40 fff5 movel %d0,%fp@(-11)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d4ac: 4267 clrw %sp@- 4d4ae: 33c1 0005 d180 movew %d1,5d180 <rtems_pipe_no>
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d4b4: 323c 666f movew #26223,%d1
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d4b8: 4879 0005 b7eb pea 5b7eb <__FUNCTION__.5811+0x16> 4d4be: 486e fffb pea %fp@(-5)
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4d4c2: 3d41 fff9 movew %d1,%fp@(-7)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4d4c6: 4eb9 0004 e560 jsr 4e560 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4d4cc: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b> 4d4d0: 2f0a movel %a2,%sp@- 4d4d2: 4eb9 0004 d584 jsr 4d584 <mkfifo> 4d4d8: 4fef 0014 lea %sp@(20),%sp 4d4dc: 4a80 tstl %d0 4d4de: 6700 ff18 beqw 4d3f8 <pipe_create+0xa4>
4d4e2: 6000 ff74 braw 4d458 <pipe_create+0x104> <== NOT EXECUTED
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
4d4e6: 91c8 subal %a0,%a0 <== NOT EXECUTED 4d4e8: 6000 ff38 braw 4d422 <pipe_create+0xce> <== NOT EXECUTED
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
4d4ec: 4e93 jsr %a3@ 4d4ee: 2040 moveal %d0,%a0 4d4f0: 2a50 moveal %a0@,%a5
/* 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);
4d4f2: 2f0a movel %a2,%sp@- 4d4f4: 4eb9 0004 d5a4 jsr 4d5a4 <unlink> 4d4fa: 588f addql #4,%sp
close(filsdes[0]);
}
unlink(fifopath);
}
rtems_set_errno_and_return_minus_one(err);
4d4fc: 4e93 jsr %a3@ 4d4fe: 2040 moveal %d0,%a0 4d500: 208d movel %a5,%a0@ 4d502: 6000 ff48 braw 4d44c <pipe_create+0xf8>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
4d506: 4e93 jsr %a3@ <== NOT EXECUTED 4d508: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d50a: 2a50 moveal %a0@,%a5 <== NOT EXECUTED
close(filsdes[0]);
4d50c: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4d50e: 4eb9 0004 a4e4 jsr 4a4e4 <close> <== NOT EXECUTED 4d514: 588f addql #4,%sp <== NOT EXECUTED
}
unlink(fifopath);
4d516: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d518: 4eb9 0004 d5a4 jsr 4d5a4 <unlink> <== NOT EXECUTED 4d51e: 588f addql #4,%sp <== NOT EXECUTED 4d520: 6000 ff24 braw 4d446 <pipe_create+0xf2> <== NOT EXECUTED
0004bdbe <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4bdbe: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (cmd == FIONREAD) {
4bdc2: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED 4bdc8: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4bdcc: 6706 beqs 4bdd4 <pipe_ioctl+0x16> <== NOT EXECUTED 4bdce: 70ea moveq #-22,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4bdd0: 4e5e unlk %fp <== NOT EXECUTED 4bdd2: 4e75 rts <== NOT EXECUTED
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
4bdd4: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4bdd8: 6606 bnes 4bde0 <pipe_ioctl+0x22> <== NOT EXECUTED 4bdda: 70f2 moveq #-14,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4bddc: 4e5e unlk %fp <== NOT EXECUTED 4bdde: 4e75 rts <== NOT EXECUTED
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
4bde0: 42a7 clrl %sp@- <== NOT EXECUTED 4bde2: 42a7 clrl %sp@- <== NOT EXECUTED 4bde4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4bde8: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4bdec: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain> <== NOT EXECUTED 4bdf2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bdf6: 4a80 tstl %d0 <== NOT EXECUTED 4bdf8: 6706 beqs 4be00 <pipe_ioctl+0x42> <== NOT EXECUTED 4bdfa: 70fc moveq #-4,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4bdfc: 4e5e unlk %fp <== NOT EXECUTED 4bdfe: 4e75 rts <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(uint *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
4be00: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 4be04: 2f29 0028 movel %a1@(40),%sp@- <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(uint *)buffer = pipe->Length;
4be08: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4be0c: 20a9 000c movel %a1@(12),%a0@ <== NOT EXECUTED
PIPE_UNLOCK(pipe);
4be10: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
4be16: 588f addql #4,%sp <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(uint *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
4be18: 4280 clrl %d0 <== NOT EXECUTED
return 0;
}
return -EINVAL;
}
4be1a: 4e5e unlk %fp <== NOT EXECUTED
0004bd60 <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
4bd60: 70e3 moveq #-29,%d0 <== NOT EXECUTED
pipe_control_t *pipe,
off_t offset,
int whence,
rtems_libio_t *iop
)
{
4bd62: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* Seek on pipe is not supported */ return -ESPIPE; }
4bd66: 4e5e unlk %fp <== NOT EXECUTED
0004bffc <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4bffc: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 4c000: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4c004: 42a7 clrl %sp@- <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4c006: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4c00a: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3 <== NOT EXECUTED 4c010: 42a7 clrl %sp@- <== NOT EXECUTED 4c012: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4c016: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED 4c01a: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4c01e: 4e93 jsr %a3@ <== NOT EXECUTED 4c020: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c024: 4a80 tstl %d0 <== NOT EXECUTED 4c026: 6600 00ac bnew 4c0d4 <pipe_read+0xd8> <== NOT EXECUTED
return -EINTR;
while (read < count) {
4c02a: 4a84 tstl %d4 <== NOT EXECUTED 4c02c: 6700 01ac beqw 4c1da <pipe_read+0x1de> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
4c030: 4285 clrl %d5 <== NOT EXECUTED 4c032: 4283 clrl %d3 <== NOT EXECUTED 4c034: 49f9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
4c03a: 243c 0004 cd1c movel #314652,%d2 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4c040: 2e3c 0004 cca4 movel #314532,%d7 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4c046: 2c3c 0004 e088 movel #319624,%d6 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
4c04c: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4c050: 6600 0090 bnew 4c0e2 <pipe_read+0xe6> <== NOT EXECUTED
/* Not an error */
if (pipe->Writers == 0)
4c054: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c058: 6700 010a beqw 4c164 <pipe_read+0x168> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4c05c: 7001 moveq #1,%d0 <== NOT EXECUTED 4c05e: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4c062: 6600 0110 bnew 4c174 <pipe_read+0x178> <== NOT EXECUTED
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
4c066: 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 ++;
4c06a: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
4c06e: 4e94 jsr %a4@ <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
4c070: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c072: 42a7 clrl %sp@- <== NOT EXECUTED 4c074: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c078: 4e90 jsr %a0@ <== NOT EXECUTED 4c07a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c07e: 4a80 tstl %d0 <== NOT EXECUTED 4c080: 673c beqs 4c0be <pipe_read+0xc2> <== NOT EXECUTED 4c082: 70fc moveq #-4,%d0 <== NOT EXECUTED 4c084: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4c088: 42a7 clrl %sp@- <== NOT EXECUTED 4c08a: 42a7 clrl %sp@- <== NOT EXECUTED 4c08c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c090: 4e93 jsr %a3@ <== NOT EXECUTED 4c092: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c096: 4a80 tstl %d0 <== NOT EXECUTED 4c098: 6600 00ec bnew 4c186 <pipe_read+0x18a> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
4c09c: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED
if (ret != 0)
4c0a0: 4aae fff8 tstl %fp@(-8) <== NOT EXECUTED 4c0a4: 67a6 beqs 4c04c <pipe_read+0x50> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4c0a6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c0aa: 4e94 jsr %a4@ <== NOT EXECUTED 4c0ac: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
if (read > 0)
4c0ae: 4a83 tstl %d3 <== NOT EXECUTED 4c0b0: 6f12 bles 4c0c4 <pipe_read+0xc8> <== NOT EXECUTED
return read;
return ret;
}
4c0b2: 2003 movel %d3,%d0 <== NOT EXECUTED 4c0b4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c0ba: 4e5e unlk %fp <== NOT EXECUTED 4c0bc: 4e75 rts <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
4c0be: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 4c0c2: 60c4 bras 4c088 <pipe_read+0x8c> <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4c0c4: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED
return read;
return ret;
}
4c0c8: 2003 movel %d3,%d0 <== NOT EXECUTED 4c0ca: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c0d0: 4e5e unlk %fp <== NOT EXECUTED 4c0d2: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4c0d4: 76fc moveq #-4,%d3 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
4c0d6: 2003 movel %d3,%d0 <== NOT EXECUTED 4c0d8: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c0de: 4e5e unlk %fp <== NOT EXECUTED 4c0e0: 4e75 rts <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
4c0e2: 2004 movel %d4,%d0 <== NOT EXECUTED 4c0e4: 9085 subl %d5,%d0 <== NOT EXECUTED 4c0e6: b081 cmpl %d1,%d0 <== NOT EXECUTED 4c0e8: 6402 bccs 4c0ec <pipe_read+0xf0> <== NOT EXECUTED 4c0ea: 2200 movel %d0,%d1 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
4c0ec: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED 4c0f0: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4c0f4: 91c0 subal %d0,%a0 <== NOT EXECUTED
if (chunk > chunk1) {
4c0f6: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4c0f8: 6d00 009c bltw 4c196 <pipe_read+0x19a> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4c0fc: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4c0fe: d092 addl %a2@,%d0 <== NOT EXECUTED 4c100: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c102: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c104: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c108: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c10c: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c110: 4e91 jsr %a1@ <== NOT EXECUTED 4c112: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c116: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
pipe->Start += chunk;
4c11a: 2041 moveal %d1,%a0 <== NOT EXECUTED 4c11c: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED
pipe->Start %= pipe->Size;
4c120: 2008 movel %a0,%d0 <== NOT EXECUTED
pipe->Length -= chunk;
4c122: 226a 000c moveal %a2@(12),%a1 <== NOT EXECUTED 4c126: 93c1 subal %d1,%a1 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4c128: 4c6a 0005 0004 remul %a2@(4),%d5,%d0 <== NOT EXECUTED
pipe->Length -= chunk;
4c12e: 2549 000c movel %a1,%a2@(12) <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4c132: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED
pipe->Length -= chunk;
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
4c136: 4a89 tstl %a1 <== NOT EXECUTED 4c138: 6604 bnes 4c13e <pipe_read+0x142> <== NOT EXECUTED
pipe->Start = 0;
4c13a: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
if (pipe->waitingWriters > 0)
4c13e: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4c142: 6716 beqs 4c15a <pipe_read+0x15e> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
4c144: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c148: 2047 moveal %d7,%a0 <== NOT EXECUTED 4c14a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c14e: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c152: 4e90 jsr %a0@ <== NOT EXECUTED 4c154: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c158: 508f addql #8,%sp <== NOT EXECUTED
read += chunk;
4c15a: d681 addl %d1,%d3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4c15c: 2a03 movel %d3,%d5 <== NOT EXECUTED 4c15e: b883 cmpl %d3,%d4 <== NOT EXECUTED 4c160: 6200 feea bhiw 4c04c <pipe_read+0x50> <== NOT EXECUTED 4c164: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4c168: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c16c: 4e94 jsr %a4@ <== NOT EXECUTED 4c16e: 588f addql #4,%sp <== NOT EXECUTED 4c170: 6000 ff3c braw 4c0ae <pipe_read+0xb2> <== NOT EXECUTED
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4c174: 70f5 moveq #-11,%d0 <== NOT EXECUTED 4c176: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4c17a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c17e: 4e94 jsr %a4@ <== NOT EXECUTED 4c180: 588f addql #4,%sp <== NOT EXECUTED 4c182: 6000 ff2a braw 4c0ae <pipe_read+0xb2> <== NOT EXECUTED
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4c186: 7afc moveq #-4,%d5 <== NOT EXECUTED 4c188: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4c18c: 4a83 tstl %d3 <== NOT EXECUTED 4c18e: 6e00 ff22 bgtw 4c0b2 <pipe_read+0xb6> <== NOT EXECUTED 4c192: 6000 ff30 braw 4c0c4 <pipe_read+0xc8> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
4c196: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4c198: d092 addl %a2@,%d0 <== NOT EXECUTED 4c19a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c19c: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4c1a0: 4871 5800 pea %a1@(00000000,%d5:l) <== NOT EXECUTED 4c1a4: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c1a6: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c1aa: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED 4c1ae: 4e91 jsr %a1@ <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
4c1b0: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c1b4: 2001 movel %d1,%d0 <== NOT EXECUTED 4c1b6: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c1b8: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4c1bc: 9088 subl %a0,%d0 <== NOT EXECUTED 4c1be: da88 addl %a0,%d5 <== NOT EXECUTED 4c1c0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c1c2: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c1c4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c1c8: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c1cc: 4e91 jsr %a1@ <== NOT EXECUTED 4c1ce: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c1d2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4c1d6: 6000 ff42 braw 4c11a <pipe_read+0x11e> <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4c1da: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4c1de: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c1e2: 49f9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a4 <== NOT EXECUTED 4c1e8: 4e94 jsr %a4@ <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4c1ea: 4283 clrl %d3 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4c1ec: 588f addql #4,%sp <== NOT EXECUTED 4c1ee: 6000 febe braw 4c0ae <pipe_read+0xb2> <== NOT EXECUTED
0004c1f2 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4c1f2: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4c1f6: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 4c1fa: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
4c1fe: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3 <== NOT EXECUTED 4c204: 42a7 clrl %sp@- <== NOT EXECUTED
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
4c206: 2454 moveal %a4@,%a2 <== NOT EXECUTED
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
4c208: 42a7 clrl %sp@- <== NOT EXECUTED 4c20a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c20e: 4e93 jsr %a3@ <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
4c210: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c214: 4a80 tstl %d0 <== NOT EXECUTED 4c216: 6600 00f2 bnew 4c30a <pipe_release+0x118> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
4c21a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c21e: 7406 moveq #6,%d2 <== NOT EXECUTED 4c220: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
4c224: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4c228: 6704 beqs 4c22e <pipe_release+0x3c> <== NOT EXECUTED
pipe->Readers --;
4c22a: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
4c22e: 44c2 movew %d2,%ccr <== NOT EXECUTED 4c230: 675a beqs 4c28c <pipe_release+0x9a> <== NOT EXECUTED
pipe->Writers --;
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
4c232: 42a7 clrl %sp@- <== NOT EXECUTED 4c234: 42a7 clrl %sp@- <== NOT EXECUTED 4c236: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4c23c: 4e93 jsr %a3@ <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
4c23e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c242: 4a80 tstl %d0 <== NOT EXECUTED 4c244: 6600 00c4 bnew 4c30a <pipe_release+0x118> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
4c248: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c24c: 47f9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a3 <== NOT EXECUTED 4c252: 4e93 jsr %a3@ <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
4c254: 588f addql #4,%sp <== NOT EXECUTED 4c256: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c25a: 6736 beqs 4c292 <pipe_release+0xa0> <== NOT EXECUTED
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
4c25c: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c260: 6616 bnes 4c278 <pipe_release+0x86> <== NOT EXECUTED 4c262: 7002 moveq #2,%d0 <== NOT EXECUTED 4c264: b082 cmpl %d2,%d0 <== NOT EXECUTED 4c266: 6710 beqs 4c278 <pipe_release+0x86> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
4c268: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c26c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c270: 4eb9 0004 cca4 jsr 4cca4 <rtems_barrier_release> <== NOT EXECUTED 4c276: 508f addql #8,%sp <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
4c278: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4c27e: 4e93 jsr %a3@ <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4c280: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4c286: 4280 clrl %d0 <== NOT EXECUTED 4c288: 4e5e unlk %fp <== NOT EXECUTED 4c28a: 4e75 rts <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
4c28c: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED 4c290: 60a0 bras 4c232 <pipe_release+0x40> <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
4c292: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c296: 672a beqs 4c2c2 <pipe_release+0xd0> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4c298: 7004 moveq #4,%d0 <== NOT EXECUTED 4c29a: b082 cmpl %d2,%d0 <== NOT EXECUTED 4c29c: 67da beqs 4c278 <pipe_release+0x86> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
4c29e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c2a2: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c2a6: 4eb9 0004 cca4 jsr 4cca4 <rtems_barrier_release> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4c2ac: 508f addql #8,%sp <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
rtems_semaphore_release(rtems_pipe_semaphore);
4c2ae: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4c2b4: 4e93 jsr %a3@ <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4c2b6: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4c2bc: 4280 clrl %d0 <== NOT EXECUTED 4c2be: 4e5e unlk %fp <== NOT EXECUTED 4c2c0: 4e75 rts <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4c2c2: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4c2c6: 4bf9 0004 a584 lea 4a584 <free>,%a5 <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4c2cc: 243c 0004 cc34 movel #314420,%d2 <== NOT EXECUTED 4c2d2: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c2d4: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
4c2d6: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c2da: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c2dc: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
4c2de: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c2e2: 4eb9 0004 5c54 jsr 45c54 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
4c2e8: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c2ea: 4e95 jsr %a5@ <== NOT EXECUTED
free(pipe);
4c2ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c2ee: 4e95 jsr %a5@ <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
4c2f0: 4fef 0014 lea %sp@(20),%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;
4c2f4: 4294 clrl %a4@ <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
rtems_semaphore_release(rtems_pipe_semaphore);
4c2f6: 2f39 0005 d178 movel 5d178 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4c2fc: 4e93 jsr %a3@ <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4c2fe: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4c304: 4280 clrl %d0 <== NOT EXECUTED 4c306: 4e5e unlk %fp <== NOT EXECUTED 4c308: 4e75 rts <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
4c30a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c30c: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004be1e <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4be1e: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4be22: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4be26: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4be2a: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
4be2e: 660e bnes 4be3e <pipe_write+0x20> <== NOT EXECUTED 4be30: 4282 clrl %d2 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4be32: 2002 movel %d2,%d0 <== NOT EXECUTED 4be34: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4be3a: 4e5e unlk %fp <== NOT EXECUTED 4be3c: 4e75 rts <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
4be3e: 42a7 clrl %sp@- <== NOT EXECUTED 4be40: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3 <== NOT EXECUTED 4be46: 42a7 clrl %sp@- <== NOT EXECUTED 4be48: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4be4c: 4e93 jsr %a3@ <== NOT EXECUTED 4be4e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4be52: 4a80 tstl %d0 <== NOT EXECUTED 4be54: 6600 00b6 bnew 4bf0c <pipe_write+0xee> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
4be58: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4be5c: 6700 0088 beqw 4bee6 <pipe_write+0xc8> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4be60: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4be64: b083 cmpl %d3,%d0 <== NOT EXECUTED 4be66: 6500 00be bcsw 4bf26 <pipe_write+0x108> <== NOT EXECUTED 4be6a: 2a03 movel %d3,%d5 <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
4be6c: 4286 clrl %d6 <== NOT EXECUTED 4be6e: 4282 clrl %d2 <== NOT EXECUTED 4be70: 49f9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4be76: 4bf9 0004 cd1c lea 4cd1c <rtems_barrier_wait>,%a5 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4be7c: 2e3c 0004 e088 movel #319624,%d7 <== 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) {
4be82: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4be86: 2800 movel %d0,%d4 <== NOT EXECUTED 4be88: 9881 subl %d1,%d4 <== NOT EXECUTED 4be8a: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4be8c: 6300 00b4 blsw 4bf42 <pipe_write+0x124> <== NOT EXECUTED
if (LIBIO_NODELAY(iop)) {
4be90: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4be94: 7001 moveq #1,%d0 <== NOT EXECUTED 4be96: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4be9a: 6600 0122 bnew 4bfbe <pipe_write+0x1a0> <== NOT EXECUTED
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
4be9e: 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 ++;
4bea2: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
4bea6: 4e94 jsr %a4@ <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
4bea8: 42a7 clrl %sp@- <== NOT EXECUTED 4beaa: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4beae: 4e95 jsr %a5@ <== NOT EXECUTED 4beb0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4beb4: 4a80 tstl %d0 <== NOT EXECUTED 4beb6: 672a beqs 4bee2 <pipe_write+0xc4> <== NOT EXECUTED 4beb8: 78fc moveq #-4,%d4 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4beba: 42a7 clrl %sp@- <== NOT EXECUTED 4bebc: 42a7 clrl %sp@- <== NOT EXECUTED 4bebe: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4bec2: 4e93 jsr %a3@ <== NOT EXECUTED 4bec4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bec8: 4a80 tstl %d0 <== NOT EXECUTED 4beca: 6600 00ec bnew 4bfb8 <pipe_write+0x19a> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
4bece: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED
if (ret != 0)
4bed2: 4a84 tstl %d4 <== NOT EXECUTED 4bed4: 661a bnes 4bef0 <pipe_write+0xd2> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
4bed6: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4beda: 673e beqs 4bf1a <pipe_write+0xfc> <== NOT EXECUTED 4bedc: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4bee0: 60a0 bras 4be82 <pipe_write+0x64> <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4bee2: 4284 clrl %d4 <== NOT EXECUTED 4bee4: 60d4 bras 4beba <pipe_write+0x9c> <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4bee6: 78e0 moveq #-32,%d4 <== NOT EXECUTED 4bee8: 4282 clrl %d2 <== NOT EXECUTED 4beea: 49f9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4bef0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4bef4: 4e94 jsr %a4@ <== NOT EXECUTED 4bef6: 588f addql #4,%sp <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4bef8: 4a82 tstl %d2 <== NOT EXECUTED 4befa: 6e00 ff36 bgtw 4be32 <pipe_write+0x14> <== NOT EXECUTED 4befe: 2404 movel %d4,%d2 <== NOT EXECUTED
return written;
return ret;
}
4bf00: 2002 movel %d2,%d0 <== NOT EXECUTED 4bf02: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4bf08: 4e5e unlk %fp <== NOT EXECUTED 4bf0a: 4e75 rts <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
4bf0c: 74fc moveq #-4,%d2 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4bf0e: 2002 movel %d2,%d0 <== NOT EXECUTED 4bf10: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4bf16: 4e5e unlk %fp <== NOT EXECUTED 4bf18: 4e75 rts <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4bf1a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
4bf1e: 78e0 moveq #-32,%d4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4bf20: 4e94 jsr %a4@ <== NOT EXECUTED 4bf22: 588f addql #4,%sp <== NOT EXECUTED 4bf24: 60d2 bras 4bef8 <pipe_write+0xda> <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
4bf26: 7a01 moveq #1,%d5 <== NOT EXECUTED 4bf28: 4286 clrl %d6 <== NOT EXECUTED 4bf2a: 4282 clrl %d2 <== NOT EXECUTED 4bf2c: 49f9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4bf32: 4bf9 0004 cd1c lea 4cd1c <rtems_barrier_wait>,%a5 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4bf38: 2e3c 0004 e088 movel #319624,%d7 <== NOT EXECUTED 4bf3e: 6000 ff42 braw 4be82 <pipe_write+0x64> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
4bf42: 2043 moveal %d3,%a0 <== NOT EXECUTED 4bf44: 91c6 subal %d6,%a0 <== NOT EXECUTED 4bf46: b1c4 cmpal %d4,%a0 <== NOT EXECUTED 4bf48: 6402 bccs 4bf4c <pipe_write+0x12e> <== NOT EXECUTED 4bf4a: 2808 movel %a0,%d4 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
4bf4c: 2a01 movel %d1,%d5 <== NOT EXECUTED 4bf4e: daaa 0008 addl %a2@(8),%d5 <== NOT EXECUTED 4bf52: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED 4bf56: 2a00 movel %d0,%d5 <== NOT EXECUTED 4bf58: 9a81 subl %d1,%d5 <== NOT EXECUTED
if (chunk > chunk1) {
4bf5a: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4bf5c: 6c6e bges 4bfcc <pipe_write+0x1ae> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4bf5e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4bf60: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4bf64: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4bf68: d292 addl %a2@,%d1 <== NOT EXECUTED 4bf6a: 2047 moveal %d7,%a0 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4bf6c: dc85 addl %d5,%d6 <== NOT EXECUTED
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4bf6e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4bf70: 4e90 jsr %a0@ <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4bf72: 2004 movel %d4,%d0 <== NOT EXECUTED 4bf74: 9085 subl %d5,%d0 <== NOT EXECUTED 4bf76: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bf78: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4bf7c: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4bf80: 2047 moveal %d7,%a0 <== NOT EXECUTED 4bf82: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4bf84: 4e90 jsr %a0@ <== NOT EXECUTED 4bf86: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
4bf8a: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
4bf8e: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4bf92: 6612 bnes 4bfa6 <pipe_write+0x188> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
written += chunk;
4bf94: d484 addl %d4,%d2 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4bf96: 2c02 movel %d2,%d6 <== NOT EXECUTED 4bf98: b483 cmpl %d3,%d2 <== NOT EXECUTED 4bf9a: 6452 bccs 4bfee <pipe_write+0x1d0> <== NOT EXECUTED 4bf9c: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4bfa0: 7a01 moveq #1,%d5 <== NOT EXECUTED 4bfa2: 6000 fede braw 4be82 <pipe_write+0x64> <== NOT EXECUTED
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
4bfa6: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4bfaa: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4bfae: 4eb9 0004 cca4 jsr 4cca4 <rtems_barrier_release> <== NOT EXECUTED 4bfb4: 508f addql #8,%sp <== NOT EXECUTED 4bfb6: 60dc bras 4bf94 <pipe_write+0x176> <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4bfb8: 78fc moveq #-4,%d4 <== NOT EXECUTED 4bfba: 6000 ff3c braw 4bef8 <pipe_write+0xda> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4bfbe: 2f2a 0028 movel %a2@(40),%sp@- <== 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)) {
4bfc2: 78f5 moveq #-11,%d4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4bfc4: 4e94 jsr %a4@ <== NOT EXECUTED 4bfc6: 588f addql #4,%sp <== NOT EXECUTED 4bfc8: 6000 ff2e braw 4bef8 <pipe_write+0xda> <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4bfcc: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4bfce: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4bfd2: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4bfd6: d292 addl %a2@,%d1 <== NOT EXECUTED 4bfd8: 2047 moveal %d7,%a0 <== NOT EXECUTED 4bfda: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4bfdc: 4e90 jsr %a0@ <== NOT EXECUTED 4bfde: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
pipe->Length += chunk;
4bfe2: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
4bfe6: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4bfea: 67a8 beqs 4bf94 <pipe_write+0x176> <== NOT EXECUTED 4bfec: 60b8 bras 4bfa6 <pipe_write+0x188> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4bfee: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4bff2: 4284 clrl %d4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4bff4: 4e94 jsr %a4@ <== NOT EXECUTED 4bff6: 588f addql #4,%sp <== NOT EXECUTED 4bff8: 6000 fefe braw 4bef8 <pipe_write+0xda> <== NOT EXECUTED
00047550 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
47550: 4e56 0000 linkw %fp,#0 47554: 222e 000c movel %fp@(12),%d1
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47558: 2001 movel %d1,%d0 4755a: 5380 subql #1,%d0
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
4755c: 52b9 0006 3a1c addql #1,63a1c <rtems_malloc_statistics+0x8>
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47562: c081 andl %d1,%d0
47564: 6608 bnes 4756e <posix_memalign+0x1e> <== NEVER TAKEN
47566: 103c 0003 moveb #3,%d0 4756a: b081 cmpl %d1,%d0
4756c: 6506 bcss 47574 <posix_memalign+0x24> /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); }
4756e: 7016 moveq #22,%d0 47570: 4e5e unlk %fp 47572: 4e75 rts 47574: 4e5e unlk %fp
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
47576: 4ef9 0004 76c8 jmp 476c8 <rtems_memalign>
000429a4 <putk>:
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
{
429a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 429a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 429aa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
const char *p = s;
for (p=s ; *p ; p++ )
429ae: 1012 moveb %a2@,%d0 <== NOT EXECUTED 429b0: 6714 beqs 429c6 <putk+0x22> <== NOT EXECUTED
BSP_output_char(*p);
429b2: 49c0 extbl %d0 <== NOT EXECUTED
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
429b4: 528a addql #1,%a2 <== NOT EXECUTED
BSP_output_char(*p);
429b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 429b8: 2079 0005 c8ac moveal 5c8ac <BSP_output_char>,%a0 <== NOT EXECUTED 429be: 4e90 jsr %a0@ <== NOT EXECUTED
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
429c0: 588f addql #4,%sp <== NOT EXECUTED 429c2: 1012 moveb %a2@,%d0 <== NOT EXECUTED 429c4: 66ec bnes 429b2 <putk+0xe> <== NOT EXECUTED
BSP_output_char(*p);
BSP_output_char('\n');
429c6: 2279 0005 c8ac moveal 5c8ac <BSP_output_char>,%a1 <== NOT EXECUTED 429cc: 700a moveq #10,%d0 <== NOT EXECUTED
}
429ce: 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');
429d2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
429d6: 4e5e unlk %fp <== NOT EXECUTED
{
const char *p = s;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
429d8: 4ed1 jmp %a1@ <== NOT EXECUTED
...
0005a340 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
5a340: 4e56 fff4 linkw %fp,#-12 5a344: 202e 0008 movel %fp@(8),%d0 5a348: 222e 000c movel %fp@(12),%d1 5a34c: 206e 0010 moveal %fp@(16),%a0 5a350: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5a354: b0b9 0005 c1e4 cmpl 5c1e4 <rtems_libio_number_iops>,%d0
5a35a: 6468 bccs 5a3c4 <read+0x84> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
5a35c: 2479 0005 d86c moveal 5d86c <rtems_libio_iops>,%a2 5a362: ed88 lsll #6,%d0 5a364: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5a366: 202a 0014 movel %a2@(20),%d0 5a36a: 0800 0008 btst #8,%d0
5a36e: 6754 beqs 5a3c4 <read+0x84> rtems_libio_check_buffer( buffer );
5a370: 4a81 tstl %d1
5a372: 6768 beqs 5a3dc <read+0x9c> <== NEVER TAKEN
rtems_libio_check_count( count );
5a374: 4a88 tstl %a0
5a376: 6740 beqs 5a3b8 <read+0x78> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5a378: 0800 0001 btst #1,%d0
5a37c: 675e beqs 5a3dc <read+0x9c> <== NEVER TAKEN
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
5a37e: 226a 003c moveal %a2@(60),%a1 5a382: 2269 0008 moveal %a1@(8),%a1 5a386: 4a89 tstl %a1
5a388: 676a beqs 5a3f4 <read+0xb4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
5a38a: 2f08 movel %a0,%sp@- 5a38c: 2f01 movel %d1,%sp@- 5a38e: 2f0a movel %a2,%sp@- 5a390: 4e91 jsr %a1@
if ( rc > 0 )
5a392: 4fef 000c lea %sp@(12),%sp 5a396: 4a80 tstl %d0
5a398: 6f14 bles 5a3ae <read+0x6e> <== NEVER TAKEN
iop->offset += rc;
5a39a: 2400 movel %d0,%d2 5a39c: 5bc1 smi %d1 5a39e: 49c1 extbl %d1 5a3a0: d5aa 0010 addl %d2,%a2@(16) 5a3a4: 262a 000c movel %a2@(12),%d3 5a3a8: d781 addxl %d1,%d3 5a3aa: 2543 000c movel %d3,%a2@(12)
return rc;
}
5a3ae: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a3b4: 4e5e unlk %fp 5a3b6: 4e75 rts
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
5a3b8: 4280 clrl %d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a3ba: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5a3c0: 4e5e unlk %fp <== NOT EXECUTED 5a3c2: 4e75 rts <== NOT EXECUTED
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
5a3c4: 4eb9 0004 d868 jsr 4d868 <__errno> 5a3ca: 7409 moveq #9,%d2 5a3cc: 2040 moveal %d0,%a0 5a3ce: 70ff moveq #-1,%d0 5a3d0: 2082 movel %d2,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a3d2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a3d8: 4e5e unlk %fp 5a3da: 4e75 rts
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5a3dc: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 5a3e2: 7216 moveq #22,%d1 <== NOT EXECUTED 5a3e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a3e6: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a3e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5a3ee: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a3f0: 4e5e unlk %fp <== NOT EXECUTED 5a3f2: 4e75 rts <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5a3f4: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 5a3fa: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a3fc: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a3fe: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5a404: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a40a: 4e5e unlk %fp <== NOT EXECUTED
00046334 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
46334: 4e56 ffe0 linkw %fp,#-32 46338: 48d7 001c moveml %d2-%d4,%sp@ 4633c: 262e 0008 movel %fp@(8),%d3 46340: 282e 000c movel %fp@(12),%d4
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
46344: 6700 0092 beqw 463d8 <readlink+0xa4>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
46348: 2f03 movel %d3,%sp@- 4634a: 240e movel %fp,%d2 4634c: 0682 ffff ffec addil #-20,%d2 46352: 4eb9 0005 3af4 jsr 53af4 <strlen> 46358: 4297 clrl %sp@ 4635a: 2f02 movel %d2,%sp@- 4635c: 42a7 clrl %sp@- 4635e: 2f00 movel %d0,%sp@- 46360: 2f03 movel %d3,%sp@- 46362: 4eb9 0004 50cc jsr 450cc <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
46368: 4fef 0014 lea %sp@(20),%sp 4636c: 4a80 tstl %d0
4636e: 665a bnes 463ca <readlink+0x96> <== NEVER TAKEN
return -1;
if ( !loc.ops->node_type_h ){
46370: 226e fff8 moveal %fp@(-8),%a1 46374: 2069 0010 moveal %a1@(16),%a0 46378: 4a88 tstl %a0 4637a: 6700 00a6 beqw 46422 <readlink+0xee>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
4637e: 2f02 movel %d2,%sp@- 46380: 4e90 jsr %a0@ 46382: 588f addql #4,%sp 46384: 7204 moveq #4,%d1 46386: b280 cmpl %d0,%d1
46388: 6668 bnes 463f2 <readlink+0xbe>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
4638a: 226e fff8 moveal %fp@(-8),%a1 4638e: 2069 003c moveal %a1@(60),%a0 46392: 4a88 tstl %a0 46394: 6700 008c beqw 46422 <readlink+0xee>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
46398: 2f2e 0010 movel %fp@(16),%sp@- 4639c: 2f04 movel %d4,%sp@- 4639e: 2f02 movel %d2,%sp@- 463a0: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
463a2: 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 );
463a6: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
463a8: 4fef 000c lea %sp@(12),%sp 463ac: 4a88 tstl %a0
463ae: 670e beqs 463be <readlink+0x8a> <== NEVER TAKEN
463b0: 2068 001c moveal %a0@(28),%a0 463b4: 4a88 tstl %a0
463b6: 6706 beqs 463be <readlink+0x8a> <== NEVER TAKEN
463b8: 2f02 movel %d2,%sp@- 463ba: 4e90 jsr %a0@ 463bc: 588f addql #4,%sp
return result;
}
463be: 2003 movel %d3,%d0 463c0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 463c6: 4e5e unlk %fp 463c8: 4e75 rts
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
463ca: 76ff moveq #-1,%d3 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
463cc: 2003 movel %d3,%d0 <== NOT EXECUTED 463ce: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 463d4: 4e5e unlk %fp <== NOT EXECUTED 463d6: 4e75 rts <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
463d8: 4eb9 0005 20e0 jsr 520e0 <__errno> <== NOT EXECUTED 463de: 76ff moveq #-1,%d3 <== NOT EXECUTED 463e0: 720e moveq #14,%d1 <== NOT EXECUTED 463e2: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
463e4: 2003 movel %d3,%d0 <== NOT EXECUTED 463e6: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
463ec: 2081 movel %d1,%a0@ <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
463ee: 4e5e unlk %fp <== NOT EXECUTED 463f0: 4e75 rts <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
463f2: 206e fff8 moveal %fp@(-8),%a0 463f6: 4a88 tstl %a0
463f8: 670e beqs 46408 <readlink+0xd4> <== NEVER TAKEN
463fa: 2068 001c moveal %a0@(28),%a0 463fe: 4a88 tstl %a0
46400: 6706 beqs 46408 <readlink+0xd4> <== NEVER TAKEN
46402: 2f02 movel %d2,%sp@- 46404: 4e90 jsr %a0@ 46406: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
46408: 4eb9 0005 20e0 jsr 520e0 <__errno> 4640e: 76ff moveq #-1,%d3 46410: 2040 moveal %d0,%a0 46412: 7016 moveq #22,%d0 46414: 2080 movel %d0,%a0@
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
46416: 2003 movel %d3,%d0 46418: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 4641e: 4e5e unlk %fp 46420: 4e75 rts
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
46422: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 46426: 4a88 tstl %a0 <== NOT EXECUTED 46428: 6706 beqs 46430 <readlink+0xfc> <== NOT EXECUTED 4642a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4642c: 4e90 jsr %a0@ <== NOT EXECUTED 4642e: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
46430: 4eb9 0005 20e0 jsr 520e0 <__errno> <== NOT EXECUTED 46436: 76ff moveq #-1,%d3 <== NOT EXECUTED 46438: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
4643a: 2003 movel %d3,%d0 <== NOT EXECUTED 4643c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
46442: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
46448: 4e5e unlk %fp <== NOT EXECUTED
0004495c <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
4495c: 4e56 ffe0 linkw %fp,#-32 44960: 202e 0008 movel %fp@(8),%d0 44964: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 44968: 246e 000c moveal %fp@(12),%a2 4496c: 242e 0010 movel %fp@(16),%d2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
44970: b0b9 0005 fe54 cmpl 5fe54 <rtems_libio_number_iops>,%d0 44976: 6400 00f0 bccw 44a68 <readv+0x10c>
iop = rtems_libio_iop( fd );
4497a: 2679 0006 1cb0 moveal 61cb0 <rtems_libio_iops>,%a3 44980: ed88 lsll #6,%d0 44982: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
44984: 202b 0014 movel %a3@(20),%d0 44988: 0800 0008 btst #8,%d0 4498c: 6700 00da beqw 44a68 <readv+0x10c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
44990: 0800 0001 btst #1,%d0 44994: 6700 009c beqw 44a32 <readv+0xd6>
/*
* Argument validation on IO vector
*/
if ( !iov )
44998: 4a8a tstl %a2 4499a: 6700 0096 beqw 44a32 <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
4499e: 4a82 tstl %d2 449a0: 6f00 0090 blew 44a32 <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
449a4: 0c82 0000 0400 cmpil #1024,%d2 449aa: 6e00 0086 bgtw 44a32 <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
449ae: 206b 003c moveal %a3@(60),%a0 449b2: 2868 0008 moveal %a0@(8),%a4 449b6: 4a8c tstl %a4 449b8: 6700 00c8 beqw 44a82 <readv+0x126>
rtems_set_errno_and_return_minus_one( ENOTSUP );
449bc: 204a moveal %a2,%a0 449be: 93c9 subal %a1,%a1 449c0: 4281 clrl %d1 449c2: 7a01 moveq #1,%d5
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
449c4: 4a90 tstl %a0@
449c6: 676a beqs 44a32 <readv+0xd6>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
449c8: 2828 0004 movel %a0@(4),%d4 449cc: 2601 movel %d1,%d3 449ce: d684 addl %d4,%d3
if ( total < old )
449d0: b283 cmpl %d3,%d1
449d2: 6e5e bgts 44a32 <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
449d4: 4a84 tstl %d4 449d6: 57c4 seq %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++ ) {
449d8: 2203 movel %d3,%d1
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
449da: 2605 movel %d5,%d3
* 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++ ) {
449dc: 5289 addql #1,%a1 449de: 5088 addql #8,%a0
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
449e0: c684 andl %d4,%d3 449e2: 1a03 moveb %d3,%d5
* 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++ ) {
449e4: b3c2 cmpal %d2,%a1
449e6: 6ddc blts 449c4 <readv+0x68>
/*
* 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 ) {
449e8: 4a03 tstb %d3
449ea: 6660 bnes 44a4c <readv+0xf0>
449ec: 588a addql #4,%a2 449ee: 4283 clrl %d3 449f0: 4284 clrl %d4
/*
* 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 );
449f2: 2f12 movel %a2@,%sp@-
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
449f4: 5283 addql #1,%d3
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
449f6: 2f2a fffc movel %a2@(-4),%sp@- 449fa: 2f0b movel %a3,%sp@- 449fc: 4e94 jsr %a4@
if ( bytes < 0 )
449fe: 4fef 000c lea %sp@(12),%sp 44a02: 4a80 tstl %d0
44a04: 6d54 blts 44a5a <readv+0xfe> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
44a06: 6716 beqs 44a1e <readv+0xc2> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
44a08: d880 addl %d0,%d4
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
44a0a: 2c00 movel %d0,%d6 44a0c: 5bc5 smi %d5 44a0e: 49c5 extbl %d5 44a10: ddab 0010 addl %d6,%a3@(16) 44a14: 222b 000c movel %a3@(12),%d1 44a18: d385 addxl %d5,%d1 44a1a: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
44a1e: b092 cmpl %a2@,%d0
44a20: 661e bnes 44a40 <readv+0xe4> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44a22: 508a addql #8,%a2 44a24: b682 cmpl %d2,%d3
44a26: 6c18 bges 44a40 <readv+0xe4>
44a28: 206b 003c moveal %a3@(60),%a0 44a2c: 2868 0008 moveal %a0@(8),%a4 44a30: 60c0 bras 449f2 <readv+0x96>
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
44a32: 4eb9 0004 fd94 jsr 4fd94 <__errno> 44a38: 78ff moveq #-1,%d4 44a3a: 2040 moveal %d0,%a0 44a3c: 7016 moveq #22,%d0 44a3e: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a40: 2004 movel %d4,%d0 44a42: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a48: 4e5e unlk %fp 44a4a: 4e75 rts
/*
* 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 ) {
44a4c: 4284 clrl %d4
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a4e: 2004 movel %d4,%d0 44a50: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a56: 4e5e unlk %fp 44a58: 4e75 rts
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44a5a: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a5c: 2004 movel %d4,%d0 <== NOT EXECUTED 44a5e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44a64: 4e5e unlk %fp <== NOT EXECUTED 44a66: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
44a68: 4eb9 0004 fd94 jsr 4fd94 <__errno> <== NOT EXECUTED 44a6e: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a70: 7209 moveq #9,%d1 <== NOT EXECUTED 44a72: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a74: 2004 movel %d4,%d0 <== NOT EXECUTED 44a76: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
44a7c: 2081 movel %d1,%a0@ <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a7e: 4e5e unlk %fp <== NOT EXECUTED 44a80: 4e75 rts <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
44a82: 4eb9 0004 fd94 jsr 4fd94 <__errno> <== NOT EXECUTED 44a88: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a8a: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a8c: 2004 movel %d4,%d0 <== NOT EXECUTED 44a8e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
44a94: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a9a: 4e5e unlk %fp <== NOT EXECUTED
...
0005a470 <realloc>:
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
5a470: 7003 moveq #3,%d0
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
5a472: 4e56 fff0 linkw %fp,#-16 5a476: 52b9 0005 d888 addql #1,5d888 <rtems_malloc_statistics+0x10> 5a47c: 48d7 001c moveml %d2-%d4,%sp@ 5a480: 242e 0008 movel %fp@(8),%d2 5a484: 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())) {
5a488: b0b9 0005 db4a cmpl 5db4a <_System_state_Current>,%d0
5a48e: 677a beqs 5a50a <realloc+0x9a> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
5a490: 4a82 tstl %d2 5a492: 6700 00de beqw 5a572 <realloc+0x102>
return malloc( size );
if ( !size ) {
5a496: 4a83 tstl %d3
5a498: 673e beqs 5a4d8 <realloc+0x68> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
5a49a: 486e fffc pea %fp@(-4) 5a49e: 2f02 movel %d2,%sp@- 5a4a0: 2f39 0005 c1f0 movel 5c1f0 <RTEMS_Malloc_Heap>,%sp@- 5a4a6: 4eb9 0005 a658 jsr 5a658 <_Protected_heap_Get_block_size> 5a4ac: 4fef 000c lea %sp@(12),%sp 5a4b0: 4a00 tstb %d0
5a4b2: 673c beqs 5a4f0 <realloc+0x80>
#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 ) ) {
5a4b4: 2f03 movel %d3,%sp@- 5a4b6: 2f02 movel %d2,%sp@- 5a4b8: 2f39 0005 c1f0 movel 5c1f0 <RTEMS_Malloc_Heap>,%sp@- 5a4be: 4eb9 0005 a694 jsr 5a694 <_Protected_heap_Resize_block> 5a4c4: 4fef 000c lea %sp@(12),%sp 5a4c8: 4a00 tstb %d0
5a4ca: 6754 beqs 5a520 <realloc+0xb0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5a4cc: 2002 movel %d2,%d0 5a4ce: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a4d4: 4e5e unlk %fp 5a4d6: 4e75 rts
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
5a4d8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5a4da: 4282 clrl %d2 <== NOT EXECUTED 5a4dc: 4eb9 0004 a584 jsr 4a584 <free> <== NOT EXECUTED
return (void *) 0;
5a4e2: 588f addql #4,%sp <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5a4e4: 2002 movel %d2,%d0 <== NOT EXECUTED 5a4e6: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5a4ec: 4e5e unlk %fp <== NOT EXECUTED 5a4ee: 4e75 rts <== NOT EXECUTED
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
5a4f0: 4eb9 0004 d868 jsr 4d868 <__errno> 5a4f6: 4282 clrl %d2 5a4f8: 2040 moveal %d0,%a0 5a4fa: 7016 moveq #22,%d0 5a4fc: 2080 movel %d0,%a0@
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5a4fe: 2002 movel %d2,%d0 5a500: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a506: 4e5e unlk %fp 5a508: 4e75 rts
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
5a50a: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0
5a510: 6752 beqs 5a564 <realloc+0xf4> <== ALWAYS TAKEN
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
5a512: 4282 clrl %d2
}
5a514: 2002 movel %d2,%d0 5a516: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a51c: 4e5e unlk %fp 5a51e: 4e75 rts
* 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 );
5a520: 2f03 movel %d3,%sp@- 5a522: 4eb9 0004 aaf4 jsr 4aaf4 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5a528: 588f addql #4,%sp
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
5a52a: 53b9 0005 d87c subql #1,5d87c <rtems_malloc_statistics+0x4>
* 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 );
5a530: 2800 movel %d0,%d4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5a532: 67de beqs 5a512 <realloc+0xa2>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
5a534: 202e fffc movel %fp@(-4),%d0 5a538: b083 cmpl %d3,%d0
5a53a: 6402 bccs 5a53e <realloc+0xce> <== NEVER TAKEN
5a53c: 2600 movel %d0,%d3 5a53e: 2f03 movel %d3,%sp@- 5a540: 2f02 movel %d2,%sp@- 5a542: 2f04 movel %d4,%sp@- 5a544: 4eb9 0004 e088 jsr 4e088 <memcpy>
free( ptr );
5a54a: 2f02 movel %d2,%sp@- 5a54c: 2404 movel %d4,%d2 5a54e: 4eb9 0004 a584 jsr 4a584 <free>
return new_area;
5a554: 4fef 0010 lea %sp@(16),%sp
}
5a558: 2002 movel %d2,%d0 5a55a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a560: 4e5e unlk %fp 5a562: 4e75 rts
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
5a564: 2039 0005 da62 movel 5da62 <_ISR_Nest_level>,%d0 5a56a: 6700 ff24 beqw 5a490 <realloc+0x20>
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
5a56e: 4282 clrl %d2 <== NOT EXECUTED 5a570: 60a2 bras 5a514 <realloc+0xa4> <== NOT EXECUTED
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
5a572: 2f03 movel %d3,%sp@- 5a574: 4eb9 0004 aaf4 jsr 4aaf4 <malloc> 5a57a: 588f addql #4,%sp 5a57c: 2400 movel %d0,%d2
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5a57e: 2002 movel %d2,%d0 5a580: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a586: 4e5e unlk %fp
...
00047078 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
47078: 4e56 ffbc linkw %fp,#-68 4707c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 47080: 282e 0008 movel %fp@(8),%d4
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
47084: 2f04 movel %d4,%sp@- 47086: 4eb9 0004 5660 jsr 45660 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
4708c: 588f addql #4,%sp
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
4708e: 2400 movel %d0,%d2
if ( parentpathlen == 0 )
47090: 6600 01ce bnew 47260 <rmdir+0x1e8>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
47094: 2044 moveal %d4,%a0 47096: 762f moveq #47,%d3 47098: 1210 moveb %a0@,%d1 4709a: 1001 moveb %d1,%d0 4709c: 49c0 extbl %d0 4709e: b680 cmpl %d0,%d3
470a0: 670e beqs 470b0 <rmdir+0x38> <== ALWAYS TAKEN
470a2: 163c 005c moveb #92,%d3 <== NOT EXECUTED 470a6: b680 cmpl %d0,%d3 <== NOT EXECUTED 470a8: 6706 beqs 470b0 <rmdir+0x38> <== NOT EXECUTED 470aa: 4a01 tstb %d1 <== NOT EXECUTED 470ac: 6600 00fc bnew 471aa <rmdir+0x132> <== NOT EXECUTED
470b0: 2079 0006 3f34 moveal 63f34 <rtems_current_user_env>,%a0 470b6: 45ee ffec lea %fp@(-20),%a2 470ba: 49ee fff0 lea %fp@(-16),%a4 470be: 200e movel %fp,%d0 470c0: 0680 ffff fff4 addil #-12,%d0 470c6: 2640 moveal %d0,%a3 470c8: 4bee fff8 lea %fp@(-8),%a5 470cc: 224e moveal %fp,%a1 470ce: 24a8 0018 movel %a0@(24),%a2@ 470d2: 28a8 001c movel %a0@(28),%a4@ 470d6: 26a8 0020 movel %a0@(32),%a3@ 470da: 2aa8 0024 movel %a0@(36),%a5@ 470de: 2328 0028 movel %a0@(40),%a1@- 470e2: 4203 clrb %d3
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
470e4: 2040 moveal %d0,%a0
name = pathname + parentpathlen;
470e6: 2644 moveal %d4,%a3 470e8: d7c2 addal %d2,%a3
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
470ea: 240e movel %fp,%d2 470ec: 0682 ffff ffd8 addil #-40,%d2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
470f2: 2d50 ffe0 movel %a0@,%fp@(-32) 470f6: 2d51 ffe8 movel %a1@,%fp@(-24) 470fa: 2d54 ffdc movel %a4@,%fp@(-36)
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
470fe: 49f9 0005 57e4 lea 557e4 <strlen>,%a4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
47104: 2d55 ffe4 movel %a5@,%fp@(-28) 47108: 2d52 ffd8 movel %a2@,%fp@(-40)
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4710c: 2f0b movel %a3,%sp@- 4710e: 4e94 jsr %a4@ 47110: 2e80 movel %d0,%sp@ 47112: 2f0b movel %a3,%sp@- 47114: 4eb9 0004 5618 jsr 45618 <rtems_filesystem_prefix_separators> 4711a: d7c0 addal %d0,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4711c: 2f0b movel %a3,%sp@- 4711e: 4e94 jsr %a4@ 47120: 4297 clrl %sp@ 47122: 2f02 movel %d2,%sp@- 47124: 42a7 clrl %sp@- 47126: 2f00 movel %d0,%sp@- 47128: 2f0b movel %a3,%sp@- 4712a: 4eb9 0004 56d2 jsr 456d2 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
47130: 4fef 001c lea %sp@(28),%sp 47134: 4a80 tstl %d0 47136: 6600 00ee bnew 47226 <rmdir+0x1ae>
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
4713a: 226e ffe4 moveal %fp@(-28),%a1 4713e: 2069 0010 moveal %a1@(16),%a0 47142: 4a88 tstl %a0 47144: 6700 01a0 beqw 472e6 <rmdir+0x26e>
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 ){
47148: 2f02 movel %d2,%sp@- 4714a: 4e90 jsr %a0@ 4714c: 588f addql #4,%sp 4714e: 7201 moveq #1,%d1 47150: b280 cmpl %d0,%d1 47152: 6600 0086 bnew 471da <rmdir+0x162>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
47156: 206e ffe0 moveal %fp@(-32),%a0 4715a: 2068 0034 moveal %a0@(52),%a0 4715e: 4a88 tstl %a0 47160: 6700 0136 beqw 47298 <rmdir+0x220>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
47164: 2f02 movel %d2,%sp@- 47166: 2f0a movel %a2,%sp@- 47168: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4716a: 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 );
4716e: 2640 moveal %d0,%a3
rtems_filesystem_freenode( &loc );
47170: 508f addql #8,%sp 47172: 4a88 tstl %a0
47174: 670e beqs 47184 <rmdir+0x10c> <== NEVER TAKEN
47176: 2068 001c moveal %a0@(28),%a0 4717a: 4a88 tstl %a0
4717c: 6706 beqs 47184 <rmdir+0x10c> <== NEVER TAKEN
4717e: 2f02 movel %d2,%sp@- 47180: 4e90 jsr %a0@ 47182: 588f addql #4,%sp
if ( free_parentloc )
47184: 4a03 tstb %d3
47186: 6716 beqs 4719e <rmdir+0x126>
rtems_filesystem_freenode( &parentloc );
47188: 206e fff8 moveal %fp@(-8),%a0 4718c: 4a88 tstl %a0
4718e: 670e beqs 4719e <rmdir+0x126> <== NEVER TAKEN
47190: 2068 001c moveal %a0@(28),%a0 47194: 4a88 tstl %a0
47196: 6706 beqs 4719e <rmdir+0x126> <== NEVER TAKEN
47198: 2f0a movel %a2,%sp@- 4719a: 4e90 jsr %a0@ 4719c: 588f addql #4,%sp
return result;
}
4719e: 200b movel %a3,%d0 471a0: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 471a6: 4e5e unlk %fp 471a8: 4e75 rts
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
471aa: 2079 0006 3f34 moveal 63f34 <rtems_current_user_env>,%a0 <== NOT EXECUTED 471b0: 45ee ffec lea %fp@(-20),%a2 <== NOT EXECUTED 471b4: 5888 addql #4,%a0 <== NOT EXECUTED 471b6: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED 471ba: 200e movel %fp,%d0 <== NOT EXECUTED 471bc: 0680 ffff fff4 addil #-12,%d0 <== NOT EXECUTED 471c2: 2640 moveal %d0,%a3 <== NOT EXECUTED 471c4: 4bee fff8 lea %fp@(-8),%a5 <== NOT EXECUTED 471c8: 224e moveal %fp,%a1 <== NOT EXECUTED 471ca: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 471cc: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 471ce: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 471d0: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 471d2: 2310 movel %a0@,%a1@- <== NOT EXECUTED 471d4: 4203 clrb %d3 <== NOT EXECUTED 471d6: 6000 ff0c braw 470e4 <rmdir+0x6c> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
471da: 206e ffe4 moveal %fp@(-28),%a0 471de: 4a88 tstl %a0
471e0: 670e beqs 471f0 <rmdir+0x178> <== NEVER TAKEN
471e2: 2068 001c moveal %a0@(28),%a0 471e6: 4a88 tstl %a0
471e8: 6706 beqs 471f0 <rmdir+0x178> <== NEVER TAKEN
471ea: 2f02 movel %d2,%sp@- 471ec: 4e90 jsr %a0@ 471ee: 588f addql #4,%sp
if ( free_parentloc )
471f0: 4a03 tstb %d3
471f2: 6716 beqs 4720a <rmdir+0x192> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
471f4: 206e fff8 moveal %fp@(-8),%a0 471f8: 4a88 tstl %a0
471fa: 670e beqs 4720a <rmdir+0x192> <== NEVER TAKEN
471fc: 2068 001c moveal %a0@(28),%a0 47200: 4a88 tstl %a0
47202: 6706 beqs 4720a <rmdir+0x192> <== NEVER TAKEN
47204: 2f0a movel %a2,%sp@- 47206: 4e90 jsr %a0@ 47208: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
4720a: 4eb9 0005 277c jsr 5277c <__errno> 47210: 367c ffff moveaw #-1,%a3 47214: 2040 moveal %d0,%a0 47216: 7014 moveq #20,%d0 47218: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4721a: 200b movel %a3,%d0 4721c: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 47222: 4e5e unlk %fp 47224: 4e75 rts
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
47226: 4a03 tstb %d3
47228: 6610 bnes 4723a <rmdir+0x1c2> <== NEVER TAKEN
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
4722a: 367c ffff moveaw #-1,%a3
return result;
}
4722e: 200b movel %a3,%d0 47230: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 47236: 4e5e unlk %fp 47238: 4e75 rts
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
4723a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4723e: 4a88 tstl %a0 <== NOT EXECUTED 47240: 67e8 beqs 4722a <rmdir+0x1b2> <== NOT EXECUTED 47242: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 47246: 67e2 beqs 4722a <rmdir+0x1b2> <== NOT EXECUTED 47248: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4724a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4724c: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 47250: 4e90 jsr %a0@ <== NOT EXECUTED 47252: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
47254: 200b movel %a3,%d0 <== NOT EXECUTED 47256: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4725c: 4e5e unlk %fp <== NOT EXECUTED 4725e: 4e75 rts <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
47260: 42a7 clrl %sp@- 47262: 45ee ffec lea %fp@(-20),%a2 47266: 2f0a movel %a2,%sp@- 47268: 4878 0002 pea 2 <DOUBLE_FLOAT> 4726c: 2f00 movel %d0,%sp@- 4726e: 2f04 movel %d4,%sp@- 47270: 4eb9 0004 57dc jsr 457dc <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
47276: 4fef 0014 lea %sp@(20),%sp 4727a: 4a80 tstl %d0
4727c: 66ac bnes 4722a <rmdir+0x1b2> <== NEVER TAKEN
4727e: 200e movel %fp,%d0 47280: 49ee fff0 lea %fp@(-16),%a4 47284: 0680 ffff fff4 addil #-12,%d0 4728a: 4bee fff8 lea %fp@(-8),%a5 4728e: 43ee fffc lea %fp@(-4),%a1 47292: 7601 moveq #1,%d3 47294: 6000 fe4e braw 470e4 <rmdir+0x6c>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
47298: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 4729c: 4a88 tstl %a0 <== NOT EXECUTED 4729e: 670e beqs 472ae <rmdir+0x236> <== NOT EXECUTED 472a0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 472a4: 4a88 tstl %a0 <== NOT EXECUTED 472a6: 6706 beqs 472ae <rmdir+0x236> <== NOT EXECUTED 472a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 472aa: 4e90 jsr %a0@ <== NOT EXECUTED 472ac: 588f addql #4,%sp <== NOT EXECUTED
if ( free_parentloc )
472ae: 4a03 tstb %d3 <== NOT EXECUTED 472b0: 6716 beqs 472c8 <rmdir+0x250> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
472b2: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 472b6: 4a88 tstl %a0 <== NOT EXECUTED 472b8: 670e beqs 472c8 <rmdir+0x250> <== NOT EXECUTED 472ba: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 472be: 4a88 tstl %a0 <== NOT EXECUTED 472c0: 6706 beqs 472c8 <rmdir+0x250> <== NOT EXECUTED 472c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 472c4: 4e90 jsr %a0@ <== NOT EXECUTED 472c6: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
472c8: 4eb9 0005 277c jsr 5277c <__errno> <== NOT EXECUTED 472ce: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 472d2: 2040 moveal %d0,%a0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
472d4: 200b movel %a3,%d0 <== NOT EXECUTED 472d6: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
472dc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
472e2: 4e5e unlk %fp <== NOT EXECUTED 472e4: 4e75 rts <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
472e6: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 472ea: 4a88 tstl %a0 <== NOT EXECUTED 472ec: 67c0 beqs 472ae <rmdir+0x236> <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
472ee: 2f02 movel %d2,%sp@- <== NOT EXECUTED 472f0: 4e90 jsr %a0@ <== NOT EXECUTED 472f2: 588f addql #4,%sp <== NOT EXECUTED 472f4: 60b8 bras 472ae <rmdir+0x236> <== NOT EXECUTED
...
0004ca50 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4ca50: 4e56 ffe8 linkw %fp,#-24 4ca54: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4ca58: 2c2e 0008 movel %fp@(8),%d6 4ca5c: 4283 clrl %d3 4ca5e: 4285 clrl %d5 4ca60: 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);
4ca62: 45f9 0004 ca9c lea 4ca9c <rtems_assoc_local_by_remote>,%a2
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4ca68: 282e 000c movel %fp@(12),%d4
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
if (b & remote_value)
4ca6c: 2002 movel %d2,%d0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4ca6e: 5283 addql #1,%d3
if (b & remote_value)
4ca70: c084 andl %d4,%d0
4ca72: 6614 bnes 4ca88 <rtems_assoc_local_by_remote_bitfield+0x38>
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4ca74: 7020 moveq #32,%d0 4ca76: d482 addl %d2,%d2 4ca78: b083 cmpl %d3,%d0
4ca7a: 66f0 bnes 4ca6c <rtems_assoc_local_by_remote_bitfield+0x1c>
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
4ca7c: 2005 movel %d5,%d0 4ca7e: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4ca84: 4e5e unlk %fp 4ca86: 4e75 rts
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);
4ca88: 2f02 movel %d2,%sp@-
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4ca8a: d482 addl %d2,%d2
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4ca8c: 2f06 movel %d6,%sp@- 4ca8e: 4e92 jsr %a2@ 4ca90: 508f addql #8,%sp 4ca92: 8a80 orl %d0,%d5
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4ca94: 7020 moveq #32,%d0 4ca96: b083 cmpl %d3,%d0
4ca98: 66d2 bnes 4ca6c <rtems_assoc_local_by_remote_bitfield+0x1c><== ALWAYS TAKEN
4ca9a: 60e0 bras 4ca7c <rtems_assoc_local_by_remote_bitfield+0x2c><== NOT EXECUTED
0004cac0 <rtems_assoc_name_bad>:
uint32_t bad_value
#else
uint32_t bad_value __attribute((unused))
#endif
)
{
4cac0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
4cac4: 203c 0005 c340 movel #377664,%d0 <== NOT EXECUTED 4caca: 4e5e unlk %fp <== NOT EXECUTED
...
0004a3f8 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
4a3f8: 4e56 0000 linkw %fp,#0 4a3fc: 2f02 movel %d2,%sp@- 4a3fe: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
4a402: 2f02 movel %d2,%sp@- 4a404: 2f2e 0008 movel %fp@(8),%sp@- 4a408: 4eb9 0004 a430 jsr 4a430 <rtems_assoc_ptr_by_local>
if (nap)
4a40e: 508f addql #8,%sp 4a410: 4a80 tstl %d0
4a412: 670c beqs 4a420 <rtems_assoc_name_by_local+0x28> <== NEVER TAKEN
return nap->name;
return rtems_assoc_name_bad(local_value);
}
4a414: 2040 moveal %d0,%a0 4a416: 242e fffc movel %fp@(-4),%d2 4a41a: 4e5e unlk %fp 4a41c: 2010 movel %a0@,%d0 4a41e: 4e75 rts
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
4a420: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
}
4a424: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a428: 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);
4a42a: 4ef9 0004 cac0 jmp 4cac0 <rtems_assoc_name_bad> <== NOT EXECUTED
0004a430 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
4a430: 4e56 0000 linkw %fp,#0 4a434: 2f0a movel %a2,%sp@- 4a436: 246e 0008 moveal %fp@(8),%a2 4a43a: 2f02 movel %d2,%sp@- 4a43c: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4a440: 2012 movel %a2@,%d0
4a442: 6742 beqs 4a486 <rtems_assoc_ptr_by_local+0x56> <== NEVER TAKEN
4a444: 4879 0005 b648 pea 5b648 <IMFS_link_handlers+0x74> 4a44a: 2f00 movel %d0,%sp@- 4a44c: 4eb9 0004 e770 jsr 4e770 <strcmp> 4a452: 508f addql #8,%sp 4a454: 4a80 tstl %d0
4a456: 662a bnes 4a482 <rtems_assoc_ptr_by_local+0x52> <== ALWAYS TAKEN
default_ap = ap++;
4a458: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED
for ( ; ap->name; ap++)
4a45c: 4a90 tstl %a0@ <== NOT EXECUTED 4a45e: 6714 beqs 4a474 <rtems_assoc_ptr_by_local+0x44> <== NOT EXECUTED 4a460: 200a movel %a2,%d0 <== NOT EXECUTED 4a462: 2448 moveal %a0,%a2 <== NOT EXECUTED
if (ap->local_value == local_value)
4a464: b4aa 0004 cmpl %a2@(4),%d2
4a468: 670a beqs 4a474 <rtems_assoc_ptr_by_local+0x44>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4a46a: 45ea 000c lea %a2@(12),%a2 4a46e: 4a92 tstl %a2@
4a470: 66f2 bnes 4a464 <rtems_assoc_ptr_by_local+0x34>
4a472: 2440 moveal %d0,%a2
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4a474: 200a movel %a2,%d0 4a476: 242e fff8 movel %fp@(-8),%d2 4a47a: 246e fffc moveal %fp@(-4),%a2 4a47e: 4e5e unlk %fp 4a480: 4e75 rts
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4a482: 4280 clrl %d0 4a484: 60de bras 4a464 <rtems_assoc_ptr_by_local+0x34>
4a486: 95ca subal %a2,%a2 <== NOT EXECUTED
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4a488: 200a movel %a2,%d0 <== NOT EXECUTED 4a48a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4a48e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a492: 4e5e unlk %fp <== NOT EXECUTED
...
0004cad0 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4cad0: 4e56 0000 linkw %fp,#0 4cad4: 2f0a movel %a2,%sp@- 4cad6: 246e 0008 moveal %fp@(8),%a2 4cada: 2f02 movel %d2,%sp@- 4cadc: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4cae0: 2012 movel %a2@,%d0
4cae2: 6742 beqs 4cb26 <rtems_assoc_ptr_by_remote+0x56> <== NEVER TAKEN
4cae4: 4879 0005 b648 pea 5b648 <IMFS_link_handlers+0x74> 4caea: 2f00 movel %d0,%sp@- 4caec: 4eb9 0004 e770 jsr 4e770 <strcmp> 4caf2: 508f addql #8,%sp 4caf4: 4a80 tstl %d0
4caf6: 662a bnes 4cb22 <rtems_assoc_ptr_by_remote+0x52> <== ALWAYS TAKEN
default_ap = ap++;
4caf8: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED
for ( ; ap->name; ap++)
4cafc: 4a90 tstl %a0@ <== NOT EXECUTED 4cafe: 6714 beqs 4cb14 <rtems_assoc_ptr_by_remote+0x44> <== NOT EXECUTED 4cb00: 200a movel %a2,%d0 <== NOT EXECUTED 4cb02: 2448 moveal %a0,%a2 <== NOT EXECUTED
if (ap->remote_value == remote_value)
4cb04: b4aa 0008 cmpl %a2@(8),%d2
4cb08: 670a beqs 4cb14 <rtems_assoc_ptr_by_remote+0x44>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4cb0a: 45ea 000c lea %a2@(12),%a2 4cb0e: 4a92 tstl %a2@
4cb10: 66f2 bnes 4cb04 <rtems_assoc_ptr_by_remote+0x34>
4cb12: 2440 moveal %d0,%a2
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4cb14: 200a movel %a2,%d0 4cb16: 242e fff8 movel %fp@(-8),%d2 4cb1a: 246e fffc moveal %fp@(-4),%a2 4cb1e: 4e5e unlk %fp 4cb20: 4e75 rts
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4cb22: 4280 clrl %d0 4cb24: 60de bras 4cb04 <rtems_assoc_ptr_by_remote+0x34>
4cb26: 95ca subal %a2,%a2 <== NOT EXECUTED
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4cb28: 200a movel %a2,%d0 <== NOT EXECUTED 4cb2a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4cb2e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4cb32: 4e5e unlk %fp <== NOT EXECUTED
...
0004d560 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
4d560: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
4d564: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4d568: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d56c: 4eb9 0004 a430 jsr 4a430 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
4d572: 508f addql #8,%sp <== NOT EXECUTED 4d574: 4a80 tstl %d0 <== NOT EXECUTED 4d576: 6706 beqs 4d57e <rtems_assoc_remote_by_local+0x1e><== NOT EXECUTED
return nap->remote_value;
4d578: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d57a: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED
return 0;
}
4d57e: 4e5e unlk %fp <== NOT EXECUTED
...
0004cb38 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
4cb38: 4e56 ffe8 linkw %fp,#-24 4cb3c: 202e 0010 movel %fp@(16),%d0 4cb40: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4cb44: 242e 0008 movel %fp@(8),%d2 4cb48: 262e 000c movel %fp@(12),%d3 4cb4c: 246e 0014 moveal %fp@(20),%a2
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4cb50: 4a82 tstl %d2
4cb52: 677a beqs 4cbce <rtems_barrier_create+0x96>
return RTEMS_INVALID_NAME;
if ( !id )
4cb54: 4a8a tstl %a2 4cb56: 6700 00ce beqw 4cc26 <rtems_barrier_create+0xee>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
4cb5a: 0803 0004 btst #4,%d3
4cb5e: 677a beqs 4cbda <rtems_barrier_create+0xa2>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
4cb60: 4a80 tstl %d0 4cb62: 6700 00b4 beqw 4cc18 <rtems_barrier_create+0xe0> 4cb66: 2239 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d1 4cb6c: 5281 addql #1,%d1
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
4cb6e: 42ae fff8 clrl %fp@(-8)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
4cb72: 2d40 fffc movel %d0,%fp@(-4) 4cb76: 23c1 0005 d9c8 movel %d1,5d9c8 <_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 );
4cb7c: 4879 0005 dbea pea 5dbea <_Barrier_Information> 4cb82: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4cb88: 588f addql #4,%sp 4cb8a: 2640 moveal %d0,%a3 4cb8c: 4a80 tstl %d0
4cb8e: 6776 beqs 4cc06 <rtems_barrier_create+0xce> <== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
4cb90: 2743 0010 movel %d3,%a3@(16)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
4cb94: 486e fff8 pea %fp@(-8) 4cb98: 486b 0014 pea %a3@(20) 4cb9c: 4eb9 0004 d0cc jsr 4d0cc <_CORE_barrier_Initialize> 4cba2: 202b 0008 movel %a3@(8),%d0 4cba6: 4281 clrl %d1 4cba8: 2079 0005 dc02 moveal 5dc02 <_Barrier_Information+0x18>,%a0 4cbae: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4cbb0: 2742 000c movel %d2,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4cbb4: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
4cbb8: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4cbba: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4cbc0: 508f addql #8,%sp
(Objects_Name) name
);
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
4cbc2: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
4cbc4: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbca: 4e5e unlk %fp 4cbcc: 4e75 rts
)
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4cbce: 7003 moveq #3,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cbd0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbd6: 4e5e unlk %fp 4cbd8: 4e75 rts
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
4cbda: 7201 moveq #1,%d1 4cbdc: 2d41 fff8 movel %d1,%fp@(-8) 4cbe0: 2239 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d1 4cbe6: 5281 addql #1,%d1
the_attributes.maximum_count = maximum_waiters;
4cbe8: 2d40 fffc movel %d0,%fp@(-4) 4cbec: 23c1 0005 d9c8 movel %d1,5d9c8 <_Thread_Dispatch_disable_level> 4cbf2: 4879 0005 dbea pea 5dbea <_Barrier_Information> 4cbf8: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4cbfe: 588f addql #4,%sp 4cc00: 2640 moveal %d0,%a3 4cc02: 4a80 tstl %d0
4cc04: 668a bnes 4cb90 <rtems_barrier_create+0x58>
_Thread_Enable_dispatch();
4cc06: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4cc0c: 7005 moveq #5,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cc0e: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cc14: 4e5e unlk %fp 4cc16: 4e75 rts
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
4cc18: 103c 000a moveb #10,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cc1c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cc22: 4e5e unlk %fp 4cc24: 4e75 rts
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
4cc26: 7009 moveq #9,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cc28: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cc2e: 4e5e unlk %fp
...
00042708 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
42708: 4e56 ffec linkw %fp,#-20 4270c: 202e 0008 movel %fp@(8),%d0 42710: 48d7 043c moveml %d2-%d5/%a2,%sp@ 42714: 246e 000c moveal %fp@(12),%a2
const char *p;
if ( !name )
42718: 4a80 tstl %d0
4271a: 660e bnes 4272a <rtems_bsp_cmdline_get_param+0x22>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
4271c: 95ca subal %a2,%a2
return NULL;
copy_string( p, value, length );
return value;
}
4271e: 200a movel %a2,%d0 42720: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 42726: 4e5e unlk %fp 42728: 4e75 rts
const char *p;
if ( !name )
return NULL;
if ( !value )
4272a: 4a8a tstl %a2
4272c: 67f0 beqs 4271e <rtems_bsp_cmdline_get_param+0x16>
return NULL;
if ( !length )
4272e: 4aae 0010 tstl %fp@(16)
42732: 67e8 beqs 4271c <rtems_bsp_cmdline_get_param+0x14>
return NULL;
value[0] = '\0';
42734: 4212 clrb %a2@
p = rtems_bsp_cmdline_get_param_raw( name );
42736: 2f00 movel %d0,%sp@- 42738: 4eb9 0004 2798 jsr 42798 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
4273e: 588f addql #4,%sp
if ( !length )
return NULL;
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
42740: 2240 moveal %d0,%a1
if ( !p )
42742: 4a80 tstl %d0
42744: 67d6 beqs 4271c <rtems_bsp_cmdline_get_param+0x14>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
42746: 1411 moveb %a1@,%d2
42748: 67d4 beqs 4271e <rtems_bsp_cmdline_get_param+0x16><== NEVER TAKEN
4274a: 202e 0010 movel %fp@(16),%d0 4274e: 5380 subql #1,%d0
42750: 67cc beqs 4271e <rtems_bsp_cmdline_get_param+0x16><== NEVER TAKEN
42752: 91c8 subal %a0,%a0 42754: 4281 clrl %d1 42756: 4284 clrl %d4
if ( *p == '\"' ) {
42758: 7a22 moveq #34,%d5 4275a: 1602 moveb %d2,%d3 4275c: 49c3 extbl %d3 4275e: ba83 cmpl %d3,%d5
42760: 6730 beqs 42792 <rtems_bsp_cmdline_get_param+0x8a>
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
42762: 0804 0000 btst #0,%d4
42766: 6606 bnes 4276e <rtems_bsp_cmdline_get_param+0x66>
42768: 7a20 moveq #32,%d5 4276a: ba83 cmpl %d3,%d5
4276c: 67b0 beqs 4271e <rtems_bsp_cmdline_get_param+0x16>
break;
value[i++] = *p++;
4276e: 5281 addql #1,%d1 42770: 1582 8800 moveb %d2,%a2@(00000000,%a0:l)
value[i] = '\0';
42774: 4202 clrb %d2
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
42776: 2041 moveal %d1,%a0
value[i] = '\0';
42778: 1582 1800 moveb %d2,%a2@(00000000,%d1:l)
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
4277c: 1431 1800 moveb %a1@(00000000,%d1:l),%d2
42780: 679c beqs 4271e <rtems_bsp_cmdline_get_param+0x16>
42782: b081 cmpl %d1,%d0
42784: 62d2 bhis 42758 <rtems_bsp_cmdline_get_param+0x50><== ALWAYS TAKEN
return NULL;
copy_string( p, value, length );
return value;
}
42786: 200a movel %a2,%d0 <== NOT EXECUTED 42788: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 4278e: 4e5e unlk %fp <== NOT EXECUTED 42790: 4e75 rts <== NOT EXECUTED
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
42792: 5284 addql #1,%d4 42794: 60d8 bras 4276e <rtems_bsp_cmdline_get_param+0x66>
...
000427c0 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
427c0: 4e56 fff4 linkw %fp,#-12 427c4: 48d7 001c moveml %d2-%d4,%sp@
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
427c8: 2f2e 0010 movel %fp@(16),%sp@-
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
427cc: 242e 000c movel %fp@(12),%d2
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
427d0: 2f02 movel %d2,%sp@-
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
427d2: 282e 0008 movel %fp@(8),%d4
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
427d6: 2f04 movel %d4,%sp@- 427d8: 4eb9 0004 2708 jsr 42708 <rtems_bsp_cmdline_get_param>
if ( !p )
427de: 4fef 000c lea %sp@(12),%sp
{
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
427e2: 2600 movel %d0,%d3
if ( !p )
427e4: 660e bnes 427f4 <rtems_bsp_cmdline_get_param_rhs+0x34>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
427e6: 4282 clrl %d2
}
427e8: 2002 movel %d2,%d0 427ea: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 427f0: 4e5e unlk %fp 427f2: 4e75 rts
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
427f4: 2f04 movel %d4,%sp@- 427f6: 4eb9 0004 f250 jsr 4f250 <strlen> 427fc: 588f addql #4,%sp 427fe: 2043 moveal %d3,%a0 42800: d1c0 addal %d0,%a0
if ( *rhs != '=' )
42802: 723d moveq #61,%d1 42804: 1010 moveb %a0@,%d0 42806: 49c0 extbl %d0 42808: b280 cmpl %d0,%d1
4280a: 66da bnes 427e6 <rtems_bsp_cmdline_get_param_rhs+0x26><== NEVER TAKEN
return NULL;
rhs++;
4280c: 5288 addql #1,%a0
if ( *rhs == '\"' )
4280e: 7622 moveq #34,%d3 42810: 1010 moveb %a0@,%d0 42812: 1200 moveb %d0,%d1 42814: 49c1 extbl %d1 42816: b681 cmpl %d1,%d3
42818: 672a beqs 42844 <rtems_bsp_cmdline_get_param_rhs+0x84>
rhs++;
for ( d=value ; *rhs ; )
4281a: 4a00 tstb %d0
4281c: 672c beqs 4284a <rtems_bsp_cmdline_get_param_rhs+0x8a>
4281e: 2242 moveal %d2,%a1
*d++ = *rhs++;
42820: 5288 addql #1,%a0 42822: 12c0 moveb %d0,%a1@+
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42824: 1010 moveb %a0@,%d0
42826: 66f8 bnes 42820 <rtems_bsp_cmdline_get_param_rhs+0x60>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
42828: 2049 moveal %a1,%a0 4282a: 7222 moveq #34,%d1 4282c: 1020 moveb %a0@-,%d0 4282e: 49c0 extbl %d0 42830: b280 cmpl %d0,%d1
42832: 6702 beqs 42836 <rtems_bsp_cmdline_get_param_rhs+0x76>
42834: 2049 moveal %a1,%a0
d--;
*d = '\0';
return value;
}
42836: 2002 movel %d2,%d0
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
42838: 4210 clrb %a0@
return value;
}
4283a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 42840: 4e5e unlk %fp 42842: 4e75 rts
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
42844: 5288 addql #1,%a0 42846: 1010 moveb %a0@,%d0 42848: 60d0 bras 4281a <rtems_bsp_cmdline_get_param_rhs+0x5a>
for ( d=value ; *rhs ; )
4284a: 2242 moveal %d2,%a1 4284c: 60da bras 42828 <rtems_bsp_cmdline_get_param_rhs+0x68>
...
00046a5c <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
46a5c: 4e56 fff8 linkw %fp,#-8 46a60: 2f0a movel %a2,%sp@- 46a62: 246e 0008 moveal %fp@(8),%a2 46a66: 2f02 movel %d2,%sp@-
struct timespec newtime;
if ( !time_buffer )
46a68: 4a8a tstl %a2
46a6a: 6772 beqs 46ade <rtems_clock_set+0x82> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
46a6c: 2f0a movel %a2,%sp@- 46a6e: 4eb9 0004 6c3c jsr 46c3c <_TOD_Validate> 46a74: 588f addql #4,%sp 46a76: 4a00 tstb %d0
46a78: 660e bnes 46a88 <rtems_clock_set+0x2c>
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
46a7a: 242e fff0 movel %fp@(-16),%d2
struct timespec newtime;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
46a7e: 7014 moveq #20,%d0
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
46a80: 246e fff4 moveal %fp@(-12),%a2 46a84: 4e5e unlk %fp 46a86: 4e75 rts
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
46a88: 2f0a movel %a2,%sp@- 46a8a: 4eb9 0004 6b2c jsr 46b2c <_TOD_To_seconds>
newtime.tv_nsec = time_buffer->ticks *
46a90: 242a 0018 movel %a2@(24),%d2 46a94: 41f9 0005 ead0 lea 5ead0 <Configuration+0xc>,%a0 46a9a: 4c10 2800 mulsl %a0@,%d2
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
46a9e: 2d40 fff8 movel %d0,%fp@(-8)
newtime.tv_nsec = time_buffer->ticks *
46aa2: 203c 0000 03e8 movel #1000,%d0 46aa8: 4c02 0800 mulsl %d2,%d0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
46aac: 2239 0006 7fb8 movel 67fb8 <_Thread_Dispatch_disable_level>,%d1 46ab2: 5281 addql #1,%d1 46ab4: 2d40 fffc movel %d0,%fp@(-4) 46ab8: 23c1 0006 7fb8 movel %d1,67fb8 <_Thread_Dispatch_disable_level>
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
46abe: 486e fff8 pea %fp@(-8) 46ac2: 4eb9 0004 856c jsr 4856c <_TOD_Set>
_Thread_Enable_dispatch();
46ac8: 4eb9 0004 9880 jsr 49880 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
46ace: 242e fff0 movel %fp@(-16),%d2
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
46ad2: 508f addql #8,%sp
newtime.tv_nsec = time_buffer->ticks *
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
46ad4: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
46ad6: 246e fff4 moveal %fp@(-12),%a2 46ada: 4e5e unlk %fp 46adc: 4e75 rts 46ade: 242e fff0 movel %fp@(-16),%d2
rtems_time_of_day *time_buffer
)
{
struct timespec newtime;
if ( !time_buffer )
46ae2: 7009 moveq #9,%d0
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
46ae4: 246e fff4 moveal %fp@(-12),%a2
46ae8: 4e5e unlk %fp <== NOT EXECUTED
000431b8 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
431b8: 4e56 ff9c linkw %fp,#-100 431bc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 431c0: 262e 0008 movel %fp@(8),%d3 431c4: 286e 000c moveal %fp@(12),%a4
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
431c8: 4a8c tstl %a4 431ca: 6700 0140 beqw 4330c <rtems_cpu_usage_report_with_plugin+0x154>
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
431ce: 486e fff0 pea %fp@(-16)
}
}
}
#endif
(*print)(
431d2: 41f9 0006 7f74 lea 67f74 <_Objects_Information_table+0x4>,%a0
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
431d8: 280e movel %fp,%d4
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
431da: 2a0e movel %fp,%d5
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
431dc: 0684 ffff ffcb addil #-53,%d4
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
431e2: 0685 ffff ffe0 addil #-32,%d5
}
}
}
#endif
(*print)(
431e8: 2d48 ffc4 movel %a0,%fp@(-60)
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
431ec: 4eb9 0004 84a0 jsr 484a0 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
431f2: 486e ffe8 pea %fp@(-24) 431f6: 486e fff0 pea %fp@(-16) 431fa: 4879 0006 81c2 pea 681c2 <CPU_usage_Uptime_at_last_reset> 43200: 4eb9 0004 a828 jsr 4a828 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
43206: 4879 0005 d31c pea 5d31c <IntUartPollCallbacks.6560+0x20> 4320c: 2f03 movel %d3,%sp@- 4320e: 4e94 jsr %a4@
/*PAGE
*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
43210: 4fef 0018 lea %sp@(24),%sp
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
43214: 226e ffc4 moveal %fp@(-60),%a1 43218: 2051 moveal %a1@,%a0 4321a: 4a88 tstl %a0 4321c: 6700 00ba beqw 432d8 <rtems_cpu_usage_report_with_plugin+0x120>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
43220: 2668 0004 moveal %a0@(4),%a3
if ( information ) {
43224: 4a8b tstl %a3 43226: 6700 00b0 beqw 432d8 <rtems_cpu_usage_report_with_plugin+0x120>
for ( i=1 ; i <= information->maximum ; i++ ) {
4322a: 4a6b 000e tstw %a3@(14) 4322e: 6700 00a8 beqw 432d8 <rtems_cpu_usage_report_with_plugin+0x120> 43232: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
43234: 2c3c 0004 70ec movel #291052,%d6
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
4323a: 4bf9 0004 a740 lea 4a740 <_Timespec_Divide>,%a5
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
43240: 206b 0018 moveal %a3@(24),%a0 43244: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
43248: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
4324a: 4a8a tstl %a2
4324c: 677e beqs 432cc <rtems_cpu_usage_report_with_plugin+0x114><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
4324e: 2f04 movel %d4,%sp@- 43250: 4878 000d pea d <OPER1+0x1> 43254: 2046 moveal %d6,%a0 43256: 2f2a 0008 movel %a2@(8),%sp@- 4325a: 4e90 jsr %a0@
(*print)(
4325c: 2f04 movel %d4,%sp@- 4325e: 2f2a 0008 movel %a2@(8),%sp@- 43262: 4879 0005 d48e pea 5d48e <IntUartPollCallbacks.6560+0x192> 43268: 2f03 movel %d3,%sp@- 4326a: 4e94 jsr %a4@
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
4326c: 2079 0006 8072 moveal 68072 <_Thread_Executing>,%a0 43272: 4fef 001c lea %sp@(28),%sp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
43276: 202a 0082 movel %a2@(130),%d0 4327a: 222a 0086 movel %a2@(134),%d1 4327e: 2d40 ffe0 movel %d0,%fp@(-32) 43282: 2d41 ffe4 movel %d1,%fp@(-28)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
43286: 246a 0008 moveal %a2@(8),%a2 4328a: b5e8 0008 cmpal %a0@(8),%a2 4328e: 6700 0086 beqw 43316 <rtems_cpu_usage_report_with_plugin+0x15e>
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
43292: 486e fff8 pea %fp@(-8)
/*
* Print the information
*/
(*print)( context,
43296: 2e3c 0000 03e8 movel #1000,%d7
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
4329c: 486e fffc pea %fp@(-4) 432a0: 486e ffe8 pea %fp@(-24) 432a4: 2f05 movel %d5,%sp@- 432a6: 4e95 jsr %a5@
/*
* Print the information
*/
(*print)( context,
432a8: 2f2e fff8 movel %fp@(-8),%sp@- 432ac: 202e ffe4 movel %fp@(-28),%d0 432b0: 2f2e fffc movel %fp@(-4),%sp@- 432b4: 4c47 0000 remul %d7,%d0,%d0 432b8: 2f00 movel %d0,%sp@- 432ba: 2f2e ffe0 movel %fp@(-32),%sp@- 432be: 4879 0005 d4a1 pea 5d4a1 <IntUartPollCallbacks.6560+0x1a5> 432c4: 2f03 movel %d3,%sp@- 432c6: 4e94 jsr %a4@ 432c8: 4fef 0028 lea %sp@(40),%sp
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
432cc: 4280 clrl %d0 432ce: 302b 000e movew %a3@(14),%d0 432d2: b480 cmpl %d0,%d2 432d4: 6300 ff6a blsw 43240 <rtems_cpu_usage_report_with_plugin+0x88> 432d8: 58ae ffc4 addql #4,%fp@(-60)
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
432dc: 206e ffc4 moveal %fp@(-60),%a0 432e0: b1fc 0006 7f84 cmpal #425860,%a0 432e6: 6600 ff2c bnew 43214 <rtems_cpu_usage_report_with_plugin+0x5c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
432ea: 202e ffec movel %fp@(-20),%d0 432ee: 243c 0000 03e8 movel #1000,%d2 432f4: 4c42 0000 remul %d2,%d0,%d0 432f8: 2f00 movel %d0,%sp@- 432fa: 2f2e ffe8 movel %fp@(-24),%sp@- 432fe: 4879 0005 d4b9 pea 5d4b9 <IntUartPollCallbacks.6560+0x1bd> 43304: 2f03 movel %d3,%sp@- 43306: 4e94 jsr %a4@ 43308: 4fef 0010 lea %sp@(16),%sp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
4330c: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 43312: 4e5e unlk %fp 43314: 4e75 rts
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
43316: 486e ffd8 pea %fp@(-40)
/*
* Print the information
*/
(*print)( context,
4331a: 2e3c 0000 03e8 movel #1000,%d7
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
43320: 486e fff0 pea %fp@(-16) 43324: 4879 0006 807a pea 6807a <_Thread_Time_of_last_context_switch> 4332a: 4eb9 0004 a828 jsr 4a828 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
43330: 486e ffd8 pea %fp@(-40) 43334: 2f05 movel %d5,%sp@- 43336: 4eb9 0004 a6f8 jsr 4a6f8 <_Timespec_Add_to> 4333c: 4fef 0014 lea %sp@(20),%sp
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
43340: 486e fff8 pea %fp@(-8) 43344: 486e fffc pea %fp@(-4) 43348: 486e ffe8 pea %fp@(-24) 4334c: 2f05 movel %d5,%sp@- 4334e: 4e95 jsr %a5@
/*
* Print the information
*/
(*print)( context,
43350: 2f2e fff8 movel %fp@(-8),%sp@- 43354: 202e ffe4 movel %fp@(-28),%d0 43358: 2f2e fffc movel %fp@(-4),%sp@- 4335c: 4c47 0000 remul %d7,%d0,%d0 43360: 2f00 movel %d0,%sp@- 43362: 2f2e ffe0 movel %fp@(-32),%sp@- 43366: 4879 0005 d4a1 pea 5d4a1 <IntUartPollCallbacks.6560+0x1a5> 4336c: 2f03 movel %d3,%sp@- 4336e: 4e94 jsr %a4@ 43370: 4fef 0028 lea %sp@(40),%sp 43374: 6000 ff56 braw 432cc <rtems_cpu_usage_report_with_plugin+0x114>
0004d524 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
4d524: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4d528: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
4d52a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d52e: 4879 0005 b85c pea 5b85c <errno_assoc> <== NOT EXECUTED 4d534: 4eb9 0004 d560 jsr 4d560 <rtems_assoc_remote_by_local> <== NOT EXECUTED 4d53a: 508f addql #8,%sp <== NOT EXECUTED 4d53c: 2400 movel %d0,%d2 <== NOT EXECUTED 4d53e: 660a bnes 4d54a <rtems_deviceio_errno+0x26> <== NOT EXECUTED
{
errno = rc;
return -1;
}
return -1;
}
4d540: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4d544: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d546: 4e5e unlk %fp <== NOT EXECUTED 4d548: 4e75 rts <== NOT EXECUTED
{
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
{
errno = rc;
4d54a: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 4d550: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
}
return -1;
}
4d552: 70ff moveq #-1,%d0 <== NOT EXECUTED
{
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
{
errno = rc;
4d554: 2082 movel %d2,%a0@ <== NOT EXECUTED
return -1;
}
return -1;
}
4d556: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4d55a: 4e5e unlk %fp <== NOT EXECUTED
...
00042544 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
42544: 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);
42548: 486e 0010 pea %fp@(16) <== NOT EXECUTED 4254c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 42550: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42554: 4eba fdda jsr %pc@(42330 <rtems_verror>) <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
42558: 4e5e unlk %fp <== NOT EXECUTED
000425a4 <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
425a4: 4e56 fff0 linkw %fp,#-16 425a8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 425ac: 246e 0008 moveal %fp@(8),%a2
int len = strlen( pathname );
425b0: 2f0a movel %a2,%sp@- 425b2: 4eb9 0004 ec34 jsr 4ec34 <strlen> 425b8: 588f addql #4,%sp
while ( len ) {
425ba: 4a80 tstl %d0
425bc: 6742 beqs 42600 <rtems_filesystem_dirname+0x5c> <== NEVER TAKEN
len--;
425be: 2200 movel %d0,%d1 425c0: 5381 subql #1,%d1
if ( rtems_filesystem_is_separator( pathname[len] ) )
425c2: 782f moveq #47,%d4 425c4: 1632 1800 moveb %a2@(00000000,%d1:l),%d3 425c8: 1403 moveb %d3,%d2 425ca: 49c2 extbl %d2 425cc: b882 cmpl %d2,%d4
425ce: 673a beqs 4260a <rtems_filesystem_dirname+0x66> <== NEVER TAKEN
425d0: 183c 005c moveb #92,%d4 425d4: b882 cmpl %d2,%d4
425d6: 6732 beqs 4260a <rtems_filesystem_dirname+0x66> <== NEVER TAKEN
425d8: 4a03 tstb %d3
425da: 672e beqs 4260a <rtems_filesystem_dirname+0x66> <== NEVER TAKEN
425dc: 41f2 08fe lea %a2@(fffffffe,%d0:l),%a0 425e0: 2001 movel %d1,%d0
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
425e2: 4a80 tstl %d0
425e4: 671a beqs 42600 <rtems_filesystem_dirname+0x5c>
len--;
425e6: 5380 subql #1,%d0
if ( rtems_filesystem_is_separator( pathname[len] ) )
425e8: 762f moveq #47,%d3 425ea: 1410 moveb %a0@,%d2 425ec: 5388 subql #1,%a0 425ee: 1202 moveb %d2,%d1 425f0: 49c1 extbl %d1 425f2: b681 cmpl %d1,%d3
425f4: 670a beqs 42600 <rtems_filesystem_dirname+0x5c>
425f6: 785c moveq #92,%d4 425f8: b881 cmpl %d1,%d4
425fa: 6704 beqs 42600 <rtems_filesystem_dirname+0x5c> <== NEVER TAKEN
425fc: 4a02 tstb %d2
425fe: 66e2 bnes 425e2 <rtems_filesystem_dirname+0x3e> <== ALWAYS TAKEN
break;
}
return len;
}
42600: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42606: 4e5e unlk %fp 42608: 4e75 rts
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
4260a: 2001 movel %d1,%d0 <== NOT EXECUTED
if ( rtems_filesystem_is_separator( pathname[len] ) )
break;
}
return len;
}
4260c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42612: 4e5e unlk %fp <== NOT EXECUTED
00042720 <rtems_filesystem_evaluate_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
42720: 4e56 ffe8 linkw %fp,#-24 42724: 202e 0014 movel %fp@(20),%d0 42728: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4272c: 246e 0008 moveal %fp@(8),%a2 42730: 2a2e 000c movel %fp@(12),%d5 42734: 262e 0010 movel %fp@(16),%d3 42738: 282e 0018 movel %fp@(24),%d4
/*
* Verify Input parameters.
*/
if ( !pathname )
4273c: 4a8a tstl %a2 4273e: 6700 00bc beqw 427fc <rtems_filesystem_evaluate_path+0xdc>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
42742: 4a80 tstl %d0 42744: 6700 009e beqw 427e4 <rtems_filesystem_evaluate_path+0xc4>
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
42748: 7c2f moveq #47,%d6 4274a: 1412 moveb %a2@,%d2 4274c: 1202 moveb %d2,%d1 4274e: 49c1 extbl %d1 42750: bc81 cmpl %d1,%d6
42752: 670c beqs 42760 <rtems_filesystem_evaluate_path+0x40>
42754: 1c3c 005c moveb #92,%d6 42758: bc81 cmpl %d1,%d6
4275a: 6704 beqs 42760 <rtems_filesystem_evaluate_path+0x40><== NEVER TAKEN
4275c: 4a02 tstb %d2
4275e: 6646 bnes 427a6 <rtems_filesystem_evaluate_path+0x86><== ALWAYS TAKEN
42760: 2279 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a1 42766: 2040 moveal %d0,%a0 42768: 7401 moveq #1,%d2 4276a: 7201 moveq #1,%d1
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
4276c: 9a82 subl %d2,%d5 4276e: d5c1 addal %d1,%a2
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
42770: 20e9 0018 movel %a1@(24),%a0@+ 42774: 20e9 001c movel %a1@(28),%a0@+ 42778: 20e9 0020 movel %a1@(32),%a0@+ 4277c: 20e9 0024 movel %a1@(36),%a0@+ 42780: 20a9 0028 movel %a1@(40),%a0@
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
42784: 2d45 000c movel %d5,%fp@(12) 42788: 2d4a 0008 movel %a2,%fp@(8) 4278c: 2d44 0018 movel %d4,%fp@(24) 42790: 2d43 0010 movel %d3,%fp@(16)
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42794: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
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],
4279a: 2d40 0014 movel %d0,%fp@(20)
pathnamelen - i,
flags,
pathloc,
follow_link );
}
4279e: 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],
427a0: 4ef9 0004 2616 jmp 42616 <rtems_filesystem_evaluate_relative_path>
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
427a6: 2279 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a1 427ac: 2040 moveal %d0,%a0 427ae: 5889 addql #4,%a1 427b0: 4282 clrl %d2 427b2: 4281 clrl %d1
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
427b4: 9a82 subl %d2,%d5 427b6: d5c1 addal %d1,%a2
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
427b8: 20d9 movel %a1@+,%a0@+ 427ba: 20d9 movel %a1@+,%a0@+ 427bc: 20d9 movel %a1@+,%a0@+ 427be: 20d9 movel %a1@+,%a0@+ 427c0: 2091 movel %a1@,%a0@
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
427c2: 2d45 000c movel %d5,%fp@(12) 427c6: 2d4a 0008 movel %a2,%fp@(8) 427ca: 2d44 0018 movel %d4,%fp@(24) 427ce: 2d43 0010 movel %d3,%fp@(16)
pathnamelen - i,
flags,
pathloc,
follow_link );
}
427d2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
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],
427d8: 2d40 0014 movel %d0,%fp@(20)
pathnamelen - i,
flags,
pathloc,
follow_link );
}
427dc: 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],
427de: 4ef9 0004 2616 jmp 42616 <rtems_filesystem_evaluate_relative_path>
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
427e4: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 427ea: 7405 moveq #5,%d2 <== NOT EXECUTED 427ec: 2040 moveal %d0,%a0 <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
427ee: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
427f0: 2082 movel %d2,%a0@ <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
427f2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 427f8: 4e5e unlk %fp <== NOT EXECUTED 427fa: 4e75 rts <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
427fc: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 42802: 760e moveq #14,%d3 <== NOT EXECUTED 42804: 2040 moveal %d0,%a0 <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42806: 70ff moveq #-1,%d0 <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42808: 2083 movel %d3,%a0@ <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
4280a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 42810: 4e5e unlk %fp <== NOT EXECUTED
00042616 <rtems_filesystem_evaluate_relative_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
42616: 4e56 fff0 linkw %fp,#-16 4261a: 222e 0008 movel %fp@(8),%d1 4261e: 48d7 041c moveml %d2-%d4/%a2,%sp@ 42622: 202e 000c movel %fp@(12),%d0 42626: 242e 0010 movel %fp@(16),%d2 4262a: 246e 0014 moveal %fp@(20),%a2 4262e: 282e 0018 movel %fp@(24),%d4
/*
* Verify Input parameters.
*/
if ( !pathname )
42632: 4a81 tstl %d1 42634: 6700 00d0 beqw 42706 <rtems_filesystem_evaluate_relative_path+0xf0>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
42638: 4a8a tstl %a2 4263a: 6700 00b0 beqw 426ec <rtems_filesystem_evaluate_relative_path+0xd6>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
4263e: 206a 000c moveal %a2@(12),%a0 42642: 2050 moveal %a0@,%a0 42644: 4a88 tstl %a0
42646: 6768 beqs 426b0 <rtems_filesystem_evaluate_relative_path+0x9a><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
42648: 2f0a movel %a2,%sp@- 4264a: 2f02 movel %d2,%sp@- 4264c: 2f00 movel %d0,%sp@- 4264e: 2f01 movel %d1,%sp@- 42650: 4e90 jsr %a0@
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
42652: 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 );
42656: 2600 movel %d0,%d3
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
42658: 661e bnes 42678 <rtems_filesystem_evaluate_relative_path+0x62>
4265a: 4a84 tstl %d4
4265c: 671a beqs 42678 <rtems_filesystem_evaluate_relative_path+0x62>
if ( !pathloc->ops->node_type_h ){
4265e: 226a 000c moveal %a2@(12),%a1 42662: 2069 0010 moveal %a1@(16),%a0 42666: 4a88 tstl %a0
42668: 6762 beqs 426cc <rtems_filesystem_evaluate_relative_path+0xb6><== NEVER TAKEN
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
4266a: 2f0a movel %a2,%sp@- 4266c: 4e90 jsr %a0@
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
4266e: 588f addql #4,%sp 42670: 7201 moveq #1,%d1 42672: 5780 subql #3,%d0 42674: b280 cmpl %d0,%d1
42676: 640c bccs 42684 <rtems_filesystem_evaluate_relative_path+0x6e>
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42678: 2003 movel %d3,%d0 4267a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42680: 4e5e unlk %fp 42682: 4e75 rts
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
42684: 206a 000c moveal %a2@(12),%a0 42688: 2268 0034 moveal %a0@(52),%a1 4268c: 4a89 tstl %a1
4268e: 6712 beqs 426a2 <rtems_filesystem_evaluate_relative_path+0x8c><== NEVER TAKEN
* 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 );
42690: 2d42 000c movel %d2,%fp@(12) 42694: 2d4a 0008 movel %a2,%fp@(8)
}
}
return result;
}
42698: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4269e: 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 );
426a0: 4ed1 jmp %a1@
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
426a2: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 426a6: 6708 beqs 426b0 <rtems_filesystem_evaluate_relative_path+0x9a><== NOT EXECUTED 426a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 426aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 426ac: 4e90 jsr %a0@ <== NOT EXECUTED 426ae: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
426b0: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 426b6: 76ff moveq #-1,%d3 <== NOT EXECUTED 426b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 426ba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
426c0: 2003 movel %d3,%d0 <== NOT EXECUTED 426c2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 426c8: 4e5e unlk %fp <== NOT EXECUTED 426ca: 4e75 rts <== NOT EXECUTED
*/
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type_h ){
rtems_filesystem_freenode( pathloc );
426cc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 426d0: 4a88 tstl %a0 <== NOT EXECUTED 426d2: 67dc beqs 426b0 <rtems_filesystem_evaluate_relative_path+0x9a><== NOT EXECUTED 426d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
426d6: 76ff moveq #-1,%d3 <== NOT EXECUTED
*/
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type_h ){
rtems_filesystem_freenode( pathloc );
426d8: 4e90 jsr %a0@ <== NOT EXECUTED 426da: 588f addql #4,%sp <== NOT EXECUTED
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
426dc: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 426e2: 2040 moveal %d0,%a0 <== NOT EXECUTED 426e4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 426ea: 60d4 bras 426c0 <rtems_filesystem_evaluate_relative_path+0xaa><== NOT EXECUTED
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
426ec: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 426f2: 76ff moveq #-1,%d3 <== NOT EXECUTED 426f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 426f6: 7005 moveq #5,%d0 <== NOT EXECUTED 426f8: 2080 movel %d0,%a0@ <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
426fa: 2003 movel %d3,%d0 <== NOT EXECUTED 426fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42702: 4e5e unlk %fp <== NOT EXECUTED 42704: 4e75 rts <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42706: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 4270c: 76ff moveq #-1,%d3 <== NOT EXECUTED 4270e: 720e moveq #14,%d1 <== NOT EXECUTED 42710: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42712: 2003 movel %d3,%d0 <== NOT EXECUTED 42714: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
4271a: 2081 movel %d1,%a0@ <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
4271c: 4e5e unlk %fp <== NOT EXECUTED
000421e8 <rtems_filesystem_initialize>:
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
421e8: 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 )
{
421ea: 4e56 ffdc linkw %fp,#-36
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
421ee: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 421f4: 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 )
{
421f8: 48d7 1c00 moveml %a2-%a4,%sp@
*/
rtems_filesystem_umask = 022;
init_fs_mount_table();
421fc: 4eb9 0004 2b04 jsr 42b04 <init_fs_mount_table>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
42202: 4ab9 0005 ab18 tstl 5ab18 <rtems_filesystem_mount_table_size> 42208: 6700 00e8 beqw 422f2 <rtems_filesystem_initialize+0x10a>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
4220c: 2079 0005 c1ec moveal 5c1ec <rtems_filesystem_mount_table>,%a0
status = mount(
42212: 2f28 000c movel %a0@(12),%sp@- 42216: 2f28 0008 movel %a0@(8),%sp@- 4221a: 2f28 0004 movel %a0@(4),%sp@- 4221e: 2f10 movel %a0@,%sp@- 42220: 486e fffc pea %fp@(-4) 42224: 4eb9 0004 2b26 jsr 42b26 <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
4222a: 4fef 0014 lea %sp@(20),%sp 4222e: 72ff moveq #-1,%d1 42230: b280 cmpl %d0,%d1 42232: 6700 00d6 beqw 4230a <rtems_filesystem_initialize+0x122>
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
42236: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
4223c: 45ee ffe8 lea %fp@(-24),%a2 42240: 49f9 0004 2720 lea 42720 <rtems_filesystem_evaluate_path>,%a4
rtems_filesystem_root = loc;
42246: 47ee fff8 lea %fp@(-8),%a3
* set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
4224a: 226e fffc moveal %fp@(-4),%a1 4224e: 2169 001c 0018 movel %a1@(28),%a0@(24) 42254: 2169 0020 001c movel %a1@(32),%a0@(28) 4225a: 2169 0024 0020 movel %a1@(36),%a0@(32) 42260: 2169 0028 0024 movel %a1@(40),%a0@(36) 42266: 2169 002c 0028 movel %a1@(44),%a0@(40)
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
4226c: 4240 clrw %d0 4226e: 3140 0030 movew %d0,%a0@(48)
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
42272: 42a7 clrl %sp@- 42274: 2f0a movel %a2,%sp@- 42276: 42a7 clrl %sp@- 42278: 4878 0001 pea 1 <ADD> 4227c: 4879 0005 ae82 pea 5ae82 <IntUartPollCallbacks.6560+0x20> 42282: 4e94 jsr %a4@
rtems_filesystem_root = loc;
42284: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 4228a: 2152 0018 movel %a2@,%a0@(24) 4228e: 216e ffec 001c movel %fp@(-20),%a0@(28) 42294: 216e fff0 0020 movel %fp@(-16),%a0@(32) 4229a: 216e fff4 0024 movel %fp@(-12),%a0@(36) 422a0: 2153 0028 movel %a3@,%a0@(40)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
422a4: 42a7 clrl %sp@- 422a6: 2f0a movel %a2,%sp@- 422a8: 42a7 clrl %sp@- 422aa: 4878 0001 pea 1 <ADD> 422ae: 4879 0005 ae82 pea 5ae82 <IntUartPollCallbacks.6560+0x20> 422b4: 4e94 jsr %a4@
rtems_filesystem_current = loc;
422b6: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 422bc: 5888 addql #4,%a0
*
* 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);
422be: 4fef 0028 lea %sp@(40),%sp
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
422c2: 20d2 movel %a2@,%a0@+ 422c4: 20ee ffec movel %fp@(-20),%a0@+ 422c8: 20ee fff0 movel %fp@(-16),%a0@+ 422cc: 20ee fff4 movel %fp@(-12),%a0@+ 422d0: 2093 movel %a3@,%a0@
*
* 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);
422d2: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 422d6: 4879 0005 ae84 pea 5ae84 <IntUartPollCallbacks.6560+0x22> 422dc: 4eb9 0004 2988 jsr 42988 <mkdir>
if ( status != 0 )
422e2: 508f addql #8,%sp 422e4: 4a80 tstl %d0
422e6: 6616 bnes 422fe <rtems_filesystem_initialize+0x116><== NEVER TAKEN
* 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. */ }
422e8: 4cee 1c00 ffdc moveml %fp@(-36),%a2-%a4 422ee: 4e5e unlk %fp 422f0: 4e75 rts
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
422f2: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 422f8: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
422fe: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42304: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
status = mount(
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
4230a: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 42310: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
0004955c <rtems_filesystem_nodes_equal>:
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
4955c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49560: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 49564: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access ); }
49568: 4e5e unlk %fp <== NOT EXECUTED
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
4956a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4956c: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 4956e: 57c0 seq %d0 <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access ); }
49570: 4480 negl %d0 <== NOT EXECUTED
0004255c <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
4255c: 4e56 0000 linkw %fp,#0 42560: 206e 0008 moveal %fp@(8),%a0 42564: 2f02 movel %d2,%sp@- 42566: 226e 000c moveal %fp@(12),%a1
/* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
4256a: 1210 moveb %a0@,%d1
4256c: 672e beqs 4259c <rtems_filesystem_prefix_separators+0x40><== NEVER TAKEN
4256e: 4a89 tstl %a1
42570: 672a beqs 4259c <rtems_filesystem_prefix_separators+0x40><== NEVER TAKEN
42572: 4280 clrl %d0 42574: 49c1 extbl %d1 42576: 742f moveq #47,%d2 42578: b481 cmpl %d1,%d2
4257a: 670e beqs 4258a <rtems_filesystem_prefix_separators+0x2e>
4257c: 143c 005c moveb #92,%d2 42580: b481 cmpl %d1,%d2
42582: 6706 beqs 4258a <rtems_filesystem_prefix_separators+0x2e><== NEVER TAKEN
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
42584: 241f movel %sp@+,%d2 42586: 4e5e unlk %fp 42588: 4e75 rts
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
{
pathname++;
pathnamelen--;
stripped++;
4258a: 5280 addql #1,%d0
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
4258c: 1230 0800 moveb %a0@(00000000,%d0:l),%d1
42590: 67f2 beqs 42584 <rtems_filesystem_prefix_separators+0x28><== NEVER TAKEN
42592: b089 cmpl %a1,%d0
42594: 66de bnes 42574 <rtems_filesystem_prefix_separators+0x18><== ALWAYS TAKEN
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
42596: 241f movel %sp@+,%d2 <== NOT EXECUTED 42598: 4e5e unlk %fp <== NOT EXECUTED 4259a: 4e75 rts <== NOT EXECUTED 4259c: 241f movel %sp@+,%d2 <== NOT EXECUTED
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
4259e: 4280 clrl %d0 <== NOT EXECUTED
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
425a0: 4e5e unlk %fp <== NOT EXECUTED
000420b4 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
420b4: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 420b8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 420bc: 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 );
420c0: 45f9 0004 ec34 lea 4ec34 <strlen>,%a2 <== NOT EXECUTED 420c6: 240e movel %fp,%d2 <== NOT EXECUTED 420c8: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 420ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 420d0: 4e92 jsr %a2@ <== NOT EXECUTED 420d2: 7201 moveq #1,%d1 <== NOT EXECUTED 420d4: 2e81 movel %d1,%sp@ <== NOT EXECUTED 420d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 420d8: 42a7 clrl %sp@- <== NOT EXECUTED 420da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 420dc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 420de: 4eb9 0004 2720 jsr 42720 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
420e4: 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 );
420e8: 2800 movel %d0,%d4 <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
420ea: 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;
420ee: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
420f2: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 420f6: 4a88 tstl %a0 <== NOT EXECUTED 420f8: 6730 beqs 4212a <rtems_io_lookup_name+0x76> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
420fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 420fc: 4e90 jsr %a0@ <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
420fe: 588f addql #4,%sp <== NOT EXECUTED 42100: 4a84 tstl %d4 <== NOT EXECUTED 42102: 674e beqs 42152 <rtems_io_lookup_name+0x9e> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
42104: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42108: 4a88 tstl %a0 <== NOT EXECUTED 4210a: 6700 0092 beqw 4219e <rtems_io_lookup_name+0xea> <== NOT EXECUTED 4210e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42112: 4a88 tstl %a0 <== NOT EXECUTED 42114: 6700 0088 beqw 4219e <rtems_io_lookup_name+0xea> <== NOT EXECUTED 42118: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4211a: 4e90 jsr %a0@ <== NOT EXECUTED 4211c: 588f addql #4,%sp <== NOT EXECUTED 4211e: 700d moveq #13,%d0 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
42120: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 42126: 4e5e unlk %fp <== NOT EXECUTED 42128: 4e75 rts <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
4212a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4212e: 4a88 tstl %a0 <== NOT EXECUTED 42130: 6706 beqs 42138 <rtems_io_lookup_name+0x84> <== NOT EXECUTED 42132: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42134: 4e90 jsr %a0@ <== NOT EXECUTED 42136: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
42138: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 4213e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42140: 70ff moveq #-1,%d0 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
42142: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
42148: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
4214e: 4e5e unlk %fp <== NOT EXECUTED 42150: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
42152: 7202 moveq #2,%d1 <== NOT EXECUTED 42154: b280 cmpl %d0,%d1 <== NOT EXECUTED 42156: 66ac bnes 42104 <rtems_io_lookup_name+0x50> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
42158: 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;
4215a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4215e: 2083 movel %d3,%a0@ <== NOT EXECUTED
device_info->device_name_length = strlen( name );
42160: 4e92 jsr %a2@ <== NOT EXECUTED 42162: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
42166: 41eb 004c lea %a3@(76),%a0 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
4216a: 47eb 0050 lea %a3@(80),%a3 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
4216e: 588f addql #4,%sp <== NOT EXECUTED 42170: 2340 0004 movel %d0,%a1@(4) <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
42174: 2350 0008 movel %a0@,%a1@(8) <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
42178: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
4217c: 2353 000c movel %a3@,%a1@(12) <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
42180: 4a88 tstl %a0 <== NOT EXECUTED 42182: 6726 beqs 421aa <rtems_io_lookup_name+0xf6> <== NOT EXECUTED 42184: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42188: 4a88 tstl %a0 <== NOT EXECUTED 4218a: 671e beqs 421aa <rtems_io_lookup_name+0xf6> <== NOT EXECUTED 4218c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4218e: 4e90 jsr %a0@ <== NOT EXECUTED 42190: 588f addql #4,%sp <== NOT EXECUTED 42192: 4280 clrl %d0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
42194: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4219a: 4e5e unlk %fp <== NOT EXECUTED 4219c: 4e75 rts <== NOT EXECUTED
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
4219e: 700d moveq #13,%d0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
421a0: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 421a6: 4e5e unlk %fp <== NOT EXECUTED 421a8: 4e75 rts <== NOT EXECUTED
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
421aa: 4280 clrl %d0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
421ac: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 421b2: 4e5e unlk %fp <== NOT EXECUTED
0004d014 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
4d014: 4e56 0000 linkw %fp,#0 4d018: 202e 0008 movel %fp@(8),%d0 4d01c: 2f03 movel %d3,%sp@- 4d01e: 222e 000c movel %fp@(12),%d1 4d022: 206e 0010 moveal %fp@(16),%a0 4d026: 2f02 movel %d2,%sp@-
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
4d028: b0b9 0005 dbe2 cmpl 5dbe2 <_IO_Number_of_drivers>,%d0
4d02e: 642c bccs 4d05c <rtems_io_read+0x48> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
4d030: 2600 movel %d0,%d3 4d032: 2400 movel %d0,%d2 4d034: e78b lsll #3,%d3 4d036: eb8a lsll #5,%d2 4d038: 2279 0005 dbe6 moveal 5dbe6 <_IO_Driver_address_table>,%a1 4d03e: 9483 subl %d3,%d2 4d040: 2271 280c moveal %a1@(0000000c,%d2:l),%a1
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
4d044: 4a89 tstl %a1
4d046: 671e beqs 4d066 <rtems_io_read+0x52>
4d048: 2d48 0010 movel %a0,%fp@(16) 4d04c: 2d41 000c movel %d1,%fp@(12) 4d050: 2d40 0008 movel %d0,%fp@(8)
}
4d054: 241f movel %sp@+,%d2 4d056: 261f movel %sp@+,%d3 4d058: 4e5e unlk %fp
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
4d05a: 4ed1 jmp %a1@
}
4d05c: 241f movel %sp@+,%d2
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
4d05e: 700a moveq #10,%d0
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
4d060: 261f movel %sp@+,%d3 4d062: 4e5e unlk %fp 4d064: 4e75 rts 4d066: 241f movel %sp@+,%d2
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
4d068: 4280 clrl %d0
}
4d06a: 261f movel %sp@+,%d3
4d06c: 4e5e unlk %fp <== NOT EXECUTED
00048334 <rtems_io_register_driver>:
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
)
{
48334: 4e56 fff4 linkw %fp,#-12 48338: 226e 000c moveal %fp@(12),%a1 4833c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48340: 242e 0008 movel %fp@(8),%d2 48344: 246e 0010 moveal %fp@(16),%a2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
48348: 2039 0006 3d86 movel 63d86 <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
4834e: 2239 0006 3bda movel 63bda <_ISR_Nest_level>,%d1 48354: 6600 009c bnew 483f2 <rtems_io_register_driver+0xbe>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
48358: 4a8a tstl %a2 4835a: 6700 00ea beqw 48446 <rtems_io_register_driver+0x112>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
4835e: 2480 movel %d0,%a2@
if ( driver_table == NULL )
48360: 4a89 tstl %a1 48362: 6700 00e2 beqw 48446 <rtems_io_register_driver+0x112>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48366: 4a91 tstl %a1@ 48368: 6700 00d4 beqw 4843e <rtems_io_register_driver+0x10a>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
4836c: b480 cmpl %d0,%d2
4836e: 6476 bccs 483e6 <rtems_io_register_driver+0xb2>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
48370: 2039 0006 3b40 movel 63b40 <_Thread_Dispatch_disable_level>,%d0 48376: 5280 addql #1,%d0 48378: 23c0 0006 3b40 movel %d0,63b40 <_Thread_Dispatch_disable_level>
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
4837e: 4a82 tstl %d2
48380: 667c bnes 483fe <rtems_io_register_driver+0xca>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
48382: 2039 0006 3d86 movel 63d86 <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
48388: 6700 00fc beqw 48486 <rtems_io_register_driver+0x152> 4838c: 2239 0006 3d8a movel 63d8a <_IO_Driver_address_table>,%d1 48392: 2041 moveal %d1,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48394: 4a90 tstl %a0@ 48396: 6700 008e beqw 48426 <rtems_io_register_driver+0xf2>
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 ) {
4839a: 5282 addql #1,%d2 4839c: 41e8 0018 lea %a0@(24),%a0 483a0: b480 cmpl %d0,%d2
483a2: 65f0 bcss 48394 <rtems_io_register_driver+0x60>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
483a4: 2482 movel %d2,%a2@
if ( m != n )
483a6: b480 cmpl %d0,%d2 483a8: 6700 00de beqw 48488 <rtems_io_register_driver+0x154> 483ac: 2602 movel %d2,%d3 483ae: 2002 movel %d2,%d0 483b0: 2041 moveal %d1,%a0 483b2: e78b lsll #3,%d3 483b4: eb88 lsll #5,%d0 483b6: 9083 subl %d3,%d0 483b8: d1c0 addal %d0,%a0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
483ba: 20d9 movel %a1@+,%a0@+ 483bc: 20d9 movel %a1@+,%a0@+ 483be: 20d9 movel %a1@+,%a0@+ 483c0: 20d9 movel %a1@+,%a0@+ 483c2: 20d9 movel %a1@+,%a0@+ 483c4: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
483c6: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
483cc: 2d42 0008 movel %d2,%fp@(8)
}
483d0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
483d6: 42ae 0010 clrl %fp@(16) 483da: 42ae 000c clrl %fp@(12)
}
483de: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
483e0: 4ef9 0005 092c jmp 5092c <rtems_io_initialize>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
483e6: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
483e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483ee: 4e5e unlk %fp 483f0: 4e75 rts
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
483f2: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
483f4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483fa: 4e5e unlk %fp 483fc: 4e75 rts
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
483fe: 2202 movel %d2,%d1 48400: 2002 movel %d2,%d0 48402: e789 lsll #3,%d1 48404: eb88 lsll #5,%d0 48406: 2079 0006 3d8a moveal 63d8a <_IO_Driver_address_table>,%a0 4840c: 9081 subl %d1,%d0 4840e: d1c0 addal %d0,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48410: 4a90 tstl %a0@
48412: 673e beqs 48452 <rtems_io_register_driver+0x11e>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
48414: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> 4841a: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4841c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48422: 4e5e unlk %fp 48424: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48426: 4aa8 0004 tstl %a0@(4) 4842a: 6700 ff78 beqw 483a4 <rtems_io_register_driver+0x70>
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 ) {
4842e: 5282 addql #1,%d2 48430: 41e8 0018 lea %a0@(24),%a0 48434: b480 cmpl %d0,%d2 48436: 6500 ff5c bcsw 48394 <rtems_io_register_driver+0x60> 4843a: 6000 ff68 braw 483a4 <rtems_io_register_driver+0x70>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
4843e: 4aa9 0004 tstl %a1@(4) 48442: 6600 ff28 bnew 4836c <rtems_io_register_driver+0x38>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48446: 7009 moveq #9,%d0
}
48448: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4844e: 4e5e unlk %fp 48450: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48452: 4aa8 0004 tstl %a0@(4)
48456: 66bc bnes 48414 <rtems_io_register_driver+0xe0>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
48458: 20d9 movel %a1@+,%a0@+ 4845a: 20d9 movel %a1@+,%a0@+ 4845c: 20d9 movel %a1@+,%a0@+ 4845e: 20d9 movel %a1@+,%a0@+ 48460: 20d9 movel %a1@+,%a0@+ 48462: 2091 movel %a1@,%a0@
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
48464: 2482 movel %d2,%a2@
}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
48466: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
4846c: 2d42 0008 movel %d2,%fp@(8)
}
48470: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48476: 42ae 0010 clrl %fp@(16) 4847a: 42ae 000c clrl %fp@(12)
}
4847e: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48480: 4ef9 0005 092c jmp 5092c <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
48486: 4292 clrl %a2@ <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
48488: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> 4848e: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48490: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48496: 4e5e unlk %fp
...
00048aa8 <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
48aa8: 4e56 fff0 linkw %fp,#-16 48aac: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48ab0: 266e 0008 moveal %fp@(8),%a3
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
48ab4: 4a8b tstl %a3
48ab6: 6744 beqs 48afc <rtems_iterate_over_all_threads+0x54><== NEVER TAKEN
48ab8: 49f9 0006 7f74 lea 67f74 <_Objects_Information_table+0x4>,%a4
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
48abe: 2054 moveal %a4@,%a0 48ac0: 4a88 tstl %a0
48ac2: 672e beqs 48af2 <rtems_iterate_over_all_threads+0x4a>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
48ac4: 2468 0004 moveal %a0@(4),%a2
if ( !information )
48ac8: 4a8a tstl %a2
48aca: 6726 beqs 48af2 <rtems_iterate_over_all_threads+0x4a><== NEVER TAKEN
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
48acc: 4a6a 000e tstw %a2@(14)
48ad0: 6720 beqs 48af2 <rtems_iterate_over_all_threads+0x4a><== NEVER TAKEN
48ad2: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
48ad4: 206a 0018 moveal %a2@(24),%a0 48ad8: 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++ ) {
48adc: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
48ade: 4a80 tstl %d0
48ae0: 6706 beqs 48ae8 <rtems_iterate_over_all_threads+0x40><== NEVER TAKEN
continue;
(*routine)(the_thread);
48ae2: 2f00 movel %d0,%sp@- 48ae4: 4e93 jsr %a3@ 48ae6: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
48ae8: 4280 clrl %d0 48aea: 302a 000e movew %a2@(14),%d0 48aee: b480 cmpl %d0,%d2
48af0: 63e2 blss 48ad4 <rtems_iterate_over_all_threads+0x2c>
48af2: 588c addql #4,%a4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
48af4: b9fc 0006 7f84 cmpal #425860,%a4
48afa: 66c2 bnes 48abe <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread);
}
}
}
48afc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48b02: 4e5e unlk %fp
...
0004a960 <rtems_libio_allocate>:
* This routine searches the IOP Table for an unused entry. If it
* finds one, it returns it. Otherwise, it returns NULL.
*/
rtems_libio_t *rtems_libio_allocate( void )
{
4a960: 4e56 fffc linkw %fp,#-4 4a964: 2f0a movel %a2,%sp@- 4a966: 2f02 movel %d2,%sp@-
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4a968: 42a7 clrl %sp@- 4a96a: 42a7 clrl %sp@- 4a96c: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@- 4a972: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain>
rtems_status_code rc;
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
4a978: 2039 0005 d870 movel 5d870 <rtems_libio_iop_freelist>,%d0 4a97e: 4fef 000c lea %sp@(12),%sp
4a982: 661c bnes 4a9a0 <rtems_libio_allocate+0x40>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4a984: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@-
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
rtems_libio_iop_freelist = next;
goto done;
4a98a: 95ca subal %a2,%a2 4a98c: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
4a992: 242e fff4 movel %fp@(-12),%d2 4a996: 200a movel %a2,%d0 4a998: 246e fff8 moveal %fp@(-8),%a2 4a99c: 4e5e unlk %fp 4a99e: 4e75 rts
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
rc = rtems_semaphore_create(
4a9a0: 486e fffc pea %fp@(-4) 4a9a4: 90b9 0005 d86c subl 5d86c <rtems_libio_iops>,%d0 4a9aa: ec80 asrl #6,%d0 4a9ac: 42a7 clrl %sp@- 4a9ae: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 4a9b2: 4878 0001 pea 1 <ADD> 4a9b6: 0080 4c42 4900 oril #1279412480,%d0 4a9bc: 2f00 movel %d0,%sp@- 4a9be: 4eb9 0004 5a8c jsr 45a8c <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
0,
&sema
);
if (rc != RTEMS_SUCCESSFUL)
4a9c4: 4fef 0014 lea %sp@(20),%sp 4a9c8: 4a80 tstl %d0
4a9ca: 66b8 bnes 4a984 <rtems_libio_allocate+0x24> <== NEVER TAKEN
goto failed;
iop = rtems_libio_iop_freelist;
4a9cc: 2479 0005 d870 moveal 5d870 <rtems_libio_iop_freelist>,%a2
next = iop->data1;
4a9d2: 242a 0034 movel %a2@(52),%d2
(void) memset( iop, 0, sizeof(rtems_libio_t) );
4a9d6: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 4a9da: 42a7 clrl %sp@- 4a9dc: 2f0a movel %a2,%sp@- 4a9de: 4eb9 0004 e0f8 jsr 4e0f8 <memset>
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
4a9e4: 256e fffc 002c movel %fp@(-4),%a2@(44)
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
4a9ea: 203c 0000 0100 movel #256,%d0
iop->sem = sema;
rtems_libio_iop_freelist = next;
goto done;
4a9f0: 4fef 000c lea %sp@(12),%sp
iop = rtems_libio_iop_freelist;
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
rtems_libio_iop_freelist = next;
4a9f4: 23c2 0005 d870 movel %d2,5d870 <rtems_libio_iop_freelist>
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
4a9fa: 2540 0014 movel %d0,%a2@(20) 4a9fe: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@- 4aa04: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
4aa0a: 242e fff4 movel %fp@(-12),%d2 4aa0e: 200a movel %a2,%d0 4aa10: 246e fff8 moveal %fp@(-8),%a2
4aa14: 4e5e unlk %fp <== NOT EXECUTED
0004a8d2 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
4a8d2: 4e56 0000 linkw %fp,#0 4a8d6: 2f0a movel %a2,%sp@-
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4a8d8: 42a7 clrl %sp@- 4a8da: 246e 0008 moveal %fp@(8),%a2 4a8de: 42a7 clrl %sp@- 4a8e0: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@- 4a8e6: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
4a8ec: 202a 002c movel %a2@(44),%d0 4a8f0: 4fef 000c lea %sp@(12),%sp
4a8f4: 6630 bnes 4a926 <rtems_libio_free+0x54> <== ALWAYS TAKEN
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4a8f6: 41f9 0005 d870 lea 5d870 <rtems_libio_iop_freelist>,%a0 <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4a8fc: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
4a902: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4a906: 41f9 0005 d874 lea 5d874 <rtems_libio_semaphore>,%a0 <== NOT EXECUTED 4a90c: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4a910: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4a914: 23ca 0005 d870 movel %a2,5d870 <rtems_libio_iop_freelist> <== NOT EXECUTED
rtems_libio_unlock();
}
4a91a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a91e: 4e5e unlk %fp <== NOT EXECUTED 4a920: 4ef9 0004 5e68 jmp 45e68 <rtems_semaphore_release> <== NOT EXECUTED
)
{
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
4a926: 2f00 movel %d0,%sp@- 4a928: 4eb9 0004 5c54 jsr 45c54 <rtems_semaphore_delete> 4a92e: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4a930: 41f9 0005 d870 lea 5d870 <rtems_libio_iop_freelist>,%a0
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4a936: 203c ffff feff movel #-257,%d0
iop->data1 = rtems_libio_iop_freelist;
4a93c: 2550 0034 movel %a0@,%a2@(52) 4a940: 41f9 0005 d874 lea 5d874 <rtems_libio_semaphore>,%a0 4a946: 2d50 0008 movel %a0@,%fp@(8)
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4a94a: c1aa 0014 andl %d0,%a2@(20)
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4a94e: 23ca 0005 d870 movel %a2,5d870 <rtems_libio_iop_freelist>
rtems_libio_unlock();
}
4a954: 246e fffc moveal %fp@(-4),%a2 4a958: 4e5e unlk %fp 4a95a: 4ef9 0004 5e68 jmp 45e68 <rtems_semaphore_release>
00042814 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
42814: 4e56 0000 linkw %fp,#0
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
42818: 2039 0005 c1e4 movel 5c1e4 <rtems_libio_number_iops>,%d0
4281e: 674a beqs 4286a <rtems_libio_init+0x56> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
42820: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 42824: 2f00 movel %d0,%sp@- 42826: 4eb9 0004 a498 jsr 4a498 <calloc>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
4282c: 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,
4282e: 2040 moveal %d0,%a0 42830: 23c0 0005 d86c movel %d0,5d86c <rtems_libio_iops>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
42836: 6770 beqs 428a8 <rtems_libio_init+0x94> <== NEVER TAKEN
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++)
42838: 2279 0005 c1e4 moveal 5c1e4 <rtems_libio_number_iops>,%a1 4283e: 7201 moveq #1,%d1
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
42840: 23c0 0005 d870 movel %d0,5d870 <rtems_libio_iop_freelist>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
42846: b289 cmpl %a1,%d1
42848: 641c bccs 42866 <rtems_libio_init+0x52> <== NEVER TAKEN
4284a: 2040 moveal %d0,%a0 4284c: 41e8 0040 lea %a0@(64),%a0
iop->data1 = iop + 1;
42850: 2148 fff4 movel %a0,%a0@(-12) 42854: 41e8 0040 lea %a0@(64),%a0 42858: 5281 addql #1,%d1
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++)
4285a: b3c1 cmpal %d1,%a1
4285c: 66f2 bnes 42850 <rtems_libio_init+0x3c>
4285e: ed89 lsll #6,%d1 42860: 2241 moveal %d1,%a1 42862: 41f1 08c0 lea %a1@(ffffffc0,%d0:l),%a0
iop->data1 = iop + 1;
iop->data1 = NULL;
42866: 42a8 0034 clrl %a0@(52)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
4286a: 4879 0005 d874 pea 5d874 <rtems_libio_semaphore> 42870: 42a7 clrl %sp@- 42872: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 42876: 4878 0001 pea 1 <ADD> 4287a: 2f3c 4c42 494f movel #1279412559,%sp@- 42880: 4eb9 0004 5a8c jsr 45a8c <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
42886: 4fef 0014 lea %sp@(20),%sp 4288a: 4a80 tstl %d0
4288c: 6612 bnes 428a0 <rtems_libio_init+0x8c> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
4288e: 2279 0005 c1e0 moveal 5c1e0 <rtems_fs_init_helper>,%a1 42894: 4a89 tstl %a1
42896: 6704 beqs 4289c <rtems_libio_init+0x88> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
42898: 4e5e unlk %fp
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
4289a: 4ed1 jmp %a1@
}
4289c: 4e5e unlk %fp <== NOT EXECUTED 4289e: 4e75 rts <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
428a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 428a2: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
428a8: 4878 001a pea 1a <OPER2+0x6> <== NOT EXECUTED 428ac: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
0004a7d6 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
4a7d6: 4e56 0000 linkw %fp,#0 4a7da: 2f02 movel %d2,%sp@-
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4a7dc: 42a7 clrl %sp@- 4a7de: 242e 0008 movel %fp@(8),%d2 4a7e2: 42a7 clrl %sp@- 4a7e4: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@- 4a7ea: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4a7f0: 2079 0005 d86c moveal 5d86c <rtems_libio_iops>,%a0 4a7f6: 4fef 000c lea %sp@(12),%sp 4a7fa: 2279 0005 c1e4 moveal 5c1e4 <rtems_libio_number_iops>,%a1 4a800: 4a89 tstl %a1
4a802: 6720 beqs 4a824 <rtems_libio_is_file_open+0x4e> <== NEVER TAKEN
4a804: 41e8 0014 lea %a0@(20),%a0 4a808: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4a80a: 2210 movel %a0@,%d1
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4a80c: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4a80e: 0281 0000 0100 andil #256,%d1
4a814: 6706 beqs 4a81c <rtems_libio_is_file_open+0x46>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
4a816: b4a8 0004 cmpl %a0@(4),%d2
4a81a: 6720 beqs 4a83c <rtems_libio_is_file_open+0x66>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4a81c: 41e8 0040 lea %a0@(64),%a0 4a820: b3c0 cmpal %d0,%a1
4a822: 62e6 bhis 4a80a <rtems_libio_is_file_open+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4a824: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@- 4a82a: 4282 clrl %d2 4a82c: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4a832: 2002 movel %d2,%d0 4a834: 242e fffc movel %fp@(-4),%d2 4a838: 4e5e unlk %fp 4a83a: 4e75 rts 4a83c: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@-
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
4a842: 7401 moveq #1,%d2 4a844: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4a84a: 2002 movel %d2,%d0 4a84c: 242e fffc movel %fp@(-4),%d2
4a850: 4e5e unlk %fp <== NOT EXECUTED
0004a854 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
4a854: 4e56 0000 linkw %fp,#0 4a858: 2f02 movel %d2,%sp@-
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4a85a: 42a7 clrl %sp@- 4a85c: 242e 0008 movel %fp@(8),%d2 4a860: 42a7 clrl %sp@- 4a862: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@- 4a868: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4a86e: 2079 0005 d86c moveal 5d86c <rtems_libio_iops>,%a0 4a874: 4fef 000c lea %sp@(12),%sp 4a878: 2279 0005 c1e4 moveal 5c1e4 <rtems_libio_number_iops>,%a1 4a87e: 4a89 tstl %a1
4a880: 6720 beqs 4a8a2 <rtems_libio_is_open_files_in_fs+0x4e><== NEVER TAKEN
4a882: 41e8 0014 lea %a0@(20),%a0 4a886: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4a888: 2210 movel %a0@,%d1
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4a88a: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4a88c: 0281 0000 0100 andil #256,%d1
4a892: 6706 beqs 4a89a <rtems_libio_is_open_files_in_fs+0x46>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
4a894: b4a8 0014 cmpl %a0@(20),%d2
4a898: 6720 beqs 4a8ba <rtems_libio_is_open_files_in_fs+0x66>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4a89a: 41e8 0040 lea %a0@(64),%a0 4a89e: b3c0 cmpal %d0,%a1
4a8a0: 62e6 bhis 4a888 <rtems_libio_is_open_files_in_fs+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4a8a2: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@- 4a8a8: 4282 clrl %d2 4a8aa: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4a8b0: 2002 movel %d2,%d0 4a8b2: 242e fffc movel %fp@(-4),%d2 4a8b6: 4e5e unlk %fp 4a8b8: 4e75 rts 4a8ba: 2f39 0005 d874 movel 5d874 <rtems_libio_semaphore>,%sp@-
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
4a8c0: 7401 moveq #1,%d2 4a8c2: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4a8c8: 2002 movel %d2,%d0 4a8ca: 242e fffc movel %fp@(-4),%d2
4a8ce: 4e5e unlk %fp <== NOT EXECUTED
00044580 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
44580: 4e56 ffd4 linkw %fp,#-44 44584: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
44588: 486e fffc pea %fp@(-4) 4458c: 42a7 clrl %sp@- 4458e: 42a7 clrl %sp@- 44590: 4eb9 0004 75c0 jsr 475c0 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
44596: 4fef 000c lea %sp@(12),%sp 4459a: 4a80 tstl %d0 4459c: 6600 00cc bnew 4466a <rtems_libio_set_private_env+0xea>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
445a0: 2479 0005 eeec moveal 5eeec <rtems_current_user_env>,%a2 445a6: b5fc 0006 04cc cmpal #394444,%a2 445ac: 6700 00ca beqw 44678 <rtems_libio_set_private_env+0xf8>
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
445b0: 4878 0048 pea 48 <DBL_MANT_DIG+0x13>
* 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);
445b4: 47ee ffe8 lea %fp@(-24),%a3
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
445b8: 4879 0006 04cc pea 604cc <rtems_global_user_env>
* 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);
445be: 4bf9 0004 326c lea 4326c <rtems_filesystem_evaluate_path>,%a5
rtems_filesystem_root = loc;
445c4: 49ee fff8 lea %fp@(-8),%a4
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
445c8: 4282 clrl %d2
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
445ca: 2f0a movel %a2,%sp@- 445cc: 4eb9 0005 0288 jsr 50288 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
445d2: 2079 0006 04b4 moveal 604b4 <rtems_filesystem_mount_table_control>,%a0 445d8: 2568 001c 0018 movel %a0@(28),%a2@(24) 445de: 2568 0020 001c movel %a0@(32),%a2@(28) 445e4: 2568 0024 0020 movel %a0@(36),%a2@(32) 445ea: 2568 0028 0024 movel %a0@(40),%a2@(36)
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
445f0: 24ae fffc movel %fp@(-4),%a2@
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
445f4: 2568 002c 0028 movel %a0@(44),%a2@(40)
* 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);
445fa: 42a7 clrl %sp@- 445fc: 2f0b movel %a3,%sp@- 445fe: 42a7 clrl %sp@- 44600: 4878 0001 pea 1 <ADD> 44604: 4879 0005 d90c pea 5d90c <IMFS_ops+0x48> 4460a: 4e95 jsr %a5@
rtems_filesystem_root = loc;
4460c: 2079 0005 eeec moveal 5eeec <rtems_current_user_env>,%a0
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
44612: 4fef 0020 lea %sp@(32),%sp
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
44616: 2153 0018 movel %a3@,%a0@(24) 4461a: 216e ffec 001c movel %fp@(-20),%a0@(28) 44620: 216e fff0 0020 movel %fp@(-16),%a0@(32) 44626: 216e fff4 0024 movel %fp@(-12),%a0@(36) 4462c: 2154 0028 movel %a4@,%a0@(40)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
44630: 42a7 clrl %sp@- 44632: 2f0b movel %a3,%sp@- 44634: 42a7 clrl %sp@- 44636: 4878 0001 pea 1 <ADD> 4463a: 4879 0005 d90c pea 5d90c <IMFS_ops+0x48> 44640: 4e95 jsr %a5@
rtems_filesystem_current = loc;
44642: 2079 0005 eeec moveal 5eeec <rtems_current_user_env>,%a0 44648: 5888 addql #4,%a0
return RTEMS_SUCCESSFUL;
4464a: 4fef 0014 lea %sp@(20),%sp
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
4464e: 20d3 movel %a3@,%a0@+ 44650: 20ee ffec movel %fp@(-20),%a0@+ 44654: 20ee fff0 movel %fp@(-16),%a0@+ 44658: 20ee fff4 movel %fp@(-12),%a0@+ 4465c: 2094 movel %a4@,%a0@
return RTEMS_SUCCESSFUL;
}
4465e: 2002 movel %d2,%d0 44660: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 44666: 4e5e unlk %fp 44668: 4e75 rts
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
4466a: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
return RTEMS_SUCCESSFUL;
}
4466c: 2002 movel %d2,%d0 <== NOT EXECUTED 4466e: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 44674: 4e5e unlk %fp <== NOT EXECUTED 44676: 4e75 rts <== NOT EXECUTED
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));
44678: 4878 0048 pea 48 <DBL_MANT_DIG+0x13> 4467c: 4eb9 0004 395c jsr 4395c <malloc>
if (!tmp)
44682: 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));
44684: 2440 moveal %d0,%a2
if (!tmp)
44686: 4a80 tstl %d0 44688: 6700 00d6 beqw 44760 <rtems_libio_set_private_env+0x1e0>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
4468c: 487a fdda pea %pc@(44468 <free_user_env>) 44690: 4879 0005 eeec pea 5eeec <rtems_current_user_env> 44696: 42a7 clrl %sp@- 44698: 4eb9 0004 7754 jsr 47754 <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
4469e: 4fef 000c lea %sp@(12),%sp
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
446a2: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
446a4: 6600 00c8 bnew 4476e <rtems_libio_set_private_env+0x1ee>
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
446a8: 23ca 0005 eeec movel %a2,5eeec <rtems_current_user_env>
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
446ae: 4878 0048 pea 48 <DBL_MANT_DIG+0x13>
* 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);
446b2: 47ee ffe8 lea %fp@(-24),%a3
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
446b6: 4879 0006 04cc pea 604cc <rtems_global_user_env>
* 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);
446bc: 4bf9 0004 326c lea 4326c <rtems_filesystem_evaluate_path>,%a5
rtems_filesystem_root = loc;
446c2: 49ee fff8 lea %fp@(-8),%a4
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
446c6: 2f0a movel %a2,%sp@-
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
446c8: 4282 clrl %d2
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
446ca: 4eb9 0005 0288 jsr 50288 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
446d0: 2079 0006 04b4 moveal 604b4 <rtems_filesystem_mount_table_control>,%a0 446d6: 2568 001c 0018 movel %a0@(28),%a2@(24) 446dc: 2568 0020 001c movel %a0@(32),%a2@(28) 446e2: 2568 0024 0020 movel %a0@(36),%a2@(32) 446e8: 2568 0028 0024 movel %a0@(40),%a2@(36)
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
446ee: 24ae fffc movel %fp@(-4),%a2@
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
446f2: 2568 002c 0028 movel %a0@(44),%a2@(40)
* 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);
446f8: 42a7 clrl %sp@- 446fa: 2f0b movel %a3,%sp@- 446fc: 42a7 clrl %sp@- 446fe: 4878 0001 pea 1 <ADD> 44702: 4879 0005 d90c pea 5d90c <IMFS_ops+0x48> 44708: 4e95 jsr %a5@
rtems_filesystem_root = loc;
4470a: 2079 0005 eeec moveal 5eeec <rtems_current_user_env>,%a0
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
44710: 4fef 0020 lea %sp@(32),%sp
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
44714: 2153 0018 movel %a3@,%a0@(24) 44718: 216e ffec 001c movel %fp@(-20),%a0@(28) 4471e: 216e fff0 0020 movel %fp@(-16),%a0@(32) 44724: 216e fff4 0024 movel %fp@(-12),%a0@(36) 4472a: 2154 0028 movel %a4@,%a0@(40)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
4472e: 42a7 clrl %sp@- 44730: 2f0b movel %a3,%sp@- 44732: 42a7 clrl %sp@- 44734: 4878 0001 pea 1 <ADD> 44738: 4879 0005 d90c pea 5d90c <IMFS_ops+0x48> 4473e: 4e95 jsr %a5@
rtems_filesystem_current = loc;
44740: 2079 0005 eeec moveal 5eeec <rtems_current_user_env>,%a0 44746: 5888 addql #4,%a0
return RTEMS_SUCCESSFUL;
44748: 4fef 0014 lea %sp@(20),%sp
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
4474c: 20d3 movel %a3@,%a0@+ 4474e: 20ee ffec movel %fp@(-20),%a0@+ 44752: 20ee fff0 movel %fp@(-16),%a0@+ 44756: 20ee fff4 movel %fp@(-12),%a0@+ 4475a: 2094 movel %a4@,%a0@ 4475c: 6000 ff00 braw 4465e <rtems_libio_set_private_env+0xde>
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));
if (!tmp)
44760: 741a moveq #26,%d2 <== NOT EXECUTED
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
return RTEMS_SUCCESSFUL;
}
44762: 2002 movel %d2,%d0 <== NOT EXECUTED 44764: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 4476a: 4e5e unlk %fp <== NOT EXECUTED 4476c: 4e75 rts <== NOT EXECUTED
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
if (sc != RTEMS_SUCCESSFUL) {
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
4476e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44770: 4eb9 0004 3360 jsr 43360 <free> <== NOT EXECUTED
return sc;
44776: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
return RTEMS_SUCCESSFUL;
}
44778: 2002 movel %d2,%d0 <== NOT EXECUTED 4477a: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 44780: 4e5e unlk %fp <== NOT EXECUTED
000444c2 <rtems_libio_share_private_env>:
* 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) {
444c2: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 444c6: 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);
444c8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 444cc: 42a7 clrl %sp@- <== NOT EXECUTED 444ce: 42a7 clrl %sp@- <== NOT EXECUTED 444d0: 4eb9 0004 75c0 jsr 475c0 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
444d6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 444da: 4a80 tstl %d0 <== NOT EXECUTED 444dc: 6636 bnes 44514 <rtems_libio_share_private_env+0x52><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
444de: 2479 0005 eeec moveal 5eeec <rtems_current_user_env>,%a2 <== NOT EXECUTED 444e4: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 444e8: b092 cmpl %a2@,%d0 <== NOT EXECUTED 444ea: 6730 beqs 4451c <rtems_libio_share_private_env+0x5a><== NOT EXECUTED
free_user_env(tmp);
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
444ec: 486e fffc pea %fp@(-4) <== NOT EXECUTED 444f0: 4879 0005 eeec pea 5eeec <rtems_current_user_env> <== NOT EXECUTED 444f6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 444fa: 4eb9 0004 788c jsr 4788c <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
44500: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44504: 4a80 tstl %d0 <== NOT EXECUTED 44506: 674c beqs 44554 <rtems_libio_share_private_env+0x92><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
44508: 223c 0006 04cc movel #394444,%d1 <== NOT EXECUTED 4450e: 23c1 0005 eeec movel %d1,5eeec <rtems_current_user_env> <== NOT EXECUTED
return sc; }
44514: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 44518: 4e5e unlk %fp <== NOT EXECUTED 4451a: 4e75 rts <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
if (rtems_current_user_env->task_id==current_task_id) {
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
4451c: 4879 0005 eeec pea 5eeec <rtems_current_user_env> <== NOT EXECUTED 44522: 42a7 clrl %sp@- <== NOT EXECUTED 44524: 4eb9 0004 77f8 jsr 477f8 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
4452a: 508f addql #8,%sp <== NOT EXECUTED 4452c: 4a80 tstl %d0 <== NOT EXECUTED 4452e: 66e4 bnes 44514 <rtems_libio_share_private_env+0x52><== NOT EXECUTED
free_user_env(tmp);
44530: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44532: 4eba ff34 jsr %pc@(44468 <free_user_env>) <== NOT EXECUTED 44536: 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,
44538: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4453c: 4879 0005 eeec pea 5eeec <rtems_current_user_env> <== NOT EXECUTED 44542: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 44546: 4eb9 0004 788c jsr 4788c <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
4454c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44550: 4a80 tstl %d0 <== NOT EXECUTED 44552: 66b4 bnes 44508 <rtems_libio_share_private_env+0x46><== NOT EXECUTED
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
44554: 487a ff12 pea %pc@(44468 <free_user_env>) <== NOT EXECUTED 44558: 4879 0005 eeec pea 5eeec <rtems_current_user_env> <== NOT EXECUTED 4455e: 42a7 clrl %sp@- <== NOT EXECUTED 44560: 4eb9 0004 7754 jsr 47754 <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
44566: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4456a: 4a80 tstl %d0 <== NOT EXECUTED 4456c: 669a bnes 44508 <rtems_libio_share_private_env+0x46><== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
4456e: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
return sc;
}
44572: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 44576: 4e5e unlk %fp <== NOT EXECUTED
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
44578: 23d0 0005 eeec movel %a0@,5eeec <rtems_current_user_env> <== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
return sc;
}
0004a788 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a788: 7006 moveq #6,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4a78a: 4e56 0000 linkw %fp,#0 4a78e: 222e 0008 movel %fp@(8),%d1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a792: c081 andl %d1,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4a794: 2f02 movel %d2,%sp@-
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a796: 7406 moveq #6,%d2 4a798: b480 cmpl %d0,%d2
4a79a: 6736 beqs 4a7d2 <rtems_libio_to_fcntl_flags+0x4a><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4a79c: 0801 0001 btst #1,%d1
4a7a0: 6726 beqs 4a7c8 <rtems_libio_to_fcntl_flags+0x40><== NEVER TAKEN
4a7a2: 4280 clrl %d0
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 ) {
4a7a4: 0801 0000 btst #0,%d1
4a7a8: 6704 beqs 4a7ae <rtems_libio_to_fcntl_flags+0x26>
fcntl_flags |= O_NONBLOCK;
4a7aa: 08c0 000e bset #14,%d0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
4a7ae: 0801 0009 btst #9,%d1
4a7b2: 6704 beqs 4a7b8 <rtems_libio_to_fcntl_flags+0x30>
fcntl_flags |= O_APPEND;
4a7b4: 7408 moveq #8,%d2 4a7b6: 8082 orl %d2,%d0
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
4a7b8: 0801 000a btst #10,%d1
4a7bc: 6704 beqs 4a7c2 <rtems_libio_to_fcntl_flags+0x3a>
fcntl_flags |= O_CREAT;
4a7be: 08c0 0009 bset #9,%d0
}
return fcntl_flags;
}
4a7c2: 241f movel %sp@+,%d2 4a7c4: 4e5e unlk %fp 4a7c6: 4e75 rts
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4a7c8: 2001 movel %d1,%d0 <== NOT EXECUTED 4a7ca: e488 lsrl #2,%d0 <== NOT EXECUTED 4a7cc: 7401 moveq #1,%d2 <== NOT EXECUTED 4a7ce: c082 andl %d2,%d0 <== NOT EXECUTED 4a7d0: 60d2 bras 4a7a4 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a7d2: 7002 moveq #2,%d0 <== NOT EXECUTED 4a7d4: 60ce bras 4a7a4 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
0005001c <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
5001c: 4e56 0000 linkw %fp,#0 50020: 2f0a movel %a2,%sp@- 50022: 246e 0008 moveal %fp@(8),%a2 50026: 2f02 movel %d2,%sp@-
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
50028: 4a8a tstl %a2
5002a: 675e beqs 5008a <rtems_memalign+0x6e>
return EINVAL;
*pointer = NULL;
5002c: 4292 clrl %a2@
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
5002e: 7003 moveq #3,%d0 50030: b0b9 0006 3cc2 cmpl 63cc2 <_System_state_Current>,%d0
50036: 6748 beqs 50080 <rtems_memalign+0x64> <== ALWAYS TAKEN
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
50038: 4eb9 0004 423a jsr 4423a <malloc_deferred_frees_process>
uintptr_t size,
uintptr_t alignment
)
{
return
_Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
5003e: 42a7 clrl %sp@- 50040: 2f2e 000c movel %fp@(12),%sp@- 50044: 2f2e 0010 movel %fp@(16),%sp@- 50048: 2f39 0006 22a0 movel 622a0 <RTEMS_Malloc_Heap>,%sp@- 5004e: 4eb9 0004 97c8 jsr 497c8 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
50054: 4fef 0010 lea %sp@(16),%sp 50058: 2400 movel %d0,%d2
5005a: 673c beqs 50098 <rtems_memalign+0x7c>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
5005c: 2079 0006 2906 moveal 62906 <rtems_malloc_statistics_helpers>,%a0 50062: 4a88 tstl %a0
50064: 670a beqs 50070 <rtems_memalign+0x54> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
50066: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50068: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 5006c: 4e90 jsr %a0@ <== NOT EXECUTED 5006e: 588f addql #4,%sp <== NOT EXECUTED
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
50070: 2482 movel %d2,%a2@
return 0; }
50072: 242e fff8 movel %fp@(-8),%d2
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
50076: 4280 clrl %d0
return 0; }
50078: 246e fffc moveal %fp@(-4),%a2 5007c: 4e5e unlk %fp 5007e: 4e75 rts
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
50080: 4eb9 0004 41e0 jsr 441e0 <malloc_is_system_state_OK> 50086: 4a00 tstb %d0
50088: 66ae bnes 50038 <rtems_memalign+0x1c> <== ALWAYS TAKEN
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
}
5008a: 242e fff8 movel %fp@(-8),%d2
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
5008e: 7016 moveq #22,%d0
}
50090: 246e fffc moveal %fp@(-4),%a2 50094: 4e5e unlk %fp 50096: 4e75 rts 50098: 242e fff8 movel %fp@(-8),%d2
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
5009c: 700c moveq #12,%d0
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
}
5009e: 246e fffc moveal %fp@(-4),%a2 500a2: 4e5e unlk %fp
...
00047764 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
47764: 4e56 0000 linkw %fp,#0 47768: 2f0a movel %a2,%sp@- 4776a: 246e 0010 moveal %fp@(16),%a2 4776e: 2f02 movel %d2,%sp@-
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
47770: 4a8a tstl %a2
47772: 6766 beqs 477da <rtems_object_get_class_information+0x76>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
47774: 2f2e 000c movel %fp@(12),%sp@- 47778: 2f2e 0008 movel %fp@(8),%sp@- 4777c: 4eb9 0004 9314 jsr 49314 <_Objects_Get_information>
if ( !obj_info )
47782: 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 );
47784: 2040 moveal %d0,%a0
if ( !obj_info )
47786: 4a80 tstl %d0
47788: 675e beqs 477e8 <rtems_object_get_class_information+0x84>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
4778a: 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;
4778e: 4282 clrl %d2
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
47790: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
47796: 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;
4779a: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
477a0: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
477a4: 6750 beqs 477f6 <rtems_object_get_class_information+0x92><== NEVER TAKEN
477a6: 2068 0018 moveal %a0@(24),%a0 477aa: 7201 moveq #1,%d1 477ac: 7001 moveq #1,%d0 477ae: 93c9 subal %a1,%a1 477b0: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
477b2: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4)
477b6: 6718 beqs 477d0 <rtems_object_get_class_information+0x6c>
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++ )
477b8: 2200 movel %d0,%d1 477ba: b082 cmpl %d2,%d0
477bc: 63f2 blss 477b0 <rtems_object_get_class_information+0x4c><== ALWAYS TAKEN
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
477be: 2549 000e movel %a1,%a2@(14) 477c2: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
477c4: 242e fff8 movel %fp@(-8),%d2 477c8: 246e fffc moveal %fp@(-4),%a2 477cc: 4e5e unlk %fp 477ce: 4e75 rts
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
if ( !obj_info->local_table[i] )
unallocated++;
477d0: 5289 addql #1,%a1
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++ )
477d2: 2200 movel %d0,%d1 477d4: b082 cmpl %d2,%d0
477d6: 63d8 blss 477b0 <rtems_object_get_class_information+0x4c><== NEVER TAKEN
477d8: 60e4 bras 477be <rtems_object_get_class_information+0x5a>
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
477da: 242e fff8 movel %fp@(-8),%d2
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
477de: 7009 moveq #9,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
477e0: 246e fffc moveal %fp@(-4),%a2 477e4: 4e5e unlk %fp 477e6: 4e75 rts 477e8: 242e fff8 movel %fp@(-8),%d2
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
477ec: 700a moveq #10,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
477ee: 246e fffc moveal %fp@(-4),%a2 477f2: 4e5e unlk %fp 477f4: 4e75 rts
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++ )
477f6: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
477f8: 4280 clrl %d0 <== NOT EXECUTED 477fa: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 477fe: 60c4 bras 477c4 <rtems_object_get_class_information+0x60><== NOT EXECUTED
00042526 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
42526: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
4252a: 486e 000c pea %fp@(12) <== NOT EXECUTED 4252e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42532: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 42538: 4eba fdf6 jsr %pc@(42330 <rtems_verror>) <== NOT EXECUTED 4253c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
va_end(arglist);
}
42540: 4e5e unlk %fp <== NOT EXECUTED
0005692c <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
5692c: 4e56 ffe8 linkw %fp,#-24 56930: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 56934: 242e 0008 movel %fp@(8),%d2 56938: 2a2e 000c movel %fp@(12),%d5 5693c: 282e 0010 movel %fp@(16),%d4 56940: 262e 0014 movel %fp@(20),%d3 56944: 246e 001c moveal %fp@(28),%a2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
56948: 4a82 tstl %d2
5694a: 673a beqs 56986 <rtems_partition_create+0x5a>
return RTEMS_INVALID_NAME;
if ( !starting_address )
5694c: 4a85 tstl %d5
5694e: 671e beqs 5696e <rtems_partition_create+0x42>
return RTEMS_INVALID_ADDRESS;
if ( !id )
56950: 4a8a tstl %a2
56952: 671a beqs 5696e <rtems_partition_create+0x42> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
56954: 4a84 tstl %d4
56956: 6722 beqs 5697a <rtems_partition_create+0x4e>
56958: 4a83 tstl %d3
5695a: 671e beqs 5697a <rtems_partition_create+0x4e>
5695c: b684 cmpl %d4,%d3
5695e: 621a bhis 5697a <rtems_partition_create+0x4e>
56960: 7003 moveq #3,%d0 56962: c083 andl %d3,%d0
56964: 6614 bnes 5697a <rtems_partition_create+0x4e>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
56966: 103c 0003 moveb #3,%d0 5696a: c085 andl %d5,%d0
5696c: 6724 beqs 56992 <rtems_partition_create+0x66>
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
5696e: 7009 moveq #9,%d0
}
56970: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56976: 4e5e unlk %fp 56978: 4e75 rts
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
5697a: 7008 moveq #8,%d0
}
5697c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56982: 4e5e unlk %fp 56984: 4e75 rts
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
56986: 7003 moveq #3,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56988: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5698e: 4e5e unlk %fp 56990: 4e75 rts 56992: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 56998: 5280 addql #1,%d0 5699a: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level>
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
569a0: 4879 0007 cf48 pea 7cf48 <_Partition_Information> 569a6: 4eb9 0005 b39c jsr 5b39c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
569ac: 588f addql #4,%sp 569ae: 2640 moveal %d0,%a3 569b0: 4a80 tstl %d0
569b2: 675a beqs 56a0e <rtems_partition_create+0xe2>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
569b4: 2745 0010 movel %d5,%a3@(16)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
569b8: 2004 movel %d4,%d0
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
569ba: 276e 0018 001c movel %fp@(24),%a3@(28)
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
569c0: 4c43 0000 remul %d3,%d0,%d0
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
569c4: 2744 0014 movel %d4,%a3@(20)
the_partition->buffer_size = buffer_size;
569c8: 2743 0018 movel %d3,%a3@(24)
the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0;
569cc: 42ab 0020 clrl %a3@(32)
_Chain_Initialize( &the_partition->Memory, starting_address,
569d0: 2f03 movel %d3,%sp@- 569d2: 2f00 movel %d0,%sp@- 569d4: 2f05 movel %d5,%sp@- 569d6: 486b 0024 pea %a3@(36) 569da: 4eb9 0005 9ee8 jsr 59ee8 <_Chain_Initialize> 569e0: 202b 0008 movel %a3@(8),%d0 569e4: 4281 clrl %d1 569e6: 2079 0007 cf60 moveal 7cf60 <_Partition_Information+0x18>,%a0 569ec: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
569ee: 2742 000c movel %d2,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
569f2: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
569f6: 2480 movel %d0,%a2@
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
569f8: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
569fe: 4fef 0010 lea %sp@(16),%sp
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
56a02: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
56a04: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56a0a: 4e5e unlk %fp 56a0c: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
56a0e: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 56a14: 7005 moveq #5,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56a16: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56a1c: 4e5e unlk %fp <== NOT EXECUTED
00056b40 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
56b40: 4e56 fffc linkw %fp,#-4 56b44: 2f0a movel %a2,%sp@- 56b46: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
56b48: 486e fffc pea %fp@(-4) 56b4c: 2f2e 0008 movel %fp@(8),%sp@- 56b50: 4879 0007 cf48 pea 7cf48 <_Partition_Information> 56b56: 242e 000c movel %fp@(12),%d2 56b5a: 4eb9 0005 b874 jsr 5b874 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
56b60: 4fef 000c lea %sp@(12),%sp 56b64: 2440 moveal %d0,%a2 56b66: 4aae fffc tstl %fp@(-4)
56b6a: 670e beqs 56b7a <rtems_partition_return_buffer+0x3a>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56b6c: 242e fff4 movel %fp@(-12),%d2
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
56b70: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56b72: 246e fff8 moveal %fp@(-8),%a2 56b76: 4e5e unlk %fp 56b78: 4e75 rts
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
56b7a: 202a 0010 movel %a2@(16),%d0
ending = _Addresses_Add_offset( starting, the_partition->length );
56b7e: 222a 0014 movel %a2@(20),%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
56b82: b082 cmpl %d2,%d0
56b84: 623c bhis 56bc2 <rtems_partition_return_buffer+0x82>
56b86: d280 addl %d0,%d1 56b88: b282 cmpl %d2,%d1
56b8a: 6536 bcss 56bc2 <rtems_partition_return_buffer+0x82><== NEVER TAKEN
return (
56b8c: 2202 movel %d2,%d1 56b8e: 9280 subl %d0,%d1 56b90: 2001 movel %d1,%d0 56b92: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 56b98: 4a81 tstl %d1
56b9a: 6626 bnes 56bc2 <rtems_partition_return_buffer+0x82>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
56b9c: 2f02 movel %d2,%sp@- 56b9e: 486a 0024 pea %a2@(36) 56ba2: 4eb9 0005 9e74 jsr 59e74 <_Chain_Append>
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
56ba8: 53aa 0020 subql #1,%a2@(32)
_Thread_Enable_dispatch();
56bac: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56bb2: 242e fff4 movel %fp@(-12),%d2
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();
return RTEMS_SUCCESSFUL;
56bb6: 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();
56bb8: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56bba: 246e fff8 moveal %fp@(-8),%a2 56bbe: 4e5e unlk %fp 56bc0: 4e75 rts
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
56bc2: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56bc8: 242e fff4 movel %fp@(-12),%d2
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
56bcc: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56bce: 246e fff8 moveal %fp@(-8),%a2 56bd2: 4e5e unlk %fp
...
0004bd6a <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
4bd6a: 4e56 0000 linkw %fp,#0
if (!rtems_pipe_configured)
4bd6e: 4a39 0005 c834 tstb 5c834 <rtems_pipe_configured>
4bd74: 6708 beqs 4bd7e <rtems_pipe_initialize+0x14> <== ALWAYS TAKEN
return;
if (rtems_pipe_semaphore)
4bd76: 4ab9 0005 d178 tstl 5d178 <rtems_pipe_semaphore> <== NOT EXECUTED 4bd7c: 6704 beqs 4bd82 <rtems_pipe_initialize+0x18> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
rtems_pipe_no = now;
}
4bd7e: 4e5e unlk %fp 4bd80: 4e75 rts
if (rtems_pipe_semaphore)
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
4bd82: 4879 0005 d178 pea 5d178 <rtems_pipe_semaphore> <== NOT EXECUTED 4bd88: 42a7 clrl %sp@- <== NOT EXECUTED 4bd8a: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> <== NOT EXECUTED 4bd8e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4bd92: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4bd98: 4eb9 0004 5a8c jsr 45a8c <rtems_semaphore_create> <== 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)
4bd9e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4bda2: 4a80 tstl %d0 <== NOT EXECUTED 4bda4: 6610 bnes 4bdb6 <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
4bda6: 4eb9 0004 55fc jsr 455fc <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
rtems_pipe_no = now; }
4bdac: 4e5e unlk %fp <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
rtems_pipe_no = now;
4bdae: 33c0 0005 d180 movew %d0,5d180 <rtems_pipe_no> <== NOT EXECUTED
}
4bdb4: 4e75 rts <== NOT EXECUTED
sc = rtems_semaphore_create(
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)
rtems_fatal_error_occurred (sc);
4bdb6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bdb8: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
00055fe0 <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
void *internal,
void **external
)
{
55fe0: 4e56 fffc linkw %fp,#-4 55fe4: 2f0a movel %a2,%sp@- 55fe6: 246e 0010 moveal %fp@(16),%a2 55fea: 2f02 movel %d2,%sp@- 55fec: 242e 000c movel %fp@(12),%d2
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
55ff0: 4a8a tstl %a2
55ff2: 6762 beqs 56056 <rtems_port_internal_to_external+0x76><== NEVER TAKEN
55ff4: 486e fffc pea %fp@(-4) 55ff8: 2f2e 0008 movel %fp@(8),%sp@- 55ffc: 4879 0007 cf10 pea 7cf10 <_Dual_ported_memory_Information> 56002: 4eb9 0005 b874 jsr 5b874 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
56008: 4fef 000c lea %sp@(12),%sp 5600c: 4aae fffc tstl %fp@(-4)
56010: 6624 bnes 56036 <rtems_port_internal_to_external+0x56>
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
56012: 2202 movel %d2,%d1 56014: 2040 moveal %d0,%a0 56016: 92a8 0010 subl %a0@(16),%d1
if ( ending > the_port->length )
5601a: b2a8 0018 cmpl %a0@(24),%d1
5601e: 6324 blss 56044 <rtems_port_internal_to_external+0x64>
*external = internal;
56020: 2482 movel %d2,%a2@
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
56022: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 56028: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5602a: 242e fff4 movel %fp@(-12),%d2 5602e: 246e fff8 moveal %fp@(-8),%a2 56032: 4e5e unlk %fp 56034: 4e75 rts 56036: 242e fff4 movel %fp@(-12),%d2
if ( !external )
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
5603a: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5603c: 246e fff8 moveal %fp@(-8),%a2 56040: 4e5e unlk %fp 56042: 4e75 rts
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
56044: 2040 moveal %d0,%a0 56046: d2a8 0014 addl %a0@(20),%d1 5604a: 2481 movel %d1,%a2@
ending );
_Thread_Enable_dispatch();
5604c: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 56052: 4280 clrl %d0 56054: 60d4 bras 5602a <rtems_port_internal_to_external+0x4a>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56056: 242e fff4 movel %fp@(-12),%d2
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
5605a: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5605c: 246e fff8 moveal %fp@(-8),%a2
56060: 4e5e unlk %fp <== NOT EXECUTED
00046dc0 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
46dc0: 4e56 ffec linkw %fp,#-20 46dc4: 48d7 040c moveml %d2-%d3/%a2,%sp@
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
46dc8: 486e fffc pea %fp@(-4) 46dcc: 242e 0008 movel %fp@(8),%d2 46dd0: 2f02 movel %d2,%sp@- 46dd2: 4879 0005 fa14 pea 5fa14 <_Rate_monotonic_Information> 46dd8: 4eb9 0004 9008 jsr 49008 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
46dde: 4fef 000c lea %sp@(12),%sp 46de2: 2440 moveal %d0,%a2 46de4: 4aae fffc tstl %fp@(-4)
46de8: 661e bnes 46e08 <rtems_rate_monotonic_period+0x48>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
46dea: 2039 0005 fbca movel 5fbca <_Thread_Executing>,%d0 46df0: b0aa 0040 cmpl %a2@(64),%d0
46df4: 671e beqs 46e14 <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
46df6: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> 46dfc: 7017 moveq #23,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46dfe: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46e04: 4e5e unlk %fp 46e06: 4e75 rts
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
46e08: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46e0a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46e10: 4e5e unlk %fp 46e12: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
46e14: 4aae 000c tstl %fp@(12) 46e18: 6700 00ce beqw 46ee8 <rtems_rate_monotonic_period+0x128>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
46e1c: 203c 0000 0700 movel #1792,%d0 46e22: 40c3 movew %sr,%d3 46e24: 8083 orl %d3,%d0 46e26: 46c0 movew %d0,%sr
switch ( the_period->state ) {
46e28: 202a 0038 movel %a2@(56),%d0 46e2c: 7202 moveq #2,%d1 46e2e: b280 cmpl %d0,%d1 46e30: 6700 00dc beqw 46f0e <rtems_rate_monotonic_period+0x14e> 46e34: 123c 0004 moveb #4,%d1 46e38: b280 cmpl %d0,%d1
46e3a: 6762 beqs 46e9e <rtems_rate_monotonic_period+0xde>
46e3c: 4a80 tstl %d0
46e3e: 66c8 bnes 46e08 <rtems_rate_monotonic_period+0x48><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
46e40: 46c3 movew %d3,%sr
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
46e42: 2f0a movel %a2,%sp@- 46e44: 2d40 fff8 movel %d0,%fp@(-8) 46e48: 4eb9 0004 6b78 jsr 46b78 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46e4e: 223c 0004 7224 movel #291364,%d1
the_watchdog->id = id;
46e54: 2542 0030 movel %d2,%a2@(48)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46e58: 242e 000c movel %fp@(12),%d2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46e5c: 2541 002c movel %d1,%a2@(44)
the_period->state = RATE_MONOTONIC_ACTIVE;
46e60: 7202 moveq #2,%d1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46e62: 2542 001c movel %d2,%a2@(28) 46e66: 2541 0038 movel %d1,%a2@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
46e6a: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
46e6e: 42aa 0034 clrl %a2@(52)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
46e72: 2542 003c movel %d2,%a2@(60)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
46e76: 486a 0010 pea %a2@(16) 46e7a: 4879 0005 fbe8 pea 5fbe8 <_Watchdog_Ticks_chain> 46e80: 4eb9 0004 aa7c jsr 4aa7c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
46e86: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
46e8c: 202e fff8 movel %fp@(-8),%d0 46e90: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46e94: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46e9a: 4e5e unlk %fp 46e9c: 4e75 rts
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
46e9e: 2f0a movel %a2,%sp@- 46ea0: 4eb9 0004 6ca6 jsr 46ca6 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
46ea6: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
46ea8: 7202 moveq #2,%d1
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
46eaa: 7006 moveq #6,%d0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46eac: 242e 000c movel %fp@(12),%d2
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
46eb0: 2541 0038 movel %d1,%a2@(56) 46eb4: 2542 001c movel %d2,%a2@(28)
the_period->next_length = length;
46eb8: 2542 003c movel %d2,%a2@(60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
46ebc: 486a 0010 pea %a2@(16) 46ec0: 4879 0005 fbe8 pea 5fbe8 <_Watchdog_Ticks_chain> 46ec6: 2d40 fff8 movel %d0,%fp@(-8) 46eca: 4eb9 0004 aa7c jsr 4aa7c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
46ed0: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
46ed6: 202e fff8 movel %fp@(-8),%d0 46eda: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46ede: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46ee4: 4e5e unlk %fp 46ee6: 4e75 rts
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
46ee8: 202a 0038 movel %a2@(56),%d0 46eec: 7204 moveq #4,%d1 46eee: b280 cmpl %d0,%d1 46ef0: 6400 009c bccw 46f8e <rtems_rate_monotonic_period+0x1ce>
46ef4: 4280 clrl %d0 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
46ef6: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 46efa: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> <== NOT EXECUTED
return( return_value );
46f00: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46f04: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46f0a: 4e5e unlk %fp 46f0c: 4e75 rts
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
46f0e: 2f0a movel %a2,%sp@- 46f10: 4eb9 0004 6ca6 jsr 46ca6 <_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;
46f16: 242e 000c movel %fp@(12),%d2
/*
* 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;
46f1a: 7001 moveq #1,%d0
the_period->next_length = length;
46f1c: 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;
46f20: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length;
_ISR_Enable( level );
46f24: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
46f26: 2079 0005 fbca moveal 5fbca <_Thread_Executing>,%a0 46f2c: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
46f32: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 46f36: 2f08 movel %a0,%sp@- 46f38: 4eb9 0004 a180 jsr 4a180 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
46f3e: 203c 0000 0700 movel #1792,%d0 46f44: 40c1 movew %sr,%d1 46f46: 8081 orl %d1,%d0 46f48: 46c0 movew %d0,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
46f4a: 7402 moveq #2,%d2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
46f4c: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
46f50: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
46f54: 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 )
46f56: 7203 moveq #3,%d1 46f58: 4fef 000c lea %sp@(12),%sp 46f5c: b280 cmpl %d0,%d1
46f5e: 6712 beqs 46f72 <rtems_rate_monotonic_period+0x1b2>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
46f60: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> 46f66: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46f68: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46f6e: 4e5e unlk %fp 46f70: 4e75 rts
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
46f72: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 46f76: 2f39 0005 fbca movel 5fbca <_Thread_Executing>,%sp@- 46f7c: 4eb9 0004 94a0 jsr 494a0 <_Thread_Clear_state> 46f82: 508f addql #8,%sp
_Thread_Enable_dispatch();
46f84: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> 46f8a: 4280 clrl %d0 46f8c: 60da bras 46f68 <rtems_rate_monotonic_period+0x1a8>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
46f8e: 41f9 0005 d212 lea 5d212 <CSWTCH.43>,%a0 46f94: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
46f98: 2d40 fff8 movel %d0,%fp@(-8) 46f9c: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch>
return( return_value );
46fa2: 202e fff8 movel %fp@(-8),%d0 46fa6: 6000 ff5c braw 46f04 <rtems_rate_monotonic_period+0x144>
...
00046fac <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
46fac: 4e56 ff78 linkw %fp,#-136 46fb0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 46fb4: 262e 0008 movel %fp@(8),%d3 46fb8: 246e 000c moveal %fp@(12),%a2
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
46fbc: 4a8a tstl %a2 46fbe: 6700 0082 beqw 47042 <rtems_rate_monotonic_report_statistics_with_plugin+0x96>
return;
(*print)( context, "Period information by period\n" );
46fc2: 4879 0005 d226 pea 5d226 <CSWTCH.43+0x14> 46fc8: 2f03 movel %d3,%sp@- 46fca: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
46fcc: 4879 0005 d244 pea 5d244 <CSWTCH.43+0x32> 46fd2: 2f03 movel %d3,%sp@- 46fd4: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
46fd6: 4879 0005 d266 pea 5d266 <CSWTCH.43+0x54> 46fdc: 2f03 movel %d3,%sp@- 46fde: 4e92 jsr %a2@
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
46fe0: 4879 0005 d289 pea 5d289 <CSWTCH.43+0x77> 46fe6: 2f03 movel %d3,%sp@- 46fe8: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
46fea: 4fef 001c lea %sp@(28),%sp 46fee: 2ebc 0005 d2d4 movel #381652,%sp@ 46ff4: 2f03 movel %d3,%sp@- 46ff6: 4e92 jsr %a2@
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
46ff8: 2439 0005 fa1a movel 5fa1a <_Rate_monotonic_Information+0x6>,%d2 46ffe: 508f addql #8,%sp 47000: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2
47006: 623a bhis 47042 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NEVER TAKEN
47008: 280e movel %fp,%d4
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
4700a: 2a0e movel %fp,%d5 4700c: 0684 ffff ffa2 addil #-94,%d4 47012: 47f9 0004 c90c lea 4c90c <rtems_rate_monotonic_get_statistics>,%a3
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
47018: 4bf9 0004 c9cc lea 4c9cc <rtems_rate_monotonic_get_status>,%a5
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
4701e: 5b85 subql #5,%d5 47020: 49f9 0004 7304 lea 47304 <rtems_object_get_name>,%a4
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47026: 2e3c 0004 a684 movel #304772,%d7
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
4702c: 2f04 movel %d4,%sp@- 4702e: 2f02 movel %d2,%sp@- 47030: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
47032: 508f addql #8,%sp 47034: 4a80 tstl %d0
47036: 6714 beqs 4704c <rtems_rate_monotonic_report_statistics_with_plugin+0xa0>
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47038: 5282 addql #1,%d2
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
4703a: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2
47040: 63ea blss 4702c <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
47042: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47048: 4e5e unlk %fp 4704a: 4e75 rts
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
4704c: 486e ffda pea %fp@(-38) 47050: 2f02 movel %d2,%sp@- 47052: 4e95 jsr %a5@
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47054: 2f05 movel %d5,%sp@- 47056: 4878 0005 pea 5 <COMPARE> 4705a: 2f2e ffda movel %fp@(-38),%sp@- 4705e: 4e94 jsr %a4@
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
47060: 2f2e ffa6 movel %fp@(-90),%sp@- 47064: 2f2e ffa2 movel %fp@(-94),%sp@- 47068: 2f05 movel %d5,%sp@- 4706a: 2f02 movel %d2,%sp@- 4706c: 4879 0005 d320 pea 5d320 <CSWTCH.43+0x10e> 47072: 2f03 movel %d3,%sp@- 47074: 4e92 jsr %a2@
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
47076: 202e ffa2 movel %fp@(-94),%d0 4707a: 4fef 002c lea %sp@(44),%sp
4707e: 6618 bnes 47098 <rtems_rate_monotonic_report_statistics_with_plugin+0xec>
(*print)( context, "\n" );
47080: 4879 0005 d6de pea 5d6de <IMFS_link_handlers+0xb4>
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47086: 5282 addql #1,%d2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
47088: 2f03 movel %d3,%sp@- 4708a: 4e92 jsr %a2@
continue;
4708c: 508f addql #8,%sp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
4708e: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2
47094: 6396 blss 4702c <rtems_rate_monotonic_report_statistics_with_plugin+0x80><== ALWAYS TAKEN
47096: 60aa bras 47042 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47098: 486e fff2 pea %fp@(-14) 4709c: 2047 moveal %d7,%a0
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
4709e: 5282 addql #1,%d2
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
470a0: 2f00 movel %d0,%sp@- 470a2: 486e ffba pea %fp@(-70) 470a6: 4e90 jsr %a0@
(*print)( context,
470a8: 202e fff6 movel %fp@(-10),%d0 470ac: 223c 0000 03e8 movel #1000,%d1 470b2: 4c41 0800 remsl %d1,%d0,%d0 470b6: 2c2e ffb6 movel %fp@(-74),%d6 470ba: 2f00 movel %d0,%sp@- 470bc: 2001 movel %d1,%d0 470be: 2f2e fff2 movel %fp@(-14),%sp@- 470c2: 4c40 6806 remsl %d0,%d6,%d6 470c6: 202e ffae movel %fp@(-82),%d0 470ca: 2246 moveal %d6,%a1 470cc: 223c 0000 03e8 movel #1000,%d1 470d2: 2f09 movel %a1,%sp@- 470d4: 2f2e ffb2 movel %fp@(-78),%sp@- 470d8: 4c41 0800 remsl %d1,%d0,%d0
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
470dc: 2c3c 0000 03e8 movel #1000,%d6
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
470e2: 2f00 movel %d0,%sp@- 470e4: 2f2e ffaa movel %fp@(-86),%sp@- 470e8: 4879 0005 d337 pea 5d337 <CSWTCH.43+0x125> 470ee: 2f03 movel %d3,%sp@- 470f0: 4e92 jsr %a2@
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
470f2: 4fef 002c lea %sp@(44),%sp 470f6: 2047 moveal %d7,%a0 470f8: 486e fff2 pea %fp@(-14) 470fc: 2f2e ffa2 movel %fp@(-94),%sp@- 47100: 486e ffd2 pea %fp@(-46) 47104: 4e90 jsr %a0@
(*print)( context,
47106: 202e fff6 movel %fp@(-10),%d0 4710a: 4c46 0800 remsl %d6,%d0,%d0 4710e: 222e ffce movel %fp@(-50),%d1 47112: 2f00 movel %d0,%sp@- 47114: 2f2e fff2 movel %fp@(-14),%sp@- 47118: 4c46 1801 remsl %d6,%d1,%d1 4711c: 202e ffc6 movel %fp@(-58),%d0 47120: 2241 moveal %d1,%a1 47122: 2f09 movel %a1,%sp@- 47124: 2f2e ffca movel %fp@(-54),%sp@- 47128: 4c46 0800 remsl %d6,%d0,%d0 4712c: 2f00 movel %d0,%sp@- 4712e: 2f2e ffc2 movel %fp@(-62),%sp@- 47132: 4879 0005 d356 pea 5d356 <CSWTCH.43+0x144> 47138: 2f03 movel %d3,%sp@- 4713a: 4e92 jsr %a2@ 4713c: 4fef 002c lea %sp@(44),%sp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47140: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2 47146: 6300 fee4 blsw 4702c <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
4714a: 6000 fef6 braw 47042 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
00047168 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
47168: 4e56 0000 linkw %fp,#0 4716c: 2039 0005 fb10 movel 5fb10 <_Thread_Dispatch_disable_level>,%d0 47172: 5280 addql #1,%d0 47174: 2f0a movel %a2,%sp@- 47176: 23c0 0005 fb10 movel %d0,5fb10 <_Thread_Dispatch_disable_level> 4717c: 2f02 movel %d2,%sp@-
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
4717e: 2439 0005 fa1a movel 5fa1a <_Rate_monotonic_Information+0x6>,%d2 47184: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2
4718a: 6216 bhis 471a2 <rtems_rate_monotonic_reset_all_statistics+0x3a><== NEVER TAKEN
4718c: 45f9 0004 71b4 lea 471b4 <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
47192: 2f02 movel %d2,%sp@-
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47194: 5282 addql #1,%d2
status = rtems_rate_monotonic_reset_statistics( id );
47196: 4e92 jsr %a2@
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47198: 588f addql #4,%sp 4719a: b4b9 0005 fa1e cmpl 5fa1e <_Rate_monotonic_Information+0xa>,%d2
471a0: 63f0 blss 47192 <rtems_rate_monotonic_reset_all_statistics+0x2a>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
471a2: 242e fff8 movel %fp@(-8),%d2 471a6: 246e fffc moveal %fp@(-4),%a2 471aa: 4e5e unlk %fp
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
471ac: 4ef9 0004 9874 jmp 49874 <_Thread_Enable_dispatch>
...
00057468 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
57468: 4e56 ffec linkw %fp,#-20 5746c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57470: 262e 0008 movel %fp@(8),%d3 57474: 242e 000c movel %fp@(12),%d2 57478: 246e 001c moveal %fp@(28),%a2
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
5747c: 4a83 tstl %d3 5747e: 6700 0096 beqw 57516 <rtems_region_create+0xae>
return RTEMS_INVALID_NAME;
if ( !starting_address )
57482: 4a82 tstl %d2
57484: 670a beqs 57490 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !id )
57486: 4a8a tstl %a2
57488: 6706 beqs 57490 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
5748a: 7003 moveq #3,%d0 5748c: c082 andl %d2,%d0
5748e: 670c beqs 5749c <rtems_region_create+0x34>
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
return return_status;
57490: 7009 moveq #9,%d0
}
57492: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57498: 4e5e unlk %fp 5749a: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
5749c: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 574a2: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
574a8: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 574ae: 4eb9 0005 b39c jsr 5b39c <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
574b4: 508f addql #8,%sp 574b6: 2640 moveal %d0,%a3 574b8: 4a80 tstl %d0
574ba: 6766 beqs 57522 <rtems_region_create+0xba>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
574bc: 2f2e 0014 movel %fp@(20),%sp@- 574c0: 2f2e 0010 movel %fp@(16),%sp@- 574c4: 2f02 movel %d2,%sp@- 574c6: 486b 0068 pea %a3@(104) 574ca: 4eb9 0005 ae20 jsr 5ae20 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
574d0: 4fef 0010 lea %sp@(16),%sp
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
574d4: 2740 005c movel %d0,%a3@(92)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
574d8: 6662 bnes 5753c <rtems_region_create+0xd4>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
574da: 2f0b movel %a3,%sp@- 574dc: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 574e2: 103c 0008 moveb #8,%d0 574e6: 2d40 fffc movel %d0,%fp@(-4) 574ea: 4eb9 0005 b6d4 jsr 5b6d4 <_Objects_Free> 574f0: 202e fffc movel %fp@(-4),%d0 574f4: 508f addql #8,%sp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
574f6: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 574fc: 2d40 fffc movel %d0,%fp@(-4) 57500: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57506: 202e fffc movel %fp@(-4),%d0 5750a: 588f addql #4,%sp
}
5750c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57512: 4e5e unlk %fp 57514: 4e75 rts
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
57516: 7003 moveq #3,%d0
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
57518: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5751e: 4e5e unlk %fp 57520: 4e75 rts
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57522: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
57528: 7005 moveq #5,%d0
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
5752a: 2d40 fffc movel %d0,%fp@(-4) 5752e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57534: 202e fffc movel %fp@(-4),%d0 57538: 588f addql #4,%sp 5753a: 60d0 bras 5750c <rtems_region_create+0xa4>
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
5753c: 2742 0050 movel %d2,%a3@(80)
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57540: 222e 0018 movel %fp@(24),%d1
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57544: 202e 0010 movel %fp@(16),%d0
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57548: e489 lsrl #2,%d1
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
5754a: 242e 0014 movel %fp@(20),%d2
the_region->attribute_set = attribute_set;
5754e: 206e 0018 moveal %fp@(24),%a0
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57552: 2740 0054 movel %d0,%a3@(84)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57556: 4280 clrl %d0
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
57558: 2742 0058 movel %d2,%a3@(88)
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
5755c: 7401 moveq #1,%d2
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
5755e: 2748 0060 movel %a0,%a3@(96)
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57562: c481 andl %d1,%d2
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
57564: 42ab 0064 clrl %a3@(100)
_Thread_queue_Initialize(
57568: 4878 0006 pea 6 <EXTENDSFDF> 5756c: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 57570: 2f02 movel %d2,%sp@- 57572: 486b 0010 pea %a3@(16)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
57576: 4282 clrl %d2 57578: 2d40 fffc movel %d0,%fp@(-4) 5757c: 4eb9 0005 c8e4 jsr 5c8e4 <_Thread_queue_Initialize> 57582: 222b 0008 movel %a3@(8),%d1
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57586: 4fef 0010 lea %sp@(16),%sp 5758a: 2079 0007 cfd0 moveal 7cfd0 <_Region_Information+0x18>,%a0 57590: 3401 movew %d1,%d2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
57592: 2743 000c movel %d3,%a3@(12) 57596: 202e fffc movel %fp@(-4),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
5759a: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 5759e: 2481 movel %d1,%a2@
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
575a0: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 575a6: 2d40 fffc movel %d0,%fp@(-4) 575aa: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
575b0: 202e fffc movel %fp@(-4),%d0 575b4: 588f addql #4,%sp 575b6: 6000 ff54 braw 5750c <rtems_region_create+0xa4>
...
0005766c <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
5766c: 4e56 fff8 linkw %fp,#-8 57670: 2f0a movel %a2,%sp@- 57672: 2f02 movel %d2,%sp@- 57674: 242e 000c movel %fp@(12),%d2
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
57678: 677e beqs 576f8 <rtems_region_extend+0x8c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
5767a: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 57680: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
57686: 486e fff8 pea %fp@(-8) 5768a: 2f2e 0008 movel %fp@(8),%sp@- 5768e: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 57694: 4eb9 0005 b838 jsr 5b838 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
5769a: 4fef 0010 lea %sp@(16),%sp 5769e: 2440 moveal %d0,%a2 576a0: 4aae fff8 tstl %fp@(-8)
576a4: 6640 bnes 576e6 <rtems_region_extend+0x7a>
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
576a6: 486e fffc pea %fp@(-4) 576aa: 2f2e 0010 movel %fp@(16),%sp@- 576ae: 2f02 movel %d2,%sp@- 576b0: 486a 0068 pea %a2@(104) 576b4: 4eb9 0005 ab10 jsr 5ab10 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
576ba: 4fef 0010 lea %sp@(16),%sp 576be: 4a80 tstl %d0
576c0: 6748 beqs 5770a <rtems_region_extend+0x9e>
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
576c2: 7201 moveq #1,%d1 576c4: b280 cmpl %d0,%d1
576c6: 6760 beqs 57728 <rtems_region_extend+0xbc>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
576c8: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
576ce: 7418 moveq #24,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
576d0: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
576d6: 588f addql #4,%sp
}
576d8: 2002 movel %d2,%d0 576da: 242e fff0 movel %fp@(-16),%d2 576de: 246e fff4 moveal %fp@(-12),%a2 576e2: 4e5e unlk %fp 576e4: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
576e6: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
576ec: 7404 moveq #4,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
576ee: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
576f4: 588f addql #4,%sp 576f6: 60e0 bras 576d8 <rtems_region_extend+0x6c>
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
576f8: 143c 0009 moveb #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
576fc: 2002 movel %d2,%d0 576fe: 242e fff0 movel %fp@(-16),%d2 57702: 246e fff4 moveal %fp@(-12),%a2 57706: 4e5e unlk %fp 57708: 4e75 rts
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
5770a: 202e fffc movel %fp@(-4),%d0
the_region->maximum_segment_size += amount_extended;
5770e: d1aa 005c addl %d0,%a2@(92) 57712: 4282 clrl %d2
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
57714: d1aa 0054 addl %d0,%a2@(84)
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57718: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 5771e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57724: 588f addql #4,%sp 57726: 60b0 bras 576d8 <rtems_region_extend+0x6c>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57728: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
5772e: 7409 moveq #9,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57730: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57736: 588f addql #4,%sp 57738: 609e bras 576d8 <rtems_region_extend+0x6c>
...
000577d4 <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
577d4: 4e56 fffc linkw %fp,#-4 577d8: 2f02 movel %d2,%sp@- 577da: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
577de: 6766 beqs 57846 <rtems_region_get_information+0x72><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
577e0: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 577e6: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 577ec: 486e fffc pea %fp@(-4) 577f0: 2f2e 0008 movel %fp@(8),%sp@- 577f4: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 577fa: 4eb9 0005 b838 jsr 5b838 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
57800: 4fef 0010 lea %sp@(16),%sp 57804: 4aae fffc tstl %fp@(-4)
57808: 662a bnes 57834 <rtems_region_get_information+0x60>
case OBJECTS_LOCAL:
_Heap_Get_information( &the_region->Memory, the_info );
5780a: 2f02 movel %d2,%sp@- 5780c: 2040 moveal %d0,%a0 5780e: 4868 0068 pea %a0@(104) 57812: 4282 clrl %d2 57814: 4eb9 0005 ad98 jsr 5ad98 <_Heap_Get_information>
return_status = RTEMS_SUCCESSFUL;
break;
5781a: 508f addql #8,%sp
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
5781c: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 57822: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57828: 588f addql #4,%sp
}
5782a: 2002 movel %d2,%d0 5782c: 242e fff8 movel %fp@(-8),%d2 57830: 4e5e unlk %fp 57832: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57834: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
5783a: 7404 moveq #4,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
5783c: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57842: 588f addql #4,%sp 57844: 60e4 bras 5782a <rtems_region_get_information+0x56>
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
57846: 143c 0009 moveb #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
5784a: 2002 movel %d2,%d0 5784c: 242e fff8 movel %fp@(-8),%d2
57850: 4e5e unlk %fp <== NOT EXECUTED
000579c0 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
579c0: 4e56 fffc linkw %fp,#-4 579c4: 2f03 movel %d3,%sp@- 579c6: 262e 0010 movel %fp@(16),%d3 579ca: 2f02 movel %d2,%sp@- 579cc: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
579d0: 6700 0092 beqw 57a64 <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
if ( !size )
579d4: 4a83 tstl %d3 579d6: 6700 008c beqw 57a64 <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
579da: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 579e0: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 579e6: 486e fffc pea %fp@(-4) 579ea: 2f2e 0008 movel %fp@(8),%sp@- 579ee: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 579f4: 4eb9 0005 b838 jsr 5b838 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
579fa: 222e fffc movel %fp@(-4),%d1 579fe: 4fef 0010 lea %sp@(16),%sp
57a02: 6636 bnes 57a3a <rtems_region_get_segment_size+0x7a>
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
57a04: 2f03 movel %d3,%sp@- 57a06: 2040 moveal %d0,%a0 57a08: 2f02 movel %d2,%sp@- 57a0a: 4868 0068 pea %a0@(104) 57a0e: 4eb9 0005 b274 jsr 5b274 <_Heap_Size_of_alloc_area> 57a14: 4fef 000c lea %sp@(12),%sp 57a18: 4a00 tstb %d0
57a1a: 6624 bnes 57a40 <rtems_region_get_segment_size+0x80><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57a1c: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
57a22: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57a24: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
57a2a: 588f addql #4,%sp <== NOT EXECUTED
}
57a2c: 2002 movel %d2,%d0 57a2e: 242e fff4 movel %fp@(-12),%d2 57a32: 262e fff8 movel %fp@(-8),%d3 57a36: 4e5e unlk %fp 57a38: 4e75 rts
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
57a3a: 7001 moveq #1,%d0 57a3c: b081 cmpl %d1,%d0
57a3e: 6712 beqs 57a52 <rtems_region_get_segment_size+0x92><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57a40: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
57a46: 4282 clrl %d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57a48: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57a4e: 588f addql #4,%sp 57a50: 60da bras 57a2c <rtems_region_get_segment_size+0x6c>
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57a52: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
57a58: 7404 moveq #4,%d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57a5a: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57a60: 588f addql #4,%sp 57a62: 60c8 bras 57a2c <rtems_region_get_segment_size+0x6c> 57a64: 7409 moveq #9,%d2
}
57a66: 2002 movel %d2,%d0 57a68: 242e fff4 movel %fp@(-12),%d2 57a6c: 262e fff8 movel %fp@(-8),%d3
57a70: 4e5e unlk %fp <== NOT EXECUTED
00045a8c <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
45a8c: 4e56 ffd4 linkw %fp,#-44 45a90: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 45a94: 262e 0008 movel %fp@(8),%d3 45a98: 242e 0010 movel %fp@(16),%d2 45a9c: 246e 0018 moveal %fp@(24),%a2
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
45aa0: 4a83 tstl %d3
45aa2: 6748 beqs 45aec <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
45aa4: 4a8a tstl %a2 45aa6: 6700 00ea beqw 45b92 <rtems_semaphore_create+0x106>
* id - semaphore id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_semaphore_create(
45aaa: 2002 movel %d2,%d0 45aac: 0280 0000 00c0 andil #192,%d0
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
45ab2: 6744 beqs 45af8 <rtems_semaphore_create+0x6c>
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
45ab4: 7230 moveq #48,%d1 45ab6: 7810 moveq #16,%d4 45ab8: c282 andl %d2,%d1 45aba: b881 cmpl %d1,%d4
45abc: 670c beqs 45aca <rtems_semaphore_create+0x3e>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
45abe: 700b moveq #11,%d0
}
45ac0: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ac6: 4e5e unlk %fp 45ac8: 4e75 rts
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
45aca: 44c2 movew %d2,%ccr
45acc: 66f0 bnes 45abe <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
45ace: 0c80 0000 00c0 cmpil #192,%d0
45ad4: 67e8 beqs 45abe <rtems_semaphore_create+0x32>
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
45ad6: 7001 moveq #1,%d0 45ad8: b0ae 000c cmpl %fp@(12),%d0
45adc: 6420 bccs 45afe <rtems_semaphore_create+0x72>
45ade: 103c 000a moveb #10,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
45ae2: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ae8: 4e5e unlk %fp 45aea: 4e75 rts
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
45aec: 7003 moveq #3,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
45aee: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45af4: 4e5e unlk %fp 45af6: 4e75 rts
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
45af8: 7830 moveq #48,%d4 45afa: c882 andl %d2,%d4
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
45afc: 66d8 bnes 45ad6 <rtems_semaphore_create+0x4a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
45afe: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
45b0c: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45b12: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
45b18: 588f addql #4,%sp 45b1a: 2640 moveal %d0,%a3 45b1c: 4a80 tstl %d0 45b1e: 6700 00d8 beqw 45bf8 <rtems_semaphore_create+0x16c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
45b22: 2742 0010 movel %d2,%a3@(16)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
45b26: 4a84 tstl %d4
45b28: 6774 beqs 45b9e <rtems_semaphore_create+0x112>
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
45b2a: 44c2 movew %d2,%ccr 45b2c: 56c0 sne %d0 45b2e: 49c0 extbl %d0 45b30: 5280 addql #1,%d0 45b32: 2d40 fff0 movel %d0,%fp@(-16)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
45b36: 7010 moveq #16,%d0 45b38: b084 cmpl %d4,%d0 45b3a: 6700 00ce beqw 45c0a <rtems_semaphore_create+0x17e>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
45b3e: 7202 moveq #2,%d1
the_mutex_attr.only_owner_release = false;
45b40: 4204 clrb %d4
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
45b42: 2d41 ffea movel %d1,%fp@(-22)
the_mutex_attr.only_owner_release = false;
45b46: 1d44 ffee moveb %d4,%fp@(-18)
}
mutex_status = _CORE_mutex_Initialize(
45b4a: 7001 moveq #1,%d0 45b4c: b0ae 000c cmpl %fp@(12),%d0 45b50: 57c0 seq %d0 45b52: 49c0 extbl %d0 45b54: 4480 negl %d0 45b56: 2f00 movel %d0,%sp@- 45b58: 486e ffea pea %fp@(-22) 45b5c: 486b 0014 pea %a3@(20) 45b60: 4eb9 0004 6780 jsr 46780 <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 7206 moveq #6,%d1 45b6c: b280 cmpl %d0,%d1
45b6e: 665e bnes 45bce <rtems_semaphore_create+0x142>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
45b70: 2f0b movel %a3,%sp@- 45b72: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45b78: 4eb9 0004 736c jsr 4736c <_Objects_Free>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
45b7e: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
45b84: 508f addql #8,%sp
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
45b86: 7013 moveq #19,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
45b88: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b8e: 4e5e unlk %fp 45b90: 4e75 rts
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
45b92: 7009 moveq #9,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
45b94: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b9a: 4e5e unlk %fp 45b9c: 4e75 rts
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
45b9e: 2f2e 000c movel %fp@(12),%sp@-
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
45ba2: 72ff moveq #-1,%d1
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
45ba4: 486e fff8 pea %fp@(-8) 45ba8: 486b 0014 pea %a3@(20)
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
45bac: 44c2 movew %d2,%ccr 45bae: 56c0 sne %d0
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
45bb0: 2d41 fff8 movel %d1,%fp@(-8)
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
45bb4: 49c0 extbl %d0 45bb6: 5280 addql #1,%d0
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
45bb8: 42ae ffea clrl %fp@(-22)
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
45bbc: 2d40 fffc movel %d0,%fp@(-4)
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
45bc0: 42ae fff4 clrl %fp@(-12)
_CORE_semaphore_Initialize(
45bc4: 4eb9 0004 6ac8 jsr 46ac8 <_CORE_semaphore_Initialize> 45bca: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
45bce: 202b 0008 movel %a3@(8),%d0 45bd2: 4281 clrl %d1 45bd4: 2079 0005 d91c moveal 5d91c <_Semaphore_Information+0x18>,%a0 45bda: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
45bdc: 2743 000c movel %d3,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
45be0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
45be4: 2480 movel %d0,%a2@
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
45be6: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
45bec: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
45bf2: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
45bf4: 4e5e unlk %fp 45bf6: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
45bf8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 45bfe: 7005 moveq #5,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
45c00: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45c06: 4e5e unlk %fp 45c08: 4e75 rts
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
45c0a: 42ae ffea clrl %fp@(-22)
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
45c0e: 7801 moveq #1,%d4
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
45c10: 4201 clrb %d1
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
45c12: 2d6e 0014 fff4 movel %fp@(20),%fp@(-12)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
45c18: 1d41 ffee moveb %d1,%fp@(-18)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
45c1c: b8ae fff0 cmpl %fp@(-16),%d4 45c20: 6600 ff28 bnew 45b4a <rtems_semaphore_create+0xbe>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
45c24: 0802 0006 btst #6,%d2
45c28: 6712 beqs 45c3c <rtems_semaphore_create+0x1b0>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
45c2a: 103c 0002 moveb #2,%d0
the_mutex_attr.only_owner_release = true;
45c2e: 7201 moveq #1,%d1
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
45c30: 2d40 fff0 movel %d0,%fp@(-16)
the_mutex_attr.only_owner_release = true;
45c34: 1d41 ffee moveb %d1,%fp@(-18) 45c38: 6000 ff10 braw 45b4a <rtems_semaphore_create+0xbe>
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
45c3c: 4a02 tstb %d2 45c3e: 6c00 ff0a bgew 45b4a <rtems_semaphore_create+0xbe>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
45c42: 7803 moveq #3,%d4
the_mutex_attr.only_owner_release = true;
45c44: 7001 moveq #1,%d0
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
45c46: 2d44 fff0 movel %d4,%fp@(-16)
the_mutex_attr.only_owner_release = true;
45c4a: 1d40 ffee moveb %d0,%fp@(-18) 45c4e: 6000 fefa braw 45b4a <rtems_semaphore_create+0xbe>
...
00045c54 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
45c54: 4e56 fffc linkw %fp,#-4 45c58: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
45c5a: 486e fffc pea %fp@(-4) 45c5e: 2f2e 0008 movel %fp@(8),%sp@- 45c62: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45c68: 4eb9 0004 74d0 jsr 474d0 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
45c6e: 4fef 000c lea %sp@(12),%sp 45c72: 2440 moveal %d0,%a2 45c74: 4aae fffc tstl %fp@(-4)
45c78: 670a beqs 45c84 <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
45c7a: 246e fff8 moveal %fp@(-8),%a2
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
45c7e: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
45c80: 4e5e unlk %fp 45c82: 4e75 rts 45c84: 7030 moveq #48,%d0 45c86: c0aa 0010 andl %a2@(16),%d0
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
45c8a: 6760 beqs 45cec <rtems_semaphore_delete+0x98>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
45c8c: 4aaa 0062 tstl %a2@(98)
45c90: 6616 bnes 45ca8 <rtems_semaphore_delete+0x54>
45c92: 7220 moveq #32,%d1 45c94: b280 cmpl %d0,%d1
45c96: 6710 beqs 45ca8 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
45c98: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
45c9e: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
45ca2: 700c moveq #12,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
45ca4: 4e5e unlk %fp 45ca6: 4e75 rts
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
45ca8: 4878 0004 pea 4 <CONTEXT_ARG> 45cac: 42a7 clrl %sp@- 45cae: 486a 0014 pea %a2@(20) 45cb2: 4eb9 0004 6774 jsr 46774 <_CORE_mutex_Flush> 45cb8: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
45cbc: 2f0a movel %a2,%sp@- 45cbe: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45cc4: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
45cca: 2f0a movel %a2,%sp@- 45ccc: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45cd2: 4eb9 0004 736c jsr 4736c <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
45cd8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
45cde: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
45ce2: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
45ce4: 246e fff8 moveal %fp@(-8),%a2 45ce8: 4e5e unlk %fp 45cea: 4e75 rts
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
45cec: 4878 0002 pea 2 <DOUBLE_FLOAT> 45cf0: 42a7 clrl %sp@- 45cf2: 486a 0014 pea %a2@(20) 45cf6: 4eb9 0004 6abc jsr 46abc <_CORE_semaphore_Flush> 45cfc: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
45d00: 2f0a movel %a2,%sp@- 45d02: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45d08: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45d16: 4eb9 0004 736c jsr 4736c <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
45d1c: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
45d22: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
45d26: 4280 clrl %d0 45d28: 60ba bras 45ce4 <rtems_semaphore_delete+0x90>
...
00050460 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
50460: 4e56 fffc linkw %fp,#-4 50464: 486e fffc pea %fp@(-4) 50468: 2f2e 0008 movel %fp@(8),%sp@- 5046c: 4879 0006 3a7c pea 63a7c <_Semaphore_Information> 50472: 4eb9 0004 9574 jsr 49574 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
50478: 4fef 000c lea %sp@(12),%sp 5047c: 4aae fffc tstl %fp@(-4)
50480: 6706 beqs 50488 <rtems_semaphore_flush+0x28>
50482: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
50484: 4e5e unlk %fp 50486: 4e75 rts
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
50488: 7230 moveq #48,%d1 5048a: 2040 moveal %d0,%a0 5048c: c2a8 0010 andl %a0@(16),%d1
50490: 6720 beqs 504b2 <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
50492: 4878 0001 pea 1 <ADD> 50496: 42a7 clrl %sp@- 50498: 4868 0014 pea %a0@(20) 5049c: 4eb9 0004 877c jsr 4877c <_CORE_mutex_Flush> 504a2: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
504a6: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> 504ac: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
504ae: 4e5e unlk %fp 504b0: 4e75 rts
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
504b2: 4878 0001 pea 1 <ADD> 504b6: 2040 moveal %d0,%a0 504b8: 42a7 clrl %sp@- 504ba: 4868 0014 pea %a0@(20) 504be: 4eb9 0004 8ac4 jsr 48ac4 <_CORE_semaphore_Flush> 504c4: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
504c8: 4eb9 0004 9e60 jsr 49e60 <_Thread_Enable_dispatch> 504ce: 4280 clrl %d0 504d0: 60dc bras 504ae <rtems_semaphore_flush+0x4e>
...
00058180 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
58180: 4e56 fffc linkw %fp,#-4 58184: 2f03 movel %d3,%sp@- 58186: 2f02 movel %d2,%sp@- 58188: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
5818c: 660e bnes 5819c <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5818e: 242e fff4 movel %fp@(-12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58192: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58194: 262e fff8 movel %fp@(-8),%d3 58198: 4e5e unlk %fp 5819a: 4e75 rts
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
5819c: 486e fffc pea %fp@(-4) 581a0: 2f2e 0008 movel %fp@(8),%sp@- 581a4: 4eb9 0005 c1bc jsr 5c1bc <_Thread_Get>
switch ( location ) {
581aa: 508f addql #8,%sp 581ac: 4aae fffc tstl %fp@(-4)
581b0: 670e beqs 581c0 <rtems_signal_send+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
581b2: 242e fff4 movel %fp@(-12),%d2
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
581b6: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
581b8: 262e fff8 movel %fp@(-8),%d3 581bc: 4e5e unlk %fp 581be: 4e75 rts
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
581c0: 2240 moveal %d0,%a1 581c2: 2069 0108 moveal %a1@(264),%a0
asr = &api->Signal;
581c6: 4aa8 000a tstl %a0@(10)
581ca: 6770 beqs 5823c <rtems_signal_send+0xbc>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
581cc: 4a28 0008 tstb %a0@(8)
581d0: 673e beqs 58210 <rtems_signal_send+0x90>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
581d2: 223c 0000 0700 movel #1792,%d1 581d8: 40c3 movew %sr,%d3 581da: 8283 orl %d3,%d1 581dc: 46c1 movew %d1,%sr
*signal_set |= signals;
581de: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
581e2: 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 ) )
581e4: 2239 0007 d14e movel 7d14e <_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;
581ea: 7401 moveq #1,%d2 581ec: 1342 0074 moveb %d2,%a1@(116)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
581f0: 4a81 tstl %d1
581f2: 6708 beqs 581fc <rtems_signal_send+0x7c>
581f4: b0b9 0007 d16e cmpl 7d16e <_Thread_Executing>,%d0
581fa: 6730 beqs 5822c <rtems_signal_send+0xac> <== ALWAYS TAKEN
_ISR_Signals_to_thread_executing = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
581fc: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58202: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58204: 242e fff4 movel %fp@(-12),%d2 58208: 262e fff8 movel %fp@(-8),%d3 5820c: 4e5e unlk %fp 5820e: 4e75 rts
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
58210: 203c 0000 0700 movel #1792,%d0 58216: 40c1 movew %sr,%d1 58218: 8081 orl %d1,%d0 5821a: 46c0 movew %d0,%sr
*signal_set |= signals;
5821c: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
58220: 46c1 movew %d1,%sr
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58222: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58228: 4280 clrl %d0 5822a: 60d8 bras 58204 <rtems_signal_send+0x84>
_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 ) )
_ISR_Signals_to_thread_executing = true;
5822c: 13c2 0007 d1f8 moveb %d2,7d1f8 <_ISR_Signals_to_thread_executing>
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58232: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58238: 4280 clrl %d0 5823a: 60c8 bras 58204 <rtems_signal_send+0x84>
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
5823c: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58242: 242e fff4 movel %fp@(-12),%d2
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
58246: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58248: 262e fff8 movel %fp@(-8),%d3
5824c: 4e5e unlk %fp <== NOT EXECUTED
00042090 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
42090: 4e56 0000 linkw %fp,#0 42094: 206e 0008 moveal %fp@(8),%a0
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
42098: 4aa8 0008 tstl %a0@(8)
4209c: 672c beqs 420ca <rtems_stack_checker_begin_extension+0x3a><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
4209e: 2068 00c0 moveal %a0@(192),%a0 420a2: 43f9 0005 df24 lea 5df24 <Stack_check_Pattern>,%a1 420a8: 2151 0008 movel %a1@,%a0@(8) 420ac: 43f9 0005 df28 lea 5df28 <Stack_check_Pattern+0x4>,%a1 420b2: 2151 000c movel %a1@,%a0@(12) 420b6: 43f9 0005 df2c lea 5df2c <Stack_check_Pattern+0x8>,%a1 420bc: 2151 0010 movel %a1@,%a0@(16) 420c0: 43f9 0005 df30 lea 5df30 <Stack_check_Pattern+0xc>,%a1 420c6: 2151 0014 movel %a1@,%a0@(20)
}
420ca: 4e5e unlk %fp <== NOT EXECUTED
0004252e <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
4252e: 4e56 0000 linkw %fp,#0 42532: 2f0a movel %a2,%sp@- 42534: 246e 000c moveal %fp@(12),%a2
Stack_check_Initialize();
42538: 4eb9 0004 24c8 jsr 424c8 <Stack_check_Initialize>
if (the_thread)
4253e: 4a8a tstl %a2
42540: 6716 beqs 42558 <rtems_stack_checker_create_extension+0x2a><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
42542: 2f2a 00bc movel %a2@(188),%sp@- 42546: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70> 4254a: 2f2a 00c0 movel %a2@(192),%sp@- 4254e: 4eb9 0004 e6c4 jsr 4e6c4 <memset> 42554: 4fef 000c lea %sp@(12),%sp
return true;
}
42558: 246e fffc moveal %fp@(-4),%a2 4255c: 4e5e unlk %fp 4255e: 7001 moveq #1,%d0
...
000423b4 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
423b4: 4e56 0000 linkw %fp,#0
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
423b8: 2279 0005 e156 moveal 5e156 <_Thread_Executing>,%a1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
423be: 2069 00c0 moveal %a1@(192),%a0
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
423c2: 2f02 movel %d2,%sp@-
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
423c4: b1ce cmpal %fp,%a0
423c6: 6354 blss 4241c <rtems_stack_checker_is_blown+0x68>
423c8: 4202 clrb %d2 <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
423ca: 4ab9 0005 d718 tstl 5d718 <Stack_check_Initialized>
423d0: 662a bnes 423fc <rtems_stack_checker_is_blown+0x48><== ALWAYS TAKEN
423d2: 7001 moveq #1,%d0 <== NOT EXECUTED
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
423d4: 4a02 tstb %d2
423d6: 6704 beqs 423dc <rtems_stack_checker_is_blown+0x28><== NEVER TAKEN
423d8: 4a00 tstb %d0
423da: 664e bnes 4242a <rtems_stack_checker_is_blown+0x76>
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
423dc: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 423e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 423e4: 2f39 0005 e156 movel 5e156 <_Thread_Executing>,%sp@- <== NOT EXECUTED 423ea: 4eb9 0004 2304 jsr 42304 <Stack_check_report_blown_task> <== NOT EXECUTED
return true; }
423f0: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
return true;
423f4: 508f addql #8,%sp <== NOT EXECUTED
}
423f6: 4e5e unlk %fp <== NOT EXECUTED
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
423f8: 7001 moveq #1,%d0 <== NOT EXECUTED
return true; }
423fa: 4e75 rts <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
pattern_ok = (!memcmp(
423fc: 4878 0010 pea 10 <INVALID_OPERATION> 42400: 4879 0005 df24 pea 5df24 <Stack_check_Pattern> 42406: 4868 0008 pea %a0@(8) 4240a: 4eb9 0004 e5dc jsr 4e5dc <memcmp> 42410: 4fef 000c lea %sp@(12),%sp 42414: 4a80 tstl %d0 42416: 57c0 seq %d0 42418: 4480 negl %d0 4241a: 60b8 bras 423d4 <rtems_stack_checker_is_blown+0x20>
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
4241c: 2008 movel %a0,%d0 4241e: d0a9 00bc addl %a1@(188),%d0 42422: b08e cmpl %fp,%d0 42424: 54c2 scc %d2 42426: 4482 negl %d2 42428: 60a0 bras 423ca <rtems_stack_checker_is_blown+0x16>
/* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; }
4242a: 242e fffc movel %fp@(-4),%d2 4242e: 4e5e unlk %fp
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
42430: 4200 clrb %d0 <== NOT EXECUTED
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
return true;
}
000422ec <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
422ec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
422f0: 4879 0004 3874 pea 43874 <printk_plugin> <== NOT EXECUTED 422f6: 42a7 clrl %sp@- <== NOT EXECUTED 422f8: 4eb9 0004 228a jsr 4228a <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED 422fe: 508f addql #8,%sp <== NOT EXECUTED
}
42300: 4e5e unlk %fp <== NOT EXECUTED
0004228a <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
4228a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4228e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42290: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 42294: 2f02 movel %d2,%sp@- <== NOT EXECUTED
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
42296: 4879 0005 b3e2 pea 5b3e2 <IntUartPollCallbacks.6560+0x6c> <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
4229c: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
print_context = context; print_handler = print;
422a0: 23ca 0005 d720 movel %a2,5d720 <print_handler> <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
422a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
422a8: 23c2 0005 d71c movel %d2,5d71c <print_context> <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
422ae: 4e92 jsr %a2@ <== NOT EXECUTED
(*print)( context,
422b0: 4879 0005 b3f9 pea 5b3f9 <IntUartPollCallbacks.6560+0x83> <== NOT EXECUTED 422b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 422b8: 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 );
422ba: 4879 0004 2102 pea 42102 <Stack_check_Dump_threads_usage> <== NOT EXECUTED 422c0: 4eb9 0004 74b8 jsr 474b8 <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
422c6: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 422ca: 4eb9 0004 2102 jsr 42102 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
print_handler = NULL;
}
422d0: 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;
422d4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
}
422d8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 422dc: 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;
422de: 42b9 0005 d71c clrl 5d71c <print_context> <== NOT EXECUTED
print_handler = NULL;
422e4: 42b9 0005 d720 clrl 5d720 <print_handler> <== NOT EXECUTED
}
00042434 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
42434: 4e56 0000 linkw %fp,#0 42438: 2f0a movel %a2,%sp@- 4243a: 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;
4243e: 222a 00c0 movel %a2@(192),%d1 42442: 5081 addql #8,%d1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
42444: 202a 00c0 movel %a2@(192),%d0 42448: b08e cmpl %fp,%d0
4244a: 6208 bhis 42454 <rtems_stack_checker_switch_extension+0x20><== NEVER TAKEN
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
Stack_Control *the_stack = &running->Start.Initial_stack;
4244c: d0aa 00bc addl %a2@(188),%d0 42450: b08e cmpl %fp,%d0
42452: 6436 bccs 4248a <rtems_stack_checker_switch_extension+0x56><== ALWAYS TAKEN
/*
* 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,
42454: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 42458: 4879 0005 df24 pea 5df24 <Stack_check_Pattern> <== NOT EXECUTED 4245e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 42460: 4eb9 0004 e5dc jsr 4e5dc <memcmp> <== NOT EXECUTED 42466: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4246a: 4a80 tstl %d0 <== NOT EXECUTED 4246c: 57c0 seq %d0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
4246e: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
42472: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
42476: 4480 negl %d0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
42478: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4247e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
} }
42482: 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 );
42484: 4ef9 0004 2304 jmp 42304 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
4248a: 4878 0010 pea 10 <INVALID_OPERATION> 4248e: 4879 0005 df24 pea 5df24 <Stack_check_Pattern> 42494: 2f01 movel %d1,%sp@- 42496: 4eb9 0004 e5dc jsr 4e5dc <memcmp> 4249c: 4fef 000c lea %sp@(12),%sp
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
424a0: 4a80 tstl %d0
424a2: 671c beqs 424c0 <rtems_stack_checker_switch_extension+0x8c><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
424a4: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
424a8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
424ac: 4200 clrb %d0 <== NOT EXECUTED
Stack_check_report_blown_task( running, pattern_ok );
424ae: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 424b4: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
} }
424b8: 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 );
424ba: 4ef9 0004 2304 jmp 42304 <Stack_check_report_blown_task> <== NOT EXECUTED
} }
424c0: 246e fffc moveal %fp@(-4),%a2
424c4: 4e5e unlk %fp <== NOT EXECUTED
0004d3f4 <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d3f4: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4d3f8: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4d3fc: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4d400: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4d404: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d408: 4a8a tstl %a2 <== NOT EXECUTED 4d40a: 677a beqs 4d486 <rtems_string_to_double+0x92> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d40c: 49f9 0004 f620 lea 4f620 <__errno>,%a4 <== NOT EXECUTED 4d412: 4e94 jsr %a4@ <== NOT EXECUTED
*n = 0;
4d414: 4281 clrl %d1 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d416: 2040 moveal %d0,%a0 <== NOT EXECUTED
*n = 0;
4d418: 4280 clrl %d0 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d41a: 4290 clrl %a0@ <== NOT EXECUTED
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d41c: 486e fffc pea %fp@(-4) <== NOT EXECUTED
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d420: 2480 movel %d0,%a2@ <== NOT EXECUTED 4d422: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d426: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d428: 4eb9 0005 2074 jsr 52074 <strtod> <== 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 )
4d42e: 508f addql #8,%sp <== NOT EXECUTED
errno = 0;
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d430: 2600 movel %d0,%d3 <== NOT EXECUTED 4d432: 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 )
4d434: 4a8b tstl %a3 <== NOT EXECUTED 4d436: 6704 beqs 4d43c <rtems_string_to_double+0x48> <== NOT EXECUTED
*endptr = end;
4d438: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED
/* nothing was converted */
if ( end == s )
4d43c: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4d440: 6750 beqs 4d492 <rtems_string_to_double+0x9e> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d442: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 4d446: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4d44c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d44e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d450: 4eb9 0005 cf1c jsr 5cf1c <__gtdf2> <== NOT EXECUTED 4d456: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d45a: 4a80 tstl %d0 <== NOT EXECUTED 4d45c: 6e12 bgts 4d470 <rtems_string_to_double+0x7c> <== NOT EXECUTED
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d45e: 2483 movel %d3,%a2@ <== NOT EXECUTED 4d460: 4280 clrl %d0 <== NOT EXECUTED 4d462: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED
#endif return RTEMS_SUCCESSFUL; }
4d466: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d46c: 4e5e unlk %fp <== NOT EXECUTED 4d46e: 4e75 rts <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d470: 4e94 jsr %a4@ <== NOT EXECUTED 4d472: 7222 moveq #34,%d1 <== NOT EXECUTED 4d474: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d476: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d478: 66e4 bnes 4d45e <rtems_string_to_double+0x6a> <== NOT EXECUTED 4d47a: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d47c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d482: 4e5e unlk %fp <== NOT EXECUTED 4d484: 4e75 rts <== NOT EXECUTED
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d486: 7009 moveq #9,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d488: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d48e: 4e5e unlk %fp <== NOT EXECUTED 4d490: 4e75 rts <== NOT EXECUTED
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d492: 700b moveq #11,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d494: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d49a: 4e5e unlk %fp <== NOT EXECUTED
...
0004d4a0 <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d4a0: 4e56 ffe8 linkw %fp,#-24 4d4a4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d4a8: 242e 0008 movel %fp@(8),%d2 4d4ac: 246e 000c moveal %fp@(12),%a2 4d4b0: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d4b4: 4a8a tstl %a2
4d4b6: 6768 beqs 4d520 <rtems_string_to_float+0x80>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d4b8: 49f9 0004 f620 lea 4f620 <__errno>,%a4 4d4be: 4e94 jsr %a4@ 4d4c0: 2040 moveal %d0,%a0 4d4c2: 4290 clrl %a0@
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d4c4: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d4c8: 24bc 0000 0000 movel #0,%a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d4ce: 2f02 movel %d2,%sp@- 4d4d0: 4eb9 0005 2016 jsr 52016 <strtof>
#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 )
4d4d6: 508f addql #8,%sp
errno = 0;
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d4d8: 2600 movel %d0,%d3
#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 )
4d4da: 4a8b tstl %a3
4d4dc: 6704 beqs 4d4e2 <rtems_string_to_float+0x42>
*endptr = end;
4d4de: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4d4e2: b4ae fffc cmpl %fp@(-4),%d2
4d4e6: 6744 beqs 4d52c <rtems_string_to_float+0x8c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d4e8: 2f3c 7f7f ffff movel #2139095039,%sp@- 4d4ee: 2f03 movel %d3,%sp@- 4d4f0: 4eb9 0005 cfac jsr 5cfac <__gtsf2> 4d4f6: 508f addql #8,%sp 4d4f8: 4a80 tstl %d0
4d4fa: 6e0e bgts 4d50a <rtems_string_to_float+0x6a> <== NEVER TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d4fc: 2483 movel %d3,%a2@ 4d4fe: 4280 clrl %d0
#endif return RTEMS_SUCCESSFUL; }
4d500: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d506: 4e5e unlk %fp 4d508: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d50a: 4e94 jsr %a4@ <== NOT EXECUTED 4d50c: 7222 moveq #34,%d1 <== NOT EXECUTED 4d50e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d510: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d512: 66e8 bnes 4d4fc <rtems_string_to_float+0x5c> <== NOT EXECUTED 4d514: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d516: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d51c: 4e5e unlk %fp <== NOT EXECUTED 4d51e: 4e75 rts <== NOT EXECUTED
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d520: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d522: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d528: 4e5e unlk %fp 4d52a: 4e75 rts
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d52c: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d52e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4d534: 4e5e unlk %fp <== NOT EXECUTED
0004d538 <rtems_string_to_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d538: 4e56 ffe8 linkw %fp,#-24 4d53c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d540: 242e 0008 movel %fp@(8),%d2 4d544: 246e 000c moveal %fp@(12),%a2 4d548: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d54c: 4a8a tstl %a2
4d54e: 675e beqs 4d5ae <rtems_string_to_int+0x76>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d550: 49f9 0004 f620 lea 4f620 <__errno>,%a4 4d556: 4e94 jsr %a4@ 4d558: 2040 moveal %d0,%a0 4d55a: 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 );
4d55c: 2f2e 0014 movel %fp@(20),%sp@- 4d560: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d564: 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 );
4d566: 2f02 movel %d2,%sp@- 4d568: 4eb9 0005 2256 jsr 52256 <strtol>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d56e: 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 );
4d572: 2600 movel %d0,%d3
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d574: 4a8b tstl %a3
4d576: 6704 beqs 4d57c <rtems_string_to_int+0x44>
*endptr = end;
4d578: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4d57c: b4ae fffc cmpl %fp@(-4),%d2
4d580: 6738 beqs 4d5ba <rtems_string_to_int+0x82>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d582: 0c83 7fff ffff cmpil #2147483647,%d3
4d588: 670e beqs 4d598 <rtems_string_to_int+0x60>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d58a: 2483 movel %d3,%a2@ 4d58c: 4280 clrl %d0
#endif return RTEMS_SUCCESSFUL; }
4d58e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d594: 4e5e unlk %fp 4d596: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d598: 4e94 jsr %a4@ 4d59a: 7222 moveq #34,%d1 4d59c: 2040 moveal %d0,%a0 4d59e: b290 cmpl %a0@,%d1
4d5a0: 66e8 bnes 4d58a <rtems_string_to_int+0x52> <== NEVER TAKEN
4d5a2: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d5a4: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d5aa: 4e5e unlk %fp 4d5ac: 4e75 rts
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d5ae: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d5b0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d5b6: 4e5e unlk %fp 4d5b8: 4e75 rts
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d5ba: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d5bc: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d5c2: 4e5e unlk %fp
...
0004d67c <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d67c: 4e56 ffe8 linkw %fp,#-24 4d680: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d684: 262e 0008 movel %fp@(8),%d3 4d688: 246e 000c moveal %fp@(12),%a2 4d68c: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d690: 4a8a tstl %a2
4d692: 6766 beqs 4d6fa <rtems_string_to_long+0x7e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d694: 49f9 0004 f620 lea 4f620 <__errno>,%a4 4d69a: 4e94 jsr %a4@ 4d69c: 2040 moveal %d0,%a0 4d69e: 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 );
4d6a0: 2f2e 0014 movel %fp@(20),%sp@- 4d6a4: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d6a8: 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 );
4d6aa: 2f03 movel %d3,%sp@- 4d6ac: 4eb9 0005 2256 jsr 52256 <strtol>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d6b2: 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 );
4d6b6: 2400 movel %d0,%d2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d6b8: 4a8b tstl %a3
4d6ba: 6704 beqs 4d6c0 <rtems_string_to_long+0x44>
*endptr = end;
4d6bc: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4d6c0: b6ae fffc cmpl %fp@(-4),%d3
4d6c4: 6740 beqs 4d706 <rtems_string_to_long+0x8a>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d6c6: 0c82 7fff ffff cmpil #2147483647,%d2
4d6cc: 6716 beqs 4d6e4 <rtems_string_to_long+0x68>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d6ce: 0c82 8000 0000 cmpil #-2147483648,%d2
4d6d4: 670e beqs 4d6e4 <rtems_string_to_long+0x68>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d6d6: 2482 movel %d2,%a2@ 4d6d8: 4280 clrl %d0
#endif return RTEMS_SUCCESSFUL; }
4d6da: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6e0: 4e5e unlk %fp 4d6e2: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d6e4: 4e94 jsr %a4@ 4d6e6: 7222 moveq #34,%d1 4d6e8: 2040 moveal %d0,%a0 4d6ea: b290 cmpl %a0@,%d1
4d6ec: 66e8 bnes 4d6d6 <rtems_string_to_long+0x5a> <== NEVER TAKEN
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
4d6ee: 700a moveq #10,%d0
}
4d6f0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6f6: 4e5e unlk %fp 4d6f8: 4e75 rts
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d6fa: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d6fc: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d702: 4e5e unlk %fp 4d704: 4e75 rts
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d706: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d708: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d70e: 4e5e unlk %fp
...
0004d5c8 <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d5c8: 4e56 ffe4 linkw %fp,#-28 4d5cc: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d5d0: 242e 0008 movel %fp@(8),%d2 4d5d4: 246e 000c moveal %fp@(12),%a2 4d5d8: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d5dc: 4a8a tstl %a2 4d5de: 6700 0082 beqw 4d662 <rtems_string_to_long_long+0x9a>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d5e2: 49f9 0004 f620 lea 4f620 <__errno>,%a4 4d5e8: 4e94 jsr %a4@ 4d5ea: 2040 moveal %d0,%a0
*n = 0;
4d5ec: 4280 clrl %d0 4d5ee: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d5f0: 4290 clrl %a0@
*n = 0;
4d5f2: 2480 movel %d0,%a2@ 4d5f4: 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 );
4d5f8: 2f2e 0014 movel %fp@(20),%sp@- 4d5fc: 486e fffc pea %fp@(-4) 4d600: 2f02 movel %d2,%sp@- 4d602: 4eb9 0005 2278 jsr 52278 <strtoll>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d608: 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 );
4d60c: 2600 movel %d0,%d3 4d60e: 2801 movel %d1,%d4
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d610: 4a8b tstl %a3
4d612: 6704 beqs 4d618 <rtems_string_to_long_long+0x50>
*endptr = end;
4d614: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4d618: b4ae fffc cmpl %fp@(-4),%d2
4d61c: 6750 beqs 4d66e <rtems_string_to_long_long+0xa6>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d61e: 203c 7fff ffff movel #2147483647,%d0 4d624: 72ff moveq #-1,%d1 4d626: 9284 subl %d4,%d1 4d628: 9183 subxl %d3,%d0
4d62a: 6720 beqs 4d64c <rtems_string_to_long_long+0x84>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d62c: 203c 8000 0000 movel #-2147483648,%d0 4d632: 4281 clrl %d1 4d634: 9284 subl %d4,%d1 4d636: 9183 subxl %d3,%d0
4d638: 6712 beqs 4d64c <rtems_string_to_long_long+0x84>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d63a: 4280 clrl %d0 4d63c: 2483 movel %d3,%a2@ 4d63e: 2544 0004 movel %d4,%a2@(4)
#endif return RTEMS_SUCCESSFUL; }
4d642: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d648: 4e5e unlk %fp 4d64a: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d64c: 4e94 jsr %a4@ 4d64e: 7222 moveq #34,%d1 4d650: 2040 moveal %d0,%a0 4d652: b290 cmpl %a0@,%d1
4d654: 66e4 bnes 4d63a <rtems_string_to_long_long+0x72> <== NEVER TAKEN
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
4d656: 700a moveq #10,%d0
}
4d658: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d65e: 4e5e unlk %fp 4d660: 4e75 rts
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d662: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d664: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d66a: 4e5e unlk %fp 4d66c: 4e75 rts
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d66e: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d670: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d676: 4e5e unlk %fp
...
0004d714 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d714: 4e56 ffe8 linkw %fp,#-24 4d718: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d71c: 242e 0008 movel %fp@(8),%d2 4d720: 246e 000c moveal %fp@(12),%a2 4d724: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d728: 4a8a tstl %a2
4d72a: 675c beqs 4d788 <rtems_string_to_pointer+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d72c: 49f9 0004 f620 lea 4f620 <__errno>,%a4 4d732: 4e94 jsr %a4@ 4d734: 2040 moveal %d0,%a0 4d736: 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 );
4d738: 4878 0010 pea 10 <INVALID_OPERATION> 4d73c: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d740: 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 );
4d742: 2f02 movel %d2,%sp@- 4d744: 4eb9 0005 2688 jsr 52688 <strtoul>
#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 )
4d74a: 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 );
4d74e: 2600 movel %d0,%d3
#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 )
4d750: 4a8b tstl %a3
4d752: 6704 beqs 4d758 <rtems_string_to_pointer+0x44>
*endptr = end;
4d754: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4d758: b4ae fffc cmpl %fp@(-4),%d2
4d75c: 6736 beqs 4d794 <rtems_string_to_pointer+0x80>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d75e: 70ff moveq #-1,%d0 4d760: b083 cmpl %d3,%d0
4d762: 670e beqs 4d772 <rtems_string_to_pointer+0x5e> <== NEVER TAKEN
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
4d764: 2483 movel %d3,%a2@ 4d766: 4280 clrl %d0
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d768: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d76e: 4e5e unlk %fp 4d770: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d772: 4e94 jsr %a4@ <== NOT EXECUTED 4d774: 7222 moveq #34,%d1 <== NOT EXECUTED 4d776: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d778: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d77a: 66e8 bnes 4d764 <rtems_string_to_pointer+0x50> <== NOT EXECUTED 4d77c: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d77e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d784: 4e5e unlk %fp <== NOT EXECUTED 4d786: 4e75 rts <== NOT EXECUTED
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d788: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d78a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d790: 4e5e unlk %fp 4d792: 4e75 rts
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d794: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d796: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4d79c: 4e5e unlk %fp <== NOT EXECUTED
0004d7a0 <rtems_string_to_unsigned_char>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d7a0: 4e56 fff0 linkw %fp,#-16 4d7a4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4d7a8: 242e 0008 movel %fp@(8),%d2 4d7ac: 246e 000c moveal %fp@(12),%a2 4d7b0: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d7b4: 4a8a tstl %a2
4d7b6: 673e beqs 4d7f6 <rtems_string_to_unsigned_char+0x56>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d7b8: 4eb9 0004 f620 jsr 4f620 <__errno> 4d7be: 2040 moveal %d0,%a0 4d7c0: 4290 clrl %a0@
*n = 0;
4d7c2: 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 );
4d7c4: 2f2e 0014 movel %fp@(20),%sp@- 4d7c8: 486e fffc pea %fp@(-4) 4d7cc: 2f02 movel %d2,%sp@- 4d7ce: 4eb9 0005 2688 jsr 52688 <strtoul>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d7d4: 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 );
4d7d8: 2200 movel %d0,%d1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d7da: 4a8b tstl %a3
4d7dc: 6704 beqs 4d7e2 <rtems_string_to_unsigned_char+0x42>
*endptr = end;
4d7de: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4d7e2: b4ae fffc cmpl %fp@(-4),%d2
4d7e6: 671a beqs 4d802 <rtems_string_to_unsigned_char+0x62><== NEVER TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d7e8: 4280 clrl %d0 4d7ea: 1481 moveb %d1,%a2@
#endif return RTEMS_SUCCESSFUL; }
4d7ec: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4d7f2: 4e5e unlk %fp 4d7f4: 4e75 rts
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d7f6: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d7f8: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4d7fe: 4e5e unlk %fp 4d800: 4e75 rts
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d802: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d804: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4d80a: 4e5e unlk %fp
...
0004d810 <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d810: 4e56 ffe8 linkw %fp,#-24 4d814: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d818: 242e 0008 movel %fp@(8),%d2 4d81c: 246e 000c moveal %fp@(12),%a2 4d820: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d824: 4a8a tstl %a2
4d826: 675c beqs 4d884 <rtems_string_to_unsigned_int+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d828: 49f9 0004 f620 lea 4f620 <__errno>,%a4 4d82e: 4e94 jsr %a4@ 4d830: 2040 moveal %d0,%a0 4d832: 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 );
4d834: 2f2e 0014 movel %fp@(20),%sp@- 4d838: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d83c: 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 );
4d83e: 2f02 movel %d2,%sp@- 4d840: 4eb9 0005 2688 jsr 52688 <strtoul>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d846: 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 );
4d84a: 2600 movel %d0,%d3
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d84c: 4a8b tstl %a3
4d84e: 6704 beqs 4d854 <rtems_string_to_unsigned_int+0x44>
*endptr = end;
4d850: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4d854: b4ae fffc cmpl %fp@(-4),%d2
4d858: 6736 beqs 4d890 <rtems_string_to_unsigned_int+0x80>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d85a: 70ff moveq #-1,%d0 4d85c: b083 cmpl %d3,%d0
4d85e: 670e beqs 4d86e <rtems_string_to_unsigned_int+0x5e>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d860: 2483 movel %d3,%a2@ 4d862: 4280 clrl %d0
#endif return RTEMS_SUCCESSFUL; }
4d864: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d86a: 4e5e unlk %fp 4d86c: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d86e: 4e94 jsr %a4@ 4d870: 7222 moveq #34,%d1 4d872: 2040 moveal %d0,%a0 4d874: b290 cmpl %a0@,%d1
4d876: 66e8 bnes 4d860 <rtems_string_to_unsigned_int+0x50><== NEVER TAKEN
4d878: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d87a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d880: 4e5e unlk %fp 4d882: 4e75 rts
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d884: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d886: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d88c: 4e5e unlk %fp 4d88e: 4e75 rts
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d890: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d892: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4d898: 4e5e unlk %fp <== NOT EXECUTED
0004d93c <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d93c: 4e56 ffe8 linkw %fp,#-24 4d940: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d944: 242e 0008 movel %fp@(8),%d2 4d948: 246e 000c moveal %fp@(12),%a2 4d94c: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d950: 4a8a tstl %a2
4d952: 675c beqs 4d9b0 <rtems_string_to_unsigned_long+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d954: 49f9 0004 f620 lea 4f620 <__errno>,%a4 4d95a: 4e94 jsr %a4@ 4d95c: 2040 moveal %d0,%a0 4d95e: 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 );
4d960: 2f2e 0014 movel %fp@(20),%sp@- 4d964: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d968: 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 );
4d96a: 2f02 movel %d2,%sp@- 4d96c: 4eb9 0005 2688 jsr 52688 <strtoul>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d972: 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 );
4d976: 2600 movel %d0,%d3
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d978: 4a8b tstl %a3
4d97a: 6704 beqs 4d980 <rtems_string_to_unsigned_long+0x44>
*endptr = end;
4d97c: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4d980: b4ae fffc cmpl %fp@(-4),%d2
4d984: 6736 beqs 4d9bc <rtems_string_to_unsigned_long+0x80>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d986: 70ff moveq #-1,%d0 4d988: b083 cmpl %d3,%d0
4d98a: 670e beqs 4d99a <rtems_string_to_unsigned_long+0x5e>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d98c: 2483 movel %d3,%a2@ 4d98e: 4280 clrl %d0
#endif return RTEMS_SUCCESSFUL; }
4d990: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d996: 4e5e unlk %fp 4d998: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d99a: 4e94 jsr %a4@ 4d99c: 7222 moveq #34,%d1 4d99e: 2040 moveal %d0,%a0 4d9a0: b290 cmpl %a0@,%d1
4d9a2: 66e8 bnes 4d98c <rtems_string_to_unsigned_long+0x50><== NEVER TAKEN
4d9a4: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d9a6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9ac: 4e5e unlk %fp 4d9ae: 4e75 rts
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d9b0: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d9b2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9b8: 4e5e unlk %fp 4d9ba: 4e75 rts
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d9bc: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d9be: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4d9c4: 4e5e unlk %fp <== NOT EXECUTED
0004d89c <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d89c: 4e56 ffe4 linkw %fp,#-28 4d8a0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d8a4: 242e 0008 movel %fp@(8),%d2 4d8a8: 246e 000c moveal %fp@(12),%a2 4d8ac: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d8b0: 4a8a tstl %a2
4d8b2: 676e beqs 4d922 <rtems_string_to_unsigned_long_long+0x86>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d8b4: 49f9 0004 f620 lea 4f620 <__errno>,%a4 4d8ba: 4e94 jsr %a4@ 4d8bc: 2040 moveal %d0,%a0
*n = 0;
4d8be: 4280 clrl %d0 4d8c0: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d8c2: 4290 clrl %a0@
*n = 0;
4d8c4: 2480 movel %d0,%a2@ 4d8c6: 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 );
4d8ca: 2f2e 0014 movel %fp@(20),%sp@- 4d8ce: 486e fffc pea %fp@(-4) 4d8d2: 2f02 movel %d2,%sp@- 4d8d4: 4eb9 0005 26a8 jsr 526a8 <strtoull>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d8da: 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 );
4d8de: 2600 movel %d0,%d3 4d8e0: 2801 movel %d1,%d4
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d8e2: 4a8b tstl %a3
4d8e4: 6704 beqs 4d8ea <rtems_string_to_unsigned_long_long+0x4e>
*endptr = end;
4d8e6: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4d8ea: b4ae fffc cmpl %fp@(-4),%d2
4d8ee: 673e beqs 4d92e <rtems_string_to_unsigned_long_long+0x92>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d8f0: 70ff moveq #-1,%d0 4d8f2: 72ff moveq #-1,%d1 4d8f4: 9284 subl %d4,%d1 4d8f6: 9183 subxl %d3,%d0
4d8f8: 6712 beqs 4d90c <rtems_string_to_unsigned_long_long+0x70>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d8fa: 4280 clrl %d0 4d8fc: 2483 movel %d3,%a2@ 4d8fe: 2544 0004 movel %d4,%a2@(4)
#endif return RTEMS_SUCCESSFUL; }
4d902: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d908: 4e5e unlk %fp 4d90a: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d90c: 4e94 jsr %a4@ 4d90e: 7222 moveq #34,%d1 4d910: 2040 moveal %d0,%a0 4d912: b290 cmpl %a0@,%d1
4d914: 66e4 bnes 4d8fa <rtems_string_to_unsigned_long_long+0x5e><== NEVER TAKEN
4d916: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d918: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d91e: 4e5e unlk %fp 4d920: 4e75 rts
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d922: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d924: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d92a: 4e5e unlk %fp 4d92c: 4e75 rts
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
4d92e: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d930: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d936: 4e5e unlk %fp
...
0004606c <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
4606c: 4e56 fffc linkw %fp,#-4 46070: 2f0b movel %a3,%sp@- 46072: 2f0a movel %a2,%sp@-
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
46074: 2f39 0005 da7a movel 5da7a <_RTEMS_Allocator_Mutex>,%sp@- 4607a: 4eb9 0004 66a8 jsr 466a8 <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
46080: 486e fffc pea %fp@(-4) 46084: 2f2e 0008 movel %fp@(8),%sp@- 46088: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get>
switch ( location ) {
4608e: 4fef 000c lea %sp@(12),%sp
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
the_thread = _Thread_Get( id, &location );
46092: 2440 moveal %d0,%a2
switch ( location ) {
46094: 4aae fffc tstl %fp@(-4)
46098: 664a bnes 460e4 <rtems_task_delete+0x78> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
4609a: 2f2a 0008 movel %a2@(8),%sp@- 4609e: 47f9 0004 73f0 lea 473f0 <_Objects_Get_information_id>,%a3 460a4: 4e93 jsr %a3@
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
460a6: 2f0a movel %a2,%sp@- 460a8: 2f00 movel %d0,%sp@- 460aa: 4eb9 0004 7a1c jsr 47a1c <_Thread_Close> 460b0: 2f2a 0008 movel %a2@(8),%sp@- 460b4: 4e93 jsr %a3@ 460b6: 2f0a movel %a2,%sp@- 460b8: 2f00 movel %d0,%sp@- 460ba: 4eb9 0004 736c jsr 4736c <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
460c0: 2f39 0005 da7a movel 5da7a <_RTEMS_Allocator_Mutex>,%sp@- 460c6: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
460cc: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
460d2: 246e fff4 moveal %fp@(-12),%a2
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
460d6: 4fef 001c lea %sp@(28),%sp
_Thread_Close( the_information, the_thread );
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
_Thread_Enable_dispatch();
460da: 4280 clrl %d0
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
460dc: 266e fff8 moveal %fp@(-8),%a3 460e0: 4e5e unlk %fp 460e2: 4e75 rts
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
460e4: 2f39 0005 da7a movel 5da7a <_RTEMS_Allocator_Mutex>,%sp@- 460ea: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock>
return RTEMS_INVALID_ID; }
460f0: 246e fff4 moveal %fp@(-12),%a2
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
460f4: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
460f6: 7004 moveq #4,%d0
return RTEMS_INVALID_ID; }
460f8: 266e fff8 moveal %fp@(-8),%a3
460fc: 4e5e unlk %fp <== NOT EXECUTED
0004cd88 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4cd88: 4e56 ffe4 linkw %fp,#-28 4cd8c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4cd90: 2a2e 0008 movel %fp@(8),%d5 4cd94: 242e 000c movel %fp@(12),%d2 4cd98: 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 )
4cd9c: 4a8c tstl %a4 4cd9e: 6700 0154 beqw 4cef4 <rtems_task_mode+0x16c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4cda2: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4cda8: 4a2a 0075 tstb %a2@(117) 4cdac: 57c0 seq %d0 4cdae: 263c 0000 0100 movel #256,%d3 4cdb4: 49c0 extbl %d0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4cdb6: 266a 0108 moveal %a2@(264),%a3
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4cdba: c680 andl %d0,%d3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4cdbc: 4aaa 007a tstl %a2@(122) 4cdc0: 6600 00d4 bnew 4ce96 <rtems_task_mode+0x10e>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4cdc4: 4a2b 0008 tstb %a3@(8) 4cdc8: 57c0 seq %d0 4cdca: 283c 0000 0400 movel #1024,%d4 4cdd0: 49c0 extbl %d0 4cdd2: c880 andl %d0,%d4
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();
4cdd4: 4eb9 0004 921c jsr 4921c <_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;
4cdda: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
4cddc: 8083 orl %d3,%d0 4cdde: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4cde0: 0802 0008 btst #8,%d2
4cde4: 670e beqs 4cdf4 <rtems_task_mode+0x6c>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4cde6: 2005 movel %d5,%d0 4cde8: 7201 moveq #1,%d1 4cdea: e088 lsrl #8,%d0 4cdec: b380 eorl %d1,%d0 4cdee: c081 andl %d1,%d0 4cdf0: 1540 0075 moveb %d0,%a2@(117)
if ( mask & RTEMS_TIMESLICE_MASK ) {
4cdf4: 0802 0009 btst #9,%d2
4cdf8: 6718 beqs 4ce12 <rtems_task_mode+0x8a>
if ( _Modes_Is_timeslice(mode_set) ) {
4cdfa: 0805 0009 btst #9,%d5 4cdfe: 6700 00c2 beqw 4cec2 <rtems_task_mode+0x13a>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4ce02: 7001 moveq #1,%d0
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4ce04: 41f9 0005 d978 lea 5d978 <_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;
4ce0a: 2540 007a movel %d0,%a2@(122)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4ce0e: 2550 0076 movel %a0@,%a2@(118)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4ce12: 7007 moveq #7,%d0 4ce14: c082 andl %d2,%d0
4ce16: 6712 beqs 4ce2a <rtems_task_mode+0xa2>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4ce18: 40c0 movew %sr,%d0 4ce1a: 7207 moveq #7,%d1 4ce1c: c285 andl %d5,%d1 4ce1e: 0280 0000 f8ff andil #63743,%d0 4ce24: e189 lsll #8,%d1 4ce26: 8081 orl %d1,%d0 4ce28: 46c0 movew %d0,%sr
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4ce2a: 0802 000a btst #10,%d2
4ce2e: 6758 beqs 4ce88 <rtems_task_mode+0x100>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4ce30: 700a moveq #10,%d0 4ce32: e0ad lsrl %d0,%d5 4ce34: 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;
4ce36: 4280 clrl %d0 4ce38: 102b 0008 moveb %a3@(8),%d0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4ce3c: b385 eorl %d1,%d5 4ce3e: ca81 andl %d1,%d5
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4ce40: ba80 cmpl %d0,%d5
4ce42: 6744 beqs 4ce88 <rtems_task_mode+0x100>
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4ce44: 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;
4ce4a: 1745 0008 moveb %d5,%a3@(8) 4ce4e: 40c1 movew %sr,%d1 4ce50: 8081 orl %d1,%d0 4ce52: 46c0 movew %d0,%sr
_signals = information->signals_pending;
4ce54: 202b 0016 movel %a3@(22),%d0
information->signals_pending = information->signals_posted;
4ce58: 276b 0012 0016 movel %a3@(18),%a3@(22)
information->signals_posted = _signals;
4ce5e: 2740 0012 movel %d0,%a3@(18)
_ISR_Enable( _level );
4ce62: 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;
4ce64: 4aab 0012 tstl %a3@(18)
4ce68: 671e beqs 4ce88 <rtems_task_mode+0x100>
executing->do_post_task_switch_extension = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4ce6a: 7203 moveq #3,%d1
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;
4ce6c: 7001 moveq #1,%d0 4ce6e: 7401 moveq #1,%d2 4ce70: 1540 0074 moveb %d0,%a2@(116)
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4ce74: b2b9 0005 db4a cmpl 5db4a <_System_state_Current>,%d1
4ce7a: 6758 beqs 4ced4 <rtems_task_mode+0x14c> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
4ce7c: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4ce7e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ce84: 4e5e unlk %fp 4ce86: 4e75 rts
executing->do_post_task_switch_extension = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4ce88: 7203 moveq #3,%d1
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;
4ce8a: 4202 clrb %d2
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4ce8c: b2b9 0005 db4a cmpl 5db4a <_System_state_Current>,%d1
4ce92: 66e8 bnes 4ce7c <rtems_task_mode+0xf4> <== NEVER TAKEN
4ce94: 603e bras 4ced4 <rtems_task_mode+0x14c>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4ce96: 4a2b 0008 tstb %a3@(8) 4ce9a: 57c0 seq %d0 4ce9c: 283c 0000 0400 movel #1024,%d4 4cea2: 49c0 extbl %d0 4cea4: c880 andl %d0,%d4
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();
4cea6: 4eb9 0004 921c jsr 4921c <_CPU_ISR_Get_level>
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
4ceac: 08c3 0009 bset #9,%d3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4ceb0: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
4ceb2: 8083 orl %d3,%d0 4ceb4: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4ceb6: 0802 0008 btst #8,%d2 4ceba: 6700 ff38 beqw 4cdf4 <rtems_task_mode+0x6c> 4cebe: 6000 ff26 braw 4cde6 <rtems_task_mode+0x5e>
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4cec2: 7007 moveq #7,%d0 4cec4: c082 andl %d2,%d0
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4cec6: 42aa 007a clrl %a2@(122)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4ceca: 4a80 tstl %d0 4cecc: 6700 ff5c beqw 4ce2a <rtems_task_mode+0xa2> 4ced0: 6000 ff46 braw 4ce18 <rtems_task_mode+0x90>
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
4ced4: 4eb9 0004 d1d8 jsr 4d1d8 <_Thread_Evaluate_mode> 4ceda: 4a00 tstb %d0
4cedc: 6604 bnes 4cee2 <rtems_task_mode+0x15a>
4cede: 4a02 tstb %d2
4cee0: 679a beqs 4ce7c <rtems_task_mode+0xf4>
_Thread_Dispatch();
4cee2: 4eb9 0004 7be4 jsr 47be4 <_Thread_Dispatch> 4cee8: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4ceea: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4cef0: 4e5e unlk %fp 4cef2: 4e75 rts
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
4cef4: 7009 moveq #9,%d0
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
4cef6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4cefc: 4e5e unlk %fp <== NOT EXECUTED
00048734 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
48734: 4e56 fffc linkw %fp,#-4 48738: 202e 0008 movel %fp@(8),%d0 4873c: 2f02 movel %d2,%sp@- 4873e: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
48742: 4a39 0005 f734 tstb 5f734 <Configuration_RTEMS_API+0x4>
48748: 676e beqs 487b8 <rtems_task_set_note+0x84> <== NEVER TAKEN
/*
* 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 )
4874a: 720f moveq #15,%d1 4874c: b282 cmpl %d2,%d1
4874e: 6542 bcss 48792 <rtems_task_set_note+0x5e>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
48750: 4a80 tstl %d0
48752: 6748 beqs 4879c <rtems_task_set_note+0x68>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
48754: 2079 0006 11c2 moveal 611c2 <_Thread_Executing>,%a0
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
4875a: b0a8 0008 cmpl %a0@(8),%d0
4875e: 6742 beqs 487a2 <rtems_task_set_note+0x6e>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
48760: 486e fffc pea %fp@(-4) 48764: 2f00 movel %d0,%sp@- 48766: 4eb9 0004 a550 jsr 4a550 <_Thread_Get>
switch ( location ) {
4876c: 508f addql #8,%sp 4876e: 4aae fffc tstl %fp@(-4)
48772: 664e bnes 487c2 <rtems_task_set_note+0x8e>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
48774: 2240 moveal %d0,%a1 48776: 202e 0010 movel %fp@(16),%d0 4877a: 2069 0108 moveal %a1@(264),%a0 4877e: 2180 2c1e movel %d0,%a0@(0000001e,%d2:l:4)
_Thread_Enable_dispatch();
48782: 4eb9 0004 a528 jsr 4a528 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
48788: 242e fff8 movel %fp@(-8),%d2
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
_Thread_Enable_dispatch();
4878c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4878e: 4e5e unlk %fp 48790: 4e75 rts 48792: 242e fff8 movel %fp@(-8),%d2
/*
* 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 )
48796: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
48798: 4e5e unlk %fp 4879a: 4e75 rts
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
4879c: 2079 0006 11c2 moveal 611c2 <_Thread_Executing>,%a0
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
487a2: 226e 0010 moveal %fp@(16),%a1 487a6: 4280 clrl %d0 487a8: 2068 0108 moveal %a0@(264),%a0 487ac: 2189 2c1e movel %a1,%a0@(0000001e,%d2:l:4)
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
487b0: 242e fff8 movel %fp@(-8),%d2 487b4: 4e5e unlk %fp 487b6: 4e75 rts 487b8: 242e fff8 movel %fp@(-8),%d2
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
487bc: 7016 moveq #22,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
487be: 4e5e unlk %fp 487c0: 4e75 rts 487c2: 242e fff8 movel %fp@(-8),%d2
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
487c6: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
487c8: 4e5e unlk %fp <== NOT EXECUTED
0004af04 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4af04: 4e56 fffc linkw %fp,#-4 4af08: 2f0a movel %a2,%sp@- 4af0a: 246e 0010 moveal %fp@(16),%a2 4af0e: 2f02 movel %d2,%sp@- 4af10: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4af14: 670c beqs 4af22 <rtems_task_set_priority+0x1e>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
4af16: 4280 clrl %d0 4af18: 1039 0006 2632 moveb 62632 <rtems_maximum_priority>,%d0 4af1e: b082 cmpl %d2,%d0
4af20: 6566 bcss 4af88 <rtems_task_set_priority+0x84>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4af22: 4a8a tstl %a2
4af24: 6770 beqs 4af96 <rtems_task_set_priority+0x92>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4af26: 486e fffc pea %fp@(-4) 4af2a: 2f2e 0008 movel %fp@(8),%sp@- 4af2e: 4eb9 0004 ce78 jsr 4ce78 <_Thread_Get>
switch ( location ) {
4af34: 508f addql #8,%sp 4af36: 4aae fffc tstl %fp@(-4)
4af3a: 663e bnes 4af7a <rtems_task_set_priority+0x76>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4af3c: 2040 moveal %d0,%a0 4af3e: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4af42: 4a82 tstl %d2
4af44: 6720 beqs 4af66 <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
4af46: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
4af4a: 4aa8 001c tstl %a0@(28)
4af4e: 6706 beqs 4af56 <rtems_task_set_priority+0x52>
the_thread->current_priority > new_priority )
4af50: b4a8 0014 cmpl %a0@(20),%d2
4af54: 6410 bccs 4af66 <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
4af56: 42a7 clrl %sp@- 4af58: 2f02 movel %d2,%sp@- 4af5a: 2f00 movel %d0,%sp@- 4af5c: 4eb9 0004 c900 jsr 4c900 <_Thread_Change_priority> 4af62: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4af66: 4eb9 0004 ce20 jsr 4ce20 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4af6c: 242e fff4 movel %fp@(-12),%d2
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
}
_Thread_Enable_dispatch();
4af70: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4af72: 246e fff8 moveal %fp@(-8),%a2 4af76: 4e5e unlk %fp 4af78: 4e75 rts 4af7a: 242e fff4 movel %fp@(-12),%d2
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
4af7e: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4af80: 246e fff8 moveal %fp@(-8),%a2 4af84: 4e5e unlk %fp 4af86: 4e75 rts 4af88: 242e fff4 movel %fp@(-12),%d2 4af8c: 7013 moveq #19,%d0 4af8e: 246e fff8 moveal %fp@(-8),%a2 4af92: 4e5e unlk %fp 4af94: 4e75 rts 4af96: 242e fff4 movel %fp@(-12),%d2
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4af9a: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4af9c: 246e fff8 moveal %fp@(-8),%a2
4afa0: 4e5e unlk %fp <== NOT EXECUTED
000477f8 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
477f8: 4e56 fffc linkw %fp,#-4 477fc: 2f02 movel %d2,%sp@- 477fe: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
47802: 6762 beqs 47866 <rtems_task_variable_delete+0x6e>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
47804: 486e fffc pea %fp@(-4) 47808: 2f2e 0008 movel %fp@(8),%sp@- 4780c: 4eb9 0004 95a4 jsr 495a4 <_Thread_Get>
switch (location) {
47812: 508f addql #8,%sp 47814: 4aae fffc tstl %fp@(-4)
47818: 663c bnes 47856 <rtems_task_variable_delete+0x5e>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
4781a: 2240 moveal %d0,%a1 4781c: 2069 0118 moveal %a1@(280),%a0
while (tvp) {
47820: 4a88 tstl %a0
47822: 673c beqs 47860 <rtems_task_variable_delete+0x68>
if (tvp->ptr == ptr) {
47824: b4a8 0004 cmpl %a0@(4),%d2
47828: 6746 beqs 47870 <rtems_task_variable_delete+0x78>
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
4782a: 2248 moveal %a0,%a1
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
4782c: 2050 moveal %a0@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
4782e: 4a88 tstl %a0
47830: 672e beqs 47860 <rtems_task_variable_delete+0x68><== NEVER TAKEN
if (tvp->ptr == ptr) {
47832: b4a8 0004 cmpl %a0@(4),%d2
47836: 66f2 bnes 4782a <rtems_task_variable_delete+0x32>
if (prev)
prev->next = tvp->next;
47838: 2290 movel %a0@,%a1@
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
4783a: 2f08 movel %a0,%sp@- 4783c: 2f00 movel %d0,%sp@- 4783e: 4eb9 0004 7918 jsr 47918 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47844: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4784a: 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();
4784c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4784e: 242e fff8 movel %fp@(-8),%d2 47852: 4e5e unlk %fp 47854: 4e75 rts 47856: 242e fff8 movel %fp@(-8),%d2
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
4785a: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4785c: 4e5e unlk %fp 4785e: 4e75 rts
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47860: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47866: 242e fff8 movel %fp@(-8),%d2
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
4786a: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4786c: 4e5e unlk %fp 4786e: 4e75 rts
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
47870: 2240 moveal %d0,%a1 47872: 2350 0118 movel %a0@,%a1@(280)
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47876: 2f08 movel %a0,%sp@- 47878: 2f00 movel %d0,%sp@- 4787a: 4eb9 0004 7918 jsr 47918 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47880: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47886: 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();
47888: 4280 clrl %d0 4788a: 60c2 bras 4784e <rtems_task_variable_delete+0x56>
0004788c <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
4788c: 4e56 fffc linkw %fp,#-4 47890: 2f0a movel %a2,%sp@- 47892: 246e 0010 moveal %fp@(16),%a2 47896: 2f02 movel %d2,%sp@- 47898: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
4789c: 6752 beqs 478f0 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
if ( !result )
4789e: 4a8a tstl %a2
478a0: 674e beqs 478f0 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
478a2: 486e fffc pea %fp@(-4) 478a6: 2f2e 0008 movel %fp@(8),%sp@- 478aa: 4eb9 0004 95a4 jsr 495a4 <_Thread_Get>
switch (location) {
478b0: 508f addql #8,%sp 478b2: 4aae fffc tstl %fp@(-4)
478b6: 662a bnes 478e2 <rtems_task_variable_get+0x56>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
478b8: 2240 moveal %d0,%a1 478ba: 2069 0118 moveal %a1@(280),%a0
while (tvp) {
478be: 4a88 tstl %a0
478c0: 670c beqs 478ce <rtems_task_variable_get+0x42>
if (tvp->ptr == ptr) {
478c2: b4a8 0004 cmpl %a0@(4),%d2
478c6: 6736 beqs 478fe <rtems_task_variable_get+0x72>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
478c8: 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) {
478ca: 4a88 tstl %a0
478cc: 66f4 bnes 478c2 <rtems_task_variable_get+0x36> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
478ce: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478d4: 242e fff4 movel %fp@(-12),%d2
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
478d8: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478da: 246e fff8 moveal %fp@(-8),%a2 478de: 4e5e unlk %fp 478e0: 4e75 rts 478e2: 242e fff4 movel %fp@(-12),%d2
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
478e6: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478e8: 246e fff8 moveal %fp@(-8),%a2 478ec: 4e5e unlk %fp 478ee: 4e75 rts 478f0: 242e fff4 movel %fp@(-12),%d2
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
478f4: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478f6: 246e fff8 moveal %fp@(-8),%a2 478fa: 4e5e unlk %fp 478fc: 4e75 rts
if (tvp->ptr == ptr) {
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
478fe: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
47902: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47908: 242e fff4 movel %fp@(-12),%d2
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
4790c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4790e: 246e fff8 moveal %fp@(-8),%a2 47912: 4e5e unlk %fp
...
00044640 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
44640: 7209 moveq #9,%d1
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
44642: 4e56 0000 linkw %fp,#0 44646: 202e 0008 movel %fp@(8),%d0
int baud_index;
switch (termios_baud) {
4464a: b280 cmpl %d0,%d1 4464c: 6700 010a beqw 44758 <rtems_termios_baud_to_index+0x118>
44650: 6c32 bges 44684 <rtems_termios_baud_to_index+0x44><== ALWAYS TAKEN
44652: 720e moveq #14,%d1 <== NOT EXECUTED 44654: b280 cmpl %d0,%d1 <== NOT EXECUTED 44656: 6700 00d6 beqw 4472e <rtems_termios_baud_to_index+0xee><== NOT EXECUTED 4465a: 6c56 bges 446b2 <rtems_termios_baud_to_index+0x72><== NOT EXECUTED 4465c: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 44662: 6700 00e2 beqw 44746 <rtems_termios_baud_to_index+0x106><== NOT EXECUTED 44666: 6f00 0098 blew 44700 <rtems_termios_baud_to_index+0xc0><== NOT EXECUTED 4466a: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 44670: 6700 00b6 beqw 44728 <rtems_termios_baud_to_index+0xe8><== NOT EXECUTED 44674: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 4467a: 6700 009a beqw 44716 <rtems_termios_baud_to_index+0xd6><== NOT EXECUTED
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
4467e: 70ff moveq #-1,%d0
default: baud_index = -1; break;
}
return baud_index;
}
44680: 4e5e unlk %fp 44682: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
44684: 123c 0004 moveb #4,%d1 44688: b280 cmpl %d0,%d1 4468a: 6700 00d2 beqw 4475e <rtems_termios_baud_to_index+0x11e>
4468e: 6d46 blts 446d6 <rtems_termios_baud_to_index+0x96><== NEVER TAKEN
44690: 123c 0001 moveb #1,%d1 44694: b280 cmpl %d0,%d1 44696: 6700 00a2 beqw 4473a <rtems_termios_baud_to_index+0xfa> 4469a: 6c00 00c8 bgew 44764 <rtems_termios_baud_to_index+0x124>
4469e: 7202 moveq #2,%d1 <== NOT EXECUTED 446a0: b280 cmpl %d0,%d1 <== NOT EXECUTED 446a2: 677e beqs 44722 <rtems_termios_baud_to_index+0xe2><== NOT EXECUTED 446a4: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 446a8: b280 cmpl %d0,%d1 <== NOT EXECUTED 446aa: 66d2 bnes 4467e <rtems_termios_baud_to_index+0x3e><== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
446ac: 7003 moveq #3,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
446ae: 4e5e unlk %fp <== NOT EXECUTED 446b0: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
446b2: 123c 000b moveb #11,%d1 <== NOT EXECUTED 446b6: b280 cmpl %d0,%d1 <== NOT EXECUTED 446b8: 6700 0086 beqw 44740 <rtems_termios_baud_to_index+0x100><== NOT EXECUTED 446bc: 6e3c bgts 446fa <rtems_termios_baud_to_index+0xba><== NOT EXECUTED 446be: 123c 000c moveb #12,%d1 <== NOT EXECUTED 446c2: b280 cmpl %d0,%d1 <== NOT EXECUTED 446c4: 6700 008c beqw 44752 <rtems_termios_baud_to_index+0x112><== NOT EXECUTED 446c8: 123c 000d moveb #13,%d1 <== NOT EXECUTED 446cc: b280 cmpl %d0,%d1 <== NOT EXECUTED 446ce: 66ae bnes 4467e <rtems_termios_baud_to_index+0x3e><== NOT EXECUTED
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
446d0: 700d moveq #13,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
446d2: 4e5e unlk %fp <== NOT EXECUTED 446d4: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
446d6: 7206 moveq #6,%d1 <== NOT EXECUTED 446d8: b280 cmpl %d0,%d1 <== NOT EXECUTED 446da: 6758 beqs 44734 <rtems_termios_baud_to_index+0xf4><== NOT EXECUTED 446dc: 6e16 bgts 446f4 <rtems_termios_baud_to_index+0xb4><== NOT EXECUTED 446de: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 446e2: b280 cmpl %d0,%d1 <== NOT EXECUTED 446e4: 6766 beqs 4474c <rtems_termios_baud_to_index+0x10c><== NOT EXECUTED 446e6: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 446ea: b280 cmpl %d0,%d1 <== NOT EXECUTED 446ec: 6690 bnes 4467e <rtems_termios_baud_to_index+0x3e><== NOT EXECUTED
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
446ee: 7008 moveq #8,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
446f0: 4e5e unlk %fp <== NOT EXECUTED 446f2: 4e75 rts <== NOT EXECUTED
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
446f4: 7005 moveq #5,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
446f6: 4e5e unlk %fp <== NOT EXECUTED 446f8: 4e75 rts <== NOT EXECUTED
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
446fa: 700a moveq #10,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
446fc: 4e5e unlk %fp <== NOT EXECUTED 446fe: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
44700: 720f moveq #15,%d1 <== NOT EXECUTED 44702: b280 cmpl %d0,%d1 <== NOT EXECUTED 44704: 6716 beqs 4471c <rtems_termios_baud_to_index+0xdc><== NOT EXECUTED 44706: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 4470c: 6600 ff70 bnew 4467e <rtems_termios_baud_to_index+0x3e><== NOT EXECUTED
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
44710: 7010 moveq #16,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44712: 4e5e unlk %fp <== NOT EXECUTED 44714: 4e75 rts <== NOT EXECUTED
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
44716: 7013 moveq #19,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44718: 4e5e unlk %fp <== NOT EXECUTED 4471a: 4e75 rts <== NOT EXECUTED
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
4471c: 700f moveq #15,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4471e: 4e5e unlk %fp <== NOT EXECUTED 44720: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
44722: 7002 moveq #2,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44724: 4e5e unlk %fp <== NOT EXECUTED 44726: 4e75 rts <== NOT EXECUTED
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
44728: 7012 moveq #18,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4472a: 4e5e unlk %fp <== NOT EXECUTED 4472c: 4e75 rts <== NOT EXECUTED
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
4472e: 700e moveq #14,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44730: 4e5e unlk %fp <== NOT EXECUTED 44732: 4e75 rts <== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
44734: 7006 moveq #6,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44736: 4e5e unlk %fp <== NOT EXECUTED 44738: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4473a: 7001 moveq #1,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4473c: 4e5e unlk %fp <== NOT EXECUTED 4473e: 4e75 rts <== NOT EXECUTED
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
44740: 700b moveq #11,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44742: 4e5e unlk %fp <== NOT EXECUTED 44744: 4e75 rts <== NOT EXECUTED
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
44746: 7011 moveq #17,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44748: 4e5e unlk %fp <== NOT EXECUTED 4474a: 4e75 rts <== NOT EXECUTED
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
4474c: 7007 moveq #7,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4474e: 4e5e unlk %fp <== NOT EXECUTED 44750: 4e75 rts <== NOT EXECUTED
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
44752: 700c moveq #12,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44754: 4e5e unlk %fp <== NOT EXECUTED 44756: 4e75 rts <== NOT EXECUTED
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
44758: 7009 moveq #9,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4475a: 4e5e unlk %fp <== NOT EXECUTED 4475c: 4e75 rts <== NOT EXECUTED
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
4475e: 7004 moveq #4,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44760: 4e5e unlk %fp <== NOT EXECUTED 44762: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
44764: 4a80 tstl %d0 44766: 6600 ff16 bnew 4467e <rtems_termios_baud_to_index+0x3e>
4476a: 4280 clrl %d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4476c: 4e5e unlk %fp <== NOT EXECUTED
000433c4 <rtems_termios_baud_to_number>:
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
433c4: 203c 0000 04b0 movel #1200,%d0
#include <rtems/termiostypes.h>
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
433ca: 4e56 0000 linkw %fp,#0 433ce: 222e 0008 movel %fp@(8),%d1 433d2: 2f02 movel %d2,%sp@-
int32_t baud;
switch (termios_baud) {
433d4: 7409 moveq #9,%d2 433d6: b481 cmpl %d1,%d2
433d8: 6740 beqs 4341a <rtems_termios_baud_to_number+0x56>
433da: 6c44 bges 43420 <rtems_termios_baud_to_number+0x5c>
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
433dc: 203c 0000 4b00 movel #19200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
433e2: 740e moveq #14,%d2 433e4: b481 cmpl %d1,%d2
433e6: 6732 beqs 4341a <rtems_termios_baud_to_number+0x56>
433e8: 6c68 bges 43452 <rtems_termios_baud_to_number+0x8e>
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
433ea: 203c 0001 c200 movel #115200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
433f0: 0c81 0000 1002 cmpil #4098,%d1
433f6: 6722 beqs 4341a <rtems_termios_baud_to_number+0x56>
433f8: 6f00 00c0 blew 434ba <rtems_termios_baud_to_number+0xf6>
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
433fc: 203c 0003 8400 movel #230400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43402: 0c81 0000 1003 cmpil #4099,%d1
43408: 6710 beqs 4341a <rtems_termios_baud_to_number+0x56>
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
4340a: 203c 0007 0800 movel #460800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43410: 0c81 0000 1004 cmpil #4100,%d1
43416: 6702 beqs 4341a <rtems_termios_baud_to_number+0x56><== ALWAYS TAKEN
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
43418: 70ff moveq #-1,%d0
default: baud = -1; break;
}
return baud;
}
4341a: 241f movel %sp@+,%d2 4341c: 4e5e unlk %fp 4341e: 4e75 rts
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43420: 143c 0004 moveb #4,%d2
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
43424: 303c 0086 movew #134,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43428: b481 cmpl %d1,%d2
4342a: 67ee beqs 4341a <rtems_termios_baud_to_number+0x56>
4342c: 6d54 blts 43482 <rtems_termios_baud_to_number+0xbe><== NEVER TAKEN
4342e: 103c 0001 moveb #1,%d0 43432: b081 cmpl %d1,%d0 43434: 6700 00a6 beqw 434dc <rtems_termios_baud_to_number+0x118> 43438: 6c00 00b2 bgew 434ec <rtems_termios_baud_to_number+0x128> 4343c: 7402 moveq #2,%d2 4343e: b481 cmpl %d1,%d2 43440: 6700 00a2 beqw 434e4 <rtems_termios_baud_to_number+0x120> 43444: 7003 moveq #3,%d0 43446: b081 cmpl %d1,%d0
43448: 66ce bnes 43418 <rtems_termios_baud_to_number+0x54><== NEVER TAKEN
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
4344a: 241f movel %sp@+,%d2
int32_t baud;
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
4344c: 706e moveq #110,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
4344e: 4e5e unlk %fp 43450: 4e75 rts
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43452: 143c 000b moveb #11,%d2
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
43456: 303c 0960 movew #2400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
4345a: b481 cmpl %d1,%d2
4345c: 67bc beqs 4341a <rtems_termios_baud_to_number+0x56>
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
4345e: 303c 0708 movew #1800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43462: b481 cmpl %d1,%d2
43464: 6eb4 bgts 4341a <rtems_termios_baud_to_number+0x56><== NEVER TAKEN
43466: 143c 000c moveb #12,%d2
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
4346a: 303c 12c0 movew #4800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
4346e: b481 cmpl %d1,%d2
43470: 67a8 beqs 4341a <rtems_termios_baud_to_number+0x56><== NEVER TAKEN
43472: 143c 000d moveb #13,%d2
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
43476: 303c 2580 movew #9600,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
4347a: b481 cmpl %d1,%d2
4347c: 679c beqs 4341a <rtems_termios_baud_to_number+0x56>
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
4347e: 70ff moveq #-1,%d0 <== NOT EXECUTED 43480: 6098 bras 4341a <rtems_termios_baud_to_number+0x56><== NOT EXECUTED
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
43482: 203c 0000 00c8 movel #200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43488: 7406 moveq #6,%d2 4348a: b481 cmpl %d1,%d2
4348c: 678c beqs 4341a <rtems_termios_baud_to_number+0x56><== NEVER TAKEN
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
4348e: 0680 ffff ffce addil #-50,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43494: b481 cmpl %d1,%d2
43496: 6e82 bgts 4341a <rtems_termios_baud_to_number+0x56><== NEVER TAKEN
43498: 143c 0007 moveb #7,%d2
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
4349c: 303c 012c movew #300,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
434a0: b481 cmpl %d1,%d2 434a2: 6700 ff76 beqw 4341a <rtems_termios_baud_to_number+0x56> 434a6: 143c 0008 moveb #8,%d2
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
434aa: 303c 0258 movew #600,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
434ae: b481 cmpl %d1,%d2 434b0: 6700 ff68 beqw 4341a <rtems_termios_baud_to_number+0x56>
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
434b4: 70ff moveq #-1,%d0 <== NOT EXECUTED 434b6: 6000 ff62 braw 4341a <rtems_termios_baud_to_number+0x56><== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
434ba: 740f moveq #15,%d2
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
434bc: 203c 0000 9600 movel #38400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
434c2: b481 cmpl %d1,%d2 434c4: 6700 ff54 beqw 4341a <rtems_termios_baud_to_number+0x56>
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
434c8: 303c e100 movew #-7936,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
434cc: 0c81 0000 1001 cmpil #4097,%d1 434d2: 6700 ff46 beqw 4341a <rtems_termios_baud_to_number+0x56>
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
434d6: 70ff moveq #-1,%d0 <== NOT EXECUTED 434d8: 6000 ff40 braw 4341a <rtems_termios_baud_to_number+0x56><== NOT EXECUTED
default: baud = -1; break;
}
return baud;
}
434dc: 241f movel %sp@+,%d2
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
434de: 7032 moveq #50,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
434e0: 4e5e unlk %fp 434e2: 4e75 rts 434e4: 241f movel %sp@+,%d2
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
434e6: 704b moveq #75,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
434e8: 4e5e unlk %fp 434ea: 4e75 rts
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
434ec: 4a81 tstl %d1 434ee: 6600 ff28 bnew 43418 <rtems_termios_baud_to_number+0x54>
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
434f2: 241f movel %sp@+,%d2
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
434f4: 4280 clrl %d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
434f6: 4e5e unlk %fp
...
00043538 <rtems_termios_bufsize>:
{
rtems_termios_cbufsize = cbufsize;
rtems_termios_raw_input_size = raw_input;
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
43538: 4280 clrl %d0 <== NOT EXECUTED
rtems_status_code rtems_termios_bufsize (
int cbufsize,
int raw_input,
int raw_output
)
{
4353a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_termios_cbufsize = cbufsize;
4353e: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 43542: 23d0 0005 c2e4 movel %a0@,5c2e4 <rtems_termios_cbufsize> <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
43548: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 4354c: 23d0 0005 c2e8 movel %a0@,5c2e8 <rtems_termios_raw_input_size><== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
43552: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL; }
43556: 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;
43558: 23d0 0005 c2ec movel %a0@,5c2ec <rtems_termios_raw_output_size><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
00044b34 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
44b34: 4e56 fff4 linkw %fp,#-12 44b38: 48d7 1c00 moveml %a2-%a4,%sp@ 44b3c: 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);
44b40: 49f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%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;
44b46: 2053 moveal %a3@,%a0 44b48: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44b4c: 42a7 clrl %sp@- 44b4e: 42a7 clrl %sp@- 44b50: 2f39 0005 d8b0 movel 5d8b0 <rtems_termios_ttyMutex>,%sp@- 44b56: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
44b58: 4fef 000c lea %sp@(12),%sp 44b5c: 4a80 tstl %d0 44b5e: 6600 011c bnew 44c7c <rtems_termios_close+0x148>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
44b62: 202a 0008 movel %a2@(8),%d0 44b66: 5380 subql #1,%d0 44b68: 2540 0008 movel %d0,%a2@(8) 44b6c: 6600 00a4 bnew 44c12 <rtems_termios_close+0xde>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
44b70: 202a 00cc movel %a2@(204),%d0 44b74: 41f9 0005 d068 lea 5d068 <rtems_termios_linesw>,%a0 44b7a: e788 lsll #3,%d0 44b7c: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 44b80: 4a88 tstl %a0 44b82: 6700 012c beqw 44cb0 <rtems_termios_close+0x17c>
/* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty);
44b86: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b88: 4e90 jsr %a0@ <== NOT EXECUTED 44b8a: 588f addql #4,%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
44b8c: 7002 moveq #2,%d0 <== NOT EXECUTED 44b8e: b0aa 00b4 cmpl %a2@(180),%d0 <== NOT EXECUTED 44b92: 6700 00c0 beqw 44c54 <rtems_termios_close+0x120> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
44b96: 206a 009c moveal %a2@(156),%a0 44b9a: 4a88 tstl %a0
44b9c: 6710 beqs 44bae <rtems_termios_close+0x7a> (*tty->device.lastClose)(tty->major, tty->minor, arg);
44b9e: 2f0b movel %a3,%sp@- 44ba0: 2f2a 0010 movel %a2@(16),%sp@- 44ba4: 2f2a 000c movel %a2@(12),%sp@- 44ba8: 4e90 jsr %a0@ 44baa: 4fef 000c lea %sp@(12),%sp
if (tty->forw == NULL) {
44bae: 2052 moveal %a2@,%a0 44bb0: 4a88 tstl %a0 44bb2: 6700 00d0 beqw 44c84 <rtems_termios_close+0x150>
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
44bb6: 216a 0004 0004 movel %a2@(4),%a0@(4)
}
if (tty->back == NULL) {
44bbc: 206a 0004 moveal %a2@(4),%a0 44bc0: 4a88 tstl %a0 44bc2: 6700 00d8 beqw 44c9c <rtems_termios_close+0x168>
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
44bc6: 2092 movel %a2@,%a0@ <== NOT EXECUTED
} rtems_semaphore_delete (tty->isem);
44bc8: 2f2a 0014 movel %a2@(20),%sp@- 44bcc: 47f9 0004 5c54 lea 45c54 <rtems_semaphore_delete>,%a3 44bd2: 4e93 jsr %a3@
rtems_semaphore_delete (tty->osem);
44bd4: 2f2a 0018 movel %a2@(24),%sp@- 44bd8: 4e93 jsr %a3@
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
44bda: 2f2a 008c movel %a2@(140),%sp@- 44bde: 4e93 jsr %a3@
if ((tty->device.pollRead == NULL) ||
44be0: 4fef 000c lea %sp@(12),%sp 44be4: 4aaa 00a0 tstl %a2@(160)
44be8: 6740 beqs 44c2a <rtems_termios_close+0xf6> (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
44bea: 7002 moveq #2,%d0 44bec: b0aa 00b4 cmpl %a2@(180),%d0
44bf0: 6738 beqs 44c2a <rtems_termios_close+0xf6> <== NEVER TAKEN
rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf);
44bf2: 2f2a 0058 movel %a2@(88),%sp@- 44bf6: 47f9 0004 a584 lea 4a584 <free>,%a3 44bfc: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
44bfe: 2f2a 007c movel %a2@(124),%sp@- 44c02: 4e93 jsr %a3@
free (tty->cbuf);
44c04: 2f2a 001c movel %a2@(28),%sp@- 44c08: 4e93 jsr %a3@
free (tty);
44c0a: 2f0a movel %a2,%sp@- 44c0c: 4e93 jsr %a3@ 44c0e: 4fef 0010 lea %sp@(16),%sp
} rtems_semaphore_release (rtems_termios_ttyMutex);
44c12: 2f39 0005 d8b0 movel 5d8b0 <rtems_termios_ttyMutex>,%sp@- 44c18: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
44c1e: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 44c24: 4280 clrl %d0 44c26: 4e5e unlk %fp 44c28: 4e75 rts
rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore);
44c2a: 2f2a 0068 movel %a2@(104),%sp@- 44c2e: 4e93 jsr %a3@ 44c30: 588f addql #4,%sp
free (tty->rawInBuf.theBuf);
44c32: 47f9 0004 a584 lea 4a584 <free>,%a3 44c38: 2f2a 0058 movel %a2@(88),%sp@- 44c3c: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
44c3e: 2f2a 007c movel %a2@(124),%sp@- 44c42: 4e93 jsr %a3@
free (tty->cbuf);
44c44: 2f2a 001c movel %a2@(28),%sp@- 44c48: 4e93 jsr %a3@
free (tty);
44c4a: 2f0a movel %a2,%sp@- 44c4c: 4e93 jsr %a3@ 44c4e: 4fef 0010 lea %sp@(16),%sp 44c52: 60be bras 44c12 <rtems_termios_close+0xde>
if (tty->device.outputUsesInterrupts
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
44c54: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44c58: 49f9 0004 5814 lea 45814 <rtems_event_send>,%a4 <== NOT EXECUTED 44c5e: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44c62: 4e94 jsr %a4@ <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
44c64: 508f addql #8,%sp <== NOT EXECUTED 44c66: 4a80 tstl %d0 <== NOT EXECUTED 44c68: 6612 bnes 44c7c <rtems_termios_close+0x148> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_event_send(
44c6a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44c6e: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44c72: 4e94 jsr %a4@ <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
44c74: 508f addql #8,%sp <== NOT EXECUTED 44c76: 4a80 tstl %d0 <== NOT EXECUTED 44c78: 6700 ff1c beqw 44b96 <rtems_termios_close+0x62> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
44c7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44c7e: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
44c84: 206a 0004 moveal %a2@(4),%a0 44c88: 23c8 0005 d8b4 movel %a0,5d8b4 <rtems_termios_ttyTail>
if ( rtems_termios_ttyTail != NULL ) {
44c8e: 6748 beqs 44cd8 <rtems_termios_close+0x1a4> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
44c90: 4290 clrl %a0@ <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
44c92: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 44c96: 4a88 tstl %a0 <== NOT EXECUTED 44c98: 6600 ff2c bnew 44bc6 <rtems_termios_close+0x92> <== NOT EXECUTED
44c9c: 2052 moveal %a2@,%a0
rtems_termios_ttyHead = tty->forw;
44c9e: 23c8 0005 d8b8 movel %a0,5d8b8 <rtems_termios_ttyHead>
if ( rtems_termios_ttyHead != NULL ) {
44ca4: 6700 ff22 beqw 44bc8 <rtems_termios_close+0x94>
rtems_termios_ttyHead->back = NULL;
44ca8: 42a8 0004 clrl %a0@(4) 44cac: 6000 ff1a braw 44bc8 <rtems_termios_close+0x94>
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44cb0: 42a7 clrl %sp@- 44cb2: 42a7 clrl %sp@- 44cb4: 2f2a 0018 movel %a2@(24),%sp@- 44cb8: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL) {
44cba: 4fef 000c lea %sp@(12),%sp 44cbe: 4a80 tstl %d0
44cc0: 66ba bnes 44c7c <rtems_termios_close+0x148> <== NEVER TAKEN
rtems_fatal_error_occurred (sc); } drainOutput (tty);
44cc2: 2f0a movel %a2,%sp@- 44cc4: 4eba f6e4 jsr %pc@(443aa <drainOutput>) 44cc8: 588f addql #4,%sp
}
if (tty->device.outputUsesInterrupts
44cca: 7002 moveq #2,%d0 44ccc: b0aa 00b4 cmpl %a2@(180),%d0 44cd0: 6600 fec4 bnew 44b96 <rtems_termios_close+0x62>
44cd4: 6000 ff7e braw 44c54 <rtems_termios_close+0x120> <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
44cd8: 42b9 0005 d8b8 clrl 5d8b8 <rtems_termios_ttyHead> 44cde: 6000 fee8 braw 44bc8 <rtems_termios_close+0x94>
000437ae <rtems_termios_dequeue_characters>:
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
437ae: 4e56 0000 linkw %fp,#0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
437b2: 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)
{
437b6: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
437ba: d1a8 0090 addl %d0,%a0@(144)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
437be: 7002 moveq #2,%d0 437c0: b0a8 00b4 cmpl %a0@(180),%d0
437c4: 672a beqs 437f0 <rtems_termios_dequeue_characters+0x42><== NEVER TAKEN
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
437c6: 7005 moveq #5,%d0 437c8: b0a8 00cc cmpl %a0@(204),%d0
437cc: 670c beqs 437da <rtems_termios_dequeue_characters+0x2c><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
437ce: 2d48 0008 movel %a0,%fp@(8)
} }
437d2: 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);
437d4: 4ef9 0004 357c jmp 4357c <rtems_termios_refill_transmitter>
}
else if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
437da: 2279 0005 d11c moveal 5d11c <rtems_termios_linesw+0xb4>,%a1<== NOT EXECUTED 437e0: 4a89 tstl %a1 <== NOT EXECUTED 437e2: 6706 beqs 437ea <rtems_termios_dequeue_characters+0x3c><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
437e4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 437e6: 4e91 jsr %a1@ <== NOT EXECUTED 437e8: 588f addql #4,%sp <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
437ea: 4280 clrl %d0 <== NOT EXECUTED 437ec: 4e5e unlk %fp <== NOT EXECUTED 437ee: 4e75 rts <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
437f0: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 437f4: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 437f8: 4eb9 0004 5814 jsr 45814 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL)
437fe: 508f addql #8,%sp <== NOT EXECUTED 43800: 4a80 tstl %d0 <== NOT EXECUTED 43802: 67e6 beqs 437ea <rtems_termios_dequeue_characters+0x3c><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
43804: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43806: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004380c <rtems_termios_enqueue_raw_characters>:
* 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)
{
4380c: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED 43810: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 43814: 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) {
43818: 49f9 0005 d068 lea 5d068 <rtems_termios_linesw>,%a4 <== NOT EXECUTED 4381e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43822: 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)
{
43824: 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) {
43828: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== 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)
{
4382c: 262e 0010 movel %fp@(16),%d3 <== 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) {
43830: 4a88 tstl %a0 <== NOT EXECUTED 43832: 6774 beqs 438a8 <rtems_termios_enqueue_raw_characters+0x9c><== NOT EXECUTED
while (len--) {
43834: 4a83 tstl %d3 <== NOT EXECUTED 43836: 6734 beqs 4386c <rtems_termios_enqueue_raw_characters+0x60><== NOT EXECUTED 43838: 4282 clrl %d2 <== NOT EXECUTED
c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
4383a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4383c: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 43840: 5282 addql #1,%d2 <== NOT EXECUTED 43842: 49c1 extbl %d1 <== NOT EXECUTED 43844: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43846: 4e90 jsr %a0@ <== 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--) {
43848: 508f addql #8,%sp <== NOT EXECUTED 4384a: b483 cmpl %d3,%d2 <== NOT EXECUTED 4384c: 671e beqs 4386c <rtems_termios_enqueue_raw_characters+0x60><== NOT EXECUTED 4384e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43852: eb88 lsll #5,%d0 <== NOT EXECUTED 43854: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED
c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
43858: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4385a: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 4385e: 5282 addql #1,%d2 <== NOT EXECUTED 43860: 49c1 extbl %d1 <== NOT EXECUTED 43862: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43864: 4e90 jsr %a0@ <== 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--) {
43866: 508f addql #8,%sp <== NOT EXECUTED 43868: b483 cmpl %d3,%d2 <== NOT EXECUTED 4386a: 66e2 bnes 4384e <rtems_termios_enqueue_raw_characters+0x42><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
4386c: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43870: 6628 bnes 4389a <rtems_termios_enqueue_raw_characters+0x8e><== NOT EXECUTED 43872: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43876: 4a88 tstl %a0 <== NOT EXECUTED 43878: 6720 beqs 4389a <rtems_termios_enqueue_raw_characters+0x8e><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4387a: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
4387e: 4285 clrl %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);
43880: 486a 0030 pea %a2@(48) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
43884: 7c01 moveq #1,%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);
43886: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
43888: 508f addql #8,%sp <== NOT EXECUTED
} } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; }
4388a: 2005 movel %d5,%d0 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
4388c: 2546 00e4 movel %d6,%a2@(228) <== NOT EXECUTED
} } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; }
43890: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43896: 4e5e unlk %fp <== NOT EXECUTED 43898: 4e75 rts <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
4389a: 4285 clrl %d5 <== NOT EXECUTED
}
4389c: 2005 movel %d5,%d0 <== NOT EXECUTED 4389e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 438a4: 4e5e unlk %fp <== NOT EXECUTED 438a6: 4e75 rts <== 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,
438a8: 41ea 004a lea %a2@(74),%a0 <== 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);
438ac: 4bea 0030 lea %a2@(48),%a5 <== NOT EXECUTED 438b0: 4285 clrl %d5 <== 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);
438b2: 387c 0700 moveaw #1792,%a4 <== 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);
438b6: 4200 clrb %d0 <== 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,
438b8: 2d48 fffc movel %a0,%fp@(-4) <== 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);
438bc: 1d40 fff7 moveb %d0,%fp@(-9) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
438c0: 4a83 tstl %d3 <== NOT EXECUTED 438c2: 6700 00e8 beqw 439ac <rtems_termios_enqueue_raw_characters+0x1a0><== NOT EXECUTED
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
438c6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
438ca: 1813 moveb %a3@,%d4 <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
438cc: 0800 0009 btst #9,%d0 <== NOT EXECUTED 438d0: 671c beqs 438ee <rtems_termios_enqueue_raw_characters+0xe2><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
438d2: 4281 clrl %d1 <== NOT EXECUTED 438d4: 122a 004a moveb %a2@(74),%d1 <== NOT EXECUTED 438d8: 1004 moveb %d4,%d0 <== NOT EXECUTED 438da: 49c0 extbl %d0 <== NOT EXECUTED 438dc: b280 cmpl %d0,%d1 <== NOT EXECUTED 438de: 6700 014a beqw 43a2a <rtems_termios_enqueue_raw_characters+0x21e><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
438e2: 4281 clrl %d1 <== NOT EXECUTED 438e4: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 438e8: b280 cmpl %d0,%d1 <== NOT EXECUTED 438ea: 6700 00dc beqw 439c8 <rtems_termios_enqueue_raw_characters+0x1bc><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
438ee: 4a2e fff7 tstb %fp@(-9) <== NOT EXECUTED 438f2: 6600 00e6 bnew 439da <rtems_termios_enqueue_raw_characters+0x1ce><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
438f6: 2e2a 0060 movel %a2@(96),%d7 <== NOT EXECUTED 438fa: 5287 addql #1,%d7 <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level);
438fc: 200c movel %a4,%d0 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
438fe: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43902: 4c41 7002 remul %d1,%d2,%d7 <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level);
43906: 40c7 movew %sr,%d7 <== NOT EXECUTED 43908: 8087 orl %d7,%d0 <== NOT EXECUTED 4390a: 46c0 movew %d0,%sr <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
4390c: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43910: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43914: 9081 subl %d1,%d0 <== NOT EXECUTED 43916: 2240 moveal %d0,%a1 <== NOT EXECUTED 43918: d3c2 addal %d2,%a1 <== NOT EXECUTED 4391a: 2209 movel %a1,%d1 <== NOT EXECUTED 4391c: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43920: 4c40 1006 remul %d0,%d6,%d1 <== NOT EXECUTED 43924: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
43928: bcaa 00c0 cmpl %a2@(192),%d6 <== NOT EXECUTED 4392c: 633e blss 4396c <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
4392e: 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)
43932: 0800 0000 btst #0,%d0 <== NOT EXECUTED 43936: 6634 bnes 4396c <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
43938: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4393c: 7201 moveq #1,%d1 <== NOT EXECUTED 4393e: 8081 orl %d1,%d0 <== NOT EXECUTED 43940: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
43944: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43948: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 4394e: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 43954: 6700 0112 beqw 43a68 <rtems_termios_enqueue_raw_characters+0x25c><== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
43958: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4395c: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 43962: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 43968: 6700 0136 beqw 43aa0 <rtems_termios_enqueue_raw_characters+0x294><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level);
4396c: 46c7 movew %d7,%sr <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
4396e: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 43972: b480 cmpl %d0,%d2 <== NOT EXECUTED 43974: 6700 00d2 beqw 43a48 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
43978: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4397c: 1184 2800 moveb %d4,%a0@(00000000,%d2:l) <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
43980: 2542 0060 movel %d2,%a2@(96) <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
43984: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43988: 6618 bnes 439a2 <rtems_termios_enqueue_raw_characters+0x196><== NOT EXECUTED 4398a: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 4398e: 4a88 tstl %a0 <== NOT EXECUTED 43990: 6710 beqs 439a2 <rtems_termios_enqueue_raw_characters+0x196><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
43992: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 43996: 2f0d movel %a5,%sp@- <== NOT EXECUTED 43998: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
4399a: 508f addql #8,%sp <== NOT EXECUTED 4399c: 7201 moveq #1,%d1 <== NOT EXECUTED 4399e: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
439a2: 528b addql #1,%a3 <== NOT EXECUTED 439a4: 5383 subql #1,%d3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
439a6: 4a83 tstl %d3 <== NOT EXECUTED 439a8: 6600 ff1c bnew 438c6 <rtems_termios_enqueue_raw_characters+0xba><== NOT EXECUTED
} } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore);
439ac: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
439b0: dbaa 0078 addl %d5,%a2@(120) <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
439b4: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
439ba: 588f addql #4,%sp <== NOT EXECUTED
}
439bc: 2005 movel %d5,%d0 <== NOT EXECUTED 439be: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 439c4: 4e5e unlk %fp <== NOT EXECUTED 439c6: 4e75 rts <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
439c8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439cc: 72ef moveq #-17,%d1 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
439ce: 7c01 moveq #1,%d6 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
439d0: c081 andl %d1,%d0 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
439d2: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
439d6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
439da: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439de: 7c30 moveq #48,%d6 <== NOT EXECUTED 439e0: 7220 moveq #32,%d1 <== NOT EXECUTED 439e2: c086 andl %d6,%d0 <== NOT EXECUTED 439e4: b280 cmpl %d0,%d1 <== NOT EXECUTED 439e6: 66ba bnes 439a2 <rtems_termios_enqueue_raw_characters+0x196><== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level);
439e8: 200c movel %a4,%d0 <== NOT EXECUTED 439ea: 40c2 movew %sr,%d2 <== NOT EXECUTED 439ec: 8082 orl %d2,%d0 <== NOT EXECUTED 439ee: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
439f0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439f4: 7cdf moveq #-33,%d6 <== NOT EXECUTED 439f6: c086 andl %d6,%d0 <== NOT EXECUTED 439f8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
439fc: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43a00: 6608 bnes 43a0a <rtems_termios_enqueue_raw_characters+0x1fe><== NOT EXECUTED
/* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level);
43a02: 46c2 movew %d2,%sr <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
43a04: 528b addql #1,%a3 <== NOT EXECUTED 43a06: 5383 subql #1,%d3 <== NOT EXECUTED 43a08: 609c bras 439a6 <rtems_termios_enqueue_raw_characters+0x19a><== 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,
43a0a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
43a0e: 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,
43a12: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43a16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43a18: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a1c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43a20: 4e90 jsr %a0@ <== NOT EXECUTED 43a22: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level);
43a26: 46c2 movew %d2,%sr <== NOT EXECUTED 43a28: 60da bras 43a04 <rtems_termios_enqueue_raw_characters+0x1f8><== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
43a2a: 4281 clrl %d1 <== NOT EXECUTED 43a2c: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 43a30: b280 cmpl %d0,%d1 <== NOT EXECUTED 43a32: 671e beqs 43a52 <rtems_termios_enqueue_raw_characters+0x246><== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
43a34: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a38: 7c10 moveq #16,%d6 <== NOT EXECUTED 43a3a: 8086 orl %d6,%d0 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
43a3c: 7c01 moveq #1,%d6 <== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
43a3e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
43a42: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 43a46: 6092 bras 439da <rtems_termios_enqueue_raw_characters+0x1ce><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
43a48: 5285 addql #1,%d5 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
43a4a: 528b addql #1,%a3 <== NOT EXECUTED 43a4c: 5383 subql #1,%d3 <== NOT EXECUTED 43a4e: 6000 ff56 braw 439a6 <rtems_termios_enqueue_raw_characters+0x19a><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
43a52: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a56: 7210 moveq #16,%d1 <== NOT EXECUTED 43a58: b380 eorl %d1,%d0 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
43a5a: 7c01 moveq #1,%d6 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
43a5c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
43a60: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 43a64: 6000 ff74 braw 439da <rtems_termios_enqueue_raw_characters+0x1ce><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
43a68: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a6c: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43a70: 6608 bnes 43a7a <rtems_termios_enqueue_raw_characters+0x26e><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
43a72: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43a76: 6600 fef4 bnew 4396c <rtems_termios_enqueue_raw_characters+0x160><== 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,
43a7a: 4878 0001 pea 1 <ADD> <== 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;
43a7e: 7c02 moveq #2,%d6 <== NOT EXECUTED 43a80: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
43a84: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 43a88: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a8c: 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;
43a90: 8286 orl %d6,%d1 <== NOT EXECUTED 43a92: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
43a96: 4e90 jsr %a0@ <== NOT EXECUTED 43a98: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43a9c: 6000 fece braw 4396c <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
43aa0: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 43aa4: 303c 0004 movew #4,%d0 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
43aa8: 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;
43aac: 8280 orl %d0,%d1 <== NOT EXECUTED 43aae: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
43ab2: 4a88 tstl %a0 <== NOT EXECUTED 43ab4: 6700 feb6 beqw 4396c <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
43ab8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43abc: 4e90 jsr %a0@ <== NOT EXECUTED 43abe: 588f addql #4,%sp <== NOT EXECUTED 43ac0: 6000 feaa braw 4396c <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
000434fc <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
434fc: 4e56 0000 linkw %fp,#0
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
43500: 4ab9 0005 d8b0 tstl 5d8b0 <rtems_termios_ttyMutex>
43506: 6704 beqs 4350c <rtems_termios_initialize+0x10>
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
43508: 4e5e unlk %fp 4350a: 4e75 rts
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
4350c: 4879 0005 d8b0 pea 5d8b0 <rtems_termios_ttyMutex> 43512: 42a7 clrl %sp@- 43514: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 43518: 4878 0001 pea 1 <ADD> 4351c: 2f3c 5452 6d69 movel #1414688105,%sp@- 43522: 4eb9 0004 5a8c jsr 45a8c <rtems_semaphore_create>
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)
43528: 4fef 0014 lea %sp@(20),%sp 4352c: 4a80 tstl %d0
4352e: 67d8 beqs 43508 <rtems_termios_initialize+0xc> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
43530: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43532: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
00044746 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
44746: 4e56 ffec linkw %fp,#-20 4474a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4474e: 266e 0008 moveal %fp@(8),%a3
rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
44752: 2053 moveal %a3@,%a0 44754: 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);
44758: 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;
4475a: 286b 0008 moveal %a3@(8),%a4
rtems_status_code sc;
args->ioctl_return = 0;
4475e: 42ab 000c clrl %a3@(12)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44762: 42a7 clrl %sp@- 44764: 2f2a 0018 movel %a2@(24),%sp@- 44768: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
4476e: 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);
44772: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
44774: 662c bnes 447a2 <rtems_termios_ioctl+0x5c> <== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
44776: 202b 0004 movel %a3@(4),%d0 4477a: 7204 moveq #4,%d1 4477c: b280 cmpl %d0,%d1
4477e: 6774 beqs 447f4 <rtems_termios_ioctl+0xae> <== NEVER TAKEN 44780: 6530 bcss 447b2 <rtems_termios_ioctl+0x6c> <== NEVER TAKEN
44782: 7602 moveq #2,%d3 44784: b680 cmpl %d0,%d3 44786: 6700 00b6 beqw 4483e <rtems_termios_ioctl+0xf8> 4478a: 6400 0224 bccw 449b0 <rtems_termios_ioctl+0x26a>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
4478e: 2f0a movel %a2,%sp@- 44790: 4eba fc18 jsr %pc@(443aa <drainOutput>)
break;
44794: 588f addql #4,%sp
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
44796: 2f2a 0018 movel %a2@(24),%sp@- 4479a: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
447a0: 588f addql #4,%sp
}
447a2: 2002 movel %d2,%d0
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc;
447a4: 2742 000c movel %d2,%a3@(12)
return sc; }
447a8: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 447ae: 4e5e unlk %fp 447b0: 4e75 rts
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
447b2: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 447b8: 6756 beqs 44810 <rtems_termios_ioctl+0xca> <== NOT EXECUTED 447ba: 6200 0236 bhiw 449f2 <rtems_termios_ioctl+0x2ac> <== NOT EXECUTED 447be: 7605 moveq #5,%d3 <== NOT EXECUTED 447c0: b680 cmpl %d0,%d3 <== NOT EXECUTED 447c2: 6700 01ce beqw 44992 <rtems_termios_ioctl+0x24c> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
447c6: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 447ca: eb88 lsll #5,%d0 <== NOT EXECUTED 447cc: 0680 0005 d080 addil #381056,%d0 <== NOT EXECUTED 447d2: 2240 moveal %d0,%a1 <== NOT EXECUTED 447d4: 2051 moveal %a1@,%a0 <== NOT EXECUTED 447d6: 4a88 tstl %a0 <== NOT EXECUTED 447d8: 6700 0292 beqw 44a6c <rtems_termios_ioctl+0x326> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
447dc: 2f0b movel %a3,%sp@- <== NOT EXECUTED 447de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 447e0: 4e90 jsr %a0@ <== NOT EXECUTED 447e2: 508f addql #8,%sp <== NOT EXECUTED 447e4: 2400 movel %d0,%d2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
447e6: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 447ea: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
447f0: 588f addql #4,%sp <== NOT EXECUTED 447f2: 60ae bras 447a2 <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
447f4: 2014 movel %a4@,%d0 <== NOT EXECUTED 447f6: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 447fa: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 447fe: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
44802: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44806: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
4480c: 588f addql #4,%sp <== NOT EXECUTED 4480e: 6092 bras 447a2 <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
44810: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44814: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 44818: 9081 subl %d1,%d0 <== NOT EXECUTED
if ( rawnc < 0 )
4481a: 6b00 02a4 bmiw 44ac0 <rtems_termios_ioctl+0x37a> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
4481e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44822: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44826: d280 addl %d0,%d1 <== NOT EXECUTED 44828: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 4482c: 2081 movel %d1,%a0@ <== NOT EXECUTED
} break; } rtems_semaphore_release (tty->osem);
4482e: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44832: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
44838: 588f addql #4,%sp <== NOT EXECUTED 4483a: 6000 ff66 braw 447a2 <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
4483e: 206b 0008 moveal %a3@(8),%a0 44842: 49ea 0030 lea %a2@(48),%a4 44846: 2898 movel %a0@+,%a4@ 44848: 2558 0034 movel %a0@+,%a2@(52) 4484c: 2558 0038 movel %a0@+,%a2@(56) 44850: 2558 003c movel %a0@+,%a2@(60) 44854: 2558 0040 movel %a0@+,%a2@(64) 44858: 2558 0044 movel %a0@+,%a2@(68) 4485c: 2558 0048 movel %a0@+,%a2@(72) 44860: 2558 004c movel %a0@+,%a2@(76)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
44864: 202a 00b8 movel %a2@(184),%d0
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
44868: 2550 0050 movel %a0@,%a2@(80)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
4486c: 0800 0009 btst #9,%d0
44870: 6746 beqs 448b8 <rtems_termios_ioctl+0x172>
44872: 202a 0030 movel %a2@(48),%d0 44876: 0280 0000 0400 andil #1024,%d0
4487c: 663a bnes 448b8 <rtems_termios_ioctl+0x172> <== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
4487e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44882: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 44888: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
4488c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44890: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44894: 6722 beqs 448b8 <rtems_termios_ioctl+0x172> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
44896: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 4489c: 40c3 movew %sr,%d3 <== NOT EXECUTED 4489e: 8083 orl %d3,%d0 <== NOT EXECUTED 448a0: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
448a2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448a6: 72df moveq #-33,%d1 <== NOT EXECUTED 448a8: c081 andl %d1,%d0 <== NOT EXECUTED 448aa: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
448ae: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 448b2: 6600 0242 bnew 44af6 <rtems_termios_ioctl+0x3b0> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
448b6: 46c3 movew %d3,%sr <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
448b8: 202a 00b8 movel %a2@(184),%d0 448bc: 0800 000a btst #10,%d0
448c0: 6724 beqs 448e6 <rtems_termios_ioctl+0x1a0> <== ALWAYS TAKEN
448c2: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 448c6: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 448cc: 6618 bnes 448e6 <rtems_termios_ioctl+0x1a0> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
448ce: 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);
448d2: 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);
448d4: 0880 000a bclr #10,%d0 <== NOT EXECUTED 448d8: 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);
448dc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448e0: c083 andl %d3,%d0 <== NOT EXECUTED 448e2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
448e6: 202a 00b8 movel %a2@(184),%d0 448ea: 0800 0008 btst #8,%d0
448ee: 6738 beqs 44928 <rtems_termios_ioctl+0x1e2> <== ALWAYS TAKEN
448f0: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 448f4: 6d00 01e4 bltw 44ada <rtems_termios_ioctl+0x394> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
448f8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448fc: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 44900: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
44904: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44908: 44c0 movew %d0,%ccr <== NOT EXECUTED 4490a: 6610 bnes 4491c <rtems_termios_ioctl+0x1d6> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
4490c: 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) &&
44910: 4a88 tstl %a0 <== NOT EXECUTED 44912: 6708 beqs 4491c <rtems_termios_ioctl+0x1d6> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
44914: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44918: 4e90 jsr %a0@ <== NOT EXECUTED 4491a: 588f addql #4,%sp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
4491c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44920: 72fb moveq #-5,%d1 <== NOT EXECUTED 44922: c081 andl %d1,%d0 <== NOT EXECUTED 44924: 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) {
44928: 4aaa 0038 tstl %a2@(56) 4492c: 6d00 01ac bltw 44ada <rtems_termios_ioctl+0x394>
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
44930: 202a 0030 movel %a2@(48),%d0 44934: 0800 000c btst #12,%d0
44938: 670c beqs 44946 <rtems_termios_ioctl+0x200> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDXOF;
4493a: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 4493e: 08c1 000a bset #10,%d1 <== NOT EXECUTED 44942: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
44946: 0800 000a btst #10,%d0
4494a: 670c beqs 44958 <rtems_termios_ioctl+0x212> <== NEVER TAKEN
tty->flow_ctrl |= FL_MDXON;
4494c: 202a 00b8 movel %a2@(184),%d0 44950: 08c0 0009 bset #9,%d0 44954: 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) {
44958: 7002 moveq #2,%d0 4495a: c0aa 003c andl %a2@(60),%d0 4495e: 6700 011e beqw 44a7e <rtems_termios_ioctl+0x338>
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
44962: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
44966: 42aa 0070 clrl %a2@(112)
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
4496a: 206a 00a8 moveal %a2@(168),%a0
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
4496e: 42aa 0074 clrl %a2@(116)
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
44972: 4a88 tstl %a0 44974: 6700 fe20 beqw 44796 <rtems_termios_ioctl+0x50>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
44978: 2f0c movel %a4,%sp@- 4497a: 2f2a 0010 movel %a2@(16),%sp@- 4497e: 4e90 jsr %a0@ 44980: 508f addql #8,%sp
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
44982: 2f2a 0018 movel %a2@(24),%sp@- 44986: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
4498c: 588f addql #4,%sp 4498e: 6000 fe12 braw 447a2 <rtems_termios_ioctl+0x5c>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
44992: 2014 movel %a4@,%d0 <== NOT EXECUTED 44994: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 44998: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 4499c: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
449a0: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 449a4: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
449aa: 588f addql #4,%sp <== NOT EXECUTED 449ac: 6000 fdf4 braw 447a2 <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
449b0: 123c 0001 moveb #1,%d1 449b4: b280 cmpl %d0,%d1 449b6: 6600 fe0e bnew 447c6 <rtems_termios_ioctl+0x80>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
449ba: 206b 0008 moveal %a3@(8),%a0 449be: 20ea 0030 movel %a2@(48),%a0@+ 449c2: 20ea 0034 movel %a2@(52),%a0@+ 449c6: 20ea 0038 movel %a2@(56),%a0@+ 449ca: 20ea 003c movel %a2@(60),%a0@+ 449ce: 20ea 0040 movel %a2@(64),%a0@+ 449d2: 20ea 0044 movel %a2@(68),%a0@+ 449d6: 20ea 0048 movel %a2@(72),%a0@+ 449da: 20ea 004c movel %a2@(76),%a0@+ 449de: 20aa 0050 movel %a2@(80),%a0@
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
449e2: 2f2a 0018 movel %a2@(24),%sp@- 449e6: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
449ec: 588f addql #4,%sp 449ee: 6000 fdb2 braw 447a2 <rtems_termios_ioctl+0x5c>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
449f2: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 449f8: 675a beqs 44a54 <rtems_termios_ioctl+0x30e> <== NOT EXECUTED 449fa: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 44a00: 6600 fdc4 bnew 447c6 <rtems_termios_ioctl+0x80> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
44a04: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44a08: 49f9 0005 d068 lea 5d068 <rtems_termios_linesw>,%a4 <== NOT EXECUTED 44a0e: e788 lsll #3,%d0 <== NOT EXECUTED 44a10: 2074 0c04 moveal %a4@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 44a14: 4a88 tstl %a0 <== NOT EXECUTED 44a16: 6708 beqs 44a20 <rtems_termios_ioctl+0x2da> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
44a18: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a1a: 4e90 jsr %a0@ <== NOT EXECUTED 44a1c: 588f addql #4,%sp <== NOT EXECUTED 44a1e: 2400 movel %d0,%d2 <== NOT EXECUTED
} tty->t_line=*(int*)(args->buffer);
44a20: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44a24: 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) {
44a26: 2200 movel %d0,%d1 <== NOT EXECUTED 44a28: 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);
44a2a: 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) {
44a2e: 2074 1800 moveal %a4@(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 */
44a32: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
44a36: 4a88 tstl %a0 <== NOT EXECUTED 44a38: 6700 fd5c beqw 44796 <rtems_termios_ioctl+0x50> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
44a3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a3e: 4e90 jsr %a0@ <== NOT EXECUTED 44a40: 588f addql #4,%sp <== NOT EXECUTED 44a42: 2400 movel %d0,%d2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
44a44: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44a48: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
44a4e: 588f addql #4,%sp <== NOT EXECUTED 44a50: 6000 fd50 braw 447a2 <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
44a54: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44a58: 20aa 00cc movel %a2@(204),%a0@ <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
44a5c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44a60: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
44a66: 588f addql #4,%sp <== NOT EXECUTED 44a68: 6000 fd38 braw 447a2 <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
44a6c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
44a70: 740a moveq #10,%d2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
44a72: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
44a78: 588f addql #4,%sp <== NOT EXECUTED 44a7a: 6000 fd26 braw 447a2 <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
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;
44a7e: 4283 clrl %d3 <== NOT EXECUTED 44a80: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 44a84: 4eb9 0004 55e4 jsr 455e4 <rtems_clock_get_ticks_per_second><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
44a8a: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 44a8e: 760a moveq #10,%d3 <== NOT EXECUTED 44a90: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 44a94: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
44a98: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44a9c: 677a beqs 44b18 <rtems_termios_ioctl+0x3d2> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
44a9e: 42aa 006c clrl %a2@(108) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
44aa2: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
44aa6: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44aaa: 6600 febe bnew 4496a <rtems_termios_ioctl+0x224> <== NOT EXECUTED
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
44aae: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
44ab2: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
44ab6: 4a88 tstl %a0 <== NOT EXECUTED 44ab8: 6600 febe bnew 44978 <rtems_termios_ioctl+0x232> <== NOT EXECUTED 44abc: 6000 fcd8 braw 44796 <rtems_termios_ioctl+0x50> <== NOT EXECUTED
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
44ac0: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44ac4: d081 addl %d1,%d0 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
44ac6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44aca: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44ace: d280 addl %d0,%d1 <== NOT EXECUTED 44ad0: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44ad4: 2081 movel %d1,%a0@ <== NOT EXECUTED 44ad6: 6000 fd56 braw 4482e <rtems_termios_ioctl+0xe8> <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
44ada: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44ade: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 44ae2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
44ae6: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 44aea: 0800 000c btst #12,%d0 <== NOT EXECUTED 44aee: 6700 fe56 beqw 44946 <rtems_termios_ioctl+0x200> <== NOT EXECUTED 44af2: 6000 fe46 braw 4493a <rtems_termios_ioctl+0x1f4> <== NOT EXECUTED
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,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
44af6: 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,
44afa: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44afe: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 44b02: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44b04: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44b08: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44b0c: 4e90 jsr %a0@ <== NOT EXECUTED 44b0e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
44b12: 46c3 movew %d3,%sr <== NOT EXECUTED 44b14: 6000 fda2 braw 448b8 <rtems_termios_ioctl+0x172> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
44b18: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44b1c: 6600 fe44 bnew 44962 <rtems_termios_ioctl+0x21c> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
44b20: 7001 moveq #1,%d0 <== NOT EXECUTED
} } } if (tty->device.setAttributes)
44b22: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
44b26: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED
} } } if (tty->device.setAttributes)
44b2a: 4a88 tstl %a0 <== NOT EXECUTED 44b2c: 6600 fe4a bnew 44978 <rtems_termios_ioctl+0x232> <== NOT EXECUTED 44b30: 6000 fc64 braw 44796 <rtems_termios_ioctl+0x50> <== NOT EXECUTED
000448e4 <rtems_termios_number_to_baud>:
#include <rtems/termiostypes.h>
int rtems_termios_number_to_baud(
int32_t baud
)
{
448e4: 4e56 0000 linkw %fp,#0 448e8: 222e 0008 movel %fp@(8),%d1
int termios_baud;
switch (baud) {
448ec: 0c81 0000 04b0 cmpil #1200,%d1 448f2: 6700 011c beqw 44a10 <rtems_termios_number_to_baud+0x12c>
448f6: 6f3c bles 44934 <rtems_termios_number_to_baud+0x50>
448f8: 0c81 0000 4b00 cmpil #19200,%d1 448fe: 6700 011c beqw 44a1c <rtems_termios_number_to_baud+0x138>
44902: 6f60 bles 44964 <rtems_termios_number_to_baud+0x80>
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
44904: 203c 0000 1002 movel #4098,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
4490a: 0c81 0001 c200 cmpil #115200,%d1
44910: 671e beqs 44930 <rtems_termios_number_to_baud+0x4c>
44912: 6f00 00a8 blew 449bc <rtems_termios_number_to_baud+0xd8>
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
44916: 203c 0000 1003 movel #4099,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
4491c: 0c81 0003 8400 cmpil #230400,%d1
44922: 670c beqs 44930 <rtems_termios_number_to_baud+0x4c>
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
44924: 5280 addql #1,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
44926: 0c81 0007 0800 cmpil #460800,%d1
4492c: 6702 beqs 44930 <rtems_termios_number_to_baud+0x4c><== ALWAYS TAKEN
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
4492e: 70ff moveq #-1,%d0
default: termios_baud = -1; break;
}
return termios_baud;
}
44930: 4e5e unlk %fp 44932: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
44934: 0c81 0000 0086 cmpil #134,%d1 4493a: 6700 00da beqw 44a16 <rtems_termios_number_to_baud+0x132>
4493e: 6f46 bles 44986 <rtems_termios_number_to_baud+0xa2>
44940: 0c81 0000 00c8 cmpil #200,%d1 44946: 6700 00b6 beqw 449fe <rtems_termios_number_to_baud+0x11a>
4494a: 6f56 bles 449a2 <rtems_termios_number_to_baud+0xbe>
4494c: 0c81 0000 012c cmpil #300,%d1 44952: 6700 00a4 beqw 449f8 <rtems_termios_number_to_baud+0x114> 44956: 0c81 0000 0258 cmpil #600,%d1
4495c: 66d0 bnes 4492e <rtems_termios_number_to_baud+0x4a><== NEVER TAKEN
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
4495e: 7008 moveq #8,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
44960: 4e5e unlk %fp 44962: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
44964: 0c81 0000 0960 cmpil #2400,%d1 4496a: 6700 009e beqw 44a0a <rtems_termios_number_to_baud+0x126>
4496e: 6f66 bles 449d6 <rtems_termios_number_to_baud+0xf2>
44970: 0c81 0000 12c0 cmpil #4800,%d1
44976: 676e beqs 449e6 <rtems_termios_number_to_baud+0x102>
44978: 0c81 0000 2580 cmpil #9600,%d1
4497e: 66ae bnes 4492e <rtems_termios_number_to_baud+0x4a>
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
44980: 700d moveq #13,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
44982: 4e5e unlk %fp 44984: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
44986: 7032 moveq #50,%d0 44988: b081 cmpl %d1,%d0
4498a: 6778 beqs 44a04 <rtems_termios_number_to_baud+0x120> 4498c: 6c22 bges 449b0 <rtems_termios_number_to_baud+0xcc>
4498e: 704b moveq #75,%d0 44990: b081 cmpl %d1,%d0
44992: 6758 beqs 449ec <rtems_termios_number_to_baud+0x108>
44994: 103c 006e moveb #110,%d0 44998: b081 cmpl %d1,%d0
4499a: 6692 bnes 4492e <rtems_termios_number_to_baud+0x4a><== NEVER TAKEN
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
4499c: 7003 moveq #3,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
4499e: 4e5e unlk %fp 449a0: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
449a2: 0c81 0000 0096 cmpil #150,%d1
449a8: 6684 bnes 4492e <rtems_termios_number_to_baud+0x4a><== NEVER TAKEN
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
449aa: 7005 moveq #5,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
449ac: 4e5e unlk %fp 449ae: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
449b0: 4a81 tstl %d1 449b2: 6600 ff7a bnew 4492e <rtems_termios_number_to_baud+0x4a> 449b6: 4280 clrl %d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
449b8: 4e5e unlk %fp 449ba: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
449bc: 0c81 0000 9600 cmpil #38400,%d1
449c2: 672e beqs 449f2 <rtems_termios_number_to_baud+0x10e>
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
449c4: 5380 subql #1,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
449c6: 0c81 0000 e100 cmpil #57600,%d1 449cc: 6700 ff62 beqw 44930 <rtems_termios_number_to_baud+0x4c>
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
449d0: 70ff moveq #-1,%d0 <== NOT EXECUTED 449d2: 6000 ff5c braw 44930 <rtems_termios_number_to_baud+0x4c><== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
449d6: 0c81 0000 0708 cmpil #1800,%d1 449dc: 6600 ff50 bnew 4492e <rtems_termios_number_to_baud+0x4a>
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
449e0: 700a moveq #10,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
449e2: 4e5e unlk %fp 449e4: 4e75 rts
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
449e6: 700c moveq #12,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
449e8: 4e5e unlk %fp 449ea: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
449ec: 7002 moveq #2,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
449ee: 4e5e unlk %fp 449f0: 4e75 rts
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
449f2: 700f moveq #15,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
449f4: 4e5e unlk %fp 449f6: 4e75 rts
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
449f8: 7007 moveq #7,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
449fa: 4e5e unlk %fp 449fc: 4e75 rts
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
449fe: 7006 moveq #6,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
44a00: 4e5e unlk %fp 44a02: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
44a04: 7001 moveq #1,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
44a06: 4e5e unlk %fp 44a08: 4e75 rts
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
44a0a: 700b moveq #11,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
44a0c: 4e5e unlk %fp 44a0e: 4e75 rts
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
44a10: 7009 moveq #9,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
44a12: 4e5e unlk %fp 44a14: 4e75 rts
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
44a16: 7004 moveq #4,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
44a18: 4e5e unlk %fp 44a1a: 4e75 rts
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
44a1c: 700e moveq #14,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
44a1e: 4e5e unlk %fp
...
00044ce2 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
44ce2: 4e56 ffdc linkw %fp,#-36 44ce6: 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,
44cea: 42a7 clrl %sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
44cec: 242e 0008 movel %fp@(8),%d2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
44cf0: 42a7 clrl %sp@- 44cf2: 2f39 0005 d8b0 movel 5d8b0 <rtems_termios_ttyMutex>,%sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
44cf8: 262e 000c movel %fp@(12),%d3 44cfc: 266e 0010 moveal %fp@(16),%a3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
44d00: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
44d06: 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,
44d0a: 2800 movel %d0,%d4
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
44d0c: 6600 027a bnew 44f88 <rtems_termios_open+0x2a6>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
44d10: 2479 0005 d8b8 moveal 5d8b8 <rtems_termios_ttyHead>,%a2 44d16: 4a8a tstl %a2
44d18: 670e beqs 44d28 <rtems_termios_open+0x46> if ((tty->major == major) && (tty->minor == minor))
44d1a: b4aa 000c cmpl %a2@(12),%d2 44d1e: 6700 0274 beqw 44f94 <rtems_termios_open+0x2b2>
*/
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) {
44d22: 2452 moveal %a2@,%a2 44d24: 4a8a tstl %a2
44d26: 66f2 bnes 44d1a <rtems_termios_open+0x38> <== NEVER TAKEN
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
44d28: 4878 00e8 pea e8 <DBL_MANT_DIG+0xb3> 44d2c: 4878 0001 pea 1 <ADD> 44d30: 4eb9 0004 a498 jsr 4a498 <calloc>
if (tty == NULL) {
44d36: 508f addql #8,%sp
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
44d38: 2840 moveal %d0,%a4 44d3a: 2440 moveal %d0,%a2
if (tty == NULL) {
44d3c: 4a80 tstl %d0 44d3e: 6700 0348 beqw 45088 <rtems_termios_open+0x3a6>
return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
44d42: 41f9 0005 c2e8 lea 5c2e8 <rtems_termios_raw_input_size>,%a0
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
44d48: 4bf9 0004 aaf4 lea 4aaf4 <malloc>,%a5
return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
44d4e: 2950 0064 movel %a0@,%a4@(100)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
44d52: 202c 0064 movel %a4@(100),%d0 44d56: 2f00 movel %d0,%sp@- 44d58: 4e95 jsr %a5@
if (tty->rawInBuf.theBuf == NULL) {
44d5a: 588f addql #4,%sp
} /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
44d5c: 2940 0058 movel %d0,%a4@(88)
if (tty->rawInBuf.theBuf == NULL) {
44d60: 6700 0342 beqw 450a4 <rtems_termios_open+0x3c2>
return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
44d64: 41f9 0005 c2ec lea 5c2ec <rtems_termios_raw_output_size>,%a0 44d6a: 2950 0088 movel %a0@,%a4@(136)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
44d6e: 202c 0088 movel %a4@(136),%d0 44d72: 2f00 movel %d0,%sp@- 44d74: 4e95 jsr %a5@
if (tty->rawOutBuf.theBuf == NULL) {
44d76: 588f addql #4,%sp
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
44d78: 2940 007c movel %d0,%a4@(124)
if (tty->rawOutBuf.theBuf == NULL) {
44d7c: 6700 034a beqw 450c8 <rtems_termios_open+0x3e6>
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
44d80: 2f39 0005 c2e4 movel 5c2e4 <rtems_termios_cbufsize>,%sp@- 44d86: 4e95 jsr %a5@
if (tty->cbuf == NULL) {
44d88: 588f addql #4,%sp
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
44d8a: 2940 001c movel %d0,%a4@(28)
if (tty->cbuf == NULL) {
44d8e: 6700 0366 beqw 450f6 <rtems_termios_open+0x414>
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
44d92: 2079 0005 d8b8 moveal 5d8b8 <rtems_termios_ttyHead>,%a0
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
44d98: 42ac 00d4 clrl %a4@(212)
tty->tty_snd.sw_arg = NULL;
44d9c: 42ac 00d8 clrl %a4@(216)
tty->tty_rcv.sw_pfn = NULL;
44da0: 42ac 00dc clrl %a4@(220)
tty->tty_rcv.sw_arg = NULL;
44da4: 42ac 00e0 clrl %a4@(224)
tty->tty_rcvwakeup = 0;
44da8: 42ac 00e4 clrl %a4@(228)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
44dac: 2888 movel %a0,%a4@
tty->back = NULL;
44dae: 42ac 0004 clrl %a4@(4)
if (rtems_termios_ttyHead != NULL)
44db2: 4a88 tstl %a0
44db4: 6704 beqs 44dba <rtems_termios_open+0xd8> rtems_termios_ttyHead->back = tty;
44db6: 214c 0004 movel %a4,%a0@(4)
rtems_termios_ttyHead = tty;
44dba: 23cc 0005 d8b8 movel %a4,5d8b8 <rtems_termios_ttyHead>
if (rtems_termios_ttyTail == NULL)
44dc0: 4ab9 0005 d8b4 tstl 5d8b4 <rtems_termios_ttyTail> 44dc6: 6700 02b6 beqw 4507e <rtems_termios_open+0x39c>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44dca: 486c 0014 pea %a4@(20) 44dce: 4bf9 0004 5a8c lea 45a8c <rtems_semaphore_create>,%a5 44dd4: 1039 0005 c2f0 moveb 5c2f0 <c.6230>,%d0 44dda: 42a7 clrl %sp@- 44ddc: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 44de0: 49c0 extbl %d0 44de2: 4878 0001 pea 1 <ADD> 44de6: 0080 5452 6900 oril #1414686976,%d0 44dec: 2f00 movel %d0,%sp@-
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
44dee: 2943 0010 movel %d3,%a4@(16)
tty->major = major;
44df2: 2942 000c movel %d2,%a4@(12)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44df6: 4e95 jsr %a5@
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)
44df8: 4fef 0014 lea %sp@(20),%sp 44dfc: 4a80 tstl %d0 44dfe: 6600 020c bnew 4500c <rtems_termios_open+0x32a>
rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
44e02: 486c 0018 pea %a4@(24) 44e06: 1039 0005 c2f0 moveb 5c2f0 <c.6230>,%d0 44e0c: 42a7 clrl %sp@- 44e0e: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 44e12: 49c0 extbl %d0 44e14: 4878 0001 pea 1 <ADD> 44e18: 0080 5452 6f00 oril #1414688512,%d0 44e1e: 2f00 movel %d0,%sp@- 44e20: 4e95 jsr %a5@
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)
44e22: 4fef 0014 lea %sp@(20),%sp 44e26: 4a80 tstl %d0 44e28: 6600 01e2 bnew 4500c <rtems_termios_open+0x32a>
rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
44e2c: 486c 008c pea %a4@(140) 44e30: 1039 0005 c2f0 moveb 5c2f0 <c.6230>,%d0 44e36: 42a7 clrl %sp@- 44e38: 4878 0020 pea 20 <OPER2+0xc> 44e3c: 49c0 extbl %d0 44e3e: 0080 5452 7800 oril #1414690816,%d0 44e44: 42a7 clrl %sp@- 44e46: 2f00 movel %d0,%sp@- 44e48: 4e95 jsr %a5@
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
44e4a: 4fef 0014 lea %sp@(20),%sp 44e4e: 4a80 tstl %d0 44e50: 6600 01ba bnew 4500c <rtems_termios_open+0x32a>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
44e54: 226e 0014 moveal %fp@(20),%a1 44e58: 41ec 0098 lea %a4@(152),%a0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44e5c: 7002 moveq #2,%d0
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
44e5e: 20d9 movel %a1@+,%a0@+ 44e60: 20d9 movel %a1@+,%a0@+ 44e62: 20d9 movel %a1@+,%a0@+ 44e64: 20d9 movel %a1@+,%a0@+ 44e66: 20d9 movel %a1@+,%a0@+ 44e68: 20d9 movel %a1@+,%a0@+ 44e6a: 20d9 movel %a1@+,%a0@+ 44e6c: 2091 movel %a1@,%a0@
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle;
44e6e: 42ac 0094 clrl %a4@(148)
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44e72: b0ac 00b4 cmpl %a4@(180),%d0 44e76: 6700 019c beqw 45014 <rtems_termios_open+0x332>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
44e7a: 4aac 00a0 tstl %a4@(160) 44e7e: 6700 0164 beqw 44fe4 <rtems_termios_open+0x302>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
44e82: 7202 moveq #2,%d1 44e84: b2ac 00b4 cmpl %a4@(180),%d1 44e88: 6700 015a beqw 44fe4 <rtems_termios_open+0x302>
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;
44e8c: 42ac 00b8 clrl %a4@(184)
/* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
44e90: 202c 0064 movel %a4@(100),%d0
tty->highwater = tty->rawInBuf.Size * 3/4;
44e94: 206c 0064 moveal %a4@(100),%a0
/* 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;
44e98: e288 lsrl #1,%d0
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
44e9a: 1239 0005 c2f0 moveb 5c2f0 <c.6230>,%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;
44ea0: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0
/* * Bump name characer */ if (c++ == 'z')
44ea4: 49c1 extbl %d1 44ea6: 2a41 moveal %d1,%a5 44ea8: 528d addql #1,%a5 44eaa: 2241 moveal %d1,%a1
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;
44eac: 2208 movel %a0,%d1 44eae: e489 lsrl #2,%d1
/* * 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;
44eb0: 307c 08bd moveaw #2237,%a0
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
44eb4: 3a0d movew %a5,%d5 44eb6: 13c5 0005 c2f0 moveb %d5,5c2f0 <c.6230>
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';
44ebc: 7a03 moveq #3,%d5
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;
44ebe: 2941 00c0 movel %d1,%a4@(192)
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';
44ec2: 1945 0041 moveb %d5,%a4@(65)
tty->termios.c_cc[VQUIT] = '\034';
44ec6: 7a1c moveq #28,%d5
/* 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;
44ec8: 2940 00bc movel %d0,%a4@(188)
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';
44ecc: 1945 0042 moveb %d5,%a4@(66)
tty->termios.c_cc[VERASE] = '\177';
44ed0: 7a7f moveq #127,%d5
/* * 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;
44ed2: 2948 0038 movel %a0,%a4@(56)
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';
44ed6: 1945 0043 moveb %d5,%a4@(67)
tty->termios.c_cc[VKILL] = '\025';
44eda: 7a15 moveq #21,%d5
tty->termios.c_cc[VEOF] = '\004';
44edc: 7204 moveq #4,%d1
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';
44ede: 1945 0044 moveb %d5,%a4@(68)
tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000';
44ee2: 4205 clrb %d5
tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021';
44ee4: 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';
44ee6: 1941 0045 moveb %d1,%a4@(69)
tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023';
44eea: 7213 moveq #19,%d1
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';
44eec: 1945 004c moveb %d5,%a4@(76)
tty->termios.c_cc[VEOL2] = '\000';
44ef0: 1945 0051 moveb %d5,%a4@(81)
tty->termios.c_cc[VSTART] = '\021';
44ef4: 1940 0049 moveb %d0,%a4@(73)
tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032';
44ef8: 7a1a moveq #26,%d5
tty->termios.c_cc[VREPRINT] = '\022';
44efa: 7012 moveq #18,%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';
44efc: 1941 004a moveb %d1,%a4@(74)
tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017';
44f00: 720f moveq #15,%d1
tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032';
44f02: 1945 004b moveb %d5,%a4@(75)
tty->termios.c_cc[VREPRINT] = '\022';
44f06: 1940 004d moveb %d0,%a4@(77)
tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027';
44f0a: 7a17 moveq #23,%d5
tty->termios.c_cc[VLNEXT] = '\026';
44f0c: 7016 moveq #22,%d0
tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017';
44f0e: 1941 004e moveb %d1,%a4@(78)
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
44f12: 223c 0000 2502 movel #9474,%d1
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';
44f18: 1945 004f moveb %d5,%a4@(79)
tty->termios.c_cc[VLNEXT] = '\026';
44f1c: 1940 0050 moveb %d0,%a4@(80)
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
44f20: 2941 0030 movel %d1,%a4@(48)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
44f24: 2a3c 0000 1805 movel #6149,%d5 44f2a: 2945 0034 movel %d5,%a4@(52)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
44f2e: 203c 0000 823b movel #33339,%d0
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
44f34: 323c 007a movew #122,%d1
* Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
44f38: 2940 003c movel %d0,%a4@(60)
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
44f3c: b289 cmpl %a1,%d1
44f3e: 6608 bnes 44f48 <rtems_termios_open+0x266> <== ALWAYS TAKEN
c = 'a';
44f40: 7a61 moveq #97,%d5 <== NOT EXECUTED 44f42: 13c5 0005 c2f0 moveb %d5,5c2f0 <c.6230> <== NOT EXECUTED
}
args->iop->data1 = tty;
if (!tty->refcount++) {
44f48: 202a 0008 movel %a2@(8),%d0 44f4c: 2200 movel %d0,%d1 44f4e: 5281 addql #1,%d1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
44f50: 2053 moveal %a3@,%a0
if (!tty->refcount++) {
44f52: 2541 0008 movel %d1,%a2@(8)
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
44f56: 214a 0034 movel %a2,%a0@(52)
if (!tty->refcount++) {
44f5a: 4a80 tstl %d0
44f5c: 661c bnes 44f7a <rtems_termios_open+0x298> if (tty->device.firstOpen)
44f5e: 206a 0098 moveal %a2@(152),%a0 44f62: 4a88 tstl %a0
44f64: 670c beqs 44f72 <rtems_termios_open+0x290> (*tty->device.firstOpen)(major, minor, arg);
44f66: 2f0b movel %a3,%sp@- 44f68: 2f03 movel %d3,%sp@- 44f6a: 2f02 movel %d2,%sp@- 44f6c: 4e90 jsr %a0@ 44f6e: 4fef 000c lea %sp@(12),%sp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44f72: 7a02 moveq #2,%d5 44f74: baaa 00b4 cmpl %a2@(180),%d5
44f78: 672c beqs 44fa6 <rtems_termios_open+0x2c4> <== NEVER TAKEN
(rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex);
44f7a: 2f39 0005 d8b0 movel 5d8b0 <rtems_termios_ttyMutex>,%sp@- 44f80: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
44f86: 588f addql #4,%sp
}
44f88: 2004 movel %d4,%d0 44f8a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 44f90: 4e5e unlk %fp 44f92: 4e75 rts
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) {
if ((tty->major == major) && (tty->minor == minor))
44f94: b6aa 0010 cmpl %a2@(16),%d3
44f98: 67ae beqs 44f48 <rtems_termios_open+0x266> <== ALWAYS TAKEN
*/
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) {
44f9a: 2452 moveal %a2@,%a2 <== NOT EXECUTED 44f9c: 4a8a tstl %a2 <== NOT EXECUTED 44f9e: 6600 fd7a bnew 44d1a <rtems_termios_open+0x38> <== NOT EXECUTED 44fa2: 6000 fd84 braw 44d28 <rtems_termios_open+0x46> <== NOT EXECUTED
(*tty->device.firstOpen)(major, minor, arg);
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(tty->rxTaskId,
44fa6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fa8: 487a 0202 pea %pc@(451ac <rtems_termios_rxdaemon>) <== NOT EXECUTED 44fac: 47f9 0004 61d8 lea 461d8 <rtems_task_start>,%a3 <== NOT EXECUTED 44fb2: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44fb6: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
44fb8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fbc: 4a80 tstl %d0 <== NOT EXECUTED 44fbe: 664c bnes 4500c <rtems_termios_open+0x32a> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
44fc0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fc2: 487a 0166 pea %pc@(4512a <rtems_termios_txdaemon>) <== NOT EXECUTED 44fc6: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44fca: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
44fcc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fd0: 4a80 tstl %d0 <== NOT EXECUTED 44fd2: 6638 bnes 4500c <rtems_termios_open+0x32a> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex);
44fd4: 2f39 0005 d8b0 movel 5d8b0 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 44fda: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
44fe0: 588f addql #4,%sp <== NOT EXECUTED 44fe2: 60a4 bras 44f88 <rtems_termios_open+0x2a6> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
44fe4: 486c 0068 pea %a4@(104) 44fe8: 1039 0005 c2f0 moveb 5c2f0 <c.6230>,%d0 44fee: 42a7 clrl %sp@- 44ff0: 4878 0024 pea 24 <OPER2+0x10> 44ff4: 49c0 extbl %d0 44ff6: 0080 5452 7200 oril #1414689280,%d0 44ffc: 42a7 clrl %sp@- 44ffe: 2f00 movel %d0,%sp@- 45000: 4e95 jsr %a5@
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
45002: 4fef 0014 lea %sp@(20),%sp 45006: 4a80 tstl %d0 45008: 6700 fe82 beqw 44e8c <rtems_termios_open+0x1aa>
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
4500c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4500e: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
45014: 486c 00c8 pea %a4@(200) <== NOT EXECUTED 45018: 41f9 0004 5f24 lea 45f24 <rtems_task_create>,%a0 <== NOT EXECUTED 4501e: 1039 0005 c2f0 moveb 5c2f0 <c.6230>,%d0 <== NOT EXECUTED 45024: 42a7 clrl %sp@- <== NOT EXECUTED 45026: 4878 0500 pea 500 <DBL_MAX_EXP+0xff> <== NOT EXECUTED 4502a: 49c0 extbl %d0 <== NOT EXECUTED 4502c: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED 45030: 4878 000a pea a <LASTO> <== NOT EXECUTED 45034: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 4503a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4503c: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 45040: 4e90 jsr %a0@ <== 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)
45042: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 45046: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4504a: 4a80 tstl %d0 <== NOT EXECUTED 4504c: 66be bnes 4500c <rtems_termios_open+0x32a> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_create (
4504e: 486c 00c4 pea %a4@(196) <== NOT EXECUTED 45052: 1039 0005 c2f0 moveb 5c2f0 <c.6230>,%d0 <== NOT EXECUTED 45058: 42a7 clrl %sp@- <== NOT EXECUTED 4505a: 4878 0500 pea 500 <DBL_MAX_EXP+0xff> <== NOT EXECUTED 4505e: 49c0 extbl %d0 <== NOT EXECUTED 45060: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED 45064: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED 45068: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 4506e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45070: 4e90 jsr %a0@ <== 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)
45072: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45076: 4a80 tstl %d0 <== NOT EXECUTED 45078: 6700 fe00 beqw 44e7a <rtems_termios_open+0x198> <== NOT EXECUTED 4507c: 608e bras 4500c <rtems_termios_open+0x32a> <== NOT EXECUTED
tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty;
4507e: 23cc 0005 d8b4 movel %a4,5d8b4 <rtems_termios_ttyTail> 45084: 6000 fd44 braw 44dca <rtems_termios_open+0xe8>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
45088: 2f39 0005 d8b0 movel 5d8b0 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 4508e: 781a moveq #26,%d4 <== NOT EXECUTED 45090: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
45096: 588f addql #4,%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; }
45098: 2004 movel %d4,%d0 <== NOT EXECUTED 4509a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450a0: 4e5e unlk %fp <== NOT EXECUTED 450a2: 4e75 rts <== 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);
450a4: 2f0c movel %a4,%sp@- <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
450a6: 781a moveq #26,%d4 <== 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);
450a8: 4eb9 0004 a584 jsr 4a584 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
450ae: 2f39 0005 d8b0 movel 5d8b0 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 450b4: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
450ba: 508f addql #8,%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; }
450bc: 2004 movel %d4,%d0 <== NOT EXECUTED 450be: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450c4: 4e5e unlk %fp <== NOT EXECUTED 450c6: 4e75 rts <== 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));
450c8: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 450cc: 45f9 0004 a584 lea 4a584 <free>,%a2 <== NOT EXECUTED
free(tty); rtems_semaphore_release (rtems_termios_ttyMutex);
450d2: 781a moveq #26,%d4 <== 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));
450d4: 4e92 jsr %a2@ <== NOT EXECUTED
free(tty);
450d6: 2f0c movel %a4,%sp@- <== NOT EXECUTED 450d8: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
450da: 2f39 0005 d8b0 movel 5d8b0 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 450e0: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
450e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; }
450ea: 2004 movel %d4,%d0 <== NOT EXECUTED 450ec: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450f2: 4e5e unlk %fp <== NOT EXECUTED 450f4: 4e75 rts <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
450f6: 2f2c 007c movel %a4@(124),%sp@- <== NOT EXECUTED 450fa: 45f9 0004 a584 lea 4a584 <free>,%a2 <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex);
45100: 781a moveq #26,%d4 <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
45102: 4e92 jsr %a2@ <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
45104: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 45108: 4e92 jsr %a2@ <== NOT EXECUTED
free(tty);
4510a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4510c: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
4510e: 2f39 0005 d8b0 movel 5d8b0 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 45114: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
4511a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; }
4511e: 2004 movel %d4,%d0 <== NOT EXECUTED 45120: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45126: 4e5e unlk %fp <== NOT EXECUTED
00043ac4 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
43ac4: 4e56 ffdc linkw %fp,#-36 43ac8: 202e 0008 movel %fp@(8),%d0 43acc: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 43ad0: 242e 000c movel %fp@(12),%d2
const unsigned char *buf = _buf;
43ad4: 2840 moveal %d0,%a4
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
43ad6: 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) {
43ada: 4aaa 00b4 tstl %a2@(180) 43ade: 6700 00e8 beqw 43bc8 <rtems_termios_puts+0x104>
(*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head;
43ae2: 2c2a 0080 movel %a2@(128),%d6
while (len) {
43ae6: 4a82 tstl %d2 43ae8: 6700 00d4 beqw 43bbe <rtems_termios_puts+0xfa>
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
43aec: 222a 0088 movel %a2@(136),%d1 43af0: 5286 addql #1,%d6
rtems_interrupt_disable (level);
43af2: 2a3c 0000 0700 movel #1792,%d5 43af8: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3 43afe: 2005 movel %d5,%d0
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
43b00: 4c41 6007 remul %d1,%d7,%d6 43b04: 2c07 movel %d7,%d6
rtems_interrupt_disable (level);
43b06: 40c3 movew %sr,%d3 43b08: 8083 orl %d3,%d0 43b0a: 46c0 movew %d0,%sr
while (newHead == tty->rawOutBuf.Tail) {
43b0c: 282a 0084 movel %a2@(132),%d4 43b10: be84 cmpl %d4,%d7
43b12: 662c bnes 43b40 <rtems_termios_puts+0x7c> tty->rawOutBufState = rob_wait;
43b14: 7002 moveq #2,%d0 43b16: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
43b1a: 46c3 movew %d3,%sr
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
43b1c: 42a7 clrl %sp@- 43b1e: 42a7 clrl %sp@- 43b20: 2f2a 008c movel %a2@(140),%sp@- 43b24: 4e93 jsr %a3@
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
43b26: 4fef 000c lea %sp@(12),%sp 43b2a: 4a80 tstl %d0 43b2c: 6600 00b6 bnew 43be4 <rtems_termios_puts+0x120>
rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level);
43b30: 2005 movel %d5,%d0 43b32: 40c3 movew %sr,%d3 43b34: 8083 orl %d3,%d0 43b36: 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) {
43b38: 202a 0084 movel %a2@(132),%d0 43b3c: b880 cmpl %d0,%d4
43b3e: 67d4 beqs 43b14 <rtems_termios_puts+0x50> <== NEVER TAKEN
RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
43b40: 202a 0080 movel %a2@(128),%d0 43b44: 206a 007c moveal %a2@(124),%a0 43b48: 1194 0800 moveb %a4@,%a0@(00000000,%d0:l)
tty->rawOutBuf.Head = newHead;
43b4c: 2547 0080 movel %d7,%a2@(128)
if (tty->rawOutBufState == rob_idle) {
43b50: 4aaa 0094 tstl %a2@(148)
43b54: 661c bnes 43b72 <rtems_termios_puts+0xae>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
43b56: 202a 00b8 movel %a2@(184),%d0 43b5a: 0800 0004 btst #4,%d0
43b5e: 673a beqs 43b9a <rtems_termios_puts+0xd6> <== ALWAYS TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
43b60: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43b64: 7220 moveq #32,%d1 <== NOT EXECUTED 43b66: 8081 orl %d1,%d0 <== NOT EXECUTED 43b68: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
} tty->rawOutBufState = rob_busy;
43b6c: 7001 moveq #1,%d0 <== NOT EXECUTED 43b6e: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED
} rtems_interrupt_enable (level);
43b72: 46c3 movew %d3,%sr
len--;
43b74: 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) {
43b76: 6746 beqs 43bbe <rtems_termios_puts+0xfa>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
43b78: 222a 0088 movel %a2@(136),%d1 43b7c: 5286 addql #1,%d6
RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
43b7e: 528c addql #1,%a4
* * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level);
43b80: 2005 movel %d5,%d0
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
43b82: 4c41 6007 remul %d1,%d7,%d6 43b86: 2c07 movel %d7,%d6
rtems_interrupt_disable (level);
43b88: 40c3 movew %sr,%d3 43b8a: 8083 orl %d3,%d0 43b8c: 46c0 movew %d0,%sr
while (newHead == tty->rawOutBuf.Tail) {
43b8e: 282a 0084 movel %a2@(132),%d4 43b92: be84 cmpl %d4,%d7 43b94: 6700 ff7e beqw 43b14 <rtems_termios_puts+0x50> 43b98: 60a6 bras 43b40 <rtems_termios_puts+0x7c>
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,
43b9a: 4878 0001 pea 1 <ADD>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
43b9e: 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,
43ba2: d0aa 007c addl %a2@(124),%d0 43ba6: 2f00 movel %d0,%sp@- 43ba8: 2f2a 0010 movel %a2@(16),%sp@- 43bac: 206a 00a4 moveal %a2@(164),%a0 43bb0: 4e90 jsr %a0@ 43bb2: 4fef 000c lea %sp@(12),%sp
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
43bb6: 7001 moveq #1,%d0 43bb8: 2540 0094 movel %d0,%a2@(148) 43bbc: 60b4 bras 43b72 <rtems_termios_puts+0xae>
} rtems_interrupt_enable (level); len--; } }
43bbe: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 43bc4: 4e5e unlk %fp 43bc6: 4e75 rts
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);
43bc8: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 43bcc: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 43bd2: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } }
43bd6: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%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);
43bdc: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } }
43be0: 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);
43be2: 4ed1 jmp %a1@ <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
43be4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43be6: 4eb9 0004 6450 jsr 46450 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004441e <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
4441e: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 44422: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 44426: 2a6e 0008 moveal %fp@(8),%a5 <== 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);
4442a: 2c3c 0004 5d2c movel #285996,%d6 <== 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;
44430: 2055 moveal %a5@,%a0 <== NOT EXECUTED 44432: 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);
44436: 2046 moveal %d6,%a0 <== NOT EXECUTED 44438: 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;
4443a: 262d 0010 movel %a5@(16),%d3 <== NOT EXECUTED
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4443e: 42a7 clrl %sp@- <== NOT EXECUTED 44440: 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;
44444: 286d 000c moveal %a5@(12),%a4 <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44448: 4e90 jsr %a0@ <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
4444a: 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);
4444e: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
44450: 662e bnes 44480 <rtems_termios_read+0x62> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
44452: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44456: 41f9 0005 d068 lea 5d068 <rtems_termios_linesw>,%a0 <== NOT EXECUTED 4445c: eb88 lsll #5,%d0 <== NOT EXECUTED 4445e: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 44462: 4a88 tstl %a0 <== NOT EXECUTED 44464: 6726 beqs 4448c <rtems_termios_read+0x6e> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
44466: 2f0d movel %a5,%sp@- <== NOT EXECUTED 44468: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4446a: 4e90 jsr %a0@ <== NOT EXECUTED 4446c: 2a00 movel %d0,%d5 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
4446e: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
44472: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 44476: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
4447c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; }
44480: 2005 movel %d5,%d0 <== NOT EXECUTED 44482: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44488: 4e5e unlk %fp <== NOT EXECUTED 4448a: 4e75 rts <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
4448c: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 44490: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 44494: 674e beqs 444e4 <rtems_termios_read+0xc6> <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
44496: 4a83 tstl %d3 <== NOT EXECUTED 44498: 6724 beqs 444be <rtems_termios_read+0xa0> <== NOT EXECUTED 4449a: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 4449e: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 444a2: 6c1a bges 444be <rtems_termios_read+0xa0> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
444a4: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
count--;
444a8: 5383 subql #1,%d3 <== 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++];
444aa: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+ <== NOT EXECUTED 444ae: 5280 addql #1,%d0 <== NOT EXECUTED 444b0: 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)) {
444b4: 4a83 tstl %d3 <== NOT EXECUTED 444b6: 6706 beqs 444be <rtems_termios_read+0xa0> <== NOT EXECUTED 444b8: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 444bc: 6de6 blts 444a4 <rtems_termios_read+0x86> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count;
444be: 202d 0010 movel %a5@(16),%d0 <== NOT EXECUTED 444c2: 9083 subl %d3,%d0 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
444c4: 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;
444c8: 2b40 0018 movel %d0,%a5@(24) <== NOT EXECUTED
tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem);
444cc: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 444d0: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
444d6: 588f addql #4,%sp <== NOT EXECUTED
}
444d8: 2005 movel %d5,%d0 <== NOT EXECUTED 444da: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 444e0: 4e5e unlk %fp <== NOT EXECUTED 444e2: 4e75 rts <== NOT EXECUTED
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
444e4: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
444e8: 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;
444ee: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED 444f2: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED
tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
444f6: 4a88 tstl %a0 <== NOT EXECUTED 444f8: 6708 beqs 44502 <rtems_termios_read+0xe4> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
444fa: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 444fe: 6700 015e beqw 4465e <rtems_termios_read+0x240> <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
44502: 222a 005c movel %a2@(92),%d1 <== 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,
44506: 41ea 0049 lea %a2@(73),%a0 <== NOT EXECUTED 4450a: 7801 moveq #1,%d4 <== NOT EXECUTED 4450c: 47fa fd4e lea %pc@(4425c <siproc>),%a3 <== 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;
44510: 242a 0074 movel %a2@(116),%d2 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
44514: 202a 0060 movel %a2@(96),%d0 <== 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,
44518: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
4451c: b081 cmpl %d1,%d0 <== NOT EXECUTED 4451e: 6700 00bc beqw 445dc <rtems_termios_read+0x1be> <== NOT EXECUTED 44522: 2039 0005 c2e4 movel 5c2e4 <rtems_termios_cbufsize>,%d0 <== NOT EXECUTED 44528: 5380 subql #1,%d0 <== NOT EXECUTED 4452a: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 4452e: 6f00 00ac blew 445dc <rtems_termios_read+0x1be> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
44532: 242a 005c movel %a2@(92),%d2 <== NOT EXECUTED 44536: 5282 addql #1,%d2 <== NOT EXECUTED 44538: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
4453c: 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;
44540: 4c40 2001 remul %d0,%d1,%d2 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
44544: 1430 1800 moveb %a0@(00000000,%d1:l),%d2 <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
44548: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
4454c: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44550: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 44554: d088 addl %a0,%d0 <== NOT EXECUTED 44556: 9081 subl %d1,%d0 <== NOT EXECUTED 44558: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 4455c: 4c41 0007 remul %d1,%d7,%d0 <== NOT EXECUTED 44560: beaa 00bc cmpl %a2@(188),%d7 <== NOT EXECUTED 44564: 6446 bccs 445ac <rtems_termios_read+0x18e> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
44566: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4456a: 72fe moveq #-2,%d1 <== NOT EXECUTED 4456c: c081 andl %d1,%d0 <== NOT EXECUTED 4456e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
44572: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44576: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 4457c: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 44582: 6700 0086 beqw 4460a <rtems_termios_read+0x1ec> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
44586: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4458a: 0800 0008 btst #8,%d0 <== NOT EXECUTED 4458e: 671c beqs 445ac <rtems_termios_read+0x18e> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
44590: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 44594: 7efb moveq #-5,%d7 <== NOT EXECUTED 44596: c287 andl %d7,%d1 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
44598: 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;
4459c: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
445a0: 4a88 tstl %a0 <== NOT EXECUTED 445a2: 6708 beqs 445ac <rtems_termios_read+0x18e> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
445a4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 445a8: 4e90 jsr %a0@ <== NOT EXECUTED 445aa: 588f addql #4,%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
445ac: 7002 moveq #2,%d0 <== NOT EXECUTED 445ae: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 445b2: 6700 0088 beqw 4463c <rtems_termios_read+0x21e> <== NOT EXECUTED
if (siproc (c, tty))
445b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 445b8: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 445be: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445c0: 4e93 jsr %a3@ <== NOT EXECUTED 445c2: 508f addql #8,%sp <== NOT EXECUTED 445c4: 4a80 tstl %d0 <== NOT EXECUTED 445c6: 6702 beqs 445ca <rtems_termios_read+0x1ac> <== NOT EXECUTED
wait = 0;
}
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
445c8: 4284 clrl %d4 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
445ca: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
445ce: 242a 0070 movel %a2@(112),%d2 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
445d2: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 445d6: b081 cmpl %d1,%d0 <== NOT EXECUTED 445d8: 6600 ff48 bnew 44522 <rtems_termios_read+0x104> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
445dc: 4a84 tstl %d4 <== NOT EXECUTED 445de: 6700 feb6 beqw 44496 <rtems_termios_read+0x78> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
445e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445e4: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 445e8: 2046 moveal %d6,%a0 <== NOT EXECUTED 445ea: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 445ee: 4e90 jsr %a0@ <== NOT EXECUTED
tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL)
445f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 445f4: 4a80 tstl %d0 <== NOT EXECUTED 445f6: 6600 fe9e bnew 44496 <rtems_termios_read+0x78> <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
445fa: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 445fe: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44602: b081 cmpl %d1,%d0 <== NOT EXECUTED 44604: 6600 ff1c bnew 44522 <rtems_termios_read+0x104> <== NOT EXECUTED 44608: 60d2 bras 445dc <rtems_termios_read+0x1be> <== 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))
4460a: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4460e: 670c beqs 4461c <rtems_termios_read+0x1fe> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
44610: 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))
44614: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44618: 6700 ff6c beqw 44586 <rtems_termios_read+0x168> <== 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,
4461c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44620: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 44624: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44628: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4462c: 4e90 jsr %a0@ <== NOT EXECUTED 4462e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
44632: 7002 moveq #2,%d0 <== NOT EXECUTED 44634: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44638: 6600 ff7c bnew 445b6 <rtems_termios_read+0x198> <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
4463c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4463e: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44644: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44646: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
44648: 508f addql #8,%sp <== NOT EXECUTED 4464a: 4280 clrl %d0 <== NOT EXECUTED 4464c: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 44650: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44654: 6e00 ff74 bgtw 445ca <rtems_termios_read+0x1ac> <== NOT EXECUTED 44658: 4284 clrl %d4 <== NOT EXECUTED 4465a: 6000 ff6e braw 445ca <rtems_termios_read+0x1ac> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4465e: 7002 moveq #2,%d0 <== NOT EXECUTED 44660: 47fa fbfa lea %pc@(4425c <siproc>),%a3 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
44664: 243c 0004 6294 movel #287380,%d2 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4466a: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 4466e: 6728 beqs 44698 <rtems_termios_read+0x27a> <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
44670: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44674: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
44676: 588f addql #4,%sp <== NOT EXECUTED 44678: 4a80 tstl %d0 <== NOT EXECUTED 4467a: 6d00 00b8 bltw 44734 <rtems_termios_read+0x316> <== NOT EXECUTED
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
4467e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44680: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44686: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44688: 4e93 jsr %a3@ <== NOT EXECUTED 4468a: 508f addql #8,%sp <== NOT EXECUTED 4468c: 4a80 tstl %d0 <== NOT EXECUTED 4468e: 6600 fe06 bnew 44496 <rtems_termios_read+0x78> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
44692: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 44696: 60d8 bras 44670 <rtems_termios_read+0x252> <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
44698: 283c 0004 55fc movel #284156,%d4 <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
4469e: 243c 0004 6294 movel #287380,%d2 <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
446a4: 2044 moveal %d4,%a0 <== NOT EXECUTED 446a6: 4e90 jsr %a0@ <== NOT EXECUTED 446a8: 2c00 movel %d0,%d6 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
446aa: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 446ae: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 446b2: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
446b4: 588f addql #4,%sp <== NOT EXECUTED 446b6: 4a80 tstl %d0 <== NOT EXECUTED 446b8: 6d38 blts 446f2 <rtems_termios_read+0x2d4> <== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
446ba: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446bc: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 446c2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 446c4: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
446c6: 508f addql #8,%sp <== NOT EXECUTED 446c8: 4281 clrl %d1 <== NOT EXECUTED 446ca: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 446ce: 1200 moveb %d0,%d1 <== NOT EXECUTED 446d0: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 446d4: 6f00 fdc0 blew 44496 <rtems_termios_read+0x78> <== NOT EXECUTED
break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
446d8: 4a00 tstb %d0 <== NOT EXECUTED 446da: 67ce beqs 446aa <rtems_termios_read+0x28c> <== NOT EXECUTED 446dc: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 446e0: 66c2 bnes 446a4 <rtems_termios_read+0x286> <== NOT EXECUTED
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
446e2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 446e6: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 446ea: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
446ec: 588f addql #4,%sp <== NOT EXECUTED 446ee: 4a80 tstl %d0 <== NOT EXECUTED 446f0: 6cc8 bges 446ba <rtems_termios_read+0x29c> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
446f2: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 446f6: 6718 beqs 44710 <rtems_termios_read+0x2f2> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
446f8: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 446fc: 6706 beqs 44704 <rtems_termios_read+0x2e6> <== NOT EXECUTED 446fe: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 44702: 6614 bnes 44718 <rtems_termios_read+0x2fa> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
44704: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44708: 2042 moveal %d2,%a0 <== NOT EXECUTED 4470a: 4e90 jsr %a0@ <== NOT EXECUTED 4470c: 588f addql #4,%sp <== NOT EXECUTED 4470e: 609a bras 446aa <rtems_termios_read+0x28c> <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
44710: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44714: 6700 fd80 beqw 44496 <rtems_termios_read+0x78> <== NOT EXECUTED
break; now = rtems_clock_get_ticks_since_boot();
44718: 2044 moveal %d4,%a0 <== NOT EXECUTED 4471a: 4e90 jsr %a0@ <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
4471c: 9086 subl %d6,%d0 <== NOT EXECUTED 4471e: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 44722: 6200 fd72 bhiw 44496 <rtems_termios_read+0x78> <== NOT EXECUTED
break; } } rtems_task_wake_after (1);
44726: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4472a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4472c: 4e90 jsr %a0@ <== NOT EXECUTED 4472e: 588f addql #4,%sp <== NOT EXECUTED 44730: 6000 ff78 braw 446aa <rtems_termios_read+0x28c> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
44734: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44738: 2042 moveal %d2,%a0 <== NOT EXECUTED 4473a: 4e90 jsr %a0@ <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4473c: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
44740: 588f addql #4,%sp <== NOT EXECUTED 44742: 6000 ff2c braw 44670 <rtems_termios_read+0x252> <== NOT EXECUTED
0004357c <rtems_termios_refill_transmitter>:
* 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)
{
4357c: 4e56 fff4 linkw %fp,#-12 43580: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43584: 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))
43588: 202a 00b8 movel %a2@(184),%d0 4358c: 0280 0000 0403 andil #1027,%d0 43592: 0c80 0000 0401 cmpil #1025,%d0 43598: 6700 0140 beqw 436da <rtems_termios_refill_transmitter+0x15e>
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
4359c: 202a 00b8 movel %a2@(184),%d0 435a0: 7603 moveq #3,%d3 435a2: 7202 moveq #2,%d1 435a4: c083 andl %d3,%d0 435a6: b280 cmpl %d0,%d1 435a8: 6700 0172 beqw 4371c <rtems_termios_refill_transmitter+0x1a0>
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
435ac: 222a 0080 movel %a2@(128),%d1 435b0: 202a 0084 movel %a2@(132),%d0 435b4: b081 cmpl %d1,%d0 435b6: 6700 009c beqw 43654 <rtems_termios_refill_transmitter+0xd8>
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
435ba: 203c 0000 0700 movel #1792,%d0 435c0: 40c2 movew %sr,%d2 435c2: 8082 orl %d2,%d0 435c4: 46c0 movew %d0,%sr
len = tty->t_dqlen;
435c6: 222a 0090 movel %a2@(144),%d1
tty->t_dqlen = 0;
435ca: 42aa 0090 clrl %a2@(144)
rtems_interrupt_enable(level);
435ce: 46c2 movew %d2,%sr
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
435d0: 202a 0084 movel %a2@(132),%d0 435d4: d280 addl %d0,%d1 435d6: 202a 0088 movel %a2@(136),%d0 435da: 4c40 1002 remul %d0,%d2,%d1
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
435de: 7002 moveq #2,%d0
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
435e0: 2542 0084 movel %d2,%a2@(132)
if (tty->rawOutBufState == rob_wait) {
435e4: b0aa 0094 cmpl %a2@(148),%d0 435e8: 6700 00d8 beqw 436c2 <rtems_termios_refill_transmitter+0x146>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
435ec: 202a 0080 movel %a2@(128),%d0 435f0: b480 cmpl %d0,%d2
435f2: 6778 beqs 4366c <rtems_termios_refill_transmitter+0xf0>
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
435f4: 202a 00b8 movel %a2@(184),%d0 435f8: 0280 0000 0210 andil #528,%d0 435fe: 0c80 0000 0210 cmpil #528,%d0 43604: 6700 015a beqw 43760 <rtems_termios_refill_transmitter+0x1e4>
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
43608: 202a 0080 movel %a2@(128),%d0 4360c: b082 cmpl %d2,%d0
4360e: 647e bccs 4368e <rtems_termios_refill_transmitter+0x112> nToSend = tty->rawOutBuf.Size - newTail;
43610: 262a 0088 movel %a2@(136),%d3 43614: 9682 subl %d2,%d3
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
43616: 202a 00b8 movel %a2@(184),%d0 4361a: 0280 0000 0600 andil #1536,%d0
43620: 677e beqs 436a0 <rtems_termios_refill_transmitter+0x124><== ALWAYS TAKEN
43622: 7001 moveq #1,%d0 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/
43624: 7201 moveq #1,%d1 <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
43626: 7601 moveq #1,%d3 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor,
43628: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4362a: 202a 007c movel %a2@(124),%d0 <== NOT EXECUTED 4362e: d082 addl %d2,%d0 <== NOT EXECUTED 43630: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43632: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43636: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
/* 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*/
4363a: 2541 0094 movel %d1,%a2@(148) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
4363e: 4e90 jsr %a0@ <== NOT EXECUTED 43640: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
43644: 2542 0084 movel %d2,%a2@(132)
} return nToSend; }
43648: 2003 movel %d3,%d0 4364a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43650: 4e5e unlk %fp 43652: 4e75 rts
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
43654: 7602 moveq #2,%d3 <== NOT EXECUTED 43656: b6aa 0094 cmpl %a2@(148),%d3 <== NOT EXECUTED 4365a: 6700 012e beqw 4378a <rtems_termios_refill_transmitter+0x20e><== NOT EXECUTED 4365e: 4203 clrb %d3 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
43660: 2003 movel %d3,%d0 <== NOT EXECUTED 43662: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43668: 4e5e unlk %fp <== NOT EXECUTED 4366a: 4e75 rts <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
4366c: 206a 00d4 moveal %a2@(212),%a0
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
43670: 42aa 0094 clrl %a2@(148)
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
43674: 4a88 tstl %a0 43676: 6700 012c beqw 437a4 <rtems_termios_refill_transmitter+0x228>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
4367a: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 4367e: 4283 clrl %d3 <== NOT EXECUTED 43680: 486a 0030 pea %a2@(48) <== NOT EXECUTED 43684: 4e90 jsr %a0@ <== NOT EXECUTED 43686: 508f addql #8,%sp <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
43688: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED 4368c: 60ba bras 43648 <rtems_termios_refill_transmitter+0xcc><== NOT EXECUTED
* Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail;
4368e: 262a 0080 movel %a2@(128),%d3 43692: 9682 subl %d2,%d3
/* 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)) {
43694: 202a 00b8 movel %a2@(184),%d0 43698: 0280 0000 0600 andil #1536,%d0
4369e: 6682 bnes 43622 <rtems_termios_refill_transmitter+0xa6><== NEVER TAKEN
436a0: 2003 movel %d3,%d0
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/
436a2: 7201 moveq #1,%d1
(*tty->device.write)(tty->minor,
436a4: 2f00 movel %d0,%sp@- 436a6: 202a 007c movel %a2@(124),%d0 436aa: d082 addl %d2,%d0 436ac: 2f00 movel %d0,%sp@- 436ae: 2f2a 0010 movel %a2@(16),%sp@- 436b2: 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*/
436b6: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(tty->minor,
436ba: 4e90 jsr %a0@ 436bc: 4fef 000c lea %sp@(12),%sp 436c0: 6082 bras 43644 <rtems_termios_refill_transmitter+0xc8>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
436c2: 2f2a 008c movel %a2@(140),%sp@- 436c6: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
436cc: 202a 0080 movel %a2@(128),%d0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
436d0: 588f addql #4,%sp
}
if (newTail == tty->rawOutBuf.Head) {
436d2: b480 cmpl %d0,%d2 436d4: 6600 ff1e bnew 435f4 <rtems_termios_refill_transmitter+0x78> 436d8: 6092 bras 4366c <rtems_termios_refill_transmitter+0xf0>
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
436da: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 436de: 486a 004a pea %a2@(74) <== NOT EXECUTED 436e2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 436e6: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 436ea: 4e90 jsr %a0@ <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
436ec: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 436f2: 40c1 movew %sr,%d1 <== NOT EXECUTED 436f4: 8081 orl %d1,%d0 <== NOT EXECUTED 436f6: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF;
436f8: 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--;
436fa: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
436fe: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43702: 8082 orl %d2,%d0 <== NOT EXECUTED 43704: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
43708: 46c1 movew %d1,%sr <== NOT EXECUTED 4370a: 7601 moveq #1,%d3 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
4370c: 2003 movel %d3,%d0 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
4370e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
43712: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43718: 4e5e unlk %fp <== NOT EXECUTED 4371a: 4e75 rts <== NOT EXECUTED
* FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor,
4371c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43720: 486a 0049 pea %a2@(73) <== NOT EXECUTED 43724: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43728: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4372c: 4e90 jsr %a0@ <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
4372e: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 43734: 40c1 movew %sr,%d1 <== NOT EXECUTED 43736: 8081 orl %d1,%d0 <== NOT EXECUTED 43738: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF;
4373a: 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--;
4373c: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
43740: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43744: c082 andl %d2,%d0 <== NOT EXECUTED 43746: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
4374a: 46c1 movew %d1,%sr <== NOT EXECUTED 4374c: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
43750: 2003 movel %d3,%d0 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
43752: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
43756: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4375c: 4e5e unlk %fp <== NOT EXECUTED 4375e: 4e75 rts <== NOT EXECUTED
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
43760: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 43764: 40c1 movew %sr,%d1 <== NOT EXECUTED 43766: 8081 orl %d1,%d0 <== NOT EXECUTED 43768: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
4376a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4376e: 7620 moveq #32,%d3 <== NOT EXECUTED 43770: 8083 orl %d3,%d0 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
43772: 163c 0001 moveb #1,%d3 <== 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;
43776: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
4377a: 2543 0094 movel %d3,%a2@(148) <== NOT EXECUTED
rtems_interrupt_enable(level);
4377e: 46c1 movew %d1,%sr <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
43780: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED
/* 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; tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level);
43784: 4203 clrb %d3 <== NOT EXECUTED 43786: 6000 fec0 braw 43648 <rtems_termios_refill_transmitter+0xcc><== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
4378a: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 4378e: 4283 clrl %d3 <== NOT EXECUTED 43790: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED 43796: 588f addql #4,%sp <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
43798: 2003 movel %d3,%d0 <== NOT EXECUTED 4379a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 437a0: 4e5e unlk %fp <== NOT EXECUTED 437a2: 4e75 rts <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
437a4: 2542 0084 movel %d2,%a2@(132)
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
437a8: 4283 clrl %d3 437aa: 6000 fe9c braw 43648 <rtems_termios_refill_transmitter+0xcc>
000451ac <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
451ac: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 451b0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 451b4: 240e movel %fp,%d2 <== NOT EXECUTED 451b6: 260e movel %fp,%d3 <== NOT EXECUTED 451b8: 5d82 subql #6,%d2 <== NOT EXECUTED 451ba: 47f9 0004 566c lea 4566c <rtems_event_receive>,%a3 <== NOT EXECUTED 451c0: 4bf9 0004 606c lea 4606c <rtems_task_delete>,%a5 <== NOT EXECUTED 451c6: 5383 subql #1,%d3 <== NOT EXECUTED 451c8: 49f9 0004 380c lea 4380c <rtems_termios_enqueue_raw_characters>,%a4<== NOT EXECUTED 451ce: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
451d2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 451d4: 42a7 clrl %sp@- <== NOT EXECUTED 451d6: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 451da: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 451de: 4e93 jsr %a3@ <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
451e0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 451e4: 7001 moveq #1,%d0 <== NOT EXECUTED 451e6: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 451ea: 663e bnes 4522a <rtems_termios_rxdaemon+0x7e> <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
451ec: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 451f0: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 451f4: 4e90 jsr %a0@ <== NOT EXECUTED
if (c != EOF) {
451f6: 588f addql #4,%sp <== NOT EXECUTED 451f8: 72ff moveq #-1,%d1 <== NOT EXECUTED 451fa: b280 cmpl %d0,%d1 <== NOT EXECUTED 451fc: 67d4 beqs 451d2 <rtems_termios_rxdaemon+0x26> <== NOT EXECUTED
/* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
451fe: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
45202: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
45206: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45208: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4520a: 4e94 jsr %a4@ <== NOT EXECUTED 4520c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
45210: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45212: 42a7 clrl %sp@- <== NOT EXECUTED 45214: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 45218: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 4521c: 4e93 jsr %a3@ <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
4521e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45222: 7001 moveq #1,%d0 <== NOT EXECUTED 45224: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 45228: 67c2 beqs 451ec <rtems_termios_rxdaemon+0x40> <== NOT EXECUTED
tty->rxTaskId = 0;
4522a: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
4522e: 42a7 clrl %sp@- <== NOT EXECUTED 45230: 4e95 jsr %a5@ <== NOT EXECUTED 45232: 588f addql #4,%sp <== NOT EXECUTED 45234: 609c bras 451d2 <rtems_termios_rxdaemon+0x26> <== NOT EXECUTED
...
00043560 <rtems_termios_rxirq_occured>:
* 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)
{
43560: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43564: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
/* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
43568: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 4356c: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 43570: 4eb9 0004 5814 jsr 45814 <rtems_event_send> <== NOT EXECUTED 43576: 508f addql #8,%sp <== NOT EXECUTED
}
43578: 4e5e unlk %fp <== NOT EXECUTED
0004512a <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
4512a: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4512e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 45132: 240e movel %fp,%d2 <== NOT EXECUTED 45134: 5982 subql #4,%d2 <== NOT EXECUTED 45136: 47f9 0004 566c lea 4566c <rtems_event_receive>,%a3 <== NOT EXECUTED 4513c: 4bf9 0004 606c lea 4606c <rtems_task_delete>,%a5 <== NOT EXECUTED 45142: 49f9 0004 357c lea 4357c <rtems_termios_refill_transmitter>,%a4<== NOT EXECUTED 45148: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
4514c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4514e: 42a7 clrl %sp@- <== NOT EXECUTED 45150: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 45154: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 45158: 4e93 jsr %a3@ <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
4515a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4515e: 7001 moveq #1,%d0 <== NOT EXECUTED 45160: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 45164: 663a bnes 451a0 <rtems_termios_txdaemon+0x76> <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
45166: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 4516a: eb88 lsll #5,%d0 <== NOT EXECUTED 4516c: 0680 0005 d07c addil #381052,%d0 <== NOT EXECUTED 45172: 2240 moveal %d0,%a1 <== NOT EXECUTED 45174: 2051 moveal %a1@,%a0 <== NOT EXECUTED 45176: 4a88 tstl %a0 <== NOT EXECUTED 45178: 6706 beqs 45180 <rtems_termios_txdaemon+0x56> <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
4517a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4517c: 4e90 jsr %a0@ <== NOT EXECUTED 4517e: 588f addql #4,%sp <== NOT EXECUTED
} /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty);
45180: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45182: 4e94 jsr %a4@ <== NOT EXECUTED 45184: 588f addql #4,%sp <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
45186: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45188: 42a7 clrl %sp@- <== NOT EXECUTED 4518a: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 4518e: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 45192: 4e93 jsr %a3@ <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
45194: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45198: 7001 moveq #1,%d0 <== NOT EXECUTED 4519a: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 4519e: 67c6 beqs 45166 <rtems_termios_txdaemon+0x3c> <== NOT EXECUTED
tty->txTaskId = 0;
451a0: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
451a4: 42a7 clrl %sp@- <== NOT EXECUTED 451a6: 4e95 jsr %a5@ <== NOT EXECUTED 451a8: 588f addql #4,%sp <== NOT EXECUTED 451aa: 60a0 bras 4514c <rtems_termios_txdaemon+0x22> <== NOT EXECUTED
000442d0 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
442d0: 4e56 ffe4 linkw %fp,#-28 442d4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 442d8: 266e 0008 moveal %fp@(8),%a3
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
442dc: 2053 moveal %a3@,%a0 442de: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
442e2: 42a7 clrl %sp@- 442e4: 42a7 clrl %sp@- 442e6: 2f2a 0018 movel %a2@(24),%sp@- 442ea: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
442f0: 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);
442f4: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
442f6: 662a bnes 44322 <rtems_termios_write+0x52> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
442f8: 202a 00cc movel %a2@(204),%d0 442fc: eb88 lsll #5,%d0 442fe: 0680 0005 d074 addil #381044,%d0 44304: 2240 moveal %d0,%a1 44306: 2051 moveal %a1@,%a0 44308: 4a88 tstl %a0
4430a: 6722 beqs 4432e <rtems_termios_write+0x5e> <== ALWAYS TAKEN
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
4430c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4430e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44310: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
44312: 2f2a 0018 movel %a2@(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);
44316: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
44318: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
4431e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; }
44322: 2002 movel %d2,%d0 <== NOT EXECUTED 44324: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4432a: 4e5e unlk %fp <== NOT EXECUTED 4432c: 4e75 rts <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
4432e: 7001 moveq #1,%d0 44330: c0aa 0034 andl %a2@(52),%d0
44334: 6744 beqs 4437a <rtems_termios_write+0xaa> <== NEVER TAKEN
uint32_t count = args->count;
44336: 282b 0010 movel %a3@(16),%d4
char *buffer = args->buffer;
4433a: 286b 000c moveal %a3@(12),%a4
while (count--)
4433e: 6762 beqs 443a2 <rtems_termios_write+0xd2> <== NEVER TAKEN
44340: 4283 clrl %d3 44342: 4bfa f8a8 lea %pc@(43bec <oproc>),%a5
oproc (*buffer++, tty);
44346: 2f0a movel %a2,%sp@- 44348: 4280 clrl %d0 4434a: 1034 3800 moveb %a4@(00000000,%d3:l),%d0 4434e: 5283 addql #1,%d3 44350: 2f00 movel %d0,%sp@- 44352: 4e95 jsr %a5@
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
44354: 508f addql #8,%sp 44356: b883 cmpl %d3,%d4
44358: 66ec bnes 44346 <rtems_termios_write+0x76>
4435a: 202b 0010 movel %a3@(16),%d0
oproc (*buffer++, tty); args->bytes_moved = args->count;
4435e: 2740 0018 movel %d0,%a3@(24)
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
44362: 2f2a 0018 movel %a2@(24),%sp@- 44366: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release>
return sc;
4436c: 588f addql #4,%sp
}
4436e: 2002 movel %d2,%d0 44370: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 44376: 4e5e unlk %fp 44378: 4e75 rts
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
4437a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4437c: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 44380: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 44384: 4eb9 0004 3ac4 jsr 43ac4 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
4438a: 276b 0010 0018 movel %a3@(16),%a3@(24) <== NOT EXECUTED 44390: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} rtems_semaphore_release (tty->osem);
44394: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44398: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
4439e: 588f addql #4,%sp <== NOT EXECUTED 443a0: 60cc bras 4436e <rtems_termios_write+0x9e> <== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
443a2: 4280 clrl %d0 <== NOT EXECUTED
oproc (*buffer++, tty); args->bytes_moved = args->count;
443a4: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED 443a8: 60b8 bras 44362 <rtems_termios_write+0x92> <== NOT EXECUTED
00058b70 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
58b70: 4e56 fffc linkw %fp,#-4
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
58b74: 486e fffc pea %fp@(-4) 58b78: 2f2e 0008 movel %fp@(8),%sp@- 58b7c: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 58b82: 4eb9 0005 b874 jsr 5b874 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
58b88: 4fef 000c lea %sp@(12),%sp 58b8c: 4aae fffc tstl %fp@(-4)
58b90: 6706 beqs 58b98 <rtems_timer_cancel+0x28>
58b92: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b94: 4e5e unlk %fp 58b96: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
58b98: 7204 moveq #4,%d1 58b9a: 2040 moveal %d0,%a0 58b9c: b2a8 0038 cmpl %a0@(56),%d1
58ba0: 670c beqs 58bae <rtems_timer_cancel+0x3e> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
58ba2: 4868 0010 pea %a0@(16) 58ba6: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> 58bac: 588f addql #4,%sp
_Thread_Enable_dispatch();
58bae: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58bb4: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58bb6: 4e5e unlk %fp
...
00058bbc <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
58bbc: 4e56 0000 linkw %fp,#0 58bc0: 2f0a movel %a2,%sp@- 58bc2: 246e 000c moveal %fp@(12),%a2 58bc6: 2f02 movel %d2,%sp@- 58bc8: 242e 0008 movel %fp@(8),%d2
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
58bcc: 676a beqs 58c38 <rtems_timer_create+0x7c> <== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
58bce: 4a8a tstl %a2 58bd0: 6700 0088 beqw 58c5a <rtems_timer_create+0x9e> 58bd4: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 58bda: 5280 addql #1,%d0 58bdc: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level>
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
58be2: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 58be8: 4eb9 0005 b39c jsr 5b39c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
58bee: 588f addql #4,%sp 58bf0: 2040 moveal %d0,%a0 58bf2: 4a80 tstl %d0
58bf4: 6750 beqs 58c46 <rtems_timer_create+0x8a> <== NEVER TAKEN
58bf6: 2028 0008 movel %a0@(8),%d0 58bfa: 4281 clrl %d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
58bfc: 2142 000c movel %d2,%a0@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
58c00: 2279 0007 d2ee moveal 7d2ee <_Timer_Information+0x18>,%a1
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
58c06: 42a8 0030 clrl %a0@(48) 58c0a: 3200 movew %d0,%d1
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
58c0c: 2480 movel %d0,%a2@
if ( !the_timer ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
58c0e: 7004 moveq #4,%d0 58c10: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) 58c14: 2140 0038 movel %d0,%a0@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
58c18: 42a8 0018 clrl %a0@(24)
the_watchdog->routine = routine;
58c1c: 42a8 002c clrl %a0@(44)
the_watchdog->id = id; the_watchdog->user_data = user_data;
58c20: 42a8 0034 clrl %a0@(52)
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
58c24: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
58c2a: 242e fff8 movel %fp@(-8),%d2
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
58c2e: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
58c30: 246e fffc moveal %fp@(-4),%a2 58c34: 4e5e unlk %fp 58c36: 4e75 rts 58c38: 242e fff8 movel %fp@(-8),%d2
rtems_id *id
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
58c3c: 7003 moveq #3,%d0
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
58c3e: 246e fffc moveal %fp@(-4),%a2 58c42: 4e5e unlk %fp 58c44: 4e75 rts
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
58c46: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
58c4c: 242e fff8 movel %fp@(-8),%d2
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
58c50: 7005 moveq #5,%d0
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
58c52: 246e fffc moveal %fp@(-4),%a2 58c56: 4e5e unlk %fp 58c58: 4e75 rts 58c5a: 242e fff8 movel %fp@(-8),%d2
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
58c5e: 7009 moveq #9,%d0
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
58c60: 246e fffc moveal %fp@(-4),%a2
58c64: 4e5e unlk %fp <== NOT EXECUTED
00058cd4 <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
58cd4: 4e56 ffe8 linkw %fp,#-24 58cd8: 48d7 043c moveml %d2-%d5/%a2,%sp@ 58cdc: 282e 0008 movel %fp@(8),%d4 58ce0: 242e 000c movel %fp@(12),%d2 58ce4: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
58ce8: 4a82 tstl %d2 58cea: 6700 0094 beqw 58d80 <rtems_timer_fire_after+0xac>
return RTEMS_INVALID_NUMBER;
if ( !routine )
58cee: 4a83 tstl %d3 58cf0: 6700 00ae beqw 58da0 <rtems_timer_fire_after+0xcc>
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
58cf4: 486e fffc pea %fp@(-4) 58cf8: 2f04 movel %d4,%sp@- 58cfa: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 58d00: 4eb9 0005 b874 jsr 5b874 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
58d06: 4fef 000c lea %sp@(12),%sp 58d0a: 2440 moveal %d0,%a2 58d0c: 4aae fffc tstl %fp@(-4)
58d10: 6662 bnes 58d74 <rtems_timer_fire_after+0xa0>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
58d12: 2a00 movel %d0,%d5 58d14: 0685 0000 0010 addil #16,%d5 58d1a: 2f05 movel %d5,%sp@- 58d1c: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove>
_ISR_Disable( level );
58d22: 203c 0000 0700 movel #1792,%d0 58d28: 40c1 movew %sr,%d1 58d2a: 8081 orl %d1,%d0 58d2c: 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_timer->Ticker.state != WATCHDOG_INACTIVE ) {
58d2e: 588f addql #4,%sp 58d30: 4aaa 0018 tstl %a2@(24)
58d34: 6656 bnes 58d8c <rtems_timer_fire_after+0xb8> <== NEVER TAKEN
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
58d36: 2543 002c movel %d3,%a2@(44)
the_watchdog->id = id; the_watchdog->user_data = user_data;
58d3a: 256e 0014 0034 movel %fp@(20),%a2@(52)
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
58d40: 2544 0030 movel %d4,%a2@(48)
/*
* 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;
58d44: 42aa 0038 clrl %a2@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
58d48: 42aa 0018 clrl %a2@(24)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
58d4c: 46c1 movew %d1,%sr
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
58d4e: 2542 001c movel %d2,%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
58d52: 2f05 movel %d5,%sp@- 58d54: 4879 0007 d18c pea 7d18c <_Watchdog_Ticks_chain> 58d5a: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
58d60: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
58d66: 508f addql #8,%sp
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
58d68: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58d6a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58d70: 4e5e unlk %fp 58d72: 4e75 rts
if ( !routine )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
58d74: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58d76: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58d7c: 4e5e unlk %fp 58d7e: 4e75 rts
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
58d80: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58d82: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58d88: 4e5e unlk %fp 58d8a: 4e75 rts
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
58d8c: 46c1 movew %d1,%sr
_Thread_Enable_dispatch();
58d8e: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58d94: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58d96: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58d9c: 4e5e unlk %fp 58d9e: 4e75 rts
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
58da0: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58da2: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2
58da8: 4e5e unlk %fp <== NOT EXECUTED
000591bc <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
591bc: 4e56 fffc linkw %fp,#-4 591c0: 202e 0008 movel %fp@(8),%d0 591c4: 2f03 movel %d3,%sp@- 591c6: 2f02 movel %d2,%sp@- 591c8: 4a80 tstl %d0
591ca: 6748 beqs 59214 <rtems_timer_initiate_server+0x58>
591cc: 4281 clrl %d1 591ce: 1239 0007 75d2 moveb 775d2 <rtems_maximum_priority>,%d1 591d4: b280 cmpl %d0,%d1
591d6: 644a bccs 59222 <rtems_timer_initiate_server+0x66>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
591d8: 72ff moveq #-1,%d1 591da: b280 cmpl %d0,%d1
591dc: 6636 bnes 59214 <rtems_timer_initiate_server+0x58>
591de: 2239 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d1 591e4: 5281 addql #1,%d1 591e6: 4283 clrl %d3 591e8: 23c1 0007 d0b4 movel %d1,7d0b4 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
591ee: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
591f0: 1439 0007 8508 moveb 78508 <initialized.4084>,%d2
initialized = true;
591f6: 13c0 0007 8508 moveb %d0,78508 <initialized.4084>
_Thread_Enable_dispatch();
591fc: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
if ( tmpInitialized )
59202: 4a02 tstb %d2
59204: 6744 beqs 5924a <rtems_timer_initiate_server+0x8e>
initialized = false;
}
#endif
return status;
}
59206: 242e fff4 movel %fp@(-12),%d2
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
5920a: 700e moveq #14,%d0
initialized = false;
}
#endif
return status;
}
5920c: 262e fff8 movel %fp@(-8),%d3 59210: 4e5e unlk %fp 59212: 4e75 rts 59214: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59218: 7013 moveq #19,%d0
}
5921a: 262e fff8 movel %fp@(-8),%d3 5921e: 4e5e unlk %fp 59220: 4e75 rts 59222: 2239 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d1 59228: 5281 addql #1,%d1 5922a: 2600 movel %d0,%d3 5922c: 23c1 0007 d0b4 movel %d1,7d0b4 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59232: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59234: 1439 0007 8508 moveb 78508 <initialized.4084>,%d2
initialized = true;
5923a: 13c0 0007 8508 moveb %d0,78508 <initialized.4084>
_Thread_Enable_dispatch();
59240: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
if ( tmpInitialized )
59246: 4a02 tstb %d2
59248: 66bc bnes 59206 <rtems_timer_initiate_server+0x4a><== NEVER TAKEN
* other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create(
5924a: 486e fffc pea %fp@(-4) 5924e: 222e 0010 movel %fp@(16),%d1 59252: 08c1 000f bset #15,%d1 59256: 2f01 movel %d1,%sp@- 59258: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 5925c: 2f2e 000c movel %fp@(12),%sp@- 59260: 2f03 movel %d3,%sp@- 59262: 2f3c 5449 4d45 movel #1414090053,%sp@- 59268: 4eb9 0005 8250 jsr 58250 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
5926e: 4fef 0018 lea %sp@(24),%sp 59272: 4a80 tstl %d0
59274: 6714 beqs 5928a <rtems_timer_initiate_server+0xce>
initialized = false;
}
#endif
return status;
}
59276: 242e fff4 movel %fp@(-12),%d2
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
5927a: 4201 clrb %d1
initialized = false;
}
#endif
return status;
}
5927c: 262e fff8 movel %fp@(-8),%d3 59280: 4e5e unlk %fp
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
59282: 13c1 0007 8508 moveb %d1,78508 <initialized.4084>
initialized = false;
}
#endif
return status;
}
59288: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
5928a: 41f9 0007 853e lea 7853e <_Timer_server_Default+0x34>,%a0
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
59290: 4282 clrl %d2
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
59292: 223c 0007 853a movel #492858,%d1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59298: 23c8 0007 853a movel %a0,7853a <_Timer_server_Default+0x30>
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
5929e: 202e fffc movel %fp@(-4),%d0 592a2: 41f9 0007 8576 lea 78576 <_Timer_server_Default+0x6c>,%a0 592a8: 23c8 0007 8572 movel %a0,78572 <_Timer_server_Default+0x68>
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
592ae: 2079 0007 d040 moveal 7d040 <_RTEMS_tasks_Information+0x18>,%a0 592b4: 3400 movew %d0,%d2
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
592b6: 23c1 0007 8542 movel %d1,78542 <_Timer_server_Default+0x38>
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
592bc: 2239 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d1
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
592c2: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 592c6: 23d0 0007 850a movel %a0@,7850a <_Timer_server_Default> 592cc: 41f9 0007 8572 lea 78572 <_Timer_server_Default+0x68>,%a0 592d2: 23c8 0007 857a movel %a0,7857a <_Timer_server_Default+0x70>
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
592d8: 4879 0007 850a pea 7850a <_Timer_server_Default>
the_watchdog->routine = routine;
592de: 41f9 0005 bfd0 lea 5bfd0 <_Thread_Delay_ended>,%a0 592e4: 23c8 0007 852e movel %a0,7852e <_Timer_server_Default+0x24> 592ea: 487a 0160 pea %pc@(5944c <_Timer_server_Body>) 592ee: 23c8 0007 8566 movel %a0,78566 <_Timer_server_Default+0x5c>
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
592f4: 41f9 0007 d146 lea 7d146 <_TOD_Now>,%a0
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
592fa: 23c1 0007 8546 movel %d1,78546 <_Timer_server_Default+0x3c>
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59300: 23d0 0007 857e movel %a0@,7857e <_Timer_server_Default+0x74>
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
59306: 223c 0005 9688 movel #366216,%d1
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
5930c: 41f9 0007 850a lea 7850a <_Timer_server_Default>,%a0
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
59312: 23c1 0007 850e movel %d1,7850e <_Timer_server_Default+0x4>
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
ts->active = false;
59318: 4201 clrb %d1
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
5931a: 42b9 0007 8582 clrl 78582 <_Timer_server_Default+0x78>
ts->active = false;
59320: 13c1 0007 8586 moveb %d1,78586 <_Timer_server_Default+0x7c>
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
59326: 2f00 movel %d0,%sp@-
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59328: 23c8 0007 d30e movel %a0,7d30e <_Timer_server>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
5932e: 42b9 0007 853e clrl 7853e <_Timer_server_Default+0x34> 59334: 42b9 0007 8576 clrl 78576 <_Timer_server_Default+0x6c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5933a: 42b9 0007 851a clrl 7851a <_Timer_server_Default+0x10>
the_watchdog->routine = routine; the_watchdog->id = id;
59340: 23c0 0007 8532 movel %d0,78532 <_Timer_server_Default+0x28>
the_watchdog->user_data = user_data;
59346: 42b9 0007 8536 clrl 78536 <_Timer_server_Default+0x2c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5934c: 42b9 0007 8552 clrl 78552 <_Timer_server_Default+0x48>
the_watchdog->routine = routine; the_watchdog->id = id;
59352: 23c0 0007 856a movel %d0,7856a <_Timer_server_Default+0x60>
the_watchdog->user_data = user_data;
59358: 42b9 0007 856e clrl 7856e <_Timer_server_Default+0x64>
/*
* Start the timer server
*/
status = rtems_task_start(
5935e: 4eb9 0005 8958 jsr 58958 <rtems_task_start>
initialized = false;
}
#endif
return status;
}
59364: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59368: 4fef 000c lea %sp@(12),%sp
}
5936c: 262e fff8 movel %fp@(-8),%d3
59370: 4e5e unlk %fp <== NOT EXECUTED
00058f30 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
58f30: 4e56 fff0 linkw %fp,#-16 58f34: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 58f38: 486e fffc pea %fp@(-4) 58f3c: 2f2e 0008 movel %fp@(8),%sp@- 58f40: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 58f46: 4eb9 0005 b874 jsr 5b874 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
58f4c: 4fef 000c lea %sp@(12),%sp 58f50: 2440 moveal %d0,%a2 58f52: 4aae fffc tstl %fp@(-4)
58f56: 670e beqs 58f66 <rtems_timer_reset+0x36>
58f58: 7404 moveq #4,%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58f5a: 2002 movel %d2,%d0 58f5c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f62: 4e5e unlk %fp 58f64: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
58f66: 202a 0038 movel %a2@(56),%d0
58f6a: 671a beqs 58f86 <rtems_timer_reset+0x56>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
58f6c: 7201 moveq #1,%d1 58f6e: b280 cmpl %d0,%d1
58f70: 673c beqs 58fae <rtems_timer_reset+0x7e>
58f72: 740b moveq #11,%d2
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
58f74: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58f7a: 2002 movel %d2,%d0 58f7c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f82: 4e5e unlk %fp 58f84: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
58f86: 45ea 0010 lea %a2@(16),%a2
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
58f8a: 4282 clrl %d2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
58f8c: 2f0a movel %a2,%sp@- 58f8e: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
58f94: 2f0a movel %a2,%sp@- 58f96: 4879 0007 d18c pea 7d18c <_Watchdog_Ticks_chain> 58f9c: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert> 58fa2: 4fef 000c lea %sp@(12),%sp
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
58fa6: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58fac: 60cc bras 58f7a <rtems_timer_reset+0x4a>
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
58fae: 486a 0010 pea %a2@(16)
(*timer_server->schedule_operation)( timer_server, the_timer );
58fb2: 4282 clrl %d2
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
58fb4: 2679 0007 d30e moveal 7d30e <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
58fba: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
58fc0: 2f0a movel %a2,%sp@- 58fc2: 2f0b movel %a3,%sp@- 58fc4: 206b 0004 moveal %a3@(4),%a0 58fc8: 4e90 jsr %a0@ 58fca: 4fef 000c lea %sp@(12),%sp
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
58fce: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58fd4: 60a4 bras 58f7a <rtems_timer_reset+0x4a>
...
000590c0 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
590c0: 4e56 ffec linkw %fp,#-20 590c4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 590c8: 242e 000c movel %fp@(12),%d2 590cc: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server;
590d0: 2479 0007 d30e moveal 7d30e <_Timer_server>,%a2
if ( !timer_server )
590d6: 4a8a tstl %a2 590d8: 6700 00c8 beqw 591a2 <rtems_timer_server_fire_when+0xe2>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
590dc: 4a39 0007 d0c8 tstb 7d0c8 <_TOD_Is_set> 590e2: 6700 00a6 beqw 5918a <rtems_timer_server_fire_when+0xca>
return RTEMS_NOT_DEFINED;
if ( !routine )
590e6: 4a83 tstl %d3 590e8: 6700 00ac beqw 59196 <rtems_timer_server_fire_when+0xd6>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
590ec: 2f02 movel %d2,%sp@- 590ee: 4eb9 0005 5d94 jsr 55d94 <_TOD_Validate> 590f4: 588f addql #4,%sp 590f6: 4a00 tstb %d0
590f8: 660c bnes 59106 <rtems_timer_server_fire_when+0x46>
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
590fa: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
590fc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59102: 4e5e unlk %fp 59104: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
59106: 2f02 movel %d2,%sp@- 59108: 4eb9 0005 5c84 jsr 55c84 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
5910e: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
59110: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
59112: b0b9 0007 d146 cmpl 7d146 <_TOD_Now>,%d0
59118: 63e0 blss 590fa <rtems_timer_server_fire_when+0x3a>
5911a: 486e fffc pea %fp@(-4) 5911e: 2f2e 0008 movel %fp@(8),%sp@- 59122: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 59128: 4eb9 0005 b874 jsr 5b874 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
5912e: 4fef 000c lea %sp@(12),%sp 59132: 2640 moveal %d0,%a3 59134: 4aae fffc tstl %fp@(-4)
59138: 6674 bnes 591ae <rtems_timer_server_fire_when+0xee>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
5913a: 486b 0010 pea %a3@(16) 5913e: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove>
the_watchdog->routine = routine; the_watchdog->id = id;
59144: 202e 0008 movel %fp@(8),%d0 59148: 2740 0030 movel %d0,%a3@(48)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
5914c: 94b9 0007 d146 subl 7d146 <_TOD_Now>,%d2
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;
59152: 7003 moveq #3,%d0
the_watchdog->user_data = user_data;
59154: 276e 0014 0034 movel %fp@(20),%a3@(52) 5915a: 2740 0038 movel %d0,%a3@(56)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
5915e: 2742 001c movel %d2,%a3@(28)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
59162: 2743 002c movel %d3,%a3@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59166: 42ab 0018 clrl %a3@(24)
(*timer_server->schedule_operation)( timer_server, the_timer );
5916a: 2f0b movel %a3,%sp@- 5916c: 2f0a movel %a2,%sp@- 5916e: 206a 0004 moveal %a2@(4),%a0 59172: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59174: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5917a: 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();
5917e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59180: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59186: 4e5e unlk %fp 59188: 4e75 rts
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
5918a: 700b moveq #11,%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5918c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59192: 4e5e unlk %fp <== NOT EXECUTED 59194: 4e75 rts <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
59196: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59198: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5919e: 4e5e unlk %fp 591a0: 4e75 rts
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
591a2: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
591a4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591aa: 4e5e unlk %fp 591ac: 4e75 rts
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
591ae: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
591b0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591b6: 4e5e unlk %fp
...
00042330 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
42330: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 42334: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ <== NOT EXECUTED 42338: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
4233c: 2802 movel %d2,%d4 <== NOT EXECUTED 4233e: 0284 2000 0000 andil #536870912,%d4 <== NOT EXECUTED 42344: 6730 beqs 42376 <rtems_verror+0x46> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
42346: 2239 0005 d868 movel 5d868 <rtems_panic_in_progress>,%d1 <== NOT EXECUTED 4234c: 2001 movel %d1,%d0 <== NOT EXECUTED 4234e: 5280 addql #1,%d0 <== NOT EXECUTED 42350: 23c0 0005 d868 movel %d0,5d868 <rtems_panic_in_progress> <== NOT EXECUTED 42356: 4a81 tstl %d1 <== NOT EXECUTED 42358: 6714 beqs 4236e <rtems_verror+0x3e> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4235a: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 42360: 5280 addql #1,%d0 <== NOT EXECUTED 42362: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level><== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
42368: 2039 0005 d868 movel 5d868 <rtems_panic_in_progress>,%d0 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
4236e: 7202 moveq #2,%d1 <== NOT EXECUTED 42370: b280 cmpl %d0,%d1 <== NOT EXECUTED 42372: 6d00 00de bltw 42452 <rtems_verror+0x122> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
42376: 2079 0005 c37c moveal 5c37c <_impure_ptr>,%a0 <== NOT EXECUTED 4237c: 45f9 0004 dbc4 lea 4dbc4 <fflush>,%a2 <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
42382: 2c02 movel %d2,%d6 <== NOT EXECUTED
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
42384: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
42388: 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 */
4238e: 4e92 jsr %a2@ <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
42390: 588f addql #4,%sp <== NOT EXECUTED 42392: 0802 001e btst #30,%d2 <== NOT EXECUTED 42396: 6600 0106 bnew 4249e <rtems_verror+0x16e> <== 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);
4239a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
4239e: 4283 clrl %d3 <== NOT EXECUTED 423a0: 47f9 0004 df50 lea 4df50 <fprintf>,%a3 <== 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);
423a6: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 423aa: 2079 0005 c37c moveal 5c37c <_impure_ptr>,%a0 <== NOT EXECUTED 423b0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423b4: 4eb9 0005 40f0 jsr 540f0 <vfprintf> <== NOT EXECUTED
if (status)
423ba: 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);
423be: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (status)
423c0: 4a86 tstl %d6 <== NOT EXECUTED 423c2: 6600 009a bnew 4245e <rtems_verror+0x12e> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
423c6: 4a83 tstl %d3 <== NOT EXECUTED 423c8: 6732 beqs 423fc <rtems_verror+0xcc> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
423ca: 4a83 tstl %d3 <== NOT EXECUTED 423cc: 6f14 bles 423e2 <rtems_verror+0xb2> <== NOT EXECUTED 423ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423d0: 49f9 0004 e804 lea 4e804 <strerror>,%a4 <== NOT EXECUTED 423d6: 4e94 jsr %a4@ <== NOT EXECUTED 423d8: 588f addql #4,%sp <== NOT EXECUTED 423da: 2040 moveal %d0,%a0 <== NOT EXECUTED 423dc: 4a10 tstb %a0@ <== NOT EXECUTED 423de: 6600 00f4 bnew 424d4 <rtems_verror+0x1a4> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
423e2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423e4: 4879 0005 aea4 pea 5aea4 <IntUartPollCallbacks.6560+0x42> <== NOT EXECUTED 423ea: 2079 0005 c37c moveal 5c37c <_impure_ptr>,%a0 <== NOT EXECUTED 423f0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423f4: 4e93 jsr %a3@ <== NOT EXECUTED 423f6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 423fa: da80 addl %d0,%d5 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
423fc: 4879 0005 b688 pea 5b688 <IMFS_link_handlers+0xb4> <== NOT EXECUTED 42402: 2079 0005 c37c moveal 5c37c <_impure_ptr>,%a0 <== NOT EXECUTED 42408: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
4240c: 0282 3000 0000 andil #805306368,%d2 <== 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");
42412: 4e93 jsr %a3@ <== NOT EXECUTED
(void) fflush(stderr);
42414: 2079 0005 c37c moveal 5c37c <_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");
4241a: 2c00 movel %d0,%d6 <== NOT EXECUTED
(void) fflush(stderr);
4241c: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42420: 4e92 jsr %a2@ <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
42422: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42426: 4a82 tstl %d2 <== NOT EXECUTED 42428: 671a beqs 42444 <rtems_verror+0x114> <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
4242a: 4a84 tstl %d4 <== NOT EXECUTED 4242c: 675c beqs 4248a <rtems_verror+0x15a> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
4242e: 4879 0005 aeb8 pea 5aeb8 <IntUartPollCallbacks.6560+0x56> <== NOT EXECUTED 42434: 42a7 clrl %sp@- <== NOT EXECUTED 42436: 4eb9 0004 2544 jsr 42544 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
4243c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4243e: 4eb9 0004 2e0a jsr 42e0a <_exit> <== 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");
42444: 2006 movel %d6,%d0 <== NOT EXECUTED 42446: d085 addl %d5,%d0 <== NOT EXECUTED
rtems_error(0, "fatal error, aborting");
abort();
}
}
return chars_written;
}
42448: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4244e: 4e5e unlk %fp <== NOT EXECUTED 42450: 4e75 rts <== NOT EXECUTED
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
abort();
42452: 4280 clrl %d0 <== NOT EXECUTED
}
}
return chars_written;
}
42454: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4245a: 4e5e unlk %fp <== NOT EXECUTED 4245c: 4e75 rts <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
4245e: 2f06 movel %d6,%sp@- <== NOT EXECUTED 42460: 4eb9 0004 2318 jsr 42318 <rtems_status_text> <== NOT EXECUTED 42466: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42468: 4879 0005 ae89 pea 5ae89 <IntUartPollCallbacks.6560+0x27> <== NOT EXECUTED 4246e: 2079 0005 c37c moveal 5c37c <_impure_ptr>,%a0 <== NOT EXECUTED 42474: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42478: 4e93 jsr %a3@ <== NOT EXECUTED 4247a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4247e: da80 addl %d0,%d5 <== NOT EXECUTED
if (local_errno)
42480: 4a83 tstl %d3 <== NOT EXECUTED 42482: 6700 ff78 beqw 423fc <rtems_verror+0xcc> <== NOT EXECUTED 42486: 6000 ff42 braw 423ca <rtems_verror+0x9a> <== NOT EXECUTED
rtems_error(0, "fatal error, exiting");
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
4248a: 4879 0005 aecd pea 5aecd <IntUartPollCallbacks.6560+0x6b> <== NOT EXECUTED 42490: 42a7 clrl %sp@- <== NOT EXECUTED 42492: 4eb9 0004 2544 jsr 42544 <rtems_error> <== NOT EXECUTED
abort();
42498: 4eb9 0004 d838 jsr 4d838 <abort> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
4249e: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 424a4: 47f9 0004 df50 lea 4df50 <fprintf>,%a3 <== NOT EXECUTED 424aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 424ac: 2610 movel %a0@,%d3 <== 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);
424ae: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 424b2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 424b6: 2079 0005 c37c moveal 5c37c <_impure_ptr>,%a0 <== NOT EXECUTED 424bc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424c0: 4eb9 0005 40f0 jsr 540f0 <vfprintf> <== NOT EXECUTED
if (status)
424c6: 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);
424ca: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (status)
424cc: 4a86 tstl %d6 <== NOT EXECUTED 424ce: 6700 fef6 beqw 423c6 <rtems_verror+0x96> <== NOT EXECUTED 424d2: 608a bras 4245e <rtems_verror+0x12e> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
424d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
424d6: 0282 3000 0000 andil #805306368,%d2 <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
424dc: 4e94 jsr %a4@ <== NOT EXECUTED 424de: 2f00 movel %d0,%sp@- <== NOT EXECUTED 424e0: 4879 0005 ae97 pea 5ae97 <IntUartPollCallbacks.6560+0x35> <== NOT EXECUTED 424e6: 2079 0005 c37c moveal 5c37c <_impure_ptr>,%a0 <== NOT EXECUTED 424ec: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424f0: 4e93 jsr %a3@ <== NOT EXECUTED
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
424f2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
424f6: da80 addl %d0,%d5 <== NOT EXECUTED
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
424f8: 4879 0005 b688 pea 5b688 <IMFS_link_handlers+0xb4> <== NOT EXECUTED 424fe: 2079 0005 c37c moveal 5c37c <_impure_ptr>,%a0 <== NOT EXECUTED 42504: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42508: 4e93 jsr %a3@ <== NOT EXECUTED
(void) fflush(stderr);
4250a: 2079 0005 c37c moveal 5c37c <_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");
42510: 2c00 movel %d0,%d6 <== NOT EXECUTED
(void) fflush(stderr);
42512: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42516: 4e92 jsr %a2@ <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
42518: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4251c: 4a82 tstl %d2 <== NOT EXECUTED 4251e: 6600 ff0a bnew 4242a <rtems_verror+0xfa> <== NOT EXECUTED 42522: 6000 ff20 braw 42444 <rtems_verror+0x114> <== NOT EXECUTED
000430d4 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
430d4: 4e56 ffe4 linkw %fp,#-28 430d8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 430dc: 246e 0008 moveal %fp@(8),%a2 430e0: 4284 clrl %d4 430e2: 263c 7fff ffff movel #2147483647,%d3 430e8: 4282 clrl %d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
430ea: 47f9 0005 0ed4 lea 50ed4 <__srget_r>,%a3 430f0: 202a 0004 movel %a2@(4),%d0 430f4: 5380 subql #1,%d0 430f6: 2540 0004 movel %d0,%a2@(4)
430fa: 6d62 blts 4315e <scanInt+0x8a> <== NEVER TAKEN
430fc: 2052 moveal %a2@,%a0 430fe: 4280 clrl %d0 43100: 1010 moveb %a0@,%d0 43102: 5288 addql #1,%a0
if (c == ':')
43104: 723a moveq #58,%d1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
43106: 2488 movel %a0,%a2@
if (c == ':')
43108: b280 cmpl %d0,%d1
4310a: 6764 beqs 43170 <scanInt+0x9c>
break;
if (sign == 0) {
4310c: 4a84 tstl %d4
4310e: 660a bnes 4311a <scanInt+0x46> <== NEVER TAKEN
if (c == '-') {
43110: 7c2d moveq #45,%d6 43112: bc80 cmpl %d0,%d6 43114: 6700 0084 beqw 4319a <scanInt+0xc6>
sign = -1;
limit++;
continue;
43118: 7801 moveq #1,%d4
}
sign = 1;
}
if (!isdigit(c))
4311a: 2079 0005 fa28 moveal 5fa28 <__ctype_ptr__>,%a0 43120: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 43124: 49c1 extbl %d1 43126: 44c1 movew %d1,%ccr
43128: 6664 bnes 4318e <scanInt+0xba> <== NEVER TAKEN
return 0;
d = c - '0';
if ((i > (limit / 10))
4312a: 2203 movel %d3,%d1 4312c: 7c0a moveq #10,%d6 4312e: 4c46 1005 remul %d6,%d5,%d1 43132: 4c46 1001 remul %d6,%d1,%d1 43136: b282 cmpl %d2,%d1
43138: 6554 bcss 4318e <scanInt+0xba> <== NEVER TAKEN
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
4313a: 0680 ffff ffd0 addil #-48,%d0
if ((i > (limit / 10))
43140: b282 cmpl %d2,%d1
43142: 6746 beqs 4318a <scanInt+0xb6> <== NEVER TAKEN
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
43144: 2202 movel %d2,%d1 43146: e789 lsll #3,%d1 43148: 2241 moveal %d1,%a1 4314a: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 4314e: 2400 movel %d0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
43150: 202a 0004 movel %a2@(4),%d0 43154: 5380 subql #1,%d0
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
43156: d488 addl %a0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
43158: 2540 0004 movel %d0,%a2@(4)
4315c: 6c9e bges 430fc <scanInt+0x28> <== ALWAYS TAKEN
4315e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43160: 2f39 0005 fa2c movel 5fa2c <_impure_ptr>,%sp@- <== NOT EXECUTED 43166: 4e93 jsr %a3@ <== NOT EXECUTED 43168: 508f addql #8,%sp <== NOT EXECUTED
if (c == ':')
4316a: 723a moveq #58,%d1 <== NOT EXECUTED 4316c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4316e: 669c bnes 4310c <scanInt+0x38> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
43170: 4a84 tstl %d4
43172: 671a beqs 4318e <scanInt+0xba> <== NEVER TAKEN
return 0;
*val = i * sign;
43174: 4c02 4800 mulsl %d2,%d4 43178: 7001 moveq #1,%d0 4317a: 206e 000c moveal %fp@(12),%a0 4317e: 2084 movel %d4,%a0@
return 1; }
43180: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 43186: 4e5e unlk %fp 43188: 4e75 rts
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
4318a: ba80 cmpl %d0,%d5 <== NOT EXECUTED 4318c: 64b6 bccs 43144 <scanInt+0x70> <== NOT EXECUTED
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
4318e: 4280 clrl %d0 <== NOT EXECUTED
}
43190: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 43196: 4e5e unlk %fp <== NOT EXECUTED 43198: 4e75 rts <== NOT EXECUTED
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
4319a: 5283 addql #1,%d3 <== NOT EXECUTED 4319c: 78ff moveq #-1,%d4 <== NOT EXECUTED
continue;
4319e: 6000 ff50 braw 430f0 <scanInt+0x1c> <== NOT EXECUTED
000431a2 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
431a2: 4e56 ffec linkw %fp,#-20
int c;
*name = *bufp;
431a6: 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)
{
431aa: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 431ae: 246e 0008 moveal %fp@(8),%a2
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
431b2: 4bf9 0005 0ed4 lea 50ed4 <__srget_r>,%a5 431b8: 202a 0004 movel %a2@(4),%d0 431bc: 5380 subql #1,%d0
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
431be: 266e 0010 moveal %fp@(16),%a3 431c2: 242e 0018 movel %fp@(24),%d2 431c6: 286e 0014 moveal %fp@(20),%a4
int c;
*name = *bufp;
431ca: 2093 movel %a3@,%a0@
for (;;) {
c = getc(fp);
431cc: 2540 0004 movel %d0,%a2@(4)
431d0: 6d36 blts 43208 <scanString+0x66>
431d2: 2052 moveal %a2@,%a0 431d4: 4280 clrl %d0 431d6: 1010 moveb %a0@,%d0 431d8: 5288 addql #1,%a0
if (c == ':') {
431da: 723a moveq #58,%d1
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
431dc: 2488 movel %a0,%a2@
if (c == ':') {
431de: b280 cmpl %d0,%d1
431e0: 6738 beqs 4321a <scanString+0x78>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
431e2: 720a moveq #10,%d1 431e4: b280 cmpl %d0,%d1
431e6: 674a beqs 43232 <scanString+0x90>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
431e8: 72ff moveq #-1,%d1 431ea: b280 cmpl %d0,%d1
431ec: 6748 beqs 43236 <scanString+0x94> <== NEVER TAKEN
return 0;
if (*nleft < 2)
431ee: 7201 moveq #1,%d1 431f0: b294 cmpl %a4@,%d1
431f2: 6442 bccs 43236 <scanString+0x94> <== NEVER TAKEN
return 0;
**bufp = c;
431f4: 2053 moveal %a3@,%a0 431f6: 1080 moveb %d0,%a0@
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
431f8: 202a 0004 movel %a2@(4),%d0 431fc: 5380 subql #1,%d0
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
431fe: 5293 addql #1,%a3@
--(*nleft);
43200: 5394 subql #1,%a4@
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
43202: 2540 0004 movel %d0,%a2@(4)
43206: 6cca bges 431d2 <scanString+0x30> <== ALWAYS TAKEN
43208: 2f0a movel %a2,%sp@- 4320a: 2f39 0005 fa2c movel 5fa2c <_impure_ptr>,%sp@- 43210: 4e95 jsr %a5@ 43212: 508f addql #8,%sp
if (c == ':') {
43214: 723a moveq #58,%d1 43216: b280 cmpl %d0,%d1
43218: 66c8 bnes 431e2 <scanString+0x40> <== ALWAYS TAKEN
if (nlFlag)
4321a: 4a82 tstl %d2
4321c: 6618 bnes 43236 <scanString+0x94> <== NEVER TAKEN
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
4321e: 2053 moveal %a3@,%a0
++(*bufp); --(*nleft);
43220: 7001 moveq #1,%d0
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
43222: 4210 clrb %a0@
++(*bufp);
43224: 5293 addql #1,%a3@
--(*nleft);
43226: 5394 subql #1,%a4@
return 1; }
43228: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4322e: 4e5e unlk %fp 43230: 4e75 rts
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
43232: 4a82 tstl %d2
43234: 66e8 bnes 4321e <scanString+0x7c> <== ALWAYS TAKEN
--(*nleft);
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
43236: 4280 clrl %d0 <== NOT EXECUTED
}
43238: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 4323e: 4e5e unlk %fp <== NOT EXECUTED
00043242 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
43242: 4e56 ffe4 linkw %fp,#-28 43246: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
4324a: 42a7 clrl %sp@- 4324c: 280e movel %fp,%d4 4324e: 0684 0000 0014 addil #20,%d4 43254: 260e movel %fp,%d3 43256: 0683 0000 0010 addil #16,%d3 4325c: 47fa ff44 lea %pc@(431a2 <scanString>),%a3 43260: 2f04 movel %d4,%sp@- 43262: 2f03 movel %d3,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
43264: 246e 000c moveal %fp@(12),%a2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
43268: 2f0a movel %a2,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
4326a: 242e 0008 movel %fp@(8),%d2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
4326e: 2f02 movel %d2,%sp@- 43270: 4e93 jsr %a3@ 43272: 4fef 0014 lea %sp@(20),%sp 43276: 4a80 tstl %d0
43278: 660c bnes 43286 <scangr+0x44> <== ALWAYS TAKEN
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
4327a: 4280 clrl %d0 <== NOT EXECUTED
}
4327c: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 <== NOT EXECUTED 43282: 4e5e unlk %fp <== NOT EXECUTED 43284: 4e75 rts <== NOT EXECUTED
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
43286: 42a7 clrl %sp@- 43288: 2f04 movel %d4,%sp@- 4328a: 2f03 movel %d3,%sp@- 4328c: 486a 0004 pea %a2@(4) 43290: 2f02 movel %d2,%sp@- 43292: 4e93 jsr %a3@
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
43294: 4fef 0014 lea %sp@(20),%sp 43298: 4a80 tstl %d0
4329a: 67de beqs 4327a <scangr+0x38> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid)
4329c: 486e fffc pea %fp@(-4) 432a0: 2f02 movel %d2,%sp@- 432a2: 4eba fe30 jsr %pc@(430d4 <scanInt>)
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
432a6: 508f addql #8,%sp 432a8: 4a80 tstl %d0
432aa: 67ce beqs 4327a <scangr+0x38> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1))
432ac: 4878 0001 pea 1 <ADD> 432b0: 2f04 movel %d4,%sp@- 432b2: 2f03 movel %d3,%sp@- 432b4: 486e fff8 pea %fp@(-8) 432b8: 2f02 movel %d2,%sp@- 432ba: 4e93 jsr %a3@
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
432bc: 4fef 0014 lea %sp@(20),%sp 432c0: 4a80 tstl %d0
432c2: 67b6 beqs 4327a <scangr+0x38> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
432c4: 226e fff8 moveal %fp@(-8),%a1
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;
432c8: 356e fffe 0008 movew %fp@(-2),%a2@(8)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
432ce: 1011 moveb %a1@,%d0
432d0: 677a beqs 4334c <scangr+0x10a> <== NEVER TAKEN
432d2: 2049 moveal %a1,%a0 432d4: 7201 moveq #1,%d1 432d6: 5288 addql #1,%a0
if(*cp == ',')
432d8: 49c0 extbl %d0 432da: 742c moveq #44,%d2 432dc: b480 cmpl %d0,%d2
432de: 6756 beqs 43336 <scangr+0xf4> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
432e0: 1010 moveb %a0@,%d0
432e2: 66f2 bnes 432d6 <scangr+0x94>
432e4: e589 lsll #2,%d1 432e6: 0681 0000 0013 addil #19,%d1
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
432ec: b2ae 0014 cmpl %fp@(20),%d1
432f0: 6288 bhis 4327a <scangr+0x38> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
432f2: 202e 0010 movel %fp@(16),%d0 432f6: 72f0 moveq #-16,%d1 432f8: 0680 0000 000f addil #15,%d0 432fe: c081 andl %d1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
43300: 2040 moveal %d0,%a0 43302: 2089 movel %a1,%a0@
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43304: 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);
43308: 2540 000a movel %d0,%a2@(10)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4330c: 1010 moveb %a0@,%d0
4330e: 6740 beqs 43350 <scangr+0x10e> <== NEVER TAKEN
43310: 5288 addql #1,%a0 43312: 7201 moveq #1,%d1
if(*cp == ',') {
43314: 49c0 extbl %d0 43316: 742c moveq #44,%d2 43318: b480 cmpl %d0,%d2
4331a: 671e beqs 4333a <scangr+0xf8> <== NEVER TAKEN
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4331c: 1018 moveb %a0@+,%d0
4331e: 66f4 bnes 43314 <scangr+0xd2>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
43320: 206a 000a moveal %a2@(10),%a0 43324: 7001 moveq #1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43326: e589 lsll #2,%d1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
43328: 42b0 1800 clrl %a0@(00000000,%d1:l)
return 1; }
4332c: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 43332: 4e5e unlk %fp 43334: 4e75 rts
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',')
memcount++;
43336: 5281 addql #1,%d1 <== NOT EXECUTED 43338: 60a6 bras 432e0 <scangr+0x9e> <== NOT EXECUTED
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
4333a: 4200 clrb %d0 <== NOT EXECUTED 4333c: 1140 ffff moveb %d0,%a0@(-1) <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
43340: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 43344: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 43348: 5281 addql #1,%d1 <== NOT EXECUTED 4334a: 60d0 bras 4331c <scangr+0xda> <== NOT EXECUTED
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4334c: 7217 moveq #23,%d1 <== NOT EXECUTED 4334e: 609c bras 432ec <scangr+0xaa> <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
43350: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43354: 7204 moveq #4,%d1 <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
43356: 7001 moveq #1,%d0 <== NOT EXECUTED 43358: 42b0 1800 clrl %a0@(00000000,%d1:l) <== NOT EXECUTED 4335c: 60ce bras 4332c <scangr+0xea> <== NOT EXECUTED
0004339c <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
4339c: 4e56 ffe0 linkw %fp,#-32 433a0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
433a4: 42a7 clrl %sp@- 433a6: 280e movel %fp,%d4 433a8: 0684 0000 0014 addil #20,%d4 433ae: 260e movel %fp,%d3 433b0: 0683 0000 0010 addil #16,%d3 433b6: 47fa fdea lea %pc@(431a2 <scanString>),%a3 433ba: 2f04 movel %d4,%sp@- 433bc: 2f03 movel %d3,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
433be: 246e 000c moveal %fp@(12),%a2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
433c2: 2f0a movel %a2,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
433c4: 242e 0008 movel %fp@(8),%d2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
433c8: 2f02 movel %d2,%sp@- 433ca: 4e93 jsr %a3@ 433cc: 4fef 0014 lea %sp@(20),%sp 433d0: 4a80 tstl %d0
433d2: 660c bnes 433e0 <scanpw+0x44> <== ALWAYS TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
433d4: 4280 clrl %d0 <== NOT EXECUTED
}
433d6: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 433dc: 4e5e unlk %fp <== NOT EXECUTED 433de: 4e75 rts <== NOT EXECUTED
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
433e0: 42a7 clrl %sp@- 433e2: 2f04 movel %d4,%sp@- 433e4: 2f03 movel %d3,%sp@- 433e6: 486a 0004 pea %a2@(4) 433ea: 2f02 movel %d2,%sp@- 433ec: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
433ee: 4fef 0014 lea %sp@(20),%sp 433f2: 4a80 tstl %d0
433f4: 67de beqs 433d4 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid)
433f6: 486e fffc pea %fp@(-4) 433fa: 49fa fcd8 lea %pc@(430d4 <scanInt>),%a4 433fe: 2f02 movel %d2,%sp@- 43400: 4e94 jsr %a4@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43402: 508f addql #8,%sp 43404: 4a80 tstl %d0
43406: 67cc beqs 433d4 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid)
43408: 486e fff8 pea %fp@(-8) 4340c: 2f02 movel %d2,%sp@- 4340e: 4e94 jsr %a4@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43410: 508f addql #8,%sp 43412: 4a80 tstl %d0
43414: 67be beqs 433d4 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
43416: 42a7 clrl %sp@- 43418: 2f04 movel %d4,%sp@- 4341a: 2f03 movel %d3,%sp@- 4341c: 486a 000c pea %a2@(12) 43420: 2f02 movel %d2,%sp@- 43422: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43424: 4fef 0014 lea %sp@(20),%sp 43428: 4a80 tstl %d0
4342a: 67a8 beqs 433d4 <scanpw+0x38> <== NEVER TAKEN
|| !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)
4342c: 42a7 clrl %sp@- 4342e: 2f04 movel %d4,%sp@- 43430: 2f03 movel %d3,%sp@- 43432: 486a 0010 pea %a2@(16) 43436: 2f02 movel %d2,%sp@- 43438: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
4343a: 4fef 0014 lea %sp@(20),%sp 4343e: 4a80 tstl %d0
43440: 6792 beqs 433d4 <scanpw+0x38> <== NEVER TAKEN
|| !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)
43442: 42a7 clrl %sp@- 43444: 2f04 movel %d4,%sp@- 43446: 2f03 movel %d3,%sp@- 43448: 486a 0014 pea %a2@(20) 4344c: 2f02 movel %d2,%sp@- 4344e: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43450: 4fef 0014 lea %sp@(20),%sp 43454: 4a80 tstl %d0 43456: 6700 ff7c beqw 433d4 <scanpw+0x38>
|| !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))
4345a: 4878 0001 pea 1 <ADD> 4345e: 2f04 movel %d4,%sp@- 43460: 2f03 movel %d3,%sp@- 43462: 486a 0018 pea %a2@(24) 43466: 2f02 movel %d2,%sp@- 43468: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
4346a: 4fef 0014 lea %sp@(20),%sp 4346e: 4a80 tstl %d0 43470: 6700 ff62 beqw 433d4 <scanpw+0x38>
|| !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;
43474: 7001 moveq #1,%d0 43476: 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;
4347c: 356e fffe 0008 movew %fp@(-2),%a2@(8)
pwd->pw_gid = pwgid; return 1; }
43482: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4
43488: 4e5e unlk %fp <== NOT EXECUTED
000435d4 <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
435d4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
init_etc_passwd_group();
435d8: 4eb9 0004 34ca jsr 434ca <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
435de: 2039 0006 080a movel 6080a <group_fp>,%d0 <== NOT EXECUTED 435e4: 670a beqs 435f0 <setgrent+0x1c> <== NOT EXECUTED
fclose(group_fp);
435e6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 435e8: 4eb9 0004 f9f2 jsr 4f9f2 <fclose> <== NOT EXECUTED 435ee: 588f addql #4,%sp <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
435f0: 4879 0005 f149 pea 5f149 <_global_impure_ptr+0xbf> <== NOT EXECUTED 435f6: 4879 0005 e828 pea 5e828 <rtems_status_assoc+0x218> <== NOT EXECUTED 435fc: 4eb9 0005 0074 jsr 50074 <fopen> <== NOT EXECUTED 43602: 508f addql #8,%sp <== NOT EXECUTED
}
43604: 4e5e unlk %fp <== NOT EXECUTED
{
init_etc_passwd_group();
if (group_fp != NULL)
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
43606: 23c0 0006 080a movel %d0,6080a <group_fp> <== NOT EXECUTED
}
0004379e <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
4379e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
init_etc_passwd_group();
437a2: 4eb9 0004 34ca jsr 434ca <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
437a8: 2039 0006 0722 movel 60722 <passwd_fp>,%d0 <== NOT EXECUTED 437ae: 670a beqs 437ba <setpwent+0x1c> <== NOT EXECUTED
fclose(passwd_fp);
437b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 437b2: 4eb9 0004 f9f2 jsr 4f9f2 <fclose> <== NOT EXECUTED 437b8: 588f addql #4,%sp <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
437ba: 4879 0005 f149 pea 5f149 <_global_impure_ptr+0xbf> <== NOT EXECUTED 437c0: 4879 0005 e7b5 pea 5e7b5 <rtems_status_assoc+0x1a5> <== NOT EXECUTED 437c6: 4eb9 0005 0074 jsr 50074 <fopen> <== NOT EXECUTED 437cc: 508f addql #8,%sp <== NOT EXECUTED
}
437ce: 4e5e unlk %fp <== NOT EXECUTED
{
init_etc_passwd_group();
if (passwd_fp != NULL)
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
437d0: 23c0 0006 0722 movel %d0,60722 <passwd_fp> <== NOT EXECUTED
}
0004425c <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
4425c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44260: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44262: 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)) {
44266: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 4426a: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
44270: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44272: 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)) {
44276: 4a80 tstl %d0 <== NOT EXECUTED 44278: 661c bnes 44296 <siproc+0x3a> <== 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);
4427a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
} return i; }
4427e: 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);
44282: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44288: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
} return i; }
4428c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44290: 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);
44292: 6000 fdd0 braw 44064 <iproc> <== 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);
44296: 42a7 clrl %sp@- <== NOT EXECUTED
i = iproc (c, tty);
44298: 0282 0000 00ff andil #255,%d2 <== 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);
4429e: 42a7 clrl %sp@- <== NOT EXECUTED 442a0: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 442a4: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
442aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED 442ae: 4eba fdb4 jsr %pc@(44064 <iproc>) <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
442b2: 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);
442b6: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
442b8: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
442be: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 442c2: 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);
442c4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
442c8: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 442cc: 4e5e unlk %fp <== NOT EXECUTED
00045160 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
45160: 4e56 ffe0 linkw %fp,#-32 45164: 48d7 001c moveml %d2-%d4,%sp@ 45168: 262e 0008 movel %fp@(8),%d3 4516c: 242e 000c movel %fp@(12),%d2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
45170: 6700 0088 beqw 451fa <stat+0x9a>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
45174: 2f03 movel %d3,%sp@- 45176: 280e movel %fp,%d4 45178: 0684 ffff ffec addil #-20,%d4 4517e: 4eb9 0005 2334 jsr 52334 <strlen> 45184: 7201 moveq #1,%d1 45186: 2e81 movel %d1,%sp@ 45188: 2f04 movel %d4,%sp@- 4518a: 42a7 clrl %sp@- 4518c: 2f00 movel %d0,%sp@- 4518e: 2f03 movel %d3,%sp@- 45190: 4eb9 0004 3814 jsr 43814 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
45196: 4fef 0014 lea %sp@(20),%sp 4519a: 4a80 tstl %d0
4519c: 664e bnes 451ec <stat+0x8c>
return -1;
if ( !loc.handlers->fstat_h ){
4519e: 206e fff4 moveal %fp@(-12),%a0 451a2: 4aa8 0018 tstl %a0@(24)
451a6: 676c beqs 45214 <stat+0xb4> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
451a8: 4878 0046 pea 46 <DBL_MANT_DIG+0x11> 451ac: 42a7 clrl %sp@- 451ae: 2f02 movel %d2,%sp@- 451b0: 4eb9 0005 14f0 jsr 514f0 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
451b6: 2f02 movel %d2,%sp@- 451b8: 2f04 movel %d4,%sp@- 451ba: 206e fff4 moveal %fp@(-12),%a0 451be: 2068 0018 moveal %a0@(24),%a0 451c2: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
451c4: 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 );
451c8: 2400 movel %d0,%d2
rtems_filesystem_freenode( &loc );
451ca: 4fef 0014 lea %sp@(20),%sp 451ce: 4a88 tstl %a0
451d0: 670e beqs 451e0 <stat+0x80> <== NEVER TAKEN
451d2: 2068 001c moveal %a0@(28),%a0 451d6: 4a88 tstl %a0
451d8: 6706 beqs 451e0 <stat+0x80> <== NEVER TAKEN
451da: 2f04 movel %d4,%sp@- 451dc: 4e90 jsr %a0@ 451de: 588f addql #4,%sp
return status;
}
451e0: 2002 movel %d2,%d0 451e2: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 451e8: 4e5e unlk %fp 451ea: 4e75 rts
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
451ec: 74ff moveq #-1,%d2
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
451ee: 2002 movel %d2,%d0 451f0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 451f6: 4e5e unlk %fp 451f8: 4e75 rts
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
451fa: 4eb9 0005 0250 jsr 50250 <__errno> 45200: 74ff moveq #-1,%d2 45202: 760e moveq #14,%d3 45204: 2040 moveal %d0,%a0
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
45206: 2002 movel %d2,%d0
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
45208: 2083 movel %d3,%a0@
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
4520a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 45210: 4e5e unlk %fp 45212: 4e75 rts
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
45214: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 45218: 4a88 tstl %a0 <== NOT EXECUTED 4521a: 670e beqs 4522a <stat+0xca> <== NOT EXECUTED 4521c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 45220: 4a88 tstl %a0 <== NOT EXECUTED 45222: 6706 beqs 4522a <stat+0xca> <== NOT EXECUTED 45224: 2f04 movel %d4,%sp@- <== NOT EXECUTED 45226: 4e90 jsr %a0@ <== NOT EXECUTED 45228: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4522a: 4eb9 0005 0250 jsr 50250 <__errno> <== NOT EXECUTED 45230: 74ff moveq #-1,%d2 <== NOT EXECUTED 45232: 2040 moveal %d0,%a0 <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
45234: 2002 movel %d2,%d0 <== NOT EXECUTED 45236: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4523c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
45242: 4e5e unlk %fp <== NOT EXECUTED
000454c4 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
454c4: 4e56 ffe8 linkw %fp,#-24 454c8: 226e 000c moveal %fp@(12),%a1 454cc: 2f0a movel %a2,%sp@- 454ce: 2f02 movel %d2,%sp@-
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
454d0: 742f moveq #47,%d2 454d2: 1211 moveb %a1@,%d1 454d4: 1001 moveb %d1,%d0 454d6: 49c0 extbl %d0 454d8: b480 cmpl %d0,%d2
454da: 670e beqs 454ea <symlink+0x26>
454dc: 143c 005c moveb #92,%d2 454e0: b480 cmpl %d0,%d2
454e2: 6706 beqs 454ea <symlink+0x26> <== NEVER TAKEN
454e4: 4a01 tstb %d1 454e6: 6600 0092 bnew 4557a <symlink+0xb6> 454ea: 2079 0006 0d28 moveal 60d28 <rtems_current_user_env>,%a0 454f0: 45ee ffe8 lea %fp@(-24),%a2 454f4: 7001 moveq #1,%d0 454f6: 24a8 0018 movel %a0@(24),%a2@ 454fa: 2d68 001c ffec movel %a0@(28),%fp@(-20) 45500: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 45506: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4550c: 2d68 0028 fff8 movel %a0@(40),%fp@(-8)
if ( !loc.ops->evalformake_h ) {
45512: 206e fff4 moveal %fp@(-12),%a0 45516: 2068 0004 moveal %a0@(4),%a0 4551a: 4a88 tstl %a0 4551c: 6700 008a beqw 455a8 <symlink+0xe4>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
45520: 486e fffc pea %fp@(-4) 45524: 2f0a movel %a2,%sp@- 45526: 4871 0800 pea %a1@(00000000,%d0:l) 4552a: 4e90 jsr %a0@
if ( result != 0 )
4552c: 4fef 000c lea %sp@(12),%sp 45530: 4a80 tstl %d0 45532: 6600 0092 bnew 455c6 <symlink+0x102>
return -1;
if ( !loc.ops->symlink_h ) {
45536: 226e fff4 moveal %fp@(-12),%a1 4553a: 2069 0038 moveal %a1@(56),%a0 4553e: 4a88 tstl %a0 45540: 6700 0094 beqw 455d6 <symlink+0x112>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
45544: 2f2e fffc movel %fp@(-4),%sp@- 45548: 2f2e 0008 movel %fp@(8),%sp@- 4554c: 2f0a movel %a2,%sp@- 4554e: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
45550: 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);
45554: 2400 movel %d0,%d2
rtems_filesystem_freenode( &loc );
45556: 4fef 000c lea %sp@(12),%sp 4555a: 4a88 tstl %a0
4555c: 670e beqs 4556c <symlink+0xa8> <== NEVER TAKEN
4555e: 2068 001c moveal %a0@(28),%a0 45562: 4a88 tstl %a0
45564: 6706 beqs 4556c <symlink+0xa8> <== NEVER TAKEN
45566: 2f0a movel %a2,%sp@- 45568: 4e90 jsr %a0@ 4556a: 588f addql #4,%sp
return result;
}
4556c: 2002 movel %d2,%d0 4556e: 242e ffe0 movel %fp@(-32),%d2 45572: 246e ffe4 moveal %fp@(-28),%a2 45576: 4e5e unlk %fp 45578: 4e75 rts
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
4557a: 2079 0006 0d28 moveal 60d28 <rtems_current_user_env>,%a0 45580: 45ee ffe8 lea %fp@(-24),%a2 45584: 5888 addql #4,%a0 45586: 4280 clrl %d0 45588: 2498 movel %a0@+,%a2@ 4558a: 2d58 ffec movel %a0@+,%fp@(-20) 4558e: 2d58 fff0 movel %a0@+,%fp@(-16) 45592: 2d58 fff4 movel %a0@+,%fp@(-12) 45596: 2d50 fff8 movel %a0@,%fp@(-8)
if ( !loc.ops->evalformake_h ) {
4559a: 206e fff4 moveal %fp@(-12),%a0 4559e: 2068 0004 moveal %a0@(4),%a0 455a2: 4a88 tstl %a0 455a4: 6600 ff7a bnew 45520 <symlink+0x5c>
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
455a8: 4eb9 0005 068c jsr 5068c <__errno> <== NOT EXECUTED 455ae: 74ff moveq #-1,%d2 <== NOT EXECUTED 455b0: 2040 moveal %d0,%a0 <== NOT EXECUTED 455b2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
455b8: 2002 movel %d2,%d0 <== NOT EXECUTED 455ba: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED 455be: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED 455c2: 4e5e unlk %fp <== NOT EXECUTED 455c4: 4e75 rts <== NOT EXECUTED
if ( !loc.ops->evalformake_h ) {
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
455c6: 74ff moveq #-1,%d2
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
455c8: 2002 movel %d2,%d0 455ca: 242e ffe0 movel %fp@(-32),%d2 455ce: 246e ffe4 moveal %fp@(-28),%a2 455d2: 4e5e unlk %fp 455d4: 4e75 rts
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
455d6: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 455da: 4a88 tstl %a0 <== NOT EXECUTED 455dc: 67ca beqs 455a8 <symlink+0xe4> <== NOT EXECUTED 455de: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
455e0: 74ff moveq #-1,%d2 <== NOT EXECUTED
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
455e2: 4e90 jsr %a0@ <== NOT EXECUTED 455e4: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
455e6: 4eb9 0005 068c jsr 5068c <__errno> <== NOT EXECUTED 455ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 455ee: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 455f4: 60c2 bras 455b8 <symlink+0xf4> <== NOT EXECUTED
...
00045260 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
45260: 4e56 0000 linkw %fp,#0 45264: 206e 0008 moveal %fp@(8),%a0
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
45268: 2028 0104 movel %a0@(260),%d0
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
4526c: 2f02 movel %d2,%sp@-
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
if ( this_reent ) {
4526e: 4a80 tstl %d0
45270: 6728 beqs 4529a <sync_per_thread+0x3a> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
45272: 2279 0006 19a2 moveal 619a2 <_Thread_Executing>,%a1 45278: 2429 0104 movel %a1@(260),%d2
_Thread_Executing->libc_reent = this_reent;
4527c: 2340 0104 movel %d0,%a1@(260)
_fwalk (t->libc_reent, sync_wrapper);
45280: 487a 0046 pea %pc@(452c8 <sync_wrapper>) 45284: 2f28 0104 movel %a0@(260),%sp@- 45288: 4eb9 0005 11ce jsr 511ce <_fwalk>
_Thread_Executing->libc_reent = current_reent;
4528e: 2079 0006 19a2 moveal 619a2 <_Thread_Executing>,%a0 45294: 508f addql #8,%sp 45296: 2142 0104 movel %d2,%a0@(260)
} }
4529a: 242e fffc movel %fp@(-4),%d2
4529e: 4e5e unlk %fp <== NOT EXECUTED
000445d0 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
445d0: 4e56 0000 linkw %fp,#0 445d4: 202e 000c movel %fp@(12),%d0 445d8: 2f03 movel %d3,%sp@- 445da: 262e 0010 movel %fp@(16),%d3 445de: 2f02 movel %d2,%sp@- 445e0: 242e 0008 movel %fp@(8),%d2
switch (opt) {
445e4: 4a80 tstl %d0
445e6: 6738 beqs 44620 <tcsetattr+0x50> <== ALWAYS TAKEN
445e8: 7201 moveq #1,%d1 <== NOT EXECUTED 445ea: b280 cmpl %d0,%d1 <== NOT EXECUTED 445ec: 671c beqs 4460a <tcsetattr+0x3a> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
445ee: 4eb9 0004 eb30 jsr 4eb30 <__errno> <== NOT EXECUTED 445f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 445f6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
445fc: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44600: 70ff moveq #-1,%d0 <== NOT EXECUTED 44602: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 44606: 4e5e unlk %fp <== NOT EXECUTED 44608: 4e75 rts <== NOT EXECUTED
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
4460a: 42a7 clrl %sp@- <== NOT EXECUTED 4460c: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 44610: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44612: 4eb9 0004 bd84 jsr 4bd84 <ioctl> <== NOT EXECUTED 44618: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4461c: 4a80 tstl %d0 <== NOT EXECUTED 4461e: 6ddc blts 445fc <tcsetattr+0x2c> <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
44620: 2d43 0010 movel %d3,%fp@(16) 44624: 7002 moveq #2,%d0 44626: 2d42 0008 movel %d2,%fp@(8)
} }
4462a: 242e fff8 movel %fp@(-8),%d2 4462e: 262e fffc movel %fp@(-4),%d3
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
44632: 2d40 000c movel %d0,%fp@(12)
} }
44636: 4e5e unlk %fp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
44638: 4ef9 0004 bd84 jmp 4bd84 <ioctl>
...
0004d5a4 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
4d5a4: 4e56 ffbc linkw %fp,#-68 4d5a8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4d5ac: 282e 0008 movel %fp@(8),%d4
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
4d5b0: 2f04 movel %d4,%sp@- 4d5b2: 4eb9 0004 25a4 jsr 425a4 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
4d5b8: 588f addql #4,%sp
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
4d5ba: 2400 movel %d0,%d2
if ( parentpathlen == 0 )
4d5bc: 6600 01c8 bnew 4d786 <unlink+0x1e2>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
4d5c0: 2044 moveal %d4,%a0 4d5c2: 762f moveq #47,%d3 4d5c4: 1210 moveb %a0@,%d1 4d5c6: 1001 moveb %d1,%d0 4d5c8: 49c0 extbl %d0 4d5ca: b680 cmpl %d0,%d3
4d5cc: 670e beqs 4d5dc <unlink+0x38>
4d5ce: 163c 005c moveb #92,%d3 4d5d2: b680 cmpl %d0,%d3
4d5d4: 6706 beqs 4d5dc <unlink+0x38> <== NEVER TAKEN
4d5d6: 4a01 tstb %d1 4d5d8: 6600 00fc bnew 4d6d6 <unlink+0x132> 4d5dc: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 4d5e2: 45ee ffec lea %fp@(-20),%a2 4d5e6: 49ee fff0 lea %fp@(-16),%a4 4d5ea: 200e movel %fp,%d0 4d5ec: 0680 ffff fff4 addil #-12,%d0 4d5f2: 2640 moveal %d0,%a3 4d5f4: 4bee fff8 lea %fp@(-8),%a5 4d5f8: 224e moveal %fp,%a1 4d5fa: 24a8 0018 movel %a0@(24),%a2@ 4d5fe: 28a8 001c movel %a0@(28),%a4@ 4d602: 26a8 0020 movel %a0@(32),%a3@ 4d606: 2aa8 0024 movel %a0@(36),%a5@ 4d60a: 2328 0028 movel %a0@(40),%a1@- 4d60e: 4203 clrb %d3
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4d610: 2040 moveal %d0,%a0
name = path + parentpathlen;
4d612: 2644 moveal %d4,%a3 4d614: d7c2 addal %d2,%a3
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4d616: 240e movel %fp,%d2 4d618: 0682 ffff ffd8 addil #-40,%d2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4d61e: 2d50 ffe0 movel %a0@,%fp@(-32) 4d622: 2d51 ffe8 movel %a1@,%fp@(-24) 4d626: 2d54 ffdc movel %a4@,%fp@(-36)
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4d62a: 49f9 0004 ec34 lea 4ec34 <strlen>,%a4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4d630: 2d55 ffe4 movel %a5@,%fp@(-28) 4d634: 2d52 ffd8 movel %a2@,%fp@(-40)
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4d638: 2f0b movel %a3,%sp@- 4d63a: 4e94 jsr %a4@ 4d63c: 2e80 movel %d0,%sp@ 4d63e: 2f0b movel %a3,%sp@- 4d640: 4eb9 0004 255c jsr 4255c <rtems_filesystem_prefix_separators> 4d646: d7c0 addal %d0,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4d648: 2f0b movel %a3,%sp@- 4d64a: 4e94 jsr %a4@ 4d64c: 4297 clrl %sp@ 4d64e: 2f02 movel %d2,%sp@- 4d650: 42a7 clrl %sp@- 4d652: 2f00 movel %d0,%sp@- 4d654: 2f0b movel %a3,%sp@- 4d656: 4eb9 0004 2616 jsr 42616 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
4d65c: 4fef 001c lea %sp@(28),%sp 4d660: 4a80 tstl %d0 4d662: 6600 00a2 bnew 4d706 <unlink+0x162>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( !loc.ops->node_type_h ) {
4d666: 226e ffe4 moveal %fp@(-28),%a1 4d66a: 2069 0010 moveal %a1@(16),%a0 4d66e: 4a88 tstl %a0 4d670: 6700 00ce beqw 4d740 <unlink+0x19c>
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 ) {
4d674: 2f02 movel %d2,%sp@- 4d676: 4e90 jsr %a0@ 4d678: 588f addql #4,%sp 4d67a: 7201 moveq #1,%d1 4d67c: b280 cmpl %d0,%d1 4d67e: 6700 0140 beqw 4d7c0 <unlink+0x21c>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
4d682: 226e ffe4 moveal %fp@(-28),%a1 4d686: 2069 000c moveal %a1@(12),%a0 4d68a: 4a88 tstl %a0 4d68c: 6700 00b2 beqw 4d740 <unlink+0x19c>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
4d690: 2f02 movel %d2,%sp@- 4d692: 2f0a movel %a2,%sp@- 4d694: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4d696: 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 );
4d69a: 2640 moveal %d0,%a3
rtems_filesystem_freenode( &loc );
4d69c: 508f addql #8,%sp 4d69e: 4a88 tstl %a0
4d6a0: 670e beqs 4d6b0 <unlink+0x10c> <== NEVER TAKEN
4d6a2: 2068 001c moveal %a0@(28),%a0 4d6a6: 4a88 tstl %a0
4d6a8: 6706 beqs 4d6b0 <unlink+0x10c> <== NEVER TAKEN
4d6aa: 2f02 movel %d2,%sp@- 4d6ac: 4e90 jsr %a0@ 4d6ae: 588f addql #4,%sp
if ( free_parentloc )
4d6b0: 4a03 tstb %d3
4d6b2: 6716 beqs 4d6ca <unlink+0x126>
rtems_filesystem_freenode( &parentloc );
4d6b4: 206e fff8 moveal %fp@(-8),%a0 4d6b8: 4a88 tstl %a0
4d6ba: 670e beqs 4d6ca <unlink+0x126> <== NEVER TAKEN
4d6bc: 2068 001c moveal %a0@(28),%a0 4d6c0: 4a88 tstl %a0
4d6c2: 6706 beqs 4d6ca <unlink+0x126> <== NEVER TAKEN
4d6c4: 2f0a movel %a2,%sp@- 4d6c6: 4e90 jsr %a0@ 4d6c8: 588f addql #4,%sp
return result;
}
4d6ca: 200b movel %a3,%d0 4d6cc: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4d6d2: 4e5e unlk %fp 4d6d4: 4e75 rts
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
4d6d6: 2079 0005 c2f4 moveal 5c2f4 <rtems_current_user_env>,%a0 4d6dc: 45ee ffec lea %fp@(-20),%a2 4d6e0: 5888 addql #4,%a0 4d6e2: 49ee fff0 lea %fp@(-16),%a4 4d6e6: 200e movel %fp,%d0 4d6e8: 0680 ffff fff4 addil #-12,%d0 4d6ee: 2640 moveal %d0,%a3 4d6f0: 4bee fff8 lea %fp@(-8),%a5 4d6f4: 224e moveal %fp,%a1 4d6f6: 2498 movel %a0@+,%a2@ 4d6f8: 2898 movel %a0@+,%a4@ 4d6fa: 2698 movel %a0@+,%a3@ 4d6fc: 2a98 movel %a0@+,%a5@ 4d6fe: 2310 movel %a0@,%a1@- 4d700: 4203 clrb %d3 4d702: 6000 ff0c braw 4d610 <unlink+0x6c>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
4d706: 4a03 tstb %d3
4d708: 6610 bnes 4d71a <unlink+0x176> <== ALWAYS TAKEN
result = (*loc.ops->unlink_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
4d70a: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED
return result;
}
4d70e: 200b movel %a3,%d0 <== NOT EXECUTED 4d710: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4d716: 4e5e unlk %fp <== NOT EXECUTED 4d718: 4e75 rts <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
4d71a: 206e fff8 moveal %fp@(-8),%a0 4d71e: 4a88 tstl %a0
4d720: 67e8 beqs 4d70a <unlink+0x166> <== NEVER TAKEN
4d722: 2028 001c movel %a0@(28),%d0
4d726: 67e2 beqs 4d70a <unlink+0x166> <== NEVER TAKEN
4d728: 2f0a movel %a2,%sp@- 4d72a: 2040 moveal %d0,%a0 4d72c: 367c ffff moveaw #-1,%a3 4d730: 4e90 jsr %a0@ 4d732: 588f addql #4,%sp
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4d734: 200b movel %a3,%d0 4d736: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4d73c: 4e5e unlk %fp 4d73e: 4e75 rts
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
4d740: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4d744: 4a88 tstl %a0 <== NOT EXECUTED 4d746: 6706 beqs 4d74e <unlink+0x1aa> <== NOT EXECUTED 4d748: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d74a: 4e90 jsr %a0@ <== NOT EXECUTED 4d74c: 588f addql #4,%sp <== NOT EXECUTED
if ( free_parentloc )
4d74e: 4a03 tstb %d3 <== NOT EXECUTED 4d750: 6716 beqs 4d768 <unlink+0x1c4> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
4d752: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4d756: 4a88 tstl %a0 <== NOT EXECUTED 4d758: 670e beqs 4d768 <unlink+0x1c4> <== NOT EXECUTED 4d75a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4d75e: 4a88 tstl %a0 <== NOT EXECUTED 4d760: 6706 beqs 4d768 <unlink+0x1c4> <== NOT EXECUTED 4d762: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d764: 4e90 jsr %a0@ <== NOT EXECUTED 4d766: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4d768: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 4d76e: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 4d772: 2040 moveal %d0,%a0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4d774: 200b movel %a3,%d0 <== NOT EXECUTED 4d776: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4d77c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4d782: 4e5e unlk %fp <== NOT EXECUTED 4d784: 4e75 rts <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
4d786: 42a7 clrl %sp@- 4d788: 45ee ffec lea %fp@(-20),%a2 4d78c: 2f0a movel %a2,%sp@- 4d78e: 4878 0002 pea 2 <DOUBLE_FLOAT> 4d792: 2f00 movel %d0,%sp@- 4d794: 2f04 movel %d4,%sp@- 4d796: 4eb9 0004 2720 jsr 42720 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
4d79c: 4fef 0014 lea %sp@(20),%sp 4d7a0: 4a80 tstl %d0 4d7a2: 6600 ff66 bnew 4d70a <unlink+0x166> 4d7a6: 200e movel %fp,%d0 4d7a8: 49ee fff0 lea %fp@(-16),%a4 4d7ac: 0680 ffff fff4 addil #-12,%d0 4d7b2: 4bee fff8 lea %fp@(-8),%a5 4d7b6: 43ee fffc lea %fp@(-4),%a1 4d7ba: 7601 moveq #1,%d3 4d7bc: 6000 fe52 braw 4d610 <unlink+0x6c>
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
4d7c0: 206e ffe4 moveal %fp@(-28),%a0 4d7c4: 4a88 tstl %a0
4d7c6: 670e beqs 4d7d6 <unlink+0x232> <== NEVER TAKEN
4d7c8: 2068 001c moveal %a0@(28),%a0 4d7cc: 4a88 tstl %a0
4d7ce: 6706 beqs 4d7d6 <unlink+0x232> <== NEVER TAKEN
4d7d0: 2f02 movel %d2,%sp@- 4d7d2: 4e90 jsr %a0@ 4d7d4: 588f addql #4,%sp
if ( free_parentloc )
4d7d6: 4a03 tstb %d3
4d7d8: 6716 beqs 4d7f0 <unlink+0x24c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
4d7da: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4d7de: 4a88 tstl %a0 <== NOT EXECUTED 4d7e0: 670e beqs 4d7f0 <unlink+0x24c> <== NOT EXECUTED 4d7e2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4d7e6: 4a88 tstl %a0 <== NOT EXECUTED 4d7e8: 6706 beqs 4d7f0 <unlink+0x24c> <== NOT EXECUTED 4d7ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d7ec: 4e90 jsr %a0@ <== NOT EXECUTED 4d7ee: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
4d7f0: 4eb9 0004 d868 jsr 4d868 <__errno> 4d7f6: 367c ffff moveaw #-1,%a3 4d7fa: 2040 moveal %d0,%a0 4d7fc: 7015 moveq #21,%d0 4d7fe: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4d800: 200b movel %a3,%d0 4d802: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5
4d808: 4e5e unlk %fp <== NOT EXECUTED
000495b0 <unmount>:
*/
int unmount(
const char *path
)
{
495b0: 4e56 ffec linkw %fp,#-20 495b4: 2f0a movel %a2,%sp@- 495b6: 246e 0008 moveal %fp@(8),%a2 495ba: 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 ) )
495bc: 240e movel %fp,%d2 495be: 0682 ffff ffec addil #-20,%d2 495c4: 2f0a movel %a2,%sp@- 495c6: 4eb9 0005 57e4 jsr 557e4 <strlen> 495cc: 7201 moveq #1,%d1 495ce: 2e81 movel %d1,%sp@ 495d0: 2f02 movel %d2,%sp@- 495d2: 42a7 clrl %sp@- 495d4: 2f00 movel %d0,%sp@- 495d6: 2f0a movel %a2,%sp@- 495d8: 4eb9 0004 57dc jsr 457dc <rtems_filesystem_evaluate_path> 495de: 4fef 0014 lea %sp@(20),%sp 495e2: 4a80 tstl %d0 495e4: 6600 00b0 bnew 49696 <unmount+0xe6>
return -1;
mt_entry = loc.mt_entry;
495e8: 246e fffc moveal %fp@(-4),%a2
fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
495ec: 202e ffec movel %fp@(-20),%d0 495f0: b0aa 001c cmpl %a2@(28),%d0 495f4: 6600 00fa bnew 496f0 <unmount+0x140>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
495f8: 206e fff8 moveal %fp@(-8),%a0 495fc: 4a88 tstl %a0
495fe: 670e beqs 4960e <unmount+0x5e> <== NEVER TAKEN
49600: 2068 001c moveal %a0@(28),%a0 49604: 4a88 tstl %a0
49606: 6706 beqs 4960e <unmount+0x5e> <== NEVER TAKEN
49608: 2f02 movel %d2,%sp@- 4960a: 4e90 jsr %a0@ 4960c: 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;
4960e: 206a 0014 moveal %a2@(20),%a0 49612: 4aa8 0028 tstl %a0@(40) 49616: 6700 0126 beqw 4973e <unmount+0x18e>
fs_root_loc = &mt_entry->mt_fs_root;
4961a: 206a 0028 moveal %a2@(40),%a0 4961e: 4aa8 002c tstl %a0@(44) 49622: 6700 011a beqw 4973e <unmount+0x18e>
* 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 )
49626: 2079 0006 3f34 moveal 63f34 <rtems_current_user_env>,%a0 4962c: b5e8 0014 cmpal %a0@(20),%a2
49630: 6728 beqs 4965a <unmount+0xaa>
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
49632: 2079 0006 5dcc moveal 65dcc <rtems_filesystem_mount_table_control>,%a0 49638: b1fc 0006 5dd0 cmpal #417232,%a0
4963e: 6734 beqs 49674 <unmount+0xc4> <== NEVER TAKEN
!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 ) {
49640: 202a 002c movel %a2@(44),%d0 49644: b0a8 0018 cmpl %a0@(24),%d0
49648: 6710 beqs 4965a <unmount+0xaa> <== NEVER TAKEN
* 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 ) {
4964a: 2050 moveal %a0@,%a0
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
4964c: b1fc 0006 5dd0 cmpal #417232,%a0
49652: 6720 beqs 49674 <unmount+0xc4>
!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 ) {
49654: b0a8 0018 cmpl %a0@(24),%d0
49658: 66f0 bnes 4964a <unmount+0x9a>
* 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 );
4965a: 4eb9 0005 277c jsr 5277c <__errno>
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
49660: 242e ffe4 movel %fp@(-28),%d2
* 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 );
49664: 2040 moveal %d0,%a0 49666: 7210 moveq #16,%d1 49668: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
4966a: 246e ffe8 moveal %fp@(-24),%a2 4966e: 4e5e unlk %fp
* 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 );
49670: 2081 movel %d1,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
49672: 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 )
49674: 2f0a movel %a2,%sp@- 49676: 4eb9 0004 5b58 jsr 45b58 <rtems_libio_is_open_files_in_fs> 4967c: 588f addql #4,%sp 4967e: 7201 moveq #1,%d1 49680: b280 cmpl %d0,%d1
49682: 67d6 beqs 4965a <unmount+0xaa>
* 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 )
49684: 206a 0014 moveal %a2@(20),%a0 49688: 2f0a movel %a2,%sp@- 4968a: 2068 0028 moveal %a0@(40),%a0 4968e: 4e90 jsr %a0@ 49690: 588f addql #4,%sp 49692: 4a80 tstl %d0
49694: 670e beqs 496a4 <unmount+0xf4> <== ALWAYS TAKEN
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
49696: 242e ffe4 movel %fp@(-28),%d2
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
4969a: 70ff moveq #-1,%d0
}
4969c: 246e ffe8 moveal %fp@(-24),%a2 496a0: 4e5e unlk %fp 496a2: 4e75 rts
* 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){
496a4: 206a 0028 moveal %a2@(40),%a0 496a8: 2f0a movel %a2,%sp@- 496aa: 2068 002c moveal %a0@(44),%a0 496ae: 4e90 jsr %a0@ 496b0: 588f addql #4,%sp 496b2: 4a80 tstl %d0
496b4: 666a bnes 49720 <unmount+0x170> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
496b6: 2f0a movel %a2,%sp@- 496b8: 4eb9 0004 af44 jsr 4af44 <_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 );
496be: 206a 0014 moveal %a2@(20),%a0 496c2: 588f addql #4,%sp 496c4: 4a88 tstl %a0
496c6: 6710 beqs 496d8 <unmount+0x128> <== NEVER TAKEN
496c8: 2068 001c moveal %a0@(28),%a0 496cc: 4a88 tstl %a0
496ce: 6708 beqs 496d8 <unmount+0x128> <== NEVER TAKEN
496d0: 486a 0008 pea %a2@(8) 496d4: 4e90 jsr %a0@ 496d6: 588f addql #4,%sp
free( mt_entry );
496d8: 2f0a movel %a2,%sp@- 496da: 4eb9 0004 58d0 jsr 458d0 <free>
return 0;
}
496e0: 242e ffe4 movel %fp@(-28),%d2
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
496e4: 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 );
496e6: 4280 clrl %d0
return 0;
}
496e8: 246e ffe8 moveal %fp@(-24),%a2 496ec: 4e5e unlk %fp 496ee: 4e75 rts
/*
* 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 );
496f0: 206e fff8 moveal %fp@(-8),%a0 496f4: 4a88 tstl %a0
496f6: 670e beqs 49706 <unmount+0x156> <== NEVER TAKEN
496f8: 2068 001c moveal %a0@(28),%a0 496fc: 4a88 tstl %a0
496fe: 6706 beqs 49706 <unmount+0x156> <== NEVER TAKEN
49700: 2f02 movel %d2,%sp@- 49702: 4e90 jsr %a0@ 49704: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EACCES );
49706: 4eb9 0005 277c jsr 5277c <__errno> 4970c: 740d moveq #13,%d2 4970e: 2040 moveal %d0,%a0 49710: 70ff moveq #-1,%d0 49712: 2082 movel %d2,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
49714: 242e ffe4 movel %fp@(-28),%d2 49718: 246e ffe8 moveal %fp@(-24),%a2 4971c: 4e5e unlk %fp 4971e: 4e75 rts
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
49720: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 49724: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49726: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED 4972a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4972c: 4e90 jsr %a0@ <== NOT EXECUTED 4972e: 588f addql #4,%sp <== NOT EXECUTED 49730: 4a80 tstl %d0 <== NOT EXECUTED 49732: 6700 ff62 beqw 49696 <unmount+0xe6> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
49736: 42a7 clrl %sp@- <== NOT EXECUTED 49738: 4eb9 0004 ac20 jsr 4ac20 <rtems_fatal_error_occurred> <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
4973e: 4eb9 0005 277c jsr 5277c <__errno> <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
49744: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
49748: 2040 moveal %d0,%a0 <== NOT EXECUTED 4974a: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
4974c: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 49750: 4e5e unlk %fp <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
49752: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
...
00047180 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
47180: 4e56 ffe0 linkw %fp,#-32 47184: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47188: 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 ) )
4718c: 240e movel %fp,%d2 4718e: 0682 ffff ffec addil #-20,%d2 47194: 2f03 movel %d3,%sp@-
int utime(
const char *path,
const struct utimbuf *times
)
{
47196: 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 ) )
4719a: 4eb9 0005 2334 jsr 52334 <strlen> 471a0: 7201 moveq #1,%d1 471a2: 2e81 movel %d1,%sp@ 471a4: 2f02 movel %d2,%sp@- 471a6: 42a7 clrl %sp@- 471a8: 2f00 movel %d0,%sp@- 471aa: 2f03 movel %d3,%sp@- 471ac: 4eb9 0004 3814 jsr 43814 <rtems_filesystem_evaluate_path> 471b2: 4fef 0014 lea %sp@(20),%sp 471b6: 4a80 tstl %d0
471b8: 663e bnes 471f8 <utime+0x78>
return -1;
if ( !temp_loc.ops->utime_h ){
471ba: 226e fff8 moveal %fp@(-8),%a1 471be: 2069 0030 moveal %a1@(48),%a0 471c2: 4a88 tstl %a0
471c4: 6740 beqs 47206 <utime+0x86> <== NEVER TAKEN
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 );
471c6: 2f2a 0004 movel %a2@(4),%sp@- 471ca: 2f12 movel %a2@,%sp@- 471cc: 2f02 movel %d2,%sp@- 471ce: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
471d0: 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 );
471d4: 2600 movel %d0,%d3
rtems_filesystem_freenode( &temp_loc );
471d6: 4fef 000c lea %sp@(12),%sp 471da: 4a88 tstl %a0
471dc: 670e beqs 471ec <utime+0x6c> <== NEVER TAKEN
471de: 2068 001c moveal %a0@(28),%a0 471e2: 4a88 tstl %a0
471e4: 6706 beqs 471ec <utime+0x6c> <== NEVER TAKEN
471e6: 2f02 movel %d2,%sp@- 471e8: 4e90 jsr %a0@ 471ea: 588f addql #4,%sp
return result;
}
471ec: 2003 movel %d3,%d0 471ee: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 471f4: 4e5e unlk %fp 471f6: 4e75 rts
)
{
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
471f8: 76ff moveq #-1,%d3
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
471fa: 2003 movel %d3,%d0 471fc: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 47202: 4e5e unlk %fp 47204: 4e75 rts
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
47206: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4720a: 4a88 tstl %a0 <== NOT EXECUTED 4720c: 6706 beqs 47214 <utime+0x94> <== NOT EXECUTED 4720e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47210: 4e90 jsr %a0@ <== NOT EXECUTED 47212: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
47214: 4eb9 0005 0250 jsr 50250 <__errno> <== NOT EXECUTED 4721a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4721c: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
4721e: 2003 movel %d3,%d0 <== NOT EXECUTED 47220: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 <== NOT EXECUTED
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
47226: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
4722c: 4e5e unlk %fp <== NOT EXECUTED
00045238 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45238: 4e56 ffc0 linkw %fp,#-64 4523c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45240: 246e 0008 moveal %fp@(8),%a2
for (; *fmt != '\0'; fmt++) {
45244: 1012 moveb %a2@,%d0
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45246: 2c2e 000c movel %fp@(12),%d6
for (; *fmt != '\0'; fmt++) {
4524a: 4a00 tstb %d0 4524c: 6700 0130 beqw 4537e <vprintk+0x146>
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45250: 49ee ffec lea %fp@(-20),%a4 45254: 4bf9 0005 b30f lea 5b30f <rtems_status_assoc+0x179>,%a5
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
4525a: 49c0 extbl %d0 4525c: 7225 moveq #37,%d1 4525e: b280 cmpl %d0,%d1
45260: 6724 beqs 45286 <vprintk+0x4e>
BSP_output_char(*fmt);
45262: 2f00 movel %d0,%sp@- 45264: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0 4526a: 2d46 ffe8 movel %d6,%fp@(-24) 4526e: 4e90 jsr %a0@
continue;
45270: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45272: 528a addql #1,%a2 45274: 1012 moveb %a2@,%d0 45276: 6700 0106 beqw 4537e <vprintk+0x146> 4527a: 2c2e ffe8 movel %fp@(-24),%d6
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
4527e: 49c0 extbl %d0 45280: 7225 moveq #37,%d1 45282: b280 cmpl %d0,%d1
45284: 66dc bnes 45262 <vprintk+0x2a>
BSP_output_char(*fmt);
continue;
}
fmt++;
45286: 528a addql #1,%a2
if (*fmt == '0' ) {
45288: 7430 moveq #48,%d2 4528a: 1012 moveb %a2@,%d0 4528c: 1200 moveb %d0,%d1 4528e: 49c1 extbl %d1 45290: b481 cmpl %d1,%d2 45292: 6700 01f8 beqw 4548c <vprintk+0x254>
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
45296: 762d moveq #45,%d3
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
45298: 7e20 moveq #32,%d7
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
4529a: b681 cmpl %d1,%d3 4529c: 6700 0200 beqw 4549e <vprintk+0x266>
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
452a0: 0680 ffff ffd0 addil #-48,%d0 452a6: 7a09 moveq #9,%d5 452a8: 0280 0000 00ff andil #255,%d0
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
452ae: 4204 clrb %d4
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
452b0: ba80 cmpl %d0,%d5 452b2: 6500 0208 bcsw 454bc <vprintk+0x284> 452b6: 4282 clrl %d2
width *= 10;
width += ((unsigned) *fmt - '0');
452b8: 2602 movel %d2,%d3
fmt++;
452ba: 528a addql #1,%a2
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
452bc: 7a09 moveq #9,%d5
width *= 10;
width += ((unsigned) *fmt - '0');
452be: e78b lsll #3,%d3
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
452c0: 1012 moveb %a2@,%d0
width *= 10;
width += ((unsigned) *fmt - '0');
452c2: 2043 moveal %d3,%a0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
452c4: 2600 movel %d0,%d3 452c6: 0683 ffff ffd0 addil #-48,%d3
width *= 10;
width += ((unsigned) *fmt - '0');
452cc: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
452d0: 0283 0000 00ff andil #255,%d3
width *= 10;
width += ((unsigned) *fmt - '0');
452d6: 41f0 18d0 lea %a0@(ffffffd0,%d1:l),%a0 452da: 1200 moveb %d0,%d1 452dc: 2408 movel %a0,%d2 452de: 49c1 extbl %d1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
452e0: ba83 cmpl %d3,%d5
452e2: 64d4 bccs 452b8 <vprintk+0x80>
452e4: 1200 moveb %d0,%d1
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
452e6: 706c moveq #108,%d0 452e8: 49c1 extbl %d1 452ea: b081 cmpl %d1,%d0 452ec: 6700 009a beqw 45388 <vprintk+0x150>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
452f0: 7663 moveq #99,%d3 452f2: b681 cmpl %d1,%d3 452f4: 6700 00a0 beqw 45396 <vprintk+0x15e>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
452f8: 7673 moveq #115,%d3 452fa: b681 cmpl %d1,%d3 452fc: 6700 01cc beqw 454ca <vprintk+0x292>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
45300: 766f moveq #111,%d3 45302: b681 cmpl %d1,%d3 45304: 6700 017a beqw 45480 <vprintk+0x248> 45308: 7a4f moveq #79,%d5 4530a: ba81 cmpl %d1,%d5 4530c: 6700 0172 beqw 45480 <vprintk+0x248>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
45310: 163c 0069 moveb #105,%d3 45314: b681 cmpl %d1,%d3 45316: 6700 009a beqw 453b2 <vprintk+0x17a> 4531a: 1a3c 0049 moveb #73,%d5 4531e: ba81 cmpl %d1,%d5 45320: 6700 0090 beqw 453b2 <vprintk+0x17a> 45324: 163c 0064 moveb #100,%d3 45328: b681 cmpl %d1,%d3 4532a: 6700 0086 beqw 453b2 <vprintk+0x17a> 4532e: 1a3c 0044 moveb #68,%d5 45332: ba81 cmpl %d1,%d5
45334: 677c beqs 453b2 <vprintk+0x17a> <== NEVER TAKEN
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
45336: 163c 0075 moveb #117,%d3 4533a: b681 cmpl %d1,%d3 4533c: 6700 0270 beqw 455ae <vprintk+0x376> 45340: 1a3c 0055 moveb #85,%d5 45344: ba81 cmpl %d1,%d5 45346: 6700 0266 beqw 455ae <vprintk+0x376>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
4534a: 163c 0078 moveb #120,%d3 4534e: b681 cmpl %d1,%d3 45350: 6700 027a beqw 455cc <vprintk+0x394> 45354: 1a3c 0058 moveb #88,%d5 45358: ba81 cmpl %d1,%d5 4535a: 6700 0270 beqw 455cc <vprintk+0x394>
base = 16; sign = false;
} else if ( c == 'p' ) {
4535e: 7070 moveq #112,%d0 45360: b081 cmpl %d1,%d0 45362: 6700 0274 beqw 455d8 <vprintk+0x3a0>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
45366: 2f01 movel %d1,%sp@- 45368: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
4536e: 528a addql #1,%a2
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
45370: 2d46 ffe8 movel %d6,%fp@(-24) 45374: 4e90 jsr %a0@
continue;
45376: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45378: 1012 moveb %a2@,%d0 4537a: 6600 fefe bnew 4527a <vprintk+0x42>
sign,
width,
lead
);
}
}
4537e: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 45384: 4e5e unlk %fp 45386: 4e75 rts
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
45388: 528a addql #1,%a2
}
if ( c == 'c' ) {
4538a: 7663 moveq #99,%d3 4538c: 1212 moveb %a2@,%d1 4538e: 49c1 extbl %d1 45390: b681 cmpl %d1,%d3 45392: 6600 ff64 bnew 452f8 <vprintk+0xc0>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
45396: 2046 moveal %d6,%a0
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);
45398: 5886 addql #4,%d6
BSP_output_char(chr);
4539a: 2010 movel %a0@,%d0 4539c: 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);
4539e: 2d46 ffe8 movel %d6,%fp@(-24)
BSP_output_char(chr);
453a2: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0 453a8: 2f00 movel %d0,%sp@- 453aa: 4e90 jsr %a0@
continue;
453ac: 588f addql #4,%sp 453ae: 6000 fec2 braw 45272 <vprintk+0x3a>
} else {
BSP_output_char(c);
continue;
}
printNum(
453b2: 49c7 extbl %d7
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
453b4: 7a0a moveq #10,%d5
}
printNum(
453b6: 2647 moveal %d7,%a3
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
453b8: 7201 moveq #1,%d1
}
printNum(
453ba: 2046 moveal %d6,%a0
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
453bc: 5886 addql #4,%d6
} else {
BSP_output_char(c);
continue;
}
printNum(
453be: 2810 movel %a0@,%d4
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
453c0: 2d46 ffe8 movel %d6,%fp@(-24)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
453c4: 4a01 tstb %d1
453c6: 6706 beqs 453ce <vprintk+0x196>
453c8: 4a84 tstl %d4 453ca: 6d00 01ae bltw 4557a <vprintk+0x342>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
453ce: 2004 movel %d4,%d0 453d0: 4c45 0000 remul %d5,%d0,%d0 453d4: 6700 01c6 beqw 4559c <vprintk+0x364> 453d8: 2600 movel %d0,%d3 453da: 4281 clrl %d1 453dc: 3045 moveaw %d5,%a0 453de: 4c45 3003 remul %d5,%d3,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
453e2: 3e08 movew %a0,%d7 453e4: cfc0 mulsw %d0,%d7 453e6: 9887 subl %d7,%d4 453e8: 2e04 movel %d4,%d7
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
453ea: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
453ec: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 453f0: 5281 addql #1,%d1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
453f2: 4a83 tstl %d3
453f4: 671c beqs 45412 <vprintk+0x1da>
453f6: 2003 movel %d3,%d0 453f8: 2600 movel %d0,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
453fa: 3e08 movew %a0,%d7
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
453fc: 4c45 3003 remul %d5,%d3,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
45400: cfc0 mulsw %d0,%d7 45402: 9887 subl %d7,%d4 45404: 2e04 movel %d4,%d7
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45406: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
45408: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 4540c: 5281 addql #1,%d1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
4540e: 4a83 tstl %d3
45410: 66e4 bnes 453f6 <vprintk+0x1be>
45412: 2800 movel %d0,%d4 45414: 2601 movel %d1,%d3 45416: 5283 addql #1,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
45418: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l)
for (n=maxwidth ; n > count; n-- )
4541c: b682 cmpl %d2,%d3
4541e: 6412 bccs 45432 <vprintk+0x1fa>
BSP_output_char(lead);
45420: 2f0b movel %a3,%sp@- 45422: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
45428: 5382 subql #1,%d2
BSP_output_char(lead);
4542a: 4e90 jsr %a0@
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
4542c: 588f addql #4,%sp 4542e: b682 cmpl %d2,%d3
45430: 65ee bcss 45420 <vprintk+0x1e8>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45432: 4a83 tstl %d3 45434: 6700 fe3c beqw 45272 <vprintk+0x3a> 45438: 4282 clrl %d2 4543a: 47f4 38ff lea %a4@(ffffffff,%d3:l),%a3
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
4543e: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45444: 5282 addql #1,%d2
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45446: 1013 moveb %a3@,%d0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45448: 538b subql #1,%a3
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
4544a: 49c0 extbl %d0 4544c: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45450: 49c0 extbl %d0 45452: 2f00 movel %d0,%sp@- 45454: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45456: 588f addql #4,%sp 45458: b682 cmpl %d2,%d3 4545a: 6300 fe16 blsw 45272 <vprintk+0x3a>
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
4545e: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45464: 5282 addql #1,%d2
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45466: 1013 moveb %a3@,%d0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45468: 538b subql #1,%a3
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
4546a: 49c0 extbl %d0 4546c: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45470: 49c0 extbl %d0 45472: 2f00 movel %d0,%sp@- 45474: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45476: 588f addql #4,%sp 45478: b682 cmpl %d2,%d3
4547a: 62c2 bhis 4543e <vprintk+0x206>
4547c: 6000 fdf4 braw 45272 <vprintk+0x3a>
} else {
BSP_output_char(c);
continue;
}
printNum(
45480: 49c7 extbl %d7 <== NOT EXECUTED
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45482: 7a08 moveq #8,%d5 <== NOT EXECUTED
}
printNum(
45484: 2647 moveal %d7,%a3 <== NOT EXECUTED
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45486: 4201 clrb %d1 <== NOT EXECUTED 45488: 6000 ff30 braw 453ba <vprintk+0x182> <== NOT EXECUTED
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
4548c: 528a addql #1,%a2
}
if (*fmt == '-' ) {
4548e: 762d moveq #45,%d3
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
45490: 1012 moveb %a2@,%d0 45492: 7e30 moveq #48,%d7 45494: 1200 moveb %d0,%d1 45496: 49c1 extbl %d1
}
if (*fmt == '-' ) {
45498: b681 cmpl %d1,%d3 4549a: 6600 fe04 bnew 452a0 <vprintk+0x68>
minus = true;
fmt++;
4549e: 528a addql #1,%a2
}
while (*fmt >= '0' && *fmt <= '9' ) {
454a0: 7a09 moveq #9,%d5
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
454a2: 1012 moveb %a2@,%d0 454a4: 7801 moveq #1,%d4 454a6: 1200 moveb %d0,%d1
}
while (*fmt >= '0' && *fmt <= '9' ) {
454a8: 0680 ffff ffd0 addil #-48,%d0 454ae: 0280 0000 00ff andil #255,%d0 454b4: 49c1 extbl %d1 454b6: ba80 cmpl %d0,%d5 454b8: 6400 fdfc bccw 452b6 <vprintk+0x7e> 454bc: 4282 clrl %d2
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
454be: 706c moveq #108,%d0 454c0: b081 cmpl %d1,%d0 454c2: 6600 fe2c bnew 452f0 <vprintk+0xb8> 454c6: 6000 fec0 braw 45388 <vprintk+0x150>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
454ca: 2046 moveal %d6,%a0 454cc: 5886 addql #4,%d6 454ce: 2650 moveal %a0@,%a3 454d0: 2d46 ffe8 movel %d6,%fp@(-24)
if ( str == NULL ) {
454d4: 4a8b tstl %a3 454d6: 6700 00e2 beqw 455ba <vprintk+0x382>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
454da: 4a13 tstb %a3@ 454dc: 6700 00e8 beqw 455c6 <vprintk+0x38e> 454e0: 4283 clrl %d3 454e2: 5283 addql #1,%d3 454e4: 4a33 3800 tstb %a3@(00000000,%d3:l)
454e8: 66f8 bnes 454e2 <vprintk+0x2aa>
;
/* leading spaces */
if ( !minus )
454ea: 4a04 tstb %d4
454ec: 661a bnes 45508 <vprintk+0x2d0>
for ( i=len ; i<width ; i++ )
454ee: b682 cmpl %d2,%d3
454f0: 6416 bccs 45508 <vprintk+0x2d0> <== ALWAYS TAKEN
454f2: 2a03 movel %d3,%d5 <== NOT EXECUTED
BSP_output_char(' ');
454f4: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
454f8: 5285 addql #1,%d5 <== NOT EXECUTED
BSP_output_char(' ');
454fa: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0 <== NOT EXECUTED 45500: 4e90 jsr %a0@ <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
45502: 588f addql #4,%sp <== NOT EXECUTED 45504: b485 cmpl %d5,%d2 <== NOT EXECUTED 45506: 62ec bhis 454f4 <vprintk+0x2bc> <== NOT EXECUTED
BSP_output_char(' ');
/* no width option */
if (width == 0) {
45508: 4a82 tstl %d2
4550a: 6606 bnes 45512 <vprintk+0x2da>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
4550c: 4a83 tstl %d3
4550e: 6730 beqs 45540 <vprintk+0x308>
45510: 2403 movel %d3,%d2 45512: 1013 moveb %a3@,%d0
45514: 672a beqs 45540 <vprintk+0x308> <== NEVER TAKEN
BSP_output_char(*str);
45516: 49c0 extbl %d0
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45518: 528b addql #1,%a3
BSP_output_char(*str);
4551a: 2f00 movel %d0,%sp@- 4551c: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0 45522: 4e90 jsr %a0@
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45524: 588f addql #4,%sp 45526: 1013 moveb %a3@,%d0 45528: 528b addql #1,%a3
4552a: 6714 beqs 45540 <vprintk+0x308>
BSP_output_char(*str);
4552c: 49c0 extbl %d0 4552e: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0 45534: 2f00 movel %d0,%sp@- 45536: 4e90 jsr %a0@
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45538: 588f addql #4,%sp 4553a: 1013 moveb %a3@,%d0 4553c: 528b addql #1,%a3
4553e: 66ec bnes 4552c <vprintk+0x2f4>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
45540: 4a04 tstb %d4 45542: 6700 fd2e beqw 45272 <vprintk+0x3a>
for ( i=len ; i<width ; i++ )
45546: b483 cmpl %d3,%d2 45548: 6300 fd28 blsw 45272 <vprintk+0x3a>
BSP_output_char(' ');
4554c: 4878 0020 pea 20 <OPER2+0xc>
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45550: 5283 addql #1,%d3
BSP_output_char(' ');
45552: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0 45558: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
4555a: 588f addql #4,%sp 4555c: b483 cmpl %d3,%d2 4555e: 6300 fd12 blsw 45272 <vprintk+0x3a>
BSP_output_char(' ');
45562: 4878 0020 pea 20 <OPER2+0xc>
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45566: 5283 addql #1,%d3
BSP_output_char(' ');
45568: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0 4556e: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45570: 588f addql #4,%sp 45572: b483 cmpl %d3,%d2
45574: 62d6 bhis 4554c <vprintk+0x314>
45576: 6000 fcfa braw 45272 <vprintk+0x3a>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
4557a: 4878 002d pea 2d <OPER2+0x19> <== NOT EXECUTED
unsigned_num = (unsigned long) -num;
4557e: 4484 negl %d4 <== NOT EXECUTED
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
45580: 2079 0005 c2dc moveal 5c2dc <BSP_output_char>,%a0 <== NOT EXECUTED 45586: 4e90 jsr %a0@ <== NOT EXECUTED
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
45588: 588f addql #4,%sp <== NOT EXECUTED 4558a: 4a82 tstl %d2 <== NOT EXECUTED 4558c: 6700 fe40 beqw 453ce <vprintk+0x196> <== NOT EXECUTED
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45590: 2004 movel %d4,%d0 <== NOT EXECUTED
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
45592: 5382 subql #1,%d2 <== NOT EXECUTED
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45594: 4c45 0000 remul %d5,%d0,%d0 <== NOT EXECUTED 45598: 6600 fe3e bnew 453d8 <vprintk+0x1a0> <== NOT EXECUTED
4559c: 4281 clrl %d1 4559e: 7601 moveq #1,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
455a0: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l)
for (n=maxwidth ; n > count; n-- )
455a4: b682 cmpl %d2,%d3 455a6: 6500 fe78 bcsw 45420 <vprintk+0x1e8> 455aa: 6000 fe86 braw 45432 <vprintk+0x1fa>
} else {
BSP_output_char(c);
continue;
}
printNum(
455ae: 49c7 extbl %d7
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
455b0: 7a0a moveq #10,%d5
}
printNum(
455b2: 2647 moveal %d7,%a3
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
455b4: 4201 clrb %d1 455b6: 6000 fe02 braw 453ba <vprintk+0x182>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
455ba: 47f9 0005 b30e lea 5b30e <rtems_status_assoc+0x178>,%a3
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
455c0: 4a13 tstb %a3@ 455c2: 6600 ff1c bnew 454e0 <vprintk+0x2a8> 455c6: 4283 clrl %d3 455c8: 6000 ff20 braw 454ea <vprintk+0x2b2>
} else {
BSP_output_char(c);
continue;
}
printNum(
455cc: 49c7 extbl %d7
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
455ce: 7a10 moveq #16,%d5
}
printNum(
455d0: 2647 moveal %d7,%a3
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
455d2: 4201 clrb %d1 455d4: 6000 fde4 braw 453ba <vprintk+0x182>
}
printNum(
455d8: 49c7 extbl %d7 455da: 2647 moveal %d7,%a3 455dc: 7a10 moveq #16,%d5 455de: 4201 clrb %d1 455e0: 6000 fdd8 braw 453ba <vprintk+0x182>
0005a58c <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
5a58c: 4e56 fff4 linkw %fp,#-12 5a590: 202e 0008 movel %fp@(8),%d0 5a594: 222e 000c movel %fp@(12),%d1 5a598: 206e 0010 moveal %fp@(16),%a0 5a59c: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5a5a0: b0b9 0005 c1e4 cmpl 5c1e4 <rtems_libio_number_iops>,%d0
5a5a6: 6466 bccs 5a60e <write+0x82> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
5a5a8: 2479 0005 d86c moveal 5d86c <rtems_libio_iops>,%a2 5a5ae: ed88 lsll #6,%d0 5a5b0: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5a5b2: 202a 0014 movel %a2@(20),%d0 5a5b6: 0800 0008 btst #8,%d0
5a5ba: 6752 beqs 5a60e <write+0x82> <== NEVER TAKEN
rtems_libio_check_buffer( buffer );
5a5bc: 4a81 tstl %d1
5a5be: 6766 beqs 5a626 <write+0x9a> <== NEVER TAKEN
rtems_libio_check_count( count );
5a5c0: 4a88 tstl %a0
5a5c2: 673e beqs 5a602 <write+0x76> rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5a5c4: 44c0 movew %d0,%ccr
5a5c6: 665e bnes 5a626 <write+0x9a> <== NEVER TAKEN
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
5a5c8: 226a 003c moveal %a2@(60),%a1 5a5cc: 2269 000c moveal %a1@(12),%a1 5a5d0: 4a89 tstl %a1
5a5d2: 676a beqs 5a63e <write+0xb2> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
5a5d4: 2f08 movel %a0,%sp@- 5a5d6: 2f01 movel %d1,%sp@- 5a5d8: 2f0a movel %a2,%sp@- 5a5da: 4e91 jsr %a1@
if ( rc > 0 )
5a5dc: 4fef 000c lea %sp@(12),%sp 5a5e0: 4a80 tstl %d0
5a5e2: 6f14 bles 5a5f8 <write+0x6c> <== NEVER TAKEN
iop->offset += rc;
5a5e4: 2400 movel %d0,%d2 5a5e6: 5bc1 smi %d1 5a5e8: 49c1 extbl %d1 5a5ea: d5aa 0010 addl %d2,%a2@(16) 5a5ee: 262a 000c movel %a2@(12),%d3 5a5f2: d781 addxl %d1,%d3 5a5f4: 2543 000c movel %d3,%a2@(12)
return rc;
}
5a5f8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a5fe: 4e5e unlk %fp 5a600: 4e75 rts
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
5a602: 4280 clrl %d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a604: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a60a: 4e5e unlk %fp 5a60c: 4e75 rts
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
5a60e: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 5a614: 7409 moveq #9,%d2 <== NOT EXECUTED 5a616: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a618: 70ff moveq #-1,%d0 <== NOT EXECUTED 5a61a: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a61c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5a622: 4e5e unlk %fp <== NOT EXECUTED 5a624: 4e75 rts <== NOT EXECUTED
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5a626: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 5a62c: 7216 moveq #22,%d1 <== NOT EXECUTED 5a62e: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a630: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a632: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5a638: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a63a: 4e5e unlk %fp <== NOT EXECUTED 5a63c: 4e75 rts <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5a63e: 4eb9 0004 d868 jsr 4d868 <__errno> <== NOT EXECUTED 5a644: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a646: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a648: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5a64e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a654: 4e5e unlk %fp <== NOT EXECUTED
00046f3c <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
46f3c: 4e56 ffe4 linkw %fp,#-28 46f40: 202e 0008 movel %fp@(8),%d0 46f44: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 46f48: 246e 000c moveal %fp@(12),%a2 46f4c: 242e 0010 movel %fp@(16),%d2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
46f50: b0b9 0005 fe54 cmpl 5fe54 <rtems_libio_number_iops>,%d0 46f56: 6400 00f0 bccw 47048 <writev+0x10c>
iop = rtems_libio_iop( fd );
46f5a: 2679 0006 1cb0 moveal 61cb0 <rtems_libio_iops>,%a3 46f60: ed88 lsll #6,%d0 46f62: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
46f64: 202b 0014 movel %a3@(20),%d0 46f68: 0800 0008 btst #8,%d0 46f6c: 6700 00da beqw 47048 <writev+0x10c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
46f70: 44c0 movew %d0,%ccr
46f72: 666e bnes 46fe2 <writev+0xa6> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
46f74: 4a8a tstl %a2
46f76: 676a beqs 46fe2 <writev+0xa6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
46f78: 4a82 tstl %d2
46f7a: 6f66 bles 46fe2 <writev+0xa6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
46f7c: 0c82 0000 0400 cmpil #1024,%d2
46f82: 6e5e bgts 46fe2 <writev+0xa6> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
46f84: 206b 003c moveal %a3@(60),%a0 46f88: 4aa8 000c tstl %a0@(12) 46f8c: 6700 00d4 beqw 47062 <writev+0x126>
rtems_set_errno_and_return_minus_one( ENOTSUP );
46f90: 204a moveal %a2,%a0 46f92: 93c9 subal %a1,%a1 46f94: 4281 clrl %d1 46f96: 7601 moveq #1,%d3
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
if ( !iov[v].iov_base )
46f98: 4a90 tstl %a0@
46f9a: 6746 beqs 46fe2 <writev+0xa6>
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 )
46f9c: 2028 0004 movel %a0@(4),%d0 46fa0: 57c4 seq %d4
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
46fa2: d081 addl %d1,%d0
* 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++ ) {
46fa4: 5289 addql #1,%a1 46fa6: 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 )
46fa8: c883 andl %d3,%d4 46faa: 1604 moveb %d4,%d3
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
46fac: b081 cmpl %d1,%d0
46fae: 6d32 blts 46fe2 <writev+0xa6>
* 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++ ) {
46fb0: 2200 movel %d0,%d1
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
46fb2: 0c80 0000 7fff cmpil #32767,%d0
46fb8: 6e28 bgts 46fe2 <writev+0xa6> <== NEVER TAKEN
* 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++ ) {
46fba: b3c2 cmpal %d2,%a1
46fbc: 6dda blts 46f98 <writev+0x5c>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
46fbe: 4a04 tstb %d4
46fc0: 663a bnes 46ffc <writev+0xc0>
46fc2: 588a addql #4,%a2 46fc4: 4283 clrl %d3 46fc6: 4284 clrl %d4
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
46fc8: 2012 movel %a2@,%d0
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
46fca: 5283 addql #1,%d3
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
46fcc: 4a80 tstl %d0
46fce: 663a bnes 4700a <writev+0xce>
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
46fd0: 508a addql #8,%a2 <== NOT EXECUTED 46fd2: b682 cmpl %d2,%d3 <== NOT EXECUTED 46fd4: 6df2 blts 46fc8 <writev+0x8c> <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
46fd6: 2004 movel %d4,%d0 46fd8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46fde: 4e5e unlk %fp 46fe0: 4e75 rts
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
46fe2: 4eb9 0004 fd94 jsr 4fd94 <__errno> 46fe8: 78ff moveq #-1,%d4 46fea: 2040 moveal %d0,%a0 46fec: 7016 moveq #22,%d0 46fee: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
46ff0: 2004 movel %d4,%d0 46ff2: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46ff8: 4e5e unlk %fp 46ffa: 4e75 rts
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
46ffc: 4284 clrl %d4
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
46ffe: 2004 movel %d4,%d0 47000: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 47006: 4e5e unlk %fp 47008: 4e75 rts
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
4700a: 206b 003c moveal %a3@(60),%a0 4700e: 2f00 movel %d0,%sp@- 47010: 2f2a fffc movel %a2@(-4),%sp@- 47014: 2f0b movel %a3,%sp@- 47016: 2068 000c moveal %a0@(12),%a0 4701a: 4e90 jsr %a0@
if ( bytes < 0 )
4701c: 4fef 000c lea %sp@(12),%sp 47020: 4a80 tstl %d0
47022: 6d5a blts 4707e <writev+0x142> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
47024: 6716 beqs 4703c <writev+0x100> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
47026: d880 addl %d0,%d4
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
47028: 2c00 movel %d0,%d6 4702a: 5bc5 smi %d5 4702c: 49c5 extbl %d5 4702e: ddab 0010 addl %d6,%a3@(16) 47032: 222b 000c movel %a3@(12),%d1 47036: d385 addxl %d5,%d1 47038: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
4703c: b092 cmpl %a2@,%d0
4703e: 6696 bnes 46fd6 <writev+0x9a> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
47040: 508a addql #8,%a2 47042: b682 cmpl %d2,%d3
47044: 6d82 blts 46fc8 <writev+0x8c> <== NEVER TAKEN
47046: 608e bras 46fd6 <writev+0x9a>
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
47048: 4eb9 0004 fd94 jsr 4fd94 <__errno> 4704e: 78ff moveq #-1,%d4 47050: 7209 moveq #9,%d1 47052: 2040 moveal %d0,%a0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47054: 2004 movel %d4,%d0 47056: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
4705c: 2081 movel %d1,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4705e: 4e5e unlk %fp 47060: 4e75 rts
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
47062: 4eb9 0004 fd94 jsr 4fd94 <__errno> <== NOT EXECUTED 47068: 78ff moveq #-1,%d4 <== NOT EXECUTED 4706a: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4706c: 2004 movel %d4,%d0 <== NOT EXECUTED 4706e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
47074: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4707a: 4e5e unlk %fp <== NOT EXECUTED 4707c: 4e75 rts <== NOT EXECUTED
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
4707e: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47080: 2004 movel %d4,%d0 <== NOT EXECUTED 47082: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 47088: 4e5e unlk %fp <== NOT EXECUTED